@imfusion/web-ui 0.5.1-dev.5.gb4de52d7 → 0.5.1-dev.50.ga7a4f1c3
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 +156 -55
- package/bin/install.js +428 -0
- package/bin/install.test.ts +329 -0
- package/dist/build/vite-css-module-names/index.d.ts +20 -0
- package/dist/build/vite-css-module-names.js +17 -0
- package/dist/components/field/field.d.ts +104 -0
- package/dist/components/field/field.meta.d.ts +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/fieldset/fieldset.d.ts +29 -0
- package/dist/components/fieldset/fieldset.meta.d.ts +2 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4956 -4317
- package/dist/integrations/code-highlight/highlighter.d.ts +32 -3
- package/dist/integrations/code-highlight/language-patterns.d.ts +7 -0
- package/dist/integrations/code-highlight/languages/cmake.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/cpp.d.ts +1 -0
- package/dist/integrations/code-highlight/languages/python.d.ts +1 -0
- package/dist/integrations/code-highlight.js +188 -48
- package/dist/integrations/image-display-options.js +1 -1
- package/dist/llms/gen-tokens.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/{tabs-DqBFSqq6.js → tabs-CVp_SgBl.js} +1 -1
- package/package.json +39 -25
- package/src/docgen/doc.gen.json +327 -0
- package/src/llms/install-templates/AGENTS.md +34 -0
- package/src/llms/install-templates/codex-hooks.json +44 -0
- package/src/llms/install-templates/hooks/baseline-staleness.sh +17 -0
- package/src/llms/install-templates/hooks/session-start.sh +5 -0
- package/src/llms/install-templates/hooks/stop.sh +18 -0
- package/src/llms/install-templates/hooks/subagent-start.sh +5 -0
- package/src/llms/install-templates/hooks/user-prompt-submit.sh +5 -0
- package/src/llms/install-templates/settings.json +45 -0
- package/src/llms/llms.gen.txt +12 -0
- package/src/llms/skills/imf-web-ui/SKILL.md +13 -12
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +119 -0
- package/src/llms/skills/imf-web-ui-components/SKILL.md +2 -1
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +57 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +141 -0
- package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +45 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +82 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +27 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +65 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +50 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +101 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +221 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +40 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +34 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +33 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +26 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +53 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +44 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +109 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +88 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +25 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +7 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +116 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +73 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +62 -0
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +67 -37
- package/src/llms/skills/imf-web-ui-update/SKILL.md +157 -0
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +4 -4
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +2 -2
- package/src/llms/tokens.gen.json +887 -0
- package/bin/install-skill.js +0 -180
- package/src/llms/skills/imf-web-ui-frontend-patterns/SKILL.md +0 -93
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/code-conventions.md +0 -133
- package/src/llms/skills/imf-web-ui-frontend-patterns/references/react-patterns.md +0 -94
- package/src/llms/skills/imf-web-ui-imfusion-frontend-setup/SKILL.md +0 -201
|
@@ -3786,4 +3786,4 @@ function Mo({ className: e, ...t }) {
|
|
|
3786
3786
|
}
|
|
3787
3787
|
Mo.displayName = "Tabs.Panel";
|
|
3788
3788
|
//#endregion
|
|
3789
|
-
export { Hn as $,
|
|
3789
|
+
export { Hn as $, ee as $n, Vt as $t, Kr as A, Je as An, xn as At, Tr as B, Ee as Bn, pn as Bt, ha as C, ct as Cn, Tn as Ct, gi as D, rt as Dn, kn as Dt, hi as E, it as En, wn as Et, Fr as F, Pe as Fn, vn as Ft, mr as G, V as Gn, en as Gt, Sr as H, _e as Hn, fn as Ht, Nr as I, Ae as In, yn as It, fr as J, F as Jn, Jt, pr as K, B as Kn, $t as Kt, Mr as L, je as Ln, hn as Lt, zr as M, qe as Mn, Cn as Mt, Ir as N, Ue as Nn, bn as Nt, mi as O, Xe as On, Dn as Ot, Pr as P, Z as Pn, _n as Pt, Kn as Q, f as Qn, Kt as Qt, kr as R, X as Rn, mn as Rt, _a as S, ut as Sn, jn as St, ra as T, st as Tn, En as Tt, br as U, J as Un, sn as Ut, Cr as V, be as Vn, ln as Vt, hr as W, U as Wn, tn as Wt, Gn as X, O as Xn, qt as Xt, gr as Y, N as Yn, Zt as Yt, Un as Z, T as Zn, Gt as Zt, Ta as _, _t as _n, In as _t, Do as a, jt as an, w as ar, Yn as at, fa as b, dt as bn, Fn as bt, to as c, Pt as cn, D as cr, ur as ct, Xa as d, Ot as dn, g as dr, Bn as dt, zt as en, u as er, Jn as et, Ua as f, gt as fn, v as fr, zn as ft, ka as g, vt as gn, Ln as gt, Oa as h, yt as hn, Rn as ht, jo as i, Dt as in, d as ir, er as it, Wr as j, Ke as jn, Sn as jt, ai as k, $e as kn, An as kt, $a as l, xt as ln, p as lr, qn as lt, Na as m, Ft as mn, E as mr, Vn as mt, Oo as n, At as nn, M as nr, $n as nt, ko as o, Et as on, m as or, sr as ot, Ra as p, bt as pn, y as pr, dr as pt, vr as q, L as qn, Qt as qt, Mo as r, St as rn, A as rr, Xn as rt, bo as s, Tt as sn, h as sr, cr as st, Ao as t, Lt as tn, k as tr, Qn as tt, Za as u, Ct as un, _ as ur, Zn as ut, ma as v, It as vn, Nn as vt, pa as w, ot as wn, On as wt, da as x, ft as xn, Mn as xt, ga as y, pt as yn, Pn as yt, Or as z, ke as zn, dn as zt };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imfusion/web-ui",
|
|
3
|
-
"version": "0.5.1-dev.
|
|
3
|
+
"version": "0.5.1-dev.50.ga7a4f1c3",
|
|
4
4
|
"description": "The official Web UI component library for ImFusion web apps",
|
|
5
5
|
"author": "ImFusion GmbH",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
"access": "restricted"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=24"
|
|
14
|
+
},
|
|
15
|
+
"imports": {
|
|
16
|
+
"#/*": "./src/*",
|
|
17
|
+
"#/storybook/*": "./.storybook/*"
|
|
18
|
+
},
|
|
12
19
|
"module": "./dist/index.js",
|
|
13
20
|
"types": "./dist/index.d.ts",
|
|
14
21
|
"bin": {
|
|
15
|
-
"web-ui-install
|
|
22
|
+
"web-ui-install": "bin/install.js"
|
|
16
23
|
},
|
|
17
24
|
"exports": {
|
|
18
25
|
".": {
|
|
@@ -23,6 +30,10 @@
|
|
|
23
30
|
"types": "./dist/integrations/*/index.d.ts",
|
|
24
31
|
"import": "./dist/integrations/*.js"
|
|
25
32
|
},
|
|
33
|
+
"./build/*": {
|
|
34
|
+
"types": "./dist/build/*/index.d.ts",
|
|
35
|
+
"import": "./dist/build/*.js"
|
|
36
|
+
},
|
|
26
37
|
"./styles.css": "./dist/style.css",
|
|
27
38
|
"./docgen.json": "./src/docgen/doc.gen.json",
|
|
28
39
|
"./llms.txt": "./src/llms/llms.gen.txt",
|
|
@@ -30,44 +41,46 @@
|
|
|
30
41
|
},
|
|
31
42
|
"files": [
|
|
32
43
|
"dist",
|
|
44
|
+
"src/llms/install-templates",
|
|
33
45
|
"src/docgen/doc.gen.json",
|
|
34
46
|
"src/llms/llms.gen.txt",
|
|
47
|
+
"src/llms/tokens.gen.json",
|
|
35
48
|
"src/llms/skills",
|
|
36
49
|
"bin"
|
|
37
50
|
],
|
|
38
51
|
"scripts": {
|
|
39
|
-
"codegen:docgen": "tsx src/docgen/gen-docgen.ts",
|
|
40
|
-
"codegen:llms": "tsx src/llms/gen-llms.ts",
|
|
41
|
-
"codegen:watch": "tsx watch src/codegen/run.ts",
|
|
42
|
-
"codegen:storybook": "tsx src/codegen/run.ts --storybook",
|
|
43
|
-
"codegen": "tsx src/codegen/run.ts",
|
|
44
|
-
"build": "npm run codegen && rm -rf dist && vite build && npm run codegen:docgen && npm run codegen:llms",
|
|
45
52
|
"dev": "tsx scripts/dev.ts",
|
|
46
53
|
"dev:host": "tsx scripts/dev.ts --host",
|
|
47
54
|
"dev:lib": "concurrently -n codegen,lib -c yellow,blue \"npm run codegen:watch\" \"vite build --watch\"",
|
|
48
|
-
"
|
|
55
|
+
"build": "npm run codegen && rm -rf dist && vite build && npm run codegen:docgen && npm run codegen:llms && npm run codegen:tokens",
|
|
56
|
+
"build:storybook": "npm run codegen:storybook && storybook build",
|
|
57
|
+
"storybook": "npm run codegen:storybook && storybook dev -p 6006 --no-open",
|
|
58
|
+
"storybook:free-ports": "tsx scripts/free-storybook-ports.ts",
|
|
59
|
+
"codegen": "tsx src/codegen/run.ts",
|
|
60
|
+
"codegen:watch": "tsx watch src/codegen/run.ts",
|
|
61
|
+
"codegen:storybook": "tsx src/codegen/run.ts --storybook",
|
|
62
|
+
"codegen:docgen": "tsx src/docgen/gen-docgen.ts",
|
|
63
|
+
"codegen:llms": "tsx src/llms/gen-llms.ts",
|
|
64
|
+
"codegen:tokens": "tsx src/llms/gen-tokens.ts",
|
|
65
|
+
"verify:format": "prettier --check .",
|
|
66
|
+
"verify:lint": "eslint . --cache --max-warnings=0",
|
|
67
|
+
"verify:typecheck": "npm run codegen && tsc -p tsconfig.json --noEmit && tsc -p tsconfig.lib.json --noEmit && tsc -p .storybook/tsconfig.json --noEmit",
|
|
68
|
+
"verify:tests": "vitest run",
|
|
69
|
+
"verify:knip": "knip",
|
|
70
|
+
"verify:deps": "tsx scripts/check-pinned-dependencies.ts",
|
|
71
|
+
"verify:changelog": "tsx scripts/verify/changelog.ts",
|
|
72
|
+
"verify:staged": "tsx scripts/verify/staged.ts",
|
|
73
|
+
"verify:full": "tsx scripts/verify/full.ts && npm run verify:tests",
|
|
49
74
|
"format": "prettier --write .",
|
|
50
|
-
"
|
|
51
|
-
"lint": "eslint . --cache --max-warnings=0",
|
|
52
|
-
"lint:fix": "eslint . --cache --fix",
|
|
75
|
+
"lint": "eslint . --cache --fix",
|
|
53
76
|
"lint:inspect": "npx @eslint/config-inspector@latest",
|
|
77
|
+
"test:unit": "vitest run --project unit",
|
|
78
|
+
"test:stories": "vitest run --project storybook",
|
|
79
|
+
"test:watch": "vitest",
|
|
54
80
|
"skills:eval": "node src/llms/evals/run.mjs",
|
|
55
81
|
"skills:eval:dev": "WEB_UI_SKILL_EVAL_ROOT=/private/tmp/web-ui-dev-skill-evals WEB_UI_SKILL_EVAL_RESULTS_DIR=.agents/evals/results WEB_UI_SKILL_EVAL_REPORT_PATH=.agents/evals/REPORT.md WEB_UI_SKILL_EVAL_SKILL_FAMILY=web-ui-dev WEB_UI_SKILL_EVAL_WORKSPACE_LABEL='development repository' node src/llms/evals/run.mjs --scenarios-dir .agents/evals/scenarios --setup .agents/evals/setup-env.sh",
|
|
56
82
|
"skills:eval:compare": "node src/llms/evals/compare.mjs",
|
|
57
83
|
"skills:eval:report": "node src/llms/evals/report.mjs",
|
|
58
|
-
"storybook": "npm run codegen:storybook && storybook dev -p 6006 --no-open",
|
|
59
|
-
"storybook:free-ports": "tsx scripts/free-storybook-ports.ts",
|
|
60
|
-
"build:storybook": "npm run codegen:storybook && storybook build",
|
|
61
|
-
"test": "vitest run",
|
|
62
|
-
"test:unit": "vitest run --project unit",
|
|
63
|
-
"test:stories": "vitest run --project storybook",
|
|
64
|
-
"test:watch": "vitest",
|
|
65
|
-
"verify:preflight": "tsx scripts/verify/full.ts",
|
|
66
|
-
"verify:full": "npm run verify:preflight && npm run test",
|
|
67
|
-
"worktree:create": "tsx scripts/worktrees.ts create",
|
|
68
|
-
"worktree:close": "tsx scripts/worktrees.ts close",
|
|
69
|
-
"worktree:discard": "tsx scripts/worktrees.ts discard",
|
|
70
|
-
"knip": "knip",
|
|
71
84
|
"git:config": "git config core.hooksPath .githooks && git config pull.rebase true && git config merge.ff only"
|
|
72
85
|
},
|
|
73
86
|
"peerDependencies": {
|
|
@@ -124,6 +137,7 @@
|
|
|
124
137
|
"globals": "15.15.0",
|
|
125
138
|
"jiti": "2.7.0",
|
|
126
139
|
"knip": "6.14.2",
|
|
140
|
+
"lightningcss": "1.32.0",
|
|
127
141
|
"nano-staged": "1.0.2",
|
|
128
142
|
"playwright": "1.60.0",
|
|
129
143
|
"prettier": "3.8.3",
|
package/src/docgen/doc.gen.json
CHANGED
|
@@ -1194,6 +1194,333 @@
|
|
|
1194
1194
|
}
|
|
1195
1195
|
]
|
|
1196
1196
|
},
|
|
1197
|
+
"field": {
|
|
1198
|
+
"root": {
|
|
1199
|
+
"name": "Field.Root",
|
|
1200
|
+
"description": "Field.Root — groups a label, control, validation state, and supporting copy.",
|
|
1201
|
+
"props": [
|
|
1202
|
+
{
|
|
1203
|
+
"name": "actionsRef",
|
|
1204
|
+
"required": false,
|
|
1205
|
+
"type": "RefObject<FieldRootActions | null>",
|
|
1206
|
+
"defaultValue": null,
|
|
1207
|
+
"description": ""
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "className",
|
|
1211
|
+
"required": false,
|
|
1212
|
+
"type": "string | ((state: FieldRootState) => string)",
|
|
1213
|
+
"defaultValue": null,
|
|
1214
|
+
"description": ""
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "dirty",
|
|
1218
|
+
"required": false,
|
|
1219
|
+
"type": "boolean",
|
|
1220
|
+
"defaultValue": null,
|
|
1221
|
+
"description": ""
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"name": "disabled",
|
|
1225
|
+
"required": false,
|
|
1226
|
+
"type": "boolean",
|
|
1227
|
+
"defaultValue": "false",
|
|
1228
|
+
"description": ""
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"name": "invalid",
|
|
1232
|
+
"required": false,
|
|
1233
|
+
"type": "boolean",
|
|
1234
|
+
"defaultValue": null,
|
|
1235
|
+
"description": ""
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "name",
|
|
1239
|
+
"required": false,
|
|
1240
|
+
"type": "string",
|
|
1241
|
+
"defaultValue": null,
|
|
1242
|
+
"description": ""
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"name": "render",
|
|
1246
|
+
"required": false,
|
|
1247
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldRootState>",
|
|
1248
|
+
"defaultValue": null,
|
|
1249
|
+
"description": ""
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
"name": "style",
|
|
1253
|
+
"required": false,
|
|
1254
|
+
"type": "| CSSProperties\n| ((state: FieldRootState) => CSSProperties)",
|
|
1255
|
+
"defaultValue": null,
|
|
1256
|
+
"description": ""
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "touched",
|
|
1260
|
+
"required": false,
|
|
1261
|
+
"type": "boolean",
|
|
1262
|
+
"defaultValue": null,
|
|
1263
|
+
"description": ""
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"name": "validate",
|
|
1267
|
+
"required": false,
|
|
1268
|
+
"type": "(\n value: unknown,\n formValues: Record<string, any>\n) =>\n | string\n | string[]\n | Promise<string | string[] | null>\n | null",
|
|
1269
|
+
"defaultValue": null,
|
|
1270
|
+
"description": ""
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
"name": "validationDebounceTime",
|
|
1274
|
+
"required": false,
|
|
1275
|
+
"type": "number",
|
|
1276
|
+
"defaultValue": "0",
|
|
1277
|
+
"description": ""
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "validationMode",
|
|
1281
|
+
"required": false,
|
|
1282
|
+
"type": "FormValidationMode",
|
|
1283
|
+
"defaultValue": "onSubmit",
|
|
1284
|
+
"description": ""
|
|
1285
|
+
}
|
|
1286
|
+
]
|
|
1287
|
+
},
|
|
1288
|
+
"subComponents": [
|
|
1289
|
+
{
|
|
1290
|
+
"name": "Field.Control",
|
|
1291
|
+
"description": "Field.Control — a native input control with Field labeling and validation.",
|
|
1292
|
+
"props": [
|
|
1293
|
+
{
|
|
1294
|
+
"name": "className",
|
|
1295
|
+
"required": false,
|
|
1296
|
+
"type": "string | ((state: FieldControlState) => string)",
|
|
1297
|
+
"defaultValue": null,
|
|
1298
|
+
"description": ""
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "defaultValue",
|
|
1302
|
+
"required": false,
|
|
1303
|
+
"type": "string | number | readonly string[]",
|
|
1304
|
+
"defaultValue": null,
|
|
1305
|
+
"description": ""
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
"name": "onValueChange",
|
|
1309
|
+
"required": false,
|
|
1310
|
+
"type": "(\n value: string,\n eventDetails: {\n reason: \"none\";\n event: Event;\n cancel: () => void;\n allowPropagation: () => void;\n isCanceled: boolean;\n isPropagationAllowed: boolean;\n trigger: Element;\n }\n) => void",
|
|
1311
|
+
"defaultValue": null,
|
|
1312
|
+
"description": ""
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"name": "render",
|
|
1316
|
+
"required": false,
|
|
1317
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldControlState>",
|
|
1318
|
+
"defaultValue": null,
|
|
1319
|
+
"description": ""
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"name": "style",
|
|
1323
|
+
"required": false,
|
|
1324
|
+
"type": "| CSSProperties\n| ((state: FieldControlState) => CSSProperties)",
|
|
1325
|
+
"defaultValue": null,
|
|
1326
|
+
"description": ""
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"name": "Field.Description",
|
|
1332
|
+
"description": "Field.Description — supporting information for a field.",
|
|
1333
|
+
"props": [
|
|
1334
|
+
{
|
|
1335
|
+
"name": "className",
|
|
1336
|
+
"required": false,
|
|
1337
|
+
"type": "| string\n| ((state: FieldDescriptionState) => string)",
|
|
1338
|
+
"defaultValue": null,
|
|
1339
|
+
"description": ""
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
"name": "render",
|
|
1343
|
+
"required": false,
|
|
1344
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldDescriptionState>",
|
|
1345
|
+
"defaultValue": null,
|
|
1346
|
+
"description": ""
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "style",
|
|
1350
|
+
"required": false,
|
|
1351
|
+
"type": "| CSSProperties\n| ((state: FieldDescriptionState) => CSSProperties)",
|
|
1352
|
+
"defaultValue": null,
|
|
1353
|
+
"description": ""
|
|
1354
|
+
}
|
|
1355
|
+
]
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "Field.Error",
|
|
1359
|
+
"description": "Field.Error — an inline validation message shown when its match condition fails.",
|
|
1360
|
+
"props": [
|
|
1361
|
+
{
|
|
1362
|
+
"name": "className",
|
|
1363
|
+
"required": false,
|
|
1364
|
+
"type": "string | ((state: FieldErrorState) => string)",
|
|
1365
|
+
"defaultValue": null,
|
|
1366
|
+
"description": ""
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"name": "match",
|
|
1370
|
+
"required": false,
|
|
1371
|
+
"type": "boolean | keyof ValidityState",
|
|
1372
|
+
"defaultValue": null,
|
|
1373
|
+
"description": ""
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
"name": "render",
|
|
1377
|
+
"required": false,
|
|
1378
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldErrorState>",
|
|
1379
|
+
"defaultValue": null,
|
|
1380
|
+
"description": ""
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"name": "style",
|
|
1384
|
+
"required": false,
|
|
1385
|
+
"type": "| CSSProperties\n| ((state: FieldErrorState) => CSSProperties)",
|
|
1386
|
+
"defaultValue": null,
|
|
1387
|
+
"description": ""
|
|
1388
|
+
}
|
|
1389
|
+
]
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "Field.Item",
|
|
1393
|
+
"description": "Field.Item — groups one checkable option with its label and description.",
|
|
1394
|
+
"props": [
|
|
1395
|
+
{
|
|
1396
|
+
"name": "className",
|
|
1397
|
+
"required": false,
|
|
1398
|
+
"type": "string | ((state: FieldItemState) => string)",
|
|
1399
|
+
"defaultValue": null,
|
|
1400
|
+
"description": ""
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"name": "disabled",
|
|
1404
|
+
"required": false,
|
|
1405
|
+
"type": "boolean",
|
|
1406
|
+
"defaultValue": "false",
|
|
1407
|
+
"description": ""
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "render",
|
|
1411
|
+
"required": false,
|
|
1412
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldItemState>",
|
|
1413
|
+
"defaultValue": null,
|
|
1414
|
+
"description": ""
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"name": "style",
|
|
1418
|
+
"required": false,
|
|
1419
|
+
"type": "| CSSProperties\n| ((state: FieldItemState) => CSSProperties)",
|
|
1420
|
+
"defaultValue": null,
|
|
1421
|
+
"description": ""
|
|
1422
|
+
}
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
"name": "Field.Label",
|
|
1427
|
+
"description": "Field.Label — an accessible label automatically associated with the control.",
|
|
1428
|
+
"props": [
|
|
1429
|
+
{
|
|
1430
|
+
"name": "className",
|
|
1431
|
+
"required": false,
|
|
1432
|
+
"type": "string | ((state: FieldLabelState) => string)",
|
|
1433
|
+
"defaultValue": null,
|
|
1434
|
+
"description": ""
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"name": "nativeLabel",
|
|
1438
|
+
"required": false,
|
|
1439
|
+
"type": "boolean",
|
|
1440
|
+
"defaultValue": "true",
|
|
1441
|
+
"description": ""
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "render",
|
|
1445
|
+
"required": false,
|
|
1446
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldLabelState>",
|
|
1447
|
+
"defaultValue": null,
|
|
1448
|
+
"description": ""
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"name": "style",
|
|
1452
|
+
"required": false,
|
|
1453
|
+
"type": "| CSSProperties\n| ((state: FieldLabelState) => CSSProperties)",
|
|
1454
|
+
"defaultValue": null,
|
|
1455
|
+
"description": ""
|
|
1456
|
+
}
|
|
1457
|
+
]
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"name": "Field.Validity",
|
|
1461
|
+
"description": "Field.Validity — renderless access to the field validity data for custom messages.\nIts function child owns the rendered element and therefore its identity and styling.",
|
|
1462
|
+
"props": []
|
|
1463
|
+
}
|
|
1464
|
+
]
|
|
1465
|
+
},
|
|
1466
|
+
"fieldset": {
|
|
1467
|
+
"root": {
|
|
1468
|
+
"name": "Fieldset.Root",
|
|
1469
|
+
"description": "Fieldset.Root — semantic grouping for related form controls and a shared legend.",
|
|
1470
|
+
"props": [
|
|
1471
|
+
{
|
|
1472
|
+
"name": "className",
|
|
1473
|
+
"required": false,
|
|
1474
|
+
"type": "string | ((state: FieldsetRootState) => string)",
|
|
1475
|
+
"defaultValue": null,
|
|
1476
|
+
"description": ""
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"name": "render",
|
|
1480
|
+
"required": false,
|
|
1481
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldsetRootState>",
|
|
1482
|
+
"defaultValue": null,
|
|
1483
|
+
"description": ""
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"name": "style",
|
|
1487
|
+
"required": false,
|
|
1488
|
+
"type": "| CSSProperties\n| ((state: FieldsetRootState) => CSSProperties)",
|
|
1489
|
+
"defaultValue": null,
|
|
1490
|
+
"description": ""
|
|
1491
|
+
}
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
"subComponents": [
|
|
1495
|
+
{
|
|
1496
|
+
"name": "Fieldset.Legend",
|
|
1497
|
+
"description": "Fieldset.Legend — the accessible label for its related controls.",
|
|
1498
|
+
"props": [
|
|
1499
|
+
{
|
|
1500
|
+
"name": "className",
|
|
1501
|
+
"required": false,
|
|
1502
|
+
"type": "string | ((state: FieldsetLegendState) => string)",
|
|
1503
|
+
"defaultValue": null,
|
|
1504
|
+
"description": ""
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"name": "render",
|
|
1508
|
+
"required": false,
|
|
1509
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, FieldsetLegendState>",
|
|
1510
|
+
"defaultValue": null,
|
|
1511
|
+
"description": ""
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
"name": "style",
|
|
1515
|
+
"required": false,
|
|
1516
|
+
"type": "| CSSProperties\n| ((state: FieldsetLegendState) => CSSProperties)",
|
|
1517
|
+
"defaultValue": null,
|
|
1518
|
+
"description": ""
|
|
1519
|
+
}
|
|
1520
|
+
]
|
|
1521
|
+
}
|
|
1522
|
+
]
|
|
1523
|
+
},
|
|
1197
1524
|
"input": {
|
|
1198
1525
|
"root": {
|
|
1199
1526
|
"name": "Input",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
<Keep this file lean — target ~50 lines. Decision test for every line: would the agent make a costly mistake without it? If
|
|
4
|
+
it would just need to read a file first, cut it. Dev commands, path aliases, and tool config are discoverable from the files
|
|
5
|
+
themselves.>
|
|
6
|
+
|
|
7
|
+
<One paragraph: what the app is and the stack in one line.>
|
|
8
|
+
|
|
9
|
+
Scripts, deps, and setup: [`README.md`](./README.md) and [`package.json`](./package.json) are the source of truth. Check the
|
|
10
|
+
`package.json` scripts before running or suggesting a command — don't infer one exists by pattern-matching a sibling.
|
|
11
|
+
|
|
12
|
+
## Read before you write
|
|
13
|
+
|
|
14
|
+
<One bullet per doc in docs/, each with when to read it, e.g.:>
|
|
15
|
+
|
|
16
|
+
- [`docs/<topic>.md`](./docs/<topic>.md) — <what it covers>. Read before <the change it governs>.
|
|
17
|
+
|
|
18
|
+
[`docs/index.md`](./docs/index.md) registers all of them.
|
|
19
|
+
|
|
20
|
+
## Working here
|
|
21
|
+
|
|
22
|
+
<The fenced block below is the only part of this file `npx web-ui-install` touches: its content comes from this template and
|
|
23
|
+
is refreshed on every skills install. Everything else in the file is scaffolded once by the setup skill and then owned by the
|
|
24
|
+
repo.>
|
|
25
|
+
|
|
26
|
+
<!-- imf-web-ui:begin — managed by `npx web-ui-install`; edits inside the fence are overwritten -->
|
|
27
|
+
|
|
28
|
+
`.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Don't edit it and
|
|
29
|
+
don't put repo conventions there. Load the matching `imf-web-ui-*` skill before writing code, styles, data fetching, or docs;
|
|
30
|
+
repo docs hold only what is unique to this repo.
|
|
31
|
+
|
|
32
|
+
<!-- imf-web-ui:end -->
|
|
33
|
+
|
|
34
|
+
<Repo-specific agent guidance: generated files that are committed, tools to verify APIs against, things never to touch.>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "\"$(git rev-parse --show-toplevel)/.agents/hooks/imf-web-ui/session-start.sh\""
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"Stop": [
|
|
14
|
+
{
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "\"$(git rev-parse --show-toplevel)/.agents/hooks/imf-web-ui/stop.sh\""
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"SubagentStart": [
|
|
24
|
+
{
|
|
25
|
+
"hooks": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "\"$(git rev-parse --show-toplevel)/.agents/hooks/imf-web-ui/subagent-start.sh\""
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"UserPromptSubmit": [
|
|
34
|
+
{
|
|
35
|
+
"hooks": [
|
|
36
|
+
{
|
|
37
|
+
"type": "command",
|
|
38
|
+
"command": "\"$(git rev-parse --show-toplevel)/.agents/hooks/imf-web-ui/user-prompt-submit.sh\""
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# Advisory baseline-staleness check, meant to be called from the repo's pre-commit hook.
|
|
3
|
+
# Compares the installed imf-web-ui skill markers against the installed package version
|
|
4
|
+
# and warns on drift. Always exits 0 — staleness never blocks a commit.
|
|
5
|
+
PKG=node_modules/@imfusion/web-ui/package.json
|
|
6
|
+
[ -f "$PKG" ] || exit 0
|
|
7
|
+
CURRENT=$(node -p "require('./$PKG').version" 2>/dev/null) || exit 0
|
|
8
|
+
|
|
9
|
+
for marker in .agents/skills/imf-web-ui-*/.imf-web-ui-skill-version.json; do
|
|
10
|
+
[ -f "$marker" ] || continue
|
|
11
|
+
INSTALLED=$(node -p "require('./$marker').version" 2>/dev/null) || continue
|
|
12
|
+
if [ "$INSTALLED" != "$CURRENT" ]; then
|
|
13
|
+
echo "imf-web-ui skills are stale ($INSTALLED installed, package is $CURRENT) — run: npx web-ui-install"
|
|
14
|
+
break
|
|
15
|
+
fi
|
|
16
|
+
done
|
|
17
|
+
exit 0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# SessionStart: inject the web-ui router pointer once per session. Fixed string — the
|
|
3
|
+
# hook-injection eval asserts on it verbatim.
|
|
4
|
+
echo "This project depends on @imfusion/web-ui. Start at the imf-web-ui skill: it decides whether guidance is needed and routes to the right companion. Repo docs carry only what is unique to this repo."
|
|
5
|
+
exit 0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# Stop: the turn-end verify gate. When this turn edited source files, block the
|
|
3
|
+
# agent from finishing once, instructing it to run the project's verification.
|
|
4
|
+
# Both hosts send stop_hook_active=true when the turn continues because of a
|
|
5
|
+
# prior block, so the gate can never loop. Fails open everywhere else: no git,
|
|
6
|
+
# a clean tree, or no edit evidence in the transcript all pass silently.
|
|
7
|
+
PAYLOAD=$(cat)
|
|
8
|
+
printf '%s' "$PAYLOAD" | grep -q '"stop_hook_active"[[:space:]]*:[[:space:]]*true' && exit 0
|
|
9
|
+
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
10
|
+
[ -n "$(git status --porcelain -- '*.ts' '*.tsx' '*.js' '*.jsx' '*.css' 2>/dev/null)" ] || exit 0
|
|
11
|
+
# Gate only turns that actually edited files — a tree left dirty by an earlier
|
|
12
|
+
# session must not block a question-answering turn. Edit evidence: Write/Edit
|
|
13
|
+
# tool calls (Claude transcript) or apply_patch calls (Codex rollout).
|
|
14
|
+
TRANSCRIPT=$(printf '%s' "$PAYLOAD" | sed -n 's/.*"transcript_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)
|
|
15
|
+
[ -f "$TRANSCRIPT" ] || exit 0
|
|
16
|
+
grep -q '"name":"Write"\|"name":"Edit"\|"name":"MultiEdit"\|"name":"NotebookEdit"\|apply_patch' "$TRANSCRIPT" || exit 0
|
|
17
|
+
printf '{"decision":"block","reason":"web-ui stop gate: this turn changed source files. Run the project verification (verify:typecheck, verify:lint, and verify:format at minimum), fix what it reports, then finish. If it already ran after the last change, say so and finish."}\n'
|
|
18
|
+
exit 0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# SubagentStart: subagents don't reliably inherit the parent session's SessionStart
|
|
3
|
+
# context, so they get the same router pointer. Text byte-identical to session-start.sh.
|
|
4
|
+
echo "This project depends on @imfusion/web-ui. Start at the imf-web-ui skill: it decides whether guidance is needed and routes to the right companion. Repo docs carry only what is unique to this repo."
|
|
5
|
+
exit 0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# UserPromptSubmit: one-line per-prompt pointer to the companion skills. Fixed string —
|
|
3
|
+
# the hook-injection eval asserts on it verbatim.
|
|
4
|
+
echo "web-ui: check imf-web-ui-components before using a component API, imf-web-ui-conventions before writing code, styles or docs, and imf-web-ui-ux when shaping a screen or flow."
|
|
5
|
+
exit 0
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "\"$CLAUDE_PROJECT_DIR/.agents/hooks/imf-web-ui/session-start.sh\""
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"Stop": [
|
|
15
|
+
{
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "\"$CLAUDE_PROJECT_DIR/.agents/hooks/imf-web-ui/stop.sh\""
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"SubagentStart": [
|
|
25
|
+
{
|
|
26
|
+
"hooks": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "\"$CLAUDE_PROJECT_DIR/.agents/hooks/imf-web-ui/subagent-start.sh\""
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"UserPromptSubmit": [
|
|
35
|
+
{
|
|
36
|
+
"hooks": [
|
|
37
|
+
{
|
|
38
|
+
"type": "command",
|
|
39
|
+
"command": "\"$CLAUDE_PROJECT_DIR/.agents/hooks/imf-web-ui/user-prompt-submit.sh\""
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|