@imfusion/web-ui 0.5.1-dev.48.g27701f90 → 0.5.1-dev.5.gb4de52d7

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 (69) hide show
  1. package/README.md +55 -156
  2. package/bin/install-skill.js +180 -0
  3. package/dist/index.d.ts +0 -2
  4. package/dist/index.js +4317 -4956
  5. package/dist/integrations/code-highlight/highlighter.d.ts +3 -32
  6. package/dist/integrations/code-highlight.js +48 -188
  7. package/dist/integrations/image-display-options.js +1 -1
  8. package/dist/style.css +1 -1
  9. package/dist/{tabs-CVp_SgBl.js → tabs-DqBFSqq6.js} +1 -1
  10. package/package.json +25 -39
  11. package/src/docgen/doc.gen.json +0 -327
  12. package/src/llms/llms.gen.txt +0 -12
  13. package/src/llms/skills/imf-web-ui/SKILL.md +12 -13
  14. package/src/llms/skills/imf-web-ui-components/SKILL.md +1 -2
  15. package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +93 -0
  16. package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +133 -0
  17. package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +94 -0
  18. package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +201 -0
  19. package/src/llms/skills/imf-web-ui-setup/SKILL.md +37 -67
  20. package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
  21. package/src/llms/skills/imf-web-ui-ux/references/forms.md +2 -2
  22. package/bin/install.js +0 -428
  23. package/bin/install.test.ts +0 -329
  24. package/dist/build/vite-css-module-names/index.d.ts +0 -20
  25. package/dist/build/vite-css-module-names.js +0 -17
  26. package/dist/components/field/field.d.ts +0 -104
  27. package/dist/components/field/field.meta.d.ts +0 -2
  28. package/dist/components/field/index.d.ts +0 -2
  29. package/dist/components/fieldset/fieldset.d.ts +0 -29
  30. package/dist/components/fieldset/fieldset.meta.d.ts +0 -2
  31. package/dist/components/fieldset/index.d.ts +0 -2
  32. package/dist/integrations/code-highlight/language-patterns.d.ts +0 -7
  33. package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
  34. package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
  35. package/dist/integrations/code-highlight/languages/python.d.ts +0 -1
  36. package/dist/llms/gen-tokens.d.ts +0 -7
  37. package/src/llms/install-templates/AGENTS.md +0 -34
  38. package/src/llms/install-templates/codex-hooks.json +0 -44
  39. package/src/llms/install-templates/hooks/baseline-staleness.sh +0 -17
  40. package/src/llms/install-templates/hooks/session-start.sh +0 -5
  41. package/src/llms/install-templates/hooks/stop.sh +0 -18
  42. package/src/llms/install-templates/hooks/subagent-start.sh +0 -5
  43. package/src/llms/install-templates/hooks/user-prompt-submit.sh +0 -5
  44. package/src/llms/install-templates/settings.json +0 -45
  45. package/src/llms/skills/imf-web-ui-audit/SKILL.md +0 -119
  46. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +0 -57
  47. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -141
  48. package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +0 -45
  49. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +0 -82
  50. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +0 -27
  51. package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +0 -65
  52. package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +0 -50
  53. package/src/llms/skills/imf-web-ui-conventions/topics/components.md +0 -101
  54. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +0 -221
  55. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +0 -40
  56. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +0 -34
  57. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +0 -33
  58. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +0 -26
  59. package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +0 -53
  60. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +0 -44
  61. package/src/llms/skills/imf-web-ui-conventions/topics/react.md +0 -109
  62. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +0 -88
  63. package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +0 -25
  64. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +0 -7
  65. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +0 -116
  66. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +0 -73
  67. package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +0 -62
  68. package/src/llms/skills/imf-web-ui-update/SKILL.md +0 -157
  69. package/src/llms/tokens.gen.json +0 -887
@@ -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 {};
@@ -2,203 +2,63 @@ import { a as e, t } from "../meta-B8C51eyL.js";
2
2
  import { i as n, n as r, r as i } from "../code-qBbqAHK-.js";
3
3
  import { useMemo as a } from "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
