@nxgt/material 3.10.0 → 3.10.1

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 (34) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +18 -1
  3. package/dist/background-cEqcZQ3v.js +249 -0
  4. package/dist/backgrounds.js +1 -1
  5. package/dist/{components-D5d2rflJ.js → components-fqz7csN3.js} +5 -5
  6. package/dist/components.js +16 -16
  7. package/dist/editor.js +1 -1
  8. package/dist/{empty-state-COAV2d-R.js → empty-state-BOZWBC5q.js} +1 -1
  9. package/dist/{icon-sprites-CZ3vcD7P.js → icon-sprites-FxHyqyhg.js} +18 -5
  10. package/dist/icons-scene-BpIauJ5d.js +27 -0
  11. package/dist/illustration-Hj-Q9se9.js +91 -0
  12. package/dist/illustrations.js +1 -1
  13. package/dist/lib/backgrounds/background/partials/icons-scene.d.ts +3 -1
  14. package/dist/lib/components/ui/primitives/icon/icon-sprites.d.ts +13 -1
  15. package/dist/lib/illustrations/plated-illustration.d.ts +3 -1
  16. package/dist/lib/illustrations/use-illustration.d.ts +1 -0
  17. package/dist/lib/theme-picker/partials/tile-icons.d.ts +2 -1
  18. package/dist/main.js +28 -28
  19. package/dist/pdf-reader.js +1 -1
  20. package/dist/plated-illustration-B7fcgOED.js +22 -0
  21. package/dist/{public-DGvtAz7M.js → public-Cl4dLDHQ.js} +1 -1
  22. package/dist/theme-picker.js +53 -52
  23. package/dist/{use-chat-composer-CkEPJo5I.js → use-chat-composer-UHlGFSm0.js} +4240 -4235
  24. package/docs/components/overlays-and-menus.md +4 -1
  25. package/docs/components/primitives.md +14 -0
  26. package/docs/guides/backgrounds.md +1 -1
  27. package/docs/guides/icon-motifs.md +36 -8
  28. package/docs/guides/illustrations.md +1 -1
  29. package/docs/troubleshooting.md +14 -2
  30. package/package.json +2 -2
  31. package/dist/background-CAWV_qSk.js +0 -247
  32. package/dist/icons-scene-bA7I4wdP.js +0 -24
  33. package/dist/illustration-DfPJtkFY.js +0 -86
  34. package/dist/plated-illustration-C3z0hP9U.js +0 -19
@@ -158,7 +158,10 @@ instead of capping; it does not pin the header or footer.
158
158
 
159
159
  `DialogContent` does not render a close button by itself — add `DialogClose`.
160
160
  It ignores outside clicks that land on an open `Combobox` list, so a combobox
161
- inside a dialog works. On open it moves focus into the dialog: to its first
161
+ inside a dialog works. The list (`Combobox`, `ComboboxField`,
162
+ `ComboboxFormField`, `CountryField`) is portaled to `<body>`, where a modal
163
+ layer sets `pointer-events: none`, so it sets `pointer-events: auto` itself:
164
+ in a `Dialog`, a `Sheet` or a `Drawer` an option is picked by mouse or touch. On open it moves focus into the dialog: to its first
162
165
  control, or to the content itself when it has none. An `onOpenAutoFocus` of
163
166
  yours that calls `event.preventDefault()` keeps focus off that control (then
164
167
  focus what you want yourself): a modal dialog then focuses its content, as the
@@ -448,6 +448,20 @@ import { Icon, IconSpritesProvider } from '@nxgt/material/components';
448
448
  // → /static/icons/solid.svg#bell
