@imfusion/web-ui 0.5.1-dev.5.gb4de52d7 → 0.5.1-dev.51.gad24cd6e
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/{code-qBbqAHK-.js → code-B83kAmnS.js} +21 -15
- package/dist/components/code/code.d.ts +10 -18
- 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/code-highlight.d.ts +8 -6
- 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 +196 -58
- 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 +341 -35
- 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
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { Code } from '../../components/code';
|
|
2
2
|
import { SupportedLanguage } from './highlighter';
|
|
3
|
-
type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "
|
|
3
|
+
type BlockProps = Omit<React.ComponentProps<typeof Code.Block>, "children" | "language"> & {
|
|
4
4
|
/** Language of `children`: grammar for tokenization and label for the corner notch. Omit to hide the notch and skip highlighting. */
|
|
5
|
+
children: string;
|
|
5
6
|
language?: SupportedLanguage;
|
|
6
7
|
};
|
|
7
|
-
/** Code.Block — the core `Code.Block` with TanStack Highlight tokens
|
|
8
|
-
export declare function Block({ language, children, ...props }: BlockProps): import(
|
|
8
|
+
/** Code.Block — the core `Code.Block` with TanStack Highlight tokens rendered inside. */
|
|
9
|
+
export declare function Block({ language, children, ...props }: BlockProps): import('react').FunctionComponentElement<any>;
|
|
9
10
|
export declare namespace Block {
|
|
10
11
|
var displayName: string;
|
|
11
12
|
}
|
|
12
|
-
type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "
|
|
13
|
+
type InlineProps = Omit<React.ComponentProps<typeof Code.Inline>, "children"> & {
|
|
13
14
|
/** Grammar used to tokenize the fragment. Purely visual — the chip shows no language label. Omit for plain text. */
|
|
15
|
+
children: string;
|
|
14
16
|
language?: SupportedLanguage;
|
|
15
17
|
};
|
|
16
|
-
/** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens
|
|
17
|
-
export declare function Inline({ language, children, ...props }: InlineProps): import(
|
|
18
|
+
/** Code.Inline — the core `Code.Inline` with TanStack Highlight tokens rendered inside. */
|
|
19
|
+
export declare function Inline({ language, children, ...props }: InlineProps): import('react').FunctionComponentElement<any>;
|
|
18
20
|
export declare namespace Inline {
|
|
19
21
|
var displayName: string;
|
|
20
22
|
}
|
|
@@ -1,6 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const LANGUAGE_DEFINITIONS: {
|
|
2
|
+
readonly tsx: {
|
|
3
|
+
readonly aliases: readonly ["typescriptreact"];
|
|
4
|
+
};
|
|
5
|
+
readonly ts: {
|
|
6
|
+
readonly aliases: readonly ["typescript"];
|
|
7
|
+
};
|
|
8
|
+
readonly css: {
|
|
9
|
+
readonly aliases: readonly ["scss"];
|
|
10
|
+
};
|
|
11
|
+
readonly shell: {
|
|
12
|
+
readonly aliases: readonly ["bash", "sh", "zsh", "shellscript"];
|
|
13
|
+
};
|
|
14
|
+
readonly json: {
|
|
15
|
+
readonly aliases: readonly [];
|
|
16
|
+
};
|
|
17
|
+
readonly cpp: {
|
|
18
|
+
readonly aliases: readonly ["c++", "cc", "cxx", "hpp"];
|
|
19
|
+
};
|
|
20
|
+
readonly python: {
|
|
21
|
+
readonly aliases: readonly ["py"];
|
|
22
|
+
};
|
|
23
|
+
readonly cmake: {
|
|
24
|
+
readonly aliases: readonly [];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const SUPPORTED_LANGUAGES: string[];
|
|
28
|
+
type CanonicalLanguage = keyof typeof LANGUAGE_DEFINITIONS;
|
|
29
|
+
type LanguageAlias = {
|
|
30
|
+
[Language in CanonicalLanguage]: (typeof LANGUAGE_DEFINITIONS)[Language]["aliases"][number];
|
|
31
|
+
}[CanonicalLanguage];
|
|
32
|
+
export type SupportedLanguage = CanonicalLanguage | LanguageAlias;
|
|
4
33
|
export declare function isSupportedLanguage(value: string): value is SupportedLanguage;
|
|
5
34
|
export declare function highlightToHtml(code: string, language: SupportedLanguage): string;
|
|
6
35
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HighlightTokenClass, TokenRange } from '@tanstack/highlight/core';
|
|
2
|
+
export type LanguagePattern = {
|
|
3
|
+
className: HighlightTokenClass;
|
|
4
|
+
group?: number;
|
|
5
|
+
regex: RegExp;
|
|
6
|
+
};
|
|
7
|
+
export declare function collectPatternRanges(code: string, patterns: readonly LanguagePattern[], initialRanges?: readonly TokenRange[]): TokenRange[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cmake: import('@tanstack/highlight/core').LanguageDefinition<"cmake">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpp: import('@tanstack/highlight/core').LanguageDefinition<"cpp">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const python: import('@tanstack/highlight/core').LanguageDefinition<"python">;
|
|
@@ -1,84 +1,222 @@
|
|
|
1
1
|
import { a as e, t } from "../meta-B8C51eyL.js";
|
|
2
|
-
import { i as n, n as r, r as i } from "../code-
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { createHighlighter as
|
|
6
|
-
import { css as
|
|
7
|
-
import { json as
|
|
8
|
-
import { plaintext as
|
|
9
|
-
import { shell as
|
|
10
|
-
import { ts as
|
|
11
|
-
import { tsx as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
import { i as n, n as r, r as i } from "../code-B83kAmnS.js";
|
|
3
|
+
import { cloneElement as a, useMemo as o } from "react";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
+
import { createHighlighter as c, defineLanguage as l, renderNodesToHtml as u, renderTokens as d } from "@tanstack/highlight/core";
|
|
6
|
+
import { css as f } from "@tanstack/highlight/languages/css";
|
|
7
|
+
import { json as p } from "@tanstack/highlight/languages/json";
|
|
8
|
+
import { plaintext as m } from "@tanstack/highlight/languages/plaintext";
|
|
9
|
+
import { shell as h } from "@tanstack/highlight/languages/shell";
|
|
10
|
+
import { ts as g } from "@tanstack/highlight/languages/ts";
|
|
11
|
+
import { tsx as _ } from "@tanstack/highlight/languages/tsx";
|
|
12
|
+
import { python as v } from "@tanstack/highlight/languages/python";
|
|
13
|
+
//#region src/integrations/code-highlight/language-patterns.ts
|
|
14
|
+
function y(e, t, n = []) {
|
|
15
|
+
let r = [], i = new Uint8Array(e.length);
|
|
16
|
+
for (let { start: e, end: t } of n) i.fill(1, e, t);
|
|
17
|
+
for (let n of t) {
|
|
18
|
+
let t = new RegExp(n.regex.source, n.regex.flags.includes("g") ? n.regex.flags : `${n.regex.flags}g`), a;
|
|
19
|
+
for (; (a = t.exec(e)) !== null;) {
|
|
20
|
+
let e = n.group == null ? a[0] : a[n.group];
|
|
21
|
+
if (e === "") {
|
|
22
|
+
a[0] === "" && (t.lastIndex += 1);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
let o = n.group == null ? 0 : a[0].indexOf(e), s = a.index + o, c = s + e.length;
|
|
26
|
+
if (s < c) {
|
|
27
|
+
let e = !1;
|
|
28
|
+
for (let t = s; t < c; t += 1) if (i[t]) {
|
|
29
|
+
e = !0;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
e || (r.push({
|
|
33
|
+
start: s,
|
|
34
|
+
end: c,
|
|
35
|
+
className: n.className
|
|
36
|
+
}), i.fill(1, s, c));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/integrations/code-highlight/languages/cmake.ts
|
|
44
|
+
var b = [
|
|
45
|
+
{
|
|
46
|
+
className: "string",
|
|
47
|
+
regex: /"(?:\\.|[^"\\\n])*"|\[(=*)\[[\s\S]*?\]\1\]/g
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
className: "comment",
|
|
51
|
+
regex: /#[^\n]*/g
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
className: "variable",
|
|
55
|
+
regex: /\$(?:ENV|CACHE)?\{[^}\n]+\}/g
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
className: "keyword",
|
|
59
|
+
regex: /\b(?:break|continue|else|elseif|endforeach|endfunction|endif|endmacro|endwhile|if|include|macro|return|while)\b/gi
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
className: "literal",
|
|
63
|
+
regex: /\b(?:FALSE|IGNORE|NOTFOUND|NO|OFF|ON|TRUE|YES)\b/gi
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
className: "function",
|
|
67
|
+
regex: /\b[A-Za-z_][\w-]*(?=\s*\()/g
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
className: "number",
|
|
71
|
+
regex: /\b\d+(?:\.\d+)?\b/g
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
className: "operator",
|
|
75
|
+
regex: /(?:LESS_EQUAL|GREATER_EQUAL|STREQUAL|IN_LIST|MATCHES|EQUAL|LESS|GREATER|AND|OR|NOT|[=<>+*/!-])/gi
|
|
76
|
+
}
|
|
77
|
+
], x = l({
|
|
78
|
+
name: "cmake",
|
|
79
|
+
tokenize(e) {
|
|
80
|
+
return y(e, b);
|
|
81
|
+
}
|
|
82
|
+
}), S = [
|
|
83
|
+
{
|
|
84
|
+
className: "comment",
|
|
85
|
+
regex: /\/\/[^\n]*|\/\*[\s\S]*?\*\//g
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
className: "string",
|
|
89
|
+
regex: /"(?:\\.|[^"\\\n])*"|'(?:\\.|[^'\\\n])*'/g
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
className: "meta",
|
|
93
|
+
regex: /^[ \t]*#[ \t]*(?:include|define|if|ifdef|ifndef|elif|else|endif|pragma|undef|error|warning)\b/gm
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
className: "keyword",
|
|
97
|
+
regex: /\b(?:alignas|alignof|and|asm|atomic_cancel|atomic_commit|atomic_noexcept|auto|bitand|bitor|break|case|catch|co_await|co_return|co_yield|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|default|delete|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|goto|if|inline|mutable|namespace|new|noexcept|not|operator|or|private|protected|public|reflexpr|register|reinterpret_cast|requires|return|sizeof|static|static_assert|static_cast|struct|switch|synchronized|template|this|thread_local|throw|try|typedef|typeid|typename|union|using|virtual|volatile|while|xor)\b/g
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
className: "type",
|
|
101
|
+
regex: /\b(?:bool|char|char8_t|char16_t|char32_t|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/g
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
className: "literal",
|
|
105
|
+
regex: /\b(?:NULL|nullptr|true|false)\b/g
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
className: "function",
|
|
109
|
+
regex: /\b[A-Za-z_]\w*(?=\s*\()/g
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
className: "number",
|
|
113
|
+
regex: /\b(?:0[xX][\da-fA-F']+|0[bB][01']+|\d[\d']*(?:\.\d[\d']*)?(?:[eE][+-]?\d[\d']*)?[uUlLfF]*)\b/g
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
className: "operator",
|
|
117
|
+
regex: /(?:<<=?|>>=?|->\*|->|\+\+|--|&&|\|\||==|!=|<=|>=|::|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|[-+*/%=&|^!<>?:~])/g
|
|
118
|
+
}
|
|
119
|
+
], C = l({
|
|
120
|
+
name: "cpp",
|
|
121
|
+
aliases: [
|
|
122
|
+
"c++",
|
|
123
|
+
"cc",
|
|
124
|
+
"cxx",
|
|
125
|
+
"hpp"
|
|
126
|
+
],
|
|
127
|
+
tokenize(e) {
|
|
128
|
+
return y(e, S);
|
|
129
|
+
}
|
|
130
|
+
}), w = [{
|
|
131
|
+
className: "function",
|
|
132
|
+
regex: /\b[A-Za-z_]\w*(?=\s*\()/g
|
|
133
|
+
}], T = l({
|
|
134
|
+
name: "python",
|
|
135
|
+
aliases: ["py"],
|
|
136
|
+
tokenize(e, t) {
|
|
137
|
+
let n = v.tokenize(e, t), r = y(e, w, n);
|
|
138
|
+
return [...n, ...r];
|
|
139
|
+
}
|
|
140
|
+
}), E = {
|
|
141
|
+
tsx: { aliases: ["typescriptreact"] },
|
|
142
|
+
ts: { aliases: ["typescript"] },
|
|
143
|
+
css: { aliases: ["scss"] },
|
|
144
|
+
shell: { aliases: [
|
|
145
|
+
"bash",
|
|
146
|
+
"sh",
|
|
147
|
+
"zsh",
|
|
148
|
+
"shellscript"
|
|
149
|
+
] },
|
|
150
|
+
json: { aliases: [] },
|
|
151
|
+
cpp: { aliases: [
|
|
152
|
+
"c++",
|
|
153
|
+
"cc",
|
|
154
|
+
"cxx",
|
|
155
|
+
"hpp"
|
|
156
|
+
] },
|
|
157
|
+
python: { aliases: ["py"] },
|
|
158
|
+
cmake: { aliases: [] }
|
|
159
|
+
}, D = Object.keys(E), O = [...D, ...Object.values(E).flatMap(({ aliases: e }) => e)];
|
|
160
|
+
function k(e) {
|
|
161
|
+
return O.includes(e);
|
|
162
|
+
}
|
|
163
|
+
function A(e, t) {
|
|
164
|
+
return e.aliases.includes(t);
|
|
165
|
+
}
|
|
166
|
+
function j(e) {
|
|
167
|
+
for (let [t, n] of Object.entries(E)) if (A(n, e)) return t;
|
|
168
|
+
return e;
|
|
29
169
|
}
|
|
30
|
-
var
|
|
31
|
-
shellscript: "shell",
|
|
32
|
-
scss: "css"
|
|
33
|
-
}, x = s({
|
|
170
|
+
var M = c({
|
|
34
171
|
languages: [
|
|
172
|
+
_,
|
|
173
|
+
g,
|
|
174
|
+
f,
|
|
35
175
|
h,
|
|
36
|
-
m,
|
|
37
|
-
u,
|
|
38
176
|
p,
|
|
39
|
-
|
|
40
|
-
|
|
177
|
+
C,
|
|
178
|
+
T,
|
|
179
|
+
x,
|
|
180
|
+
m
|
|
41
181
|
],
|
|
42
182
|
fallbackLanguage: "plaintext"
|
|
43
183
|
});
|
|
44
|
-
function
|
|
45
|
-
let n =
|
|
46
|
-
return
|
|
184
|
+
function N(e, t) {
|
|
185
|
+
let n = j(t), { tokens: r } = M.tokenize(e, { lang: n });
|
|
186
|
+
return u(d(r));
|
|
47
187
|
}
|
|
48
188
|
//#endregion
|
|
49
189
|
//#region src/integrations/code-highlight/code-highlight.tsx
|
|
50
|
-
var
|
|
51
|
-
Block: () =>
|
|
52
|
-
Inline: () =>
|
|
190
|
+
var P = /* @__PURE__ */ e({
|
|
191
|
+
Block: () => I,
|
|
192
|
+
Inline: () => L,
|
|
53
193
|
InlineLink: () => n
|
|
54
194
|
});
|
|
55
|
-
function
|
|
56
|
-
return
|
|
57
|
-
if (!(t == null || e === "")) return /* @__PURE__ */
|
|
195
|
+
function F(e, t) {
|
|
196
|
+
return o(() => {
|
|
197
|
+
if (!(t == null || e === "")) return /* @__PURE__ */ s("span", { dangerouslySetInnerHTML: { __html: N(e, t) } });
|
|
58
198
|
}, [e, t]);
|
|
59
199
|
}
|
|
60
|
-
function
|
|
61
|
-
let i =
|
|
62
|
-
return /* @__PURE__ */
|
|
200
|
+
function I({ language: e, children: t, ...n }) {
|
|
201
|
+
let i = F(t, e);
|
|
202
|
+
return a(/* @__PURE__ */ s(r, {
|
|
63
203
|
...n,
|
|
64
204
|
language: e,
|
|
65
|
-
highlighted: i,
|
|
66
205
|
children: t
|
|
67
|
-
});
|
|
206
|
+
}), { children: i ?? t });
|
|
68
207
|
}
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
let r =
|
|
72
|
-
return /* @__PURE__ */
|
|
208
|
+
I.displayName = "Code.Block";
|
|
209
|
+
function L({ language: e, children: t, ...n }) {
|
|
210
|
+
let r = F(t, e);
|
|
211
|
+
return a(/* @__PURE__ */ s(i, {
|
|
73
212
|
...n,
|
|
74
|
-
highlighted: r,
|
|
75
213
|
children: t
|
|
76
|
-
});
|
|
214
|
+
}), { children: r ?? t });
|
|
77
215
|
}
|
|
78
|
-
|
|
216
|
+
L.displayName = "Code.Inline";
|
|
79
217
|
//#endregion
|
|
80
218
|
//#region src/integrations/code-highlight/code-highlight.meta.ts
|
|
81
|
-
var
|
|
219
|
+
var R = {
|
|
82
220
|
name: "CodeHighlight",
|
|
83
221
|
category: t.display,
|
|
84
222
|
status: "experimental",
|
|
@@ -94,4 +232,4 @@ var D = {
|
|
|
94
232
|
}
|
|
95
233
|
};
|
|
96
234
|
//#endregion
|
|
97
|
-
export {
|
|
235
|
+
export { P as Code, D as SUPPORTED_LANGUAGES, R as codeHighlightMeta, k as isSupportedLanguage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "../meta-B8C51eyL.js";
|
|
2
|
-
import { C as n, S as r, a as i, b as a, c as o, d as s, g as c, h as l, i as u, l as d, n as f, o as p, p as m, r as h, t as g, v as _, w as v, x as y, y as b } from "../tabs-
|
|
2
|
+
import { C as n, S as r, a as i, b as a, c as o, d as s, g as c, h as l, i as u, l as d, n as f, o as p, p as m, r as h, t as g, v as _, w as v, x as y, y as b } from "../tabs-CVp_SgBl.js";
|
|
3
3
|
import { useId as x, useMemo as S, useState as C } from "react";
|
|
4
4
|
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
5
5
|
import { useDisplayOptions2d as D, useDisplayOptions3d as O } from "@imfusion/sdk-react";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type TokenEntry = {
|
|
2
|
+
name: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function collectTokenEntries(files: readonly string[]): TokenEntry[];
|
|
6
|
+
export declare function renderTokenIndex(tokens: readonly TokenEntry[]): string;
|
|
7
|
+
export declare function generateTokenIndex(): Promise<number>;
|