5
- import { createHighlighter as s, defineLanguage as c, renderNodesToHtml as l, renderTokens as u } from "@tanstack/highlight/core";
6
- import { css as d } from "@tanstack/highlight/languages/css";
7
- import { json as f } from "@tanstack/highlight/languages/json";
8
- import { plaintext as p } from "@tanstack/highlight/languages/plaintext";
9
- import { shell as m } from "@tanstack/highlight/languages/shell";
10
- import { ts as h } from "@tanstack/highlight/languages/ts";
11
- import { tsx as g } from "@tanstack/highlight/languages/tsx";
12
- import { python as _ } from "@tanstack/highlight/languages/python";
13
- //#region src/integrations/code-highlight/language-patterns.ts
14
- function v(e, t, n = []) {
15
- let r = [], i = new Uint8Array(e.length);
16
- for (let { start: e, end: t } of n) i.fill(1, e, t);
17
- for (let n of t) {
18
- let t = new RegExp(n.regex.source, n.regex.flags.includes("g") ? n.regex.flags : `${n.regex.flags}g`), a;
19
- for (; (a = t.exec(e)) !== null;) {
20
- let e = n.group == null ? a[0] : a[n.group];
21
- if (e === "") {
22
- a[0] === "" && (t.lastIndex += 1);
23
- continue;
24
- }
25
- let o = n.group == null ? 0 : a[0].indexOf(e), s = a.index + o, c = s + e.length;
26
- if (s < c) {
27
- let e = !1;
28
- for (let t = s; t < c; t += 1) if (i[t]) {
29
- e = !0;
30
- break;
31
- }
32
- e || (r.push({
33
- start: s,
34
- end: c,
35
- className: n.className
36
- }), i.fill(1, s, c));
37
- }
38
- }
39
- }
40
- return r;
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);
41
29
  }
