@imfusion/web-ui 0.5.1-dev.50.ga7a4f1c3 → 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.
- package/README.md +1 -1
- package/dist/chunk-DA_OvQe2.js +11 -0
- package/dist/code-BRy_lg-h.js +135 -0
- package/dist/codegen/gen-icons.d.ts +24 -0
- package/dist/components/callout/callout.d.ts +1 -1
- package/dist/components/chip-link/chip-link.d.ts +1 -1
- package/dist/components/code/code.d.ts +10 -18
- package/dist/components/icon/icon.d.ts +16 -0
- package/dist/components/icon/icon.meta.d.ts +2 -0
- package/dist/components/icon/index.d.ts +4 -0
- package/dist/components/icon/types.d.ts +2 -0
- package/dist/components/input/input.d.ts +3 -1
- package/dist/components/typo/typo.d.ts +2 -2
- package/dist/docgen/component-sources.d.ts +7 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-resize-observer.d.ts +2 -0
- package/dist/icons/catalog.gen.d.ts +8357 -0
- package/dist/icons/icon-config-provider.d.ts +8 -0
- package/dist/icons/icon-context.d.ts +4 -0
- package/dist/icons/icons.gen.d.ts +1672 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons-BhogvWBV.js +77 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5026 -5059
- package/dist/integrations/code-highlight/code-highlight.d.ts +8 -6
- package/dist/integrations/code-highlight.js +59 -60
- package/dist/integrations/image-display-options.js +56 -56
- package/dist/meta-BwCupYyq.js +64 -0
- package/dist/provider/web-ui-provider.d.ts +4 -1
- package/dist/style.css +1 -1
- package/dist/{tabs-CVp_SgBl.js → tabs-CYqtw1q9.js} +2 -1
- package/package.json +8 -2
- package/src/docgen/doc.gen.json +54 -38
- package/src/llms/icon-catalog.gen.json +11203 -0
- package/src/llms/llms.gen.txt +5 -0
- package/src/llms/skills/imf-web-ui-components/SKILL.md +55 -3
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +2 -0
- package/src/llms/tokens.gen.json +2 -2
- package/dist/code-qBbqAHK-.js +0 -190
- package/dist/meta-B8C51eyL.js +0 -74
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Code } from '../../components/code';
|
|
2
2
|
import { SupportedLanguage } from './highlighter';
|
|
3
|
-
type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "
|
|
3
|
+
type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "children" | "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;
|
|
5
6
|
language?: SupportedLanguage;
|
|
6
7
|
};
|
|
7
|
-
/** Code.Block — the core `Code.Block` with TanStack Highlight tokens
|
|
8
|
-
export declare function Block({ language, children, ...props }: BlockProps): import(
|
|
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>;
|
|
9
10
|
export declare namespace Block {
|
|
10
11
|
var displayName: string;
|
|
11
12
|
}
|
|
12
|
-
type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "
|
|
13
|
+
type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "children"> & {
|
|
13
14
|
/** Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text. */
|
|
15
|
+
children: string;
|
|
14
16
|
language?: SupportedLanguage;
|
|
15
17
|
};
|
|
16
|
-
/** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens
|
|
17
|
-
export declare function Inline({ language, children, ...props }: InlineProps): import(
|
|
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>;
|
|
18
20
|
export declare namespace Inline {
|
|
19
21
|
var displayName: string;
|
|
20
22
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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";
|
|
13
14
|
//#region src/integrations/code-highlight/language-patterns.ts
|
|
14
|
-
function
|
|
15
|
+
function y(e, t, n = []) {
|
|
15
16
|
let r = [], i = new Uint8Array(e.length);
|
|
16
17
|
for (let { start: e, end: t } of n) i.fill(1, e, t);
|
|
17
18
|
for (let n of t) {
|
|
@@ -41,7 +42,7 @@ function v(e, t, n = []) {
|
|
|
41
42
|
}
|
|
42
43
|
//#endregion
|
|
43
44
|
//#region src/integrations/code-highlight/languages/cmake.ts
|
|
44
|
-
var
|
|
45
|
+
var b = [
|
|
45
46
|
{
|
|
46
47
|
className: "string",
|
|
47
48
|
regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
|
|
@@ -74,12 +75,12 @@ var y = [
|
|
|
74
75
|
className: "operator",
|
|
75
76
|
regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
|
|
76
77
|
}
|
|
77
|
-
],
|
|
78
|
+
], x = l({
|
|
78
79
|
name: "cmake",
|
|
79
80
|
tokenize(e) {
|
|
80
|
-
return
|
|
81
|
+
return y(e, b);
|
|
81
82
|
}
|
|
82
|
-
}),
|
|
83
|
+
}), S = [
|
|
83
84
|
{
|
|
84
85
|
className: "comment",
|
|
85
86
|
regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
|
|
@@ -116,7 +117,7 @@ var y = [
|
|
|
116
117
|
className: "operator",
|
|
117
118
|
regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
|
|
118
119
|
}
|
|
119
|
-
],
|
|
120
|
+
], C = l({
|
|
120
121
|
name: "cpp",
|
|
121
122
|
aliases: [
|
|
122
123
|
"c++",
|
|
@@ -125,19 +126,19 @@ var y = [
|
|
|
125
126
|
"hpp"
|
|
126
127
|
],
|
|
127
128
|
tokenize(e) {
|
|
128
|
-
return
|
|
129
|
+
return y(e, S);
|
|
129
130
|
}
|
|
130
|
-
}),
|
|
131
|
+
}), w = [{
|
|
131
132
|
className: "function",
|
|
132
133
|
regex: /\b[A-Za-z_]\w*(?=\s*\()/g
|
|
133
|
-
}],
|
|
134
|
+
}], T = l({
|
|
134
135
|
name: "python",
|
|
135
136
|
aliases: ["py"],
|
|
136
137
|
tokenize(e, t) {
|
|
137
|
-
let n =
|
|
138
|
+
let n = v.tokenize(e, t), r = y(e, w, n);
|
|
138
139
|
return [...n, ...r];
|
|
139
140
|
}
|
|
140
|
-
}),
|
|
141
|
+
}), E = {
|
|
141
142
|
tsx: { aliases: ["typescriptreact"] },
|
|
142
143
|
ts: { aliases: ["typescript"] },
|
|
143
144
|
css: { aliases: ["scss"] },
|
|
@@ -156,69 +157,67 @@ var y = [
|
|
|
156
157
|
] },
|
|
157
158
|
python: { aliases: ["py"] },
|
|
158
159
|
cmake: { aliases: [] }
|
|
159
|
-
},
|
|
160
|
-
function
|
|
161
|
-
return
|
|
160
|
+
}, D = Object.keys(E), O = [...D, ...Object.values(E).flatMap(({ aliases: e }) => e)];
|
|
161
|
+
function k(e) {
|
|
162
|
+
return O.includes(e);
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
+
function A(e, t) {
|
|
164
165
|
return e.aliases.includes(t);
|
|
165
166
|
}
|
|
166
|
-
function
|
|
167
|
-
for (let [t, n] of Object.entries(
|
|
167
|
+
function j(e) {
|
|
168
|
+
for (let [t, n] of Object.entries(E)) if (A(n, e)) return t;
|
|
168
169
|
return e;
|
|
169
170
|
}
|
|
170
|
-
var
|
|
171
|
+
var M = c({
|
|
171
172
|
languages: [
|
|
173
|
+
_,
|
|
172
174
|
g,
|
|
173
|
-
h,
|
|
174
|
-
d,
|
|
175
|
-
m,
|
|
176
175
|
f,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
h,
|
|
177
|
+
p,
|
|
178
|
+
C,
|
|
179
|
+
T,
|
|
180
|
+
x,
|
|
181
|
+
m
|
|
181
182
|
],
|
|
182
183
|
fallbackLanguage: "plaintext"
|
|
183
184
|
});
|
|
184
|
-
function
|
|
185
|
-
let n =
|
|
186
|
-
return
|
|
185
|
+
function N(e, t) {
|
|
186
|
+
let n = j(t), { tokens: r } = M.tokenize(e, { lang: n });
|
|
187
|
+
return u(d(r));
|
|
187
188
|
}
|
|
188
189
|
//#endregion
|
|
189
190
|
//#region src/integrations/code-highlight/code-highlight.tsx
|
|
190
|
-
var
|
|
191
|
-
Block: () =>
|
|
192
|
-
Inline: () =>
|
|
191
|
+
var P = /* @__PURE__ */ e({
|
|
192
|
+
Block: () => I,
|
|
193
|
+
Inline: () => L,
|
|
193
194
|
InlineLink: () => n
|
|
194
195
|
});
|
|
195
|
-
function
|
|
196
|
-
return
|
|
197
|
-
if (!(t == null || e === "")) return /* @__PURE__ */
|
|
196
|
+
function F(e, t) {
|
|
197
|
+
return o(() => {
|
|
198
|
+
if (!(t == null || e === "")) return /* @__PURE__ */ s("span", { dangerouslySetInnerHTML: { __html: N(e, t) } });
|
|
198
199
|
}, [e, t]);
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
-
let i =
|
|
202
|
-
return /* @__PURE__ */
|
|
201
|
+
function I({ language: e, children: t, ...n }) {
|
|
202
|
+
let i = F(t, e);
|
|
203
|
+
return a(/* @__PURE__ */ s(r, {
|
|
203
204
|
...n,
|
|
204
205
|
language: e,
|
|
205
|
-
highlighted: i,
|
|
206
206
|
children: t
|
|
207
|
-
});
|
|
207
|
+
}), { children: i ?? t });
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
function
|
|
211
|
-
let r =
|
|
212
|
-
return /* @__PURE__ */
|
|
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, {
|
|
213
213
|
...n,
|
|
214
|
-
highlighted: r,
|
|
215
214
|
children: t
|
|
216
|
-
});
|
|
215
|
+
}), { children: r ?? t });
|
|
217
216
|
}
|
|
218
|
-
|
|
217
|
+
L.displayName = "Code.Inline";
|
|
219
218
|
//#endregion
|
|
220
219
|
//#region src/integrations/code-highlight/code-highlight.meta.ts
|
|
221
|
-
var
|
|
220
|
+
var R = {
|
|
222
221
|
name: "CodeHighlight",
|
|
223
222
|
category: t.display,
|
|
224
223
|
status: "experimental",
|
|
@@ -234,4 +233,4 @@ var L = {
|
|
|
234
233
|
}
|
|
235
234
|
};
|
|
236
235
|
//#endregion
|
|
237
|
-
export {
|
|
236
|
+
export { P as Code, D as SUPPORTED_LANGUAGES, R as codeHighlightMeta, k as isSupportedLanguage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 =
|
|
75
|
-
function L({ spec:
|
|
76
|
-
let s = /* @__PURE__ */ E(
|
|
77
|
-
value:
|
|
78
|
-
min:
|
|
79
|
-
max:
|
|
80
|
-
step:
|
|
81
|
-
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(
|
|
85
|
+
children: [/* @__PURE__ */ E(l, {
|
|
86
86
|
justify: "between",
|
|
87
|
-
children: [/* @__PURE__ */ T(
|
|
88
|
-
}), /* @__PURE__ */ T(
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
112
|
+
children: /* @__PURE__ */ T(o, {})
|
|
113
113
|
})]
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
function z({ active: e, onChange: t }) {
|
|
117
|
-
return /* @__PURE__ */ E(
|
|
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(
|
|
125
|
+
children: [/* @__PURE__ */ T(f, {
|
|
126
126
|
value: "2d",
|
|
127
127
|
children: "2D"
|
|
128
|
-
}), /* @__PURE__ */ T(
|
|
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:
|
|
152
|
-
let [
|
|
153
|
-
|
|
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
|
-
...
|
|
156
|
+
...f,
|
|
157
157
|
"data-imf-ui-component": "ImageDisplayOptions",
|
|
158
158
|
className: I({ className: s }),
|
|
159
|
-
children: e === "default" ? /* @__PURE__ */ E(
|
|
160
|
-
value:
|
|
159
|
+
children: e === "default" ? /* @__PURE__ */ E(n, {
|
|
160
|
+
value: h,
|
|
161
161
|
onValueChange: v,
|
|
162
|
-
children: [/* @__PURE__ */ E(
|
|
163
|
-
/* @__PURE__ */ T(
|
|
162
|
+
children: [/* @__PURE__ */ E(u, { children: [
|
|
163
|
+
/* @__PURE__ */ T(d, {
|
|
164
164
|
value: "2d",
|
|
165
165
|
children: "2D Slices"
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */ T(
|
|
167
|
+
/* @__PURE__ */ T(d, {
|
|
168
168
|
value: "3d",
|
|
169
169
|
children: "3D Volume"
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */ T(
|
|
172
|
-
] }), /* @__PURE__ */ E(
|
|
171
|
+
/* @__PURE__ */ T(m, {})
|
|
172
|
+
] }), /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(p, {
|
|
173
173
|
value: "2d",
|
|
174
|
-
children: /* @__PURE__ */ T(
|
|
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:
|
|
181
|
+
onChange: o
|
|
182
182
|
})
|
|
183
183
|
})
|
|
184
|
-
}), /* @__PURE__ */ T(
|
|
184
|
+
}), /* @__PURE__ */ T(p, {
|
|
185
185
|
value: "3d",
|
|
186
|
-
children: /* @__PURE__ */ T(
|
|
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:
|
|
193
|
+
onChange: o
|
|
194
194
|
})
|
|
195
195
|
})
|
|
196
196
|
})] })]
|
|
197
|
-
}) : e === "horizontal" ? /* @__PURE__ */ E(
|
|
197
|
+
}) : e === "horizontal" ? /* @__PURE__ */ E(n, {
|
|
198
198
|
className: k.horizontalTabs,
|
|
199
199
|
orientation: "vertical",
|
|
200
|
-
value:
|
|
200
|
+
value: h,
|
|
201
201
|
onValueChange: v,
|
|
202
|
-
children: [/* @__PURE__ */ E(
|
|
202
|
+
children: [/* @__PURE__ */ E(u, {
|
|
203
203
|
fill: !0,
|
|
204
204
|
children: [
|
|
205
|
-
/* @__PURE__ */ T(
|
|
205
|
+
/* @__PURE__ */ T(d, {
|
|
206
206
|
value: "2d",
|
|
207
207
|
children: "2D"
|
|
208
208
|
}),
|
|
209
|
-
/* @__PURE__ */ T(
|
|
209
|
+
/* @__PURE__ */ T(d, {
|
|
210
210
|
value: "3d",
|
|
211
211
|
children: "3D"
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */ T(
|
|
213
|
+
/* @__PURE__ */ T(m, {})
|
|
214
214
|
]
|
|
215
|
-
}), /* @__PURE__ */ E(
|
|
215
|
+
}), /* @__PURE__ */ E(c, {
|
|
216
216
|
className: k.horizontalPanel,
|
|
217
|
-
children: [/* @__PURE__ */ T(
|
|
217
|
+
children: [/* @__PURE__ */ T(p, {
|
|
218
218
|
value: "2d",
|
|
219
|
-
children: /* @__PURE__ */ T(
|
|
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:
|
|
228
|
+
onChange: o
|
|
229
229
|
})
|
|
230
230
|
})
|
|
231
|
-
}), /* @__PURE__ */ T(
|
|
231
|
+
}), /* @__PURE__ */ T(p, {
|
|
232
232
|
value: "3d",
|
|
233
|
-
children: /* @__PURE__ */ T(
|
|
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:
|
|
242
|
+
onChange: o
|
|
243
243
|
})
|
|
244
244
|
})
|
|
245
245
|
})]
|
|
246
246
|
})]
|
|
247
|
-
}) : /* @__PURE__ */ E(
|
|
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:
|
|
253
|
-
onChange:
|
|
252
|
+
active: h,
|
|
253
|
+
onChange: g
|
|
254
254
|
}), /* @__PURE__ */ T(B, {
|
|
255
|
-
dimension:
|
|
256
|
-
fields: _[
|
|
255
|
+
dimension: h,
|
|
256
|
+
fields: _[h],
|
|
257
257
|
options: t,
|
|
258
258
|
row: !0,
|
|
259
|
-
onChange:
|
|
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:
|
|
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 {};
|