@adia-ai/web-components 0.0.12 → 0.0.14
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 +10 -10
- package/components/card/card.css +29 -0
- package/components/chart/chart.a2ui.json +43 -6
- package/components/chart/chart.css +224 -0
- package/components/chart/chart.js +1049 -27
- package/components/chart/chart.yaml +62 -6
- package/components/chart-legend/chart-legend.a2ui.json +139 -0
- package/components/chart-legend/chart-legend.css +124 -0
- package/components/chart-legend/chart-legend.js +185 -0
- package/components/chart-legend/chart-legend.yaml +133 -0
- package/components/code/code-editor.js +161 -0
- package/components/code/code.a2ui.json +59 -0
- package/components/code/code.css +78 -2
- package/components/code/code.js +147 -9
- package/components/code/code.yaml +42 -0
- package/components/heatmap/heatmap.js +62 -13
- package/components/index.js +1 -0
- package/components/select/select.css +1 -1
- package/components/slider/slider.js +8 -3
- package/components/stat/stat.a2ui.json +3 -0
- package/components/stat/stat.css +32 -0
- package/components/stat/stat.yaml +6 -0
- package/components/tooltip/tooltip.a2ui.json +29 -4
- package/components/tooltip/tooltip.css +111 -0
- package/components/tooltip/tooltip.js +200 -12
- package/components/tooltip/tooltip.yaml +38 -4
- package/core/icons.js +35 -1
- package/core/index.js +25 -0
- package/core/provider.js +1 -1
- package/index.css +26 -0
- package/index.js +18 -0
- package/package.json +14 -6
- package/patterns/adia-chat/adia-chat.js +1 -1
- package/styles/colors/semantics.css +6 -5
- package/styles/{styles.css → components.css} +9 -111
- package/styles/resets.css +116 -0
- package/styles/tokens.css +8 -2
- package/core/_cm-core.js +0 -38
- package/core/_cm-theme.js +0 -58
- package/core/_lang-css.js +0 -2
- package/core/_lang-html.js +0 -2
- package/core/_lang-javascript.js +0 -2
- package/core/_lang-json.js +0 -2
- package/core/_lang-markdown.js +0 -2
- package/core/_lang-yaml.js +0 -2
- package/core/code-editor-bundle.js +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* code-editor-bundle — the single entry point `<code-ui>` imports when
|
|
3
|
-
* it needs CodeMirror 6. Re-exports core runtime + AdiaUI theme, and
|
|
4
|
-
* exposes a lazy-load map of language packs (one dynamic import per
|
|
5
|
-
* language, split into its own chunk by esbuild in production).
|
|
6
|
-
*
|
|
7
|
-
* Vite dev: imports resolve against node_modules naturally.
|
|
8
|
-
* Production: scripts/build-site.mjs runs esbuild with
|
|
9
|
-
* splitting: true, producing `code-editor-core.js` + one
|
|
10
|
-
* `code-editor-lang-<lang>.js` per language.
|
|
11
|
-
*
|
|
12
|
-
* Spec: docs/specs/code-editor.md §4 (architecture), §7 (bundling).
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
EditorState,
|
|
17
|
-
EditorSelection,
|
|
18
|
-
Compartment,
|
|
19
|
-
StateEffect,
|
|
20
|
-
EditorView,
|
|
21
|
-
lineNumbers,
|
|
22
|
-
highlightActiveLine,
|
|
23
|
-
highlightActiveLineGutter,
|
|
24
|
-
placeholder,
|
|
25
|
-
drawSelection,
|
|
26
|
-
keymap,
|
|
27
|
-
defaultKeymap,
|
|
28
|
-
history,
|
|
29
|
-
historyKeymap,
|
|
30
|
-
indentWithTab,
|
|
31
|
-
HighlightStyle,
|
|
32
|
-
syntaxHighlighting,
|
|
33
|
-
LanguageSupport,
|
|
34
|
-
defaultHighlightStyle,
|
|
35
|
-
} from './_cm-core.js';
|
|
36
|
-
|
|
37
|
-
export { adiaBaseTheme, adiaHighlightStyle } from './_cm-theme.js';
|
|
38
|
-
|
|
39
|
-
/** Dynamic-import map — one lazy-loaded chunk per supported language. */
|
|
40
|
-
export const languages = {
|
|
41
|
-
json: () => import('./_lang-json.js'),
|
|
42
|
-
html: () => import('./_lang-html.js'),
|
|
43
|
-
javascript: () => import('./_lang-javascript.js'),
|
|
44
|
-
css: () => import('./_lang-css.js'),
|
|
45
|
-
markdown: () => import('./_lang-markdown.js'),
|
|
46
|
-
yaml: () => import('./_lang-yaml.js'),
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/** 10-second timeout for any single dynamic import. Matches spec §7.4. */
|
|
50
|
-
export const LOAD_TIMEOUT_MS = 10_000;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Wrap a dynamic-import promise with a timeout. Rejects on timeout;
|
|
54
|
-
* propagates the original error on fetch failure.
|
|
55
|
-
*/
|
|
56
|
-
export function importWithTimeout(loader, label) {
|
|
57
|
-
return Promise.race([
|
|
58
|
-
loader(),
|
|
59
|
-
new Promise((_, reject) =>
|
|
60
|
-
setTimeout(() => reject(new Error(`code-editor: ${label} load timed out after ${LOAD_TIMEOUT_MS}ms`)), LOAD_TIMEOUT_MS),
|
|
61
|
-
),
|
|
62
|
-
]);
|
|
63
|
-
}
|