@imfusion/web-ui 0.6.1-dev.27.gfc6e5abb → 0.6.1-dev.3.g5b432448

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 (55) hide show
  1. package/README.md +169 -102
  2. package/dist/{code-C_56u-Vk.js → code-Blo48PGr.js} +2 -2
  3. package/dist/components/stack/stack.d.ts +1 -1
  4. package/dist/icons/icon-config-provider.d.ts +8 -0
  5. package/dist/icons/icon-context.d.ts +4 -0
  6. package/dist/{icons-Cy1HAosO.js → icons-wBmF0U2x.js} +1 -1
  7. package/dist/icons.js +1 -1
  8. package/dist/index.d.ts +0 -1
  9. package/dist/index.js +830 -1009
  10. package/dist/integrations/code-highlight/highlighter.d.ts +0 -24
  11. package/dist/integrations/code-highlight.js +47 -80
  12. package/dist/integrations/image-display-options.js +2 -2
  13. package/dist/provider/web-ui-provider.d.ts +3 -3
  14. package/dist/style.css +1 -1
  15. package/dist/{tabs-DIe1Utiy.js → tabs-CMKvMF4E.js} +0 -2
  16. package/package.json +4 -5
  17. package/src/docgen/doc.gen.json +1 -389
  18. package/src/llms/install-templates/AGENTS.md +18 -15
  19. package/src/llms/llms.gen.txt +33 -39
  20. package/src/llms/skills/imf-web-ui/SKILL.md +39 -30
  21. package/src/llms/skills/imf-web-ui-audit/SKILL.md +102 -50
  22. package/src/llms/skills/imf-web-ui-components/SKILL.md +104 -47
  23. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +52 -44
  24. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
  25. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +62 -40
  26. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +12 -11
  27. package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +46 -31
  28. package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +23 -18
  29. package/src/llms/skills/imf-web-ui-conventions/topics/components.md +69 -20
  30. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +146 -50
  31. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +23 -17
  32. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +20 -15
  33. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +19 -28
  34. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +16 -20
  35. package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +42 -28
  36. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +30 -28
  37. package/src/llms/skills/imf-web-ui-conventions/topics/react.md +74 -28
  38. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +62 -65
  39. package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +14 -12
  40. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -9
  41. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +68 -40
  42. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +50 -26
  43. package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +25 -19
  44. package/src/llms/skills/imf-web-ui-setup/SKILL.md +64 -45
  45. package/src/llms/skills/imf-web-ui-update/SKILL.md +114 -48
  46. package/src/llms/skills/imf-web-ui-ux/SKILL.md +92 -64
  47. package/src/llms/skills/imf-web-ui-ux/references/forms.md +36 -16
  48. package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +27 -14
  49. package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +38 -22
  50. package/src/llms/tokens.gen.json +5 -5
  51. package/dist/codegen/gen-code-highlight-theme.d.ts +0 -1
  52. package/dist/components/toast/index.d.ts +0 -2
  53. package/dist/components/toast/toast.d.ts +0 -200
  54. package/dist/components/toast/toast.meta.d.ts +0 -2
  55. package/dist/icons/icon-config.d.ts +0 -12
