@imfusion/web-ui 0.10.1-dev.45.ga6a3c86a → 0.10.1-dev.48.g27170cb6
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/CHANGELOG.md +3 -1
- package/dist/components/dialog/dialog.d.ts +7 -4
- package/dist/index.js +1176 -1176
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +4 -4
- package/src/llms/install-templates/hooks/stop.sh +4 -2
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +25 -27
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +6 -6
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +3 -3
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +3 -3
package/package.json
CHANGED
package/src/docgen/doc.gen.json
CHANGED
|
@@ -1726,7 +1726,7 @@
|
|
|
1726
1726
|
},
|
|
1727
1727
|
{
|
|
1728
1728
|
"name": "Dialog.Close",
|
|
1729
|
-
"description": "Dialog.Close — button that closes the dialog. With no `children` and no `render` it renders the library's ghost close\nbutton (
|
|
1729
|
+
"description": "Dialog.Close — button that closes the dialog. With no `children` and no `render` it renders the library's ghost close\nbutton (a boxed × icon labelled \"Close\"); otherwise render your own `Button`.",
|
|
1730
1730
|
"props": [
|
|
1731
1731
|
{
|
|
1732
1732
|
"name": "className",
|
|
@@ -1841,7 +1841,7 @@
|
|
|
1841
1841
|
"required": false,
|
|
1842
1842
|
"type": "ReactNode",
|
|
1843
1843
|
"defaultValue": null,
|
|
1844
|
-
"description": "Content of the footer, usually buttons. The footer renders only when this is set."
|
|
1844
|
+
"description": "Content of the footer, usually buttons. The footer renders only when this is set, and then replaces the header's\nclose button, so include a way out such as a Cancel `Dialog.Close`."
|
|
1845
1845
|
},
|
|
1846
1846
|
{
|
|
1847
1847
|
"name": "actionsRef",
|
|
@@ -2076,14 +2076,14 @@
|
|
|
2076
2076
|
},
|
|
2077
2077
|
{
|
|
2078
2078
|
"name": "Dialog.Simple",
|
|
2079
|
-
"description": "Dialog.Simple — pre-composed dialog: trigger, header with title, description, optional status
|
|
2079
|
+
"description": "Dialog.Simple — pre-composed dialog: trigger, header with title, description, and optional status, a scrolling body,\nand either a close button in the header or a footer of `actions`. Root props pass through.",
|
|
2080
2080
|
"props": [
|
|
2081
2081
|
{
|
|
2082
2082
|
"name": "actions",
|
|
2083
2083
|
"required": false,
|
|
2084
2084
|
"type": "ReactNode",
|
|
2085
2085
|
"defaultValue": null,
|
|
2086
|
-
"description": "Content of the footer, usually buttons. The footer renders only when this is set."
|
|
2086
|
+
"description": "Content of the footer, usually buttons. The footer renders only when this is set, and then replaces the header's\nclose button, so include a way out such as a Cancel `Dialog.Close`."
|
|
2087
2087
|
},
|
|
2088
2088
|
{
|
|
2089
2089
|
"name": "actionsRef",
|
|
@@ -12,10 +12,12 @@ git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
|
12
12
|
# session must not block a question-answering turn. Edit evidence: Write/Edit
|
|
13
13
|
# tool calls (Claude transcript) or apply_patch calls (Codex rollout), searched
|
|
14
14
|
# only after the turn's opening entry: the last real user prompt (not a tool
|
|
15
|
-
# result or injected meta message) or the last Codex task_started event.
|
|
15
|
+
# result or injected meta message) or the last Codex task_started event. Claude
|
|
16
|
+
# matches only tool_use calls: its transcript also stores the tool definitions,
|
|
17
|
+
# whose "name":"Edit" entries are not edits.
|
|
16
18
|
TRANSCRIPT=$(printf '%s' "$PAYLOAD" | sed -n 's/.*"transcript_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n 1)
|
|
17
19
|
[ -f "$TRANSCRIPT" ] || exit 0
|
|
18
20
|
TURN_START=$(grep -En '"type":"user"|"type":"task_started"' "$TRANSCRIPT" | grep -Ev '"type":"tool_result"|"isMeta":true' | tail -n 1 | cut -d: -f1)
|
|
19
|
-
tail -n +$(( ${TURN_START:-0} + 1 )) "$TRANSCRIPT" | grep -Eq '"
|
|
21
|
+
tail -n +$(( ${TURN_START:-0} + 1 )) "$TRANSCRIPT" | grep -Eq '"type":"tool_use","id":"[^"]*","name":"(Write|Edit|MultiEdit|NotebookEdit)"|"name":"apply_patch"' || exit 0
|
|
20
22
|
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'
|
|
21
23
|
exit 0
|
|
@@ -7,8 +7,8 @@ description:
|
|
|
7
7
|
|
|
8
8
|
# Shape the screen
|
|
9
9
|
|
|
10
|
-
Use this skill for screen-level decisions.
|
|
11
|
-
`imf-web-ui-conventions`.
|
|
10
|
+
Use this skill for screen-level decisions. The patterns below name no components: check which component fits a pattern, and
|
|
11
|
+
its API, in `imf-web-ui-components`. Put code and styling rules in `imf-web-ui-conventions`.
|
|
12
12
|
|
|
13
13
|
Invoke `imf-web-ui-user-profile` first and explain at its levels throughout.
|
|
14
14
|
|
|
@@ -34,33 +34,31 @@ unanswered, make the conservative choice and state the assumption.
|
|
|
34
34
|
## Choose a surface
|
|
35
35
|
|
|
36
36
|
- Use a full page by default.
|
|
37
|
-
- Use
|
|
38
|
-
- Use
|
|
39
|
-
- Use
|
|
40
|
-
- Use
|
|
41
|
-
- Use
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
reason.
|
|
37
|
+
- Use a side panel for a focused task that keeps the current page in context.
|
|
38
|
+
- Use a floating panel anchored to its trigger for small contextual content or a light form.
|
|
39
|
+
- Use a hover or focus hint for a short label only. It must not contain required or interactive information.
|
|
40
|
+
- Use a collapsible region for secondary content inside the page.
|
|
41
|
+
- Use tabs for parallel views of one subject. If users must complete every section, use a flow instead.
|
|
42
|
+
- Use a modal dialog for a decision that must be settled before the page continues, such as a destructive action. If no
|
|
43
|
+
component fits a pattern, raise the gap rather than hand-rolling a replacement without a product reason.
|
|
45
44
|
|
|
46
45
|
## Choose between similar controls
|
|
47
46
|
|
|
48
|
-
-
|
|
49
|
-
- Use
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- Use
|
|
54
|
-
- Use
|
|
55
|
-
- Use
|
|
56
|
-
- Use `Slider` when relative position matters more than typing an exact value.
|
|
47
|
+
- An action is a button, navigation is a link, and a label is a chip.
|
|
48
|
+
- Use an inline link inside text or in a row of chips, and a full-row link for a list of resources.
|
|
49
|
+
- Use a plain table for static small data. Pair it with a headless table library for sorting, pagination, or column logic.
|
|
50
|
+
TanStack Table is the recommended choice.
|
|
51
|
+
- Use an in-place status message for persistent status. Keep transient confirmation near the action it confirms.
|
|
52
|
+
- Use a switch for an immediate setting and a checkbox for a submitted choice.
|
|
53
|
+
- Use a select for a known list, and consider a different control when the list is very short or very large.
|
|
54
|
+
- Use a slider when relative position matters more than typing an exact value.
|
|
57
55
|
|
|
58
56
|
## Build the hierarchy
|
|
59
57
|
|
|
60
|
-
- Frame an application with
|
|
61
|
-
-
|
|
58
|
+
- Frame an application with the library's app shell.
|
|
59
|
+
- Arrange content with stack and row layouts, wrap long-form text in a prose container, and use a separator for a real
|
|
62
60
|
division.
|
|
63
|
-
- Use
|
|
61
|
+
- Use the library's typography components for text hierarchy instead of styling raw headings beside them.
|
|
64
62
|
- Give a view one primary action. Make other actions quieter.
|
|
65
63
|
- Choose density from the user's frequency and data volume: frequent work and large data need compact layouts; occasional
|
|
66
64
|
work benefits from more explanation and space.
|
|
@@ -70,15 +68,15 @@ reason.
|
|
|
70
68
|
Plan these states with the loaded view:
|
|
71
69
|
|
|
72
70
|
- **Empty**: say what belongs here and what the user can do next.
|
|
73
|
-
- **Loading**: use
|
|
74
|
-
which
|
|
75
|
-
- **Error**: explain what failed and the next action in
|
|
71
|
+
- **Loading**: use a spinner or a stable skeleton; keep the frame from jumping. The `imf-web-ui-conventions` data topic says
|
|
72
|
+
which skeleton part fits each way the data loads.
|
|
73
|
+
- **Error**: explain what failed and the next action in an in-place status message near the problem.
|
|
76
74
|
- **Loaded**: the normal view.
|
|
77
75
|
|
|
78
76
|
## Keep custom UI native
|
|
79
77
|
|
|
80
|
-
When
|
|
81
|
-
|
|
78
|
+
When no component covers a piece, compose its primitives and use `--imf-ui-*` tokens. The implementation details are in
|
|
79
|
+
`imf-web-ui-conventions`.
|
|
82
80
|
|
|
83
81
|
For a screen review, read the relevant reference under `references/`: `usability-heuristics.md`, `visual-design.md`, or
|
|
84
82
|
`forms.md`.
|
|
@@ -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
|
|
10
|
-
- Group related fields
|
|
11
|
-
- Use a labeled
|
|
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
|
|
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
|
|
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.**
|
|
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
|
|
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
|
|
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.
|
|
15
|
-
|
|
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
|
|