├── README.md
├── exampleProject.framer
├── .gitignore
├── .preview.html
├── .viewer.html
├── app.coffee
├── app.js
├── framer
│ ├── coffee-script.js
│ ├── config.json
│ ├── framer.generated.js
│ ├── framer.init.js
│ ├── framer.js
│ ├── framer.js.map
│ ├── framer.modules.js
│ ├── images
│ │ ├── cursor-active.png
│ │ ├── cursor-active@2x.png
│ │ ├── cursor.png
│ │ ├── cursor@2x.png
│ │ ├── icon-120.png
│ │ ├── icon-152.png
│ │ ├── icon-180.png
│ │ ├── icon-192.png
│ │ └── icon-76.png
│ ├── manifest.txt
│ ├── metadata.json
│ ├── preview.png
│ ├── style.css
│ └── version
├── images
│ ├── .gitkeep
│ └── framer-icon.png
├── imported
│ └── selectProject@2x
│ │ ├── images
│ │ ├── Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png
│ │ ├── Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png
│ │ ├── Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png
│ │ ├── Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png
│ │ ├── Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png
│ │ ├── Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png
│ │ ├── Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png
│ │ ├── Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png
│ │ ├── Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png
│ │ ├── Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png
│ │ ├── Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png
│ │ ├── Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png
│ │ ├── Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png
│ │ ├── Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png
│ │ ├── Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png
│ │ ├── Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png
│ │ ├── Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png
│ │ ├── Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png
│ │ ├── Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png
│ │ └── Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png
│ │ ├── layers.json
│ │ └── layers.json.js
├── index.html
└── modules
│ ├── findModule.coffee
│ └── tests.coffee
└── findModule.coffee
/README.md:
--------------------------------------------------------------------------------
1 | # Find for Framer
2 |
3 | Inspired by CSS selectors, this module makes it easier to find and target layers based on the .name property.
4 |
5 | #### Basic examples
6 | ```coffeescript
7 | # the florin sign (option+f)
8 | ƒ('card1') # returns the first layer matching the name "card1".
9 | ƒƒ('card') # returns an array with all layers named "card" (case-sensitive)
10 | ƒƒ('card > image') # all layers named "image" and direct descendants of layers named "card"
11 | ƒƒ('card image') # all layers named "image" and descendants of layers named "card"
12 | ƒƒ('card, image') # all layers named "card" and all layers named "image"
13 | ƒƒ('card*') # all layers with names starting with "card". eg. card1,card2,card3 etc.
14 | page.currentPage.ƒƒ('card') # all layers named "card" and descendants of the current page
15 | ```
16 | 
17 |
18 | Try the example project: http://share.framerjs.com/fcwnnqn7npi7/
19 |
20 | Tutorial: https://blog.prototypr.io/prototype-user-flows-in-framer-studio-dc87f5211a47#.el1t0sv8k
21 |
22 | #### Installation
23 |
24 | 1. Download [findModule.coffee](https://github.com/awt2542/Find-for-Framer/raw/master/findModule.coffee) to your project's /modules directory
25 | 2. Add ```{ƒ,ƒƒ} = require 'findModule'``` to the top of your code
26 | 3. Make sure you're running the latest version of Framer.js. File -> Update Framer...
27 |
28 | More info: [Framer Docs - Modules](http://framerjs.com/docs/#modules.modules)
29 |
30 | #### Reference
31 | ```coffeescript
32 | ƒƒ(selector) # returns array of layers matching the selector
33 | ƒ(selector) # same as above, but returns first matching layer
34 |
35 | layer.ƒƒ(selector) # only search descendants of layer
36 | layer.ƒ(selector) # same as above, but returns first matching layer
37 | ```
38 |
39 | | Selector | Result |
40 | | ------------- | ------------- |
41 | | A | Any layer named A |
42 | | A B | Any layer named B that is a descendant of a layer named A (that is: a child, or a child of a child, etc.) |
43 | | A > B | Any layer named B that is a child (i.e. direct child) of a layer named A |
44 | | A, B | Any layer named A or any layer named B |
45 | | * | Any layer (wildcard character) |
46 |
47 | #### More examples
48 | ```coffeescript
49 | ƒƒ() # find all layers in your project
50 | ƒƒ('card > *') # find all layers that are direct descendants of layers named "card"
51 | ƒƒ('card *') # find all layers that are descendants of layers named "card"
52 | ƒƒ('*image*') # find all layers containing "image"
53 | ƒƒ('*card*,*image*') # find all layers containing either "card" or "image"
54 | ƒƒ('card1 > container *') # find all descendant layers of the "container" inside "card1"
55 |
56 | # Add a "slide in" animation to all layers ending with "_slideIn"
57 | for layer in ƒƒ('*_slideIn')
58 | originalValue = layer.maxX
59 | layer.maxX = 0
60 | layer.animate
61 | properties:
62 | maxX: originalValue
63 |
64 | # Find layers not stored in variables
65 | for i in [0..5]
66 | new Layer
67 | name: item+i
68 | y: 100*i
69 |
70 | ƒ('item2').x = 200
71 | ```
72 |
73 |
74 | #### Thanks to
75 | Jordan, Marc, David and Koen for early feedback!
76 |
--------------------------------------------------------------------------------
/exampleProject.framer/.gitignore:
--------------------------------------------------------------------------------
1 | # Framer Git Ignore
2 |
3 | # General OSX
4 |
5 | .DS_Store
6 | .AppleDouble
7 | .LSOverride
8 |
9 | # Icon must end with two \r
10 | Icon
11 |
12 | # Thumbnails
13 | ._*
14 |
15 | # Files that might appear in the root of a volume
16 | .DocumentRevisions-V100
17 | .fseventsd
18 | .Spotlight-V100
19 | .TemporaryItems
20 | .Trashes
21 | .VolumeIcon.icns
22 |
23 | # Directories potentially created on remote AFP share
24 | .AppleDB
25 | .AppleDesktop
26 | Network Trash Folder
27 | Temporary Items
28 | .apdisk
29 |
30 |
31 | # Framer Specific
32 | .temp.html
33 | framer/*.old.*
34 | framer/backup.coffee
35 | framer/backups/*
36 | framer/.*.hash
37 |
--------------------------------------------------------------------------------
/exampleProject.framer/.preview.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/exampleProject.framer/.viewer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/exampleProject.framer/app.coffee:
--------------------------------------------------------------------------------
1 | # Find-For-Framer Example Project
2 | # https://github.com/awt2542/Find-for-Framer
3 |
4 | # Import the module
5 | {ƒ,ƒƒ} = require 'findModule'
6 |
7 | # https://dribbble.com/shots/2139142-Free-Happy-Manje
8 | sketch = Framer.Importer.load("imported/selectProject@2x")
9 |
10 | # Setup animation
11 | swing = (layer) ->
12 | layer.originY = .8
13 | layer.animate
14 | properties: {rotation: -360}
15 | time: 1.5
16 | repeat: 999
17 |
18 | # Return an array of happy emojis below item1
19 | for layer in ƒƒ('item1 > happy*')
20 | swing(layer)
21 |
22 | # Return the first layer matching the selector
23 | ƒ('item3').opacity = .5 # same as using sketch.item3
24 | ƒ('item1 > happybagel').hueRotate = 100
25 |
26 | ###
27 | More selectors to try
28 | ƒƒ('item2 > *, item3 > *')
29 | ƒƒ('happy*')
30 | ƒƒ('*burger')
31 | ƒƒ('item1 happy*')
32 | ƒƒ('artboard > happy*')
33 | ###
--------------------------------------------------------------------------------
/exampleProject.framer/app.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.9.3
2 |
3 |
--------------------------------------------------------------------------------
/exampleProject.framer/framer/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "propertyPanelToggleStates" : {
3 |
4 | },
5 | "deviceOrientation" : 0,
6 | "sharedPrototype" : 0,
7 | "contentScale" : 1,
8 | "deviceType" : "apple-iphone-6s-silver",
9 | "selectedHand" : "",
10 | "updateDelay" : 0.3,
11 | "deviceScale" : "fit",
12 | "foldedCodeRanges" : [
13 |
14 | ],
15 | "orientation" : 0,
16 | "fullScreen" : false
17 | }
--------------------------------------------------------------------------------
/exampleProject.framer/framer/framer.generated.js:
--------------------------------------------------------------------------------
1 | // This is autogenerated by Framer
2 |
3 |
4 | if (!window.Framer && window._bridge) {window._bridge('runtime.error', {message:'[framer.js] Framer library missing or corrupt. Select File → Update Framer Library.'})}
5 |
6 | window.__imported__ = window.__imported__ || {};
7 | window.__imported__["selectProject/layers.json.js"] = [
8 | {
9 | "children": [
10 | {
11 | "children": [],
12 | "id": "A19A2F61-C96C-450C-A108-0C88FE5E588C",
13 | "image": {
14 | "frame": {
15 | "height": 56,
16 | "width": 37,
17 | "x": 270,
18 | "y": 43
19 | },
20 | "path": "images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png"
21 | },
22 | "imageType": "png",
23 | "kind": "group",
24 | "layerFrame": {
25 | "height": 56,
26 | "width": 37,
27 | "x": 270,
28 | "y": 43
29 | },
30 | "maskFrame": null,
31 | "metadata": {
32 | "opacity": 1
33 | },
34 | "name": "happycoffee",
35 | "visible": true
36 | },
37 | {
38 | "children": [],
39 | "id": "80FDAC81-749B-475F-89A9-FCB6AA001136",
40 | "image": {
41 | "frame": {
42 | "height": 42,
43 | "width": 50,
44 | "x": 158,
45 | "y": 53
46 | },
47 | "path": "images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png"
48 | },
49 | "imageType": "png",
50 | "kind": "group",
51 | "layerFrame": {
52 | "height": 42,
53 | "width": 50,
54 | "x": 158,
55 | "y": 53
56 | },
57 | "maskFrame": null,
58 | "metadata": {
59 | "opacity": 1
60 | },
61 | "name": "happyburger",
62 | "visible": true
63 | },
64 | {
65 | "children": [],
66 | "id": "94CFC973-C6FC-426A-9D9D-0085F22F030F",
67 | "image": {
68 | "frame": {
69 | "height": 56,
70 | "width": 32,
71 | "x": 66,
72 | "y": 43
73 | },
74 | "path": "images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png"
75 | },
76 | "imageType": "png",
77 | "kind": "group",
78 | "layerFrame": {
79 | "height": 56,
80 | "width": 32,
81 | "x": 66,
82 | "y": 43
83 | },
84 | "maskFrame": null,
85 | "metadata": {
86 | "opacity": 1
87 | },
88 | "name": "happyicecream",
89 | "visible": true
90 | },
91 | {
92 | "children": [
93 | {
94 | "children": [],
95 | "id": "05A9C8A7-B00E-4E4C-82F6-5AB46176D349",
96 | "image": {
97 | "frame": {
98 | "height": 56,
99 | "width": 37,
100 | "x": 68,
101 | "y": 163
102 | },
103 | "path": "images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png"
104 | },
105 | "imageType": "png",
106 | "kind": "group",
107 | "layerFrame": {
108 | "height": 56,
109 | "width": 37,
110 | "x": 68,
111 | "y": 163
112 | },
113 | "maskFrame": null,
114 | "metadata": {
115 | "opacity": 1
116 | },
117 | "name": "happycoffee",
118 | "visible": true
119 | },
120 | {
121 | "children": [],
122 | "id": "3EF1F00B-CF38-48BE-8B46-6D9939829878",
123 | "image": {
124 | "frame": {
125 | "height": 63,
126 | "width": 28,
127 | "x": 174,
128 | "y": 156
129 | },
130 | "path": "images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png"
131 | },
132 | "imageType": "png",
133 | "kind": "group",
134 | "layerFrame": {
135 | "height": 63,
136 | "width": 28,
137 | "x": 174,
138 | "y": 156
139 | },
140 | "maskFrame": null,
141 | "metadata": {
142 | "opacity": 1
143 | },
144 | "name": "happymilk",
145 | "visible": true
146 | },
147 | {
148 | "children": [],
149 | "id": "F78F8FEA-309B-4FCA-8407-2D9F8F30826E",
150 | "image": {
151 | "frame": {
152 | "height": 47,
153 | "width": 55,
154 | "x": 262,
155 | "y": 166
156 | },
157 | "path": "images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png"
158 | },
159 | "imageType": "png",
160 | "kind": "group",
161 | "layerFrame": {
162 | "height": 47,
163 | "width": 55,
164 | "x": 262,
165 | "y": 166
166 | },
167 | "maskFrame": null,
168 | "metadata": {
169 | "opacity": 1
170 | },
171 | "name": "happymug",
172 | "visible": true
173 | }
174 | ],
175 | "id": "02B0BAAC-7C31-4300-8F78-6201A50D1F42",
176 | "image": {
177 | "frame": {
178 | "height": 122,
179 | "width": 357,
180 | "x": 9,
181 | "y": 131
182 | },
183 | "path": "images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png"
184 | },
185 | "imageType": "png",
186 | "kind": "group",
187 | "layerFrame": {
188 | "height": 122,
189 | "width": 357,
190 | "x": 9,
191 | "y": 131
192 | },
193 | "maskFrame": null,
194 | "metadata": {
195 | "opacity": 1
196 | },
197 | "name": "item3",
198 | "visible": true
199 | },
200 | {
201 | "children": [
202 | {
203 | "children": [],
204 | "id": "FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35",
205 | "image": {
206 | "frame": {
207 | "height": 48,
208 | "width": 40,
209 | "x": 168,
210 | "y": 296
211 | },
212 | "path": "images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png"
213 | },
214 | "imageType": "png",
215 | "kind": "group",
216 | "layerFrame": {
217 | "height": 48,
218 | "width": 40,
219 | "x": 168,
220 | "y": 296
221 | },
222 | "maskFrame": null,
223 | "metadata": {
224 | "opacity": 1
225 | },
226 | "name": "happyfries",
227 | "visible": true
228 | },
229 | {
230 | "children": [],
231 | "id": "07C78E36-FFF0-495B-BE6E-4CB3DB2FA189",
232 | "image": {
233 | "frame": {
234 | "height": 43,
235 | "width": 50,
236 | "x": 65,
237 | "y": 299
238 | },
239 | "path": "images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png"
240 | },
241 | "imageType": "png",
242 | "kind": "group",
243 | "layerFrame": {
244 | "height": 43,
245 | "width": 50,
246 | "x": 65,
247 | "y": 299
248 | },
249 | "maskFrame": null,
250 | "metadata": {
251 | "opacity": 1
252 | },
253 | "name": "happyburger",
254 | "visible": true
255 | },
256 | {
257 | "children": [],
258 | "id": "D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA",
259 | "image": {
260 | "frame": {
261 | "height": 56,
262 | "width": 32,
263 | "x": 271,
264 | "y": 293
265 | },
266 | "path": "images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png"
267 | },
268 | "imageType": "png",
269 | "kind": "group",
270 | "layerFrame": {
271 | "height": 56,
272 | "width": 32,
273 | "x": 271,
274 | "y": 293
275 | },
276 | "maskFrame": null,
277 | "metadata": {
278 | "opacity": 1
279 | },
280 | "name": "happyicecream",
281 | "visible": true
282 | }
283 | ],
284 | "id": "1E6A5866-5C21-49D5-88F4-68E864D2689C",
285 | "image": {
286 | "frame": {
287 | "height": 122,
288 | "width": 357,
289 | "x": 9,
290 | "y": 263
291 | },
292 | "path": "images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png"
293 | },
294 | "imageType": "png",
295 | "kind": "group",
296 | "layerFrame": {
297 | "height": 122,
298 | "width": 357,
299 | "x": 9,
300 | "y": 263
301 | },
302 | "maskFrame": null,
303 | "metadata": {
304 | "opacity": 1
305 | },
306 | "name": "item2",
307 | "visible": true
308 | },
309 | {
310 | "children": [
311 | {
312 | "children": [
313 | {
314 | "children": [],
315 | "id": "4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB",
316 | "image": {
317 | "frame": {
318 | "height": 63,
319 | "width": 28,
320 | "x": 267,
321 | "y": 539
322 | },
323 | "path": "images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png"
324 | },
325 | "imageType": "png",
326 | "kind": "group",
327 | "layerFrame": {
328 | "height": 63,
329 | "width": 28,
330 | "x": 267,
331 | "y": 539
332 | },
333 | "maskFrame": null,
334 | "metadata": {
335 | "opacity": 1
336 | },
337 | "name": "happymilk",
338 | "visible": true
339 | },
340 | {
341 | "children": [],
342 | "id": "67334EAE-EA81-492F-A727-293C07D4E6A7",
343 | "image": {
344 | "frame": {
345 | "height": 44,
346 | "width": 44,
347 | "x": 65,
348 | "y": 552
349 | },
350 | "path": "images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png"
351 | },
352 | "imageType": "png",
353 | "kind": "group",
354 | "layerFrame": {
355 | "height": 44,
356 | "width": 44,
357 | "x": 65,
358 | "y": 552
359 | },
360 | "maskFrame": null,
361 | "metadata": {
362 | "opacity": 1
363 | },
364 | "name": "happysandwich",
365 | "visible": true
366 | },
367 | {
368 | "children": [],
369 | "id": "2B2372F1-E21F-4809-914F-B4B78B198B11",
370 | "image": {
371 | "frame": {
372 | "height": 58,
373 | "width": 50,
374 | "x": 164,
375 | "y": 541
376 | },
377 | "path": "images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png"
378 | },
379 | "imageType": "png",
380 | "kind": "group",
381 | "layerFrame": {
382 | "height": 58,
383 | "width": 50,
384 | "x": 164,
385 | "y": 541
386 | },
387 | "maskFrame": null,
388 | "metadata": {
389 | "opacity": 1
390 | },
391 | "name": "happyapple",
392 | "visible": true
393 | }
394 | ],
395 | "id": "59788ED5-6AAD-4BF8-99CD-74923A396321",
396 | "image": {
397 | "frame": {
398 | "height": 130,
399 | "width": 343,
400 | "x": 16,
401 | "y": 510
402 | },
403 | "path": "images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png"
404 | },
405 | "imageType": "png",
406 | "kind": "group",
407 | "layerFrame": {
408 | "height": 130,
409 | "width": 343,
410 | "x": 16,
411 | "y": 510
412 | },
413 | "maskFrame": null,
414 | "metadata": {
415 | "opacity": 1
416 | },
417 | "name": "item4",
418 | "visible": true
419 | },
420 | {
421 | "children": [],
422 | "id": "CAC6F52A-777C-45AA-B254-A6BD8C33B11B",
423 | "image": {
424 | "frame": {
425 | "height": 52,
426 | "width": 41,
427 | "x": 265,
428 | "y": 431
429 | },
430 | "path": "images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png"
431 | },
432 | "imageType": "png",
433 | "kind": "group",
434 | "layerFrame": {
435 | "height": 52,
436 | "width": 41,
437 | "x": 265,
438 | "y": 431
439 | },
440 | "maskFrame": null,
441 | "metadata": {
442 | "opacity": 1
443 | },
444 | "name": "happycupcake",
445 | "visible": true
446 | },
447 | {
448 | "children": [],
449 | "id": "50EA6D01-C530-4F9A-9298-7DB41F262E36",
450 | "image": {
451 | "frame": {
452 | "height": 56,
453 | "width": 32,
454 | "x": 172,
455 | "y": 431
456 | },
457 | "path": "images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png"
458 | },
459 | "imageType": "png",
460 | "kind": "group",
461 | "layerFrame": {
462 | "height": 56,
463 | "width": 32,
464 | "x": 172,
465 | "y": 431
466 | },
467 | "maskFrame": null,
468 | "metadata": {
469 | "opacity": 1
470 | },
471 | "name": "happyicecream",
472 | "visible": true
473 | },
474 | {
475 | "children": [],
476 | "id": "87E667EC-851F-408A-9BD1-9010CDE71FE5",
477 | "image": {
478 | "frame": {
479 | "height": 49,
480 | "width": 49,
481 | "x": 69,
482 | "y": 434
483 | },
484 | "path": "images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png"
485 | },
486 | "imageType": "png",
487 | "kind": "group",
488 | "layerFrame": {
489 | "height": 49,
490 | "width": 49,
491 | "x": 69,
492 | "y": 434
493 | },
494 | "maskFrame": null,
495 | "metadata": {
496 | "opacity": 1
497 | },
498 | "name": "happybagel",
499 | "visible": true
500 | }
501 | ],
502 | "id": "E77C2A77-05F9-4B59-BAF9-5354463AD0D2",
503 | "image": {
504 | "frame": {
505 | "height": 257,
506 | "width": 357,
507 | "x": 9,
508 | "y": 395
509 | },
510 | "path": "images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png"
511 | },
512 | "imageType": "png",
513 | "kind": "group",
514 | "layerFrame": {
515 | "height": 257,
516 | "width": 357,
517 | "x": 9,
518 | "y": 395
519 | },
520 | "maskFrame": null,
521 | "metadata": {
522 | "opacity": 1
523 | },
524 | "name": "item1",
525 | "visible": true
526 | },
527 | {
528 | "children": [],
529 | "id": "7A180F6D-122F-412E-B265-ECA0DE7072B9",
530 | "image": {
531 | "frame": {
532 | "height": 667,
533 | "width": 375,
534 | "x": 0,
535 | "y": 0
536 | },
537 | "path": "images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png"
538 | },
539 | "imageType": "png",
540 | "kind": "group",
541 | "layerFrame": {
542 | "height": 667,
543 | "width": 375,
544 | "x": 0,
545 | "y": 0
546 | },
547 | "maskFrame": null,
548 | "metadata": {
549 | "opacity": 1
550 | },
551 | "name": "bg",
552 | "visible": true
553 | }
554 | ],
555 | "id": "35043E3D-BE74-4A7A-B2D3-C92E3A8F0995",
556 | "imageType": "png",
557 | "kind": "artboard",
558 | "layerFrame": {
559 | "height": 667,
560 | "width": 375,
561 | "x": 464,
562 | "y": -17
563 | },
564 | "maskFrame": null,
565 | "metadata": {},
566 | "name": "artboard",
567 | "visible": true
568 | }
569 | ]
570 |
571 | if (DeviceComponent) {DeviceComponent.Devices["iphone-6-silver"].deviceImageJP2 = false};
572 | if (window.Framer) {window.Framer.Defaults.DeviceView = {"deviceScale":"fit","selectedHand":"","deviceType":"apple-iphone-6s-silver","contentScale":1,"orientation":0};
573 | }
574 | if (window.Framer) {window.Framer.Defaults.DeviceComponent = {"deviceScale":"fit","selectedHand":"","deviceType":"apple-iphone-6s-silver","contentScale":1,"orientation":0};
575 | }
576 | window.FramerStudioInfo = {"deviceImagesUrl":"\/_server\/resources\/DeviceImages","documentTitle":"exampleProject.framer"};
577 |
578 | Framer.Device = new Framer.DeviceView();
579 | Framer.Device.setupContext();
--------------------------------------------------------------------------------
/exampleProject.framer/framer/framer.init.js:
--------------------------------------------------------------------------------
1 | (function() {
2 |
3 | function isFileLoadingAllowed() {
4 | return (window.location.protocol.indexOf("file") == -1)
5 | }
6 |
7 | function isHomeScreened() {
8 | return ("standalone" in window.navigator) && window.navigator.standalone == true
9 | }
10 |
11 | function isCompatibleBrowser() {
12 | return Utils.isWebKit()
13 | }
14 |
15 | var alertNode;
16 |
17 | function dismissAlert() {
18 | alertNode.parentElement.removeChild(alertNode)
19 | loadProject()
20 | }
21 |
22 | function showAlert(html) {
23 |
24 | alertNode = document.createElement("div")
25 |
26 | alertNode.classList.add("framerAlertBackground")
27 | alertNode.innerHTML = html
28 |
29 | document.addEventListener("DOMContentLoaded", function(event) {
30 | document.body.appendChild(alertNode)
31 | })
32 |
33 | window.dismissAlert = dismissAlert;
34 | }
35 |
36 | function showBrowserAlert() {
37 | var html = ""
38 | html += ""
39 | html += "
Error: Not A WebKit Browser "
40 | html += "Your browser is not supported.
Please use Safari or Chrome.
"
41 | html += "
Try anyway "
42 | html += "
"
43 |
44 | showAlert(html)
45 | }
46 |
47 | function showFileLoadingAlert() {
48 | var html = ""
49 | html += ""
50 | html += "
Error: Local File Restrictions "
51 | html += "Preview this prototype with Framer Mirror or learn more about "
52 | html += "
file restrictions .
"
53 | html += "
Try anyway "
54 | html += "
"
55 |
56 | showAlert(html)
57 | }
58 |
59 | function loadProject() {
60 | CoffeeScript.load("app.coffee")
61 | }
62 |
63 | function setDefaultPageTitle() {
64 | // If no title was set we set it to the project folder name so
65 | // you get a nice name on iOS if you bookmark to desktop.
66 | document.addEventListener("DOMContentLoaded", function() {
67 | if (document.title == "") {
68 | if (window.FramerStudioInfo && window.FramerStudioInfo.documentTitle) {
69 | document.title = window.FramerStudioInfo.documentTitle
70 | } else {
71 | document.title = window.location.pathname.replace(/\//g, "")
72 | }
73 | }
74 | })
75 | }
76 |
77 | function init() {
78 |
79 | if (Utils.isFramerStudio()) {
80 | return
81 | }
82 |
83 | setDefaultPageTitle()
84 |
85 | if (!isCompatibleBrowser()) {
86 | return showBrowserAlert()
87 | }
88 |
89 | if (!isFileLoadingAllowed()) {
90 | return showFileLoadingAlert()
91 | }
92 |
93 | loadProject()
94 |
95 | }
96 |
97 | init()
98 |
99 | })()
100 |
--------------------------------------------------------------------------------
/exampleProject.framer/framer/framer.modules.js:
--------------------------------------------------------------------------------
1 | require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o' + string;
11 | }
12 | return string = string + layer.name;
13 | };
14 |
15 | _match = function(hierarchy, string) {
16 | var regExp, regexString;
17 | string = string.replace(/\s*>\s*/g, '>');
18 | string = string.split('*').join('[^>]*');
19 | string = string.split(' ').join('(?:.*)>');
20 | string = string.split(',').join('$|');
21 | regexString = "(^|>)" + string + "$";
22 | regExp = new RegExp(regexString);
23 | return hierarchy.match(regExp);
24 | };
25 |
26 | _findAll = function(selector, fromLayer) {
27 | var layers, stringNeedsRegex;
28 | layers = Framer.CurrentContext._layers;
29 | if (selector != null) {
30 | stringNeedsRegex = _.find(['*', ' ', '>', ','], function(c) {
31 | return _.includes(selector, c);
32 | });
33 | if (!(stringNeedsRegex || fromLayer)) {
34 | return layers = _.filter(layers, function(layer) {
35 | if (layer.name === selector) {
36 | return true;
37 | }
38 | });
39 | } else {
40 | return layers = _.filter(layers, function(layer) {
41 | var hierarchy;
42 | hierarchy = _getHierarchy(layer);
43 | if (fromLayer != null) {
44 | return _match(hierarchy, fromLayer.name + ' ' + selector);
45 | } else {
46 | return _match(hierarchy, selector);
47 | }
48 | });
49 | }
50 | } else {
51 | return layers;
52 | }
53 | };
54 |
55 | exports.Find = function(selector, fromLayer) {
56 | return _findAll(selector, fromLayer)[0];
57 | };
58 |
59 | exports.ƒ = function(selector, fromLayer) {
60 | return _findAll(selector, fromLayer)[0];
61 | };
62 |
63 | exports.FindAll = function(selector, fromLayer) {
64 | return _findAll(selector, fromLayer);
65 | };
66 |
67 | exports.ƒƒ = function(selector, fromLayer) {
68 | return _findAll(selector, fromLayer);
69 | };
70 |
71 | Layer.prototype.find = function(selector, fromLayer) {
72 | return _findAll(selector, this)[0];
73 | };
74 |
75 | Layer.prototype.ƒ = function(selector, fromLayer) {
76 | return _findAll(selector, this)[0];
77 | };
78 |
79 | Layer.prototype.findAll = function(selector, fromLayer) {
80 | return _findAll(selector, this);
81 | };
82 |
83 | Layer.prototype.ƒƒ = function(selector, fromLayer) {
84 | return _findAll(selector, this);
85 | };
86 |
87 |
88 | },{}],"tests":[function(require,module,exports){
89 | var assert, cancel_btn, card, close_btn, container, image, publish_btn, ref, remove_image_btn, ƒ, ƒƒ;
90 |
91 | ref = require('findModule'), ƒ = ref.ƒ, ƒƒ = ref.ƒƒ;
92 |
93 | card = new Layer({
94 | name: 'card'
95 | });
96 |
97 | close_btn = new Layer({
98 | name: 'close_btn',
99 | superLayer: card
100 | });
101 |
102 | container = new Layer({
103 | name: 'container',
104 | superLayer: card
105 | });
106 |
107 | publish_btn = new Layer({
108 | name: 'publish_Btn',
109 | superLayer: container
110 | });
111 |
112 | cancel_btn = new Layer({
113 | name: 'cancel_btn',
114 | superLayer: container
115 | });
116 |
117 | image = new Layer({
118 | name: 'image',
119 | superLayer: container
120 | });
121 |
122 | remove_image_btn = new Layer({
123 | name: 'remove_image_btn',
124 | superLayer: image
125 | });
126 |
127 | assert = function(obj) {
128 | if (_.isEqual(obj.result, obj.expected) === false) {
129 | return print("TEST FAILED: " + obj.description);
130 | }
131 | };
132 |
133 | exports.runTests = function() {
134 | assert({
135 | description: 'get all layers',
136 | result: ƒƒ(),
137 | expected: [card, close_btn, container, publish_btn, cancel_btn, image, remove_image_btn]
138 | });
139 | assert({
140 | description: 'multiple searches using comma',
141 | result: ƒƒ('card, image >*btn'),
142 | expected: [card, remove_image_btn]
143 | });
144 | assert({
145 | description: 'get all layers directly under card',
146 | result: ƒƒ('card > *'),
147 | expected: [close_btn, container]
148 | });
149 | assert({
150 | description: 'get all layers below card',
151 | result: ƒƒ('container *'),
152 | expected: [publish_btn, cancel_btn, image, remove_image_btn]
153 | });
154 | assert({
155 | description: 'end of string without wildcard',
156 | result: ƒƒ('mage'),
157 | expected: []
158 | });
159 | assert({
160 | description: 'end of string without wildcard and descendant',
161 | result: ƒƒ('image btn'),
162 | expected: []
163 | });
164 | assert({
165 | description: 'direct parent',
166 | result: ƒƒ('card>container'),
167 | expected: [container]
168 | });
169 | assert({
170 | description: 'direct parent + wildcard',
171 | result: ƒƒ('container>*btn'),
172 | expected: [cancel_btn]
173 | });
174 | assert({
175 | description: 'from layer',
176 | result: container.ƒƒ('image'),
177 | expected: [image]
178 | });
179 | assert({
180 | description: 'single item',
181 | result: ƒƒ('card'),
182 | expected: [card]
183 | });
184 | assert({
185 | description: 'long distance',
186 | result: ƒƒ('card image'),
187 | expected: [image]
188 | });
189 | assert({
190 | description: 'descendant layers with wildcard',
191 | result: ƒƒ('card container *btn'),
192 | expected: [cancel_btn, remove_image_btn]
193 | });
194 | return assert({
195 | description: 'containing',
196 | result: ƒƒ('*image*'),
197 | expected: [image, remove_image_btn]
198 | });
199 | };
200 |
201 |
202 | },{"findModule":"findModule"}]},{},[])
203 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJhbWVyLm1vZHVsZXMuanMiLCJzb3VyY2VzIjpbIi4uL21vZHVsZXMvdGVzdHMuY29mZmVlIiwiLi4vbW9kdWxlcy9maW5kTW9kdWxlLmN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UsQ0FBQyxLQUFELENBRlY7R0FERjtFQUtBLE1BQUEsQ0FDRTtJQUFBLFdBQUEsRUFBYSxhQUFiO0lBQ0EsTUFBQSxFQUFRLEVBQUEsQ0FBRyxNQUFILENBRFI7SUFFQSxRQUFBLEVBQVUsQ0FBQyxJQUFELENBRlY7R0FERjtFQUtBLE1BQUEsQ0FDRTtJQUFBLFdBQUEsRUFBYSxlQUFiO0lBQ0EsTUFBQSxFQUFRLEVBQUEsQ0FBRyxZQUFILENBRFI7SUFFQSxRQUFBLEVBQVUsQ0FBQyxLQUFELENBRlY7R0FERjtFQUtBLE1BQUEsQ0FDRTtJQUFBLFdBQUEsRUFBYSxpQ0FBYjtJQUNBLE1BQUEsRUFBUSxFQUFBLENBQUcscUJBQUgsQ0FEUjtJQUVBLFFBQUEsRUFBVSxDQUFDLFVBQUQsRUFBWSxnQkFBWixDQUZWO0dBREY7U0FLQSxNQUFBLENBQ0U7SUFBQSxXQUFBLEVBQWEsWUFBYjtJQUNBLE1BQUEsRUFBUSxFQUFBLENBQUcsU0FBSCxDQURSO0lBRUEsUUFBQSxFQUFVLENBQUMsS0FBRCxFQUFPLGdCQUFQLENBRlY7R0FERjtBQTlEaUIifQ==
204 |
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/cursor-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/cursor-active.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/cursor-active@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/cursor-active@2x.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/cursor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/cursor.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/cursor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/cursor@2x.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/icon-120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/icon-120.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/icon-152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/icon-152.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/icon-180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/icon-180.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/icon-192.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/images/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/images/icon-76.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/manifest.txt:
--------------------------------------------------------------------------------
1 | app.coffee
2 | app.js
3 | framer/coffee-script.js
4 | framer/config.json
5 | framer/framer.generated.js
6 | framer/framer.init.js
7 | framer/framer.js
8 | framer/framer.js.map
9 | framer/framer.modules.js
10 | framer/images/cursor-active.png
11 | framer/images/cursor-active@2x.png
12 | framer/images/cursor.png
13 | framer/images/cursor@2x.png
14 | framer/images/icon-120.png
15 | framer/images/icon-152.png
16 | framer/images/icon-180.png
17 | framer/images/icon-192.png
18 | framer/images/icon-76.png
19 | framer/manifest.txt
20 | framer/metadata.json
21 | framer/preview.png
22 | framer/style.css
23 | framer/version
24 | images/framer-icon.png
25 | imported/selectProject@2x/images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png
26 | imported/selectProject@2x/images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png
27 | imported/selectProject@2x/images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png
28 | imported/selectProject@2x/images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png
29 | imported/selectProject@2x/images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png
30 | imported/selectProject@2x/images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png
31 | imported/selectProject@2x/images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png
32 | imported/selectProject@2x/images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png
33 | imported/selectProject@2x/images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png
34 | imported/selectProject@2x/images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png
35 | imported/selectProject@2x/images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png
36 | imported/selectProject@2x/images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png
37 | imported/selectProject@2x/images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png
38 | imported/selectProject@2x/images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png
39 | imported/selectProject@2x/images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png
40 | imported/selectProject@2x/images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png
41 | imported/selectProject@2x/images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png
42 | imported/selectProject@2x/images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png
43 | imported/selectProject@2x/images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png
44 | imported/selectProject@2x/images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png
45 | imported/selectProject@2x/layers.json
46 | imported/selectProject@2x/layers.json.js
47 | index.html
48 | modules/findModule.coffee
49 | modules/tests.coffee
--------------------------------------------------------------------------------
/exampleProject.framer/framer/metadata.json:
--------------------------------------------------------------------------------
1 | {"title":"exampleProject","date":"2016-10-09T10:35:36Z"}
--------------------------------------------------------------------------------
/exampleProject.framer/framer/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/framer/preview.png
--------------------------------------------------------------------------------
/exampleProject.framer/framer/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | border: none;
5 | -webkit-user-select: none;
6 | -webkit-tap-highlight-color: rgba(0,0,0,0);
7 | }
8 |
9 | body {
10 | background-color: #fff;
11 | font: 28px/1em "Helvetica";
12 | color: gray;
13 | overflow: hidden;
14 | }
15 |
16 | a {
17 | color: gray;
18 | }
19 |
20 | body {
21 | cursor: url('images/cursor.png') 32 32, auto;
22 | cursor: -webkit-image-set(
23 | url('images/cursor.png') 1x,
24 | url('images/cursor@2x.png') 2x
25 | ) 32 32, auto;
26 | }
27 |
28 | body:active {
29 | cursor: url('images/cursor-active.png') 32 32, auto;
30 | cursor: -webkit-image-set(
31 | url('images/cursor-active.png') 1x,
32 | url('images/cursor-active@2x.png') 2x
33 | ) 32 32, auto;
34 | }
35 |
36 | .framerAlertBackground {
37 | position: absolute; top:0px; left:0px; right:0px; bottom:0px;
38 | z-index: 1000;
39 | background-color: #fff;
40 | }
41 |
42 | .framerAlert {
43 | font:400 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
44 | -webkit-font-smoothing:antialiased;
45 | color:#616367; text-align:center;
46 | position: absolute; top:40%; left:50%; width:260px; margin-left:-130px;
47 | }
48 | .framerAlert strong { font-weight:500; color:#000; margin-bottom:8px; display:block; }
49 | .framerAlert a { color:#28AFFA; }
50 | .framerAlert .btn {
51 | font-weight:500; text-decoration:none; line-height:1;
52 | display:inline-block; padding:6px 12px 7px 12px;
53 | border-radius:3px; margin-top:12px;
54 | background:#28AFFA; color:#fff;
55 | }
56 |
57 | ::-webkit-scrollbar {
58 | display: none;
59 | }
--------------------------------------------------------------------------------
/exampleProject.framer/framer/version:
--------------------------------------------------------------------------------
1 | 4
--------------------------------------------------------------------------------
/exampleProject.framer/images/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/images/.gitkeep
--------------------------------------------------------------------------------
/exampleProject.framer/images/framer-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/images/framer-icon.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awt2542/Find-for-Framer/c0d61c96c66cbe5f2323f8fa8ed0d06879726ef3/exampleProject.framer/imported/selectProject@2x/images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/layers.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "children": [
4 | {
5 | "children": [],
6 | "id": "A19A2F61-C96C-450C-A108-0C88FE5E588C",
7 | "image": {
8 | "frame": {
9 | "height": 56,
10 | "width": 37,
11 | "x": 270,
12 | "y": 43
13 | },
14 | "path": "images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png"
15 | },
16 | "imageType": "png",
17 | "kind": "group",
18 | "layerFrame": {
19 | "height": 56,
20 | "width": 37,
21 | "x": 270,
22 | "y": 43
23 | },
24 | "maskFrame": null,
25 | "metadata": {
26 | "opacity": 1
27 | },
28 | "name": "happycoffee",
29 | "visible": true
30 | },
31 | {
32 | "children": [],
33 | "id": "80FDAC81-749B-475F-89A9-FCB6AA001136",
34 | "image": {
35 | "frame": {
36 | "height": 42,
37 | "width": 50,
38 | "x": 158,
39 | "y": 53
40 | },
41 | "path": "images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png"
42 | },
43 | "imageType": "png",
44 | "kind": "group",
45 | "layerFrame": {
46 | "height": 42,
47 | "width": 50,
48 | "x": 158,
49 | "y": 53
50 | },
51 | "maskFrame": null,
52 | "metadata": {
53 | "opacity": 1
54 | },
55 | "name": "happyburger",
56 | "visible": true
57 | },
58 | {
59 | "children": [],
60 | "id": "94CFC973-C6FC-426A-9D9D-0085F22F030F",
61 | "image": {
62 | "frame": {
63 | "height": 56,
64 | "width": 32,
65 | "x": 66,
66 | "y": 43
67 | },
68 | "path": "images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png"
69 | },
70 | "imageType": "png",
71 | "kind": "group",
72 | "layerFrame": {
73 | "height": 56,
74 | "width": 32,
75 | "x": 66,
76 | "y": 43
77 | },
78 | "maskFrame": null,
79 | "metadata": {
80 | "opacity": 1
81 | },
82 | "name": "happyicecream",
83 | "visible": true
84 | },
85 | {
86 | "children": [
87 | {
88 | "children": [],
89 | "id": "05A9C8A7-B00E-4E4C-82F6-5AB46176D349",
90 | "image": {
91 | "frame": {
92 | "height": 56,
93 | "width": 37,
94 | "x": 68,
95 | "y": 163
96 | },
97 | "path": "images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png"
98 | },
99 | "imageType": "png",
100 | "kind": "group",
101 | "layerFrame": {
102 | "height": 56,
103 | "width": 37,
104 | "x": 68,
105 | "y": 163
106 | },
107 | "maskFrame": null,
108 | "metadata": {
109 | "opacity": 1
110 | },
111 | "name": "happycoffee",
112 | "visible": true
113 | },
114 | {
115 | "children": [],
116 | "id": "3EF1F00B-CF38-48BE-8B46-6D9939829878",
117 | "image": {
118 | "frame": {
119 | "height": 63,
120 | "width": 28,
121 | "x": 174,
122 | "y": 156
123 | },
124 | "path": "images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png"
125 | },
126 | "imageType": "png",
127 | "kind": "group",
128 | "layerFrame": {
129 | "height": 63,
130 | "width": 28,
131 | "x": 174,
132 | "y": 156
133 | },
134 | "maskFrame": null,
135 | "metadata": {
136 | "opacity": 1
137 | },
138 | "name": "happymilk",
139 | "visible": true
140 | },
141 | {
142 | "children": [],
143 | "id": "F78F8FEA-309B-4FCA-8407-2D9F8F30826E",
144 | "image": {
145 | "frame": {
146 | "height": 47,
147 | "width": 55,
148 | "x": 262,
149 | "y": 166
150 | },
151 | "path": "images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png"
152 | },
153 | "imageType": "png",
154 | "kind": "group",
155 | "layerFrame": {
156 | "height": 47,
157 | "width": 55,
158 | "x": 262,
159 | "y": 166
160 | },
161 | "maskFrame": null,
162 | "metadata": {
163 | "opacity": 1
164 | },
165 | "name": "happymug",
166 | "visible": true
167 | }
168 | ],
169 | "id": "02B0BAAC-7C31-4300-8F78-6201A50D1F42",
170 | "image": {
171 | "frame": {
172 | "height": 122,
173 | "width": 357,
174 | "x": 9,
175 | "y": 131
176 | },
177 | "path": "images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png"
178 | },
179 | "imageType": "png",
180 | "kind": "group",
181 | "layerFrame": {
182 | "height": 122,
183 | "width": 357,
184 | "x": 9,
185 | "y": 131
186 | },
187 | "maskFrame": null,
188 | "metadata": {
189 | "opacity": 1
190 | },
191 | "name": "item3",
192 | "visible": true
193 | },
194 | {
195 | "children": [
196 | {
197 | "children": [],
198 | "id": "FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35",
199 | "image": {
200 | "frame": {
201 | "height": 48,
202 | "width": 40,
203 | "x": 168,
204 | "y": 296
205 | },
206 | "path": "images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png"
207 | },
208 | "imageType": "png",
209 | "kind": "group",
210 | "layerFrame": {
211 | "height": 48,
212 | "width": 40,
213 | "x": 168,
214 | "y": 296
215 | },
216 | "maskFrame": null,
217 | "metadata": {
218 | "opacity": 1
219 | },
220 | "name": "happyfries",
221 | "visible": true
222 | },
223 | {
224 | "children": [],
225 | "id": "07C78E36-FFF0-495B-BE6E-4CB3DB2FA189",
226 | "image": {
227 | "frame": {
228 | "height": 43,
229 | "width": 50,
230 | "x": 65,
231 | "y": 299
232 | },
233 | "path": "images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png"
234 | },
235 | "imageType": "png",
236 | "kind": "group",
237 | "layerFrame": {
238 | "height": 43,
239 | "width": 50,
240 | "x": 65,
241 | "y": 299
242 | },
243 | "maskFrame": null,
244 | "metadata": {
245 | "opacity": 1
246 | },
247 | "name": "happyburger",
248 | "visible": true
249 | },
250 | {
251 | "children": [],
252 | "id": "D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA",
253 | "image": {
254 | "frame": {
255 | "height": 56,
256 | "width": 32,
257 | "x": 271,
258 | "y": 293
259 | },
260 | "path": "images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png"
261 | },
262 | "imageType": "png",
263 | "kind": "group",
264 | "layerFrame": {
265 | "height": 56,
266 | "width": 32,
267 | "x": 271,
268 | "y": 293
269 | },
270 | "maskFrame": null,
271 | "metadata": {
272 | "opacity": 1
273 | },
274 | "name": "happyicecream",
275 | "visible": true
276 | }
277 | ],
278 | "id": "1E6A5866-5C21-49D5-88F4-68E864D2689C",
279 | "image": {
280 | "frame": {
281 | "height": 122,
282 | "width": 357,
283 | "x": 9,
284 | "y": 263
285 | },
286 | "path": "images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png"
287 | },
288 | "imageType": "png",
289 | "kind": "group",
290 | "layerFrame": {
291 | "height": 122,
292 | "width": 357,
293 | "x": 9,
294 | "y": 263
295 | },
296 | "maskFrame": null,
297 | "metadata": {
298 | "opacity": 1
299 | },
300 | "name": "item2",
301 | "visible": true
302 | },
303 | {
304 | "children": [
305 | {
306 | "children": [
307 | {
308 | "children": [],
309 | "id": "4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB",
310 | "image": {
311 | "frame": {
312 | "height": 63,
313 | "width": 28,
314 | "x": 267,
315 | "y": 539
316 | },
317 | "path": "images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png"
318 | },
319 | "imageType": "png",
320 | "kind": "group",
321 | "layerFrame": {
322 | "height": 63,
323 | "width": 28,
324 | "x": 267,
325 | "y": 539
326 | },
327 | "maskFrame": null,
328 | "metadata": {
329 | "opacity": 1
330 | },
331 | "name": "happymilk",
332 | "visible": true
333 | },
334 | {
335 | "children": [],
336 | "id": "67334EAE-EA81-492F-A727-293C07D4E6A7",
337 | "image": {
338 | "frame": {
339 | "height": 44,
340 | "width": 44,
341 | "x": 65,
342 | "y": 552
343 | },
344 | "path": "images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png"
345 | },
346 | "imageType": "png",
347 | "kind": "group",
348 | "layerFrame": {
349 | "height": 44,
350 | "width": 44,
351 | "x": 65,
352 | "y": 552
353 | },
354 | "maskFrame": null,
355 | "metadata": {
356 | "opacity": 1
357 | },
358 | "name": "happysandwich",
359 | "visible": true
360 | },
361 | {
362 | "children": [],
363 | "id": "2B2372F1-E21F-4809-914F-B4B78B198B11",
364 | "image": {
365 | "frame": {
366 | "height": 58,
367 | "width": 50,
368 | "x": 164,
369 | "y": 541
370 | },
371 | "path": "images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png"
372 | },
373 | "imageType": "png",
374 | "kind": "group",
375 | "layerFrame": {
376 | "height": 58,
377 | "width": 50,
378 | "x": 164,
379 | "y": 541
380 | },
381 | "maskFrame": null,
382 | "metadata": {
383 | "opacity": 1
384 | },
385 | "name": "happyapple",
386 | "visible": true
387 | }
388 | ],
389 | "id": "59788ED5-6AAD-4BF8-99CD-74923A396321",
390 | "image": {
391 | "frame": {
392 | "height": 130,
393 | "width": 343,
394 | "x": 16,
395 | "y": 510
396 | },
397 | "path": "images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png"
398 | },
399 | "imageType": "png",
400 | "kind": "group",
401 | "layerFrame": {
402 | "height": 130,
403 | "width": 343,
404 | "x": 16,
405 | "y": 510
406 | },
407 | "maskFrame": null,
408 | "metadata": {
409 | "opacity": 1
410 | },
411 | "name": "item4",
412 | "visible": true
413 | },
414 | {
415 | "children": [],
416 | "id": "CAC6F52A-777C-45AA-B254-A6BD8C33B11B",
417 | "image": {
418 | "frame": {
419 | "height": 52,
420 | "width": 41,
421 | "x": 265,
422 | "y": 431
423 | },
424 | "path": "images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png"
425 | },
426 | "imageType": "png",
427 | "kind": "group",
428 | "layerFrame": {
429 | "height": 52,
430 | "width": 41,
431 | "x": 265,
432 | "y": 431
433 | },
434 | "maskFrame": null,
435 | "metadata": {
436 | "opacity": 1
437 | },
438 | "name": "happycupcake",
439 | "visible": true
440 | },
441 | {
442 | "children": [],
443 | "id": "50EA6D01-C530-4F9A-9298-7DB41F262E36",
444 | "image": {
445 | "frame": {
446 | "height": 56,
447 | "width": 32,
448 | "x": 172,
449 | "y": 431
450 | },
451 | "path": "images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png"
452 | },
453 | "imageType": "png",
454 | "kind": "group",
455 | "layerFrame": {
456 | "height": 56,
457 | "width": 32,
458 | "x": 172,
459 | "y": 431
460 | },
461 | "maskFrame": null,
462 | "metadata": {
463 | "opacity": 1
464 | },
465 | "name": "happyicecream",
466 | "visible": true
467 | },
468 | {
469 | "children": [],
470 | "id": "87E667EC-851F-408A-9BD1-9010CDE71FE5",
471 | "image": {
472 | "frame": {
473 | "height": 49,
474 | "width": 49,
475 | "x": 69,
476 | "y": 434
477 | },
478 | "path": "images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png"
479 | },
480 | "imageType": "png",
481 | "kind": "group",
482 | "layerFrame": {
483 | "height": 49,
484 | "width": 49,
485 | "x": 69,
486 | "y": 434
487 | },
488 | "maskFrame": null,
489 | "metadata": {
490 | "opacity": 1
491 | },
492 | "name": "happybagel",
493 | "visible": true
494 | }
495 | ],
496 | "id": "E77C2A77-05F9-4B59-BAF9-5354463AD0D2",
497 | "image": {
498 | "frame": {
499 | "height": 257,
500 | "width": 357,
501 | "x": 9,
502 | "y": 395
503 | },
504 | "path": "images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png"
505 | },
506 | "imageType": "png",
507 | "kind": "group",
508 | "layerFrame": {
509 | "height": 257,
510 | "width": 357,
511 | "x": 9,
512 | "y": 395
513 | },
514 | "maskFrame": null,
515 | "metadata": {
516 | "opacity": 1
517 | },
518 | "name": "item1",
519 | "visible": true
520 | },
521 | {
522 | "children": [],
523 | "id": "7A180F6D-122F-412E-B265-ECA0DE7072B9",
524 | "image": {
525 | "frame": {
526 | "height": 667,
527 | "width": 375,
528 | "x": 0,
529 | "y": 0
530 | },
531 | "path": "images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png"
532 | },
533 | "imageType": "png",
534 | "kind": "group",
535 | "layerFrame": {
536 | "height": 667,
537 | "width": 375,
538 | "x": 0,
539 | "y": 0
540 | },
541 | "maskFrame": null,
542 | "metadata": {
543 | "opacity": 1
544 | },
545 | "name": "bg",
546 | "visible": true
547 | }
548 | ],
549 | "id": "35043E3D-BE74-4A7A-B2D3-C92E3A8F0995",
550 | "imageType": "png",
551 | "kind": "artboard",
552 | "layerFrame": {
553 | "height": 667,
554 | "width": 375,
555 | "x": 464,
556 | "y": -17
557 | },
558 | "maskFrame": null,
559 | "metadata": {},
560 | "name": "artboard",
561 | "visible": true
562 | }
563 | ]
--------------------------------------------------------------------------------
/exampleProject.framer/imported/selectProject@2x/layers.json.js:
--------------------------------------------------------------------------------
1 |
2 | window.__imported__ = window.__imported__ || {};
3 | window.__imported__["selectProject/layers.json.js"] = [
4 | {
5 | "children": [
6 | {
7 | "children": [],
8 | "id": "A19A2F61-C96C-450C-A108-0C88FE5E588C",
9 | "image": {
10 | "frame": {
11 | "height": 56,
12 | "width": 37,
13 | "x": 270,
14 | "y": 43
15 | },
16 | "path": "images/Layer-happy_coffee-A19A2F61-C96C-450C-A108-0C88FE5E588C.png"
17 | },
18 | "imageType": "png",
19 | "kind": "group",
20 | "layerFrame": {
21 | "height": 56,
22 | "width": 37,
23 | "x": 270,
24 | "y": 43
25 | },
26 | "maskFrame": null,
27 | "metadata": {
28 | "opacity": 1
29 | },
30 | "name": "happycoffee",
31 | "visible": true
32 | },
33 | {
34 | "children": [],
35 | "id": "80FDAC81-749B-475F-89A9-FCB6AA001136",
36 | "image": {
37 | "frame": {
38 | "height": 42,
39 | "width": 50,
40 | "x": 158,
41 | "y": 53
42 | },
43 | "path": "images/Layer-happy_burger-80FDAC81-749B-475F-89A9-FCB6AA001136.png"
44 | },
45 | "imageType": "png",
46 | "kind": "group",
47 | "layerFrame": {
48 | "height": 42,
49 | "width": 50,
50 | "x": 158,
51 | "y": 53
52 | },
53 | "maskFrame": null,
54 | "metadata": {
55 | "opacity": 1
56 | },
57 | "name": "happyburger",
58 | "visible": true
59 | },
60 | {
61 | "children": [],
62 | "id": "94CFC973-C6FC-426A-9D9D-0085F22F030F",
63 | "image": {
64 | "frame": {
65 | "height": 56,
66 | "width": 32,
67 | "x": 66,
68 | "y": 43
69 | },
70 | "path": "images/Layer-happy_icecream-94CFC973-C6FC-426A-9D9D-0085F22F030F.png"
71 | },
72 | "imageType": "png",
73 | "kind": "group",
74 | "layerFrame": {
75 | "height": 56,
76 | "width": 32,
77 | "x": 66,
78 | "y": 43
79 | },
80 | "maskFrame": null,
81 | "metadata": {
82 | "opacity": 1
83 | },
84 | "name": "happyicecream",
85 | "visible": true
86 | },
87 | {
88 | "children": [
89 | {
90 | "children": [],
91 | "id": "05A9C8A7-B00E-4E4C-82F6-5AB46176D349",
92 | "image": {
93 | "frame": {
94 | "height": 56,
95 | "width": 37,
96 | "x": 68,
97 | "y": 163
98 | },
99 | "path": "images/Layer-happy_coffee-05A9C8A7-B00E-4E4C-82F6-5AB46176D349.png"
100 | },
101 | "imageType": "png",
102 | "kind": "group",
103 | "layerFrame": {
104 | "height": 56,
105 | "width": 37,
106 | "x": 68,
107 | "y": 163
108 | },
109 | "maskFrame": null,
110 | "metadata": {
111 | "opacity": 1
112 | },
113 | "name": "happycoffee",
114 | "visible": true
115 | },
116 | {
117 | "children": [],
118 | "id": "3EF1F00B-CF38-48BE-8B46-6D9939829878",
119 | "image": {
120 | "frame": {
121 | "height": 63,
122 | "width": 28,
123 | "x": 174,
124 | "y": 156
125 | },
126 | "path": "images/Layer-happy_milk-3EF1F00B-CF38-48BE-8B46-6D9939829878.png"
127 | },
128 | "imageType": "png",
129 | "kind": "group",
130 | "layerFrame": {
131 | "height": 63,
132 | "width": 28,
133 | "x": 174,
134 | "y": 156
135 | },
136 | "maskFrame": null,
137 | "metadata": {
138 | "opacity": 1
139 | },
140 | "name": "happymilk",
141 | "visible": true
142 | },
143 | {
144 | "children": [],
145 | "id": "F78F8FEA-309B-4FCA-8407-2D9F8F30826E",
146 | "image": {
147 | "frame": {
148 | "height": 47,
149 | "width": 55,
150 | "x": 262,
151 | "y": 166
152 | },
153 | "path": "images/Layer-happy_mug-F78F8FEA-309B-4FCA-8407-2D9F8F30826E.png"
154 | },
155 | "imageType": "png",
156 | "kind": "group",
157 | "layerFrame": {
158 | "height": 47,
159 | "width": 55,
160 | "x": 262,
161 | "y": 166
162 | },
163 | "maskFrame": null,
164 | "metadata": {
165 | "opacity": 1
166 | },
167 | "name": "happymug",
168 | "visible": true
169 | }
170 | ],
171 | "id": "02B0BAAC-7C31-4300-8F78-6201A50D1F42",
172 | "image": {
173 | "frame": {
174 | "height": 122,
175 | "width": 357,
176 | "x": 9,
177 | "y": 131
178 | },
179 | "path": "images/Layer-item3-02B0BAAC-7C31-4300-8F78-6201A50D1F42.png"
180 | },
181 | "imageType": "png",
182 | "kind": "group",
183 | "layerFrame": {
184 | "height": 122,
185 | "width": 357,
186 | "x": 9,
187 | "y": 131
188 | },
189 | "maskFrame": null,
190 | "metadata": {
191 | "opacity": 1
192 | },
193 | "name": "item3",
194 | "visible": true
195 | },
196 | {
197 | "children": [
198 | {
199 | "children": [],
200 | "id": "FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35",
201 | "image": {
202 | "frame": {
203 | "height": 48,
204 | "width": 40,
205 | "x": 168,
206 | "y": 296
207 | },
208 | "path": "images/Layer-happy_fries-FF92BF7B-F4B9-4534-A6B5-41AFAF9E8E35.png"
209 | },
210 | "imageType": "png",
211 | "kind": "group",
212 | "layerFrame": {
213 | "height": 48,
214 | "width": 40,
215 | "x": 168,
216 | "y": 296
217 | },
218 | "maskFrame": null,
219 | "metadata": {
220 | "opacity": 1
221 | },
222 | "name": "happyfries",
223 | "visible": true
224 | },
225 | {
226 | "children": [],
227 | "id": "07C78E36-FFF0-495B-BE6E-4CB3DB2FA189",
228 | "image": {
229 | "frame": {
230 | "height": 43,
231 | "width": 50,
232 | "x": 65,
233 | "y": 299
234 | },
235 | "path": "images/Layer-happy_burger-07C78E36-FFF0-495B-BE6E-4CB3DB2FA189.png"
236 | },
237 | "imageType": "png",
238 | "kind": "group",
239 | "layerFrame": {
240 | "height": 43,
241 | "width": 50,
242 | "x": 65,
243 | "y": 299
244 | },
245 | "maskFrame": null,
246 | "metadata": {
247 | "opacity": 1
248 | },
249 | "name": "happyburger",
250 | "visible": true
251 | },
252 | {
253 | "children": [],
254 | "id": "D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA",
255 | "image": {
256 | "frame": {
257 | "height": 56,
258 | "width": 32,
259 | "x": 271,
260 | "y": 293
261 | },
262 | "path": "images/Layer-happy_icecream-D2D32169-5A88-4BAE-AC59-A09A4B2CDBDA.png"
263 | },
264 | "imageType": "png",
265 | "kind": "group",
266 | "layerFrame": {
267 | "height": 56,
268 | "width": 32,
269 | "x": 271,
270 | "y": 293
271 | },
272 | "maskFrame": null,
273 | "metadata": {
274 | "opacity": 1
275 | },
276 | "name": "happyicecream",
277 | "visible": true
278 | }
279 | ],
280 | "id": "1E6A5866-5C21-49D5-88F4-68E864D2689C",
281 | "image": {
282 | "frame": {
283 | "height": 122,
284 | "width": 357,
285 | "x": 9,
286 | "y": 263
287 | },
288 | "path": "images/Layer-item2-1E6A5866-5C21-49D5-88F4-68E864D2689C.png"
289 | },
290 | "imageType": "png",
291 | "kind": "group",
292 | "layerFrame": {
293 | "height": 122,
294 | "width": 357,
295 | "x": 9,
296 | "y": 263
297 | },
298 | "maskFrame": null,
299 | "metadata": {
300 | "opacity": 1
301 | },
302 | "name": "item2",
303 | "visible": true
304 | },
305 | {
306 | "children": [
307 | {
308 | "children": [
309 | {
310 | "children": [],
311 | "id": "4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB",
312 | "image": {
313 | "frame": {
314 | "height": 63,
315 | "width": 28,
316 | "x": 267,
317 | "y": 539
318 | },
319 | "path": "images/Layer-happy_milk-4A65CBB0-4EE8-4804-B4EC-C7BEE868D8BB.png"
320 | },
321 | "imageType": "png",
322 | "kind": "group",
323 | "layerFrame": {
324 | "height": 63,
325 | "width": 28,
326 | "x": 267,
327 | "y": 539
328 | },
329 | "maskFrame": null,
330 | "metadata": {
331 | "opacity": 1
332 | },
333 | "name": "happymilk",
334 | "visible": true
335 | },
336 | {
337 | "children": [],
338 | "id": "67334EAE-EA81-492F-A727-293C07D4E6A7",
339 | "image": {
340 | "frame": {
341 | "height": 44,
342 | "width": 44,
343 | "x": 65,
344 | "y": 552
345 | },
346 | "path": "images/Layer-happy_sandwich-67334EAE-EA81-492F-A727-293C07D4E6A7.png"
347 | },
348 | "imageType": "png",
349 | "kind": "group",
350 | "layerFrame": {
351 | "height": 44,
352 | "width": 44,
353 | "x": 65,
354 | "y": 552
355 | },
356 | "maskFrame": null,
357 | "metadata": {
358 | "opacity": 1
359 | },
360 | "name": "happysandwich",
361 | "visible": true
362 | },
363 | {
364 | "children": [],
365 | "id": "2B2372F1-E21F-4809-914F-B4B78B198B11",
366 | "image": {
367 | "frame": {
368 | "height": 58,
369 | "width": 50,
370 | "x": 164,
371 | "y": 541
372 | },
373 | "path": "images/Layer-happy_apple-2B2372F1-E21F-4809-914F-B4B78B198B11.png"
374 | },
375 | "imageType": "png",
376 | "kind": "group",
377 | "layerFrame": {
378 | "height": 58,
379 | "width": 50,
380 | "x": 164,
381 | "y": 541
382 | },
383 | "maskFrame": null,
384 | "metadata": {
385 | "opacity": 1
386 | },
387 | "name": "happyapple",
388 | "visible": true
389 | }
390 | ],
391 | "id": "59788ED5-6AAD-4BF8-99CD-74923A396321",
392 | "image": {
393 | "frame": {
394 | "height": 130,
395 | "width": 343,
396 | "x": 16,
397 | "y": 510
398 | },
399 | "path": "images/Layer-item4-59788ED5-6AAD-4BF8-99CD-74923A396321.png"
400 | },
401 | "imageType": "png",
402 | "kind": "group",
403 | "layerFrame": {
404 | "height": 130,
405 | "width": 343,
406 | "x": 16,
407 | "y": 510
408 | },
409 | "maskFrame": null,
410 | "metadata": {
411 | "opacity": 1
412 | },
413 | "name": "item4",
414 | "visible": true
415 | },
416 | {
417 | "children": [],
418 | "id": "CAC6F52A-777C-45AA-B254-A6BD8C33B11B",
419 | "image": {
420 | "frame": {
421 | "height": 52,
422 | "width": 41,
423 | "x": 265,
424 | "y": 431
425 | },
426 | "path": "images/Layer-happy_cupcake-CAC6F52A-777C-45AA-B254-A6BD8C33B11B.png"
427 | },
428 | "imageType": "png",
429 | "kind": "group",
430 | "layerFrame": {
431 | "height": 52,
432 | "width": 41,
433 | "x": 265,
434 | "y": 431
435 | },
436 | "maskFrame": null,
437 | "metadata": {
438 | "opacity": 1
439 | },
440 | "name": "happycupcake",
441 | "visible": true
442 | },
443 | {
444 | "children": [],
445 | "id": "50EA6D01-C530-4F9A-9298-7DB41F262E36",
446 | "image": {
447 | "frame": {
448 | "height": 56,
449 | "width": 32,
450 | "x": 172,
451 | "y": 431
452 | },
453 | "path": "images/Layer-happy_icecream-50EA6D01-C530-4F9A-9298-7DB41F262E36.png"
454 | },
455 | "imageType": "png",
456 | "kind": "group",
457 | "layerFrame": {
458 | "height": 56,
459 | "width": 32,
460 | "x": 172,
461 | "y": 431
462 | },
463 | "maskFrame": null,
464 | "metadata": {
465 | "opacity": 1
466 | },
467 | "name": "happyicecream",
468 | "visible": true
469 | },
470 | {
471 | "children": [],
472 | "id": "87E667EC-851F-408A-9BD1-9010CDE71FE5",
473 | "image": {
474 | "frame": {
475 | "height": 49,
476 | "width": 49,
477 | "x": 69,
478 | "y": 434
479 | },
480 | "path": "images/Layer-happy_bagel-87E667EC-851F-408A-9BD1-9010CDE71FE5.png"
481 | },
482 | "imageType": "png",
483 | "kind": "group",
484 | "layerFrame": {
485 | "height": 49,
486 | "width": 49,
487 | "x": 69,
488 | "y": 434
489 | },
490 | "maskFrame": null,
491 | "metadata": {
492 | "opacity": 1
493 | },
494 | "name": "happybagel",
495 | "visible": true
496 | }
497 | ],
498 | "id": "E77C2A77-05F9-4B59-BAF9-5354463AD0D2",
499 | "image": {
500 | "frame": {
501 | "height": 257,
502 | "width": 357,
503 | "x": 9,
504 | "y": 395
505 | },
506 | "path": "images/Layer-item1-E77C2A77-05F9-4B59-BAF9-5354463AD0D2.png"
507 | },
508 | "imageType": "png",
509 | "kind": "group",
510 | "layerFrame": {
511 | "height": 257,
512 | "width": 357,
513 | "x": 9,
514 | "y": 395
515 | },
516 | "maskFrame": null,
517 | "metadata": {
518 | "opacity": 1
519 | },
520 | "name": "item1",
521 | "visible": true
522 | },
523 | {
524 | "children": [],
525 | "id": "7A180F6D-122F-412E-B265-ECA0DE7072B9",
526 | "image": {
527 | "frame": {
528 | "height": 667,
529 | "width": 375,
530 | "x": 0,
531 | "y": 0
532 | },
533 | "path": "images/Layer-bg-7A180F6D-122F-412E-B265-ECA0DE7072B9.png"
534 | },
535 | "imageType": "png",
536 | "kind": "group",
537 | "layerFrame": {
538 | "height": 667,
539 | "width": 375,
540 | "x": 0,
541 | "y": 0
542 | },
543 | "maskFrame": null,
544 | "metadata": {
545 | "opacity": 1
546 | },
547 | "name": "bg",
548 | "visible": true
549 | }
550 | ],
551 | "id": "35043E3D-BE74-4A7A-B2D3-C92E3A8F0995",
552 | "imageType": "png",
553 | "kind": "artboard",
554 | "layerFrame": {
555 | "height": 667,
556 | "width": 375,
557 | "x": 464,
558 | "y": -17
559 | },
560 | "maskFrame": null,
561 | "metadata": {},
562 | "name": "artboard",
563 | "visible": true
564 | }
565 | ]
566 |
--------------------------------------------------------------------------------
/exampleProject.framer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/exampleProject.framer/modules/findModule.coffee:
--------------------------------------------------------------------------------
1 | _getHierarchy = (layer) ->
2 | string = ''
3 | for a in layer.ancestors()
4 | string = a.name+'>'+string
5 | return string = string+layer.name
6 |
7 | _match = (hierarchy, string) ->
8 | # prepare regex tokens
9 | string = string.replace(/\s*>\s*/g,'>') # clean up spaces around arrows
10 | string = string.split('*').join('[^>]*') # asteriks as layer name wildcard
11 | string = string.split(' ').join('(?:.*)>') # space as structure wildcard
12 | string = string.split(',').join('$|') # allow multiple searches using comma
13 | regexString = "(^|>)"+string+"$" # always bottom layer, maybe part of hierarchy
14 |
15 | regExp = new RegExp(regexString)
16 | return hierarchy.match(regExp)
17 |
18 | _findAll = (selector, fromLayer) ->
19 | layers = Framer.CurrentContext._layers
20 |
21 | if selector?
22 | stringNeedsRegex = _.find ['*',' ','>',','], (c) -> _.includes selector,c
23 | unless stringNeedsRegex or fromLayer
24 | layers = _.filter layers, (layer) ->
25 | if layer.name is selector then true
26 | else
27 | layers = _.filter layers, (layer) ->
28 | hierarchy = _getHierarchy(layer)
29 | if fromLayer?
30 | _match(hierarchy, fromLayer.name+' '+selector)
31 | else
32 | _match(hierarchy, selector)
33 | else
34 | layers
35 |
36 |
37 | # Global
38 | exports.Find = (selector, fromLayer) -> _findAll(selector, fromLayer)[0]
39 | exports.ƒ = (selector, fromLayer) -> _findAll(selector, fromLayer)[0]
40 |
41 | exports.FindAll = (selector, fromLayer) -> _findAll(selector, fromLayer)
42 | exports.ƒƒ = (selector, fromLayer) -> _findAll(selector, fromLayer)
43 |
44 | # Methods
45 | Layer::find = (selector, fromLayer) -> _findAll(selector, @)[0]
46 | Layer::ƒ = (selector, fromLayer) -> _findAll(selector, @)[0]
47 |
48 | Layer::findAll = (selector, fromLayer) -> _findAll(selector, @)
49 | Layer::ƒƒ = (selector, fromLayer) -> _findAll(selector, @)
50 |
--------------------------------------------------------------------------------
/exampleProject.framer/modules/tests.coffee:
--------------------------------------------------------------------------------
1 | # TESTS
2 | {ƒ,ƒƒ} = require 'findModule'
3 | # Example layers
4 | card = new Layer name: 'card'
5 | close_btn = new Layer name: 'close_btn', superLayer: card
6 | container = new Layer name: 'container', superLayer: card
7 | publish_btn = new Layer name: 'publish_Btn', superLayer: container
8 | cancel_btn = new Layer name: 'cancel_btn', superLayer: container
9 | image = new Layer name: 'image', superLayer: container
10 | remove_image_btn = new Layer name: 'remove_image_btn', superLayer: image
11 |
12 | # Hierarchies for regex testing
13 | # card
14 | # card>close_btn
15 | # card>container
16 | # card>container>publish_Btn
17 | # card>container>cancel_btn
18 | # card>container>image
19 | # card>container>image>remove_image_btn
20 |
21 | assert = (obj) ->
22 | if _.isEqual(obj.result, obj.expected) is false
23 | print "TEST FAILED: #{obj.description}"
24 |
25 | exports.runTests = ->
26 |
27 | assert
28 | description: 'get all layers'
29 | result: ƒƒ()
30 | expected: [card, close_btn, container, publish_btn, cancel_btn, image, remove_image_btn]
31 |
32 | assert
33 | description: 'multiple searches using comma'
34 | result: ƒƒ('card, image >*btn')
35 | expected: [card, remove_image_btn]
36 |
37 | assert
38 | description: 'get all layers directly under card'
39 | result: ƒƒ('card > *')
40 | expected: [close_btn, container]
41 |
42 | assert
43 | description: 'get all layers below card'
44 | result: ƒƒ('container *')
45 | expected: [publish_btn, cancel_btn, image, remove_image_btn]
46 |
47 | assert
48 | description: 'end of string without wildcard'
49 | result: ƒƒ('mage')
50 | expected: []
51 |
52 | assert
53 | description: 'end of string without wildcard and descendant'
54 | result: ƒƒ('image btn')
55 | expected: []
56 |
57 | assert
58 | description: 'direct parent'
59 | result: ƒƒ('card>container')
60 | expected: [container]
61 |
62 | assert
63 | description: 'direct parent + wildcard'
64 | result: ƒƒ('container>*btn')
65 | expected: [cancel_btn]
66 |
67 | assert
68 | description: 'from layer'
69 | result: container.ƒƒ('image')
70 | expected: [image]
71 |
72 | assert
73 | description: 'single item'
74 | result: ƒƒ('card')
75 | expected: [card]
76 |
77 | assert
78 | description: 'long distance'
79 | result: ƒƒ('card image')
80 | expected: [image]
81 |
82 | assert
83 | description: 'descendant layers with wildcard'
84 | result: ƒƒ('card container *btn')
85 | expected: [cancel_btn,remove_image_btn]
86 |
87 | assert
88 | description: 'containing'
89 | result: ƒƒ('*image*')
90 | expected: [image,remove_image_btn]
--------------------------------------------------------------------------------
/findModule.coffee:
--------------------------------------------------------------------------------
1 | _getHierarchy = (layer) ->
2 | string = ''
3 | for a in layer.ancestors()
4 | string = a.name+'>'+string
5 | return string = string+layer.name
6 |
7 | _match = (hierarchy, string) ->
8 | # prepare regex tokens
9 | string = string.replace(/\s*>\s*/g,'>') # clean up spaces around arrows
10 | string = string.split('*').join('[^>]*') # asteriks as layer name wildcard
11 | string = string.split(' ').join('(?:.*)>') # space as structure wildcard
12 | string = string.split(',').join('$|') # allow multiple searches using comma
13 | regexString = "(^|>)"+string+"$" # always bottom layer, maybe part of hierarchy
14 |
15 | regExp = new RegExp(regexString)
16 | return hierarchy.match(regExp)
17 |
18 | _findAll = (selector, fromLayer) ->
19 | layers = Framer.CurrentContext._layers
20 |
21 | if selector?
22 | stringNeedsRegex = _.find ['*',' ','>',','], (c) -> _.includes selector,c
23 | unless stringNeedsRegex or fromLayer
24 | layers = _.filter layers, (layer) ->
25 | if layer.name is selector then true
26 | else
27 | layers = _.filter layers, (layer) ->
28 | hierarchy = _getHierarchy(layer)
29 | if fromLayer?
30 | _match(hierarchy, fromLayer.name+' '+selector)
31 | else
32 | _match(hierarchy, selector)
33 | else
34 | layers
35 |
36 |
37 | # Global
38 | exports.Find = (selector, fromLayer) -> _findAll(selector, fromLayer)[0]
39 | exports.ƒ = (selector, fromLayer) -> _findAll(selector, fromLayer)[0]
40 |
41 | exports.FindAll = (selector, fromLayer) -> _findAll(selector, fromLayer)
42 | exports.ƒƒ = (selector, fromLayer) -> _findAll(selector, fromLayer)
43 |
44 | # Methods
45 | Layer::find = (selector, fromLayer) -> _findAll(selector, @)[0]
46 | Layer::ƒ = (selector, fromLayer) -> _findAll(selector, @)[0]
47 |
48 | Layer::findAll = (selector, fromLayer) -> _findAll(selector, @)
49 | Layer::ƒƒ = (selector, fromLayer) -> _findAll(selector, @)
--------------------------------------------------------------------------------