@pie-players/pie-assessment-toolkit 0.3.57 → 0.3.58
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-assessment-toolkit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "PIE assessment toolkit: composable services + reference implementation for assessment players and tool coordination",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,15 +75,15 @@
|
|
|
75
75
|
"test": "bun test"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@pie-players/pie-calculator": "0.3.
|
|
79
|
-
"@pie-players/pie-context": "0.3.
|
|
80
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
81
|
-
"@pie-players/pie-tts": "0.3.
|
|
78
|
+
"@pie-players/pie-calculator": "0.3.58",
|
|
79
|
+
"@pie-players/pie-context": "0.3.58",
|
|
80
|
+
"@pie-players/pie-players-shared": "0.3.58",
|
|
81
|
+
"@pie-players/pie-tts": "0.3.58",
|
|
82
82
|
"speech-rule-engine": "^5.0.0-rc.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"@pie-players/pie-calculator-desmos": "0.3.
|
|
86
|
-
"@pie-players/tts-client-server": "0.3.
|
|
85
|
+
"@pie-players/pie-calculator-desmos": "0.3.58",
|
|
86
|
+
"@pie-players/tts-client-server": "0.3.58"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@pie-players/pie-calculator-desmos": {
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Vendored: `nds-icon-button`
|
|
2
|
-
|
|
3
|
-
Pre-built bundle of the Renaissance Next Design System (NDS)
|
|
4
|
-
`<nds-icon-button>` custom element. Used by `ItemToolBar.svelte` for the
|
|
5
|
-
calculator shell header (chevrons, zoom, close) so the toolkit matches the
|
|
6
|
-
Knowledge-Check Figma without taking a runtime dependency on Lit or the rest
|
|
7
|
-
of NDS.
|
|
8
|
-
|
|
9
|
-
## Provenance
|
|
10
|
-
|
|
11
|
-
| Field | Value |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| Upstream repo | `git@github.com:RenaissancePlace/nextComponentLibrary.git` |
|
|
14
|
-
| Source file | `web-components/src/components/icon-button/nds-icon-button.ts` |
|
|
15
|
-
| Last sync commit | `1c728d3` (`feat(UX-2319): add new components…`) |
|
|
16
|
-
| Bundler | Vite 7 in lib mode, ES output, single-file (Lit inlined) |
|
|
17
|
-
|
|
18
|
-
## Why a vendored bundle, not an npm dep
|
|
19
|
-
|
|
20
|
-
NDS is not currently published to a registry the `@pie-players/*` chain can
|
|
21
|
-
consume. Copying the `.ts` source directly (the path the NDS docs suggest)
|
|
22
|
-
would force `@pie-players/pie-assessment-toolkit` to take a `lit` dependency
|
|
23
|
-
and pull in a chunk of foundations CSS, both of which would leak to every
|
|
24
|
-
downstream consumer on lockstep release. A pre-built single-file bundle
|
|
25
|
-
sidesteps both: zero new package deps, the bundle inlines what it needs, and
|
|
26
|
-
the toolkit's CE build inlines this file into the published artifact.
|
|
27
|
-
|
|
28
|
-
## How to refresh
|
|
29
|
-
|
|
30
|
-
When a newer `nds-icon-button` is needed:
|
|
31
|
-
|
|
32
|
-
1. Pull the latest `nextComponentLibrary` next to this repo (sibling
|
|
33
|
-
checkout: `../../nextComponentLibrary`).
|
|
34
|
-
2. From `nextComponentLibrary/web-components/`, `bun install`.
|
|
35
|
-
3. Build a self-contained ESM bundle (no shared chunks) — the upstream
|
|
36
|
-
`vite.bundle.config.js` splits Lit into a `property.js` chunk, which would
|
|
37
|
-
break the single-file copy here. Use this one-shot config instead:
|
|
38
|
-
|
|
39
|
-
```js
|
|
40
|
-
// vite.self-contained.config.js
|
|
41
|
-
import { defineConfig } from 'vite';
|
|
42
|
-
import { resolve } from 'path';
|
|
43
|
-
export default defineConfig({
|
|
44
|
-
publicDir: false,
|
|
45
|
-
build: {
|
|
46
|
-
outDir: resolve(__dirname, 'NDS-Prototypes/dist-bundles-self-contained'),
|
|
47
|
-
emptyOutDir: true,
|
|
48
|
-
minify: true,
|
|
49
|
-
lib: {
|
|
50
|
-
entry: resolve(__dirname, 'src/components/icon-button/nds-icon-button.ts'),
|
|
51
|
-
name: 'NdsIconButton',
|
|
52
|
-
fileName: () => 'nds-icon-button.bundled.js',
|
|
53
|
-
formats: ['es'],
|
|
54
|
-
},
|
|
55
|
-
rollupOptions: { output: { inlineDynamicImports: true } },
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Then: `bunx vite build --config vite.self-contained.config.js`.
|
|
61
|
-
4. Copy the output:
|
|
62
|
-
```bash
|
|
63
|
-
cp NDS-Prototypes/dist-bundles-self-contained/nds-icon-button.bundled.js \
|
|
64
|
-
../../pie-players/packages/assessment-toolkit/src/components/vendor/nds/nds-icon-button.js
|
|
65
|
-
```
|
|
66
|
-
5. Update the `Last sync commit` row above with the new upstream SHA.
|
|
67
|
-
6. From `packages/assessment-toolkit`, run `bun run build` and verify the
|
|
68
|
-
calculator shell still mounts and the buttons still register.
|
|
69
|
-
|
|
70
|
-
## Build-time mutation
|
|
71
|
-
|
|
72
|
-
`scripts/build-ce-components.mjs` does **not** copy this file verbatim. It
|
|
73
|
-
rewrites every `customElements.define(IDENT, IDENT)` call into
|
|
74
|
-
`customElements.get(IDENT) || customElements.define(IDENT, IDENT)` while
|
|
75
|
-
mirroring `src/components/vendor/` → `dist/components/vendor/`.
|
|
76
|
-
|
|
77
|
-
This is required because the toolkit produces three CE bundles
|
|
78
|
-
(`ItemToolBar`, `SectionToolBar`, `PieAssessmentToolkit`), each of which
|
|
79
|
-
inlines this file via `bun build`. A host page that loads more than one of
|
|
80
|
-
those bundles would otherwise hit a duplicate-define `NotSupportedError`
|
|
81
|
-
when the second bundle's `nds-icon-button` register call fires.
|
|
82
|
-
|
|
83
|
-
If a future vendored bundle uses a different define call shape (e.g.
|
|
84
|
-
`customElements.define("literal-tag", Ctor)` or via an alias), the regex in
|
|
85
|
-
`build-ce-components.mjs` will silently miss it. Re-test by loading the
|
|
86
|
-
`PieAssessmentToolkit` and `ItemToolBar` CEs on the same page after a refresh.
|
|
87
|
-
|
|
88
|
-
## Runtime dependencies
|
|
89
|
-
|
|
90
|
-
The bundle's `connectedCallback` injects a `<link>` for the Renaissance
|
|
91
|
-
Roboto stylesheet. The toolkit pre-injects a CORS-clean Roboto from Google
|
|
92
|
-
Fonts before the first `<nds-icon-button>` mounts so the bundle's
|
|
93
|
-
`link[href*="Roboto"]` guard short-circuits.
|
|
94
|
-
|
|
95
|
-
The bundle's `render()` emits `fa-light fa-${iconName}` classes for icons.
|
|
96
|
-
Light is FontAwesome 6 **Pro** (commercial license). The toolkit loads:
|
|
97
|
-
|
|
98
|
-
1. FA Free from jsDelivr as a same-origin-friendly fallback.
|
|
99
|
-
2. FA Pro from `/_fa-pro/{fontawesome,light}.min.css` if the host exposes
|
|
100
|
-
that path. `apps/section-demos/vite.config.ts` proxies `/_fa-pro/*` →
|
|
101
|
-
`https://ui.renaissance.com/fonts/Font_Awesome_6_Pro/*`. Hosts without
|
|
102
|
-
the proxy fall through to FA Free's Solid weight (thicker stroke than
|
|
103
|
-
the design intends, but legible).
|
|
104
|
-
|
|
105
|
-
## Linting / formatting
|
|
106
|
-
|
|
107
|
-
This folder is excluded from `biome` checks via `biome.json`. The
|
|
108
|
-
`check-ce-define-safety` script allowlists this exact file because the
|
|
109
|
-
upstream Lit decorator emits a raw `customElements.define`; safety is
|
|
110
|
-
recovered at build time by the rewrite described above.
|