@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,206 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "stripes",
4
+ "description": "A tonal band of tapering stripes down one side, a disc riding its edge (with an optional icon), and the title on the open side (the claude.com/resources look).",
5
+ "params": {
6
+ "side": "right"
7
+ },
8
+ "vars": {
9
+ "spotY": {
10
+ "add": [
11
+ {
12
+ "if": "title",
13
+ "then": 0.36,
14
+ "else": 0.5
15
+ },
16
+ {
17
+ "range": [
18
+ -0.06,
19
+ 0.06
20
+ ]
21
+ }
22
+ ]
23
+ },
24
+ "steps": {
25
+ "int": [
26
+ 5,
27
+ 8
28
+ ]
29
+ },
30
+ "taper": {
31
+ "range": [
32
+ 0.72,
33
+ 0.86
34
+ ]
35
+ },
36
+ "ramp": {
37
+ "ramp": [
38
+ "@accent",
39
+ "@bg",
40
+ "$steps",
41
+ 0.88
42
+ ]
43
+ },
44
+ "weights": {
45
+ "taper": [
46
+ "$taper",
47
+ "$steps"
48
+ ]
49
+ },
50
+ "edge": {
51
+ "if": {
52
+ "side": "right"
53
+ },
54
+ "then": {
55
+ "sub": [
56
+ 1,
57
+ 0.46
58
+ ]
59
+ },
60
+ "else": 0.46
61
+ },
62
+ "spot": {
63
+ "mul": [
64
+ {
65
+ "min": [
66
+ "@width",
67
+ "@height"
68
+ ]
69
+ },
70
+ 0.34
71
+ ]
72
+ }
73
+ },
74
+ "layers": [
75
+ {
76
+ "id": "bg",
77
+ "type": "solid"
78
+ },
79
+ {
80
+ "id": "stripes",
81
+ "type": "stripes",
82
+ "direction": "vertical",
83
+ "region": {
84
+ "if": {
85
+ "side": "right"
86
+ },
87
+ "then": {
88
+ "x": "$edge",
89
+ "y": 0,
90
+ "width": 0.46,
91
+ "height": 1
92
+ },
93
+ "else": {
94
+ "x": 0,
95
+ "y": 0,
96
+ "width": 0.46,
97
+ "height": 1
98
+ }
99
+ },
100
+ "widths": {
101
+ "if": {
102
+ "side": "right"
103
+ },
104
+ "then": {
105
+ "reverse": "$weights"
106
+ },
107
+ "else": "$weights"
108
+ },
109
+ "colors": {
110
+ "if": {
111
+ "side": "right"
112
+ },
113
+ "then": {
114
+ "reverse": "$ramp"
115
+ },
116
+ "else": "$ramp"
117
+ }
118
+ },
119
+ {
120
+ "id": "spot",
121
+ "type": "shapes",
122
+ "items": [
123
+ {
124
+ "kind": "circle",
125
+ "x": "$edge",
126
+ "y": "$spotY",
127
+ "size": "$spot",
128
+ "color": "@text"
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "id": "icon",
134
+ "type": "icon",
135
+ "when": "icon",
136
+ "name": "{icon}",
137
+ "size": {
138
+ "mul": [
139
+ "$spot",
140
+ 0.4
141
+ ]
142
+ },
143
+ "position": {
144
+ "x": "$edge",
145
+ "y": "$spotY"
146
+ },
147
+ "color": "@bg"
148
+ },
149
+ {
150
+ "id": "grain",
151
+ "type": "grain",
152
+ "amount": 0.06
153
+ },
154
+ {
155
+ "id": "title",
156
+ "type": "text",
157
+ "when": "title",
158
+ "content": "{title}",
159
+ "anchor": {
160
+ "if": {
161
+ "side": "right"
162
+ },
163
+ "then": "bottom-left",
164
+ "else": "bottom-right"
165
+ },
166
+ "weight": 500,
167
+ "size": {
168
+ "mul": [
169
+ "@u",
170
+ 0.058
171
+ ]
172
+ },
173
+ "minSize": {
174
+ "mul": [
175
+ "@u",
176
+ 0.044
177
+ ]
178
+ },
179
+ "lineHeight": 1.08,
180
+ "letterSpacing": -0.025,
181
+ "maxLines": 4,
182
+ "label": "{label}",
183
+ "maxWidth": {
184
+ "sub": [
185
+ {
186
+ "mul": [
187
+ "@width",
188
+ {
189
+ "sub": [
190
+ 1,
191
+ 0.46
192
+ ]
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "mul": [
198
+ "@u",
199
+ 0.12
200
+ ]
201
+ }
202
+ ]
203
+ }
204
+ }
205
+ ]
206
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "$schema": "../schema/recipe.schema.json",
3
+ "name": "waveform",
4
+ "description": "An episode's waveform (peaks you pass, or audio decoded at build) as bars, mirrored bars, a line or dots, on a flat or toned field, with an optional duration and label. Without peaks or audio it draws seeded demo peaks.",
5
+ "params": {
6
+ "peaks": null,
7
+ "audio": null,
8
+ "duration": null,
9
+ "style": null,
10
+ "field": "flat"
11
+ },
12
+ "vars": {
13
+ "field": {
14
+ "if": {
15
+ "field": "toned"
16
+ },
17
+ "then": {
18
+ "tone": [
19
+ "@accent",
20
+ {
21
+ "if": {
22
+ "mode": "dark"
23
+ },
24
+ "then": {
25
+ "l": [
26
+ 0.3,
27
+ 0.4
28
+ ],
29
+ "c": [
30
+ 0.06,
31
+ 0.12
32
+ ]
33
+ },
34
+ "else": {
35
+ "l": [
36
+ 0.88,
37
+ 0.94
38
+ ],
39
+ "c": [
40
+ 0.03,
41
+ 0.06
42
+ ]
43
+ }
44
+ }
45
+ ]
46
+ },
47
+ "else": "@bg"
48
+ },
49
+ "wave": {
50
+ "readable": [
51
+ "$field",
52
+ 3,
53
+ "@accent"
54
+ ]
55
+ },
56
+ "type": {
57
+ "readable": [
58
+ "$field",
59
+ 4.5,
60
+ "@text"
61
+ ]
62
+ }
63
+ },
64
+ "layers": [
65
+ {
66
+ "id": "bg",
67
+ "type": "solid",
68
+ "color": "$field"
69
+ },
70
+ {
71
+ "id": "wave",
72
+ "type": "waveform",
73
+ "peaks": "{peaks}",
74
+ "audio": "{audio}",
75
+ "style": {
76
+ "if": "style",
77
+ "then": "{style}",
78
+ "else": {
79
+ "pick": [
80
+ "mirrored",
81
+ "bars",
82
+ "line",
83
+ "dots",
84
+ "mirrored"
85
+ ]
86
+ }
87
+ },
88
+ "color": "$wave",
89
+ "duration": "{duration}",
90
+ "caption": {
91
+ "if": {
92
+ "any": [
93
+ "duration",
94
+ "audio"
95
+ ]
96
+ },
97
+ "then": true,
98
+ "else": null
99
+ },
100
+ "captionColor": "$type",
101
+ "region": {
102
+ "if": "title",
103
+ "then": {
104
+ "x": 0.07,
105
+ "y": 0.42,
106
+ "width": 0.86,
107
+ "height": 0.3
108
+ },
109
+ "else": {
110
+ "x": 0.07,
111
+ "y": 0.3,
112
+ "width": 0.86,
113
+ "height": 0.4
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "id": "grain",
119
+ "type": "grain",
120
+ "amount": 0.04
121
+ },
122
+ {
123
+ "id": "title",
124
+ "type": "text",
125
+ "when": "title",
126
+ "content": "{title}",
127
+ "anchor": "top-left",
128
+ "weight": 500,
129
+ "size": {
130
+ "mul": [
131
+ "@u",
132
+ 0.062
133
+ ]
134
+ },
135
+ "minSize": {
136
+ "mul": [
137
+ "@u",
138
+ 0.046
139
+ ]
140
+ },
141
+ "lineHeight": 1.08,
142
+ "letterSpacing": -0.025,
143
+ "maxLines": 3,
144
+ "label": {
145
+ "if": "label",
146
+ "then": {
147
+ "color": "$type",
148
+ "content": "{label}"
149
+ }
150
+ },
151
+ "color": "$type"
152
+ }
153
+ ]
154
+ }