@imfusion/web-ui 0.5.1-dev.53.gb710322e → 0.5.1-dev.6.g9d275fa8

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 (97) hide show
  1. package/README.md +20 -59
  2. package/bin/install-skill.js +180 -0
  3. package/dist/code-qBbqAHK-.js +190 -0
  4. package/dist/components/callout/callout.d.ts +1 -1
  5. package/dist/components/chip-link/chip-link.d.ts +1 -1
  6. package/dist/components/code/code.d.ts +18 -10
  7. package/dist/components/input/input.d.ts +1 -3
  8. package/dist/components/typo/typo.d.ts +2 -2
  9. package/dist/hooks/index.d.ts +0 -1
  10. package/dist/index.d.ts +0 -3
  11. package/dist/index.js +5140 -5746
  12. package/dist/integrations/code-highlight/code-highlight.d.ts +6 -8
  13. package/dist/integrations/code-highlight/highlighter.d.ts +3 -32
  14. package/dist/integrations/code-highlight.js +59 -198
  15. package/dist/integrations/image-display-options.js +56 -56
  16. package/dist/meta-B8C51eyL.js +74 -0
  17. package/dist/provider/web-ui-provider.d.ts +1 -4
  18. package/dist/style.css +1 -1
  19. package/dist/{tabs-CYqtw1q9.js → tabs-DqBFSqq6.js} +2 -3
  20. package/package.json +26 -46
  21. package/src/docgen/doc.gen.json +38 -381
  22. package/src/llms/llms.gen.txt +0 -17
  23. package/src/llms/skills/imf-web-ui/SKILL.md +12 -13
  24. package/src/llms/skills/imf-web-ui-components/SKILL.md +3 -56
  25. package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +93 -0
  26. package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +133 -0
  27. package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +94 -0
  28. package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +201 -0
  29. package/src/llms/skills/imf-web-ui-setup/SKILL.md +37 -67
  30. package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
  31. package/src/llms/skills/imf-web-ui-ux/references/forms.md +2 -2
  32. package/bin/install.js +0 -428
  33. package/bin/install.test.ts +0 -329
  34. package/dist/build/vite-css-module-names/index.d.ts +0 -20
  35. package/dist/build/vite-css-module-names.js +0 -17
  36. package/dist/chunk-DA_OvQe2.js +0 -11
  37. package/dist/code-BRy_lg-h.js +0 -135
  38. package/dist/codegen/gen-icons.d.ts +0 -24
  39. package/dist/components/field/field.d.ts +0 -104
  40. package/dist/components/field/field.meta.d.ts +0 -2
  41. package/dist/components/field/index.d.ts +0 -2
  42. package/dist/components/fieldset/fieldset.d.ts +0 -29
  43. package/dist/components/fieldset/fieldset.meta.d.ts +0 -2
  44. package/dist/components/fieldset/index.d.ts +0 -2
  45. package/dist/components/icon/icon.d.ts +0 -16
  46. package/dist/components/icon/icon.meta.d.ts +0 -2
  47. package/dist/components/icon/index.d.ts +0 -4
  48. package/dist/components/icon/types.d.ts +0 -2
  49. package/dist/docgen/component-sources.d.ts +0 -7
  50. package/dist/hooks/use-resize-observer.d.ts +0 -2
  51. package/dist/icons/catalog.gen.d.ts +0 -8357
  52. package/dist/icons/icon-config-provider.d.ts +0 -8
  53. package/dist/icons/icon-context.d.ts +0 -4
  54. package/dist/icons/icons.gen.d.ts +0 -1672
  55. package/dist/icons/index.d.ts +0 -3
  56. package/dist/icons-BhogvWBV.js +0 -77
  57. package/dist/icons.js +0 -2
  58. package/dist/integrations/code-highlight/language-patterns.d.ts +0 -7
  59. package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
  60. package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
  61. package/dist/integrations/code-highlight/languages/python.d.ts +0 -1
  62. package/dist/llms/gen-tokens.d.ts +0 -7
  63. package/dist/meta-BwCupYyq.js +0 -64
  64. package/src/llms/icon-catalog.gen.json +0 -11203
  65. package/src/llms/install-templates/AGENTS.md +0 -34
  66. package/src/llms/install-templates/codex-hooks.json +0 -44
  67. package/src/llms/install-templates/hooks/baseline-staleness.sh +0 -17
  68. package/src/llms/install-templates/hooks/session-start.sh +0 -5
  69. package/src/llms/install-templates/hooks/stop.sh +0 -18
  70. package/src/llms/install-templates/hooks/subagent-start.sh +0 -5
  71. package/src/llms/install-templates/hooks/user-prompt-submit.sh +0 -5
  72. package/src/llms/install-templates/settings.json +0 -45
  73. package/src/llms/skills/imf-web-ui-audit/SKILL.md +0 -119
  74. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +0 -57
  75. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -141
  76. package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +0 -45
  77. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +0 -82
  78. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +0 -27
  79. package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +0 -65
  80. package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +0 -50
  81. package/src/llms/skills/imf-web-ui-conventions/topics/components.md +0 -101
  82. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +0 -221
  83. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +0 -40
  84. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +0 -34
  85. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +0 -35
  86. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +0 -26
  87. package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +0 -53
  88. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +0 -44
  89. package/src/llms/skills/imf-web-ui-conventions/topics/react.md +0 -109
  90. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +0 -88
  91. package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +0 -25
  92. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +0 -7
  93. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +0 -116
  94. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +0 -73
  95. package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +0 -62
  96. package/src/llms/skills/imf-web-ui-update/SKILL.md +0 -157
  97. package/src/llms/tokens.gen.json +0 -887
