@nxgt/material-core 0.11.1 → 0.13.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 +36 -0
- package/README.md +283 -24
- package/dist/backgrounds/activity.d.ts +11 -0
- package/dist/backgrounds/activity.d.ts.map +1 -0
- package/dist/backgrounds/build.d.ts +9 -0
- package/dist/backgrounds/build.d.ts.map +1 -0
- package/dist/backgrounds/id-prefix.d.ts +8 -0
- package/dist/backgrounds/id-prefix.d.ts.map +1 -0
- package/dist/backgrounds/index.d.ts +20 -0
- package/dist/backgrounds/index.d.ts.map +1 -0
- package/dist/backgrounds/index.js +467 -0
- package/dist/backgrounds/index.js.map +20 -0
- package/dist/backgrounds/noise.d.ts +7 -0
- package/dist/backgrounds/noise.d.ts.map +1 -0
- package/dist/backgrounds/presets/grain.d.ts +9 -0
- package/dist/backgrounds/presets/grain.d.ts.map +1 -0
- package/dist/backgrounds/presets.d.ts +16 -0
- package/dist/backgrounds/presets.d.ts.map +1 -0
- package/dist/backgrounds/primitives.d.ts +22 -0
- package/dist/backgrounds/primitives.d.ts.map +1 -0
- package/dist/backgrounds/rng.d.ts +12 -0
- package/dist/backgrounds/rng.d.ts.map +1 -0
- package/dist/backgrounds/scatter.d.ts +25 -0
- package/dist/backgrounds/scatter.d.ts.map +1 -0
- package/dist/backgrounds/scene.d.ts +21 -0
- package/dist/backgrounds/scene.d.ts.map +1 -0
- package/dist/backgrounds/tones.d.ts +4 -0
- package/dist/backgrounds/tones.d.ts.map +1 -0
- package/dist/backgrounds/types.d.ts +53 -0
- package/dist/backgrounds/types.d.ts.map +1 -0
- package/dist/chunks/index-mw5fa8qa.js +119 -0
- package/dist/chunks/index-mw5fa8qa.js.map +12 -0
- package/dist/csp/index.d.ts +10 -0
- package/dist/csp/index.d.ts.map +1 -0
- package/dist/csp/index.js +21 -0
- package/dist/csp/index.js.map +9 -0
- package/dist/csp/nonce.d.ts +35 -0
- package/dist/csp/nonce.d.ts.map +1 -0
- package/dist/csp/policy.d.ts +33 -0
- package/dist/csp/policy.d.ts.map +1 -0
- package/dist/csp/zod-jitless.d.ts +4 -0
- package/dist/csp/zod-jitless.d.ts.map +1 -0
- package/dist/lib/drawer-room.d.ts +8 -0
- package/dist/lib/drawer-room.d.ts.map +1 -0
- package/dist/lib/drawer-room.js +17 -0
- package/dist/lib/drawer-room.js.map +10 -0
- package/dist/lib/escape-forward.d.ts +14 -0
- package/dist/lib/escape-forward.d.ts.map +1 -1
- package/dist/lib/escape-forward.js +22 -2
- package/dist/lib/escape-forward.js.map +3 -3
- package/dist/lib/initials.d.ts +12 -0
- package/dist/lib/initials.d.ts.map +1 -0
- package/dist/lib/initials.js +15 -0
- package/dist/lib/initials.js.map +10 -0
- package/dist/pdf-viewer/index.d.ts +1 -0
- package/dist/pdf-viewer/index.d.ts.map +1 -1
- package/dist/pdf-viewer/index.js +68 -38
- package/dist/pdf-viewer/index.js.map +6 -5
- package/dist/pdf-viewer/pdf-reveal-hit.d.ts +7 -0
- package/dist/pdf-viewer/pdf-reveal-hit.d.ts.map +1 -0
- package/dist/pdf-viewer/pdf-scroll-spy.d.ts +24 -8
- package/dist/pdf-viewer/pdf-scroll-spy.d.ts.map +1 -1
- package/dist/states/copy.d.ts +46 -0
- package/dist/states/copy.d.ts.map +1 -0
- package/dist/states/describe-error.d.ts +18 -0
- package/dist/states/describe-error.d.ts.map +1 -0
- package/dist/states/illustrations.d.ts +24 -0
- package/dist/states/illustrations.d.ts.map +1 -0
- package/dist/states/index.d.ts +11 -0
- package/dist/states/index.d.ts.map +1 -0
- package/dist/states/index.js +253 -0
- package/dist/states/index.js.map +13 -0
- package/dist/states/kinds.d.ts +28 -0
- package/dist/states/kinds.d.ts.map +1 -0
- package/dist/vite/csp-dev-header.d.ts +11 -0
- package/dist/vite/csp-dev-header.d.ts.map +1 -0
- package/dist/vite/csp-hashes.d.ts +23 -0
- package/dist/vite/csp-hashes.d.ts.map +1 -0
- package/dist/vite/csp-header.d.ts +10 -0
- package/dist/vite/csp-header.d.ts.map +1 -0
- package/dist/vite/csp-plugin.d.ts +12 -0
- package/dist/vite/csp-plugin.d.ts.map +1 -0
- package/dist/vite/css-chain.d.ts +13 -0
- package/dist/vite/css-chain.d.ts.map +1 -0
- package/dist/vite/dependency-closure.d.ts +8 -0
- package/dist/vite/dependency-closure.d.ts.map +1 -0
- package/dist/vite/fonts-inter.d.ts +15 -0
- package/dist/vite/fonts-inter.d.ts.map +1 -0
- package/dist/vite/fonts-plugin.d.ts +12 -0
- package/dist/vite/fonts-plugin.d.ts.map +1 -0
- package/dist/vite/index.d.ts +17 -81
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +478 -2
- package/dist/vite/index.js.map +18 -4
- package/dist/vite/libraries.d.ts +13 -0
- package/dist/vite/libraries.d.ts.map +1 -0
- package/dist/vite/nxgt-material.d.ts +12 -0
- package/dist/vite/nxgt-material.d.ts.map +1 -0
- package/dist/vite/options.d.ts +56 -0
- package/dist/vite/options.d.ts.map +1 -0
- package/dist/vite/pdf-plugin.d.ts +19 -0
- package/dist/vite/pdf-plugin.d.ts.map +1 -0
- package/dist/vite/pdfkit-standard-fonts.d.ts +74 -0
- package/dist/vite/pdfkit-standard-fonts.d.ts.map +1 -0
- package/dist/vite/styles-plugin.d.ts +27 -0
- package/dist/vite/styles-plugin.d.ts.map +1 -0
- package/dist/vite/styles-scan.d.ts +14 -0
- package/dist/vite/styles-scan.d.ts.map +1 -0
- package/docs/README.md +4 -0
- package/docs/backgrounds.md +95 -0
- package/docs/roadmap.md +37 -23
- package/docs/states.md +85 -0
- package/docs/troubleshooting.md +174 -3
- package/package.json +40 -4
package/docs/troubleshooting.md
CHANGED
|
@@ -22,6 +22,23 @@ file) is an example — search for the words around it.
|
|
|
22
22
|
- [`Could not read <url>: HTTP <status>` (`FilePreviewHttpError`)](#could-not-read-url-http-status-filepreviewhttperror)
|
|
23
23
|
- [`Refused to preview a URL with an unsafe scheme` (`FilePreviewUnsafeUrlError`)](#refused-to-preview-a-url-with-an-unsafe-scheme-filepreviewunsafeurlerror)
|
|
24
24
|
|
|
25
|
+
**Backgrounds**
|
|
26
|
+
|
|
27
|
+
- [`Background: preset "<id>" is not available yet; drawing "gradient".`](#background-preset-id-is-not-available-yet-drawing-gradient)
|
|
28
|
+
- [`Unsafe background scene at <path>: <reason>`](#unsafe-background-scene-at-path-reason)
|
|
29
|
+
- [`Unsafe background scene at <path>: url(#<id>) points to no element of the scene`](#unsafe-background-scene-at-path-urlid-points-to-no-element-of-the-scene)
|
|
30
|
+
|
|
31
|
+
**Content Security Policy**
|
|
32
|
+
|
|
33
|
+
- [`[nxgt-material] html.cspNonce is set, but the CSP is in hash mode (the default): set nxgtMaterial({ csp: { mode: 'nonce' } }) or drop html.cspNonce.`](#nxgt-material-htmlcspnonce-is-set-but-the-csp-is-in-hash-mode-the-default-set-nxgtmaterial-csp--mode-nonce---or-drop-htmlcspnonce)
|
|
34
|
+
- [`Invalid CSP nonce: only A-Z, a-z, 0-9, "+", "/", "_", "=" and "-" are allowed, got …`](#invalid-csp-nonce-only-a-z-a-z-0-9---_--and---are-allowed-got-)
|
|
35
|
+
- [`The CSP nonce is the build placeholder "NXGT_CSP_NONCE", which is public: …`](#the-csp-nonce-is-the-build-placeholder-nxgt_csp_nonce-which-is-public-)
|
|
36
|
+
- [`Invalid CSP hash "…": expected 'sha256-…', 'sha384-…' or 'sha512-…'`](#invalid-csp-hash--expected-sha256--sha384--or-sha512-)
|
|
37
|
+
- [`Invalid CSP directive name "…": only a-z and "-" are allowed.` and `Invalid CSP source "…" in "…": …`](#invalid-csp-directive-name--only-a-z-and---are-allowed)
|
|
38
|
+
- [`A CSP nonce needs at least 16 random bytes (128 bits), got …`](#a-csp-nonce-needs-at-least-16-random-bytes-128-bits-got-)
|
|
39
|
+
- [`applyCspNonce: the HTML holds no "NXGT_CSP_NONCE" placeholder, so no nonce was applied. …`](#applycspnonce-the-html-holds-no-nxgt_csp_nonce-placeholder-so-no-nonce-was-applied-)
|
|
40
|
+
- [`nxgtMaterial()` fails the build](#nxgtmaterial-fails-the-build)
|
|
41
|
+
|
|
25
42
|
**Build**
|
|
26
43
|
|
|
27
44
|
- [`… still references '#standard-fonts/' after the transform — …`](#-still-references-standard-fonts-after-the-transform--)
|
|
@@ -157,6 +174,53 @@ safePreviewUrl('javascript:alert(1)'); // null
|
|
|
157
174
|
const file = safePreviewUrl(url) ?? new Blob([text], { type: 'text/yaml' });
|
|
158
175
|
```
|
|
159
176
|
|
|
177
|
+
## Backgrounds
|
|
178
|
+
|
|
179
|
+
How the engine is used is in the [Backgrounds page](backgrounds.md).
|
|
180
|
+
|
|
181
|
+
### `Background: preset "<id>" is not available yet; drawing "gradient".`
|
|
182
|
+
|
|
183
|
+
`resolveShippedPreset` got an id that is not in `SHIPPED_BACKGROUND_PRESETS`: a
|
|
184
|
+
preset that is planned (it is in `BACKGROUND_PRESETS`) but not built yet, or a
|
|
185
|
+
typo from JavaScript. It returns `'gradient'` and prints this once per id,
|
|
186
|
+
except when `NODE_ENV` is `production`. Use a shipped preset:
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import { SHIPPED_BACKGROUND_PRESETS } from '@nxgt/material-core/backgrounds';
|
|
190
|
+
|
|
191
|
+
console.log(SHIPPED_BACKGROUND_PRESETS); // ['gradient', 'grain']
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### `Unsafe background scene at <path>: <reason>`
|
|
195
|
+
|
|
196
|
+
`assertSafeScene` found a node a strict CSP could not accept. `<path>` is the
|
|
197
|
+
tags from the root to the node (`svg>defs>filter`). `<reason>` is one of: a tag
|
|
198
|
+
or attribute that is not allowed (`style`, `on*` and `href` never are), a
|
|
199
|
+
number that is not finite, an attribute with markup, an escape or a control
|
|
200
|
+
character, an id or class with unusual characters, an id without the
|
|
201
|
+
`<idPrefix>-` prefix or used twice, a URL in a value, or a `url()` that is not
|
|
202
|
+
a local id. Fix the builder to emit only `SCENE_TAGS` and `SCENE_ATTRIBUTES`:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
import { assertSafeScene, el, svgIdPrefix } from '@nxgt/material-core/backgrounds';
|
|
206
|
+
|
|
207
|
+
const prefix = svgIdPrefix('bg');
|
|
208
|
+
assertSafeScene(el('svg', { viewBox: '0 0 10 10' }, []), prefix);
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### `Unsafe background scene at <path>: url(#<id>) points to no element of the scene`
|
|
212
|
+
|
|
213
|
+
A `fill`, `filter`, `mask` or similar attribute references `url(#id)`, but no
|
|
214
|
+
element of the same scene has that `id`. Give the element the id (with the
|
|
215
|
+
`idPrefix`), or drop the reference:
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
// `prefix` is the one from svgIdPrefix, as above
|
|
219
|
+
const id = `${prefix}-fade`;
|
|
220
|
+
el('linearGradient', { id }, []);
|
|
221
|
+
el('rect', { fill: `url(#${id})` }, []);
|
|
222
|
+
```
|
|
223
|
+
|
|
160
224
|
## Build
|
|
161
225
|
|
|
162
226
|
### `… still references '#standard-fonts/' after the transform — …`
|
|
@@ -168,9 +232,10 @@ rather than the server at its first request. Pin the previous
|
|
|
168
232
|
|
|
169
233
|
### `Cannot find module '#standard-fonts/Helvetica' from '…'`
|
|
170
234
|
|
|
171
|
-
A server bundle that contains pdfkit, run without `node_modules`.
|
|
172
|
-
`
|
|
173
|
-
keep the library external so pdfkit
|
|
235
|
+
A server bundle that contains pdfkit, run without `node_modules`. Build it
|
|
236
|
+
with `nxgtMaterial({ pdf: { bundle: true } })` (or add `pdfkitStandardFonts()`;
|
|
237
|
+
see the README's `/vite` section), or keep the library external so pdfkit
|
|
238
|
+
loads from `node_modules`.
|
|
174
239
|
|
|
175
240
|
### `Cannot find module '…/pdfkit/js/standard-fonts/Helvetica.cjs'`
|
|
176
241
|
|
|
@@ -233,3 +298,109 @@ import { withNxgtPrint } from '@nxgt/material/next';
|
|
|
233
298
|
|
|
234
299
|
export default withNxgtPrint({ output: 'standalone' });
|
|
235
300
|
```
|
|
301
|
+
|
|
302
|
+
## Content Security Policy
|
|
303
|
+
|
|
304
|
+
### `[nxgt-material] html.cspNonce is set, but the CSP is in hash mode (the default): set nxgtMaterial({ csp: { mode: 'nonce' } }) or drop html.cspNonce.`
|
|
305
|
+
|
|
306
|
+
Thrown by `nxgtMaterial()` (`/vite`) in its default hash mode when the Vite config sets `html.cspNonce`. Drop it, or use `nxgtMaterial({ csp: { mode: 'nonce' } })`, where the plugin sets it. The libraries' [troubleshooting pages](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/troubleshooting.md#nxgt-material-htmlcspnonce-is-set-but-the-csp-is-in-hash-mode-the-default-set-nxgtmaterial-csp--mode-nonce---or-drop-htmlcspnonce) ([Vue](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/troubleshooting.md#nxgt-material-htmlcspnonce-is-set-but-the-csp-is-in-hash-mode-the-default-set-nxgtmaterial-csp--mode-nonce---or-drop-htmlcspnonce)) cover the plugin's other messages.
|
|
307
|
+
|
|
308
|
+
### `Invalid CSP nonce: only A-Z, a-z, 0-9, "+", "/", "_", "=" and "-" are allowed, got …`
|
|
309
|
+
|
|
310
|
+
Thrown by `applyCspNonce`, `cspPolicy` and `zodJitlessTag` (`/csp`). The
|
|
311
|
+
nonce holds a character outside the base64 alphabet (a quote, `<`, a space,
|
|
312
|
+
an empty string): written into `nonce="…"` or `'nonce-…'` it would break out
|
|
313
|
+
of the attribute or the header.
|
|
314
|
+
|
|
315
|
+
Generate it with `createCspNonce()`, or pass the value your framework made
|
|
316
|
+
unchanged (a base64 string):
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import { createCspNonce, cspPolicy } from '@nxgt/material-core/csp';
|
|
320
|
+
|
|
321
|
+
const nonce = createCspNonce();
|
|
322
|
+
const { header } = cspPolicy({ nonce });
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### `The CSP nonce is the build placeholder "NXGT_CSP_NONCE", which is public: …`
|
|
326
|
+
|
|
327
|
+
Thrown by `applyCspNonce` and `cspPolicy` when the nonce you pass is
|
|
328
|
+
`CSP_NONCE_PLACEHOLDER`. That string is written in the built HTML to be
|
|
329
|
+
replaced per request; a policy that trusts it trusts anything that can read
|
|
330
|
+
your page, so it is refused.
|
|
331
|
+
|
|
332
|
+
Replace the placeholder with a fresh nonce for each request, and send the
|
|
333
|
+
same nonce in the header:
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
import { applyCspNonce, createCspNonce, cspPolicy } from '@nxgt/material-core/csp';
|
|
337
|
+
|
|
338
|
+
const nonce = createCspNonce();
|
|
339
|
+
const page = applyCspNonce(builtHtml, nonce);
|
|
340
|
+
const { header } = cspPolicy({ nonce });
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
On static hosting, where no request can carry its own nonce, allow the inline
|
|
344
|
+
scripts by hash instead: `cspPolicy({ hashes: { script: [await cspHash(code)] } })`.
|
|
345
|
+
Its `style-src-elem` is then `'self' 'unsafe-inline'`, for the `<style>`
|
|
346
|
+
elements the libraries create at runtime; a nonce is the strict option for
|
|
347
|
+
styles.
|
|
348
|
+
|
|
349
|
+
### `Invalid CSP hash "…": expected 'sha256-…', 'sha384-…' or 'sha512-…'`
|
|
350
|
+
|
|
351
|
+
Thrown by `cspPolicy` for an entry of `hashes.script` or `hashes.style` that
|
|
352
|
+
is not a hash source (a nonce, a keyword, a malformed or non-base64 digest).
|
|
353
|
+
Build the entries with `cspHash`:
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
const hash = await cspHash(inlineScriptText);
|
|
357
|
+
cspPolicy({ hashes: { script: [hash] } });
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### `Invalid CSP directive name "…": only a-z and "-" are allowed.`
|
|
361
|
+
|
|
362
|
+
Also `Invalid CSP source "…" in "…": a source holds no ";", ",", whitespace or control character.`
|
|
363
|
+
Thrown by `cspPolicy` for a key or a source of its `directives` option that
|
|
364
|
+
could end the directive and start another (`"a; script-src *"`). One entry of
|
|
365
|
+
the array is one source: split a list into several entries.
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
cspPolicy({ directives: { 'connect-src': ['https://api.example.com', 'wss://live.example.com'] } });
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### `A CSP nonce needs at least 16 random bytes (128 bits), got …`
|
|
372
|
+
|
|
373
|
+
Thrown by `createCspNonce(bytes)` for fewer than 16 bytes, which a guesser
|
|
374
|
+
could try. Call it with no argument (16 bytes) or a larger count.
|
|
375
|
+
|
|
376
|
+
### `applyCspNonce: the HTML holds no "NXGT_CSP_NONCE" placeholder, so no nonce was applied. …`
|
|
377
|
+
|
|
378
|
+
Thrown by `applyCspNonce(html, nonce, placeholder?)` when `html` does not
|
|
379
|
+
contain the placeholder. Served as it is, the page's scripts would carry no
|
|
380
|
+
nonce and the policy would block them. Two causes:
|
|
381
|
+
|
|
382
|
+
- the HTML comes from a hash-mode build (the default of `nxgtMaterial()`),
|
|
383
|
+
which writes no placeholder: build with
|
|
384
|
+
`nxgtMaterial({ csp: { mode: 'nonce' } })`, or serve the hash-mode header
|
|
385
|
+
from `dist/.vite/nxgt-csp.json` without calling `applyCspNonce`;
|
|
386
|
+
- the build set its own `csp.placeholder` (or `html.cspNonce`): pass the same
|
|
387
|
+
string as the third argument.
|
|
388
|
+
|
|
389
|
+
```ts
|
|
390
|
+
const page = applyCspNonce(builtHtml, nonce, 'MY_PLACEHOLDER');
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### `nxgtMaterial()` fails the build
|
|
394
|
+
|
|
395
|
+
**When:** `vite build` stops with a message that starts `[nxgt-material]`
|
|
396
|
+
(`stylesheet is never imported`, `Tailwind is not told to scan the package`,
|
|
397
|
+
`@fontsource-variable/inter is not installed`).
|
|
398
|
+
**Why:** `nxgtMaterial()` checks at build time what the library needs, and
|
|
399
|
+
fails with the exact fix when a part is missing. The messages are printed by
|
|
400
|
+
the libraries' plugin: their wording is in the libraries' troubleshooting pages
|
|
401
|
+
([`@nxgt/material`](https://cdn.jsdelivr.net/npm/@nxgt/material@2/docs/troubleshooting.md#content-security-policy), [`@nxgt/material-vue`](https://cdn.jsdelivr.net/npm/@nxgt/material-vue@0/docs/troubleshooting.md#content-security-policy)).
|
|
402
|
+
**Fix:** apply the fix the message prints, or turn the check off:
|
|
403
|
+
|
|
404
|
+
```ts
|
|
405
|
+
nxgtMaterial({ styles: false, fonts: { sans: false } }, '@nxgt/material');
|
|
406
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/material-core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The framework-free core of @nxgt/material and @nxgt/material-vue: the PDF document model and its react-pdf renderer, print formatters, PDF file helpers, the PDF viewer's pure modules, the currency digits, the file-size formatter, the field-blur layers, a field's first focusable control, a repeatable row group's focus and announcement rules, the aria-describedby joiner, the inert background of a modal layer, Escape forwarded while an overlay closes, the Toaster's touch-hover guard and its focus hand-back, the page's Content Security Policy nonce, an object built on first use, the zod issue messages, the date range presets, the debounce, accent-insensitive text matching and the race-free async search behind Autocomplete and SearchField, the submit guard, the code error map, the two-factor helpers (a grouped TOTP secret, the recovery codes' file, a text download), printing one element of the page, the file preview's kind detection and text reader, the pdfkit fonts Vite plugin, a CSP-safe Vite assetsInlineLimit and the Node-only pdfkit fonts resolution for Next.js and Nuxt builds",
|
|
3
|
+
"version": "0.13.0",
|
|
4
|
+
"description": "The framework-free core of @nxgt/material and @nxgt/material-vue: the PDF document model and its react-pdf renderer, print formatters, PDF file helpers, the PDF viewer's pure modules, the currency digits, the file-size formatter, the field-blur layers, a field's first focusable control, a repeatable row group's focus and announcement rules, the aria-describedby joiner, the inert background of a modal layer, Escape forwarded while an overlay closes and kept for a field's open list, the Toaster's touch-hover guard and its focus hand-back, the page's Content Security Policy nonce, the server and build side of the CSP (a nonce per request, the policy header, hashes, zod's jitless script), an object built on first use, the zod issue messages, the date range presets, the debounce, accent-insensitive text matching and the race-free async search behind Autocomplete and SearchField, the submit guard, the code error map, an avatar's initials, the two-factor helpers (a grouped TOTP secret, the recovery codes' file, a text download), the empty and error states' kinds, copy keys, error details and illustration geometry, printing one element of the page, the file preview's kind detection and text reader, the background presets' engine (a seeded generator, scattering, motif shapes, a safe SVG scene format, the activity observer), the pdfkit fonts Vite plugin, the nxgtMaterial() Vite plugin (a strict CSP by hash or nonce, fonts, a styles check), a CSP-safe Vite assetsInlineLimit and the Node-only pdfkit fonts resolution for Next.js and Nuxt builds",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"email": "stevegires@gmail.com"
|
|
@@ -178,11 +178,21 @@
|
|
|
178
178
|
"import": "./dist/lib/debounce.js",
|
|
179
179
|
"default": "./dist/lib/debounce.js"
|
|
180
180
|
},
|
|
181
|
+
"./initials": {
|
|
182
|
+
"types": "./dist/lib/initials.d.ts",
|
|
183
|
+
"import": "./dist/lib/initials.js",
|
|
184
|
+
"default": "./dist/lib/initials.js"
|
|
185
|
+
},
|
|
181
186
|
"./text-match": {
|
|
182
187
|
"types": "./dist/lib/text-match.d.ts",
|
|
183
188
|
"import": "./dist/lib/text-match.js",
|
|
184
189
|
"default": "./dist/lib/text-match.js"
|
|
185
190
|
},
|
|
191
|
+
"./drawer-room": {
|
|
192
|
+
"types": "./dist/lib/drawer-room.d.ts",
|
|
193
|
+
"import": "./dist/lib/drawer-room.js",
|
|
194
|
+
"default": "./dist/lib/drawer-room.js"
|
|
195
|
+
},
|
|
186
196
|
"./async-search": {
|
|
187
197
|
"types": "./dist/lib/async-search.d.ts",
|
|
188
198
|
"import": "./dist/lib/async-search.js",
|
|
@@ -223,15 +233,31 @@
|
|
|
223
233
|
"import": "./dist/vite/index.js",
|
|
224
234
|
"default": "./dist/vite/index.js"
|
|
225
235
|
},
|
|
236
|
+
"./states": {
|
|
237
|
+
"types": "./dist/states/index.d.ts",
|
|
238
|
+
"import": "./dist/states/index.js",
|
|
239
|
+
"default": "./dist/states/index.js"
|
|
240
|
+
},
|
|
241
|
+
"./backgrounds": {
|
|
242
|
+
"types": "./dist/backgrounds/index.d.ts",
|
|
243
|
+
"import": "./dist/backgrounds/index.js",
|
|
244
|
+
"default": "./dist/backgrounds/index.js"
|
|
245
|
+
},
|
|
226
246
|
"./pdfkit-fonts": {
|
|
227
247
|
"types": "./dist/pdfkit-fonts/index.d.ts",
|
|
228
248
|
"import": "./dist/pdfkit-fonts/index.js",
|
|
229
249
|
"default": "./dist/pdfkit-fonts/index.js"
|
|
230
250
|
},
|
|
251
|
+
"./csp": {
|
|
252
|
+
"types": "./dist/csp/index.d.ts",
|
|
253
|
+
"import": "./dist/csp/index.js",
|
|
254
|
+
"default": "./dist/csp/index.js"
|
|
255
|
+
},
|
|
231
256
|
"./package.json": "./package.json"
|
|
232
257
|
},
|
|
233
258
|
"sideEffects": false,
|
|
234
259
|
"keywords": [
|
|
260
|
+
"backgrounds",
|
|
235
261
|
"pdf",
|
|
236
262
|
"react-pdf",
|
|
237
263
|
"print",
|
|
@@ -288,22 +314,28 @@
|
|
|
288
314
|
"src/lib/csp-nonce.ts",
|
|
289
315
|
"src/lib/lazy-object.ts",
|
|
290
316
|
"src/lib/debounce.ts",
|
|
317
|
+
"src/lib/initials.ts",
|
|
291
318
|
"src/lib/text-match.ts",
|
|
292
319
|
"src/lib/async-search.ts",
|
|
320
|
+
"src/lib/drawer-room.ts",
|
|
293
321
|
"src/lib/submit-guard.ts",
|
|
294
322
|
"src/lib/code-errors.ts",
|
|
295
323
|
"src/lib/two-factor.ts",
|
|
296
324
|
"src/lib/print-only.ts",
|
|
297
325
|
"src/file-preview/index.ts",
|
|
298
326
|
"src/pdf-viewer/index.ts",
|
|
327
|
+
"src/backgrounds/index.ts",
|
|
299
328
|
"src/vite/index.ts",
|
|
300
|
-
"src/
|
|
329
|
+
"src/states/index.ts",
|
|
330
|
+
"src/pdfkit-fonts/index.ts",
|
|
331
|
+
"src/csp/index.ts"
|
|
301
332
|
]
|
|
302
333
|
},
|
|
303
334
|
"dependencies": {
|
|
304
335
|
"intl-messageformat": "^11.2.14"
|
|
305
336
|
},
|
|
306
337
|
"devDependencies": {
|
|
338
|
+
"@fontsource-variable/inter": "^5",
|
|
307
339
|
"@nxgt/material-testing": "0.0.0",
|
|
308
340
|
"@react-pdf/renderer": "^4.9.0",
|
|
309
341
|
"@types/bun": "^1.4.2",
|
|
@@ -314,11 +346,15 @@
|
|
|
314
346
|
"vitest": "^4.1.10"
|
|
315
347
|
},
|
|
316
348
|
"peerDependencies": {
|
|
349
|
+
"@fontsource-variable/inter": ">=5",
|
|
317
350
|
"@react-pdf/renderer": "^4.9.0",
|
|
318
351
|
"react": "^18.2.0 || ^19.0.0",
|
|
319
|
-
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
352
|
+
"vite": "^5.2.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|
|
320
353
|
},
|
|
321
354
|
"peerDependenciesMeta": {
|
|
355
|
+
"@fontsource-variable/inter": {
|
|
356
|
+
"optional": true
|
|
357
|
+
},
|
|
322
358
|
"@react-pdf/renderer": {
|
|
323
359
|
"optional": true
|
|
324
360
|
},
|