sketchmark 2.0.0 → 2.1.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 (132) hide show
  1. package/ANIMATABLE_MATRIX.md +177 -0
  2. package/KERNEL_SPEC.md +412 -0
  3. package/PACKS.md +81 -0
  4. package/PRESETS.md +182 -0
  5. package/README.md +274 -188
  6. package/bin/editor-ui.cjs +2285 -0
  7. package/bin/preview-ui.cjs +74 -0
  8. package/bin/sketchmark.cjs +648 -2008
  9. package/dist/src/animatable.d.ts +21 -0
  10. package/dist/src/animatable.js +439 -0
  11. package/dist/src/builders/index.d.ts +1 -11
  12. package/dist/src/builders/index.js +1 -19
  13. package/dist/src/diagnostics.js +1 -64
  14. package/dist/src/edit.d.ts +27 -0
  15. package/dist/src/edit.js +162 -0
  16. package/dist/src/index.d.ts +4 -13
  17. package/dist/src/index.js +4 -13
  18. package/dist/src/keyframes.d.ts +48 -0
  19. package/dist/src/keyframes.js +182 -0
  20. package/dist/src/motion.d.ts +4 -0
  21. package/dist/src/motion.js +262 -0
  22. package/dist/src/normalize.js +120 -151
  23. package/dist/src/presets/characters.d.ts +15 -0
  24. package/dist/src/presets/characters.js +113 -0
  25. package/dist/src/presets/compose.d.ts +5 -0
  26. package/dist/src/presets/compose.js +80 -0
  27. package/dist/src/presets/effects.d.ts +40 -0
  28. package/dist/src/presets/effects.js +79 -0
  29. package/dist/src/presets/helpers.d.ts +33 -0
  30. package/dist/src/presets/helpers.js +165 -0
  31. package/dist/src/presets/index.d.ts +9 -0
  32. package/dist/src/presets/index.js +48 -0
  33. package/dist/src/presets/motions.d.ts +33 -0
  34. package/dist/src/presets/motions.js +75 -0
  35. package/dist/src/presets/scenes.d.ts +35 -0
  36. package/dist/src/presets/scenes.js +134 -0
  37. package/dist/src/presets/shapes.d.ts +71 -0
  38. package/dist/src/presets/shapes.js +96 -0
  39. package/dist/src/presets/transitions.d.ts +29 -0
  40. package/dist/src/presets/transitions.js +113 -0
  41. package/dist/src/presets/types.d.ts +34 -0
  42. package/dist/src/presets/types.js +2 -0
  43. package/dist/src/render/html.js +1 -4
  44. package/dist/src/render/svg.d.ts +2 -2
  45. package/dist/src/render/svg.js +86 -82
  46. package/dist/src/render/three-html.js +67 -113
  47. package/dist/src/scenes.js +1 -0
  48. package/dist/src/schema.js +218 -280
  49. package/dist/src/shapes/builtins.js +11 -47
  50. package/dist/src/shapes/common.js +12 -11
  51. package/dist/src/shapes/registry.d.ts +0 -1
  52. package/dist/src/shapes/registry.js +0 -4
  53. package/dist/src/shapes/types.d.ts +1 -3
  54. package/dist/src/types.d.ts +57 -288
  55. package/dist/src/utils.d.ts +2 -11
  56. package/dist/src/utils.js +13 -70
  57. package/dist/src/validate.js +321 -275
  58. package/dist/tests/run.js +576 -510
  59. package/examples/1730642890464.jpg +0 -0
  60. package/examples/app-screen.svg +1 -0
  61. package/examples/app-screen.visual.json +503 -0
  62. package/examples/dashboard-table.svg +1 -0
  63. package/examples/dashboard-table.visual.json +708 -0
  64. package/examples/dev-docs.svg +1 -0
  65. package/examples/dev-docs.visual.json +248 -0
  66. package/examples/explainer.mp4 +0 -0
  67. package/examples/explainer.visual.json +1713 -0
  68. package/examples/group-origin-effects-lab-check.svg +1 -0
  69. package/examples/group-origin-effects-lab.visual.json +1880 -0
  70. package/examples/image-clip-radius.visual.json +271 -0
  71. package/examples/make-app-screen.cjs +368 -0
  72. package/examples/make-dashboard-table.cjs +277 -0
  73. package/examples/make-dev-docs.cjs +233 -0
  74. package/examples/make-explainer.cjs +438 -0
  75. package/examples/make-group-origin-effects-lab.cjs +370 -0
  76. package/examples/make-image-clip-radius.cjs +169 -0
  77. package/examples/make-modal-dialog.cjs +355 -0
  78. package/examples/make-origin-effects-lab.cjs +311 -0
  79. package/examples/make-preset-character-motion.cjs +32 -0
  80. package/examples/make-presets-demo.cjs +30 -0
  81. package/examples/make-pricing.cjs +286 -0
  82. package/examples/make-product-demo.cjs +468 -0
  83. package/examples/make-product-hero.cjs +223 -0
  84. package/examples/make-release-notes.cjs +333 -0
  85. package/examples/make-settings-panel.cjs +435 -0
  86. package/examples/make-split-preview.cjs +248 -0
  87. package/examples/make-storyboard.cjs +215 -0
  88. package/examples/make-transcript.cjs +234 -0
  89. package/examples/make-typography-test.cjs +397 -0
  90. package/examples/make-ui-demo-explainer.cjs +1094 -0
  91. package/examples/make-ui-flow.cjs +762 -0
  92. package/examples/make-walkthrough.cjs +815 -0
  93. package/examples/modal-dialog.svg +1 -0
  94. package/examples/modal-dialog.visual.json +239 -0
  95. package/examples/origin-effects-lab-check.svg +1 -0
  96. package/examples/origin-effects-lab.visual.json +1412 -0
  97. package/examples/preset-character-motion.visual.json +949 -0
  98. package/examples/presets-demo.visual.json +787 -0
  99. package/examples/pricing.svg +1 -0
  100. package/examples/pricing.visual.json +652 -0
  101. package/examples/product-demo.mp4 +0 -0
  102. package/examples/product-demo.visual.json +866 -0
  103. package/examples/product-hero.svg +1 -0
  104. package/examples/product-hero.visual.json +242 -0
  105. package/examples/release-notes.svg +1 -0
  106. package/examples/release-notes.visual.json +467 -0
  107. package/examples/settings-panel.svg +1 -0
  108. package/examples/settings-panel.visual.json +501 -0
  109. package/examples/split-preview.svg +1 -0
  110. package/examples/split-preview.visual.json +124 -0
  111. package/examples/storyboard.svg +1 -0
  112. package/examples/storyboard.visual.json +312 -0
  113. package/examples/transcript.svg +1 -0
  114. package/examples/transcript.visual.json +407 -0
  115. package/examples/typography-indent-check.svg +1 -0
  116. package/examples/typography-lineheight-0.svg +1 -0
  117. package/examples/typography-lineheight-2.svg +1 -0
  118. package/examples/typography-test-check.svg +1 -0
  119. package/examples/typography-test.svg +1 -0
  120. package/examples/typography-test.visual.json +757 -0
  121. package/examples/ui-demo-explainer-billing.svg +1 -0
  122. package/examples/ui-demo-explainer-check.svg +1 -0
  123. package/examples/ui-demo-explainer-save.svg +1 -0
  124. package/examples/ui-demo-explainer-toggle.svg +1 -0
  125. package/examples/ui-demo-explainer.mp4 +0 -0
  126. package/examples/ui-demo-explainer.visual.json +2597 -0
  127. package/examples/ui-flow.mp4 +0 -0
  128. package/examples/ui-flow.visual.json +1211 -0
  129. package/examples/walkthrough.mp4 +0 -0
  130. package/examples/walkthrough.visual.json +1372 -0
  131. package/package.json +52 -52
  132. package/schema/visual.schema.json +1086 -930
