@imfusion/web-ui 0.10.1-dev.6.gf715361a → 0.10.1-dev.61.g9d1000b8

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 (74) hide show
  1. package/CHANGELOG.md +167 -0
  2. package/README.md +8 -32
  3. package/THIRD_PARTY_NOTICES.md +110 -0
  4. package/dist/code-NTcddiYk.js +139 -0
  5. package/dist/components/account-card/account-card.d.ts +9 -26
  6. package/dist/components/app-shell/app-shell.d.ts +48 -26
  7. package/dist/components/callout/callout.d.ts +1 -1
  8. package/dist/components/chip/chip.d.ts +1 -1
  9. package/dist/components/color-scheme-toggle/color-scheme-preference.d.ts +3 -0
  10. package/dist/components/color-scheme-toggle/color-scheme-toggle.d.ts +17 -0
  11. package/dist/components/color-scheme-toggle/color-scheme-toggle.meta.d.ts +2 -0
  12. package/dist/components/color-scheme-toggle/index.d.ts +2 -0
  13. package/dist/components/dialog/dialog.d.ts +151 -0
  14. package/dist/components/dialog/dialog.meta.d.ts +2 -0
  15. package/dist/components/dialog/index.d.ts +2 -0
  16. package/dist/components/drawer/drawer.d.ts +1 -1
  17. package/dist/components/logo/index.d.ts +1 -0
  18. package/dist/components/logo/product/index.d.ts +1 -0
  19. package/dist/components/logo/product/marks.d.ts +11 -0
  20. package/dist/components/logo/product/product.d.ts +17 -0
  21. package/dist/components/scroll-area/index.d.ts +2 -0
  22. package/dist/components/scroll-area/scroll-area.d.ts +49 -0
  23. package/dist/components/scroll-area/scroll-area.meta.d.ts +2 -0
  24. package/dist/components/select/select.d.ts +18 -4
  25. package/dist/components/separator/separator.d.ts +4 -2
  26. package/dist/components/skeleton/skeleton.d.ts +17 -2
  27. package/dist/components/table/table.d.ts +12 -4
  28. package/dist/components/toggle/toggle.d.ts +8 -2
  29. package/dist/components/toggle-group/toggle-group-size.d.ts +3 -0
  30. package/dist/components/toggle-group/toggle-group.d.ts +7 -3
  31. package/dist/hooks/index.d.ts +2 -0
  32. package/dist/hooks/use-disclosure.d.ts +17 -0
  33. package/dist/icons.js +1 -2
  34. package/dist/index.d.ts +7 -3
  35. package/dist/index.js +2705 -2093
  36. package/dist/integrations/code-highlight.js +2 -2
  37. package/dist/integrations/frame-selection.js +2 -2
  38. package/dist/integrations/image-display-options.js +123 -113
  39. package/dist/{rolldown-runtime-Dy4uBu1J.js → resolve-state-props-DQf9WiGv.js} +12 -1
  40. package/dist/scroll-area-z9Lf9uIk.js +89 -0
  41. package/dist/{separator-lzz4A3x_.js → separator-BV2TR8U0.js} +16 -8
  42. package/dist/slider-Bf274cMe.js +106 -0
  43. package/dist/style.css +1 -1
  44. package/dist/{tabs-DRyqtS04.js → tabs-CU46aGud.js} +106 -88
  45. package/dist/vite/local-web-ui-link.d.ts +17 -4
  46. package/dist/vite.js +25 -20
  47. package/dist/web-ui-cli.js +155 -141
  48. package/docs/user-guide/AgentTooling.mdx +4 -4
  49. package/docs/user-guide/UsagePatterns.mdx +4 -0
  50. package/package.json +11 -9
  51. package/src/docgen/doc.gen.json +2292 -1071
  52. package/src/llms/install-templates/hooks/session-start.sh +14 -0
  53. package/src/llms/install-templates/hooks/stop.sh +7 -2
  54. package/src/llms/llms.gen.txt +18 -1
  55. package/src/llms/skills/imf-web-ui-audit/SKILL.md +28 -15
  56. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +4 -2
  57. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +8 -9
  58. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +17 -2
  59. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +8 -5
  60. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +3 -0
  61. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +5 -2
  62. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +3 -1
  63. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +47 -8
  64. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +2 -0
  65. package/src/llms/skills/imf-web-ui-setup/SKILL.md +10 -1
  66. package/src/llms/skills/imf-web-ui-update/SKILL.md +12 -5
  67. package/src/llms/skills/imf-web-ui-ux/SKILL.md +47 -26
  68. package/src/llms/skills/imf-web-ui-ux/references/forms.md +6 -6
  69. package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +3 -3
  70. package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +3 -3
  71. package/src/llms/tokens.gen.json +13 -5
  72. package/dist/code-BYkr5k55.js +0 -134
  73. package/dist/slider-Cqpreglu.js +0 -116
  74. package/src/llms/install-templates/hooks/baseline-staleness.sh +0 -24
