@imfusion/web-ui 0.5.1-dev.51.gad24cd6e → 0.5.1-dev.52.gcaa229a7

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 (39) hide show
  1. package/README.md +1 -1
  2. package/dist/chunk-DA_OvQe2.js +11 -0
  3. package/dist/code-BRy_lg-h.js +135 -0
  4. package/dist/codegen/gen-icons.d.ts +24 -0
  5. package/dist/components/callout/callout.d.ts +1 -1
  6. package/dist/components/chip-link/chip-link.d.ts +1 -1
  7. package/dist/components/icon/icon.d.ts +16 -0
  8. package/dist/components/icon/icon.meta.d.ts +2 -0
  9. package/dist/components/icon/index.d.ts +4 -0
  10. package/dist/components/icon/types.d.ts +2 -0
  11. package/dist/components/input/input.d.ts +3 -1
  12. package/dist/components/typo/typo.d.ts +2 -2
  13. package/dist/docgen/component-sources.d.ts +7 -0
  14. package/dist/hooks/index.d.ts +1 -0
  15. package/dist/hooks/use-resize-observer.d.ts +2 -0
  16. package/dist/icons/catalog.gen.d.ts +8357 -0
  17. package/dist/icons/icon-config-provider.d.ts +8 -0
  18. package/dist/icons/icon-context.d.ts +4 -0
  19. package/dist/icons/icons.gen.d.ts +1672 -0
  20. package/dist/icons/index.d.ts +3 -0
  21. package/dist/icons-BhogvWBV.js +77 -0
  22. package/dist/icons.js +2 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +5026 -5059
  25. package/dist/integrations/code-highlight.js +3 -2
  26. package/dist/integrations/image-display-options.js +56 -56
  27. package/dist/meta-BwCupYyq.js +64 -0
  28. package/dist/provider/web-ui-provider.d.ts +4 -1
  29. package/dist/style.css +1 -1
  30. package/dist/{tabs-CVp_SgBl.js → tabs-CYqtw1q9.js} +2 -1
  31. package/package.json +8 -2
  32. package/src/docgen/doc.gen.json +40 -3
  33. package/src/llms/icon-catalog.gen.json +11203 -0
  34. package/src/llms/llms.gen.txt +5 -0
  35. package/src/llms/skills/imf-web-ui-components/SKILL.md +55 -3
  36. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +2 -0
  37. package/src/llms/tokens.gen.json +2 -2
  38. package/dist/code-B83kAmnS.js +0 -196
  39. package/dist/meta-B8C51eyL.js +0 -74
@@ -1,5 +1,6 @@
1
- import { a as e, t } from "../meta-B8C51eyL.js";
2
- import { i as n, n as r, r as i } from "../code-B83kAmnS.js";
1
+ import { n as e } from "../chunk-DA_OvQe2.js";
2
+ import { t } from "../meta-BwCupYyq.js";
3
+ import { i as n, n as r, r as i } from "../code-BRy_lg-h.js";
3
4
  import { cloneElement as a, useMemo as o } from "react";
4
5
  import { jsx as s } from "react/jsx-runtime";
5
6
  import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
@@ -1,5 +1,5 @@
1
- import { n as e, t } from "../meta-B8C51eyL.js";
2
- import { C as n, S as r, a as i, b as a, c as o, d as s, g as c, h as l, i as u, l as d, n as f, o as p, p as m, r as h, t as g, v as _, w as v, x as y, y as b } from "../tabs-CVp_SgBl.js";
1
+ import { C as e, S as t, a as n, b as r, c as i, d as a, g as o, h as s, i as c, l, n as u, o as d, p as f, r as p, t as m, v as h, w as g, x as _, y as v } from "../tabs-CYqtw1q9.js";
2
+ import { n as y, t as b } from "../meta-BwCupYyq.js";
3
3
  import { useId as x, useMemo as S, useState as C } from "react";
4
4
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
5
5
  import { useDisplayOptions2d as D, useDisplayOptions3d as O } from "@imfusion/sdk-react";
@@ -71,30 +71,30 @@ function F(e, t) {
71
71
  }
72
72
  //#endregion
73
73
  //#region src/integrations/image-display-options/image-display-options-view.tsx
