@imfusion/web-ui 0.6.1-dev.27.gfc6e5abb → 0.6.1-dev.3.g8b2855c3
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 +169 -102
- package/dist/{code-C_56u-Vk.js → code-Blo48PGr.js} +2 -2
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/icons/icon-config-provider.d.ts +8 -0
- package/dist/icons/icon-context.d.ts +4 -0
- package/dist/{icons-Cy1HAosO.js → icons-wBmF0U2x.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +830 -1009
- package/dist/integrations/code-highlight/highlighter.d.ts +0 -24
- package/dist/integrations/code-highlight.js +47 -80
- package/dist/integrations/image-display-options.js +2 -2
- package/dist/provider/web-ui-provider.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{tabs-DIe1Utiy.js → tabs-CMKvMF4E.js} +0 -2
- package/package.json +4 -5
- package/src/docgen/doc.gen.json +1 -389
- package/src/llms/install-templates/AGENTS.md +18 -15
- package/src/llms/llms.gen.txt +33 -39
- package/src/llms/skills/imf-web-ui/SKILL.md +39 -30
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +102 -50
- package/src/llms/skills/imf-web-ui-components/SKILL.md +104 -47
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +52 -44
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +62 -40
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +12 -11
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +46 -31
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +23 -18
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +69 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +146 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +23 -17
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +20 -15
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +19 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +16 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +42 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +30 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +74 -28
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +62 -65
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +14 -12
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -9
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +68 -40
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +50 -26
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +25 -19
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +64 -45
- package/src/llms/skills/imf-web-ui-update/SKILL.md +114 -48
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +92 -64
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +36 -16
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +27 -14
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +38 -22
- package/src/llms/tokens.gen.json +5 -5
- package/dist/codegen/gen-code-highlight-theme.d.ts +0 -1
- package/dist/components/toast/index.d.ts +0 -2
- package/dist/components/toast/toast.d.ts +0 -200
- package/dist/components/toast/toast.meta.d.ts +0 -2
- package/dist/icons/icon-config.d.ts +0 -12
|
@@ -23,30 +23,6 @@ declare const LANGUAGE_DEFINITIONS: {
|
|
|
23
23
|
readonly cmake: {
|
|
24
24
|
readonly aliases: readonly [];
|
|
25
25
|
};
|
|
26
|
-
readonly html: {
|
|
27
|
-
readonly aliases: readonly ["htm", "xml", "angular-html"];
|
|
28
|
-
};
|
|
29
|
-
readonly js: {
|
|
30
|
-
readonly aliases: readonly ["javascript", "mjs", "cjs", "js-vue"];
|
|
31
|
-
};
|
|
32
|
-
readonly jsx: {
|
|
33
|
-
readonly aliases: readonly [];
|
|
34
|
-
};
|
|
35
|
-
readonly markdown: {
|
|
36
|
-
readonly aliases: readonly ["md"];
|
|
37
|
-
};
|
|
38
|
-
readonly yaml: {
|
|
39
|
-
readonly aliases: readonly ["yml"];
|
|
40
|
-
};
|
|
41
|
-
readonly sql: {
|
|
42
|
-
readonly aliases: readonly [];
|
|
43
|
-
};
|
|
44
|
-
readonly dockerfile: {
|
|
45
|
-
readonly aliases: readonly [];
|
|
46
|
-
};
|
|
47
|
-
readonly toml: {
|
|
48
|
-
readonly aliases: readonly [];
|
|
49
|
-
};
|
|
50
26
|
};
|
|
51
27
|
export declare const SUPPORTED_LANGUAGES: string[];
|
|
52
28
|
type CanonicalLanguage = keyof typeof LANGUAGE_DEFINITIONS;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { t as e } from "../chunk-DmhlhrBa.js";
|
|
2
2
|
import { t } from "../meta-CySnRuVp.js";
|
|
3
|
-
import { i as n, n as r, r as i } from "../code-
|
|
3
|
+
import { i as n, n as r, r as i } from "../code-Blo48PGr.js";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
import { cloneElement as o, useMemo as s } from "react";
|
|
6
6
|
import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
|
|
7
7
|
import { css as f } from "@tanstack/highlight/languages/css";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { plaintext as y } from "@tanstack/highlight/languages/plaintext";
|
|
15
|
-
import { shell as b } from "@tanstack/highlight/languages/shell";
|
|
16
|
-
import { sql as x } from "@tanstack/highlight/languages/sql";
|
|
17
|
-
import { toml as S } from "@tanstack/highlight/languages/toml";
|
|
18
|
-
import { ts as C } from "@tanstack/highlight/languages/ts";
|
|
19
|
-
import { tsx as w } from "@tanstack/highlight/languages/tsx";
|
|
20
|
-
import { yaml as T } from "@tanstack/highlight/languages/yaml";
|
|
21
|
-
import { python as E } from "@tanstack/highlight/languages/python";
|
|
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";
|
|
22
14
|
//#region src/integrations/code-highlight/language-patterns.ts
|
|
23
|
-
function
|
|
15
|
+
function y(e, t, n = []) {
|
|
24
16
|
let r = [], i = new Uint8Array(e.length);
|
|
25
17
|
for (let { start: e, end: t } of n) i.fill(1, e, t);
|
|
26
18
|
for (let n of t) {
|
|
@@ -50,7 +42,7 @@ function D(e, t, n = []) {
|
|
|
50
42
|
}
|
|
51
43
|
//#endregion
|
|
52
44
|
//#region src/integrations/code-highlight/languages/cmake.ts
|
|
53
|
-
var
|
|
45
|
+
var b = [
|
|
54
46
|
{
|
|
55
47
|
className: "string",
|
|
56
48
|
regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
|
|
@@ -83,12 +75,12 @@ var O = [
|
|
|
83
75
|
className: "operator",
|
|
84
76
|
regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
|
|
85
77
|
}
|
|
86
|
-
],
|
|
78
|
+
], x = l({
|
|
87
79
|
name: "cmake",
|
|
88
80
|
tokenize(e) {
|
|
89
|
-
return
|
|
81
|
+
return y(e, b);
|
|
90
82
|
}
|
|
91
|
-
}),
|
|
83
|
+
}), S = [
|
|
92
84
|
{
|
|
93
85
|
className: "comment",
|
|
94
86
|
regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
|
|
@@ -125,7 +117,7 @@ var O = [
|
|
|
125
117
|
className: "operator",
|
|
126
118
|
regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
|
|
127
119
|
}
|
|
128
|
-
],
|
|
120
|
+
], C = l({
|
|
129
121
|
name: "cpp",
|
|
130
122
|
aliases: [
|
|
131
123
|
"c++",
|
|
@@ -134,19 +126,19 @@ var O = [
|
|
|
134
126
|
"hpp"
|
|
135
127
|
],
|
|
136
128
|
tokenize(e) {
|
|
137
|
-
return
|
|
129
|
+
return y(e, S);
|
|
138
130
|
}
|
|
139
|
-
}),
|
|
131
|
+
}), w = [{
|
|
140
132
|
className: "function",
|
|
141
133
|
regex: /\b[A-Za-z_]\w*(?=\s*\()/g
|
|
142
|
-
}],
|
|
134
|
+
}], T = l({
|
|
143
135
|
name: "python",
|
|
144
136
|
aliases: ["py"],
|
|
145
137
|
tokenize(e, t) {
|
|
146
|
-
let n =
|
|
138
|
+
let n = v.tokenize(e, t), r = y(e, w, n);
|
|
147
139
|
return [...n, ...r];
|
|
148
140
|
}
|
|
149
|
-
}),
|
|
141
|
+
}), E = {
|
|
150
142
|
tsx: { aliases: ["typescriptreact"] },
|
|
151
143
|
ts: { aliases: ["typescript"] },
|
|
152
144
|
css: { aliases: ["scss"] },
|
|
@@ -164,98 +156,73 @@ var O = [
|
|
|
164
156
|
"hpp"
|
|
165
157
|
] },
|
|
166
158
|
python: { aliases: ["py"] },
|
|
167
|
-
cmake: { aliases: [] }
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"angular-html"
|
|
172
|
-
] },
|
|
173
|
-
js: { aliases: [
|
|
174
|
-
"javascript",
|
|
175
|
-
"mjs",
|
|
176
|
-
"cjs",
|
|
177
|
-
"js-vue"
|
|
178
|
-
] },
|
|
179
|
-
jsx: { aliases: [] },
|
|
180
|
-
markdown: { aliases: ["md"] },
|
|
181
|
-
yaml: { aliases: ["yml"] },
|
|
182
|
-
sql: { aliases: [] },
|
|
183
|
-
dockerfile: { aliases: [] },
|
|
184
|
-
toml: { aliases: [] }
|
|
185
|
-
}, F = Object.keys(P), I = [...F, ...Object.values(P).flatMap(({ aliases: e }) => e)];
|
|
186
|
-
function L(e) {
|
|
187
|
-
return I.includes(e);
|
|
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);
|
|
188
163
|
}
|
|
189
|
-
function
|
|
164
|
+
function A(e, t) {
|
|
190
165
|
return e.aliases.includes(t);
|
|
191
166
|
}
|
|
192
|
-
function
|
|
193
|
-
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;
|
|
194
169
|
return e;
|
|
195
170
|
}
|
|
196
|
-
var
|
|
171
|
+
var M = c({
|
|
197
172
|
languages: [
|
|
198
|
-
w,
|
|
199
|
-
C,
|
|
200
|
-
f,
|
|
201
|
-
b,
|
|
202
173
|
_,
|
|
203
|
-
j,
|
|
204
|
-
N,
|
|
205
|
-
k,
|
|
206
|
-
m,
|
|
207
|
-
h,
|
|
208
174
|
g,
|
|
209
|
-
|
|
175
|
+
f,
|
|
176
|
+
h,
|
|
177
|
+
p,
|
|
178
|
+
C,
|
|
210
179
|
T,
|
|
211
180
|
x,
|
|
212
|
-
|
|
213
|
-
S,
|
|
214
|
-
y
|
|
181
|
+
m
|
|
215
182
|
],
|
|
216
183
|
fallbackLanguage: "plaintext"
|
|
217
184
|
});
|
|
218
|
-
function
|
|
219
|
-
let n =
|
|
185
|
+
function N(e, t) {
|
|
186
|
+
let n = j(t), { tokens: r } = M.tokenize(e, { lang: n });
|
|
220
187
|
return u(d(r));
|
|
221
188
|
}
|
|
222
189
|
//#endregion
|
|
223
190
|
//#region src/integrations/code-highlight/code-highlight.tsx
|
|
224
|
-
var
|
|
225
|
-
Block: () =>
|
|
226
|
-
Inline: () =>
|
|
191
|
+
var P = /* @__PURE__ */ e({
|
|
192
|
+
Block: () => I,
|
|
193
|
+
Inline: () => L,
|
|
227
194
|
InlineLink: () => n
|
|
228
195
|
});
|
|
229
|
-
function
|
|
196
|
+
function F(e, t) {
|
|
230
197
|
return s(() => {
|
|
231
|
-
if (!(t == null || e === "")) return /* @__PURE__ */ a("span", { dangerouslySetInnerHTML: { __html:
|
|
198
|
+
if (!(t == null || e === "")) return /* @__PURE__ */ a("span", { dangerouslySetInnerHTML: { __html: N(e, t) } });
|
|
232
199
|
}, [e, t]);
|
|
233
200
|
}
|
|
234
|
-
function
|
|
235
|
-
let i =
|
|
201
|
+
function I({ language: e, children: t, ...n }) {
|
|
202
|
+
let i = F(t, e);
|
|
236
203
|
return o(/* @__PURE__ */ a(r, {
|
|
237
204
|
...n,
|
|
238
205
|
language: e,
|
|
239
206
|
children: t
|
|
240
207
|
}), { children: i ?? t });
|
|
241
208
|
}
|
|
242
|
-
|
|
243
|
-
function
|
|
244
|
-
let r =
|
|
209
|
+
I.displayName = "Code.Block";
|
|
210
|
+
function L({ language: e, children: t, ...n }) {
|
|
211
|
+
let r = F(t, e);
|
|
245
212
|
return o(/* @__PURE__ */ a(i, {
|
|
246
213
|
...n,
|
|
247
214
|
children: t
|
|
248
215
|
}), { children: r ?? t });
|
|
249
216
|
}
|
|
250
|
-
|
|
217
|
+
L.displayName = "Code.Inline";
|
|
251
218
|
//#endregion
|
|
252
219
|
//#region src/integrations/code-highlight/code-highlight.meta.ts
|
|
253
|
-
var
|
|
220
|
+
var R = {
|
|
254
221
|
name: "CodeHighlight",
|
|
255
222
|
category: t.display,
|
|
256
223
|
status: "experimental",
|
|
257
224
|
namespace: !0,
|
|
258
|
-
description: "Syntax-highlighted Code parts
|
|
225
|
+
description: "Syntax-highlighted drop-in for the Code parts — the same Code.Block and Code.Inline, with TanStack Highlight token coloring that follows the color scheme. Imported from @imfusion/web-ui/integrations/code-highlight; requires the @tanstack/highlight peer.",
|
|
259
226
|
origin: "adapted",
|
|
260
227
|
internalDependencies: ["Code"],
|
|
261
228
|
upstream: {
|
|
@@ -266,4 +233,4 @@ var K = {
|
|
|
266
233
|
}
|
|
267
234
|
};
|
|
268
235
|
//#endregion
|
|
269
|
-
export {
|
|
236
|
+
export { P as Code, D as SUPPORTED_LANGUAGES, R as codeHighlightMeta, k as isSupportedLanguage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "../meta-CySnRuVp.js";
|
|
2
|
-
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, p, r as m, t as h, u as g, v as _, x as v, y } from "../tabs-
|
|
2
|
+
import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d, o as f, p, r as m, t as h, u as g, v as _, x as v, y } from "../tabs-CMKvMF4E.js";
|
|
3
3
|
import { cva as b } from "class-variance-authority";
|
|
4
4
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
5
5
|
import { useId as w, useMemo as T, useState as E } from "react";
|
|
@@ -297,7 +297,7 @@ var U = {
|
|
|
297
297
|
name: "ImageDisplayOptions",
|
|
298
298
|
category: e.inputs,
|
|
299
299
|
status: "experimental",
|
|
300
|
-
description: "
|
|
300
|
+
description: "A panel or toolbar of controls bound to an image dataset's display options.",
|
|
301
301
|
origin: "adapted",
|
|
302
302
|
internalDependencies: [
|
|
303
303
|
"Tabs",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { IconConfig } from '../icons/icon-context';
|
|
3
3
|
interface Props {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
/** SVG defaults for icons in this provider's subtree; omitted fields use the defaults from icon-
|
|
6
|
-
icons?:
|
|
5
|
+
/** SVG defaults for icons in this provider's subtree; omitted fields use the defaults from icon-context.ts. */
|
|
6
|
+
icons?: IconConfig;
|
|
7
7
|
}
|
|
8
8
|
export declare function WebUIProvider({ children, icons }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|