@@ -6,9 +6,9 @@ validation. These rules cover structure and feedback.
6
6
  ## Structure
7
7
 
8
8
  - Remove fields that can be derived or asked later.
9
- - Use one column by default. Put short, inseparable values such as city and postal code in a `Row`.
10
- - Group related fields in a `Stack` and separate groups with more space.
11
- - Use a labeled `Fieldset` or heading for each group.
9
+ - Use one column by default. Put short, inseparable values such as city and postal code on one row.
10
+ - Group related fields with tight spacing and separate groups with more space.
11
+ - Use a labeled fieldset or heading for each group.
12
12
  - Match a field's size to the value it expects.
13
13
 
14
14
  ## Labels
@@ -21,10 +21,10 @@ hints near the field before the user starts typing.
21
21
  Validate when the user finishes a field, except where live feedback genuinely helps, such as password requirements. Keep the
22
22
  error next to the field and use more than color to show it.
23
23
 
24
- An error says what is wrong and how to fix it. Keep the user's input. A server or form-level failure belongs in a `Callout`
25
- near the actions; field-level failures stay with their fields.
24
+ An error says what is wrong and how to fix it. Keep the user's input. A server or form-level failure belongs in an in-place
25
+ status message near the actions; field-level failures stay with their fields.
26
26
 
27
27
  ## Submission
28
28
 
29
- Use one primary `Button` whose label names the result, such as `Create project`. While submitting, keep the form visible and
29
+ Use one primary button whose label names the result, such as `Create project`. While submitting, keep the form visible and
30
30
  show progress. A failed submission must leave the user's input on screen.
@@ -5,12 +5,12 @@ user research.
5
5
 
6
6
  1. **Show system status.** Give async actions visible progress and confirmation.
7
7
  2. **Use the user's language.** Labels and ordering should match the domain, not an API's private names.
8
- 3. **Provide an exit.** Drawers and popovers need clear dismissal; destructive actions need confirmation or undo.
8
+ 3. **Provide an exit.** Side panels and floating panels need clear dismissal; destructive actions need confirmation or undo.
9
9
  4. **Be consistent.** Reuse the library's established components and semantics.
10
10
  5. **Prevent errors.** Constrain known choices and disable actions that cannot work.
11
11
  6. **Support recognition.** Keep relevant options and context visible instead of making users remember them.
12
12
  7. **Support frequent users.** Add keyboard shortcuts or dense layouts when the task is frequent and data-heavy.
13
13
  8. **Remove decoration without a job.** Every element should support the action or the data.
14
14
  9. **Make errors recoverable.** Say what failed and what to do next, near the problem.
15
- 10. **Keep help contextual.** Prefer a short hint beside a control to essential information hidden in a tooltip or separate
16
- page.
15
+ 10. **Keep help contextual.** Prefer a short hint beside a control to essential information hidden in a hover hint or
16
+ separate page.
@@ -7,12 +7,12 @@ Use this when a screen works but still looks wrong. Decide the hierarchy before
7
7
  Write the intended order of attention: title, primary action, content, and supporting details. Use contrast and scale to make
8
8
  that order visible. Keep variation limited; if everything is loud, nothing leads.
9
9
 
10
- Reserve saturated status colors for meaning. The primary `Button` should be the strongest action treatment on the screen.
10
+ Reserve saturated status colors for meaning. The primary button should be the strongest action treatment on the screen.
11
11
 
12
12
  ## Grouping
13
13
 
14
- Use proximity first: tight gaps inside a group, larger gaps between groups. `Stack` gap values encode this relationship. Use
15
- a shared `Card` or bordered region only when spacing alone does not make the relationship clear.
14
+ Use proximity first: tight gaps inside a group, larger gaps between groups. Spacing values encode this relationship. Use a
15
+ shared card or bordered region only when spacing alone does not make the relationship clear.
16
16
 
