badgecraft 0.3.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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +406 -0
- package/cli/index.mjs +143 -0
- package/cli/render.d.ts +20 -0
- package/cli/render.mjs +87 -0
- package/cli/studio.mjs +98 -0
- package/dist/badge-B-g_9WFj.d.ts +79 -0
- package/dist/badge-CCjUxNIG.d.cts +79 -0
- package/dist/chunk-3OMN635U.js +44 -0
- package/dist/chunk-3OMN635U.js.map +1 -0
- package/dist/chunk-BRT5S5PF.cjs +3418 -0
- package/dist/chunk-BRT5S5PF.cjs.map +1 -0
- package/dist/chunk-EBDSIGZR.cjs +48 -0
- package/dist/chunk-EBDSIGZR.cjs.map +1 -0
- package/dist/chunk-RRYBMB25.js +3410 -0
- package/dist/chunk-RRYBMB25.js.map +1 -0
- package/dist/cli-browser.js +526 -0
- package/dist/element.cjs +176 -0
- package/dist/element.cjs.map +1 -0
- package/dist/element.d.cts +31 -0
- package/dist/element.d.ts +31 -0
- package/dist/element.js +174 -0
- package/dist/element.js.map +1 -0
- package/dist/index.cjs +47 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/react.cjs +60 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +29 -0
- package/dist/react.d.ts +29 -0
- package/dist/react.js +55 -0
- package/dist/react.js.map +1 -0
- package/dist/studio/assets/badge-9Zq6e9Ht.js +524 -0
- package/dist/studio/assets/base-ItCYnbux.css +1 -0
- package/dist/studio/assets/base-LFa9cTPp.js +1 -0
- package/dist/studio/assets/element-CCTxyf61.js +1 -0
- package/dist/studio/assets/index-BVuSTaz-.css +1 -0
- package/dist/studio/assets/index-CTTcx2pV.js +28 -0
- package/dist/studio/assets/option-keys-CKi71y0n.js +1 -0
- package/dist/studio/assets/react-Cq5Erey2.js +9 -0
- package/dist/studio/assets/react-DyJFYpWJ.js +1 -0
- package/dist/studio/assets/studio-C6plMNOe.css +1 -0
- package/dist/studio/assets/studio-DBcSY6tV.js +1 -0
- package/dist/studio/assets/style-C2sJ2Xy3.css +1 -0
- package/dist/studio/assets/vue-BpGwr3iF.js +1 -0
- package/dist/studio/element.html +31 -0
- package/dist/studio/env/studio.hdr +5 -0
- package/dist/studio/index.html +24 -0
- package/dist/studio/logos/apple.svg +1 -0
- package/dist/studio/logos/atlassian.svg +1 -0
- package/dist/studio/logos/google.svg +1 -0
- package/dist/studio/logos/meta.svg +1 -0
- package/dist/studio/react.html +16 -0
- package/dist/studio/studio.html +27 -0
- package/dist/studio/vue.html +15 -0
- package/dist/types-CHM3-ZZV.d.cts +204 -0
- package/dist/types-CHM3-ZZV.d.ts +204 -0
- package/dist/vue.cjs +93 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.cts +115 -0
- package/dist/vue.d.ts +115 -0
- package/dist/vue.js +87 -0
- package/dist/vue.js.map +1 -0
- package/docs/cli.md +146 -0
- package/docs/gallery.jpg +0 -0
- package/docs/performance.md +151 -0
- package/docs/render-quality.md +220 -0
- package/docs/studio.jpg +0 -0
- package/package.json +163 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Rendering quality verification
|
|
2
|
+
|
|
3
|
+
For phase-level CPU/worker/GPU profiling and alternating full-source A/B runs,
|
|
4
|
+
see [Performance measurement](performance.md). The updated quality harness
|
|
5
|
+
verifies actual backing dimensions at 110, 400, and 640 pixels. Earlier captures
|
|
6
|
+
configured with emulated 2× DPR still had 1× backing canvases in Chrome, so they
|
|
7
|
+
did not establish high-DPI coverage; the new larger-backing captures address
|
|
8
|
+
that rendering-test gap without claiming native display-scaling coverage.
|
|
9
|
+
|
|
10
|
+
## Tilted texture detail (2026-09-28)
|
|
11
|
+
|
|
12
|
+
Badge surface, colour, and material-weight mipmaps now use anisotropic filtering,
|
|
13
|
+
capped at 2× or the device limit. This retains more detail along the uncompressed
|
|
14
|
+
axis when a badge tilts. The optional extension is reacquired after context
|
|
15
|
+
restoration; devices without it keep trilinear filtering. Environment filtering,
|
|
16
|
+
map sizes, geometry, supersampling, and draw counts stay the same. The cap bounds
|
|
17
|
+
texture sampling cost without allocating additional textures or render passes.
|
|
18
|
+
The texture parameters follow the [Khronos extension specification](https://registry.khronos.org/webgl/extensions/EXT_texture_filter_anisotropic/).
|
|
19
|
+
|
|
20
|
+
The dedicated reference check renders eight material styles at 160px, with yaw
|
|
21
|
+
angles of 45°, 65°, and 80°. It compares 1× and capped 2× filtering to the same
|
|
22
|
+
baked maps and geometry rendered into a 1280px canvas and downsampled to 160px.
|
|
23
|
+
Premultiplied RGBA mean squared error fell by **14.1% overall**, with improvements
|
|
24
|
+
in all 24 cases on Chrome/ANGLE Metal. This measures agreement with a higher
|
|
25
|
+
resolution rendering of this renderer, not physical ground truth or temporal
|
|
26
|
+
stability. The general quality harness also captured 108 nonblank images at
|
|
27
|
+
110, 400, and 640 pixels across front, tilted, grazing, and back poses.
|
|
28
|
+
|
|
29
|
+
The initial 4× candidate was tested with three-round and six-round full-source
|
|
30
|
+
A/B runs. Both had substantial timing drift. A shorter same-context comparison
|
|
31
|
+
then found a repeatable cost on small tilted badges, so the final cap was reduced
|
|
32
|
+
to 2×. The exploratory reports remain in `profile/`, `profile-confirm/`, and
|
|
33
|
+
`filter-cost.json`; they describe the rejected 4× candidate.
|
|
34
|
+
|
|
35
|
+
For the final 2× cap, a same-context test alternated filtering modes for four
|
|
36
|
+
rounds, rendering nine badges per frame. Each run used five warm-up frames and
|
|
37
|
+
25 measured frames, a ±5° yaw sweep, and GPU readback. Median redraw costs:
|
|
38
|
+
|
|
39
|
+
| Size / centre pose | Trilinear | Capped 2× |
|
|
40
|
+
| --- | ---: | ---: |
|
|
41
|
+
| 110px / 0° yaw | 11.45 ms | 11.35 ms |
|
|
42
|
+
| 110px / 65° yaw | 8.65 ms | 8.65 ms |
|
|
43
|
+
| 640px / 0° yaw | 12.05 ms | 13.15 ms |
|
|
44
|
+
| 640px / 65° yaw | 13.40 ms | 13.00 ms |
|
|
45
|
+
|
|
46
|
+
The largest observed median increase was 1.10 ms for nine large near-front
|
|
47
|
+
badges; tilted cases were flat or faster. These local Chrome 154 / Apple M5 Pro
|
|
48
|
+
measurements remain noisy and do not establish performance on mobile GPUs.
|
|
49
|
+
Raw runs and the executable probe are saved as `filter-cost-2x.json` and
|
|
50
|
+
`filter-cost.mjs` in the artifact directory. This lower cap retains most of the
|
|
51
|
+
4× candidate's reference-error improvement while bounding texture sampling.
|
|
52
|
+
|
|
53
|
+
Validation: 23 unit tests, TypeScript, ESM/CommonJS/declaration builds, all Chrome
|
|
54
|
+
interaction checks (including the unavailable-extension fallback), 108 image
|
|
55
|
+
captures, and all 24 higher-resolution reference cases passed.
|
|
56
|
+
|
|
57
|
+
Reproduce the targeted quality measurement:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
node scripts/filter-quality.mjs artifacts/filter-quality
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Local before/after images, the source snapshot, and measurement reports are in
|
|
64
|
+
`artifacts/render-quality/`. `comparison.png` shows matching tilted and grazing
|
|
65
|
+
views. The existing pixel-equivalence thresholds are intentionally not used to
|
|
66
|
+
accept this appearance change; the earlier captures remain intact.
|
|
67
|
+
|
|
68
|
+
## Shadow geometry and repeatable regression checks (2026-09-28)
|
|
69
|
+
|
|
70
|
+
The planar shadow now uses two triangles instead of a 192 × 192 grid
|
|
71
|
+
(73,728 triangles). Its shader, texture, projection, and perspective-correct
|
|
72
|
+
UV interpolation are unchanged. This removes redundant vertex processing
|
|
73
|
+
without reducing badge relief geometry, texture resolution, supersampling,
|
|
74
|
+
or material shading. Shadow vertex/index storage falls from 740,360 to 44
|
|
75
|
+
bytes per shared renderer.
|
|
76
|
+
|
|
77
|
+
Five sequential Chrome runs per version on the Apple M5 Pro, using a saved
|
|
78
|
+
renderer source snapshot and the same instrumented harness:
|
|
79
|
+
|
|
80
|
+
| Measurement (median across runs) | Before | After |
|
|
81
|
+
| --- | ---: | ---: |
|
|
82
|
+
| Forced redraw of all 57 badges | 35.3 ms | 32.5 ms |
|
|
83
|
+
| 95th-percentile redraw | 39.2 ms | 34.1 ms |
|
|
84
|
+
| Submitted triangles per redraw | 12,185,282 | 8,056,626 |
|
|
85
|
+
| Indexed draw calls per redraw | 225 | 225 |
|
|
86
|
+
| Observed gallery readiness | 207.4 ms | 213.5 ms |
|
|
87
|
+
| Add 48 badges | 46.3 ms | 48.4 ms |
|
|
88
|
+
| WebGL contexts | 1 | 1 |
|
|
89
|
+
| Indexed draws during 300 ms idle window | 0 | 0 |
|
|
90
|
+
|
|
91
|
+
The redraw median improved by 7.9%, with 33.9% fewer submitted triangles.
|
|
92
|
+
Loading measurements were slightly slower; this change targets rendering,
|
|
93
|
+
not loading. Both versions had timing outliers, so these are local observations,
|
|
94
|
+
not universal performance guarantees. Full samples are saved locally in
|
|
95
|
+
`artifacts/performance-before.json` and `artifacts/performance-after.json`.
|
|
96
|
+
The benchmark reports page-wide long tasks (including forced synchronous
|
|
97
|
+
redraws), draw counts, submitted triangles, workload settings, Chrome version,
|
|
98
|
+
and GPU identity. It fails on browser errors, extra contexts, or idle drawing.
|
|
99
|
+
Instrumentation runs only in the development harness and adds no library cost.
|
|
100
|
+
|
|
101
|
+
That quality run compared 108 canvas captures: nine styles, 110px/1×,
|
|
102
|
+
200px with emulated 2× (actually 200px backing), and 320px/1×, each viewed from
|
|
103
|
+
the front, tilted, grazing, and back.
|
|
104
|
+
All comparisons passed. The worst mean premultiplied RGBA difference was
|
|
105
|
+
0.00025 on a 0–255 scale. Comparisons use premultiplied colour to avoid treating
|
|
106
|
+
invisible RGB changes in transparent pixels as visible errors. Each image must
|
|
107
|
+
have mean error ≤ 0.1, no more than 0.1% of pixels differing by over 2 levels,
|
|
108
|
+
and no channel difference over 16. These tolerances permit GPU interpolation
|
|
109
|
+
rounding, not intentional appearance changes. The harness also rejects blank
|
|
110
|
+
images, WebGL errors, browser errors, dimension changes, and mismatched Chrome
|
|
111
|
+
versions or GPU identities when present in the reference.
|
|
112
|
+
|
|
113
|
+
Capture a reference **before** a rendering edit, then compare afterwards:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
pnpm test:quality artifacts/quality-before
|
|
117
|
+
pnpm test:quality artifacts/quality-after artifacts/quality-before
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Each directory contains PNGs for inspection, raw RGBA buffers, and a JSON
|
|
121
|
+
report. Keep the reference separate from the output. Both this check and
|
|
122
|
+
`pnpm benchmark` accept `BADGE_BASELINE_DIR` containing `renderer.ts`,
|
|
123
|
+
`shaders.ts`, `environment.ts`, and `materials.ts` from the earlier revision.
|
|
124
|
+
This source override covers only those four modules; other source changes
|
|
125
|
+
require captures from the actual baseline checkout. The capture harness uses
|
|
126
|
+
internal development fields to force visibility and pose; it is not a public API.
|
|
127
|
+
Quality references should be recaptured deliberately on the same Chrome/GPU,
|
|
128
|
+
never silently updated to make a failed comparison pass.
|
|
129
|
+
|
|
130
|
+
Validation: 17 unit tests, TypeScript, package builds, the Chrome interaction
|
|
131
|
+
suite, and all 108 pixel comparisons. One hover assertion failed while the
|
|
132
|
+
interaction and capture suites ran concurrently; the complete standalone
|
|
133
|
+
interaction rerun passed. Run browser workloads sequentially for performance
|
|
134
|
+
measurements. No public API or intended appearance change.
|
|
135
|
+
|
|
136
|
+
## Supersampled anti-aliasing
|
|
137
|
+
|
|
138
|
+
The renderer now shades at twice the output width and height, then downsamples
|
|
139
|
+
with high-quality canvas filtering. This supplements MSAA with four shading
|
|
140
|
+
samples per output pixel, smoothing internal metal wires and highlights as
|
|
141
|
+
well as the silhouette. Brushing, flakes, and specular normal filtering retain
|
|
142
|
+
the final output pixel footprint so supersampling does not reintroduce shimmer.
|
|
143
|
+
The supersampled longest dimension is capped at 2048 pixels (or the GPU's lower
|
|
144
|
+
renderbuffer limit); large canvases progressively receive less supersampling.
|
|
145
|
+
Public canvas and PNG export dimensions are unchanged. Map resolution and
|
|
146
|
+
geometry are unchanged by this pass.
|
|
147
|
+
|
|
148
|
+
Chrome screenshots: `artifacts/aa-before.png` and `artifacts/aa-after.png`.
|
|
149
|
+
All 17 unit tests, browser checks, TypeScript checks, and package builds pass.
|
|
150
|
+
Five local benchmark runs measured 36.8 ms median redraw and 40.8 ms median
|
|
151
|
+
95th-percentile redraw for all 57 badges, versus the earlier geometry run's
|
|
152
|
+
30.1 ms and 31.2 ms. Gallery readiness was 225.9 ms, adding 48 badges took
|
|
153
|
+
48.6 ms, and the renderer still used one context with no settled draw calls.
|
|
154
|
+
These runs are local observations rather than a controlled performance guarantee.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## Contour geometry and wire refinement
|
|
158
|
+
|
|
159
|
+
The relief now uses a per-artwork mesh clipped to the baked silhouette. Shared,
|
|
160
|
+
subpixel-refined contour intersections weld adjacent triangles; an explicit
|
|
161
|
+
metal side wall joins the front and back. This removes the torn, sawtooth edge
|
|
162
|
+
that appeared when a displaced square grid was discarded at grazing angles.
|
|
163
|
+
Silhouette coverage comes from WebGL multisampling instead of a second alpha
|
|
164
|
+
cut through the front/back seam. Mesh subdivisions follow map resolution, up to
|
|
165
|
+
384 per axis; the previous shared relief grid used 192 at every size. Shadow
|
|
166
|
+
rendering retains its shared grid. Geometry is cached with the artwork textures
|
|
167
|
+
and released with them, including on context restoration.
|
|
168
|
+
|
|
169
|
+
Wire-radius estimates are smoothed at a consistent scale relative to artwork
|
|
170
|
+
size, reducing ripples in ring highlights without blurring SVG colour masks.
|
|
171
|
+
No public options changed. Each unlocked medal adds one side-wall draw, and
|
|
172
|
+
cached meshes use additional GPU memory; small gallery badges still share one
|
|
173
|
+
WebGL context and stop drawing when settled.
|
|
174
|
+
|
|
175
|
+
Validation: 17 unit tests, including closed-mesh topology for circles, holes,
|
|
176
|
+
disconnected islands, exact-grid contours and map boundaries; Chrome browser
|
|
177
|
+
checks; TypeScript; ESM/CommonJS/declaration builds. Front and grazing-angle
|
|
178
|
+
gold/silver screenshots were inspected. Local evidence is in
|
|
179
|
+
`artifacts/edge-before.png`, `artifacts/edge-after.png`,
|
|
180
|
+
`artifacts/front-smoothed.png`, and `artifacts/silver-back.png`.
|
|
181
|
+
|
|
182
|
+
Five Chrome runs of the geometry change measured medians of 221.2 ms gallery
|
|
183
|
+
readiness, 48.9 ms to add 48 badges, 30.1 ms for a forced redraw of all 57,
|
|
184
|
+
and 31.2 ms for the 95th-percentile redraw. These are local measurements on the
|
|
185
|
+
same machine described below, not a controlled speedup claim. The wire-radius
|
|
186
|
+
filter was adjusted after this benchmark; it affects baking, not draw cost.
|
|
187
|
+
|
|
188
|
+
## Earlier material and lighting work
|
|
189
|
+
|
|
190
|
+
The studio preset now uses more defined softboxes, with dark gaps between them to give polished metal contrast. Gold is slightly smoother; onyx is darker and cooler. Enamel retains its SVG colour beneath a separate clearcoat reflection.
|
|
191
|
+
|
|
192
|
+
The shader accounts for the dielectric index contrast beneath lacquer, attenuates light crossing the coat twice, and lights broad multiple scattering with diffuse irradiance. Normal derivatives soften highlights smaller than a pixel. Flakes blend into the surface instead of adding unbounded light, and converge toward a smooth reflection when too small to resolve. Layering and filtering follow the principles described in [Filament's material model](https://google.github.io/filament/main/filament.html).
|
|
193
|
+
|
|
194
|
+
The mirror environment level now resamples directly instead of running the GGX convolution. That material-only revision left mesh density, map resolution, texture count, draw passes, worker baking, caches, and idle scheduling unchanged. The contour geometry revision above supersedes its mesh and draw-pass counts.
|
|
195
|
+
|
|
196
|
+
## Measured performance
|
|
197
|
+
|
|
198
|
+
Five sequential runs per version in Google Chrome 154.0.8037.57, ANGLE Metal on Apple M5 Pro. The table contains medians across runs. Nine 110px gallery badges load first; 48 more are added. Redraw timing forces all 57 badges to rotate, includes a synchronous GPU readback, and measures 45 frames after five warm-up frames.
|
|
199
|
+
|
|
200
|
+
| Measurement | Before | After |
|
|
201
|
+
| --- | ---: | ---: |
|
|
202
|
+
| Gallery readiness | 254.7 ms | 240.7 ms |
|
|
203
|
+
| Add 48 badges | 48.6 ms | 48.7 ms |
|
|
204
|
+
| Redraw all 57 badges | 32.2 ms | 31.8 ms |
|
|
205
|
+
| 95th-percentile redraw | 37.8 ms | 34.0 ms |
|
|
206
|
+
| WebGL contexts | 1 | 1 |
|
|
207
|
+
|
|
208
|
+
These local measurements show comparable performance, not a universal speed guarantee. One after-run had a 59.6 ms redraw median; the other four were 31.6–31.8 ms. The workload deliberately redraws every badge and forces synchronization; it is not the cost of hovering a single badge. Static badges make zero draw calls after settling.
|
|
209
|
+
|
|
210
|
+
Run `pnpm benchmark` to repeat. `node scripts/benchmark.mjs output.json` also saves the results. For an A/B comparison, `BADGE_BASELINE_DIR` can point to a directory containing the earlier `shaders.ts`, `renderer.ts`, `environment.ts`, and `materials.ts`; the harness serves those files without modifying working sources.
|
|
211
|
+
|
|
212
|
+
## Verification
|
|
213
|
+
|
|
214
|
+
- Unit tests and TypeScript checks pass.
|
|
215
|
+
- Chrome checks cover gallery rendering, hover/drag restoration, material and environment updates, HDR loading, PNG export, React, Vue, custom elements, and the non-WebGL fallback.
|
|
216
|
+
- Browser instrumentation confirms a single WebGL context for 57 badges and no draws while settled.
|
|
217
|
+
- Screenshots inspected at 1× and 2× pixel density, including enlarged and tilted badges.
|
|
218
|
+
- ESM, CommonJS, and declaration builds pass.
|
|
219
|
+
|
|
220
|
+
The default look changes, including darker onyx and quieter subpixel glitter. Existing material and lighting overrides remain available; no public options changed.
|
package/docs/studio.jpg
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "badgecraft",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Interactive 3D badges from any SVG, in metal, enamel, glitter, pearl and more, for React, Vue, Web Components and JavaScript, with a web Studio and image export CLI.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"badge",
|
|
7
|
+
"svg",
|
|
8
|
+
"webgl",
|
|
9
|
+
"pbr",
|
|
10
|
+
"metal",
|
|
11
|
+
"enamel",
|
|
12
|
+
"achievement",
|
|
13
|
+
"award",
|
|
14
|
+
"react",
|
|
15
|
+
"vue",
|
|
16
|
+
"web-component",
|
|
17
|
+
"cli",
|
|
18
|
+
"png",
|
|
19
|
+
"webp",
|
|
20
|
+
"svg-to-png"
|
|
21
|
+
],
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"./dist/element.js",
|
|
26
|
+
"./dist/element.cjs",
|
|
27
|
+
"./src/element/index.ts"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/index.cjs",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.cts",
|
|
40
|
+
"default": "./dist/index.cjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"./react": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/react.d.ts",
|
|
46
|
+
"default": "./dist/react.js"
|
|
47
|
+
},
|
|
48
|
+
"require": {
|
|
49
|
+
"types": "./dist/react.d.cts",
|
|
50
|
+
"default": "./dist/react.cjs"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"./vue": {
|
|
54
|
+
"import": {
|
|
55
|
+
"types": "./dist/vue.d.ts",
|
|
56
|
+
"default": "./dist/vue.js"
|
|
57
|
+
},
|
|
58
|
+
"require": {
|
|
59
|
+
"types": "./dist/vue.d.cts",
|
|
60
|
+
"default": "./dist/vue.cjs"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"./element": {
|
|
64
|
+
"import": {
|
|
65
|
+
"types": "./dist/element.d.ts",
|
|
66
|
+
"default": "./dist/element.js"
|
|
67
|
+
},
|
|
68
|
+
"require": {
|
|
69
|
+
"types": "./dist/element.d.cts",
|
|
70
|
+
"default": "./dist/element.cjs"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"./package.json": "./package.json",
|
|
74
|
+
"./node": {
|
|
75
|
+
"types": "./cli/render.d.ts",
|
|
76
|
+
"import": "./cli/render.mjs"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"files": [
|
|
80
|
+
"dist",
|
|
81
|
+
"cli",
|
|
82
|
+
"docs/*.jpg",
|
|
83
|
+
"docs/cli.md",
|
|
84
|
+
"docs/performance.md",
|
|
85
|
+
"docs/render-quality.md",
|
|
86
|
+
"README.md",
|
|
87
|
+
"LICENSE",
|
|
88
|
+
"CHANGELOG.md"
|
|
89
|
+
],
|
|
90
|
+
"scripts": {
|
|
91
|
+
"build:worker": "node scripts/build-worker.mjs",
|
|
92
|
+
"build": "npm run build:worker && tsup && node scripts/build-cli-browser.mjs && npm run build:studio",
|
|
93
|
+
"dev": "npm run build:worker && vite playground",
|
|
94
|
+
"typecheck": "npm run build:worker && tsc --noEmit",
|
|
95
|
+
"test": "npm run build:worker && vitest run",
|
|
96
|
+
"test:browser": "npm run build:worker && node scripts/browser-check.mjs",
|
|
97
|
+
"test:studio": "npm run build:worker && node scripts/studio-check.mjs",
|
|
98
|
+
"test:bugbash": "npm run build:worker && node scripts/bugbash-check.mjs",
|
|
99
|
+
"test:package": "npm run build && node scripts/package-check.mjs",
|
|
100
|
+
"benchmark": "npm run build:worker && node scripts/benchmark.mjs",
|
|
101
|
+
"perf:profile": "npm run build:worker && node scripts/profile.mjs",
|
|
102
|
+
"prepublishOnly": "npm run verify",
|
|
103
|
+
"test:quality": "npm run build:worker && node scripts/quality-check.mjs",
|
|
104
|
+
"doctor": "node scripts/react-doctor.mjs",
|
|
105
|
+
"verify": "npm run typecheck && npm test && npm run test:package && npm run test:cli && npm run doctor",
|
|
106
|
+
"prepack": "npm run build",
|
|
107
|
+
"test:cli": "node --test test/cli.test.mjs test/studio-server.test.mjs",
|
|
108
|
+
"test:tarball": "node scripts/tarball-check.mjs",
|
|
109
|
+
"build:studio": "vite build playground",
|
|
110
|
+
"test:studio:built": "node scripts/studio-check.mjs --built"
|
|
111
|
+
},
|
|
112
|
+
"peerDependencies": {
|
|
113
|
+
"react": ">=17",
|
|
114
|
+
"vue": ">=3.3"
|
|
115
|
+
},
|
|
116
|
+
"peerDependenciesMeta": {
|
|
117
|
+
"react": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"vue": {
|
|
121
|
+
"optional": true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"devDependencies": {
|
|
125
|
+
"@types/node": "^24.19.0",
|
|
126
|
+
"@types/react": "^19.2.0",
|
|
127
|
+
"@types/react-dom": "^19.2.0",
|
|
128
|
+
"@vitejs/plugin-react": "^6.1.1",
|
|
129
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
130
|
+
"esbuild": "^0.28.2",
|
|
131
|
+
"playwright": "^1.63.0",
|
|
132
|
+
"react": "^19.3.0",
|
|
133
|
+
"react-dom": "^19.3.0",
|
|
134
|
+
"tsup": "^8.5.1",
|
|
135
|
+
"typescript": "~5.9.3",
|
|
136
|
+
"vite": "^8.3.1",
|
|
137
|
+
"vitest": "^5.0.2",
|
|
138
|
+
"vue": "^3.5.43"
|
|
139
|
+
},
|
|
140
|
+
"engines": {
|
|
141
|
+
"node": ">=22"
|
|
142
|
+
},
|
|
143
|
+
"dependencies": {
|
|
144
|
+
"playwright-core": "1.63.0"
|
|
145
|
+
},
|
|
146
|
+
"author": "Parth Jadhav",
|
|
147
|
+
"repository": {
|
|
148
|
+
"type": "git",
|
|
149
|
+
"url": "git+https://github.com/ParthJadhav/badgecraft.git"
|
|
150
|
+
},
|
|
151
|
+
"homepage": "https://parthjadhav.github.io/badgecraft/",
|
|
152
|
+
"bugs": {
|
|
153
|
+
"url": "https://github.com/ParthJadhav/badgecraft/issues"
|
|
154
|
+
},
|
|
155
|
+
"publishConfig": {
|
|
156
|
+
"access": "public",
|
|
157
|
+
"registry": "https://registry.npmjs.org/"
|
|
158
|
+
},
|
|
159
|
+
"packageManager": "pnpm@11.10.0",
|
|
160
|
+
"bin": {
|
|
161
|
+
"badgecraft": "./cli/index.mjs"
|
|
162
|
+
}
|
|
163
|
+
}
|