74
- var I = e(k.root);
75
- function L({ spec: e, value: t, row: i, onChange: o }) {
76
- let s = /* @__PURE__ */ E(y, {
77
- value: t,
78
- min: e.min,
79
- max: e.max,
80
- step: e.step,
81
- format: e.format,
74
+ var I = y(k.root);
75
+ function L({ spec: n, value: i, row: a, onChange: o }) {
76
+ let s = /* @__PURE__ */ E(_, {
77
+ value: i,
78
+ min: n.min,
79
+ max: n.max,
80
+ step: n.step,
81
+ format: n.format,
82
82
  onValueChange: (e) => {
83
83
  o(typeof e == "number" ? e : e[0]);
84
84
  },
85
- children: [/* @__PURE__ */ E(d, {
85
+ children: [/* @__PURE__ */ E(l, {
86
86
  justify: "between",
87
- children: [/* @__PURE__ */ T(a, { children: e.label }), /* @__PURE__ */ T(v, {})]
88
- }), /* @__PURE__ */ T(_, { children: /* @__PURE__ */ E(n, { children: [/* @__PURE__ */ T(b, {}), /* @__PURE__ */ T(r, { "aria-label": e.label })] }) })]
87
+ children: [/* @__PURE__ */ T(r, { children: n.label }), /* @__PURE__ */ T(g, {})]
88
+ }), /* @__PURE__ */ T(h, { children: /* @__PURE__ */ E(e, { children: [/* @__PURE__ */ T(v, {}), /* @__PURE__ */ T(t, { "aria-label": n.label })] }) })]
89
89
  });
90
- return i ? /* @__PURE__ */ T("div", {
90
+ return a ? /* @__PURE__ */ T("div", {
91
91
  className: k.rowField,
92
92
  children: s
93
93
  }) : s;
94
94
  }
95
95
  function R({ checked: e, row: t, onChange: n }) {
96
96
  let r = x();
97
- return /* @__PURE__ */ E(d, {
97
+ return /* @__PURE__ */ E(l, {
98
98
  align: "center",
99
99
  justify: t ? "start" : "between",
100
100
  gap: "2",
@@ -103,18 +103,18 @@ function R({ checked: e, row: t, onChange: n }) {
103
103
  id: r,
104
104
  className: k.invertLabel,
105
105
  children: "Invert"
106
- }), /* @__PURE__ */ T(l, {
106
+ }), /* @__PURE__ */ T(s, {
107
107
  "aria-labelledby": r,
108
108
  checked: e,
109
109
  onCheckedChange: (e) => {
110
110
  n(e);
111
111
  },
112
- children: /* @__PURE__ */ T(c, {})
112
+ children: /* @__PURE__ */ T(o, {})
113
113
  })]
114
114
  });
115
115
  }
116
116
  function z({ active: e, onChange: t }) {
117
- return /* @__PURE__ */ E(s, {
117
+ return /* @__PURE__ */ E(a, {
118
118
  className: k.segment,
119
119
  "aria-label": "Display dimension",
120
120
  value: [e],
@@ -122,10 +122,10 @@ function z({ active: e, onChange: t }) {
122
122
  let n = e[0];
123
123
  (n === "2d" || n === "3d") && t(n);
124
124
  },
125
- children: [/* @__PURE__ */ T(m, {
125
+ children: [/* @__PURE__ */ T(f, {
126
126
  value: "2d",
127
127
  children: "2D"
128
- }), /* @__PURE__ */ T(m, {
128
+ }), /* @__PURE__ */ T(f, {
129
129
  value: "3d",
130
130
  children: "3D"
131
131
  })]
@@ -148,75 +148,75 @@ function B({ dimension: e, fields: t, options: n, row: r, onChange: i }) {
148
148
  }
149
149
  })] });
150
150
  }
151
- function V({ variant: e = "default", options: t, intensityRange: n, ranges: r, onOptionsChange: a, className: s, ...c }) {
152
- let [l, m] = C("2d"), _ = N(n, r), v = (e) => {
153
- m(e === "3d" ? "3d" : "2d");
151
+ function V({ variant: e = "default", options: t, intensityRange: r, ranges: a, onOptionsChange: o, className: s, ...f }) {
152
+ let [h, g] = C("2d"), _ = N(r, a), v = (e) => {
153
+ g(e === "3d" ? "3d" : "2d");
154
154
  };
155
155
  return /* @__PURE__ */ T("div", {
156
- ...c,
156
+ ...f,
157
157
  "data-imf-ui-component": "ImageDisplayOptions",
158
158
  className: I({ className: s }),
159
- children: e === "default" ? /* @__PURE__ */ E(i, {
160
- value: l,
159
+ children: e === "default" ? /* @__PURE__ */ E(n, {
160
+ value: h,
161
161
  onValueChange: v,
162
- children: [/* @__PURE__ */ E(f, { children: [
163
- /* @__PURE__ */ T(p, {
162
+ children: [/* @__PURE__ */ E(u, { children: [
163
+ /* @__PURE__ */ T(d, {
164
164
  value: "2d",
165
165
  children: "2D Slices"
166
166
  }),
167
- /* @__PURE__ */ T(p, {
167
+ /* @__PURE__ */ T(d, {
168
168
  value: "3d",
169
169
  children: "3D Volume"
170
170
  }),
171
- /* @__PURE__ */ T(g, {})
172
- ] }), /* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(h, {
171
+ /* @__PURE__ */ T(m, {})
172
+ ] }), /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(p, {
173
173
  value: "2d",
174
- children: /* @__PURE__ */ T(o, {
174
+ children: /* @__PURE__ */ T(i, {
175
175
  gap: "3",
176
176
  children: /* @__PURE__ */ T(B, {
177
177
  dimension: "2d",
178
178
  fields: _["2d"],
179
179
  options: t,
180
180
  row: !1,
181
- onChange: a
181
+ onChange: o
182
182
  })
183
183
  })
184
- }), /* @__PURE__ */ T(h, {
184
+ }), /* @__PURE__ */ T(p, {
185
185
  value: "3d",
186
- children: /* @__PURE__ */ T(o, {
186
+ children: /* @__PURE__ */ T(i, {
187
187
  gap: "3",
188
188
  children: /* @__PURE__ */ T(B, {
189
189
  dimension: "3d",
190
190
  fields: _["3d"],
191
191
  options: t,
192
192
  row: !1,
193
- onChange: a
193
+ onChange: o
194
194
  })
195
195
  })
196
196
  })] })]
197
- }) : e === "horizontal" ? /* @__PURE__ */ E(i, {
197
+ }) : e === "horizontal" ? /* @__PURE__ */ E(n, {
198
198
  className: k.horizontalTabs,
199
199
  orientation: "vertical",
200
- value: l,
200
+ value: h,
201
201
  onValueChange: v,
202
- children: [/* @__PURE__ */ E(f, {
202
+ children: [/* @__PURE__ */ E(u, {
203
203
  fill: !0,
204
204
  children: [
205
- /* @__PURE__ */ T(p, {
205
+ /* @__PURE__ */ T(d, {
206
206
  value: "2d",
207
207
  children: "2D"
208
208
  }),
209
- /* @__PURE__ */ T(p, {
209
+ /* @__PURE__ */ T(d, {
210
210
  value: "3d",
211
211
  children: "3D"
212
212
  }),
213
- /* @__PURE__ */ T(g, {})
213
+ /* @__PURE__ */ T(m, {})
214
214
  ]
215
- }), /* @__PURE__ */ E(u, {
215
+ }), /* @__PURE__ */ E(c, {
216
216
  className: k.horizontalPanel,
217
- children: [/* @__PURE__ */ T(h, {
217
+ children: [/* @__PURE__ */ T(p, {
218
218
  value: "2d",
219
- children: /* @__PURE__ */ T(d, {
219
+ children: /* @__PURE__ */ T(l, {
220
220
  align: "center",
221
221
  gap: "3",
222
222
  className: k.strip,
@@ -225,12 +225,12 @@ function V({ variant: e = "default", options: t, intensityRange: n, ranges: r, o
225
225
  fields: _["2d"],
226
226
  options: t,
227
227
  row: !0,
228
- onChange: a
228
+ onChange: o
229
229
  })
230
230
  })
231
- }), /* @__PURE__ */ T(h, {
231
+ }), /* @__PURE__ */ T(p, {
232
232
  value: "3d",
233
- children: /* @__PURE__ */ T(d, {
233
+ children: /* @__PURE__ */ T(l, {
234
234
  align: "center",
235
235
  gap: "3",
236
236
  className: k.strip,
@@ -239,24 +239,24 @@ function V({ variant: e = "default", options: t, intensityRange: n, ranges: r, o
239
239
  fields: _["3d"],
240
240
  options: t,
241
241
  row: !0,
242
- onChange: a
242
+ onChange: o
243
243
  })
244
244
  })
245
245
  })]
246
246
  })]
247
- }) : /* @__PURE__ */ E(d, {
247
+ }) : /* @__PURE__ */ E(l, {
248
248
  align: "center",
249
249
  gap: "3",
250
250
  className: k.compactStrip,
251
251
  children: [/* @__PURE__ */ T(z, {
252
- active: l,
253
- onChange: m
252
+ active: h,
253
+ onChange: g
254
254
  }), /* @__PURE__ */ T(B, {
255
- dimension: l,
256
- fields: _[l],
255
+ dimension: h,
256
+ fields: _[h],
257
257
  options: t,
258
258
  row: !0,
259
- onChange: a
259
+ onChange: o
260
260
  })]
261
261
  })
262
262
  });
@@ -294,7 +294,7 @@ H.displayName = "ImageDisplayOptions";
294
294
  //#region src/integrations/image-display-options/image-display-options.meta.ts
295
295
  var U = {
296
296
  name: "ImageDisplayOptions",
297
- category: t.inputs,
297
+ category: b.inputs,
298
298
  status: "experimental",
299
299
  description: "A panel or toolbar of controls bound to an image dataset's display options.",
300
300
  origin: "adapted",
@@ -0,0 +1,64 @@
1
+ //#region node_modules/clsx/dist/clsx.mjs
2
+ function e(t) {
3
+ var n, r, i = "";
4
+ if (typeof t == "string" || typeof t == "number") i += t;
5
+ else if (typeof t == "object") if (Array.isArray(t)) {
6
+ var a = t.length;
7
+ for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
8
+ } else for (r in t) t[r] && (i && (i += " "), i += r);
9
+ return i;
10
+ }
11
+ function t() {
12
+ for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
13
+ return i;
14
+ }
15
+ //#endregion
16
+ //#region node_modules/class-variance-authority/dist/index.mjs
17
+ var n = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, r = t, i = (e, t) => (i) => {
18
+ if (t?.variants == null) return r(e, i?.class, i?.className);
19
+ let { variants: a, defaultVariants: o } = t, s = Object.keys(a).map((e) => {
20
+ let t = i?.[e], r = o?.[e];
21
+ if (t === null) return null;
22
+ let s = n(t) || n(r);
23
+ return a[e][s];
24
+ }), c = i && Object.entries(i).reduce((e, t) => {
25
+ let [n, r] = t;
26
+ return r === void 0 || (e[n] = r), e;
27
+ }, {});
28
+ return r(e, s, t?.compoundVariants?.reduce((e, t) => {
29
+ let { class: n, className: r, ...i } = t;
30
+ return Object.entries(i).every((e) => {
31
+ let [t, n] = e;
32
+ return Array.isArray(n) ? n.includes({
33
+ ...o,
34
+ ...c
35
+ }[t]) : {
36
+ ...o,
37
+ ...c
38
+ }[t] === n;
39
+ }) ? [
40
+ ...e,
41
+ n,
42
+ r
43
+ ] : e;
44
+ }, []), i?.class, i?.className);
45
+ }, a = {
46
+ buttons: {
47
+ id: "buttons",
48
+ label: "Buttons"
49
+ },
50
+ inputs: {
51
+ id: "inputs",
52
+ label: "Inputs"
53
+ },
54
+ layout: {
55
+ id: "layout",
56
+ label: "Layout"
57
+ },
58
+ display: {
59
+ id: "display",
60
+ label: "Display"
61
+ }
62
+ };
63
+ //#endregion
64
+ export { i as n, r, a as t };
@@ -1,6 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
+ import { IconConfig } from '../icons/icon-context';
2
3
  interface Props {
3
4
  children: ReactNode;
5
+ /** SVG defaults for icons in this provider's subtree; omitted fields use the defaults from icon-context.ts. */
6
+ icons?: IconConfig;
4
7
  }
5
- export declare function WebUIProvider({ children }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export declare function WebUIProvider({ children, icons }: Props): import("react/jsx-runtime").JSX.Element;
6
9
  export {};