17
17
  Similarity helps related elements stay recognisable across a layout. It supports proximity; it does not replace it.
18
18
 
@@ -477,7 +477,7 @@
477
477
  },
478
478
  {
479
479
  "name": "--imf-ui-font-family-mono",
480
- "value": "\"CoFo Sans Mono\", ui-monospace, monospace"
480
+ "value": "\"Paper Mono\", ui-monospace, monospace"
481
481
  },
482
482
  {
483
483
  "name": "--imf-ui-font-family-sans",
@@ -493,7 +493,7 @@
493
493
  },
494
494
  {
495
495
  "name": "--imf-ui-font-letterspacing-brand",
496
- "value": "-0.02em"
496
+ "value": "clamp(-0.035rem, -0.0081rem - 0.0224vw, -0.0131rem)"
497
497
  },
498
498
  {
499
499
  "name": "--imf-ui-font-letterspacing-display",
@@ -501,7 +501,7 @@
501
501
  },
502
502
  {
503
503
  "name": "--imf-ui-font-letterspacing-hero",
504
- "value": "-0.04em"
504
+ "value": "clamp(-0.225rem, -0.0312rem - 0.1615vw, -0.0675rem)"
505
505
  },
506
506
  {
507
507
  "name": "--imf-ui-font-letterspacing-loose",
@@ -689,7 +689,7 @@
689
689
  },
690
690
  {
691
691
  "name": "--imf-ui-font-weight-strong",
692
- "value": "600"
692
+ "value": "500"
693
693
  }
694
694
  ],
695
695
  "inner-*": [
@@ -913,6 +913,14 @@
913
913
  "name": "--imf-ui-size-9",
914
914
  "value": "4rem"
915
915
  },
916
+ {
917
+ "name": "--imf-ui-size-backdrop-band-height",
918
+ "value": "30dvh"
919
+ },
920
+ {
921
+ "name": "--imf-ui-size-backdrop-edge",
922
+ "value": "38%"
923
+ },
916
924
  {
917
925
  "name": "--imf-ui-size-content-1",
918
926
  "value": "20ch"
@@ -947,5 +955,5 @@
947
955
  }
948
956
  ]
949
957
  },
950
- "count": 231
958
+ "count": 233
951
959
  }
