@arraypress/covers 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/LICENSE +29 -0
  3. package/README.md +561 -2
  4. package/fonts/OFL.txt +93 -0
  5. package/fonts/inter-latin-400.woff +0 -0
  6. package/fonts/inter-latin-500.woff +0 -0
  7. package/fonts/inter-latin-600.woff +0 -0
  8. package/fonts/inter-latin-700.woff +0 -0
  9. package/package.json +96 -4
  10. package/recipes/aurora.json +132 -0
  11. package/recipes/bauhaus.json +113 -0
  12. package/recipes/bigType.json +103 -0
  13. package/recipes/contour.json +109 -0
  14. package/recipes/cutout.json +191 -0
  15. package/recipes/diagram.json +92 -0
  16. package/recipes/dither.json +170 -0
  17. package/recipes/duotone.json +75 -0
  18. package/recipes/gridTitle.json +136 -0
  19. package/recipes/iconTile.json +214 -0
  20. package/recipes/issue.json +221 -0
  21. package/recipes/mark.json +170 -0
  22. package/recipes/photo.json +156 -0
  23. package/recipes/riso.json +387 -0
  24. package/recipes/stripes.json +206 -0
  25. package/recipes/waveform.json +154 -0
  26. package/schema/recipe.schema.json +2292 -0
  27. package/src/astro.d.ts +31 -0
  28. package/src/astro.js +86 -0
  29. package/src/color.js +246 -0
  30. package/src/diagram.js +248 -0
  31. package/src/extract.js +90 -0
  32. package/src/flatten.js +234 -0
  33. package/src/fonts.js +200 -0
  34. package/src/geometry.js +187 -0
  35. package/src/grid.js +41 -0
  36. package/src/handmade.js +253 -0
  37. package/src/icons.js +157 -0
  38. package/src/index.d.ts +897 -0
  39. package/src/index.js +19 -0
  40. package/src/json-recipe.js +458 -0
  41. package/src/layer-options.js +37 -0
  42. package/src/layers.js +972 -0
  43. package/src/palette.js +185 -0
  44. package/src/png.js +77 -0
  45. package/src/print.js +658 -0
  46. package/src/recipes.js +78 -0
  47. package/src/render.js +462 -0
  48. package/src/rng.js +95 -0
  49. package/src/svg.js +69 -0
  50. package/src/text.js +230 -0