@@ -1,200 +0,0 @@
1
- import { Toast as ToastPrimitive } from '@base-ui/react/toast';
2
- import { VariantProps } from 'class-variance-authority';
3
- type UpstreamProvider = React.ComponentProps<typeof ToastPrimitive.Provider>;
4
- type UpstreamPortal = React.ComponentProps<typeof ToastPrimitive.Portal>;
5
- type UpstreamViewport = React.ComponentProps<typeof ToastPrimitive.Viewport>;
6
- type UpstreamRoot = React.ComponentProps<typeof ToastPrimitive.Root>;
7
- type UpstreamContent = React.ComponentProps<typeof ToastPrimitive.Content>;
8
- type UpstreamTitle = React.ComponentProps<typeof ToastPrimitive.Title>;
9
- type UpstreamDescription = React.ComponentProps<typeof ToastPrimitive.Description>;
10
- type UpstreamClose = React.ComponentProps<typeof ToastPrimitive.Close>;
11
- type UpstreamAction = React.ComponentProps<typeof ToastPrimitive.Action>;
12
- type UpstreamPositioner = React.ComponentProps<typeof ToastPrimitive.Positioner>;
13
- type UpstreamArrow = React.ComponentProps<typeof ToastPrimitive.Arrow>;
14
- declare const toastViewport: (props?: ({
15
- position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
16
- width?: "content" | "default" | "compact" | "wide" | null | undefined;
17
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
18
- declare const toastRoot: (props?: ({
19
- variant?: "warning" | "info" | "neutral" | "success" | "error" | null | undefined;
20
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
21
- /**
22
- * Toast.useToastManager — reads the queue and the add/close/update/promise
23
- * methods from the surrounding provider. Must run inside a provider; the one
24
- * `WebUIProvider` mounts satisfies that for the standard setup.
25
- */
26
- export declare const useToastManager: typeof ToastPrimitive.useToastManager;
27
- /**
28
- * Toast.createToastManager — creates a manager that lives outside React so
29
- * non-component code can add toasts. Pass it to a `Toast.Provider` via
30
- * `toastManager`.
31
- */
32
- export declare const createToastManager: typeof ToastPrimitive.createToastManager;
33
- type ProviderProps = {
34
- timeout?: UpstreamProvider["timeout"];
35
- limit?: UpstreamProvider["limit"];
36
- toastManager?: UpstreamProvider["toastManager"];
37
- children?: UpstreamProvider["children"];
38
- };
39
- /**
40
- * Toast.Provider — owns the toast queue for its subtree. Renders no DOM element.
41
- *
42
- * `WebUIProvider` already mounts one, so most applications never write this
43
- * part. Use it for a scoped queue or to attach an external manager.
44
- *
45
- * @see https://base-ui.com/react/components/toast
46
- * @llm https://base-ui.com/react/components/toast.md
47
- */
48
- export declare function Provider({ timeout, limit, ...props }: ProviderProps): import("react/jsx-runtime").JSX.Element;
49
- export declare namespace Provider {
50
- var displayName: string;
51
- }
52
- type PortalProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
53
- container?: UpstreamPortal["container"];
54
- className?: UpstreamPortal["className"];
55
- render?: UpstreamPortal["render"];
56
- children?: UpstreamPortal["children"];
57
- };
58
- /** Toast.Portal — moves the viewport out of the page flow so toasts float above the app. */
59
- export declare function Portal({ className, ...props }: PortalProps): import("react/jsx-runtime").JSX.Element;
60
- export declare namespace Portal {
61
- var displayName: string;
62
- }
63
- type ViewportProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
64
- /** Which edge or corner of the screen the stack anchors to. */
65
- position?: VariantProps<typeof toastViewport>["position"];
66
- /** Width treatment for the toast stack. */
67
- width?: VariantProps<typeof toastViewport>["width"];
68
- className?: UpstreamViewport["className"];
69
- render?: UpstreamViewport["render"];
70
- };
71
- /**
72
- * Toast.Viewport — the fixed layer that holds the stack. Hovering or focusing it
73
- * expands the collapsed toasts; it ignores pointer events except on the toasts
74
- * themselves so the app underneath stays clickable.
75
- */
76
- export declare function Viewport({ className, position, width, ...props }: ViewportProps): import("react/jsx-runtime").JSX.Element;
77
- export declare namespace Viewport {
78
- var displayName: string;
79
- }
80
- type RootProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
81
- /** Semantic treatment for the toast surface. */
82
- variant?: VariantProps<typeof toastRoot>["variant"];
83
- /** The toast object from the manager's `toasts` array. */
84
- toast: UpstreamRoot["toast"];
85
- /** @default ['down', 'right'] */
86
- swipeDirection?: UpstreamRoot["swipeDirection"];
87
- className?: UpstreamRoot["className"];
88
- render?: UpstreamRoot["render"];
89
- };
90
- /**
91
- * Toast.Root — one toast surface. Carries the upstream state as data attributes
92
- * (`data-starting-style`, `data-ending-style`, `data-expanded`, `data-limited`,
93
- * `data-swiping`) which the stylesheet uses for stack and exit motion.
94
- */
95
- export declare function Root({ className, variant, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
96
- export declare namespace Root {
97
- var displayName: string;
98
- }
99
- type ContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
100
- className?: UpstreamContent["className"];
101
- render?: UpstreamContent["render"];
102
- };
103
- /**
104
- * Toast.Content — lays out title, description, action, and close. Fades out on
105
- * the toasts stacked behind the frontmost one via `data-behind`.
106
- */
107
- export declare function Content({ className, ...props }: ContentProps): import("react/jsx-runtime").JSX.Element;
108
- export declare namespace Content {
109
- var displayName: string;
110
- }
111
- type TitleProps = Omit<React.HTMLAttributes<HTMLHeadingElement>, "className"> & {
112
- className?: UpstreamTitle["className"];
113
- render?: UpstreamTitle["render"];
114
- };
115
- /** Toast.Title — the message heading. Falls back to the toast object's `title` when given no children. */
116
- export declare function Title({ className, ...props }: TitleProps): import("react/jsx-runtime").JSX.Element;
117
- export declare namespace Title {
118
- var displayName: string;
119
- }
120
- type DescriptionProps = Omit<React.HTMLAttributes<HTMLParagraphElement>, "className"> & {
121
- className?: UpstreamDescription["className"];
122
- render?: UpstreamDescription["render"];
123
- };
124
- /** Toast.Description — supporting copy. Falls back to the toast object's `description` when given no children. */
125
- export declare function Description({ className, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
126
- export declare namespace Description {
127
- var displayName: string;
128
- }
129
- type CloseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
130
- /** @default true */
131
- nativeButton?: UpstreamClose["nativeButton"];
132
- className?: UpstreamClose["className"];
133
- render?: UpstreamClose["render"];
134
- };
135
- /** Toast.Close — dismisses the toast it sits in. */
136
- export declare function Close({ className, ...props }: CloseProps): import("react/jsx-runtime").JSX.Element;
137
- export declare namespace Close {
138
- var displayName: string;
139
- }
140
- type ActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
141
- /** @default true */
142
- nativeButton?: UpstreamAction["nativeButton"];
143
- className?: UpstreamAction["className"];
144
- render?: UpstreamAction["render"];
145
- };
146
- /**
147
- * Toast.Action — the toast's single affordance, typically an undo. Its behavior
148
- * comes from `actionProps` on the toast object passed to the manager.
149
- */
150
- export declare function Action({ className, ...props }: ActionProps): import("react/jsx-runtime").JSX.Element;
151
- export declare namespace Action {
152
- var displayName: string;
153
- }
154
- type PositionerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
155
- /** The toast object from the manager's `toasts` array. */
156
- toast: UpstreamPositioner["toast"];
157
- /** @default 'top' */
158
- side?: UpstreamPositioner["side"];
159
- /** @default 'center' */
160
- align?: UpstreamPositioner["align"];
161
- /** @default 0 */
162
- sideOffset?: UpstreamPositioner["sideOffset"];
163
- /** @default 0 */
164
- alignOffset?: UpstreamPositioner["alignOffset"];
165
- /** @default 5 */
166
- arrowPadding?: UpstreamPositioner["arrowPadding"];
167
- anchor?: UpstreamPositioner["anchor"];
168
- collisionAvoidance?: UpstreamPositioner["collisionAvoidance"];
169
- /** @default 'clipping-ancestors' */
170
- collisionBoundary?: UpstreamPositioner["collisionBoundary"];
171
- /** @default 5 */
172
- collisionPadding?: UpstreamPositioner["collisionPadding"];
173
- /** @default 'absolute' */
174
- positionMethod?: UpstreamPositioner["positionMethod"];
175
- /** @default false */
176
- sticky?: UpstreamPositioner["sticky"];
177
- /** @default false */
178
- disableAnchorTracking?: UpstreamPositioner["disableAnchorTracking"];
179
- className?: UpstreamPositioner["className"];
180
- render?: UpstreamPositioner["render"];
181
- };
182
- /**
183
- * Toast.Positioner — anchors a toast to an element instead of the stack, for
184
- * feedback that belongs next to the control that caused it. Wrap a `Root` in it
185
- * and the root switches to the compact content-sized surface.
186
- */
187
- export declare function Positioner({ className, ...props }: PositionerProps): import("react/jsx-runtime").JSX.Element;
188
- export declare namespace Positioner {
189
- var displayName: string;
190
- }
191
- type ArrowProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
192
- className?: UpstreamArrow["className"];
193
- render?: UpstreamArrow["render"];
194
- };
195
- /** Toast.Arrow — pointer joining an anchored toast to its anchor. Receives `data-side` for orientation. */
196
- export declare function Arrow({ className, ...props }: ArrowProps): import("react/jsx-runtime").JSX.Element;
197
- export declare namespace Arrow {
198
- var displayName: string;
199
- }
200
- export {};
@@ -1,2 +0,0 @@
1
- import { ComponentMeta } from '../../types/meta';
2
- export declare const toastMeta: ComponentMeta;
@@ -1,12 +0,0 @@
1
- import { ReactNode, SVGProps } from 'react';
2
- type IconConfig = Omit<SVGProps<SVGSVGElement>, "children" | "ref">;
3
- interface ProviderProps {
4
- children: ReactNode;
5
- value?: IconConfig;
6
- }
7
- /** IconConfig.Provider — sets SVG defaults (color, size, stroke width) for icons in its subtree. Providers shallow-merge with the closest parent's config. */
8
- export declare function Provider({ children, value }: ProviderProps): import("react/jsx-runtime").JSX.Element;
9
- export declare namespace Provider {
10
- var displayName: string;
11
- }
12
- export {};