449
449
  ```
450
450
 
451
+ `IconSpritesProvider` also takes `edition: 'pro' | 'free'` (default `'pro'`; a
452
+ nested provider without one keeps its parent's). `edition="free"` is for apps
453
+ that serve Font Awesome Free's `solid.svg`, `regular.svg` and `brands.svg` only:
454
+ every `Icon`, `Illustration` and icon `Background` below it draws any other
455
+ style (the default duotone included) from `solid.svg`, and renames a Pro-only
456
+ name to its Free twin (`chevrons-left` to `angles-left`). `useIconEdition()` reads it.
457
+
458
+ ```tsx
459
+ <IconSpritesProvider base="/static/icons/" edition="free">
460
+ <Icon name="bell" />
461
+ </IconSpritesProvider>;
462
+ // → /static/icons/solid.svg#bell
463
+ ```
464
+
451
465
  **Storybook:** `Primitives/Icon` · **Vue:** `Icon`
452
466
 
453
467
  ---
@@ -326,7 +326,7 @@ them. The theme picker draws a small tile for a theme with a celestial preset.
326
326
 
327
327
  `preset="icons"` scatters Font Awesome icons over a faint wash. The library ships **no icon artwork**: each icon is a
328
328
  `<use>` of a sprite file your app serves (`/assets/icons/sprites/` by default; `IconSpritesProvider base="/static/icons/"`
329
- moves it, as for `Icon`). Font Awesome Pro is licensed to you, not to this package. The [icon motifs guide](icon-motifs.md) puts icons, skies, illustrations and themes together.
329
+ moves it, as for `Icon`; `edition="free"` draws the Free sheets, see the [Free edition](icon-motifs.md#the-free-edition)). Font Awesome Pro is licensed to you, not to this package. The [icon motifs guide](icon-motifs.md) puts icons, skies, illustrations and themes together.
330
330
 
331
331
  ```tsx
332
332
  import '@nxgt/material/backgrounds/icons.css'; // or backgrounds.css
@@ -17,7 +17,7 @@ Free works the same way.
17
17
  | You have | Serve | Use |
18
18
  | --- | --- | --- |
19
19
  | the Pro 7.3 pack | one sheet per style you draw, in `public/assets/icons/sprites/`: `duotone-thin.svg` (the default look), `duotone.svg`, `solid.svg`, `sharp-solid.svg`… A non-classic family is `<family>-<style>.svg` | the defaults |