@@ -0,0 +1,156 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "photo",
4
+ "description": "A palette taken from a photo, laid out as full-bleed sweeps like aurora (the photo itself not shown), or `show: 'blur'` for the photo heavily blurred.",
5
+ "params": {
6
+ "show": null
7
+ },
8
+ "requires": [
9
+ "image"
10
+ ],
11
+ "vars": {
12
+ "src": {
13
+ "if": "image",
14
+ "then": "{image}",
15
+ "else": null
16
+ }
17
+ },
18
+ "layers": [
19
+ {
20
+ "id": "bg",
21
+ "type": "solid"
22
+ },
23
+ {
24
+ "id": "mesh",
25
+ "type": "mesh",
26
+ "when": {
27
+ "not": {
28
+ "show": "blur"
29
+ }
30
+ },
31
+ "from": "$src",
32
+ "count": 4,
33
+ "blur": "11vmax",
34
+ "size": [
35
+ 0.45,
36
+ 0.8
37
+ ],
38
+ "streak": 1.8,
39
+ "hues": 3,
40
+ "tone": {
41
+ "if": "title",
42
+ "then": {
43
+ "if": {
44
+ "mode": "dark"
45
+ },
46
+ "then": {
47
+ "l": [
48
+ 0.34,
49
+ 0.5
50
+ ],
51
+ "c": [
52
+ 0.08,
53
+ 0.2
54
+ ]
55
+ },
56
+ "else": {
57
+ "l": [
58
+ 0.66,
59
+ 0.82
60
+ ],
61
+ "c": [
62
+ 0.08,
63
+ 0.18
64
+ ]
65
+ }
66
+ },
67
+ "else": {
68
+ "l": [
69
+ 0.5,
70
+ 0.85
71
+ ],
72
+ "c": [
73
+ 0.08,
74
+ 0.2
75
+ ]
76
+ }
77
+ },
78
+ "fold": {
79
+ "if": "title",
80
+ "then": false,
81
+ "else": {
82
+ "pick": [
83
+ false,
84
+ false,
85
+ true
86
+ ]
87
+ }
88
+ }
89
+ },
90
+ {
91
+ "id": "photo",
92
+ "type": "image",
93
+ "when": {
94
+ "show": "blur"
95
+ },
96
+ "src": "$src",
97
+ "blur": "7vmax"
98
+ },
99
+ {
100
+ "id": "scrim",
101
+ "type": "solid",
102
+ "when": {
103
+ "all": [
104
+ {
105
+ "show": "blur"
106
+ },
107
+ "title"
108
+ ]
109
+ },
110
+ "color": {
111
+ "if": {
112
+ "mode": "dark"
113
+ },
114
+ "then": "#000000",
115
+ "else": "#ffffff"
116
+ },
117
+ "opacity": 0.4
118
+ },
119
+ {
120
+ "id": "grain",
121
+ "type": "grain",
122
+ "amount": 0.08
123
+ },
124
+ {
125
+ "id": "title",
126
+ "type": "text",
127
+ "when": "title",
128
+ "content": "{title}",
129
+ "anchor": "bottom-left",
130
+ "weight": 500,
131
+ "size": {
132
+ "mul": [
133
+ "@u",
134
+ 0.062
135
+ ]
136
+ },
137
+ "minSize": {
138
+ "mul": [
139
+ "@u",
140
+ 0.046
141
+ ]
142
+ },
143
+ "lineHeight": 1.08,
144
+ "letterSpacing": -0.025,
145
+ "maxLines": 3,
146
+ "label": {
147
+ "if": "label",
148
+ "then": {
149
+ "color": "@text",
150
+ "content": "{label}"
151
+ }
152
+ },
153
+ "color": "@text"
154
+ }
155
+ ]
156
+ }
@@ -0,0 +1,387 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "riso",
4
+ "description": "Two (or three) flat risograph inks overprinted on paper: big simple forms, slight misregistration, speckled or halftone texture, uneven density. Inks from the palette, or classic riso inks.",
5
+ "params": {
6
+ "inks": null,
7
+ "texture": "grain",
8
+ "third": false
9
+ },
10
+ "vars": {
11
+ "ground": {
12
+ "if": {
13
+ "mode": "dark"
14
+ },
15
+ "then": "@bg",
16
+ "else": "#f6f1e7"
17
+ },
18
+ "blend": {
19
+ "if": {
20
+ "mode": "dark"
21
+ },
22
+ "then": "screen",
23
+ "else": "multiply"
24
+ },
25
+ "inks": {
26
+ "if": "inks",
27
+ "then": "{inks}",
28
+ "else": [
29
+ {
30
+ "tone": [
31
+ "@accent",
32
+ {
33
+ "l": [
34
+ 0.5,
35
+ 0.72
36
+ ],
37
+ "c": [
38
+ 0.14,
39
+ 0.26
40
+ ]
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "tone": [
46
+ "@colors.1",
47
+ {
48
+ "l": [
49
+ 0.5,
50
+ 0.72
51
+ ],
52
+ "c": [
53
+ 0.14,
54
+ 0.26
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "tone": [
61
+ "@colors.2",
62
+ {
63
+ "l": [
64
+ 0.5,
65
+ 0.72
66
+ ],
67
+ "c": [
68
+ 0.14,
69
+ 0.26
70
+ ]
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ },
76
+ "comp": {
77
+ "if": "title",
78
+ "then": {
79
+ "pick": [
80
+ [
81
+ [
82
+ {
83
+ "kind": "circle",
84
+ "x": {
85
+ "range": [
86
+ 0.4,
87
+ 0.6
88
+ ]
89
+ },
90
+ "y": 0.32,
91
+ "r": "24vmin"
92
+ }
93
+ ],
94
+ [
95
+ {
96
+ "kind": "band",
97
+ "y": 0.42,
98
+ "height": "16vmin",
99
+ "rotate": {
100
+ "range": [
101
+ -8,
102
+ 8
103
+ ]
104
+ }
105
+ }
106
+ ]
107
+ ],
108
+ [
109
+ [
110
+ {
111
+ "kind": "arch",
112
+ "x": {
113
+ "range": [
114
+ 0.34,
115
+ 0.42
116
+ ]
117
+ },
118
+ "y": 0.34,
119
+ "width": "34vmin",
120
+ "height": "44vmin"
121
+ }
122
+ ],
123
+ [
124
+ {
125
+ "kind": "circle",
126
+ "x": {
127
+ "range": [
128
+ 0.58,
129
+ 0.66
130
+ ]
131
+ },
132
+ "y": 0.3,
133
+ "r": "16vmin"
134
+ }
135
+ ]
136
+ ],
137
+ [
138
+ [
139
+ {
140
+ "kind": "half",
141
+ "x": 0.5,
142
+ "y": 0.5,
143
+ "r": "32vmin"
144
+ }
145
+ ],
146
+ [
147
+ {
148
+ "kind": "circle",
149
+ "x": 0.5,
150
+ "y": 0.3,
151
+ "r": "14vmin"
152
+ }
153
+ ]
154
+ ]
155
+ ]
156
+ },
157
+ "else": {
158
+ "pick": [
159
+ [
160
+ [
161
+ {
162
+ "kind": "circle",
163
+ "x": {
164
+ "range": [
165
+ 0.36,
166
+ 0.5
167
+ ]
168
+ },
169
+ "y": {
170
+ "range": [
171
+ 0.38,
172
+ 0.5
173
+ ]
174
+ },
175
+ "r": "34vmin"
176
+ }
177
+ ],
178
+ [
179
+ {
180
+ "kind": "band",
181
+ "y": {
182
+ "range": [
183
+ 0.56,
184
+ 0.68
185
+ ]
186
+ },
187
+ "height": "26vmin",
188
+ "rotate": {
189
+ "range": [
190
+ -14,
191
+ 14
192
+ ]
193
+ }
194
+ }
195
+ ]
196
+ ],
197
+ [
198
+ [
199
+ {
200
+ "kind": "arch",
201
+ "x": {
202
+ "range": [
203
+ 0.32,
204
+ 0.42
205
+ ]
206
+ },
207
+ "y": 0.54,
208
+ "width": "46vmin",
209
+ "height": "66vmin"
210
+ }
211
+ ],
212
+ [
213
+ {
214
+ "kind": "circle",
215
+ "x": {
216
+ "range": [
217
+ 0.6,
218
+ 0.68
219
+ ]
220
+ },
221
+ "y": {
222
+ "range": [
223
+ 0.34,
224
+ 0.44
225
+ ]
226
+ },
227
+ "r": "22vmin"
228
+ }
229
+ ]
230
+ ],
231
+ [
232
+ [
233
+ {
234
+ "kind": "half",
235
+ "x": 0.5,
236
+ "y": {
237
+ "range": [
238
+ 0.6,
239
+ 0.7
240
+ ]
241
+ },
242
+ "r": "42vmin"
243
+ }
244
+ ],
245
+ [
246
+ {
247
+ "kind": "circle",
248
+ "x": {
249
+ "range": [
250
+ 0.42,
251
+ 0.58
252
+ ]
253
+ },
254
+ "y": {
255
+ "range": [
256
+ 0.34,
257
+ 0.42
258
+ ]
259
+ },
260
+ "r": "19vmin"
261
+ }
262
+ ]
263
+ ],
264
+ [
265
+ [
266
+ {
267
+ "kind": "ring",
268
+ "x": {
269
+ "range": [
270
+ 0.4,
271
+ 0.48
272
+ ]
273
+ },
274
+ "y": 0.48,
275
+ "r": "30vmin",
276
+ "thickness": "12vmin"
277
+ }
278
+ ],
279
+ [
280
+ {
281
+ "kind": "circle",
282
+ "x": {
283
+ "range": [
284
+ 0.56,
285
+ 0.64
286
+ ]
287
+ },
288
+ "y": {
289
+ "range": [
290
+ 0.5,
291
+ 0.58
292
+ ]
293
+ },
294
+ "r": "24vmin"
295
+ }
296
+ ]
297
+ ]
298
+ ]
299
+ }
300
+ }
301
+ },
302
+ "layers": [
303
+ {
304
+ "id": "bg",
305
+ "type": "solid",
306
+ "color": "$ground"
307
+ },
308
+ {
309
+ "id": "inkA",
310
+ "type": "ink",
311
+ "color": "$inks.0",
312
+ "shapes": "$comp.0",
313
+ "texture": "{texture}",
314
+ "blend": "$blend"
315
+ },
316
+ {
317
+ "id": "inkB",
318
+ "type": "ink",
319
+ "color": "$inks.1",
320
+ "shapes": "$comp.1",
321
+ "texture": "{texture}",
322
+ "blend": "$blend"
323
+ },
324
+ {
325
+ "id": "inkC",
326
+ "type": "ink",
327
+ "when": "third",
328
+ "color": "$inks.2",
329
+ "shapes": [
330
+ {
331
+ "kind": "circle",
332
+ "x": {
333
+ "range": [
334
+ 0.2,
335
+ 0.8
336
+ ]
337
+ },
338
+ "y": {
339
+ "range": [
340
+ 0.2,
341
+ 0.4
342
+ ]
343
+ },
344
+ "r": "7vmin"
345
+ }
346
+ ],
347
+ "texture": "{texture}",
348
+ "blend": "$blend"
349
+ },
350
+ {
351
+ "id": "grain",
352
+ "type": "grain",
353
+ "amount": 0.05
354
+ },
355
+ {
356
+ "id": "title",
357
+ "type": "text",
358
+ "when": "title",
359
+ "content": "{title}",
360
+ "anchor": "bottom-left",
361
+ "weight": 500,
362
+ "size": {
363
+ "mul": [
364
+ "@u",
365
+ 0.062
366
+ ]
367
+ },
368
+ "minSize": {
369
+ "mul": [
370
+ "@u",
371
+ 0.046
372
+ ]
373
+ },
374
+ "lineHeight": 1.08,
375
+ "letterSpacing": -0.025,
376
+ "maxLines": 3,
377
+ "label": {
378
+ "if": "label",
379
+ "then": {
380
+ "color": "@text",
381
+ "content": "{label}"
382
+ }
383
+ },
384
+ "color": "@text"
385
+ }
386
+ ]
387
+ }