@@ -0,0 +1,333 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const width = 1080;
5
+ const height = 1380;
6
+ const bg = "#ffffff";
7
+ const font = "Inter, system-ui, sans-serif";
8
+
9
+ const colors = {
10
+ title: "#0f172a",
11
+ date: "#94a3b8",
12
+ heading: "#1e293b",
13
+ subheading: "#334155",
14
+ body: "#475569",
15
+ bullet: "#2563eb",
16
+ divider: "#e2e8f0",
17
+ pillBg: "#10b981",
18
+ pillText: "#ffffff"
19
+ };
20
+
21
+ const padX = 72;
22
+ const contentW = width - padX * 2;
23
+ let y = 56;
24
+
25
+ const elements = [];
26
+
27
+ // Large title
28
+ elements.push({
29
+ id: "title",
30
+ type: "text",
31
+ x: padX,
32
+ y: y,
33
+ text: "Release Notes",
34
+ align: "left",
35
+ valign: "top",
36
+ fontSize: 44,
37
+ fontFamily: font,
38
+ weight: 800,
39
+ fill: colors.title
40
+ });
41
+ y += 60;
42
+
43
+ // Version + date line
44
+ elements.push({
45
+ id: "version",
46
+ type: "text",
47
+ x: padX,
48
+ y: y,
49
+ text: "v2.4.0",
50
+ align: "left",
51
+ valign: "top",
52
+ fontSize: 18,
53
+ fontFamily: font,
54
+ weight: 600,
55
+ fill: colors.heading
56
+ });
57
+
58
+ elements.push({
59
+ id: "date",
60
+ type: "text",
61
+ x: padX + 72,
62
+ y: y + 2,
63
+ text: "— May 27, 2026",
64
+ align: "left",
65
+ valign: "top",
66
+ fontSize: 15,
67
+ fontFamily: font,
68
+ weight: 400,
69
+ fill: colors.date
70
+ });
71
+ y += 36;
72
+
73
+ // Divider
74
+ elements.push({
75
+ id: "divider-top",
76
+ type: "path",
77
+ d: `M ${padX} ${y} L ${width - padX} ${y}`,
78
+ stroke: colors.divider,
79
+ strokeWidth: 1,
80
+ fill: "none"
81
+ });
82
+ y += 40;
83
+
84
+ // --- Section 1: New Features ---
85
+ elements.push({
86
+ id: "s1-heading",
87
+ type: "text",
88
+ x: padX,
89
+ y: y,
90
+ text: "New Features",
91
+ align: "left",
92
+ valign: "top",
93
+ fontSize: 24,
94
+ fontFamily: font,
95
+ weight: 700,
96
+ fill: colors.heading
97
+ });
98
+
99
+ // "New" pill badge next to heading
100
+ const pillW = 52;
101
+ const pillH = 22;
102
+ const pillX = padX + 168;
103
+ const pillY = y + 3;
104
+ const pillR = 11;
105
+ elements.push({
106
+ id: "new-pill-bg",
107
+ type: "path",
108
+ d: roundedRect(pillX, pillY, pillW, pillH, pillR),
109
+ fill: colors.pillBg,
110
+ stroke: "none"
111
+ });
112
+ elements.push({
113
+ id: "new-pill-text",
114
+ type: "text",
115
+ x: pillX + pillW / 2,
116
+ y: pillY + pillH / 2,
117
+ text: "New",
118
+ align: "center",
119
+ valign: "middle",
120
+ fontSize: 11,
121
+ fontFamily: font,
122
+ weight: 700,
123
+ fill: colors.pillText
124
+ });
125
+ y += 42;
126
+
127
+ // Subsection 1a
128
+ elements.push({
129
+ id: "s1a-sub",
130
+ type: "text",
131
+ x: padX,
132
+ y: y,
133
+ text: "Real-time Collaboration",
134
+ align: "left",
135
+ valign: "top",
136
+ fontSize: 16,
137
+ fontFamily: font,
138
+ weight: 600,
139
+ fill: colors.subheading
140
+ });
141
+ y += 28;
142
+
143
+ const s1aBullets = [
144
+ "Multiple users can now edit the same document simultaneously\nwith live cursor presence and conflict-free merging.",
145
+ "Inline comments and threads are synced in real time across\nall connected sessions without page reload.",
146
+ "Permission scopes support viewer, commenter, and editor\nroles with granular per-section access control."
147
+ ];
148
+ y = renderBullets(s1aBullets, "s1a", y);
149
+ y += 16;
150
+
151
+ // Subsection 1b
152
+ elements.push({
153
+ id: "s1b-sub",
154
+ type: "text",
155
+ x: padX,
156
+ y: y,
157
+ text: "Export Pipeline",
158
+ align: "left",
159
+ valign: "top",
160
+ fontSize: 16,
161
+ fontFamily: font,
162
+ weight: 600,
163
+ fill: colors.subheading
164
+ });
165
+ y += 28;
166
+
167
+ const s1bBullets = [
168
+ "Added PDF and DOCX export targets with full styling\npreservation and embedded font support.",
169
+ "Batch export now runs in parallel workers, reducing\nprocessing time by up to 4x on large document sets."
170
+ ];
171
+ y = renderBullets(s1bBullets, "s1b", y);
172
+ y += 32;
173
+
174
+ // --- Section 2: Improvements ---
175
+ elements.push({
176
+ id: "s2-heading",
177
+ type: "text",
178
+ x: padX,
179
+ y: y,
180
+ text: "Improvements",
181
+ align: "left",
182
+ valign: "top",
183
+ fontSize: 24,
184
+ fontFamily: font,
185
+ weight: 700,
186
+ fill: colors.heading
187
+ });
188
+ y += 42;
189
+
190
+ // Subsection 2a
191
+ elements.push({
192
+ id: "s2a-sub",
193
+ type: "text",
194
+ x: padX,
195
+ y: y,
196
+ text: "Performance",
197
+ align: "left",
198
+ valign: "top",
199
+ fontSize: 16,
200
+ fontFamily: font,
201
+ weight: 600,
202
+ fill: colors.subheading
203
+ });
204
+ y += 28;
205
+
206
+ const s2aBullets = [
207
+ "Timeline resolution is now 3x faster due to a rewritten\ninterpolation engine with pre-compiled curve LUTs.",
208
+ "Initial document load time reduced by 40% through\nlazy hydration of off-screen element groups.",
209
+ "Memory usage during preview reduced by caching\nresolved frames and evicting stale entries on scroll."
210
+ ];
211
+ y = renderBullets(s2aBullets, "s2a", y);
212
+ y += 16;
213
+
214
+ // Subsection 2b
215
+ elements.push({
216
+ id: "s2b-sub",
217
+ type: "text",
218
+ x: padX,
219
+ y: y,
220
+ text: "Editor UX",
221
+ align: "left",
222
+ valign: "top",
223
+ fontSize: 16,
224
+ fontFamily: font,
225
+ weight: 600,
226
+ fill: colors.subheading
227
+ });
228
+ y += 28;
229
+
230
+ const s2bBullets = [
231
+ "Undo history now groups rapid sequential edits into\nsingle entries for cleaner rollback behavior.",
232
+ "Keyboard shortcuts panel redesigned with searchable\ncategories and conflict detection warnings."
233
+ ];
234
+ y = renderBullets(s2bBullets, "s2b", y);
235
+ y += 32;
236
+
237
+ // --- Section 3: Bug Fixes ---
238
+ elements.push({
239
+ id: "s3-heading",
240
+ type: "text",
241
+ x: padX,
242
+ y: y,
243
+ text: "Bug Fixes",
244
+ align: "left",
245
+ valign: "top",
246
+ fontSize: 24,
247
+ fontFamily: font,
248
+ weight: 700,
249
+ fill: colors.heading
250
+ });
251
+ y += 42;
252
+
253
+ // Subsection 3a
254
+ elements.push({
255
+ id: "s3a-sub",
256
+ type: "text",
257
+ x: padX,
258
+ y: y,
259
+ text: "Rendering",
260
+ align: "left",
261
+ valign: "top",
262
+ fontSize: 16,
263
+ fontFamily: font,
264
+ weight: 600,
265
+ fill: colors.subheading
266
+ });
267
+ y += 28;
268
+
269
+ const s3aBullets = [
270
+ "Fixed incorrect gradient interpolation when stop offsets\nwere defined in descending order.",
271
+ "Resolved clipping mask artifacts on group elements\nwith non-zero rotation and nested transforms.",
272
+ "Text elements with empty strings no longer produce\ninvalid SVG output during frame resolution."
273
+ ];
274
+ y = renderBullets(s3aBullets, "s3a", y);
275
+
276
+ function renderBullets(items, prefix, startY) {
277
+ let cy = startY;
278
+ items.forEach((text, i) => {
279
+ // Bullet dot
280
+ elements.push({
281
+ id: `${prefix}-dot-${i}`,
282
+ type: "path",
283
+ d: `M ${padX + 6} ${cy + 8} A 3.5 3.5 0 1 1 ${padX + 6} ${cy + 8.01} Z`,
284
+ fill: colors.bullet,
285
+ stroke: "none"
286
+ });
287
+
288
+ elements.push({
289
+ id: `${prefix}-text-${i}`,
290
+ type: "text",
291
+ x: padX + 20,
292
+ y: cy,
293
+ text: text,
294
+ align: "left",
295
+ valign: "top",
296
+ fontSize: 14,
297
+ fontFamily: font,
298
+ weight: 400,
299
+ lineHeight: 1.65,
300
+ fill: colors.body,
301
+ maxWidth: contentW - 20
302
+ });
303
+
304
+ const lineCount = text.split("\n").length;
305
+ cy += lineCount * 23 + 14;
306
+ });
307
+ return cy;
308
+ }
309
+
310
+ function roundedRect(x, y, w, h, r) {
311
+ return [
312
+ `M ${x + r} ${y}`,
313
+ `L ${x + w - r} ${y}`,
314
+ `Q ${x + w} ${y} ${x + w} ${y + r}`,
315
+ `L ${x + w} ${y + h - r}`,
316
+ `Q ${x + w} ${y + h} ${x + w - r} ${y + h}`,
317
+ `L ${x + r} ${y + h}`,
318
+ `Q ${x} ${y + h} ${x} ${y + h - r}`,
319
+ `L ${x} ${y + r}`,
320
+ `Q ${x} ${y} ${x + r} ${y}`,
321
+ "Z"
322
+ ].join(" ");
323
+ }
324
+
325
+ const doc = {
326
+ version: 1,
327
+ canvas: { width, height, background: bg },
328
+ elements
329
+ };
330
+
331
+ const outPath = path.join(__dirname, "release-notes.visual.json");
332
+ fs.writeFileSync(outPath, JSON.stringify(doc, null, 2));
333
+ console.log("Written:", outPath);