20
- | Font Awesome Free | `solid.svg`, `regular.svg` and `brands.svg` from `@fortawesome/fontawesome-free/sprites/`, copied to the same folder | `iconStyle="solid"` (and `iconStyle="solid"` on an `Illustration`) |
20
+ | Font Awesome Free | `solid.svg`, `regular.svg` and `brands.svg` from `@fortawesome/fontawesome-free/sprites/`, copied to the same folder | `<IconSpritesProvider base="…" edition="free">` once at the root ([Free edition](#the-free-edition)) |
21
21
 
22
22
  The Free icons are CC BY 4.0: credit Font Awesome where you show them (the
23
23
  previews below are drawn with the Free `solid` sheet, Font Awesome Free 7.3.1,
@@ -175,19 +175,47 @@ a sheet that is not served draws nothing and the tile keeps its wash.
175
175
 
176
176
  See [themes](themes.md#icon-motifs-in-a-theme).
177
177
 
178
+ ## The Free edition
179
+
180
+ Font Awesome Free has three sheets, `solid`, `regular` and `brands`, and none
181
+ for duotone, light, thin or the other families. Tell the provider once:
182
+
183
+ ```tsx
184
+ <IconSpritesProvider base="/static/icons/" edition="free">
185
+ <App />
186
+ </IconSpritesProvider>
187
+ ```
188
+
189
+ Below it, in every `Icon` (so the app shell's menu, `AccountMenu`,
190
+ `LanguageSwitcher`, `LoadMoreButton`, the data table's pagination…), every
191
+ `Illustration` and state illustration, every `Background preset="icons"` and
192
+ every theme tile:
193
+
194
+ - a style Free lacks is drawn from `solid.svg`: the default duotone, `thin`,
195
+ `light`, `sharp-*` and every other family. `regular` and `brands` stay;
196
+ - a Pro-only name is renamed to its Free twin, the same one in every place
197
+ (the table below, plus `chevrons-*` to `angles-*`, `badge-check` to
198
+ `circle-check`, `loader` to `spinner`).
199
+
200
+ The default is `edition="pro"`, and nothing changes for Pro. A nested
201
+ `IconSpritesProvider` without an `edition` keeps its parent's. The workaround of
202
+ serving a copy of `solid.svg` as `duotone.svg` is no longer needed. A name of
203
+ your own that Free lacks is not renamed: pass its Free name. The `regular`
204
+ sheet of Free holds fewer names than `solid`: draw an icon it lacks in `solid`.
205
+
178
206
  ## Free fallbacks for Pro-only names
179
207
 
180
- Most suggested names exist in Font Awesome Free. These do not, and stand in
181
- with a Free neighbour when you serve the Free sheets (pass `hero`, `satellites`
182
- or `icons` with the Free name):
208
+ Most suggested names exist in Font Awesome Free. These do not. With
209
+ `edition="free"` they stand in with the Free neighbour below on their own; with
210
+ another setup, pass `hero`, `satellites` or `icons` with the Free name:
183
211
 
184
212
  | Where | Pro-only name | A Free neighbour |
185
213
  | --- | --- | --- |
186
- | `school` pack | `backpack` | `bag-shopping` |
214
+ | `school` pack | `backpack` | `school` |
187
215
  | `nature` pack | `flower` | `seedling` |
188
- | base scenes | `sparkles`, `wifi-slash`, `cloud-slash`, `party-horn`, `hand-wave`, `lock-keyhole`, `traffic-cone` | `star`, `wifi`, `cloud`, `gift`, `hand`, `lock`, `triangle-exclamation` |
189
- | health scenes | `folder-user`, `clipboard-medical`, `calendar-clock`, `siren-on` | `folder`, `clipboard`, `calendar-check`, `triangle-exclamation` |
190
- | education scenes | `backpack`, `clipboard-list-check`, `books`, `file-chart-column` | `bag-shopping`, `clipboard-check`, `book`, `file-lines` |
216
+ | base scenes | `sparkles`, `wifi-slash`, `cloud-slash`, `party-horn`, `hand-wave`, `lock-keyhole`, `traffic-cone` | `wand-magic-sparkles`, `wifi`, `cloud`, `gift`, `hand`, `lock`, `triangle-exclamation` |
217
+ | health scenes | `folder-user`, `clipboard-medical`, `calendar-clock`, `siren-on` | `folder`, `notes-medical`, `calendar-check`, `truck-medical` |
218
+ | education scenes | `backpack`, `clipboard-list-check`, `books`, `file-chart-column` | `school`, `clipboard-check`, `book`, `file-lines` |
191
219
 
192
220
  ## Where to go next
193
221
 
@@ -132,7 +132,7 @@ import { EmptyState } from '@nxgt/material/components';
132
132
  Importing the entry adds the ids to `SceneId`; `EDUCATION_SUGGESTED_ICONS` lists
133
133
  the icon names the set draws, hero first. Some of them (`backpack`,
134
134
  `clipboard-list-check`, `books`, `file-chart-column`) are Font Awesome Pro
135
- icons: serve a Pro sprite, or pass `icons` with Free neighbours.
135
+ icons: serve a Pro sprite, or set `edition="free"` on `IconSpritesProvider`, which draws their Free twins (see the [Free edition](icon-motifs.md#the-free-edition)).
136
136
 
137
137
  ## Turn them on for an app
138
138
 
@@ -95,6 +95,7 @@ words in your error.
95
95
  - [A toast covers the form's button on a phone](#a-toast-covers-the-forms-button-on-a-phone)
96
96
  - [A toast never goes away after a tap](#a-toast-never-goes-away-after-a-tap)
97
97
  - [A toast's action cannot be clicked while a dialog is open](#a-toasts-action-cannot-be-clicked-while-a-dialog-is-open)
98
+ - [A combobox option cannot be clicked in a dialog, sheet or drawer](#a-combobox-option-cannot-be-clicked-in-a-dialog-sheet-or-drawer)
98
99
  - [`toasts.success(message, { action })` shows no action button](#toastssuccessmessage--action--shows-no-action-button)
99
100
  - [An accessibility audit reports low contrast on a toast's action](#an-accessibility-audit-reports-low-contrast-on-a-toasts-action)
100
101
  - [A `Banner` is not announced while a dialog is open](#a-banner-is-not-announced-while-a-dialog-is-open)
@@ -783,13 +784,13 @@ public/assets/icons/sprites/solid.svg ← <Icon name="atom" type="solid" />
783
784
  public/assets/icons/sprites/sharp-solid.svg ← <Icon name="atom" family="sharp" type="solid" />
784
785
  ```
785
786
 
786
- Serve one sheet per style you use, from your own Font Awesome Pro kit.
787
+ Serve one sheet per style you use, from your own Font Awesome Pro kit. With Font Awesome Free (`solid.svg`, `regular.svg`, `brands.svg`), set `edition="free"` on `IconSpritesProvider`: the library's own icons (the app shell menu, `AccountMenu`, pagination…) are duotone, and they then draw from `solid.svg`.
787
788
 
788
789
  ### A background, an illustration or a theme tile draws no icons
789
790
 
790
791
  **When:** `Background preset="icons"`, an `Illustration`, an `EmptyState` with an `illustration`, or a `ThemePicker` tile shows its wash or its plate and no icons. The network tab shows a `404` for `/assets/icons/sprites/duotone-thin.svg` (the default style), or for the sheet of the `iconStyle` you chose. No error is thrown.
791
792
  **Why:** these icons are `<use>` references to sprite sheets your app serves; the library ships none (the Font Awesome licence does not allow it). The default style is `duotone-thin`, so a Free-only app, which has `solid.svg`, `regular.svg` and `brands.svg`, draws nothing until it asks for a Free style. A name the sheet does not hold is blank too, such as `backpack` or `books`, which exist in Pro only. A theme tile with no icons keeps its wash: that is the intended fallback, not a bug.
792
- **Fix:** serve the sheet (or move the base with `IconSpritesProvider`), or choose a style you serve, and give Free names where you have only Free:
793
+ **Fix:** serve the sheet (or move the base with `IconSpritesProvider`). With only the Free sheets, say so: `<IconSpritesProvider base="/assets/icons/sprites/" edition="free">` draws every style Free lacks from `solid.svg` and the Pro-only names as their Free twin, so the app shell's menu, `AccountMenu` and the rest need nothing else (do not copy `solid.svg` to `duotone.svg`). Or choose a style you serve, and give Free names:
793
794
 
794
795
  ```tsx
795
796
  // Free sprites copied to public/assets/icons/sprites/solid.svg
@@ -1746,6 +1747,17 @@ counted a pointer down on a toast as outside the dialog.
1746
1747
  inside the `Toaster` as inside, so the action runs and the dialog stays open.
1747
1748
  Sonner's own `Toaster` keeps the old behaviour.
1748
1749
 
1750
+ ### A combobox option cannot be clicked in a dialog, sheet or drawer
1751
+
1752
+ **When:** a `ComboboxField`, `ComboboxFormField` or `Combobox` inside a modal
1753
+ `Dialog`, `Sheet` or `Drawer` opens its list and shows the options, but a mouse
1754
+ or touch click on one does nothing (a test reports `<html> intercepts pointer
1755
+ events`); the keyboard picks.
1756
+ **Why:** a modal layer sets `pointer-events: none` on `<body>`, and the list,
1757
+ portaled there, inherited it.
1758
+ **Fix:** update `@nxgt/material`: the list sets `pointer-events: auto`.
1759
+ `SelectFormField` was the workaround meanwhile.
1760
+
1749
1761
  ### `toasts.success(message, { action })` shows no action button
1750
1762
 
1751
1763
  **When:** a preset is called the way sonner's own `toast.success` is, with a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.10.0",
3
+ "version": "3.10.1",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -353,7 +353,7 @@
353
353
  "docs:previews": "rm -rf node_modules/.cache/nxgt-preview-free/missing && NXGT_PREVIEW_FREE=1 vitest run --project previews && bun .storybook/preview-free-report.ts"
354
354
  },
355
355
  "dependencies": {
356
- "@nxgt/material-core": "^0.29.0",
356
+ "@nxgt/material-core": "^0.29.1",
357
357
  "@base-ui/react": "^1.6.0",
358
358
  "@dnd-kit/core": "^6.3.1",
359
359
  "@dnd-kit/sortable": "^10.0.0",
@@ -1,247 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
- import { t } from "./is-production-GLw59WU8.js";
3
- import { n } from "./icon-sprites-CZ3vcD7P.js";
4
- import { a as r, t as i } from "./theme-context-Cofk6vgs.js";
5
- import { t as a } from "./compose-refs-DZ0iIVF-.js";
6
- import { t as o } from "./use-background-activity-KxQgelFF.js";
7
- import { t as s } from "./scene-svg-DJKa5vsg.js";
8
- import { n as c, r as l, t as u } from "./scene-options-CCy3V7XS.js";
9
- import { Suspense as d, lazy as f, memo as p, useId as ee, useMemo as m, useRef as h } from "react";
10
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
- import { IconRefError as y, resolveIconStyles as b, resolveIcons as x } from "@nxgt/material-core/icons";
12
- import { SCENE_LAYER as S, buildBackgroundScene as C, presetLayers as w, resolveBackgroundPreset as T, svgIdPrefix as E } from "@nxgt/material-core/backgrounds";
13
- //#region lib/backgrounds/background/available.ts
14
- var D = [
15
- "gradient",
16
- "grain",
17
- "mesh",
18
- "aurora",
19
- "spotlight",
20
- "bokeh",
21
- "rays",
22
- "halo",
23
- "plasma",
24
- "glass",
25
- "ripples",
26
- "blobs",
27
- "paper",
28
- "linen",
29
- "concrete",
30
- "marble"
31
- ], O = [
32
- "isometric",
33
- "blueprint",
34
- "dots",
35
- "stripes",
36
- "low-poly",
37
- "topography",
38
- "waves",
39
- "hexagons",
40
- "circuit",
41
- "graph-paper",
42
- "checker",
43
- "diagonal-checker",
44
- "chevrons"
45
- ], k = [
46
- "shapes",
47
- "confetti-grid",
48
- "constellation",
49
- "halftone",
50
- "truchet",
51
- "floating",
52
- "scatter-icons",
53
- "school",
54
- "night-sky",
55
- "bubbles",
56
- "leaves",
57
- "science",
58
- "music",
59
- "travel",
60
- "sport",
61
- "moon",
62
- "icons"
63
- ], A = [
64
- "eclipse",
65
- "meteor-shower",
66
- "ringed-planet",
67
- "northern-lights"
68
- ], j = (e) => A.includes(e), M = [
69
- ...D,
70
- ...O,
71
- ...k,
72
- ...A
73
- ], N = f(() => import("./icons-scene-bA7I4wdP.js"));
74
- function P(e) {
75
- return /* @__PURE__ */ _("div", {
76
- "data-scene": "",
77
- "aria-hidden": "true",
78
- children: /* @__PURE__ */ _(d, {
79
- fallback: null,
80
- children: /* @__PURE__ */ _(N, { ...e })
81
- })
82
- });
83
- }
84
- //#endregion
85
- //#region lib/backgrounds/background/partials/background-layers.tsx
86
- var F = f(() => import("./celestial-scene-DaOsRFF3.js")), I = p(function({ preset: e, scene: t, grain: n, sky: r, icons: i, ...a }) {
87
- return /* @__PURE__ */ v(g, { children: [
88
- w(e).map((n) => n === S ? i ? /* @__PURE__ */ _(P, { ...i }, n) : j(e) ? /* @__PURE__ */ _("div", {
89
- "data-scene": "",
90
- "data-celestial": "",
91
- "aria-hidden": "true",
92
- children: /* @__PURE__ */ _(d, {
93
- fallback: null,
94
- children: /* @__PURE__ */ _(F, {
95
- name: e,
96
- as: "preset",
97
- ...a
98
- })
99
- })
100
- }, n) : t && /* @__PURE__ */ _("div", {
101
- "data-scene": "",
102
- "aria-hidden": "true",
103
- children: /* @__PURE__ */ _(s, { node: t })
104
- }, n) : /* @__PURE__ */ _("div", {
105
- "data-layer": n,
106
- "aria-hidden": "true"
107
- }, n)),
108
- r && /* @__PURE__ */ _("div", {
109
- "data-layer": "sky-scene",
110
- "data-scene": "",
111
- "data-celestial": "",
112
- "aria-hidden": "true",
113
- children: /* @__PURE__ */ _(d, {
114
- fallback: null,
115
- children: /* @__PURE__ */ _(F, {
116
- name: r,
117
- as: "sky",
118
- base: e,
119
- ...a
120
- })
121
- })
122
- }),
123
- n && /* @__PURE__ */ _("div", {
124
- "data-overlay": "grain",
125
- "aria-hidden": "true",
126
- children: /* @__PURE__ */ _(s, { node: n })
127
- })
128
- ] });
129
- });
130
- //#endregion
131
- //#region lib/backgrounds/background/partials/icons-check.ts
132
- function L(e, t) {
133
- try {
134
- return e !== void 0 && x(e), b(t), null;
135
- } catch (e) {
136
- if (e instanceof y) return e.message;
137
- throw e;
138
- }
139
- }
140
- //#endregion
141
- //#region lib/backgrounds/background/partials/icons-keys.ts
142
- var R = Object.keys({
143
- layout: 1,
144
- sizeRange: 1,
145
- rotation: 1,
146
- duotone: 1,
147
- secondaryOpacity: 1,
148
- calm: 1
149
- });
150
- function z(e) {
151
- return JSON.stringify(Object.fromEntries(R.flatMap((t) => e?.[t] === void 0 ? [] : [[t, e[t]]])));
152
- }
153
- //#endregion
154
- //#region lib/backgrounds/background/partials/use-icons-scene.ts
155
- function B(e, { icons: r, iconStyle: i, iconMotif: a, seed: o, animated: s }) {
156
- let c = n(), l = JSON.stringify(r ?? null), u = JSON.stringify(i ?? null), d = z(a), f = m(() => {
157
- if (e !== "icons") return null;
158
- let n = L(JSON.parse(l) ?? void 0, JSON.parse(u) ?? void 0);
159
- return n && !t() && console.warn(`Background: icons cannot be drawn (${n}); drawing "scatter-icons" instead.`), n;
160
- }, [
161
- e,
162
- l,
163
- u
164
- ]) ? "scatter-icons" : e;
165
- return {
166
- preset: f,
167
- iconsScene: m(() => f === "icons" ? {
168
- seed: o,
169
- iconsKey: l,
170
- styleKey: u,
171
- motifKey: d,
172
- spriteBase: c,
173
- animated: s
174
- } : void 0, [
175
- f,
176
- o,
177
- l,
178
- u,
179
- d,
180
- c,
181
- s
182
- ])
183
- };
184
- }
185
- //#endregion
186
- //#region lib/backgrounds/background/background.tsx
187
- var V = /* @__PURE__ */ e({ Background: () => G }), H = (e) => console.warn(e);
188
- function U(e, t, n, r, i, a) {
189
- return e === "grain" ? null : C(e, l(t, n, r, i, a));
190
- }
191
- function W(e, t) {
192
- return C("grain", {
193
- idPrefix: `${e}-grain`,
194
- seed: t
195
- });
196
- }
197
- function G({ children: e, ref: n, preset: s, tone: l, intensity: d, animated: f, grain: p, seed: g, motif: y, moon: b, sky: x, icons: S, iconStyle: C, iconMotif: w, fill: D = "viewport", ...O }) {
198
- let k = r()?.background || i, A = s ?? k.preset, j = l ?? k.tone ?? i.tone, N = d ?? k.intensity ?? i.intensity, P = f ?? k.animated ?? !1, F = p ?? k.grain ?? !1, L = g ?? k.seed ?? 0, R = y ?? k.motif, z = b ?? k.moon, V = x ?? k.sky, G = h(null), K = m(() => a(G, n), [n]), q = o(G, P), J = E(ee()), { preset: Y, iconsScene: te } = B(T(A, M, t() ? void 0 : H), {
199
- icons: S ?? k.icons,
200
- iconStyle: C ?? k.iconStyle,
201
- iconMotif: w ?? k.iconMotif,
202
- seed: L,
203
- animated: P
204
- }), X = F || Y === "grain", Z = R?.shapes ? [...new Set(R.shapes)].sort().join(",") : void 0, Q = JSON.stringify(c(R)), $ = JSON.stringify(u(z)), ne = m(() => U(Y, J, L, Z, Q, $), [
205
- Y,
206
- J,
207
- L,
208
- Z,
209
- Q,
210
- $
211
- ]), re = m(() => X ? W(J, L) : null, [
212
- X,
213
- J,
214
- L
215
- ]);
216
- return /* @__PURE__ */ v("div", {
217
- "data-slot": "background",
218
- ...O,
219
- ref: K,
220
- "data-background": Y === "grain" ? "gradient" : Y,
221
- "data-preset": Y,
222
- "data-tone": j,
223
- "data-intensity": N,
224
- "data-fill": D === "container" ? D : void 0,
225
- "data-animated": P ? "" : void 0,
226
- "data-grain": X ? "" : void 0,
227
- "data-sky": V,
228
- "data-paused": P && q ? "" : void 0,
229
- children: [/* @__PURE__ */ _(I, {
230
- preset: Y,
231
- scene: ne,
232
- grain: re,
233
- sky: V,
234
- idPrefix: J,
235
- seed: L,
236
- shapesKey: Z,
237
- scalarsKey: Q,
238
- moonKey: $,
239
- icons: te
240
- }), /* @__PURE__ */ _("div", {
241
- "data-slot": "background-content",
242
- children: e
243
- })]
244
- });
245
- }
246
- //#endregion
247
- export { V as n, M as r, G as t };
@@ -1,24 +0,0 @@
1
- import { t as e } from "./scene-svg-DJKa5vsg.js";
2
- import { useMemo as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { buildIconScene as r } from "@nxgt/material-core/backgrounds/icons";
5
- //#region lib/backgrounds/background/partials/icons-scene.tsx
6
- function i({ seed: i, iconsKey: a, styleKey: o, motifKey: s, spriteBase: c, animated: l }) {
7
- return /* @__PURE__ */ n(e, { node: t(() => r({
8
- seed: i,
9
- icons: JSON.parse(a) ?? void 0,
10
- iconStyle: JSON.parse(o) ?? void 0,
11
- iconMotif: JSON.parse(s),
12
- spriteBase: c,
13
- animated: l
14
- }), [
15
- i,
16
- a,
17
- o,
18
- s,
19
- c,
20
- l
21
- ]) });
22
- }
23
- //#endregion
24
- export { i as default };
@@ -1,86 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
- import { t } from "./is-production-GLw59WU8.js";
3
- import { n } from "./icon-sprites-CZ3vcD7P.js";
4
- import { c as r, i, l as a, s as o, t as s } from "./state-scenes-Be9w_3an.js";
5
- import { t as c } from "./scene-svg-DJKa5vsg.js";
6
- import { Suspense as l, lazy as u, useId as d, useMemo as f } from "react";
7
- import { jsx as p } from "react/jsx-runtime";
8
- import { IconRefError as m } from "@nxgt/material-core/icons";
9
- import { ILLUSTRATION_SCENES as h, buildIllustration as g, illustrationScene as _ } from "@nxgt/material-core/illustrations";
10
- //#region lib/illustrations/use-illustration.ts
11
- function v(e, t, i) {
12
- let s = a(), c = i ?? (x(e) ? void 0 : r(s, e)), l = n(), u = `ill${d().replace(/[^\w-]/g, "-")}`;
13
- return {
14
- built: f(() => {
15
- let n = Object.fromEntries(Object.entries(t).filter(([, e]) => e !== void 0));
16
- try {
17
- let t = _(e, {
18
- ...s?.iconStyle === void 0 ? {} : { iconStyle: s.iconStyle },
19
- ...o(s, e),
20
- ...n
21
- }, c);
22
- return {
23
- spec: t,
24
- flat: g(t, {
25
- idPrefix: u,
26
- spriteBase: l
27
- })
28
- };
29
- } catch (e) {
30
- if (!(e instanceof m)) throw e;
31
- return b(`Illustration: ${e.message} Drawing the built-in art instead.`), null;
32
- }
33
- }, [
34
- e,
35
- c,
36
- JSON.stringify([
37
- t,
38
- o(s, e),
39
- s?.iconStyle
40
- ]),
41
- u,
42
- l
43
- ]),
44
- idPrefix: u,
45
- base: l
46
- };
47
- }
48
- var y = /* @__PURE__ */ new Set();
49
- function b(e) {
50
- t() || y.has(e) || (y.add(e), console.warn(e));
51
- }
52
- var x = (e) => h.includes(e), S = /* @__PURE__ */ e({ Illustration: () => w }), C = u(() => import("./plated-illustration-C3z0hP9U.js"));
53
- function w({ scene: e, scenes: t, size: n = "md", title: r, animated: a, hero: o, satellites: u, iconStyle: d, tone: f, duotone: m, className: h, ...g }) {
54
- let { built: _, idPrefix: y, base: b } = v(e, {
55
- hero: o,
56
- satellites: u,
57
- iconStyle: d,
58
- tone: f,
59
- duotone: m
60
- }, t);
61
- return /* @__PURE__ */ p("div", {
62
- "data-slot": "illustration",
63
- ...g,
64
- ...r ? {
65
- role: "img",
66
- "aria-label": r
67
- } : { "aria-hidden": !0 },
68
- "data-scene": e,
69
- "data-size": n,
70
- "data-animated": a ? "" : void 0,
71
- className: h,
72
- children: _ ? /* @__PURE__ */ p(l, {
73
- fallback: /* @__PURE__ */ p(c, { node: _.flat }),
74
- children: /* @__PURE__ */ p(C, {
75
- spec: _.spec,
76
- idPrefix: y,
77
- base: b
78
- })
79
- }) : /* @__PURE__ */ p(i, {
80
- kind: s[e] ?? "empty",
81
- className: "h-full w-full"
82
- })
83
- });
84
- }
85
- //#endregion
86
- export { S as n, w as t };
@@ -1,19 +0,0 @@
1
- import { t as e } from "./scene-svg-DJKa5vsg.js";
2
- import { useMemo as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { buildIllustration as r } from "@nxgt/material-core/illustrations";
5
- import { platePath as i } from "@nxgt/material-core/illustrations/plates";
6
- //#region lib/illustrations/plated-illustration.tsx
7
- function a({ spec: a, idPrefix: o, base: s }) {
8
- return /* @__PURE__ */ n(e, { node: t(() => r(a, {
9
- idPrefix: o,
10
- spriteBase: s,
11
- plates: i
12
- }), [
13
- a,
14
- o,
15
- s
16
- ]) });
17
- }
18
- //#endregion
19
- export { a as default };