@@ -1,22 +1,20 @@
1
1
  import { Code } from '../../components/code';
2
2
  import { SupportedLanguage } from './highlighter';
3
- type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "children" | "language"> & {
3
+ type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "highlighted" | "language"> & {
4
4
  /** Language of `children`: grammar for tokenization and label for the corner notch. Omit to hide the notch and skip highlighting. */
5
- children: string;
6
5
  language?: SupportedLanguage;
7
6
  };
8
- /** Code.Block — the core `Code.Block` with TanStack Highlight tokens rendered inside. */
9
- export declare function Block({ language, children, ...props }: BlockProps): import('react').FunctionComponentElement<any>;
7
+ /** Code.Block — the core `Code.Block` with TanStack Highlight tokens filling its `highlighted` slot. */
8
+ export declare function Block({ language, children, ...props }: BlockProps): import("react/jsx-runtime").JSX.Element;
10
9
  export declare namespace Block {
11
10
  var displayName: string;
12
11
  }
13
- type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "children"> & {
12
+ type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "highlighted"> & {
14
13
  /** Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text. */
15
- children: string;
16
14
  language?: SupportedLanguage;
17
15
  };
18
- /** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens rendered inside. */
19
- export declare function Inline({ language, children, ...props }: InlineProps): import('react').FunctionComponentElement<any>;
16
+ /** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens filling its `highlighted` slot. */
17
+ export declare function Inline({ language, children, ...props }: InlineProps): import("react/jsx-runtime").JSX.Element;
20
18
  export declare namespace Inline {
21
19
  var displayName: string;
22
20
  }
@@ -1,35 +1,6 @@
1
- declare const LANGUAGE_DEFINITIONS: {
2
- readonly tsx: {
3
- readonly aliases: readonly ["typescriptreact"];
4
- };
5
- readonly ts: {
6
- readonly aliases: readonly ["typescript"];
7
- };
8
- readonly css: {
9
- readonly aliases: readonly ["scss"];
10
- };
11
- readonly shell: {
12
- readonly aliases: readonly ["bash", "sh", "zsh", "shellscript"];
13
- };
14
- readonly json: {
15
- readonly aliases: readonly [];
16
- };
17
- readonly cpp: {
18
- readonly aliases: readonly ["c++", "cc", "cxx", "hpp"];
19
- };
20
- readonly python: {
21
- readonly aliases: readonly ["py"];
22
- };
23
- readonly cmake: {
24
- readonly aliases: readonly [];
25
- };
26
- };
27
- export declare const SUPPORTED_LANGUAGES: string[];
28
- type CanonicalLanguage = keyof typeof LANGUAGE_DEFINITIONS;
29
- type LanguageAlias = {
30
- [Language in CanonicalLanguage]: (typeof LANGUAGE_DEFINITIONS)[Language]["aliases"][number];
31
- }[CanonicalLanguage];
32
- export type SupportedLanguage = CanonicalLanguage | LanguageAlias;
1
+ export declare const SUPPORTED_LANGUAGES: readonly ["tsx", "ts", "css", "shell", "json"];
2
+ declare const LANGUAGE_ALIASES: readonly ["typescript", "bash", "sh", "zsh", "shellscript", "scss"];
3
+ export type SupportedLanguage = (typeof SUPPORTED_LANGUAGES)[number] | (typeof LANGUAGE_ALIASES)[number];
33
4
  export declare function isSupportedLanguage(value: string): value is SupportedLanguage;
34
5
  export declare function highlightToHtml(code: string, language: SupportedLanguage): string;
35
6
  export {};
@@ -1,223 +1,84 @@
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";
4
- import { cloneElement as a, useMemo as o } from "react";
5
- import { jsx as s } from "react/jsx-runtime";
6
- import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
7
- import { css as f } from "@tanstack/highlight/languages/css";
8
- import { json as p } from "@tanstack/highlight/languages/json";
9
- import { plaintext as m } from "@tanstack/highlight/languages/plaintext";
10
- import { shell as h } from "@tanstack/highlight/languages/shell";
11
- import { ts as g } from "@tanstack/highlight/languages/ts";
12
- import { tsx as _ } from "@tanstack/highlight/languages/tsx";
13
- import { python as v } from "@tanstack/highlight/languages/python";
14
- //#region src/integrations/code-highlight/language-patterns.ts
15
- function y(e, t, n = []) {
16
- let r = [], i = new Uint8Array(e.length);
17
- for (let { start: e, end: t } of n) i.fill(1, e, t);
18
- for (let n of t) {
19
- let t = new RegExp(n.regex.source, n.regex.flags.includes("g") ? n.regex.flags : `${n.regex.flags}g`), a;
20
- for (; (a = t.exec(e)) !== null;) {
21
- let e = n.group == null ? a[0] : a[n.group];
22
- if (e === "") {
23
- a[0] === "" && (t.lastIndex += 1);
24
- continue;
25
- }
26
- let o = n.group == null ? 0 : a[0].indexOf(e), s = a.index + o, c = s + e.length;
27
- if (s < c) {
28
- let e = !1;
29
- for (let t = s; t < c; t += 1) if (i[t]) {
30
- e = !0;
31
- break;
32
- }
33
- e || (r.push({
34
- start: s,
35
- end: c,
36
- className: n.className
37
- }), i.fill(1, s, c));
38
- }
39
- }
40
- }
41
- return r;
42
- }
43
- //#endregion
44
- //#region src/integrations/code-highlight/languages/cmake.ts
45
- var b = [
46
- {
47
- className: "string",
48
- regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
49
- },
50
- {
51
- className: "comment",
52
- regex: /#[^\n]*/g
53
- },
54
- {
55
- className: "variable",
56
- regex: /\$(?:ENV|CACHE)?\{[^}\n]+\}/g
57
- },
58
- {
59
- className: "keyword",
60
- regex: /\b(?:break|continue|else|elseif|endforeach|endfunction|endif|endmacro|endwhile|if|include|macro|return|while)\b/gi
61
- },
62
- {
63
- className: "literal",
64
- regex: /\b(?:FALSE|IGNORE|NOTFOUND|NO|OFF|ON|TRUE|YES)\b/gi
65
- },
66
- {
67
- className: "function",
68
- regex: /\b[A-Za-z_][\w-]*(?=\s*\()/g
69
- },
70
- {
71
- className: "number",
72
- regex: /\b\d+(?:\.\d+)?\b/g
73
- },
74
- {
75
- className: "operator",
76
- regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
77
- }
78
- ], x = l({
79
- name: "cmake",
80
- tokenize(e) {
81
- return y(e, b);
82
- }
83
- }), S = [
84
- {
85
- className: "comment",
86
- regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
87
- },
88
- {
89
- className: "string",
90
- regex: /"(?:\\.|[^"\\\n])*"|'(?:\\.|[^'\\\n])*'/g
91
- },
92
- {
93
- className: "meta",
94
- regex: /^[ \t]*#[ \t]*(?:include|define|if|ifdef|ifndef|elif|else|endif|pragma|undef|error|warning)\b/gm
95
- },
96
- {
97
- className: "keyword",
98
- regex: /\b(?:alignas|alignof|and|asm|atomic_cancel|atomic_commit|atomic_noexcept|auto|bitand|bitor|break|case|catch|co_await|co_return|co_yield|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|default|delete|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|goto|if|inline|mutable|namespace|new|noexcept|not|operator|or|private|protected|public|reflexpr|register|reinterpret_cast|requires|return|sizeof|static|static_assert|static_cast|struct|switch|synchronized|template|this|thread_local|throw|try|typedef|typeid|typename|union|using|virtual|volatile|while|xor)\b/g
99
- },
100
- {
101
- className: "type",
102
- regex: /\b(?:bool|char|char8_t|char16_t|char32_t|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g
103
- },
104
- {
105
- className: "literal",
106
- regex: /\b(?:NULL|nullptr|true|false)\b/g
107
- },
108
- {
109
- className: "function",
110
- regex: /\b[A-Za-z_]\w*(?=\s*\()/g
111
- },
112
- {
113
- className: "number",
114
- regex: /\b(?:0[xX][\da-fA-F']+|0[bB][01']+|\d[\d']*(?:\.\d[\d']*)?(?:[eE][+-]?\d[\d']*)?[uUlLfF]*)\b/g
115
- },
116
- {
117
- className: "operator",
118
- regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
119
- }
120
- ], C = l({
121
- name: "cpp",
122
- aliases: [
123
- "c++",
124
- "cc",
125
- "cxx",
126
- "hpp"
127
- ],
128
- tokenize(e) {
129
- return y(e, S);
130
- }
131
- }), w = [{
132
- className: "function",
133
- regex: /\b[A-Za-z_]\w*(?=\s*\()/g
134
- }], T = l({
135
- name: "python",
136
- aliases: ["py"],
137
- tokenize(e, t) {
138
- let n = v.tokenize(e, t), r = y(e, w, n);
139
- return [...n, ...r];
140
- }
141
- }), E = {
142
- tsx: { aliases: ["typescriptreact"] },
143
- ts: { aliases: ["typescript"] },
144
- css: { aliases: ["scss"] },
145
- shell: { aliases: [
146
- "bash",
147
- "sh",
148
- "zsh",
149
- "shellscript"
150
- ] },
151
- json: { aliases: [] },
152
- cpp: { aliases: [
153
- "c++",
154
- "cc",
155
- "cxx",
156
- "hpp"
157
- ] },
158
- python: { aliases: ["py"] },
159
- cmake: { aliases: [] }
160
- }, D = Object.keys(E), O = [...D, ...Object.values(E).flatMap(({ aliases: e }) => e)];
161
- function k(e) {
162
- return O.includes(e);
163
- }
164
- function A(e, t) {
165
- return e.aliases.includes(t);
166
- }
167
- function j(e) {
168
- for (let [t, n] of Object.entries(E)) if (A(n, e)) return t;
169
- return e;
1
+ import { a as e, t } from "../meta-B8C51eyL.js";
2
+ import { i as n, n as r, r as i } from "../code-qBbqAHK-.js";
3
+ import { useMemo as a } from "react";
4
+ import { jsx as o } from "react/jsx-runtime";
5
+ import { createHighlighter as s, renderNodesToHtml as c, renderTokens as l } from "@tanstack/highlight/core";
6
+ import { css as u } from "@tanstack/highlight/languages/css";
7
+ import { json as d } from "@tanstack/highlight/languages/json";
8
+ import { plaintext as f } from "@tanstack/highlight/languages/plaintext";
9
+ import { shell as p } from "@tanstack/highlight/languages/shell";
10
+ import { ts as m } from "@tanstack/highlight/languages/ts";
11
+ import { tsx as h } from "@tanstack/highlight/languages/tsx";
12
+ //#region src/integrations/code-highlight/highlighter.ts
13
+ var g = [
14
+ "tsx",
15
+ "ts",
16
+ "css",
17
+ "shell",
18
+ "json"
19
+ ], _ = [
20
+ "typescript",
21
+ "bash",
22
+ "sh",
23
+ "zsh",
24
+ "shellscript",
25
+ "scss"
26
+ ], v = [...g, ..._];
27
+ function y(e) {
28
+ return v.includes(e);
170
29
  }
171
- var M = c({
30
+ var b = {
31
+ shellscript: "shell",
32
+ scss: "css"
33
+ }, x = s({
172
34
  languages: [
173
- _,
174
- g,
175
- f,
176
35
  h,
36
+ m,
37
+ u,
177
38
  p,
178
- C,
179
- T,
180
- x,
181
- m
39
+ d,
40
+ f
182
41
  ],
183
42
  fallbackLanguage: "plaintext"
184
43
  });
185
- function N(e, t) {
186
- let n = j(t), { tokens: r } = M.tokenize(e, { lang: n });
187
- return u(d(r));
44
+ function S(e, t) {
45
+ let n = b[t] ?? t, { tokens: r } = x.tokenize(e, { lang: n });
46
+ return c(l(r));
188
47
  }
189
48
  //#endregion
190
49
  //#region src/integrations/code-highlight/code-highlight.tsx
191
- var P = /* @__PURE__ */ e({
192
- Block: () => I,
193
- Inline: () => L,
50
+ var C = /* @__PURE__ */ e({
51
+ Block: () => T,
52
+ Inline: () => E,
194
53
  InlineLink: () => n
195
54
  });
196
- function F(e, t) {
197
- return o(() => {
198
- if (!(t == null || e === "")) return /* @__PURE__ */ s("span", { dangerouslySetInnerHTML: { __html: N(e, t) } });
55
+ function w(e, t) {
56
+ return a(() => {
57
+ if (!(t == null || e === "")) return /* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: S(e, t) } });
199
58
  }, [e, t]);
200
59
  }
201
- function I({ language: e, children: t, ...n }) {
202
- let i = F(t, e);
203
- return a(/* @__PURE__ */ s(r, {
60
+ function T({ language: e, children: t, ...n }) {
61
+ let i = w(t, e);
62
+ return /* @__PURE__ */ o(r, {
204
63
  ...n,
205
64
  language: e,
65
+ highlighted: i,
206
66
  children: t
207
- }), { children: i ?? t });
67
+ });
208
68
  }
209
- I.displayName = "Code.Block";
210
- function L({ language: e, children: t, ...n }) {
211
- let r = F(t, e);
212
- return a(/* @__PURE__ */ s(i, {
69
+ T.displayName = "Code.Block";
70
+ function E({ language: e, children: t, ...n }) {
71
+ let r = w(t, e);
72
+ return /* @__PURE__ */ o(i, {
213
73
  ...n,
74
+ highlighted: r,
214
75
  children: t
215
- }), { children: r ?? t });
76
+ });
216
77
  }
217
- L.displayName = "Code.Inline";
78
+ E.displayName = "Code.Inline";
218
79
  //#endregion
219
80
  //#region src/integrations/code-highlight/code-highlight.meta.ts
220
- var R = {
81
+ var D = {
221
82
  name: "CodeHighlight",
222
83
  category: t.display,
223
84
  status: "experimental",
@@ -233,4 +94,4 @@ var R = {
233
94
  }
234
95
  };
235
96
  //#endregion
236
- export { P as Code, D as SUPPORTED_LANGUAGES, R as codeHighlightMeta, k as isSupportedLanguage };
97
+ export { C as Code, g as SUPPORTED_LANGUAGES, D as codeHighlightMeta, y as isSupportedLanguage };
@@ -1,5 +1,5 @@
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";
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-DqBFSqq6.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 = 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,
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,
82
82
  onValueChange: (e) => {
83
83
  o(typeof e == "number" ? e : e[0]);
84
84
  },
85
- children: [/* @__PURE__ */ E(l, {
85
+ children: [/* @__PURE__ */ E(d, {
86
86
  justify: "between",
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 })] }) })]
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 })] }) })]
89
89
  });
90
- return a ? /* @__PURE__ */ T("div", {
90
+ return i ? /* @__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(l, {
97
+ return /* @__PURE__ */ E(d, {
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(s, {
106
+ }), /* @__PURE__ */ T(l, {
107
107
  "aria-labelledby": r,
108
108
  checked: e,
109
109
  onCheckedChange: (e) => {
110
110
  n(e);
111
111
  },
112
- children: /* @__PURE__ */ T(o, {})
112
+ children: /* @__PURE__ */ T(c, {})
113
113
  })]
114
114
  });
115
115
  }
116
116
  function z({ active: e, onChange: t }) {
117
- return /* @__PURE__ */ E(a, {
117
+ return /* @__PURE__ */ E(s, {
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(f, {
125
+ children: [/* @__PURE__ */ T(m, {
126
126
  value: "2d",
127
127
  children: "2D"
128
- }), /* @__PURE__ */ T(f, {
128
+ }), /* @__PURE__ */ T(m, {
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: 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");
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");
154
154
  };
155
155
  return /* @__PURE__ */ T("div", {
156
- ...f,
156
+ ...c,
157
157
  "data-imf-ui-component": "ImageDisplayOptions",
158
158
  className: I({ className: s }),
159
- children: e === "default" ? /* @__PURE__ */ E(n, {
160
- value: h,
159
+ children: e === "default" ? /* @__PURE__ */ E(i, {
160
+ value: l,
161
161
  onValueChange: v,
162
- children: [/* @__PURE__ */ E(u, { children: [
163
- /* @__PURE__ */ T(d, {
162
+ children: [/* @__PURE__ */ E(f, { children: [
163
+ /* @__PURE__ */ T(p, {
164
164
  value: "2d",
165
165
  children: "2D Slices"
166
166
  }),
167
- /* @__PURE__ */ T(d, {
167
+ /* @__PURE__ */ T(p, {
168
168
  value: "3d",
169
169
  children: "3D Volume"
170
170
  }),
171
- /* @__PURE__ */ T(m, {})
172
- ] }), /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(p, {
171
+ /* @__PURE__ */ T(g, {})
172
+ ] }), /* @__PURE__ */ E(u, { children: [/* @__PURE__ */ T(h, {
173
173
  value: "2d",
174
- children: /* @__PURE__ */ T(i, {
174
+ children: /* @__PURE__ */ T(o, {
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: o
181
+ onChange: a
182
182
  })
183
183
  })
184
- }), /* @__PURE__ */ T(p, {
184
+ }), /* @__PURE__ */ T(h, {
185
185
  value: "3d",
186
- children: /* @__PURE__ */ T(i, {
186
+ children: /* @__PURE__ */ T(o, {
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: o
193
+ onChange: a
194
194
  })
195
195
  })
196
196
  })] })]
197
- }) : e === "horizontal" ? /* @__PURE__ */ E(n, {
197
+ }) : e === "horizontal" ? /* @__PURE__ */ E(i, {
198
198
  className: k.horizontalTabs,
199
199
  orientation: "vertical",
200
- value: h,
200
+ value: l,
201
201
  onValueChange: v,
202
- children: [/* @__PURE__ */ E(u, {
202
+ children: [/* @__PURE__ */ E(f, {
203
203
  fill: !0,
204
204
  children: [
205
- /* @__PURE__ */ T(d, {
205
+ /* @__PURE__ */ T(p, {
206
206
  value: "2d",
207
207
  children: "2D"
208
208
  }),
209
- /* @__PURE__ */ T(d, {
209
+ /* @__PURE__ */ T(p, {
210
210
  value: "3d",
211
211
  children: "3D"
212
212
  }),
213
- /* @__PURE__ */ T(m, {})
213
+ /* @__PURE__ */ T(g, {})
214
214
  ]
215
- }), /* @__PURE__ */ E(c, {
215
+ }), /* @__PURE__ */ E(u, {
216
216
  className: k.horizontalPanel,
217
- children: [/* @__PURE__ */ T(p, {
217
+ children: [/* @__PURE__ */ T(h, {
218
218
  value: "2d",
219
- children: /* @__PURE__ */ T(l, {
219
+ children: /* @__PURE__ */ T(d, {
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: r, ranges: a, o
225
225
  fields: _["2d"],
226
226
  options: t,
227
227
  row: !0,
228
- onChange: o
228
+ onChange: a
229
229
  })
230
230
  })
231
- }), /* @__PURE__ */ T(p, {
231
+ }), /* @__PURE__ */ T(h, {
232
232
  value: "3d",
233
- children: /* @__PURE__ */ T(l, {
233
+ children: /* @__PURE__ */ T(d, {
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: r, ranges: a, o
239
239
  fields: _["3d"],
240
240
  options: t,
241
241
  row: !0,
242
- onChange: o
242
+ onChange: a
243
243
  })
244
244
  })
245
245
  })]
246
246
  })]
247
- }) : /* @__PURE__ */ E(l, {
247
+ }) : /* @__PURE__ */ E(d, {
248
248
  align: "center",
249
249
  gap: "3",
250
250
  className: k.compactStrip,
251
251
  children: [/* @__PURE__ */ T(z, {
252
- active: h,
253
- onChange: g
252
+ active: l,
253
+ onChange: m
254
254
  }), /* @__PURE__ */ T(B, {
255
- dimension: h,
256
- fields: _[h],
255
+ dimension: l,
256
+ fields: _[l],
257
257
  options: t,
258
258
  row: !0,
259
- onChange: o
259
+ onChange: a
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: b.inputs,
297
+ category: t.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,74 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ //#endregion
11
+ //#region node_modules/clsx/dist/clsx.mjs
12
+ function r(e) {
13
+ var t, n, i = "";
14
+ if (typeof e == "string" || typeof e == "number") i += e;
15
+ else if (typeof e == "object") if (Array.isArray(e)) {
16
+ var a = e.length;
17
+ for (t = 0; t < a; t++) e[t] && (n = r(e[t])) && (i && (i += " "), i += n);
18
+ } else for (n in e) e[n] && (i && (i += " "), i += n);
19
+ return i;
20
+ }
21
+ function i() {
22
+ for (var e, t, n = 0, i = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = r(e)) && (i && (i += " "), i += t);
23
+ return i;
24
+ }
25
+ //#endregion
26
+ //#region node_modules/class-variance-authority/dist/index.mjs
27
+ var a = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, o = i, s = (e, t) => (n) => {
28
+ if (t?.variants == null) return o(e, n?.class, n?.className);
29
+ let { variants: r, defaultVariants: i } = t, s = Object.keys(r).map((e) => {
30
+ let t = n?.[e], o = i?.[e];
31
+ if (t === null) return null;
32
+ let s = a(t) || a(o);
33
+ return r[e][s];
34
+ }), c = n && Object.entries(n).reduce((e, t) => {
35
+ let [n, r] = t;
36
+ return r === void 0 || (e[n] = r), e;
37
+ }, {});
38
+ return o(e, s, t?.compoundVariants?.reduce((e, t) => {
39
+ let { class: n, className: r, ...a } = t;
40
+ return Object.entries(a).every((e) => {
41
+ let [t, n] = e;
42
+ return Array.isArray(n) ? n.includes({
43
+ ...i,
44
+ ...c
45
+ }[t]) : {
46
+ ...i,
47
+ ...c
48
+ }[t] === n;
49
+ }) ? [
50
+ ...e,
51
+ n,
52
+ r
53
+ ] : e;
54
+ }, []), n?.class, n?.className);
55
+ }, c = {
56
+ buttons: {
57
+ id: "buttons",
58
+ label: "Buttons"
59
+ },
60
+ inputs: {
61
+ id: "inputs",
62
+ label: "Inputs"
63
+ },
64
+ layout: {
65
+ id: "layout",
66
+ label: "Layout"
67
+ },
68
+ display: {
69
+ id: "display",
70
+ label: "Display"
71
+ }
72
+ };
73
+ //#endregion
74
+ export { n as a, t as i, s as n, o as r, c as t };