@imfusion/web-ui 0.6.1-dev.3.g8b2855c3 → 0.6.1-dev.33.g665111df
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 +102 -169
- package/bin/install.js +28 -10
- package/bin/install.test.ts +19 -0
- package/dist/code-BFMQnmu9.js +147 -0
- package/dist/codegen/gen-code-highlight-theme.d.ts +1 -0
- package/dist/components/code/code.d.ts +5 -4
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +200 -0
- package/dist/components/toast/toast.meta.d.ts +2 -0
- package/dist/components/typo/typo.d.ts +23 -22
- package/dist/icons/icon-config.d.ts +12 -0
- package/dist/{icons-wBmF0U2x.js → icons-Cy1HAosO.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1278 -1069
- package/dist/integrations/code-highlight/highlighter.d.ts +24 -0
- package/dist/integrations/code-highlight.js +80 -47
- package/dist/integrations/image-display-options.js +2 -2
- package/dist/provider/web-ui-provider.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{tabs-CMKvMF4E.js → tabs-DIe1Utiy.js} +2 -0
- package/package.json +5 -4
- package/src/docgen/doc.gen.json +515 -1
- package/src/llms/install-templates/AGENTS.md +15 -18
- package/src/llms/llms.gen.txt +39 -33
- package/src/llms/skills/imf-web-ui/SKILL.md +30 -39
- package/src/llms/skills/imf-web-ui-audit/SKILL.md +50 -102
- package/src/llms/skills/imf-web-ui-components/SKILL.md +47 -104
- package/src/llms/skills/imf-web-ui-conventions/SKILL.md +44 -52
- package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
- package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +40 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +11 -12
- package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +31 -46
- package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +18 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/components.md +20 -69
- package/src/llms/skills/imf-web-ui-conventions/topics/data.md +50 -146
- package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +17 -23
- package/src/llms/skills/imf-web-ui-conventions/topics/git.md +15 -20
- package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +28 -19
- package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +20 -16
- package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +28 -42
- package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +28 -30
- package/src/llms/skills/imf-web-ui-conventions/topics/react.md +28 -74
- package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +65 -62
- package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +12 -14
- package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +9 -4
- package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +40 -68
- package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +26 -50
- package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +19 -25
- package/src/llms/skills/imf-web-ui-setup/SKILL.md +45 -64
- package/src/llms/skills/imf-web-ui-update/SKILL.md +48 -114
- package/src/llms/skills/imf-web-ui-ux/SKILL.md +64 -92
- package/src/llms/skills/imf-web-ui-ux/references/forms.md +16 -36
- package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +14 -27
- package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +22 -38
- package/src/llms/tokens.gen.json +5 -5
- package/dist/code-Blo48PGr.js +0 -136
- package/dist/icons/icon-config-provider.d.ts +0 -8
- package/dist/icons/icon-context.d.ts +0 -4
package/dist/code-Blo48PGr.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./chunk-DmhlhrBa.js";
|
|
2
|
-
import { t } from "./meta-CySnRuVp.js";
|
|
3
|
-
import { Ma as n, Qt as r, Xo as i, hn as a, r as o } from "./icons-wBmF0U2x.js";
|
|
4
|
-
import { cx as s } from "class-variance-authority";
|
|
5
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
|
|
7
|
-
//#region src/hooks/use-clipboard.ts
|
|
8
|
-
function m({ timeout: e = 1500 } = {}) {
|
|
9
|
-
let [t, n] = p(!1), r = f(void 0);
|
|
10
|
-
return d(() => () => clearTimeout(r.current), []), {
|
|
11
|
-
copied: t,
|
|
12
|
-
copy: u((t) => {
|
|
13
|
-
navigator.clipboard.writeText(t).then(() => {
|
|
14
|
-
n(!0), clearTimeout(r.current), r.current = setTimeout(() => n(!1), e);
|
|
15
|
-
});
|
|
16
|
-
}, [e])
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
var h = {
|
|
20
|
-
block: "imf-ui-code-module-block",
|
|
21
|
-
copy: "imf-ui-code-module-copy",
|
|
22
|
-
icon: "imf-ui-code-module-icon",
|
|
23
|
-
inline: "imf-ui-code-module-inline",
|
|
24
|
-
inlineCopy: "imf-ui-code-module-inlineCopy",
|
|
25
|
-
inlineLink: "imf-ui-code-module-inlineLink",
|
|
26
|
-
language: "imf-ui-code-module-language",
|
|
27
|
-
pre: "imf-ui-code-module-pre",
|
|
28
|
-
separator: "imf-ui-code-module-separator"
|
|
29
|
-
}, g = /* @__PURE__ */ e({
|
|
30
|
-
Block: () => y,
|
|
31
|
-
Inline: () => _,
|
|
32
|
-
InlineLink: () => v
|
|
33
|
-
});
|
|
34
|
-
function _({ className: e, copyable: t = !1, children: r, ...a }) {
|
|
35
|
-
let { copied: u, copy: d } = m(), p = f(null), g = u ? n : i;
|
|
36
|
-
return /* @__PURE__ */ l("code", {
|
|
37
|
-
...a,
|
|
38
|
-
"data-imf-ui-component": "Code.Inline",
|
|
39
|
-
className: s(h.inline, e),
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ c("span", {
|
|
42
|
-
ref: p,
|
|
43
|
-
children: r
|
|
44
|
-
}),
|
|
45
|
-
t && /* @__PURE__ */ c("span", { className: h.separator }),
|
|
46
|
-
t && /* @__PURE__ */ c("button", {
|
|
47
|
-
type: "button",
|
|
48
|
-
className: h.inlineCopy,
|
|
49
|
-
"data-copied": u || void 0,
|
|
50
|
-
"aria-label": u ? "Copied" : "Copy",
|
|
51
|
-
onClick: () => d(p.current?.textContent ?? ""),
|
|
52
|
-
children: /* @__PURE__ */ c(o, {
|
|
53
|
-
glyph: g,
|
|
54
|
-
size: 12,
|
|
55
|
-
strokeWidth: 2,
|
|
56
|
-
"aria-hidden": !0
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
_.displayName = "Code.Inline";
|
|
63
|
-
function v({ className: e, kind: t = "external", children: n, ...i }) {
|
|
64
|
-
let u = t === "external" ? a : r;
|
|
65
|
-
return /* @__PURE__ */ l("a", {
|
|
66
|
-
...t === "external" ? {
|
|
67
|
-
target: "_blank",
|
|
68
|
-
rel: "noreferrer"
|
|
69
|
-
} : {},
|
|
70
|
-
...i,
|
|
71
|
-
"data-imf-ui-component": "Code.InlineLink",
|
|
72
|
-
"data-kind": t,
|
|
73
|
-
className: s(h.inline, h.inlineLink, e),
|
|
74
|
-
children: [
|
|
75
|
-
n,
|
|
76
|
-
/* @__PURE__ */ c("span", { className: h.separator }),
|
|
77
|
-
/* @__PURE__ */ c("span", {
|
|
78
|
-
className: h.icon,
|
|
79
|
-
"aria-hidden": !0,
|
|
80
|
-
children: /* @__PURE__ */ c(o, {
|
|
81
|
-
glyph: u,
|
|
82
|
-
size: 12,
|
|
83
|
-
strokeWidth: 2
|
|
84
|
-
})
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
v.displayName = "Code.InlineLink";
|
|
90
|
-
function y({ className: e, language: t, hideCopy: r = !1, children: a, ...u }) {
|
|
91
|
-
let { copied: d, copy: p } = m(), g = f(null), _ = d ? n : i;
|
|
92
|
-
return /* @__PURE__ */ l("div", {
|
|
93
|
-
"data-imf-ui-component": "Code.Block",
|
|
94
|
-
className: s(h.block, e),
|
|
95
|
-
children: [
|
|
96
|
-
t != null && /* @__PURE__ */ c("span", {
|
|
97
|
-
className: h.language,
|
|
98
|
-
children: t
|
|
99
|
-
}),
|
|
100
|
-
!r && /* @__PURE__ */ c("button", {
|
|
101
|
-
type: "button",
|
|
102
|
-
className: h.copy,
|
|
103
|
-
"data-copied": d || void 0,
|
|
104
|
-
"aria-label": d ? "Copied" : "Copy",
|
|
105
|
-
onClick: () => p(g.current?.textContent ?? ""),
|
|
106
|
-
children: /* @__PURE__ */ c(o, {
|
|
107
|
-
glyph: _,
|
|
108
|
-
size: 12,
|
|
109
|
-
strokeWidth: 2,
|
|
110
|
-
"aria-hidden": !0
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ c("pre", {
|
|
114
|
-
...u,
|
|
115
|
-
className: h.pre,
|
|
116
|
-
children: /* @__PURE__ */ c("code", {
|
|
117
|
-
ref: g,
|
|
118
|
-
children: a
|
|
119
|
-
})
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
y.displayName = "Code.Block";
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/components/code/code.meta.ts
|
|
127
|
-
var b = {
|
|
128
|
-
name: "Code",
|
|
129
|
-
category: t.display,
|
|
130
|
-
status: "stable",
|
|
131
|
-
namespace: !0,
|
|
132
|
-
description: "Displays source code — Code.Inline for a fragment in running text, Code.Block for a fenced block with an optional language label and copy button. Also called a code snippet or code block.",
|
|
133
|
-
origin: "native"
|
|
134
|
-
};
|
|
135
|
-
//#endregion
|
|
136
|
-
export { g as a, v as i, y as n, m as o, _ as r, b as t };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { IconConfig } from './icon-context';
|
|
3
|
-
interface IconConfigProviderProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
value?: IconConfig;
|
|
6
|
-
}
|
|
7
|
-
export declare function IconConfigProvider({ children, value }: IconConfigProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|