@@ -1,134 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { Xo as t, ja as n, pM as r } from "./icons-BsK_o-Cb.js";
3
- import { t as i } from "./meta-V_KyLeGn.js";
4
- import { cx as a } from "class-variance-authority";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
7
- import { mergeProps as p } from "@base-ui/react/merge-props";
8
- import { useRender as m } from "@base-ui/react/use-render";
9
- //#region src/hooks/use-clipboard.ts
10
- function h({ timeout: e = 1500 } = {}) {
11
- let [t, n] = f(!1), r = d(void 0);
12
- return u(() => () => clearTimeout(r.current), []), {
13
- copied: t,
14
- copy: l((t) => {
15
- navigator.clipboard.writeText(t).then(() => {
16
- n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
17
- });
18
- }, [e])
19
- };
20
- }
21
- var g = {
22
- block: "imf-ui-code-module-block",
23
- copy: "imf-ui-code-module-copy",
24
- inline: "imf-ui-code-module-inline",
25
- inlineCopy: "imf-ui-code-module-inlineCopy",
26
- inlineLink: "imf-ui-code-module-inlineLink",
27
- language: "imf-ui-code-module-language",
28
- pre: "imf-ui-code-module-pre",
29
- separator: "imf-ui-code-module-separator"
30
- }, _ = /* @__PURE__ */ e({
31
- Block: () => b,
32
- Inline: () => v,
33
- InlineLink: () => y
34
- });
35
- function v({ copyable: e = !1, children: i, render: a, ...l }) {
36
- let { copied: u, copy: f } = h(), _ = d(null), v = u ? n : t;
37
- return m({
38
- defaultTagName: "code",
39
- render: a,
40
- props: {
41
- ...p(l, {
42
- className: g.inline,
43
- children: /* @__PURE__ */ c(o, { children: [
44
- /* @__PURE__ */ s("span", {
45
- ref: _,
46
- children: i
47
- }),
48
- e && /* @__PURE__ */ s("span", { className: g.separator }),
49
- e && /* @__PURE__ */ s("button", {
50
- type: "button",
51
- className: g.inlineCopy,
52
- "data-copied": u || void 0,
53
- "aria-label": u ? "Copied" : "Copy",
54
- onClick: () => f(_.current?.textContent ?? ""),
55
- children: /* @__PURE__ */ s(r, {
56
- glyph: v,
57
- size: 12,
58
- strokeWidth: 2,
59
- "aria-hidden": !0
60
- })
61
- })
62
- ] })
63
- }),
64
- "data-imf-ui-component": "Code.Inline"
65
- }
66
- });
67
- }
68
- v.displayName = "Code.Inline";
69
- function y({ kind: e = "external", ...t }) {
70
- let n = e === "external" ? {
71
- target: "_blank",
72
- rel: "noreferrer"
73
- } : {};
74
- return m({
75
- defaultTagName: "a",
76
- render: t.render,
77
- props: {
78
- ...p(n, t, {
79
- className: a(g.inline, g.inlineLink, t.className),
80
- children: t.children
81
- }),
82
- "data-imf-ui-component": "Code.InlineLink",
83
- "data-kind": e
84
- }
85
- });
86
- }
87
- y.displayName = "Code.InlineLink";
88
- function b({ className: e, language: i, hideCopy: o = !1, children: l, ...u }) {
89
- let { copied: f, copy: p } = h(), m = d(null), _ = f ? n : t;
90
- return /* @__PURE__ */ c("div", {
91
- "data-imf-ui-component": "Code.Block",
92
- className: a(g.block, e),
93
- children: [
94
- i != null && /* @__PURE__ */ s("span", {
95
- className: g.language,
96
- children: i
97
- }),
98
- !o && /* @__PURE__ */ s("button", {
99
- type: "button",
100
- className: g.copy,
101
- "data-copied": f || void 0,
102
- "aria-label": f ? "Copied" : "Copy",
103
- onClick: () => p(m.current?.textContent ?? ""),
104
- children: /* @__PURE__ */ s(r, {
105
- glyph: _,
106
- size: 12,
107
- strokeWidth: 2,
108
- "aria-hidden": !0
109
- })
110
- }),
111
- /* @__PURE__ */ s("pre", {
112
- ...u,
113
- className: g.pre,
114
- children: /* @__PURE__ */ s("code", {
115
- ref: m,
116
- children: l
117
- })
118
- })
119
- ]
120
- });
121
- }
122
- b.displayName = "Code.Block";
123
- //#endregion
124
- //#region src/components/code/code.meta.ts
125
- var x = {
126
- name: "Code",
127
- category: i.display,
128
- status: "stable",
129
- namespace: !0,
130
- description: "Displays source code inline or in a block, with optional language labels and copying. Also called a code snippet or code block.",
131
- origin: "native"
132
- };
133
- //#endregion
134
- export { _ as a, y as i, b as n, h as o, v as r, x as t };
@@ -1,116 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { cva as t } from "class-variance-authority";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { Slider as r } from "@base-ui/react/slider";
5
- //#region src/utils/resolve-state-props.ts
6
- function i(e, t) {
7
- return e instanceof Function ? e(t) : e;
8
- }
9
- function a(e, t) {
10
- return i(e, t);
11
- }
12
- function o(e, t) {
13
- return i(e, t);
14
- }
15
- var s = {
16
- control: "imf-ui-slider-module-control",
17
- indicator: "imf-ui-slider-module-indicator",
18
- label: "imf-ui-slider-module-label",
19
- root: "imf-ui-slider-module-root",
20
- thumb: "imf-ui-slider-module-thumb",
21
- track: "imf-ui-slider-module-track",
22
- value: "imf-ui-slider-module-value",
23
- variantPosition: "imf-ui-slider-module-variantPosition"
24
- }, c = /* @__PURE__ */ e({
25
- Control: () => y,
26
- Indicator: () => x,
27
- Label: () => _,
28
- Root: () => g,
29
- Thumb: () => S,
30
- Track: () => b,
31
- Value: () => v
32
- }), l = t(s.root, { variants: { variant: {
33
- default: null,
34
- position: s.variantPosition
35
- } } }), u = t(s.label), d = t(s.value), f = t(s.control), p = t(s.track), m = t(s.indicator), h = t(s.thumb);
36
- function g({ variant: e = "default", value: t, defaultValue: i, onValueChange: o, onValueCommitted: s, min: c = 0, max: u = 100, step: d = 1, largeStep: f = 10, minStepsBetweenValues: p = 0, disabled: m = !1, orientation: h = "horizontal", name: g, form: _, locale: v, thumbAlignment: y = "edge", thumbCollisionBehavior: b = "push", format: x, ...S }) {
37
- return /* @__PURE__ */ n(r.Root, {
38
- ...S,
39
- "data-imf-ui-component": "Slider.Root",
40
- "data-orientation": h,
41
- className: (t) => l({
42
- variant: e,
43
- className: a(S.className, t)
44
- }),
45
- value: t,
46
- defaultValue: i,
47
- onValueChange: o,
48
- onValueCommitted: s,
49
- min: c,
50
- max: u,
51
- step: d,
52
- largeStep: f,
53
- minStepsBetweenValues: p,
54
- disabled: m,
55
- orientation: h,
56
- name: g,
57
- form: _,
58
- locale: v,
59
- thumbAlignment: y,
60
- thumbCollisionBehavior: b,
61
- format: x
62
- });
63
- }
64
- g.displayName = "Slider.Root";
65
- function _(e) {
66
- return /* @__PURE__ */ n(r.Label, {
67
- ...e,
68
- "data-imf-ui-component": "Slider.Label",
69
- className: (t) => u({ className: a(e.className, t) })
70
- });
71
- }
72
- _.displayName = "Slider.Label";
73
- function v({ children: e, ...t }) {
74
- return /* @__PURE__ */ n(r.Value, {
75
- ...t,
76
- "data-imf-ui-component": "Slider.Value",
77
- className: (e) => d({ className: a(t.className, e) }),
78
- children: e
79
- });
80
- }
81
- v.displayName = "Slider.Value";
82
- function y(e) {
83
- return /* @__PURE__ */ n(r.Control, {
84
- ...e,
85
- "data-imf-ui-component": "Slider.Control",
86
- className: (t) => f({ className: a(e.className, t) })
87
- });
88
- }
89
- y.displayName = "Slider.Control";
90
- function b(e) {
91
- return /* @__PURE__ */ n(r.Track, {
92
- ...e,
93
- "data-imf-ui-component": "Slider.Track",
94
- className: (t) => p({ className: a(e.className, t) })
95
- });
96
- }
97
- b.displayName = "Slider.Track";
98
- function x(e) {
99
- return /* @__PURE__ */ n(r.Indicator, {
100
- ...e,
101
- "data-imf-ui-component": "Slider.Indicator",
102
- className: (t) => m({ className: a(e.className, t) })
103
- });
104
- }
105
- x.displayName = "Slider.Indicator";
106
- function S({ index: e, ...t }) {
107
- return /* @__PURE__ */ n(r.Thumb, {
108
- ...t,
109
- "data-imf-ui-component": "Slider.Thumb",
110
- className: (e) => h({ className: a(t.className, e) }),
111
- index: e
112
- });
113
- }
114
- S.displayName = "Slider.Thumb";
115
- //#endregion
116
- export { S as a, c, g as i, a as l, x as n, b as o, _ as r, v as s, y as t, o as u };
@@ -1,24 +0,0 @@
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
- # .claude/skills may be a symlink to .agents/skills; skip markers already read.
10
- seen=""
11
- for marker in .agents/skills/imf-web-ui*/.imf-web-ui-skill-version.json .claude/skills/imf-web-ui*/.imf-web-ui-skill-version.json; do
12
- [ -f "$marker" ] || continue
13
- real=$(cd "$(dirname "$marker")" && pwd -P)/$(basename "$marker")
14
- case " $seen " in
15
- *" $real "*) continue ;;
16
- esac
17
- seen="$seen $real"
18
- INSTALLED=$(node -p "require('./$marker').version" 2>/dev/null) || continue
19
- if [ "$INSTALLED" != "$CURRENT" ]; then
20
- echo "imf-web-ui skills are stale ($INSTALLED installed, package is $CURRENT) — run /imf-web-ui-update, or: npx web-ui install skills && npx web-ui install hooks"
21
- break
22
- fi
23
- done
24
- exit 0