42
- //#endregion
43
- //#region src/integrations/code-highlight/languages/cmake.ts
44
- var y = [
45
- {
46
- className: "string",
47
- regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
48
- },
49
- {
50
- className: "comment",
51
- regex: /#[^\n]*/g
52
- },
53
- {
54
- className: "variable",
55
- regex: /\$(?:ENV|CACHE)?\{[^}\n]+\}/g
56
- },
57
- {
58
- className: "keyword",
59
- regex: /\b(?:break|continue|else|elseif|endforeach|endfunction|endif|endmacro|endwhile|if|include|macro|return|while)\b/gi
60
- },
61
- {
62
- className: "literal",
63
- regex: /\b(?:FALSE|IGNORE|NOTFOUND|NO|OFF|ON|TRUE|YES)\b/gi
64
- },
65
- {
66
- className: "function",
67
- regex: /\b[A-Za-z_][\w-]*(?=\s*\()/g
68
- },
69
- {
70
- className: "number",
71
- regex: /\b\d+(?:\.\d+)?\b/g
72
- },
73
- {
74
- className: "operator",
75
- regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
76
- }
77
- ], b = c({
78
- name: "cmake",
79
- tokenize(e) {
80
- return v(e, y);
81
- }
82
- }), x = [
83
- {
84
- className: "comment",
85
- regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
86
- },
87
- {
88
- className: "string",
89
- regex: /"(?:\\.|[^"\\\n])*"|'(?:\\.|[^'\\\n])*'/g
90
- },
91
- {
92
- className: "meta",
93
- regex: /^[ \t]*#[ \t]*(?:include|define|if|ifdef|ifndef|elif|else|endif|pragma|undef|error|warning)\b/gm
94
- },
95
- {
96
- className: "keyword",
97
- 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
98
- },
99
- {
100
- className: "type",
101
- regex: /\b(?:bool|char|char8_t|char16_t|char32_t|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g
102
- },
103
- {
104
- className: "literal",
105
- regex: /\b(?:NULL|nullptr|true|false)\b/g
106
- },
107
- {
108
- className: "function",
109
- regex: /\b[A-Za-z_]\w*(?=\s*\()/g
110
- },
111
- {
112
- className: "number",
113
- regex: /\b(?:0[xX][\da-fA-F']+|0[bB][01']+|\d[\d']*(?:\.\d[\d']*)?(?:[eE][+-]?\d[\d']*)?[uUlLfF]*)\b/g
114
- },
115
- {
116
- className: "operator",
117
- regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
118
- }
119
- ], S = c({
120
- name: "cpp",
121
- aliases: [
122
- "c++",
123
- "cc",
124
- "cxx",
125
- "hpp"
126
- ],
127
- tokenize(e) {
128
- return v(e, x);
129
- }
130
- }), C = [{
131
- className: "function",
132
- regex: /\b[A-Za-z_]\w*(?=\s*\()/g
133
- }], w = c({
134
- name: "python",
135
- aliases: ["py"],
136
- tokenize(e, t) {
137
- let n = _.tokenize(e, t), r = v(e, C, n);
138
- return [...n, ...r];
139
- }
140
- }), T = {
141
- tsx: { aliases: ["typescriptreact"] },
142
- ts: { aliases: ["typescript"] },
143
- css: { aliases: ["scss"] },
144
- shell: { aliases: [
145
- "bash",
146
- "sh",
147
- "zsh",
148
- "shellscript"
149
- ] },
150
- json: { aliases: [] },
151
- cpp: { aliases: [
152
- "c++",
153
- "cc",
154
- "cxx",
155
- "hpp"
156
- ] },
157
- python: { aliases: ["py"] },
158
- cmake: { aliases: [] }
159
- }, E = Object.keys(T), D = [...E, ...Object.values(T).flatMap(({ aliases: e }) => e)];
160
- function O(e) {
161
- return D.includes(e);
162
- }
163
- function k(e, t) {
164
- return e.aliases.includes(t);
165
- }
166
- function A(e) {
167
- for (let [t, n] of Object.entries(T)) if (k(n, e)) return t;
168
- return e;
169
- }
170
- var j = s({
30
+ var b = {
31
+ shellscript: "shell",
32
+ scss: "css"
33
+ }, x = s({
171
34
  languages: [
172
- g,
173
35
  h,
174
- d,
175
36
  m,
176
- f,
177
- S,
178
- w,
179
- b,
180
- p
37
+ u,
38
+ p,
39
+ d,
40
+ f
181
41
  ],
182
42
  fallbackLanguage: "plaintext"
183
43
  });
184
- function M(e, t) {
185
- let n = A(t), { tokens: r } = j.tokenize(e, { lang: n });
186
- return l(u(r));
44
+ function S(e, t) {
45
+ let n = b[t] ?? t, { tokens: r } = x.tokenize(e, { lang: n });
46
+ return c(l(r));
187
47
  }
188
48
  //#endregion
189
49
  //#region src/integrations/code-highlight/code-highlight.tsx
190
- var N = /* @__PURE__ */ e({
191
- Block: () => F,
192
- Inline: () => I,
50
+ var C = /* @__PURE__ */ e({
51
+ Block: () => T,
52
+ Inline: () => E,
193
53
  InlineLink: () => n
194
54
  });
195
- function P(e, t) {
55
+ function w(e, t) {
196
56
  return a(() => {
197
- if (!(t == null || e === "")) return /* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: M(e, t) } });
57
+ if (!(t == null || e === "")) return /* @__PURE__ */ o("span", { dangerouslySetInnerHTML: { __html: S(e, t) } });
198
58
  }, [e, t]);
199
59
  }
200
- function F({ language: e, children: t, ...n }) {
201
- let i = P(t, e);
60
+ function T({ language: e, children: t, ...n }) {
61
+ let i = w(t, e);
202
62
  return /* @__PURE__ */ o(r, {
203
63
  ...n,
204
64
  language: e,
@@ -206,19 +66,19 @@ function F({ language: e, children: t, ...n }) {
206
66
  children: t
207
67
  });
208
68
  }
209
- F.displayName = "Code.Block";
210
- function I({ language: e, children: t, ...n }) {
211
- let r = P(t, e);
69
+ T.displayName = "Code.Block";
70
+ function E({ language: e, children: t, ...n }) {
71
+ let r = w(t, e);
212
72
  return /* @__PURE__ */ o(i, {
213
73
  ...n,
214
74
  highlighted: r,
215
75
  children: t
216
76
  });
217
77
  }
218
- I.displayName = "Code.Inline";
78
+ E.displayName = "Code.Inline";
219
79
  //#endregion
220
80
  //#region src/integrations/code-highlight/code-highlight.meta.ts
221
- var L = {
81
+ var D = {
222
82
  name: "CodeHighlight",
223
83
  category: t.display,
224
84
  status: "experimental",
@@ -234,4 +94,4 @@ var L = {
234
94
  }
235
95
  };
236
96
  //#endregion
237
- export { N as Code, E as SUPPORTED_LANGUAGES, L as codeHighlightMeta, O as isSupportedLanguage };
97
+ export { C as Code, g as SUPPORTED_LANGUAGES, D as codeHighlightMeta, y as isSupportedLanguage };
@@ -1,5 +1,5 @@
1
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";
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";