diff --git a/Get Started.pdf b/Get Started.pdf
index 7e8f559..e14f270 100644
Binary files a/Get Started.pdf and b/Get Started.pdf differ
diff --git a/Marvel.sketchplugin/Contents/Resources/logo.png b/Marvel.sketchplugin/Contents/Resources/logo.png
deleted file mode 100644
index d46b444..0000000
Binary files a/Marvel.sketchplugin/Contents/Resources/logo.png and /dev/null differ
diff --git a/Marvel.sketchplugin/Contents/Resources/logo@2x.png b/Marvel.sketchplugin/Contents/Resources/logo@2x.png
deleted file mode 100644
index 947fdb6..0000000
Binary files a/Marvel.sketchplugin/Contents/Resources/logo@2x.png and /dev/null differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/CocoaScript b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/CocoaScript
new file mode 120000
index 0000000..6bdcc30
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/CocoaScript
@@ -0,0 +1 @@
+Versions/Current/CocoaScript
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Resources b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Resources
new file mode 120000
index 0000000..953ee36
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Resources
@@ -0,0 +1 @@
+Versions/Current/Resources
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/CocoaScript b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/CocoaScript
new file mode 100755
index 0000000..96d6c7a
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/CocoaScript differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/Resources/Info.plist b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/Resources/Info.plist
new file mode 100755
index 0000000..8a0252e
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ BuildMachineOSBuild
+ 13E28
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ CocoaScript
+ CFBundleIdentifier
+ com.cocoascript.CocoaScript
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ FMWK
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 5B45j
+ DTPlatformVersion
+ GM
+ DTSDKBuild
+ 13A595
+ DTSDKName
+ macosx10.9
+ DTXcode
+ 0510
+ DTXcodeBuild
+ 5B45j
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/_CodeSignature/CodeResources b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/_CodeSignature/CodeResources
new file mode 100755
index 0000000..75a38db
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/A/_CodeSignature/CodeResources
@@ -0,0 +1,122 @@
+
+
+
+
+ files
+
+ Resources/Info.plist
+
+ KmBVYxi8MkQSpvdzxPVHp+Zo9bE=
+
+
+ files2
+
+ Resources/Info.plist
+
+ hash
+
+ KmBVYxi8MkQSpvdzxPVHp+Zo9bE=
+
+ hash2
+
+ 9eU1b0DctVVCOQQyevyhOEovaQ3WaqJP4xT+iVwOTi4=
+
+
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/Current b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/Current
new file mode 120000
index 0000000..8c7e5a6
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Frameworks/CocoaScript.framework/Versions/Current
@@ -0,0 +1 @@
+A
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Info.plist b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Info.plist
new file mode 100644
index 0000000..690458a
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Info.plist
@@ -0,0 +1,62 @@
+
+
+
+
+ BuildMachineOSBuild
+ 15E65
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ Launcher
+ CFBundleIconFile
+ AppIcon
+ CFBundleIdentifier
+ com.marvelprototyping.Launcher
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ Launcher
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CFBundleVersion
+ 1
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 7D1014
+ DTPlatformVersion
+ GM
+ DTSDKBuild
+ 14D125
+ DTSDKName
+ macosx10.10
+ DTXcode
+ 0731
+ DTXcodeBuild
+ 7D1014
+ LSApplicationCategoryType
+ public.app-category.graphics-design
+ LSBackgroundOnly
+
+ LSMinimumSystemVersion
+ 10.10
+ LSMultipleInstancesProhibited
+
+ LSUIElement
+
+ NSHumanReadableCopyright
+ Copyright © 2016 Marvel Prototyping. All rights reserved.
+ NSMainNibFile
+ MainMenu
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/MacOS/Launcher b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/MacOS/Launcher
new file mode 100755
index 0000000..c67e264
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/MacOS/Launcher differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/PkgInfo b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/PkgInfo
new file mode 100644
index 0000000..bd04210
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/PkgInfo
@@ -0,0 +1 @@
+APPL????
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/AppIcon.icns b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/AppIcon.icns
new file mode 100644
index 0000000..8357b98
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/AppIcon.icns differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/en.lproj/MainMenu.nib b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/en.lproj/MainMenu.nib
new file mode 100644
index 0000000..963665a
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/Resources/en.lproj/MainMenu.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/_CodeSignature/CodeResources b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/_CodeSignature/CodeResources
new file mode 100644
index 0000000..e25bf09
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,164 @@
+
+
+
+
+ files
+
+ Resources/AppIcon.icns
+
+ XlM7lZR9Q+aUtL/HNPOZWQr/M+k=
+
+ Resources/en.lproj/MainMenu.nib
+
+ hash
+
+ s38AVuO78z8mW/yOgDgJBS7xzb4=
+
+ optional
+
+
+
+ files2
+
+ Frameworks/CocoaScript.framework
+
+ cdhash
+
+ UrLhSTf3m05hldrYtSW13V0l5vc=
+
+ requirement
+ anchor apple generic and identifier "com.cocoascript.CocoaScript" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "7C95EP5VB7")
+
+ Resources/AppIcon.icns
+
+ hash
+
+ XlM7lZR9Q+aUtL/HNPOZWQr/M+k=
+
+ hash2
+
+ YL6CCNECcYpn9d5gvgz+5N8r7L3bcY1+/jbC1gq3UDU=
+
+
+ Resources/en.lproj/MainMenu.nib
+
+ hash
+
+ s38AVuO78z8mW/yOgDgJBS7xzb4=
+
+ hash2
+
+ OmoJ3w4Jq5DcFP8bPiNrjy+pEgRxO9w6POFXybyoZa8=
+
+ optional
+
+
+ embedded.provisionprofile
+
+ hash
+
+ PMZn+q5miqNFnZnnjl6XVsrBCgA=
+
+ hash2
+
+ AaypXBmm+89FZv8HJEjBhwXgd9M14eOttrFnblnuwUA=
+
+
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/embedded.provisionprofile b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/embedded.provisionprofile
new file mode 100644
index 0000000..3ee553a
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/Launcher.app/Contents/embedded.provisionprofile differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/MarvelSketch b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/MarvelSketch
new file mode 120000
index 0000000..101560a
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/MarvelSketch
@@ -0,0 +1 @@
+Versions/Current/MarvelSketch
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Resources b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Resources
new file mode 120000
index 0000000..953ee36
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Resources
@@ -0,0 +1 @@
+Versions/Current/Resources
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/MarvelSketch b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/MarvelSketch
new file mode 100755
index 0000000..56178d1
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/MarvelSketch differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Assets.car b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Assets.car
new file mode 100644
index 0000000..c59f4c2
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Assets.car differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Frames.plist b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Frames.plist
new file mode 100644
index 0000000..d2df97f
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Frames.plist
@@ -0,0 +1,924 @@
+
+
+
+
+ IPHONE_6
+
+ name
+ iPhone 6
+ property
+ iphone6-frame
+ creatable
+
+ icon
+ device_iphone6_unactive
+ size
+
+ width
+ 375
+ height
+ 667
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -49
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 2
+
+ colour
+
+ black
+ iphone6Black
+ white
+ iphone6White
+ gold
+ iphone6Gold
+
+
+ IPHONE_6_LANDSCAPE
+
+ name
+ iPhone 6
+ property
+ iphone6-frame
+ creatable
+
+ colour
+
+ black
+ iphone6LandscapeBlack
+ white
+ iphone6LandscapeWhite
+ gold
+ iphone6LandscapeGold
+
+ size
+
+ width
+ 667
+ height
+ 375
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -1
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -57
+ listViewWidth
+ 191
+ exploreViewWidth
+ 191
+ screenScale
+ 2
+
+
+ IPHONE_6_PLUS
+
+ name
+ iPhone 6 Plus
+ property
+ iphone6plus-frame
+ creatable
+
+ icon
+ device_iphone6plus_unactive
+ size
+
+ width
+ 414
+ height
+ 736
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -47
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 3
+
+ colour
+
+ black
+ iphone6PlusGrey
+ white
+ iphone6PlusSilver
+ gold
+ iphone6PlusGold
+
+
+ IPHONE_6_PLUS_LANDSCAPE
+
+ name
+ iPhone 6 Plus
+ creatable
+
+ property
+ iphone6plus-frame
+ colour
+
+ black
+ iphone6PlusLandscapeGrey
+ white
+ iphone6PlusLandscapeSilver
+ gold
+ iphone6PlusLandscapeGold
+
+ size
+
+ width
+ 736
+ height
+ 414
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -1
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -56
+ listViewWidth
+ 190
+ exploreViewWidth
+ 190
+ screenScale
+ 3
+
+
+ IPAD
+
+ name
+ iPad
+ property
+ ipad-frame
+ creatable
+
+ icon
+ device_ipad_unactive
+ size
+
+ width
+ 768
+ height
+ 1024
+ aspectRatioWidth
+ 3
+ aspectRatioHeight
+ 4
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -38
+ listViewWidth
+ 169
+ exploreViewWidth
+ 169
+ screenScale
+ 2
+
+ colour
+
+ black
+ iPadAirBlack
+ white
+ iPadAirWhite
+
+
+ IPAD_LANDSCAPE
+
+ name
+ iPad
+ property
+ ipad-frame
+ creatable
+
+ size
+
+ width
+ 1024
+ height
+ 768
+ aspectRatioWidth
+ 4
+ aspectRatioHeight
+ 3
+ listViewCenterOffset
+ 0
+ listViewPaddingTopScreen
+ -34
+ listViewCenterOffsetExpression
+ 0
+ listViewWidth
+ 195
+ exploreViewWidth
+ 195
+ screenScale
+ 2
+
+ colour
+
+ black
+ iPadAirLandscapeBlack
+ white
+ iPadAirLandscapeWhite
+ width
+ 195
+ paddingTopScreen
+ 34
+ aspectRatioHeight
+ 3
+ aspectRatioWidth
+ 4
+ centerOffset
+ 0
+
+
+ WATCH42
+
+ name
+ Watch
+ property
+ apple-watch-42-frame
+ creatable
+
+ icon
+ device_iwatch_unactive
+ image
+ watch2
+ size
+
+ width
+ 156
+ height
+ 195
+ aspectRatioWidth
+ 4
+ aspectRatioHeight
+ 5
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ -45
+ listViewPaddingTopScreen
+ -39
+ listViewWidth
+ 65
+ exploreViewWidth
+ 65
+ screenScale
+ 2
+
+
+ WATCH38
+
+ name
+ Watch
+ property
+ apple-watch-38-frame
+ creatable
+
+ image
+ watch2
+ size
+
+ width
+ 136
+ height
+ 170
+ aspectRatioWidth
+ 4
+ aspectRatioHeight
+ 5
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ -45
+ listViewPaddingTopScreen
+ -39
+ listViewWidth
+ 65
+ exploreViewWidth
+ 65
+ screenScale
+ 2
+
+
+ IPHONE_4
+
+ name
+ iPhone 4
+ property
+ iphone4s-frame
+ creatable
+
+ icon
+ device_iphone4_unactive
+ size
+
+ width
+ 320
+ height
+ 480
+ aspectRatioWidth
+ 2
+ aspectRatioHeight
+ 3
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -62
+ listViewWidth
+ 124
+ exploreViewWidth
+ 124
+ screenScale
+ 2
+
+ colour
+
+ black
+ iPhone4SBlack
+ white
+ iPhone4SWhite
+
+
+ IPHONE_4_LANDSCAPE
+
+ name
+ iPhone 4
+ property
+ iphone4s-frame
+ creatable
+
+ size
+
+ width
+ 480
+ height
+ 320
+ aspectRatioWidth
+ 3
+ aspectRatioHeight
+ 2
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -64
+ listViewWidth
+ 156
+ exploreViewWidth
+ 156
+ screenScale
+ 2
+
+ colour
+
+ black
+ iPhone4SLandscapeBlack
+ white
+ iPhone4SLandscapeWhite
+
+
+ IPHONE_5S
+
+ name
+ iPhone 5
+ property
+ iphone5-frame
+ creatable
+
+ icon
+ device_iphone5_unactive
+ size
+
+ width
+ 320
+ height
+ 568
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -58
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 2
+
+ colour
+
+ gold
+ iphone5SYellow
+ black
+ iphone5SBlack
+ white
+ iphone5SWhite
+
+
+ IPHONE_5S_LANDSCAPE
+
+ name
+ iPhone 5S
+ property
+ iphone5-frame
+ creatable
+
+ colour
+
+ gold
+ iphone5SLandscapeYellow
+ black
+ iphone5SLandscapeBlack
+ white
+ iphone5SLandscapeWhite
+
+ size
+
+ width
+ 568
+ height
+ 320
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -66
+ listViewWidth
+ 173
+ exploreViewWidth
+ 173
+ screenScale
+ 2
+
+
+ IPHONE_5C
+
+ name
+ iPhone 5C
+ property
+ iphone5c-frame
+ creatable
+
+ colour
+
+ red
+ iphone5CRed
+ blue
+ iphone5CBlue
+ green
+ iphone5CGreen
+ yellow
+ iphone5CYellow
+ white
+ iphone5CWhite
+
+ size
+
+ width
+ 320
+ height
+ 568
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -58
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 2
+
+
+ IPHONE_5C_LANDSCAPE
+
+ name
+ iPhone 5C
+ property
+ iphone5c-frame
+ creatable
+
+ colour
+
+ black
+ iphone5CLandscapeBlack
+ white
+ iphone5CLandscapeWhite
+ red
+ iphone5CLandscapeRed
+ blue
+ iphone5CLandscapeBlue
+ green
+ iphone5CLandscapeGreen
+
+ size
+
+ width
+ 568
+ height
+ 320
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -2
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -68
+ listViewWidth
+ 174
+ exploreViewWidth
+ 174
+ screenScale
+ 2
+
+
+ NEXUS_5
+
+ name
+ Nexus 5
+ property
+ nexus5-frame
+ creatable
+
+ size
+
+ width
+ 1080
+ height
+ 1920
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -37
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 1
+
+ image
+ nexus5
+
+ NEXUS_5_LANDSCAPE
+
+ name
+ Nexus 5
+ property
+ nexus5-frame
+ creatable
+
+ size
+
+ width
+ 1920
+ height
+ 1080
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -2
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -48
+ listViewWidth
+ 197
+ exploreViewWidth
+ 197
+ screenScale
+ 1
+
+ image
+ nexus5Landscape
+
+ GALAXY_5
+
+ name
+ Galaxy 5
+ property
+ s5-frame
+ creatable
+
+ colour
+
+ black
+ galaxyS5Black
+ white
+ galaxyS5White
+
+ size
+
+ width
+ 1080
+ height
+ 1920
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -40
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 1
+
+
+ GALAXY_5_LANDSCAPE
+
+ name
+ Galaxy 5
+ property
+ s5-frame
+ creatable
+
+ colour
+
+ black
+ galaxyS5LandscapeBlack
+ white
+ galaxyS5LandscapeWhite
+
+ size
+
+ width
+ 1920
+ height
+ 1080
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -51
+ listViewWidth
+ 199
+ exploreViewWidth
+ 199
+ screenScale
+ 1
+
+
+ LUMNIA_920
+
+ name
+ Lumnia 920
+ property
+ lumia920-frame
+ creatable
+
+ colour
+
+ black
+ nokiaLumiaBlack
+ white
+ nokiaLumiaWhite
+ red
+ nokiaLumiaRed
+ yellow
+ nokiaLumiaYellow
+ blue
+ nokiaLumiaBlue
+
+ size
+
+ width
+ 768
+ height
+ 1280
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 15
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -38
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 1
+
+
+ LUMNIA_920_LANDSCAPE
+
+ name
+ Lumnia 920
+ property
+ lumia920-frame
+ creatable
+
+ colour
+
+ black
+ nokiaLumiaLandscapeBlack
+ white
+ nokiaLumiaLandscapeWhite
+ red
+ nokiaLumiaLandscapeRed
+ yellow
+ nokiaLumiaLandscapeYellow
+ blue
+ nokiaLumiaLandscapeBlue
+
+ size
+
+ width
+ 1280
+ height
+ 768
+ aspectRatioWidth
+ 15
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -9
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -54
+ listViewWidth
+ 177
+ exploreViewWidth
+ 177
+ screenScale
+ 1
+
+
+ HTC_1
+
+ name
+ HTC 1
+ property
+ htc-one-frame
+ creatable
+
+ image
+ htcDark
+ size
+
+ width
+ 1080
+ height
+ 1920
+ aspectRatioWidth
+ 9
+ aspectRatioHeight
+ 16
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -43
+ listViewWidth
+ 125
+ exploreViewWidth
+ 125
+ screenScale
+ 1
+
+
+ HTC_1_LANDSCAPE
+
+ name
+ HTC 1
+ property
+ htc-one-frame
+ creatable
+
+ image
+ htcLandscapeDark
+ size
+
+ width
+ 1920
+ height
+ 1080
+ aspectRatioWidth
+ 16
+ aspectRatioHeight
+ 9
+ listViewCenterOffset
+ -6
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -56
+ listViewWidth
+ 186
+ exploreViewWidth
+ 186
+ screenScale
+ 1
+
+
+ DEFAULT
+
+ name
+ Web
+ property
+ web-frame
+ creatable
+
+ size
+
+ width
+ 800
+ height
+ 800
+ aspectRatioWidth
+ 1
+ aspectRatioHeight
+ 1
+ listViewCenterOffset
+ 0
+ listViewCenterOffsetExpression
+ 0
+ listViewPaddingTopScreen
+ -35
+ listViewWidth
+ 235
+ exploreViewWidth
+ 150
+ screenScale
+ 1
+
+
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Info.plist b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Info.plist
new file mode 100644
index 0000000..8f24a6f
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,46 @@
+
+
+
+
+ BuildMachineOSBuild
+ 15E65
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ MarvelSketch
+ CFBundleIdentifier
+ com.marvelprototyping.MarvelSketch
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ MarvelSketch
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CFBundleVersion
+ 1
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 7D1014
+ DTPlatformVersion
+ GM
+ DTSDKBuild
+ 14D125
+ DTSDKName
+ macosx10.10
+ DTXcode
+ 0731
+ DTXcodeBuild
+ 7D1014
+ NSHumanReadableCopyright
+ Copyright © 2016 Marvel Prototyping. All rights reserved.
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/JNWCollectionView-Info.plist b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/JNWCollectionView-Info.plist
new file mode 100644
index 0000000..802c8ed
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/JNWCollectionView-Info.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+ NSHumanReadableCopyright
+ Copyright © 2013 Jonathan Willing. All rights reserved.
+ NSPrincipalClass
+
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFActionBarView.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFActionBarView.nib
new file mode 100644
index 0000000..aea7410
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFActionBarView.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFArtboardsWindowController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFArtboardsWindowController.nib
new file mode 100644
index 0000000..f610fa0
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFArtboardsWindowController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFAuthenticationWindowController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFAuthenticationWindowController.nib
new file mode 100644
index 0000000..bbac2ef
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFAuthenticationWindowController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFLoginViewController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFLoginViewController.nib
new file mode 100644
index 0000000..dd95954
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFLoginViewController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplacePickerViewController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplacePickerViewController.nib
new file mode 100644
index 0000000..72cf75d
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplacePickerViewController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplaceWindowController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplaceWindowController.nib
new file mode 100644
index 0000000..35ac077
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFReplaceWindowController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFSendArtboardsViewController.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFSendArtboardsViewController.nib
new file mode 100644
index 0000000..899f7f7
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFSendArtboardsViewController.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFUploadingBoxView.nib b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFUploadingBoxView.nib
new file mode 100644
index 0000000..3922802
Binary files /dev/null and b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/Resources/MSFUploadingBoxView.nib differ
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/_CodeSignature/CodeResources b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/_CodeSignature/CodeResources
new file mode 100644
index 0000000..0fb3bf4
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/A/_CodeSignature/CodeResources
@@ -0,0 +1,694 @@
+
+
+
+
+ files
+
+ Resources/Assets.car
+
+ 5fK/fUwkcilb67z7BTTP6gA9ZyE=
+
+ Resources/Frames.plist
+
+ 1oubtwzq0R3Jmc4/iEMTmKMiuwk=
+
+ Resources/Info.plist
+
+ c8faXP2N32jXArD1OcScOM8Rh4U=
+
+ Resources/JNWCollectionView-Info.plist
+
+ ejeZTzXSsRayk466zPuBNMgC+Lw=
+
+ Resources/MSFActionBarView.nib
+
+ LiXhQNmfPUv2dsvq58HQCyTTS1k=
+
+ Resources/MSFArtboardsWindowController.nib
+
+ hR+BwuJMDLggJwK0QNPeoGuFh5g=
+
+ Resources/MSFAuthenticationWindowController.nib
+
+ GBRKThJg1anCkWjyXdvmsxMgadg=
+
+ Resources/MSFLoginViewController.nib
+
+ 3JS6mZnMxaKR8lHckowvUWEZBWs=
+
+ Resources/MSFReplacePickerViewController.nib
+
+ yLW3loZYDBrphVMslTQPTgVBtbM=
+
+ Resources/MSFReplaceWindowController.nib
+
+ QpTI3NHxkEAH/kSn/BINSFtq0h0=
+
+ Resources/MSFSendArtboardsViewController.nib
+
+ MdCi5HxRu7GTx/4KoEw235CKdeM=
+
+ Resources/MSFUploadingBoxView.nib
+
+ AtZcQRa0iz5yqAEdYLr0IiRTses=
+
+
+ files2
+
+ Headers/MarvelFramework.h
+
+ hash
+
+ QpAy8i4fJzkOkzBKp9JXd8BQAtE=
+
+ hash2
+
+ sxGdEvBR9GrOK1jd1uQCFzt1Kn/CWGnIpBWvhzcwlgw=
+
+
+ Headers/MarvelSketch.h
+
+ hash
+
+ DSEqZImeWpSEff/iThi6fQvmD1g=
+
+ hash2
+
+ 3uPkI5GH+O9w2iEc2zJ+YsmqnmWwhTbx6hT1M1QFqx0=
+
+
+ Modules/module.modulemap
+
+ hash
+
+ MuXPgR2A/8iwYKnBQjujbrIl66Q=
+
+ hash2
+
+ DRzhCnHAf/xPYAU0aIwG9cApTxTQcnNMl+ZwvwxILEk=
+
+
+ PrivateHeaders/DPImageDownloaderCache.h
+
+ hash
+
+ VkLaZVWmbSqnoXz0CEyxXleoPK0=
+
+ hash2
+
+ gPJ1rKx75WAk8J7Yg7NyQGxD+va/wUtdA2wOC6jrhkE=
+
+
+ PrivateHeaders/MSFActionBarView.h
+
+ hash
+
+ O2yBX0VvGkNCNlMVCeyATIPu/4g=
+
+ hash2
+
+ hPq+Sf8vqGUvqlg78DDpEXqTJBh6wJteLiV//5+wWc0=
+
+
+ PrivateHeaders/MSFArtboardsManager.h
+
+ hash
+
+ 7SD3WrAfIhxyKuvYtZh1W8hIIyM=
+
+ hash2
+
+ NuoVMqXZoz0xqN9BhNEM8KaK+Pk0nA99qnIHAQCkTTs=
+
+
+ PrivateHeaders/MSFArtboardsWindowController.h
+
+ hash
+
+ HhoiR2w9uSY3VXlcoslxPdbMgA8=
+
+ hash2
+
+ y5IYxM85WMMu+hdvE+JBXmah3c4v02eN8BXuUdebesU=
+
+
+ PrivateHeaders/MSFAuthenticationWindowController.h
+
+ hash
+
+ do5OXtdr4cRDsyP64Ev8/BGA1A8=
+
+ hash2
+
+ dfuwvXi/p52ARBSnkFSopMLKNgI5KvnnkzAAkmUyKPU=
+
+
+ PrivateHeaders/MSFCalls.h
+
+ hash
+
+ pCBpZ0u/cFuqZ9sLEHJwqq1L3LM=
+
+ hash2
+
+ RaJdGrLkgwQL2akW7mc9ZeTBe1JdnuMDsr/DmCaEJDM=
+
+
+ PrivateHeaders/MSFClipView.h
+
+ hash
+
+ U1wP27S5BkwEdDCbxCwlLjFKE88=
+
+ hash2
+
+ QyJyxn29GgqbGTPQDqcypPnugJiYkq1Li/U3B0RxI4Q=
+
+
+ PrivateHeaders/MSFCollectionView+Private.h
+
+ hash
+
+ AFhtbgkd1gdkK0h0ADG+RLeRKYA=
+
+ hash2
+
+ 6VIgIlwhXa0QaNm21V2JffpM9I82U1LJWV6QBSx2Znw=
+
+
+ PrivateHeaders/MSFCollectionView.h
+
+ hash
+
+ Z95NGLmhbXQRG8PgfgZt04/93hs=
+
+ hash2
+
+ 1Dqb7mHrnBnRzkc6QgFh1k1QKdRj8rFIhO2eICryFbc=
+
+
+ PrivateHeaders/MSFCollectionViewCell.h
+
+ hash
+
+ cVSOPlPexKdRmuB6CzO2LRFwt9E=
+
+ hash2
+
+ qJJSYBEBV6quxvEq/eAcVkfqf23BTGwpmIUCTxelbOk=
+
+
+ PrivateHeaders/MSFCollectionViewData.h
+
+ hash
+
+ dKrar0h83fNZC8kgVtH9bQVkn3Y=
+
+ hash2
+
+ UbzNreYaUMKw8yMToWuXK+pZ8VlE8BT4mVs+JSA40u0=
+
+
+ PrivateHeaders/MSFCollectionViewDocumentView.h
+
+ hash
+
+ ntADLoQ1pZd9/npCnrbZ3kNJz04=
+
+ hash2
+
+ A5jej1J7gnLM5PqnccM2ItfmD8/9tWPcUZyH+3Ka5E8=
+
+
+ PrivateHeaders/MSFCollectionViewFramework.h
+
+ hash
+
+ bwebCMQ2U409zt7GdzisoBW9xho=
+
+ hash2
+
+ VwDnZytMIImIO5+WxatZrOKJC1Q1YWWfdNo86Myd9GE=
+
+
+ PrivateHeaders/MSFCollectionViewGridLayout.h
+
+ hash
+
+ bscaGt4DXNhGyEDG6b32T1L6QEc=
+
+ hash2
+
+ 2U5oQrusYA5w9vSnN/A6FsZJJSP63/E1HpzpnaqH4hI=
+
+
+ PrivateHeaders/MSFCollectionViewLayout.h
+
+ hash
+
+ +u9EkT1D6PKIwVH8LXqdyvGzByk=
+
+ hash2
+
+ LCSFM/CEdu/sNFoK+yGpSWnkXODhT3f25oti8aDu2c8=
+
+
+ PrivateHeaders/MSFCollectionViewListLayout.h
+
+ hash
+
+ itZju8v0czoT5s1foP3X1o3vQdg=
+
+ hash2
+
+ xmWDVfETDeNod67ZuqKqaq2+wLykPhT0gXSmyUHZtNI=
+
+
+ PrivateHeaders/MSFCollectionViewReusableView.h
+
+ hash
+
+ 1j7x5eEP3fR7qdtdCQBZHEHj8lg=
+
+ hash2
+
+ y5jkoyqelkH+BXt/+LfcH8oxPnLDvesvvqcPHqn20g0=
+
+
+ PrivateHeaders/MSFColor.h
+
+ hash
+
+ gtf8jNUdbn9ZMPufWvIW4kG72No=
+
+ hash2
+
+ /rnM5TGpKyOOkK/v3t7Z9/KxrCv4HaQnIps5t2qa6Qk=
+
+
+ PrivateHeaders/MSFDPImageDownloader.h
+
+ hash
+
+ 47HEUeKK4Zna5fkP6kT8L5razYI=
+
+ hash2
+
+ 1jJKaJtlDSoreF3M8zU3ZfWknIssX3PgMR8ZNOGVUWc=
+
+
+ PrivateHeaders/MSFFrameProperties.h
+
+ hash
+
+ dOYvNauDewND0e1leW5YMeNeDQo=
+
+ hash2
+
+ 2x0syUb1JZkUttSsdkn8a2tAyeUGw0iGBfUhDCZo1JY=
+
+
+ PrivateHeaders/MSFLastUsedProject.h
+
+ hash
+
+ e70WbPd9SVD87QpFAmGccy1Qvuo=
+
+ hash2
+
+ w7uzbJKxEp/pBmapD2B25yL5Ebr1fU9+NalLCZLQATY=
+
+
+ PrivateHeaders/MSFLastUsedScale.h
+
+ hash
+
+ pFMZuN7+GP0O+KGvRlf1WuKue60=
+
+ hash2
+
+ RTRFnISY4odOi7gG49P52LJwpB8iV1efJ49sc7oZ0x0=
+
+
+ PrivateHeaders/MSFLoginViewController.h
+
+ hash
+
+ tONgK6ETQeSC/jVoS6pJq8A+QV4=
+
+ hash2
+
+ Y52DvZjsRAO7TC4jLYYF1TN5LeNJFS/0fFglh7PbQ/U=
+
+
+ PrivateHeaders/MSFMenuManager.h
+
+ hash
+
+ nbgZEnIMabLrdrcN2SrXkLC7MNI=
+
+ hash2
+
+ 0Ig6Lnh+Wr3NIzQSbCXx6fjsUdbAdFObJwrD62uHPIQ=
+
+
+ PrivateHeaders/MSFNSProgressIndicator+ESSProgressIndicatorCategory.h
+
+ hash
+
+ K0O1asoWwfWAvw2bEyGIMmYFLrY=
+
+ hash2
+
+ 0dxGAvAbFZxvi0JoV62P6E+PqNKm+wGEm7JqQODqgx0=
+
+
+ PrivateHeaders/MSFPickerCellView.h
+
+ hash
+
+ VFezhelDvqeottCAP9BWPqSTsHE=
+
+ hash2
+
+ ji14P2sfe+tLwVyeBcIJfr4VKCw6ElNlIP3hYHeeWXI=
+
+
+ PrivateHeaders/MSFReplacePickerViewController.h
+
+ hash
+
+ ZNrO4zxId/Hjvs7wtO2ymsQxghs=
+
+ hash2
+
+ YdBkhNKK7WseR3OUkC4nCfyPWB7mGgLqa9x0zZytJY8=
+
+
+ PrivateHeaders/MSFReplaceWindowController.h
+
+ hash
+
+ B17x0/dQHZqQjKJUjF+/h5xuL08=
+
+ hash2
+
+ ao3un19rbgb9pb584lgem66QtBHZUn95Ygu4rk60QBc=
+
+
+ PrivateHeaders/MSFScrollView.h
+
+ hash
+
+ C+rLaYje/I7fl7RrM1yPcS9tjSo=
+
+ hash2
+
+ tL79RIQvUGXYrSgNHmiESkZXZ5tVTSF1aee+/59oXKo=
+
+
+ PrivateHeaders/MSFSendArtboardsViewController.h
+
+ hash
+
+ 6wLoIpwZXR+Odk2+RfQFJL2vZNs=
+
+ hash2
+
+ FXE7MeZlFXxNUinKMRyybj0TuJCWkFlO6ppsmHn+EVs=
+
+
+ PrivateHeaders/MSFToken.h
+
+ hash
+
+ 9F8W5MpY/U5ixnwdYTRi00K7ms8=
+
+ hash2
+
+ L2CdDVBTnVVipYbmoKlWeS+X301y0oYU0PYLHFvUnWo=
+
+
+ PrivateHeaders/MSFUploadManager.h
+
+ hash
+
+ HgNx3DRZFpZAsHYzLcw+1M3qe9k=
+
+ hash2
+
+ 4710QSLFwyuzv4XgZvcHI2r2F8OhWvvRaSzPak0+vjY=
+
+
+ PrivateHeaders/MSFUploadingBoxView.h
+
+ hash
+
+ UtEjG1vJo0dvrAza1IXWT0gWHyM=
+
+ hash2
+
+ VEYUdnovI2z+BJDCzlTRVYaTyt/E9wRJfg6cWZL9wK0=
+
+
+ PrivateHeaders/NSIndexPath+MSFAdditions.h
+
+ hash
+
+ UjQQ9adUlMaAI0tfMkfyYZqITPg=
+
+ hash2
+
+ 3YPeG9rWw4HWph+D1aRnxG1LKCTkhr200CN6Snm6GXY=
+
+
+ Resources/Assets.car
+
+ hash
+
+ 5fK/fUwkcilb67z7BTTP6gA9ZyE=
+
+ hash2
+
+ IhkFFwSnugpNwh227u2XilPVh5RCUwQUPp29OdkhLGo=
+
+
+ Resources/Frames.plist
+
+ hash
+
+ 1oubtwzq0R3Jmc4/iEMTmKMiuwk=
+
+ hash2
+
+ 43pDKda/GBu7ojuesLgBhR5TLADc6ieILTxdC7kYgMI=
+
+
+ Resources/Info.plist
+
+ hash
+
+ c8faXP2N32jXArD1OcScOM8Rh4U=
+
+ hash2
+
+ 9NGsx5kWqVf2hwQHn4cq0hIzqRFl1p59IK/8Fa2H6rg=
+
+
+ Resources/JNWCollectionView-Info.plist
+
+ hash
+
+ ejeZTzXSsRayk466zPuBNMgC+Lw=
+
+ hash2
+
+ 9CQRP2HxSE5VRus8bNNs8iRUeu4B/LAgHXtGW5g0wPc=
+
+
+ Resources/MSFActionBarView.nib
+
+ hash
+
+ LiXhQNmfPUv2dsvq58HQCyTTS1k=
+
+ hash2
+
+ jY/zWDvJDITzm+a0psV6C+UUjYfZnIDTwrAW07aN0qI=
+
+
+ Resources/MSFArtboardsWindowController.nib
+
+ hash
+
+ hR+BwuJMDLggJwK0QNPeoGuFh5g=
+
+ hash2
+
+ NjQkgNoL4BgCIWJbXMKbggIsmRwAV3nmqyux1dGU62c=
+
+
+ Resources/MSFAuthenticationWindowController.nib
+
+ hash
+
+ GBRKThJg1anCkWjyXdvmsxMgadg=
+
+ hash2
+
+ /mwLjQLSAPgCnmpoL4iF7C4pZlPAkeeYW+2DsFzLEhI=
+
+
+ Resources/MSFLoginViewController.nib
+
+ hash
+
+ 3JS6mZnMxaKR8lHckowvUWEZBWs=
+
+ hash2
+
+ 6tZ+yk36LwDavxhTmvKCqHWCrqBXysNDBQ+fihaAQmA=
+
+
+ Resources/MSFReplacePickerViewController.nib
+
+ hash
+
+ yLW3loZYDBrphVMslTQPTgVBtbM=
+
+ hash2
+
+ EnJuaVJKtTQjOjYCI3M8e34Mg88kqi2AyX93gV2akcU=
+
+
+ Resources/MSFReplaceWindowController.nib
+
+ hash
+
+ QpTI3NHxkEAH/kSn/BINSFtq0h0=
+
+ hash2
+
+ 5uvR5/izPXszOjqn1qBFRcca1DwDu0XhoWOK0PiJ5Fs=
+
+
+ Resources/MSFSendArtboardsViewController.nib
+
+ hash
+
+ MdCi5HxRu7GTx/4KoEw235CKdeM=
+
+ hash2
+
+ Q80LxtABOFVMZ0XGz+pQvcgWWi/sACFnV0c3ZXDgJZA=
+
+
+ Resources/MSFUploadingBoxView.nib
+
+ hash
+
+ AtZcQRa0iz5yqAEdYLr0IiRTses=
+
+ hash2
+
+ H9s8W9v+1UqqahLo2pu1A46WpEKMGkKfGO8ijl2z+Q4=
+
+
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/Current b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/Current
new file mode 120000
index 0000000..8c7e5a6
--- /dev/null
+++ b/Marvel.sketchplugin/Contents/Sketch/MarvelSketch.framework/Versions/Current
@@ -0,0 +1 @@
+A
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/api.js b/Marvel.sketchplugin/Contents/Sketch/api.js
deleted file mode 100755
index 033c15a..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/api.js
+++ /dev/null
@@ -1,1035 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-@import 'helpers/error-logging.js'
-@import 'helpers/settings.js'
-@import 'helpers/mini.js'
-@import 'helpers/manifest.js'
-
-var rootURL = "https://marvelapp.com/api/"
-var app = [NSApplication sharedApplication];
-
-// Plugin Calls
-
-function getActiveTokenFromComputer(context) {
- sketchLog(context,"getActiveTokenFromComputer()")
- var token = [[NSUserDefaults standardUserDefaults] objectForKey:"token"];
- if (token) {
- sketchLog(context,"Token return : " + token)
- return token;
- } else {
- return false;
- }
-}
-
-function deleteActiveTokenFromComputer(context) {
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"token"];
-}
-
-
-function fireLoginWindowWithContext(context){
-
- // create window
- var loginWindow = [[NSWindow alloc] init]
- [loginWindow setFrame:NSMakeRect(0, 0, 540, 332) display:false]
- [loginWindow setBackgroundColor:NSColor.whiteColor()]
-
- var plugin = context.plugin
-
- if(mini.isRetinaDisplay()){
- var imageFilePath=[plugin urlForResourceNamed:"logo@2x.png"];
- } else {
- var imageFilePath=[plugin urlForResourceNamed:"logo.png"];
- }
- var imageData = [NSData dataWithContentsOfURL:imageFilePath];
- var image = NSImage.alloc().initWithData(imageData);
-
- var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(46, 124, 164, 149)];
- [imageView setImage: image];
- [[loginWindow contentView] addSubview:imageView];
-
- // create prompt text
- var titleField = [[NSTextField alloc] initWithFrame:NSMakeRect(248, 249, 243, 17)]
- [titleField setEditable:false]
- [titleField setBordered:false]
- [titleField setDrawsBackground:false]
- [titleField setFont:[NSFont boldSystemFontOfSize:13]];
- [titleField setStringValue:"Prototype with Sketch"]
- [[loginWindow contentView] addSubview:titleField]
-
- // create prompt text
- var subtitleField = [[NSTextField alloc] initWithFrame:NSMakeRect(248, 224, 243, 15)]
- [subtitleField setEditable:false]
- [subtitleField setBordered:false]
- [subtitleField setFont:[NSFont systemFontOfSize:13]];
- [subtitleField setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]];
- [subtitleField setDrawsBackground:false]
- [subtitleField setStringValue:"Sign in and send artboards to Marvel!"]
- [subtitleField sizeToFit]
- [[loginWindow contentView] addSubview:subtitleField]
-
- var emailInputField = [[NSTextField alloc] initWithFrame:NSMakeRect(250, 181, 243, 23)]
- [[emailInputField cell] setPlaceholderString:"Email"]
- [[loginWindow contentView] addSubview:emailInputField]
-
- var passwordField = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(250, 150, 243, 23)]
- [[passwordField cell] setPlaceholderString:"Password"]
- [[loginWindow contentView] addSubview:passwordField]
-
- var yPosButtons = 102;
-
- var loginButton = [[NSButton alloc] initWithFrame:NSMakeRect(407, yPosButtons, 92, 46)]
- var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(321, yPosButtons, 92, 46)]
- var createMarvelButton = [[NSButton alloc] initWithFrame:NSMakeRect(44, 23, 162, 32)]
- var createHelpButton = [[NSButton alloc] initWithFrame:NSMakeRect(470, 23, 32, 32)]
-
- [loginButton setTitle:"Login"]
- [loginButton setBezelStyle:NSRoundedBezelStyle]
- [loginButton setKeyEquivalent:"\r"]
- [loginButton setCOSJSTargetFunction:function(sender) {
- [loginWindow orderOut:nil]
- [app stopModal]
- var email = emailInputField.stringValue()
- var password = passwordField.stringValue()
- loginWithUsernameAndPassword(email, password, context)
- [cancelButton setCOSJSTargetFunction:undefined]
- [loginButton setCOSJSTargetFunction:undefined]
- [createMarvelButton setCOSJSTargetFunction:undefined]
- [createHelpButton setCOSJSTargetFunction:undefined]
- }];
- [loginButton setAction:"callAction:"]
- [[loginWindow contentView] addSubview:loginButton]
-
-
-
- [cancelButton setTitle:"Cancel"]
- [cancelButton setBezelStyle:NSRoundedBezelStyle]
- [cancelButton setCOSJSTargetFunction:function(sender) {
- [loginWindow orderOut:nil]
- [app stopModal]
- [cancelButton setCOSJSTargetFunction:undefined]
- [loginButton setCOSJSTargetFunction:undefined]
- [createMarvelButton setCOSJSTargetFunction:undefined]
- [createHelpButton setCOSJSTargetFunction:undefined]
- }];
- [cancelButton setAction:"callAction:"]
- [[loginWindow contentView] addSubview:cancelButton]
-
-
- //Bottom Bar
-
- var bottomActionsView = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 540, 79)];
- bottomActionsView.setWantsLayer(true);
- [[loginWindow contentView] addSubview:bottomActionsView];
-
- var backgroundLayer = [CALayer layer];
- [backgroundLayer setBackgroundColor:CGColorCreateGenericRGB(246/255, 246/255, 246/255, 1.0)]; //RGB plus Alpha Channel
- [bottomActionsView setLayer:backgroundLayer]
-
- var borderLayer = [CALayer layer];
- borderLayer.frame = CGRectMake(0, 78, 540, 1);
- [borderLayer setBackgroundColor:CGColorCreateGenericRGB(220/255, 220/255, 220/255, 1.0)]; //RGB plus Alpha Channel
- [backgroundLayer addSublayer:borderLayer];
-
- //Create Marvel Button
-
- [createMarvelButton setTitle:"Create Marvel account"]
- [createMarvelButton setBezelStyle:NSRoundedBezelStyle]
- [createMarvelButton setCOSJSTargetFunction:function(sender) {
- var url = [NSURL URLWithString:@"https://marvelapp.com/manage/account/"];
- if( ![[NSWorkspace sharedWorkspace] openURL:url] ){
- sketchLog(context,"Failed to open url:" + [url description])
- }
- }];
- [createMarvelButton setAction:"callAction:"]
- [bottomActionsView addSubview:createMarvelButton]
-
- [createHelpButton setBezelStyle:NSHelpButtonBezelStyle]
- [createHelpButton setTitle:nil]
- [createHelpButton setCOSJSTargetFunction:function(sender) {
- var url = [NSURL URLWithString:@"http://marvel.helpscoutdocs.com/article/62-getting-started-with-the-marvel-sketch-plugin"];
- if( ![[NSWorkspace sharedWorkspace] openURL:url] ){
- sketchLog(context,"Failed to open url:" + [url description])
- }
- }];
- [createHelpButton setAction:"callAction:"]
- [bottomActionsView addSubview:createHelpButton]
-
-
- [loginWindow setDefaultButtonCell:[loginButton cell]];
-
- [app runModalForWindow:loginWindow]
-}
-
-function fireAlreadyLoggedInWindow(context){
-
- // create window
- var alreadyLoggedInWindow = [[NSWindow alloc] init]
- [alreadyLoggedInWindow setFrame:NSMakeRect(0, 0, 540, 332) display:false]
- [alreadyLoggedInWindow setBackgroundColor:NSColor.whiteColor()]
-
- // create prompt text
- var titleField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 179, 540, 17)]
- [titleField setEditable:false]
- [titleField setBordered:false]
- [titleField setAlignment:2]
- [titleField setDrawsBackground:false]
- [titleField setFont:[NSFont boldSystemFontOfSize:13]];
- [titleField setStringValue:"You are already logged in!"]
- [[alreadyLoggedInWindow contentView] addSubview:titleField]
-
- // create prompt text
- var subtitleField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 140, 540, 30)]
- [subtitleField setEditable:false]
- [subtitleField setBordered:false]
- [subtitleField setAlignment:2]
- [subtitleField setFont:[NSFont systemFontOfSize:13]];
- [subtitleField setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]];
- [subtitleField setDrawsBackground:false]
- [subtitleField setStringValue:"Logout first if you would like to use a different account."]
- [[alreadyLoggedInWindow contentView] addSubview:subtitleField]
-
- var yPosButtons = 100;
-
- // Buttons
-
- var logoutButton = [[NSButton alloc] initWithFrame:NSMakeRect(267, yPosButtons, 92, 46)]
- var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(181, yPosButtons, 92, 46)]
-
- [logoutButton setTitle:"Log out"]
- [logoutButton setBezelStyle:NSRoundedBezelStyle]
- [logoutButton setCOSJSTargetFunction:function(sender) {
- deleteActiveTokenFromComputer(context)
- [alreadyLoggedInWindow orderOut:nil]
- [app stopModal]
- [logoutButton setCOSJSTargetFunction:undefined]
- [cancelButton setCOSJSTargetFunction:undefined]
- fireLoginWindowWithContext(context)
- }];
- [logoutButton setAction:"callAction:"]
- [[alreadyLoggedInWindow contentView] addSubview:logoutButton]
-
-
-
- [cancelButton setTitle:"Cancel"]
- [cancelButton setBezelStyle:NSRoundedBezelStyle]
- [cancelButton setCOSJSTargetFunction:function(sender) {
- [alreadyLoggedInWindow orderOut:nil]
- [app stopModal]
- [logoutButton setCOSJSTargetFunction:undefined]
- [cancelButton setCOSJSTargetFunction:undefined]
- }];
- [cancelButton setAction:"callAction:"]
- [[alreadyLoggedInWindow contentView] addSubview:cancelButton]
-
- [alreadyLoggedInWindow setDefaultButtonCell:[logoutButton cell]];
-
- [app runModalForWindow:alreadyLoggedInWindow]
-}
-
-function fireSendArtboards(projectsArray, all, context){
-
- sketchLog(context,"fireSendArtboards()");
-
- var windowSendArtboards = [[NSWindow alloc] init]
- [windowSendArtboards setFrame:NSMakeRect(0, 0, 485, 333) display:false]
- [windowSendArtboards setBackgroundColor:NSColor.whiteColor()]
-
- var titleField = [[NSTextField alloc] initWithFrame:NSMakeRect(74, 225, 540, 17)]
- [titleField setEditable:false]
- [titleField setBordered:false]
- [titleField setDrawsBackground:false]
- [titleField setFont:[NSFont boldSystemFontOfSize:13]];
- [titleField setStringValue:"Export settings"]
- [[windowSendArtboards contentView] addSubview:titleField]
-
- var yDropdowns = 170;
-
- var projectPopup = [[NSComboBox alloc] initWithFrame:NSMakeRect(74, yDropdowns, 266, 26)]
- [projectPopup removeAllItems]
- [projectPopup setFocusRingType:NSFocusRingTypeNone]
- var lastUsedProjectId = settings.getLastUsedProject(context)
- var lastUsedProjectIdIndex
- var projectNames = []
-
- var noProjects = false
- if(projectsArray.length == 0){
- noProjects = true
- }
-
- sketchLog(context, "Find pre used projects");
- for (i = 0; i < projectsArray.length; ++i) {
- projectNames.push(projectsArray[i].name);
-
- if(lastUsedProjectId == projectsArray[i].id){
- lastUsedProjectIdIndex = i;
- sketchLog(context, "Last used project index " + lastUsedProjectIdIndex + "and ID is " + projectsArray[i].id)
- }
- }
- [projectPopup addItemsWithObjectValues:projectNames]
-
- sketchLog(context, "Set last used project")
-
- if(lastUsedProjectIdIndex){
- [projectPopup selectItemAtIndex:lastUsedProjectIdIndex]
- } else {
- if (noProjects == false){
- sketchLog(context, "There are projects")
- [projectPopup selectItemAtIndex:0]
- }
- }
- [[windowSendArtboards contentView] addSubview:projectPopup]
- var subtitleField = [[NSTextField alloc] initWithFrame:NSMakeRect(74, yDropdowns - 28, 266, 26)]
- [subtitleField setEditable:false]
- [subtitleField setBordered:false]
- [subtitleField setAlignment:2]
- [subtitleField setFont:[NSFont systemFontOfSize:11]];
- [subtitleField setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]];
- [subtitleField setDrawsBackground:false]
- [subtitleField setStringValue:"Project (or enter a new one)"]
- [[windowSendArtboards contentView] addSubview:subtitleField]
-
- var pluralNounPopup = [[NSComboBox alloc] initWithFrame:NSMakeRect(345, yDropdowns, 78, 26)]
- var pluralNouns = ["1x", "1.5x", "2x", "0.5x", "3x"]
- [pluralNounPopup removeAllItems]
- [pluralNounPopup setFocusRingType:NSFocusRingTypeNone]
- [pluralNounPopup addItemsWithObjectValues:pluralNouns]
- [[windowSendArtboards contentView] addSubview:pluralNounPopup]
-
- var scale = settings.getScaleSettingFromComputer(context);
-
- if(scale){
- var foundIndex = 0;
- for (i = 0; i < pluralNouns.length; ++i) {
- if(scale == pluralNouns[i]){
- [pluralNounPopup selectItemAtIndex:i]
- foundIndex = 1
- }
- }
-
- if(foundIndex != 1){
- [pluralNounPopup insertItemWithObjectValue:scale atIndex:0];
- [pluralNounPopup selectItemAtIndex:0]
- }
- } else {
- [pluralNounPopup selectItemAtIndex:0]
- }
-
- var subtitleField2 = [[NSTextField alloc] initWithFrame:NSMakeRect(345, yDropdowns - 28, 78, 26)]
- [subtitleField2 setEditable:false]
- [subtitleField2 setBordered:false]
- [subtitleField2 setAlignment:2]
- [subtitleField2 setFont:[NSFont systemFontOfSize:11]];
- [subtitleField2 setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]];
- [subtitleField2 setDrawsBackground:false]
- [subtitleField2 setStringValue:"Size"]
- [[windowSendArtboards contentView] addSubview:subtitleField2]
-
- var bottomActionsView = [[NSView alloc] initWithFrame:NSMakeRect(74, 112, 348, 1)]
- bottomActionsView.setWantsLayer(true)
- [[windowSendArtboards contentView] addSubview:bottomActionsView]
-
- var borderLayer = [CALayer layer]
- borderLayer.frame = CGRectMake(0, 1, 348, 1)
- [borderLayer setBackgroundColor:CGColorCreateGenericRGB(220/255, 220/255, 220/255, 1.0)]
- [bottomActionsView setLayer:borderLayer];
-
- var yPosButtons = 45;
-
- // Buttons
-
- var sendButton = [[NSButton alloc] initWithFrame:NSMakeRect(295, yPosButtons, 134, 46)]
- var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(225, yPosButtons, 76, 46)]
-
- [sendButton setTitle:"Send or update"]
- [sendButton setBezelStyle:NSRoundedBezelStyle]
- [sendButton setCOSJSTargetFunction:function(sender) {
-
- sketchLog(context,"Send Artboards");
-
- var scaleString = [pluralNounPopup objectValueOfSelectedItem];
- if (!scaleString){
- scaleString = [pluralNounPopup stringValue];
- }
-
- var export_scale_factor = scaleString.replace(/[^0-9.wWhH]/g,"");
-
- if(export_scale_factor.indexOf("w") !=-1 || export_scale_factor.indexOf("h") !=-1 || export_scale_factor.indexOf("W") !=-1 || export_scale_factor.indexOf("H") !=-1) {
- [app displayDialog:"Try again without" withTitle:"We don't support w or h characters for scaling at this moment"]
- return false
- }
-
- var selectedProject = [projectPopup objectValueOfSelectedItem];
- if (!selectedProject){
- selectedProject = [projectPopup stringValue];
- }
-
- var projectId;
-
- for (i = 0; i < projectsArray.length; ++i) {
-
- if (selectedProject == projectsArray[i].name){
-
- projectId = projectsArray[i].id;
-
- }
-
- }
-
- if (projectId == nil) {
- projectId = createProject(selectedProject,context)
- }
-
- if (projectId){
- if(all == 1){
- exportAllArtboardsAndSendTo(context,projectId, export_scale_factor, context.document)
- } else {
- exportArtboardsAndSendTo(context,projectId, export_scale_factor, context.selection, context.document)
- }
- settings.saveScaleSetting(scaleString,context)
- settings.saveLastUsedProject(projectId,context)
-
- [windowSendArtboards orderOut:nil]
- [app stopModal]
- [cancelButton setCOSJSTargetFunction:undefined]
- [sendButton setCOSJSTargetFunction:undefined]
-
- };
-
-
- }];
- [sendButton setAction:"callAction:"]
- [[windowSendArtboards contentView] addSubview:sendButton]
-
- [cancelButton setTitle:"Cancel"]
- [cancelButton setBezelStyle:NSRoundedBezelStyle]
- [cancelButton setCOSJSTargetFunction:function(sender) {
- [windowSendArtboards orderOut:nil]
- [app stopModal]
- [cancelButton setCOSJSTargetFunction:undefined]
- [sendButton setCOSJSTargetFunction:undefined]
- }];
- [cancelButton setAction:"callAction:"]
- [[windowSendArtboards contentView] addSubview:cancelButton]
-
- [windowSendArtboards setDefaultButtonCell:[sendButton cell]];
-
- [app runModalForWindow:windowSendArtboards]}
-
-function fireSupport(context){
-
- sketchLog(context,"fireSupport()");
-
- var systemVersionDictionary = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"]
- var systemVersion = [systemVersionDictionary objectForKey:@"ProductVersion"]
- var pluginVersion = manifest.getPluginVersion(context)
- var sketchVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
-
- var windowSendArtboards = [[NSWindow alloc] init]
- [windowSendArtboards setFrame:NSMakeRect(0, 0, 485, 333) display:false]
- [windowSendArtboards setBackgroundColor:NSColor.whiteColor()]
-
- var titleField = [[NSTextField alloc] initWithFrame:NSMakeRect(74, 235, 540, 17)]
- [titleField setEditable:false]
- [titleField setBordered:false]
- [titleField setDrawsBackground:false]
- [titleField setFont:[NSFont boldSystemFontOfSize:13]];
- [titleField setStringValue:"Report a bug"]
- [[windowSendArtboards contentView] addSubview:titleField]
-
- var step1Label = [[NSTextField alloc] initWithFrame:NSMakeRect(74, 200, 540, 17)]
- [step1Label setEditable:false]
- [step1Label setBordered:false]
- [step1Label setDrawsBackground:false]
- [step1Label setFont:[NSFont systemFontOfSize:12]]
- [step1Label setStringValue:"1. First tick this checkbox to turn debug mode on:"]
- [step1Label setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]]
- [[windowSendArtboards contentView] addSubview:step1Label]
-
- var step2Label = [[NSTextField alloc] initWithFrame:NSMakeRect(74, 172, 540, 17)]
- [step2Label setEditable:false]
- [step2Label setBordered:false]
- [step2Label setDrawsBackground:false]
- [step2Label setFont:[NSFont systemFontOfSize:12]]
- [step2Label setStringValue:"2. Close this window and replicate the bug."]
- [step2Label setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]]
- [[windowSendArtboards contentView] addSubview:step2Label]
-
- var step3Label = [[NSTextField alloc] initWithFrame:NSMakeRect(74, 144, 540, 17)]
- [step3Label setEditable:false]
- [step3Label setBordered:false]
- [step3Label setDrawsBackground:false]
- [step3Label setFont:[NSFont systemFontOfSize:12]]
- [step3Label setStringValue:"3. Come back to this window and hit send."]
- [step3Label setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]]
- [[windowSendArtboards contentView] addSubview:step3Label]
-
- var bottomActionsView = [[NSView alloc] initWithFrame:NSMakeRect(74, 112, 348, 1)]
- bottomActionsView.setWantsLayer(true)
- [[windowSendArtboards contentView] addSubview:bottomActionsView]
-
- var borderLayer = [CALayer layer]
- borderLayer.frame = CGRectMake(0, 1, 348, 1)
- [borderLayer setBackgroundColor:CGColorCreateGenericRGB(220/255, 220/255, 220/255, 1.0)]
- [bottomActionsView setLayer:borderLayer];
-
- var yPosBottomElements = 45;
-
- var versionLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(74, yPosBottomElements + 5, 266, 26)]
- [versionLabel setEditable:false]
- [versionLabel setBordered:false]
- [versionLabel setAlignment:0]
- [versionLabel setFont:[NSFont systemFontOfSize:11]]
- [versionLabel setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]]
- [versionLabel setDrawsBackground:false]
- [versionLabel setStringValue:"OSX " + systemVersion + " Sketch " + sketchVersion + " Plugin " + pluginVersion]
- [[windowSendArtboards contentView] addSubview:versionLabel]
-
-
- // Buttons
-
- var sendButton = [[NSButton alloc] initWithFrame:NSMakeRect(353, yPosBottomElements, 76, 46)]
- var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(283, yPosBottomElements, 76, 46)]
- var debugCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect (360,195,50,25)]
-
- [debugCheckbox setButtonType:NSSwitchButton];
- [debugCheckbox setTitle:@""];
- if(settings.getDebugSettingFromComputer(context) == 1){
- [debugCheckbox setState:NSOnState];
- } else {
- [debugCheckbox setState:NSOffState];
- }
- [debugCheckbox setCOSJSTargetFunction:function(sender) {
-
- var directory = errorLogging.getLogDirectory(context);
- errorLogging.removeFileOrFolder(directory + "main.txt")
-
- if ([sender state] == NSOnState) {
- settings.saveDebugSetting(1,context)
- } else {
- settings.saveDebugSetting(0,context)
- }
-
- }];
- [[windowSendArtboards contentView] addSubview:debugCheckbox]
-
- [sendButton setTitle:"Send"]
- [sendButton setBezelStyle:NSRoundedBezelStyle]
- [sendButton setCOSJSTargetFunction:function(sender) {
-
- var logs = errorLogging.fetchLog(context);
-
- var subject = @"Sketch Plugin Support";
- var body =[NSString stringWithFormat:@"Describe your bug here: \n\n\n\n\n My Logs:\n\n Plugin Version: %@ \n System Version: %@ \n Sketch Version: %@ \n %@", pluginVersion, systemVersion, sketchVersion, logs];
- var to = @"help@marvelapp.com";
- var encodedSubject = [NSString stringWithFormat:@"SUBJECT=%@", [subject stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
- var encodedBody = [NSString stringWithFormat:@"BODY=%@", [body stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
- var encodedTo = [to stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
- var encodedURLString = [NSString stringWithFormat:@"mailto:%@?%@&%@", encodedTo, encodedSubject, encodedBody];
- var mailtoURL = [NSURL URLWithString:encodedURLString];
-
- [[NSWorkspace sharedWorkspace] openURL:mailtoURL];
-
- [windowSendArtboards orderOut:nil]
- [app stopModal]
- [sendButton setCOSJSTargetFunction:undefined]
- [cancelButton setCOSJSTargetFunction:undefined]
- [debugCheckbox setCOSJSTargetFunction:undefined]
- }];
- [sendButton setAction:"callAction:"]
- [[windowSendArtboards contentView] addSubview:sendButton]
-
-
- [cancelButton setTitle:"Close"]
- [cancelButton setBezelStyle:NSRoundedBezelStyle]
- [cancelButton setCOSJSTargetFunction:function(sender) {
- [windowSendArtboards orderOut:nil]
- [app stopModal]
- [cancelButton setCOSJSTargetFunction:undefined]
- [debugCheckbox setCOSJSTargetFunction:undefined]
- [sendButton setCOSJSTargetFunction:undefined]
- }];
- [cancelButton setAction:"callAction:"]
- [[windowSendArtboards contentView] addSubview:cancelButton]
-
- [windowSendArtboards setDefaultButtonCell:[sendButton cell]];
-
- [app runModalForWindow:windowSendArtboards]}
-
-function createProject(nameValue, context){
-
- sketchLog(context,"createProject()")
-
- var token = getActiveTokenFromComputer(context)
-
- var jsonDict = [[NSDictionary alloc] initWithObjectsAndKeys: nameValue, @"name", nil]
- var errorDataConvert;
- var jsonData = [NSJSONSerialization dataWithJSONObject:jsonDict options:0 error:errorDataConvert];
-
- var url = [NSURL URLWithString:rootURL + "project/"];
-
- var request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]
- [request setHTTPMethod:"POST"]
- [request setValue:"Sketch" forHTTPHeaderField:"User-Agent"]
- [request setValue:"application/json" forHTTPHeaderField:"Content-Type"]
- [request setValue:"Token " + token forHTTPHeaderField:"Authorization"]
- [request setValue:token forHTTPHeaderField:"HTTP_AUTHORIZATION"]
- [request setHTTPBody: jsonData]
-
- var response = nil;
- var error = nil;
- sketchLog(context,"NSURLConnection createProject()")
- var data = [NSURLConnection sendSynchronousRequest:request returningResponse:response error:error];
-
- if (error == nil && data != nil)
- {
- var errorJson;
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:errorJson]
-
- if(res.detail && res.detail == "Invalid token"){
- deleteActiveTokenFromComputer(context)
- fireError("Your token is not valid anymore, please login again.","After you are logged in again please try again.")
- return false
- } else if (res.detail && res.detail == "Project name already exists"){
- fireError("Project name already exists.","Change your project name to go forward.")
- return false
- } else if ([res valueForKey:@"id"]) {
- var itemId = [NSString stringWithFormat:@"%@", [[res valueForKey:@"id"] intValue]];
- return itemId
- }
-
- return false
-
- } else {
- dealWithErrors(context,data)
- }
-
- return false;}
-
-function loginWithUsernameAndPassword(email, password, context){
-
- sketchLog(context,"loginWithUsernameAndPassword()");
- getTokenFromServer(email,password, context)
- sketchLog(context,"loginWithUsernameAndPassword() finished"); }
-
-// Api Calls
-
-function getTokenFromServer(email,password, context){
-
- sketchLog(context,"getTokenFromServer()")
- var url = [NSURL URLWithString:rootURL + "loginApp/"];
-
- var request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]
- [request setHTTPMethod:"POST"]
- [request setValue:"Sketch" forHTTPHeaderField:"User-Agent"]
- [request setValue:"application/json" forHTTPHeaderField:"Content-Type"]
-
- var tmp = [[NSDictionary alloc] initWithObjectsAndKeys:
- email, @"email",
- password, @"password",
- nil];
-
- var error = nil;
- var postData = [NSJSONSerialization dataWithJSONObject:tmp options:0 error:error];
-
- [request setHTTPBody:postData];
-
- var response = nil;
- var error = nil;
- sketchLog(context,"Fetch token")
- var data = [NSURLConnection sendSynchronousRequest:request returningResponse:response error:error];
-
- if (error == nil && data != nil){
-
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil]
-
- var token = res.token
-
- sketchLog(context,"Return token if exists")
-
- if(token){
- sketchLog(context,"Token exists and gets returned")
-
- [[NSUserDefaults standardUserDefaults] setObject:token forKey:"token"]
- [[NSUserDefaults standardUserDefaults] synchronize]
-
- [app displayDialog:"Select your artboards, go to plugins > Marvel > Send to Project..." withTitle:"You are now logged in."]
-
- } else if(res.password) {
-
- [app displayDialog:"If you sign in to Marvel using Dropbox or Google Drive, you'll need to set a password for your account to use Sketch, head to My Profile in Marvel to set one up." withTitle:"Incorrect email or password."]
-
- } else {
- dealWithErrors(context,data)
- }
-
- sketchLog(context,"Token does not exist")
-
-
- } else {
-
- dealWithErrors(context,data)
-
- }
-
- return false; }
-
-function getProjectNamesArray(context) {
-
- sketchLog(context,"getProjectNamesArray()")
-
- var token = getActiveTokenFromComputer(context)
-
- var url = [NSURL URLWithString:rootURL + "project/all/"];
-
- var request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]
- [request setHTTPMethod:"GET"]
- [request setValue:"Sketch" forHTTPHeaderField:"User-Agent"]
- [request setValue:"application/json" forHTTPHeaderField:"Content-Type"]
- [request setValue:"Token " + token forHTTPHeaderField:"Authorization"]
- [request setValue:token forHTTPHeaderField:"HTTP_AUTHORIZATION"]
-
- var response = nil;
- var error = nil;
- sketchLog(context,"NSURLConnection getProjectNamesArray()")
- var data = [NSURLConnection sendSynchronousRequest:request returningResponse:response error:error];
-
- if (error == nil && data != nil)
- {
- var errorJson;
-
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:errorJson]
-
- if(res.detail && res.detail == "Invalid token"){
- deleteActiveTokenFromComputer(context)
- fireError("Your token is not valid anymore, please login again.","After you are logged in again please try again.")
- return false
- } else {
-
- if(res.count() > 0){
- var projects = [];
- for (var i = 0; i < res.count(); i++) {
- var project = res[i]
- projects.push({name: project.name, id: project.id})
- }
-
- return projects;
-
- } else {
-
- var projects = [];
- return projects;
-
- }
-
- }
-
- } else {
- dealWithErrors(context,data)
- }
-
- return false; }
-
-function postFile(context, path, projectId, filename, uuid, width, height) {
-
- sketchLog(context,"postFile()")
-
- var dataImg = [[NSFileManager defaultManager] contentsAtPath:path];
- var token = getActiveTokenFromComputer(context)
- var postLength = [dataImg length].toString()
-
- var task = NSTask.alloc().init()
- task.setLaunchPath("/usr/bin/curl");
-
- var args = NSArray.arrayWithObjects("-v", "POST", "--header", "Content-Type: multipart/form-data; boundary=0xKhTmLbOuNdArY", "--header", "Authorization: Token " + token, "--header", "HTTP_AUTHORIZATION: " + token, "--header", "User-Agent: Sketch", "--header", "width: " + width, "--header", "height: " + height, "-F", "Content-Disposition: form-data; name=file; filename=" + filename + "; Content-Type=image/png;", "-F", "file=@" + path, rootURL + "content/upload/sketch/" + projectId + "/" + uuid + "/", nil);
-
- task.setArguments(args);
-
- if(settings.getDebugSettingFromComputer(context) == 1)
- {
-
- sketchLog(context,"Output pipe")
- var outputPipe = [NSPipe pipe];
- [task setStandardOutput:outputPipe];
- task.launch();
- var outputData = [[outputPipe fileHandleForReading] readDataToEndOfFile];
-
- var classNameOfOuput = NSStringFromClass([outputData class]);
- sketchLog(context,"Ouput is " + classNameOfOuput)
-
- if(classNameOfOuput != "_NSZeroData"){
- var errorJson;
- sketchLog(context,"Convert to JSON")
- var res = [NSJSONSerialization JSONObjectWithData:outputData options:NSJSONReadingMutableLeaves error:errorJson]
-
- if(errorJson == nil && res != null){
- sketchLog(context,"Result: " + res)
- } else {
- sketchLog(context, "JSON convert failed")
- }
- } else {
- sketchLog(context, "Empty output")
- deleteActiveTokenFromComputer(context)
- fireError("Looks like your session has expired.","Please sign in again")
- fireLoginWindowWithContext(context)
- }
-
- //postFileNSUrlConnection(context, path, projectId, filename, uuid, width, height)
-
- } else {
- task.launch();
- }}
-
-function postFileNSUrlConnection(context, path, projectId, filename, uuid, width, height) {
-
- sketchLog(context,"postFileNSUrlConnection()")
-
- var token = getActiveTokenFromComputer(context)
-
- var url = [NSURL URLWithString:rootURL + "content/upload/sketch/" + projectId + "/" + uuid + "/"];
-
- sketchLog(context,"NSMutableURLRequest requestWithURL: " + url)
-
- var request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]
- [request setHTTPMethod:"POST"]
- [request setValue:"Sketch" forHTTPHeaderField:"User-Agent"]
- [request setValue:"Token " + token forHTTPHeaderField:"Authorization"]
- [request setValue:width.toString() forHTTPHeaderField:"width"]
- [request setValue:height.toString() forHTTPHeaderField:"height"]
- [request setValue:"Token " + token forHTTPHeaderField:"HTTP_AUTHORIZATION"]
-
- var body = [NSMutableData data];
- var boundary = "---------------------------14737809831466499882746641449";
- var contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];
- [request addValue:contentType forHTTPHeaderField:@"Content-Type"];
-
- [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
- var dataImg = [[NSFileManager defaultManager] contentsAtPath:path];
- [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=file; filename=%@\r\n",filename] dataUsingEncoding:NSUTF8StringEncoding]];
- [body appendData:[@"Content-Type: image/png\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]];
- [body appendData:dataImg];
- [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
-
- [request setHTTPBody:body]
-
- var response = MOPointer.alloc().init();
- var error = MOPointer.alloc().init();
- sketchLog(context,"NSURLConnection postFileNSUrlConnection()")
-
- var data = NSURLConnection.sendSynchronousRequest_returningResponse_error(request, response, error);
-
- sketchLog(context, "Full header response: " + response.value())
-
- if (error.value() == nil && data != nil) {
-
- sketchLog(context,"no error and data not nil")
-
- var errorJson;
-
- if(data != nil){
-
- sketchLog(context,"rdata bigger than nil")
-
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:errorJson]
-
- if(res){
- sketchLog(context,"result")
- if(res.detail && res.detail == "Invalid token"){
- //deleteActiveTokenFromComputer(context)
- fireError("Your token is not valid anymore, please login again.","After you are logged in again please try again.")
- } else if (res.detail && res.detail){
- fireError(res.detail)
- } else if ([res valueForKey:@"id"]) {
- var itemId = [NSString stringWithFormat:@"%@", [[res valueForKey:@"id"] intValue]];
- sketchLog(context,itemId)
- }
- } else {
- sketchLog(context,"no result")
- }
- } else {
-
- var errorJson;
-
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:errorJson]
-
- sketchLog(context,"no result but response code is " + res)
- sketchLog(context,"no result but response code 3is " + error)
- sketchLog(context,"no result but response code 2is " + response.statusCode)
-
-
- }
-
- } else {
- sketchLog(context,"error")
- dealWithErrors(context,data)
- }
-
- return false;}
-
-// Helpers
-
-function dealWithErrors(context,data){
-
- sketchLog(context,"Received an error from the server")
- var stringRead = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-
- var alert = [[NSAlert alloc] init]
- [alert setMessageText:"Something went wrong..."]
- [alert setInformativeText:"Please ensure your internet isn\'t down or a firewall (e.g. Little Snitch) is not blocking any connections to marvelapp.com."]
-
- if(stringRead != nil && stringRead != ""){
- [alert addButtonWithTitle:'Close']
- [alert addButtonWithTitle:'Show more details']
- } else {
- [alert addButtonWithTitle:'Close']
- }
-
- var responseCode = [alert runModal]
- if(responseCode == "1001"){
- webViewWhichShowsResults(context)
- }
-
- sketchLog(context,"Return data " + stringRead) }
-
-function webViewWhichShowsResults(context){
- // create window
- var webViewWindow = [[NSWindow alloc] init]
- [webViewWindow setFrame:NSMakeRect(0, 0, 680, 420) display:false]
- [webViewWindow setBackgroundColor:NSColor.whiteColor()]
-
- var webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 87, 680, 420 - 87) frameName:"Error frame" groupName:nil];
- [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://marvelapp.com/"]]];
- [[webViewWindow contentView] addSubview:webView];
-
- //Bottom Line
- var bottomLineView = [[NSView alloc] initWithFrame:NSMakeRect(0, 86, 680, 1)];
- bottomLineView.setWantsLayer(true);
- [[webViewWindow contentView] addSubview:bottomLineView];
-
- var backgroundLayer = [CALayer layer];
- [backgroundLayer setBackgroundColor:CGColorCreateGenericRGB(220/255, 220/255, 220/255, 1.0)]; //RGB plus Alpha Channel
- [bottomLineView setLayer:backgroundLayer]
-
- var subtitleField = [[NSTextField alloc] initWithFrame:NSMakeRect(40, 30, 480, 40)]
- [subtitleField setEditable:false]
- [subtitleField setBordered:false]
- [subtitleField setFont:[NSFont systemFontOfSize:12]];
- [subtitleField setTextColor:[NSColor colorWithCalibratedRed:(93/255) green:(93/255) blue:(93/255) alpha:1]];
- [subtitleField setDrawsBackground:false]
- [subtitleField setStringValue:"In most cases this screen should show more information why connections get\nblocked, if it doesn’t please get in touch with help@marvelapp.com"]
- [subtitleField sizeToFit]
- [[webViewWindow contentView] addSubview:subtitleField]
-
- var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(550, 20, 92, 46)]
- [cancelButton setTitle:"Close"]
- [cancelButton setBezelStyle:NSRoundedBezelStyle]
- [cancelButton setCOSJSTargetFunction:function(sender) {
- [webViewWindow orderOut:nil]
- [app stopModal]
- [cancelButton setCOSJSTargetFunction:undefined]
- }];
- [cancelButton setAction:"callAction:"]
- [[webViewWindow contentView] addSubview:cancelButton]
-
- [webViewWindow setDefaultButtonCell:[cancelButton cell]];
-
- [app runModalForWindow:webViewWindow ]}
-
-function exportArtboardsAndSendTo(context, projectId, scale, selection, document) {
-
- sketchLog(context,"exportArtboardsAndSendTo() : project with id " + projectId + " and size " + scale)
-
- var loop = [selection objectEnumerator];
- var existing_artboards_names = [];
-
- while (artboard = [loop nextObject]) {
- if (artboard.className() == "MSArtboardGroup") {
- existing_artboards_names.push([artboard name]);
- }
- }
-
- if(existing_artboards_names.length == 0){
- fireError("You didn't select any artboards.","Select at least one artboard before sending.")
- return false
- }
-
- sendArtboardOnArray(context, selection, scale, projectId, document)}
-
-function exportAllArtboardsAndSendTo(context, projectId, scale, document) {
- sketchLog(context,"exportAllArtboardsAndSendTo() : project with id " + projectId + " and size " + scale);
- var artboards = [[document currentPage] artboards];
- sendArtboardOnArray(context, artboards, scale, projectId, document);
-}
-
-function sendArtboardOnArray(context, array, scale, projectId, document){
-
- var loopFinal = [array objectEnumerator];
- while (item = [loopFinal nextObject]) {
- if (item.className() == "MSArtboardGroup") {
- var filename = mini.escapedFileName([item name]) + ".png"
- sketchLog(context,"Artboard found with name " + filename + " and object id " + item.objectID())
- // it's important the path is unique to prevent us sending the same image data for different artboards
- var path = NSTemporaryDirectory() + item.objectID() + '/' + [item name] + '.png';
- var version = copy_layer_with_factor(item, scale)
-
- [document saveArtboardOrSlice:version toFile:path];
-
- var args = [
- context,
- path,
- projectId,
- filename,
- item.objectID(),
- [[item frame] width],
- [[item frame] height],
- ]
-
- if(settings.getDebugSettingFromComputer(context) == 1){
- postFileNSUrlConnection.apply(this, args);
- } else {
- postFile.apply(this, args);
- }
-
- }
- }
-}
-
-function copy_layer_with_factor(original_slice, factor){
- var copy = [original_slice duplicate];
- var frame = [copy frame];
-
- var rect = [MSSliceTrimming trimmedRectForSlice:copy],
- slice = [MSExportRequest requestWithRect:rect scale:factor];
-
- [copy removeFromParent];
- return slice;}
-
-function fireError(title,text){
- [app displayDialog:text withTitle:title]
-}
-
-function sketchLog(context,string){
- if(settings.getDebugSettingFromComputer(context) == 1)
- {
- NSLog(string)
- errorLogging.write(context,string)
- }}
diff --git a/Marvel.sketchplugin/Contents/Sketch/artboards-all.js b/Marvel.sketchplugin/Contents/Sketch/artboards-all.js
deleted file mode 100755
index b0f41c7..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/artboards-all.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-@import 'api.js'
-
-var onRun = function (context) {
-
- if (getActiveTokenFromComputer(context) == false) {
-
- sketchLog(context,"Fire login window");
- fireLoginWindowWithContext(context)
-
- } else {
-
- sketchLog(context,"Get project names array");
-
- var projectNamesArray = getProjectNamesArray(context)
-
- if(projectNamesArray){
- fireSendArtboards(projectNamesArray, 1, context)
- }
-
-
- }
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/authenticate.js b/Marvel.sketchplugin/Contents/Sketch/authenticate.js
deleted file mode 100755
index 9aa20d5..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/authenticate.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-
-@import 'api.js'
-
-var onRun = function(context) {
-
- if (getActiveTokenFromComputer(context) == false) {
- fireLoginWindowWithContext(context)
- } else {
- fireAlreadyLoggedInWindow(context)
- }
-
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/helpers/error-logging.js b/Marvel.sketchplugin/Contents/Sketch/helpers/error-logging.js
deleted file mode 100755
index 792afa3..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/helpers/error-logging.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-var errorLogging = {
-
- "createFolderAtPath": function(context, pathString){
- var fileManager = [NSFileManager defaultManager]
- if([fileManager fileExistsAtPath:pathString]){
- return true
- } else {
- return [fileManager createDirectoryAtPath:pathString withIntermediateDirectories:true attributes:nil error:nil]
- }
- },
-
- "readTextFromFile": function(context,filePath){
- var fileManager = [NSFileManager defaultManager]
- if([fileManager fileExistsAtPath:filePath]) {
- var log = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
- if(log){
- return log
- }
- NSLog("Could not get log file data");
- return false
- }
- return false
- },
-
- "removeFileOrFolder": function(filePath){
- [[NSFileManager defaultManager] removeItemAtPath:filePath error:nil];
- },
-
- "writeTextToFile": function(context, text, filePath){
- var aFileHandle
- var aFile
- var t
-
- var currentTime = errorLogging.getCurrentTime();
- t = [NSString stringWithFormat:@"%@ : %@\r\n", currentTime, text],
- aFile = [NSString stringWithFormat:@"%@", filePath]
-
- aFileHandle = [NSFileHandle fileHandleForWritingAtPath:aFile]
-
- if(aFileHandle){
- [aFileHandle truncateFileAtOffset:[aFileHandle seekToEndOfFile]]
- [aFileHandle writeData:[t dataUsingEncoding:NSUTF8StringEncoding]]
- } else {
- [t writeToFile:aFile atomically:true encoding:NSUTF8StringEncoding error:nil]
- }
- },
-
- "write": function(context,text){
- if(!context){
- if(text){
- NSLog("No context was provided for log : " + text)
- } else {
- NSLog("No context and text was provided for log")
- }
-
- return false
- }
-
- if(!text){
- NSLog("No text was provided for log")
- return false
- }
-
- var logsDirectory = errorLogging.getLogDirectory(context)
-
- if(errorLogging.createFolderAtPath(context, logsDirectory)){
- errorLogging.writeTextToFile(context, text, logsDirectory + "main.txt")
- }
- },
-
- "getLogDirectory": function(context){
- var scriptFullPath = context.scriptPath
- var directoryPlugin = [scriptFullPath stringByDeletingLastPathComponent]
- var logsDirectory = directoryPlugin + "/logs/"
-
- return logsDirectory
- },
-
- "fetchLog": function(context){
-
- var logsDirectory = errorLogging.getLogDirectory(context) + "main.txt"
-
- var log = errorLogging.readTextFromFile(context,logsDirectory)
-
- if(log){
- return log
- }
-
- return false
-
- },
-
- "getCurrentTime": function(){
- var DateFormatter=[[NSDateFormatter alloc] init]
- [DateFormatter setDateFormat:@"yyyy-MM-dd hh:mm:ss"]
- return [DateFormatter stringFromDate:[NSDate date]]
- }
-
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/helpers/manifest.js b/Marvel.sketchplugin/Contents/Sketch/helpers/manifest.js
deleted file mode 100755
index d95acd4..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/helpers/manifest.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-var manifest = {
-
- "getManifestFilePath": function(context){
- var scriptFullPath = context.scriptPath
- var directoryPlugin = [scriptFullPath stringByDeletingLastPathComponent]
- var manifestFile = directoryPlugin + "/manifest.json"
-
- return manifestFile
- },
-
- "readManifestFile": function(context){
- var filePath = manifest.getManifestFilePath(context)
- var fileManager = [NSFileManager defaultManager]
- if([fileManager fileExistsAtPath:filePath]) {
- var fetchData = [NSData dataWithContentsOfFile:filePath]
- if(fetchData){
- var error;
- var res = [NSJSONSerialization JSONObjectWithData:fetchData options:NSJSONReadingMutableLeaves error:error]
-
- if(error == nil && res != nil){
- return res
- } else {
- NSLog("error " + error);
- return false
- }
-
- }
- NSLog("Could not get manifest file data");
- return false
- }
- return false
- },
-
- "getPluginVersion": function(context){
- var json = manifest.readManifestFile(context);
-
- if(json){
- var version = json.version.toString()
- return version
- }
-
- NSLog("Could not get version number");
- return false
- }
-
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/helpers/mini.js b/Marvel.sketchplugin/Contents/Sketch/helpers/mini.js
deleted file mode 100755
index e345cc8..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/helpers/mini.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-var mini = {
-
- "isRetinaDisplay": function(){
- return NSScreen.isOnRetinaScreen();
- },
-
- "escapedFileName": function(string){
- var notAllowedChars = [NSCharacterSet characterSetWithCharactersInString:@"\\<>=,!#$&'()*+/:;=?@[]%"];
- var cleanString = [[string componentsSeparatedByCharactersInSet:notAllowedChars] componentsJoinedByString:@""];
- return cleanString
- }
-
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/helpers/settings.js b/Marvel.sketchplugin/Contents/Sketch/helpers/settings.js
deleted file mode 100755
index 7f2cbd3..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/helpers/settings.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-var settings = {
-
- "getDebugSettingFromComputer": function(context){
- var debug = [[NSUserDefaults standardUserDefaults] objectForKey:"debug"]
- if (debug) {
- return debug
- } else {
- return 0
- }
- },
-
- "saveDebugSetting": function(debugValue,context){
- [[NSUserDefaults standardUserDefaults] setObject:debugValue forKey:"debug"]
- [[NSUserDefaults standardUserDefaults] synchronize]
- },
-
- "getScaleSettingFromComputer": function(context){
- var scale = [[NSUserDefaults standardUserDefaults] objectForKey:"scale"];
- if (scale) {
- return scale;
- } else {
- return false;
- }
- },
-
- "getLastUsedProject": function(context){
- var last = [[NSUserDefaults standardUserDefaults] objectForKey:"last used project"];
- if (last) {
- return last;
- } else {
- return false;
- }
- },
-
- "saveLastUsedProject": function(projectId,context){
- [[NSUserDefaults standardUserDefaults] setObject:projectId forKey:"last used project"]
- [[NSUserDefaults standardUserDefaults] synchronize]
- },
-
- "saveScaleSetting": function(scaleValue,context){
- [[NSUserDefaults standardUserDefaults] setObject:scaleValue forKey:"scale"]
- [[NSUserDefaults standardUserDefaults] synchronize]
- }
-
-}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/artboards-selected.js b/Marvel.sketchplugin/Contents/Sketch/load.js
old mode 100755
new mode 100644
similarity index 69%
rename from Marvel.sketchplugin/Contents/Sketch/artboards-selected.js
rename to Marvel.sketchplugin/Contents/Sketch/load.js
index a2f209f..779d51b
--- a/Marvel.sketchplugin/Contents/Sketch/artboards-selected.js
+++ b/Marvel.sketchplugin/Contents/Sketch/load.js
@@ -1,6 +1,6 @@
/*The MIT License (MIT)
-Copyright (c) 2015 Marvel App
+Copyright (c) 2016 Marvel App
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -20,24 +20,17 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.*/
-@import 'api.js'
+var scriptPath = context.scriptPath;
+var pluginRoot = [scriptPath stringByDeletingLastPathComponent];
-var onRun = function (context) {
-
- if (getActiveTokenFromComputer(context) == false) {
+if (NSClassFromString('MarvelSketch') == null) {
+ var mocha = [Mocha sharedRuntime];
+ [mocha loadFrameworkWithName:'MarvelSketch' inDirectory:pluginRoot];
+ [MarvelSketch sharedManager];
+}
- sketchLog(context,"Fire login window");
- fireLoginWindowWithContext(context)
- } else {
-
- sketchLog(context,"Get project names array");
-
- var projectNamesArray = getProjectNamesArray(context)
-
- if(projectNamesArray){
- fireSendArtboards(projectNamesArray, 0, context)
- }
-
-
- }
+if([[MarvelSketch sharedManager] userWantsMarvelHidden]){
+ [[MarvelSketch sharedManager] remove];
+} else {
+ [[MarvelSketch sharedManager] add];
}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/manifest.json b/Marvel.sketchplugin/Contents/Sketch/manifest.json
index 33a5f37..a2a9909 100644
--- a/Marvel.sketchplugin/Contents/Sketch/manifest.json
+++ b/Marvel.sketchplugin/Contents/Sketch/manifest.json
@@ -3,58 +3,25 @@
"description": "Send artboards to Marvel",
"author": "Marvel",
"homepage": "https://marvelapp.com/prototype-with-sketch/",
- "version": 1.43,
- "identifier": "com.marvel.sketch.marvel-plugin",
+ "version": 2.1,
+ "identifier": "com.marvelprototyping.MarvelSketch",
"updateURL": "https://github.com/downloads/example/sketchplugins/sketchplugins.json",
"compatibleVersion": 3,
"bundleVersion": 1,
"commands": [
{
- "name": "Login or Logout to Marvel...",
- "identifier": "login",
- "script": "authenticate.js",
- "shortcut": ""
- },
- {
- "name": "Send or Update All Artboards to Project...",
- "identifier": "allartboards",
- "shortcut": "cmd alt f",
- "script": "artboards-all.js"
- },
- {
- "name": "Send or Update Selected Artboards to Project...",
- "identifier": "selectedartboards",
- "shortcut": "cmd alt g",
- "script": "artboards-selected.js"
- },
- {
- "name": "Report a bug...",
- "identifier": "support",
- "script": "support.js",
- "shortcut": ""
- },
- {
- "name": "Check for updates...",
- "identifier": "updates",
- "script": "updates.js",
- "shortcut": "",
+ "name": "Show/Hide Marvel",
+ "identifier": "showhide",
+ "script": "showhide.js",
+ "shortcut": "cmd l",
+ "handler": "showOrHideFramework"
}
],
-
"menu" : {
"title": "Marvel",
+ "isRoot": true,
"items": [
- "login",
- "allartboards",
- "selectedartboards",
- {
- "title": "Support & Updates...",
- "items": [
- "support",
- "updates"
- ],
- }
+ "showhide"
]
-}
-
+ }
}
\ No newline at end of file
diff --git a/Marvel.sketchplugin/Contents/Sketch/support.js b/Marvel.sketchplugin/Contents/Sketch/showhide.js
old mode 100755
new mode 100644
similarity index 72%
rename from Marvel.sketchplugin/Contents/Sketch/support.js
rename to Marvel.sketchplugin/Contents/Sketch/showhide.js
index eed77c7..f315778
--- a/Marvel.sketchplugin/Contents/Sketch/support.js
+++ b/Marvel.sketchplugin/Contents/Sketch/showhide.js
@@ -1,6 +1,6 @@
/*The MIT License (MIT)
-Copyright (c) 2015 Marvel App
+Copyright (c) 2016 Marvel App
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -20,12 +20,17 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.*/
-@import 'api.js'
-
-var onRun = function(context) {
- fireSupport(context);
-}
+var showOrHideFramework = function(context) {
+ var scriptPath = context.scriptPath
+ var pluginRoot = [scriptPath stringByDeletingLastPathComponent]
+ var task = [[NSTask alloc] init]
+ [task setLaunchPath:pluginRoot + "/Launcher.app/Contents/MacOS/Launcher"]
+ [task launch]
+ if (NSClassFromString('MarvelSketch')) {
+ [[MarvelSketch sharedManager] toggleVisibility]
+ }
+};
diff --git a/Marvel.sketchplugin/Contents/Sketch/updates.js b/Marvel.sketchplugin/Contents/Sketch/updates.js
deleted file mode 100755
index ae48c05..0000000
--- a/Marvel.sketchplugin/Contents/Sketch/updates.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*The MIT License (MIT)
-
-Copyright (c) 2015 Marvel App
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.*/
-
-
-@import 'api.js'
-
-var updatesChecker = {
-
- "getNewestVersionNumber": function(context){
-
- sketchLog(context,"updatesChecker.getNewestVersionNumber()")
-
- var url = [NSURL URLWithString:"https://raw.githubusercontent.com/marvelapp/marvel-sketch/master/Marvel.sketchplugin/Contents/Sketch/manifest.json"];
-
- var request=[NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]
- [request setHTTPMethod:"GET"]
-
- var response = nil;
- var error = nil;
- sketchLog(context,"NSURLConnection updatesChecker.getNewestVersionNumber()")
- var data = [NSURLConnection sendSynchronousRequest:request returningResponse:response error:error];
-
- if (error == nil && data != nil)
- {
- var errorJson;
-
- var res = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:errorJson]
-
- if(errorJson == nil){
- if(res.version){
- return res.version
- }
- } else {
- sketchLog(context,"NSURLConnection updatesChecker.getNewestVersionNumber() Convert to JSON failed")
- return false
- }
-
- }
-
- sketchLog(context,"updatesChecker.getNewestVersionNumber() failed")
- [app displayDialog:"Try again later..." withTitle:"Could not contact GitHub properly."]
- return false
-
- }
-
-
-}
-
-var onRun = function(context) {
-
- var newestVersion = updatesChecker.getNewestVersionNumber(context)
- var pluginVersion = manifest.getPluginVersion(context)
-
- if (newestVersion != pluginVersion) {
- [app displayDialog:"Sketch " + newestVersion + " is currently the newest version available." withTitle:"You’re up-to-date!"]
- } else {
- var alert = [[NSAlert alloc] init]
- [alert setMessageText:"A new version of Marvel Sketch is available."]
- [alert setInformativeText:"Download the new plugin on GitHub"]
- [alert addButtonWithTitle:'Close']
- [alert addButtonWithTitle:'Download our update']
- }
-
- var responseCode = [alert runModal]
- if(responseCode == "1001"){
- var url = [NSURL URLWithString:@"https://github.com/marvelapp/marvel-sketch"];
- if( ![[NSWorkspace sharedWorkspace] openURL:url] ){
- sketchLog(context,"Failed to open url:" + [url description])
- }
- }
-
-
-}
\ No newline at end of file
diff --git a/README.md b/README.md
index 909ea63..1d47707 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
How to install:
-Download, Unzip, double click the Marvel.sketchplugin file. That’s it!.
+Download, Unzip, double click the Marvel.sketchplugin file. That’s it!.
How to update:
@@ -13,10 +13,8 @@ Go to the Sketch Plugin Directory and replace the Marvel.sketchplugin file with
Screenshots:
-
+
+
Important:
If you normally use Dropbox to login into Marvel you first have to go to https://marvelapp.com/manage/account/ and set a password in order to login without Dropbox on the Sketch plugin.
-
-Known bugs:
-If you artboard name starts with a blank space AND you have a second artboard with the same name but without a space in front of the name (" artboardname " and "artboard name"), the server might not upload your file.