@ideare/kit 0.0.0-stage → 0.1.0-next.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 (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -2
  3. package/THIRD_PARTY.md +52 -0
  4. package/dist/brand/schema.d.ts +265 -0
  5. package/dist/brand/schema.js +271 -0
  6. package/dist/check/copy.d.ts +27 -0
  7. package/dist/check/copy.js +139 -0
  8. package/dist/check/index.d.ts +54 -0
  9. package/dist/check/index.js +492 -0
  10. package/dist/color/contrast.d.ts +41 -0
  11. package/dist/color/contrast.js +84 -0
  12. package/dist/color/palette.d.ts +27 -0
  13. package/dist/color/palette.js +114 -0
  14. package/dist/color/wcag.d.ts +22 -0
  15. package/dist/color/wcag.js +50 -0
  16. package/dist/draft/draft.d.ts +61 -0
  17. package/dist/draft/draft.js +383 -0
  18. package/dist/editor/history.d.ts +78 -0
  19. package/dist/editor/history.js +221 -0
  20. package/dist/editor/operations.d.ts +112 -0
  21. package/dist/editor/operations.js +621 -0
  22. package/dist/files/docs.d.ts +49 -0
  23. package/dist/files/docs.js +392 -0
  24. package/dist/files/generate.d.ts +47 -0
  25. package/dist/files/generate.js +254 -0
  26. package/dist/files/png.d.ts +40 -0
  27. package/dist/files/png.js +168 -0
  28. package/dist/files/raster.d.ts +14 -0
  29. package/dist/files/raster.js +0 -0
  30. package/dist/files/templates.d.ts +162 -0
  31. package/dist/files/templates.js +390 -0
  32. package/dist/files/tokens.d.ts +22 -0
  33. package/dist/files/tokens.js +204 -0
  34. package/dist/fonts/catalog.d.ts +3 -0
  35. package/dist/fonts/catalog.js +345 -0
  36. package/dist/fonts/ofl.d.ts +5 -0
  37. package/dist/fonts/ofl.js +5 -0
  38. package/dist/fonts/pick.d.ts +33 -0
  39. package/dist/fonts/pick.js +73 -0
  40. package/dist/imports/folder.d.ts +80 -0
  41. package/dist/imports/folder.js +124 -0
  42. package/dist/imports/unzip.d.ts +32 -0
  43. package/dist/imports/unzip.js +128 -0
  44. package/dist/index.d.ts +59 -0
  45. package/dist/index.js +34 -0
  46. package/dist/marks/draw.d.ts +48 -0
  47. package/dist/marks/draw.js +149 -0
  48. package/dist/marks/icons.data.d.ts +5 -0
  49. package/dist/marks/icons.data.js +600 -0
  50. package/dist/marks/svg.d.ts +46 -0
  51. package/dist/marks/svg.js +341 -0
  52. package/dist/node/index.d.ts +13 -0
  53. package/dist/node/index.js +41 -0
  54. package/dist/posts/pix.d.ts +19 -0
  55. package/dist/posts/pix.js +49 -0
  56. package/dist/posts/templates.d.ts +45 -0
  57. package/dist/posts/templates.js +868 -0
  58. package/dist/resvg/index.d.ts +2 -0
  59. package/dist/resvg/index.js +22 -0
  60. package/dist/scene/brand-art.d.ts +49 -0
  61. package/dist/scene/brand-art.js +154 -0
  62. package/dist/scene/frame.d.ts +89 -0
  63. package/dist/scene/frame.js +213 -0
  64. package/dist/scene/grain.d.ts +7 -0
  65. package/dist/scene/grain.js +7 -0
  66. package/dist/scene/qr.d.ts +10 -0
  67. package/dist/scene/qr.js +359 -0
  68. package/dist/scene/render.d.ts +76 -0
  69. package/dist/scene/render.js +557 -0
  70. package/dist/scene/schema.d.ts +271 -0
  71. package/dist/scene/schema.js +257 -0
  72. package/dist/sign.d.ts +47 -0
  73. package/dist/sign.js +88 -0
  74. package/dist/text/engine.d.ts +128 -0
  75. package/dist/text/engine.js +245 -0
  76. package/dist/text/fonts.d.ts +56 -0
  77. package/dist/text/fonts.js +65 -0
  78. package/dist/version.d.ts +2 -0
  79. package/dist/version.js +2 -0
  80. package/dist/wasm/index.d.ts +15 -0
  81. package/dist/wasm/index.js +46 -0
  82. package/package.json +78 -5
  83. package/schema/brand.v1.json +442 -0
@@ -0,0 +1,442 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "$schema": {
6
+ "default": "https://ideare.app/schema/brand.v1.json",
7
+ "type": "string",
8
+ "const": "https://ideare.app/schema/brand.v1.json"
9
+ },
10
+ "schemaVersion": { "type": "number", "const": 1 },
11
+ "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" },
12
+ "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 },
13
+ "name": { "type": "string", "minLength": 1, "maxLength": 60 },
14
+ "shortName": { "type": "string", "minLength": 1, "maxLength": 12 },
15
+ "domain": { "type": "string", "pattern": "^(?:[a-z0-9-]+\\.)+[a-z]{2,}$" },
16
+ "locales": {
17
+ "minItems": 1,
18
+ "type": "array",
19
+ "items": { "type": "string", "enum": ["pt-BR", "en", "es"] }
20
+ },
21
+ "defaultLocale": { "type": "string", "enum": ["pt-BR", "en", "es"] },
22
+ "copy": {
23
+ "type": "object",
24
+ "propertyNames": { "type": "string", "enum": ["pt-BR", "en", "es"] },
25
+ "additionalProperties": {
26
+ "type": "object",
27
+ "properties": {
28
+ "tagline": { "type": "string", "minLength": 1, "maxLength": 80 },
29
+ "description": { "type": "string", "minLength": 1, "maxLength": 300 },
30
+ "card": {
31
+ "type": "object",
32
+ "properties": {
33
+ "title": { "type": "string", "minLength": 1, "maxLength": 70 },
34
+ "subtitle": { "type": "string", "maxLength": 140 }
35
+ },
36
+ "required": ["title"]
37
+ }
38
+ },
39
+ "required": ["tagline", "description", "card"]
40
+ }
41
+ },
42
+ "voice": {
43
+ "default": { "tone": [] },
44
+ "type": "object",
45
+ "properties": {
46
+ "tone": {
47
+ "maxItems": 8,
48
+ "type": "array",
49
+ "items": { "type": "string", "minLength": 1, "maxLength": 40 }
50
+ },
51
+ "notes": { "type": "string", "maxLength": 2000 },
52
+ "notesPublic": { "default": false, "type": "boolean" },
53
+ "neverSay": {
54
+ "default": [],
55
+ "maxItems": 60,
56
+ "type": "array",
57
+ "items": { "type": "string", "minLength": 1, "maxLength": 60 }
58
+ },
59
+ "examples": {
60
+ "default": [],
61
+ "maxItems": 20,
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "properties": {
66
+ "context": { "type": "string", "minLength": 1, "maxLength": 60 },
67
+ "text": { "type": "string", "minLength": 1, "maxLength": 400 }
68
+ },
69
+ "required": ["context", "text"]
70
+ }
71
+ }
72
+ },
73
+ "required": ["tone"]
74
+ },
75
+ "mark": {
76
+ "type": "object",
77
+ "properties": {
78
+ "svg": { "type": "string", "maxLength": 65536 },
79
+ "small": { "type": "string", "maxLength": 65536 },
80
+ "dark": { "type": "string", "maxLength": 65536 },
81
+ "lockups": {
82
+ "type": "object",
83
+ "properties": {
84
+ "horizontal": { "type": "string", "maxLength": 65536 },
85
+ "stacked": { "type": "string", "maxLength": 65536 },
86
+ "wordmark": { "type": "string", "maxLength": 65536 }
87
+ }
88
+ },
89
+ "tile": {
90
+ "default": {},
91
+ "type": "object",
92
+ "properties": {
93
+ "fill": {
94
+ "default": "primary",
95
+ "type": "string",
96
+ "enum": [
97
+ "ground",
98
+ "surface",
99
+ "ink",
100
+ "muted",
101
+ "line",
102
+ "primary",
103
+ "onPrimary",
104
+ "accent",
105
+ "onAccent",
106
+ "focus",
107
+ "danger",
108
+ "success",
109
+ "warning"
110
+ ]
111
+ },
112
+ "shape": {
113
+ "default": "rounded",
114
+ "type": "string",
115
+ "enum": ["square", "rounded", "circle"]
116
+ },
117
+ "radius": {
118
+ "default": 0.22,
119
+ "type": "number",
120
+ "minimum": 0,
121
+ "maximum": 0.5
122
+ },
123
+ "padding": {
124
+ "default": 0.18,
125
+ "type": "number",
126
+ "minimum": 0,
127
+ "maximum": 0.4
128
+ }
129
+ }
130
+ },
131
+ "source": {
132
+ "type": "object",
133
+ "properties": {
134
+ "kind": { "type": "string", "enum": ["monogram", "icon", "ai", "upload"] },
135
+ "ref": { "type": "string", "maxLength": 80 }
136
+ },
137
+ "required": ["kind"]
138
+ }
139
+ },
140
+ "required": ["svg"]
141
+ },
142
+ "wordmark": {
143
+ "type": "object",
144
+ "properties": {
145
+ "text": { "type": "string", "minLength": 1, "maxLength": 40 },
146
+ "font": { "default": "display", "type": "string", "enum": ["display", "text"] },
147
+ "weight": { "default": 700, "type": "integer", "minimum": 100, "maximum": 900 },
148
+ "tracking": { "default": 0, "type": "number", "minimum": -0.2, "maximum": 0.5 }
149
+ },
150
+ "required": ["text"]
151
+ },
152
+ "colors": {
153
+ "type": "object",
154
+ "properties": {
155
+ "light": {
156
+ "type": "object",
157
+ "properties": {
158
+ "ground": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
159
+ "surface": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
160
+ "ink": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
161
+ "muted": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
162
+ "line": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
163
+ "primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
164
+ "onPrimary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
165
+ "accent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
166
+ "onAccent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
167
+ "focus": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
168
+ "danger": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
169
+ "success": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
170
+ "warning": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
171
+ },
172
+ "required": [
173
+ "ground",
174
+ "surface",
175
+ "ink",
176
+ "muted",
177
+ "line",
178
+ "primary",
179
+ "onPrimary",
180
+ "accent",
181
+ "onAccent",
182
+ "focus",
183
+ "danger",
184
+ "success",
185
+ "warning"
186
+ ]
187
+ },
188
+ "dark": {
189
+ "type": "object",
190
+ "properties": {
191
+ "ground": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
192
+ "surface": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
193
+ "ink": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
194
+ "muted": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
195
+ "line": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
196
+ "primary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
197
+ "onPrimary": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
198
+ "accent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
199
+ "onAccent": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
200
+ "focus": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
201
+ "danger": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
202
+ "success": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
203
+ "warning": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
204
+ },
205
+ "required": [
206
+ "ground",
207
+ "surface",
208
+ "ink",
209
+ "muted",
210
+ "line",
211
+ "primary",
212
+ "onPrimary",
213
+ "accent",
214
+ "onAccent",
215
+ "focus",
216
+ "danger",
217
+ "success",
218
+ "warning"
219
+ ]
220
+ }
221
+ },
222
+ "required": ["light", "dark"]
223
+ },
224
+ "paints": {
225
+ "type": "object",
226
+ "propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,31}$" },
227
+ "additionalProperties": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }
228
+ },
229
+ "fonts": {
230
+ "type": "object",
231
+ "properties": {
232
+ "display": {
233
+ "type": "object",
234
+ "properties": {
235
+ "family": {
236
+ "type": "string",
237
+ "minLength": 1,
238
+ "maxLength": 80,
239
+ "pattern": "^[\\p{L}\\p{N} .'&-]+$"
240
+ },
241
+ "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
242
+ "weights": {
243
+ "minItems": 1,
244
+ "maxItems": 9,
245
+ "type": "array",
246
+ "items": { "type": "integer", "minimum": 100, "maximum": 900 }
247
+ },
248
+ "license": { "type": "string", "enum": ["OFL-1.1", "Apache-2.0"] },
249
+ "files": {
250
+ "default": {},
251
+ "type": "object",
252
+ "propertyNames": { "type": "string", "pattern": "^[1-9]00$" },
253
+ "additionalProperties": {
254
+ "type": "string",
255
+ "pattern": "^[0-9a-f]{64}$"
256
+ }
257
+ }
258
+ },
259
+ "required": ["family", "id", "weights", "license"]
260
+ },
261
+ "text": {
262
+ "type": "object",
263
+ "properties": {
264
+ "family": {
265
+ "type": "string",
266
+ "minLength": 1,
267
+ "maxLength": 80,
268
+ "pattern": "^[\\p{L}\\p{N} .'&-]+$"
269
+ },
270
+ "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
271
+ "weights": {
272
+ "minItems": 1,
273
+ "maxItems": 9,
274
+ "type": "array",
275
+ "items": { "type": "integer", "minimum": 100, "maximum": 900 }
276
+ },
277
+ "license": { "type": "string", "enum": ["OFL-1.1", "Apache-2.0"] },
278
+ "files": {
279
+ "default": {},
280
+ "type": "object",
281
+ "propertyNames": { "type": "string", "pattern": "^[1-9]00$" },
282
+ "additionalProperties": {
283
+ "type": "string",
284
+ "pattern": "^[0-9a-f]{64}$"
285
+ }
286
+ }
287
+ },
288
+ "required": ["family", "id", "weights", "license"]
289
+ }
290
+ },
291
+ "required": ["display", "text"]
292
+ },
293
+ "radii": {
294
+ "default": {},
295
+ "type": "object",
296
+ "properties": {
297
+ "control": { "default": 10, "type": "number", "minimum": 0, "maximum": 64 },
298
+ "card": { "default": 16, "type": "number", "minimum": 0, "maximum": 64 }
299
+ }
300
+ },
301
+ "art": {
302
+ "default": {},
303
+ "type": "object",
304
+ "properties": {
305
+ "prompt": { "default": "", "type": "string", "maxLength": 2000 },
306
+ "references": {
307
+ "default": [],
308
+ "maxItems": 10,
309
+ "type": "array",
310
+ "items": {
311
+ "type": "object",
312
+ "properties": {
313
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
314
+ "mime": {
315
+ "type": "string",
316
+ "enum": ["image/png", "image/jpeg", "image/webp"]
317
+ },
318
+ "width": {
319
+ "type": "integer",
320
+ "exclusiveMinimum": 0,
321
+ "maximum": 9007199254740991
322
+ },
323
+ "height": {
324
+ "type": "integer",
325
+ "exclusiveMinimum": 0,
326
+ "maximum": 9007199254740991
327
+ }
328
+ },
329
+ "required": ["sha256", "mime", "width", "height"]
330
+ }
331
+ },
332
+ "referencesPublic": { "default": false, "type": "boolean" },
333
+ "avoid": {
334
+ "default": [],
335
+ "maxItems": 30,
336
+ "type": "array",
337
+ "items": { "type": "string", "minLength": 1, "maxLength": 80 }
338
+ }
339
+ }
340
+ },
341
+ "links": {
342
+ "default": {},
343
+ "type": "object",
344
+ "properties": {
345
+ "site": {
346
+ "type": "object",
347
+ "properties": {
348
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
349
+ "public": { "default": false, "type": "boolean" }
350
+ },
351
+ "required": ["value"]
352
+ },
353
+ "instagram": {
354
+ "type": "object",
355
+ "properties": {
356
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
357
+ "public": { "default": false, "type": "boolean" }
358
+ },
359
+ "required": ["value"]
360
+ },
361
+ "facebook": {
362
+ "type": "object",
363
+ "properties": {
364
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
365
+ "public": { "default": false, "type": "boolean" }
366
+ },
367
+ "required": ["value"]
368
+ },
369
+ "x": {
370
+ "type": "object",
371
+ "properties": {
372
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
373
+ "public": { "default": false, "type": "boolean" }
374
+ },
375
+ "required": ["value"]
376
+ },
377
+ "linkedin": {
378
+ "type": "object",
379
+ "properties": {
380
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
381
+ "public": { "default": false, "type": "boolean" }
382
+ },
383
+ "required": ["value"]
384
+ },
385
+ "youtube": {
386
+ "type": "object",
387
+ "properties": {
388
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
389
+ "public": { "default": false, "type": "boolean" }
390
+ },
391
+ "required": ["value"]
392
+ },
393
+ "tiktok": {
394
+ "type": "object",
395
+ "properties": {
396
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
397
+ "public": { "default": false, "type": "boolean" }
398
+ },
399
+ "required": ["value"]
400
+ },
401
+ "whatsapp": {
402
+ "type": "object",
403
+ "properties": {
404
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
405
+ "public": { "default": false, "type": "boolean" }
406
+ },
407
+ "required": ["value"]
408
+ },
409
+ "email": {
410
+ "type": "object",
411
+ "properties": {
412
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
413
+ "public": { "default": false, "type": "boolean" }
414
+ },
415
+ "required": ["value"]
416
+ },
417
+ "phone": {
418
+ "type": "object",
419
+ "properties": {
420
+ "value": { "type": "string", "minLength": 1, "maxLength": 300 },
421
+ "public": { "default": false, "type": "boolean" }
422
+ },
423
+ "required": ["value"]
424
+ }
425
+ }
426
+ }
427
+ },
428
+ "required": [
429
+ "schemaVersion",
430
+ "name",
431
+ "shortName",
432
+ "locales",
433
+ "defaultLocale",
434
+ "copy",
435
+ "mark",
436
+ "wordmark",
437
+ "colors",
438
+ "fonts"
439
+ ],
440
+ "$id": "https://ideare.app/schema/brand.v1.json",
441
+ "title": "ideare brand.json v1"
442
+ }