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.
- package/ANIMATABLE_MATRIX.md +177 -0
- package/KERNEL_SPEC.md +412 -0
- package/PACKS.md +81 -0
- package/PRESETS.md +182 -0
- package/README.md +274 -188
- package/bin/editor-ui.cjs +2285 -0
- package/bin/preview-ui.cjs +74 -0
- package/bin/sketchmark.cjs +648 -2008
- package/dist/src/animatable.d.ts +21 -0
- package/dist/src/animatable.js +439 -0
- package/dist/src/builders/index.d.ts +1 -11
- package/dist/src/builders/index.js +1 -19
- package/dist/src/diagnostics.js +1 -64
- package/dist/src/edit.d.ts +27 -0
- package/dist/src/edit.js +162 -0
- package/dist/src/index.d.ts +4 -13
- package/dist/src/index.js +4 -13
- package/dist/src/keyframes.d.ts +48 -0
- package/dist/src/keyframes.js +182 -0
- package/dist/src/motion.d.ts +4 -0
- package/dist/src/motion.js +262 -0
- package/dist/src/normalize.js +120 -151
- package/dist/src/presets/characters.d.ts +15 -0
- package/dist/src/presets/characters.js +113 -0
- package/dist/src/presets/compose.d.ts +5 -0
- package/dist/src/presets/compose.js +80 -0
- package/dist/src/presets/effects.d.ts +40 -0
- package/dist/src/presets/effects.js +79 -0
- package/dist/src/presets/helpers.d.ts +33 -0
- package/dist/src/presets/helpers.js +165 -0
- package/dist/src/presets/index.d.ts +9 -0
- package/dist/src/presets/index.js +48 -0
- package/dist/src/presets/motions.d.ts +33 -0
- package/dist/src/presets/motions.js +75 -0
- package/dist/src/presets/scenes.d.ts +35 -0
- package/dist/src/presets/scenes.js +134 -0
- package/dist/src/presets/shapes.d.ts +71 -0
- package/dist/src/presets/shapes.js +96 -0
- package/dist/src/presets/transitions.d.ts +29 -0
- package/dist/src/presets/transitions.js +113 -0
- package/dist/src/presets/types.d.ts +34 -0
- package/dist/src/presets/types.js +2 -0
- package/dist/src/render/html.js +1 -4
- package/dist/src/render/svg.d.ts +2 -2
- package/dist/src/render/svg.js +86 -82
- package/dist/src/render/three-html.js +67 -113
- package/dist/src/scenes.js +1 -0
- package/dist/src/schema.js +218 -280
- package/dist/src/shapes/builtins.js +11 -47
- package/dist/src/shapes/common.js +12 -11
- package/dist/src/shapes/registry.d.ts +0 -1
- package/dist/src/shapes/registry.js +0 -4
- package/dist/src/shapes/types.d.ts +1 -3
- package/dist/src/types.d.ts +57 -288
- package/dist/src/utils.d.ts +2 -11
- package/dist/src/utils.js +13 -70
- package/dist/src/validate.js +321 -275
- package/dist/tests/run.js +576 -510
- package/examples/1730642890464.jpg +0 -0
- package/examples/app-screen.svg +1 -0
- package/examples/app-screen.visual.json +503 -0
- package/examples/dashboard-table.svg +1 -0
- package/examples/dashboard-table.visual.json +708 -0
- package/examples/dev-docs.svg +1 -0
- package/examples/dev-docs.visual.json +248 -0
- package/examples/explainer.mp4 +0 -0
- package/examples/explainer.visual.json +1713 -0
- package/examples/group-origin-effects-lab-check.svg +1 -0
- package/examples/group-origin-effects-lab.visual.json +1880 -0
- package/examples/image-clip-radius.visual.json +271 -0
- package/examples/make-app-screen.cjs +368 -0
- package/examples/make-dashboard-table.cjs +277 -0
- package/examples/make-dev-docs.cjs +233 -0
- package/examples/make-explainer.cjs +438 -0
- package/examples/make-group-origin-effects-lab.cjs +370 -0
- package/examples/make-image-clip-radius.cjs +169 -0
- package/examples/make-modal-dialog.cjs +355 -0
- package/examples/make-origin-effects-lab.cjs +311 -0
- package/examples/make-preset-character-motion.cjs +32 -0
- package/examples/make-presets-demo.cjs +30 -0
- package/examples/make-pricing.cjs +286 -0
- package/examples/make-product-demo.cjs +468 -0
- package/examples/make-product-hero.cjs +223 -0
- package/examples/make-release-notes.cjs +333 -0
- package/examples/make-settings-panel.cjs +435 -0
- package/examples/make-split-preview.cjs +248 -0
- package/examples/make-storyboard.cjs +215 -0
- package/examples/make-transcript.cjs +234 -0
- package/examples/make-typography-test.cjs +397 -0
- package/examples/make-ui-demo-explainer.cjs +1094 -0
- package/examples/make-ui-flow.cjs +762 -0
- package/examples/make-walkthrough.cjs +815 -0
- package/examples/modal-dialog.svg +1 -0
- package/examples/modal-dialog.visual.json +239 -0
- package/examples/origin-effects-lab-check.svg +1 -0
- package/examples/origin-effects-lab.visual.json +1412 -0
- package/examples/preset-character-motion.visual.json +949 -0
- package/examples/presets-demo.visual.json +787 -0
- package/examples/pricing.svg +1 -0
- package/examples/pricing.visual.json +652 -0
- package/examples/product-demo.mp4 +0 -0
- package/examples/product-demo.visual.json +866 -0
- package/examples/product-hero.svg +1 -0
- package/examples/product-hero.visual.json +242 -0
- package/examples/release-notes.svg +1 -0
- package/examples/release-notes.visual.json +467 -0
- package/examples/settings-panel.svg +1 -0
- package/examples/settings-panel.visual.json +501 -0
- package/examples/split-preview.svg +1 -0
- package/examples/split-preview.visual.json +124 -0
- package/examples/storyboard.svg +1 -0
- package/examples/storyboard.visual.json +312 -0
- package/examples/transcript.svg +1 -0
- package/examples/transcript.visual.json +407 -0
- package/examples/typography-indent-check.svg +1 -0
- package/examples/typography-lineheight-0.svg +1 -0
- package/examples/typography-lineheight-2.svg +1 -0
- package/examples/typography-test-check.svg +1 -0
- package/examples/typography-test.svg +1 -0
- package/examples/typography-test.visual.json +757 -0
- package/examples/ui-demo-explainer-billing.svg +1 -0
- package/examples/ui-demo-explainer-check.svg +1 -0
- package/examples/ui-demo-explainer-save.svg +1 -0
- package/examples/ui-demo-explainer-toggle.svg +1 -0
- package/examples/ui-demo-explainer.mp4 +0 -0
- package/examples/ui-demo-explainer.visual.json +2597 -0
- package/examples/ui-flow.mp4 +0 -0
- package/examples/ui-flow.visual.json +1211 -0
- package/examples/walkthrough.mp4 +0 -0
- package/examples/walkthrough.visual.json +1372 -0
- package/package.json +52 -52
- 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);
|