@kumix/ui 0.4.1 → 0.4.2
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 +37 -30
- package/dist/{cascader-types-DVT-znZ-.d.ts → cascader-types-zhnUQ4sP.d.ts} +11 -3
- package/dist/cascader-types-zhnUQ4sP.d.ts.map +1 -0
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -1
- package/dist/components/charts/donut-chart/context.d.ts.map +1 -1
- package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -1
- package/dist/components/charts/order-book.d.ts.map +1 -1
- package/dist/components/charts/treemap.d.ts.map +1 -1
- package/dist/components/charts/volume-profile.d.ts.map +1 -1
- package/dist/components/motion/action-swap.d.ts +1 -1
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/action-swap.js +43 -20
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/animated-badge.d.ts +1 -1
- package/dist/components/motion/animated-badge.d.ts.map +1 -1
- package/dist/components/motion/animated-badge.js +60 -101
- package/dist/components/motion/animated-badge.js.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-toast-stack.js +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +1 -1
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/bloom-menu.d.ts.map +1 -1
- package/dist/components/motion/bloom-menu.js +73 -8
- package/dist/components/motion/bloom-menu.js.map +1 -1
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bottom-sheet.js +6 -10
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
- package/dist/components/motion/bouncy-accordion.js +35 -22
- package/dist/components/motion/bouncy-accordion.js.map +1 -1
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/color-picker.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/date-range-picker.d.ts.map +1 -1
- package/dist/components/motion/drawer.d.ts +1 -1
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/drawer.js +10 -10
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/feedback-widget.js +4 -1
- package/dist/components/motion/feedback-widget.js.map +1 -1
- package/dist/components/motion/morphing-lightbox.d.ts.map +1 -1
- package/dist/components/motion/morphing-lightbox.js +1 -1
- package/dist/components/motion/morphing-modal.d.ts +6 -1
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.js +37 -5
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/otp-input.js +19 -11
- package/dist/components/motion/otp-input.js.map +1 -1
- package/dist/components/motion/popover-morph.d.ts +4 -3
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +47 -55
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.js +7 -1
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/prediction-market-card.js +1 -1
- package/dist/components/motion/prediction-market.js +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/radio.d.ts +5 -1
- package/dist/components/motion/radio.d.ts.map +1 -1
- package/dist/components/motion/radio.js +53 -5
- package/dist/components/motion/radio.js.map +1 -1
- package/dist/components/motion/select-morph.d.ts +1 -1
- package/dist/components/motion/select-morph.d.ts.map +1 -1
- package/dist/components/motion/select-morph.js +89 -21
- package/dist/components/motion/select-morph.js.map +1 -1
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +153 -135
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/shader-background.d.ts +3 -2
- package/dist/components/motion/shader-background.d.ts.map +1 -1
- package/dist/components/motion/shader-background.js +9 -3
- package/dist/components/motion/shader-background.js.map +1 -1
- package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
- package/dist/components/motion/shared-layout-bg.js +17 -3
- package/dist/components/motion/shared-layout-bg.js.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.js +61 -4
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/table/row-handle.js +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/tabs.d.ts +12 -3
- package/dist/components/motion/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +248 -26
- package/dist/components/motion/tabs.js.map +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/autocomplete.d.ts +1 -1
- package/dist/components/reui/autocomplete.d.ts.map +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/autocomplete.js.map +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-async.d.ts +21 -5
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-async.js +61 -34
- package/dist/components/reui/cascader/cascader-async.js.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-columns.js +5 -2
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
- package/dist/components/reui/cascader/cascader-context.d.ts +3 -1
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-context.js.map +1 -1
- package/dist/components/reui/cascader/cascader-i18n.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-item.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-lib.d.ts +34 -8
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader-lib.js +145 -29
- package/dist/components/reui/cascader/cascader-lib.js.map +1 -1
- package/dist/components/reui/cascader/cascader-nav.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-types.d.ts +1 -1
- package/dist/components/reui/cascader/cascader.d.ts +13 -8
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
- package/dist/components/reui/cascader/cascader.js +31 -16
- package/dist/components/reui/cascader/cascader.js.map +1 -1
- package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/reui/color-picker.js +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -0
- package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -0
- package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts +6 -8
- package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +7 -8
- package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-column-visibility.js +1 -0
- package/dist/components/reui/data-grid/data-grid-column-visibility.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -0
- package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -0
- package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +3 -2
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +2 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js +2 -1
- package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.d.ts +6 -11
- package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +22 -22
- package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
- package/dist/components/reui/data-grid/data-grid.d.ts +16 -1
- package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/reui/data-grid/data-grid.js +80 -22
- package/dist/components/reui/data-grid/data-grid.js.map +1 -1
- package/dist/components/reui/date-selector.d.ts.map +1 -1
- package/dist/components/reui/date-selector.js +21 -15
- package/dist/components/reui/date-selector.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +3 -5
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +2 -2
- package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar.js +34 -31
- package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
- package/dist/components/reui/file-type.d.ts +302 -6
- package/dist/components/reui/file-type.d.ts.map +1 -1
- package/dist/components/reui/file-type.js +416 -13
- package/dist/components/reui/file-type.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.d.ts +1 -1
- package/dist/components/reui/filters/filters-lib.d.ts +1 -1
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/gantt/gantt-nav.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +2 -2
- package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
- package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt.js +5 -2
- package/dist/components/reui/gantt/gantt.js.map +1 -1
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/phone-input.js +30 -27
- package/dist/components/reui/phone-input.js.map +1 -1
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/reui/time-picker.js +1 -1
- package/dist/components/ui/attachment.d.ts +2 -2
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/code-block.d.ts +29 -0
- package/dist/components/ui/code-block.d.ts.map +1 -0
- package/dist/components/ui/code-block.js +124 -0
- package/dist/components/ui/code-block.js.map +1 -0
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/trace.d.ts +21 -0
- package/dist/components/ui/trace.d.ts.map +1 -0
- package/dist/components/ui/trace.js +77 -0
- package/dist/components/ui/trace.js.map +1 -0
- package/dist/context-BYXeJQnz.d.ts.map +1 -1
- package/dist/{copy-menu-BXUh52bu.js → copy-menu-DOg9Jh-U.js} +2 -2
- package/dist/{copy-menu-BXUh52bu.js.map → copy-menu-DOg9Jh-U.js.map} +1 -1
- package/dist/hooks/use-focus-trap.d.ts +22 -0
- package/dist/hooks/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap.js +80 -0
- package/dist/hooks/use-focus-trap.js.map +1 -0
- package/dist/hooks/use-highlighted-code.d.ts +5 -0
- package/dist/hooks/use-highlighted-code.d.ts.map +1 -0
- package/dist/hooks/use-highlighted-code.js +128 -0
- package/dist/hooks/use-highlighted-code.js.map +1 -0
- package/dist/hooks/use-listbox.d.ts +29 -0
- package/dist/hooks/use-listbox.d.ts.map +1 -0
- package/dist/hooks/use-listbox.js +75 -0
- package/dist/hooks/use-listbox.js.map +1 -0
- package/dist/tooltip-C01qUgsW.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/cascader-types-DVT-znZ-.d.ts.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/hooks/use-highlighted-code.d.ts
|
|
3
|
+
export declare function useHighlightedCode(value: string, language: string): (string | number | bigint | boolean | React$1.JSX.Element[] | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<React$1.ReactNode> | null | undefined> | null | undefined)[];
|
|
4
|
+
//#endregion
|
|
5
|
+
//# sourceMappingURL=use-highlighted-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-highlighted-code.d.ts","names":["React"],"sources":["../../src/hooks/use-highlighted-code.ts"],"mappings":";;wBAMgB,mBAAmB,eAAe,yDAAgBA,QAAA,IAAA,YAAAA,QAAA,+BAAAA,QAAA,8BAAA,SAAAA,QAAA,aAAA,6CAAAA,QAAA,cAAAA,QAAA,+BAAAA,QAAA,8BAAA,SAAAA,QAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { createHighlighterCore } from "shiki/core";
|
|
4
|
+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/lib/highlighter.tsx
|
|
7
|
+
const languages = {
|
|
8
|
+
bash: () => import("shiki/langs/shellscript.mjs"),
|
|
9
|
+
css: () => import("shiki/langs/css.mjs"),
|
|
10
|
+
diff: () => import("shiki/langs/diff.mjs"),
|
|
11
|
+
html: () => import("shiki/langs/html.mjs"),
|
|
12
|
+
javascript: () => import("shiki/langs/javascript.mjs"),
|
|
13
|
+
json: () => import("shiki/langs/json.mjs"),
|
|
14
|
+
jsx: () => import("shiki/langs/jsx.mjs"),
|
|
15
|
+
markdown: () => import("shiki/langs/markdown.mjs"),
|
|
16
|
+
python: () => import("shiki/langs/python.mjs"),
|
|
17
|
+
sql: () => import("shiki/langs/sql.mjs"),
|
|
18
|
+
tsx: () => import("shiki/langs/tsx.mjs"),
|
|
19
|
+
typescript: () => import("shiki/langs/typescript.mjs"),
|
|
20
|
+
yaml: () => import("shiki/langs/yaml.mjs")
|
|
21
|
+
};
|
|
22
|
+
const aliases = {
|
|
23
|
+
js: "javascript",
|
|
24
|
+
md: "markdown",
|
|
25
|
+
py: "python",
|
|
26
|
+
sh: "bash",
|
|
27
|
+
shell: "bash",
|
|
28
|
+
shellscript: "bash",
|
|
29
|
+
ts: "typescript",
|
|
30
|
+
yml: "yaml",
|
|
31
|
+
zsh: "bash"
|
|
32
|
+
};
|
|
33
|
+
let highlighter;
|
|
34
|
+
function getHighlighter() {
|
|
35
|
+
highlighter ??= createHighlighterCore({
|
|
36
|
+
themes: [import("shiki/themes/github-light.mjs"), import("shiki/themes/github-dark.mjs")],
|
|
37
|
+
langs: [],
|
|
38
|
+
engine: createJavaScriptRegexEngine({ forgiving: true })
|
|
39
|
+
});
|
|
40
|
+
return highlighter;
|
|
41
|
+
}
|
|
42
|
+
function getLanguage(language) {
|
|
43
|
+
const name = language.toLowerCase();
|
|
44
|
+
if (name === "ansi") return name;
|
|
45
|
+
if (name in languages) return name;
|
|
46
|
+
return aliases[name] ?? null;
|
|
47
|
+
}
|
|
48
|
+
async function loadHighlighter(language) {
|
|
49
|
+
const lang = getLanguage(language);
|
|
50
|
+
if (!lang) return null;
|
|
51
|
+
const shiki = await getHighlighter();
|
|
52
|
+
if (lang !== "ansi" && !shiki.getLoadedLanguages().includes(lang)) await shiki.loadLanguage(languages[lang]);
|
|
53
|
+
return { highlight(code, state) {
|
|
54
|
+
const tokenize = (text) => shiki.codeToTokens(text, {
|
|
55
|
+
lang,
|
|
56
|
+
themes: {
|
|
57
|
+
light: "github-light",
|
|
58
|
+
dark: "github-dark"
|
|
59
|
+
},
|
|
60
|
+
defaultColor: false,
|
|
61
|
+
grammarState: state
|
|
62
|
+
}).tokens;
|
|
63
|
+
const tokens = lang === "ansi" ? code.split("\n").flatMap((line) => tokenize(line)) : tokenize(code);
|
|
64
|
+
return {
|
|
65
|
+
lines: tokens.map((line) => line.map((token, index) => /* @__PURE__ */ jsx("span", {
|
|
66
|
+
style: token.htmlStyle,
|
|
67
|
+
className: "text-(--shiki-light) dark:text-(--shiki-dark)",
|
|
68
|
+
children: token.content
|
|
69
|
+
}, index))),
|
|
70
|
+
state: shiki.getLastGrammarState(tokens)
|
|
71
|
+
};
|
|
72
|
+
} };
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/hooks/use-highlighted-code.ts
|
|
76
|
+
function useHighlightedCode(value, language) {
|
|
77
|
+
const code = value.endsWith("\n") ? value.slice(0, -1) : value;
|
|
78
|
+
const [loaded, setLoaded] = React$1.useState(null);
|
|
79
|
+
const highlighter = loaded?.language === language ? loaded.highlighter : null;
|
|
80
|
+
React$1.useEffect(() => {
|
|
81
|
+
let cancelled = false;
|
|
82
|
+
loadHighlighter(language).then((next) => {
|
|
83
|
+
if (!cancelled) setLoaded({
|
|
84
|
+
language,
|
|
85
|
+
highlighter: next
|
|
86
|
+
});
|
|
87
|
+
}).catch(() => {});
|
|
88
|
+
return () => {
|
|
89
|
+
cancelled = true;
|
|
90
|
+
};
|
|
91
|
+
}, [language]);
|
|
92
|
+
const [done, setDone] = React$1.useState({
|
|
93
|
+
highlighter: null,
|
|
94
|
+
text: "",
|
|
95
|
+
lines: []
|
|
96
|
+
});
|
|
97
|
+
let next = done;
|
|
98
|
+
if (next.highlighter !== highlighter || !code.startsWith(next.text)) next = {
|
|
99
|
+
highlighter,
|
|
100
|
+
text: "",
|
|
101
|
+
lines: []
|
|
102
|
+
};
|
|
103
|
+
const end = code.lastIndexOf("\n") + 1;
|
|
104
|
+
if (highlighter && end > next.text.length) {
|
|
105
|
+
const result = highlighter.highlight(code.slice(next.text.length, end - 1), next.state);
|
|
106
|
+
next = {
|
|
107
|
+
highlighter,
|
|
108
|
+
text: code.slice(0, end),
|
|
109
|
+
lines: [...next.lines, ...result.lines],
|
|
110
|
+
state: result.state
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
if (next !== done) setDone(next);
|
|
114
|
+
const tail = code.slice(end);
|
|
115
|
+
return React$1.useMemo(() => {
|
|
116
|
+
if (!highlighter) return code.split("\n");
|
|
117
|
+
return [...next.lines, highlighter.highlight(tail, next.state).lines[0]];
|
|
118
|
+
}, [
|
|
119
|
+
code,
|
|
120
|
+
highlighter,
|
|
121
|
+
next,
|
|
122
|
+
tail
|
|
123
|
+
]);
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { useHighlightedCode };
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=use-highlighted-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-highlighted-code.js","names":["React"],"sources":["../../src/lib/highlighter.tsx","../../src/hooks/use-highlighted-code.ts"],"sourcesContent":["import type * as React from \"react\";\nimport { createHighlighterCore, type GrammarState, type HighlighterCore } from \"shiki/core\";\nimport { createJavaScriptRegexEngine } from \"shiki/engine/javascript\";\n\n// Add the languages you need. Each one loads the first time it is used.\nconst languages = {\n bash: () => import(\"shiki/langs/shellscript.mjs\"),\n css: () => import(\"shiki/langs/css.mjs\"),\n diff: () => import(\"shiki/langs/diff.mjs\"),\n html: () => import(\"shiki/langs/html.mjs\"),\n javascript: () => import(\"shiki/langs/javascript.mjs\"),\n json: () => import(\"shiki/langs/json.mjs\"),\n jsx: () => import(\"shiki/langs/jsx.mjs\"),\n markdown: () => import(\"shiki/langs/markdown.mjs\"),\n python: () => import(\"shiki/langs/python.mjs\"),\n sql: () => import(\"shiki/langs/sql.mjs\"),\n tsx: () => import(\"shiki/langs/tsx.mjs\"),\n typescript: () => import(\"shiki/langs/typescript.mjs\"),\n yaml: () => import(\"shiki/langs/yaml.mjs\"),\n};\n\nconst aliases: Record<string, keyof typeof languages> = {\n js: \"javascript\",\n md: \"markdown\",\n py: \"python\",\n sh: \"bash\",\n shell: \"bash\",\n shellscript: \"bash\",\n ts: \"typescript\",\n yml: \"yaml\",\n zsh: \"bash\",\n};\n\nlet highlighter: Promise<HighlighterCore> | undefined;\n\nfunction getHighlighter() {\n highlighter ??= createHighlighterCore({\n themes: [import(\"shiki/themes/github-light.mjs\"), import(\"shiki/themes/github-dark.mjs\")],\n langs: [],\n engine: createJavaScriptRegexEngine({ forgiving: true }),\n });\n\n return highlighter;\n}\n\nfunction getLanguage(language: string) {\n const name = language.toLowerCase();\n\n if (name === \"ansi\") {\n return name;\n }\n\n if (name in languages) {\n return name as keyof typeof languages;\n }\n\n return aliases[name] ?? null;\n}\n\n// Loads a language and returns a highlighter for it, or null for a language\n// that is not listed.\nexport async function loadHighlighter(language: string) {\n const lang = getLanguage(language);\n\n if (!lang) {\n return null;\n }\n\n const shiki = await getHighlighter();\n\n if (lang !== \"ansi\" && !shiki.getLoadedLanguages().includes(lang)) {\n await shiki.loadLanguage(languages[lang]);\n }\n\n return {\n // Returns one React node per line, and the grammar state after the last\n // line. Pass that state back to continue where the code left off.\n highlight(code: string, state?: GrammarState) {\n const tokenize = (text: string) =>\n shiki.codeToTokens(text, {\n lang,\n themes: { light: \"github-light\", dark: \"github-dark\" },\n defaultColor: false,\n grammarState: state,\n }).tokens;\n\n // ANSI has no grammar state, so each line is tokenized on its own and\n // gets the same colors whether it arrives in one piece or streams.\n const tokens =\n lang === \"ansi\" ? code.split(\"\\n\").flatMap((line) => tokenize(line)) : tokenize(code);\n\n return {\n lines: tokens.map((line) =>\n line.map((token, index) => (\n <span\n key={index}\n style={token.htmlStyle as React.CSSProperties}\n className=\"text-(--shiki-light) dark:text-(--shiki-dark)\"\n >\n {token.content}\n </span>\n )),\n ),\n state: shiki.getLastGrammarState(tokens),\n };\n },\n };\n}\n\n// Returns one React node per line, or null for a language that is not listed.\nexport async function highlightCode(code: string, language: string) {\n const highlighter = await loadHighlighter(language);\n\n return highlighter ? highlighter.highlight(code).lines : null;\n}\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { loadHighlighter } from \"../lib/highlighter\";\n\nexport function useHighlightedCode(value: string, language: string) {\n // A trailing newline would render as an extra empty line.\n const code = value.endsWith(\"\\n\") ? value.slice(0, -1) : value;\n const [loaded, setLoaded] = React.useState<{\n language: string;\n highlighter: Awaited<ReturnType<typeof loadHighlighter>>;\n } | null>(null);\n const highlighter = loaded?.language === language ? loaded.highlighter : null;\n\n React.useEffect(() => {\n let cancelled = false;\n\n loadHighlighter(language)\n .then((next) => {\n if (!cancelled) {\n setLoaded({ language, highlighter: next });\n }\n })\n .catch(() => {});\n\n return () => {\n cancelled = true;\n };\n }, [language]);\n\n // The complete lines, highlighted. While the code streams, only the new\n // lines are tokenized, starting from the grammar state of the last one.\n const [done, setDone] = React.useState<{\n highlighter: typeof highlighter;\n text: string;\n lines: React.ReactNode[];\n state?: Parameters<NonNullable<typeof highlighter>[\"highlight\"]>[1];\n }>({ highlighter: null, text: \"\", lines: [] });\n\n let next = done;\n\n if (next.highlighter !== highlighter || !code.startsWith(next.text)) {\n next = { highlighter, text: \"\", lines: [] };\n }\n\n const end = code.lastIndexOf(\"\\n\") + 1;\n\n if (highlighter && end > next.text.length) {\n const result = highlighter.highlight(code.slice(next.text.length, end - 1), next.state);\n\n next = {\n highlighter,\n text: code.slice(0, end),\n lines: [...next.lines, ...result.lines],\n state: result.state,\n };\n }\n\n if (next !== done) {\n setDone(next);\n }\n\n // The last line is still being written, so it is tokenized on every render.\n const tail = code.slice(end);\n\n return React.useMemo(() => {\n if (!highlighter) {\n return code.split(\"\\n\");\n }\n\n return [...next.lines, highlighter.highlight(tail, next.state).lines[0]];\n }, [code, highlighter, next, tail]);\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { KeyboardEvent, RefObject } from "react";
|
|
2
|
+
//#region src/hooks/use-listbox.d.ts
|
|
3
|
+
export interface ListboxRow {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Keyboard model for a popup listbox whose options are focusable buttons.
|
|
10
|
+
*
|
|
11
|
+
* The active option is resolved during render through `useRowCursor`, so the
|
|
12
|
+
* roving `tabIndex` and the next key press always agree with what is on
|
|
13
|
+
* screen. Opening starts on the selected option, or the first enabled one.
|
|
14
|
+
* Arrow keys, Home and End move between enabled options, and printable
|
|
15
|
+
* characters jump to the next option whose label starts with what was typed.
|
|
16
|
+
* DOM focus follows the active option while the list is open; each option
|
|
17
|
+
* carries its id in `data-listbox-id` so the list can find it.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useListbox({ open, rows, selected, list }: {
|
|
20
|
+
open: boolean;
|
|
21
|
+
rows: readonly ListboxRow[];
|
|
22
|
+
selected: string | undefined;
|
|
23
|
+
list: RefObject<HTMLElement | null>;
|
|
24
|
+
}): {
|
|
25
|
+
activeId: string;
|
|
26
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=use-listbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-listbox.d.ts","names":[],"sources":["../../src/hooks/use-listbox.ts"],"mappings":";;iBAOiB;EACf;EACA;EACA;;;;;;;;;;;;;wBAiBc,aACd,MACA,MACA,UACA;EAEA;EACA,eAAe;EACf;EACA,MAAM,UAAU;;;EAyBU,YAAA,OAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useOnOpen } from "./use-on-open.js";
|
|
3
|
+
import { useRowCursor } from "./use-row-cursor.js";
|
|
4
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
5
|
+
//#region src/hooks/use-listbox.ts
|
|
6
|
+
const TYPEAHEAD_MS = 500;
|
|
7
|
+
/**
|
|
8
|
+
* Keyboard model for a popup listbox whose options are focusable buttons.
|
|
9
|
+
*
|
|
10
|
+
* The active option is resolved during render through `useRowCursor`, so the
|
|
11
|
+
* roving `tabIndex` and the next key press always agree with what is on
|
|
12
|
+
* screen. Opening starts on the selected option, or the first enabled one.
|
|
13
|
+
* Arrow keys, Home and End move between enabled options, and printable
|
|
14
|
+
* characters jump to the next option whose label starts with what was typed.
|
|
15
|
+
* DOM focus follows the active option while the list is open; each option
|
|
16
|
+
* carries its id in `data-listbox-id` so the list can find it.
|
|
17
|
+
*/
|
|
18
|
+
function useListbox({ open, rows, selected, list }) {
|
|
19
|
+
const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);
|
|
20
|
+
const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, "");
|
|
21
|
+
useOnOpen(open, () => moveTo(enabled.some((row) => row.id === selected) ? selected ?? null : null));
|
|
22
|
+
const activeId = enabled[activeIndex]?.id;
|
|
23
|
+
const typed = useRef({
|
|
24
|
+
text: "",
|
|
25
|
+
at: 0
|
|
26
|
+
});
|
|
27
|
+
const openedOnMount = useRef(open);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!open) openedOnMount.current = false;
|
|
30
|
+
}, [open]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!open || activeId === void 0) return;
|
|
33
|
+
if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;
|
|
34
|
+
Array.from(list.current?.querySelectorAll("[data-listbox-id]") ?? []).find((element) => element.dataset.listboxId === activeId)?.focus({ preventScroll: false });
|
|
35
|
+
}, [
|
|
36
|
+
open,
|
|
37
|
+
activeId,
|
|
38
|
+
list
|
|
39
|
+
]);
|
|
40
|
+
const onKeyDown = (event) => {
|
|
41
|
+
const { key } = event;
|
|
42
|
+
if (key === "ArrowDown" || key === "ArrowUp") {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
moveActive(key === "ArrowDown" ? 1 : -1);
|
|
45
|
+
} else if (key === "Home" || key === "End") {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
const row = key === "Home" ? enabled[0] : enabled[enabled.length - 1];
|
|
48
|
+
if (row) moveTo(row.id);
|
|
49
|
+
} else if (key.length === 1 && key !== " " && !event.ctrlKey && !event.metaKey && !event.altKey) {
|
|
50
|
+
const now = Date.now();
|
|
51
|
+
const char = key.toLowerCase();
|
|
52
|
+
const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;
|
|
53
|
+
typed.current = {
|
|
54
|
+
text,
|
|
55
|
+
at: now
|
|
56
|
+
};
|
|
57
|
+
const from = text.length === 1 ? activeIndex + 1 : activeIndex;
|
|
58
|
+
for (let step = 0; step < enabled.length; step++) {
|
|
59
|
+
const row = enabled[(from + step) % enabled.length];
|
|
60
|
+
if (row.label.toLowerCase().startsWith(text)) {
|
|
61
|
+
moveTo(row.id);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
activeId,
|
|
69
|
+
onKeyDown
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { useListbox };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=use-listbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-listbox.js","names":[],"sources":["../../src/hooks/use-listbox.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type RefObject, useEffect, useMemo, useRef } from \"react\";\n\nimport { useOnOpen } from \"./use-on-open\";\nimport { useRowCursor } from \"./use-row-cursor\";\n\nexport interface ListboxRow {\n id: string;\n label: string;\n disabled?: boolean;\n}\n\n// How long typed characters keep building one typeahead query.\nconst TYPEAHEAD_MS = 500;\n\n/**\n * Keyboard model for a popup listbox whose options are focusable buttons.\n *\n * The active option is resolved during render through `useRowCursor`, so the\n * roving `tabIndex` and the next key press always agree with what is on\n * screen. Opening starts on the selected option, or the first enabled one.\n * Arrow keys, Home and End move between enabled options, and printable\n * characters jump to the next option whose label starts with what was typed.\n * DOM focus follows the active option while the list is open; each option\n * carries its id in `data-listbox-id` so the list can find it.\n */\nexport function useListbox({\n open,\n rows,\n selected,\n list,\n}: {\n open: boolean;\n rows: readonly ListboxRow[];\n selected: string | undefined;\n list: RefObject<HTMLElement | null>;\n}) {\n const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);\n const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, \"\");\n useOnOpen(open, () =>\n moveTo(enabled.some((row) => row.id === selected) ? (selected ?? null) : null),\n );\n const activeId = enabled[activeIndex]?.id;\n const typed = useRef({ text: \"\", at: 0 });\n // A list rendered open does not take focus from the page on mount; focus\n // follows only once it has been opened, or once focus is already inside.\n const openedOnMount = useRef(open);\n useEffect(() => {\n if (!open) openedOnMount.current = false;\n }, [open]);\n\n useEffect(() => {\n if (!open || activeId === undefined) return;\n if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;\n const option = Array.from(\n list.current?.querySelectorAll<HTMLElement>(\"[data-listbox-id]\") ?? [],\n ).find((element) => element.dataset.listboxId === activeId);\n option?.focus({ preventScroll: false });\n }, [open, activeId, list]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === \"ArrowDown\" || key === \"ArrowUp\") {\n event.preventDefault();\n moveActive(key === \"ArrowDown\" ? 1 : -1);\n } else if (key === \"Home\" || key === \"End\") {\n event.preventDefault();\n const row = key === \"Home\" ? enabled[0] : enabled[enabled.length - 1];\n if (row) moveTo(row.id);\n } else if (\n key.length === 1 &&\n key !== \" \" &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n const now = Date.now();\n const char = key.toLowerCase();\n const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;\n typed.current = { text, at: now };\n // A repeated single letter cycles through the options that start with it.\n const from = text.length === 1 ? activeIndex + 1 : activeIndex;\n for (let step = 0; step < enabled.length; step++) {\n const row = enabled[(from + step) % enabled.length];\n if (row.label.toLowerCase().startsWith(text)) {\n moveTo(row.id);\n break;\n }\n }\n }\n };\n\n return { activeId, onKeyDown };\n}\n"],"mappings":";;;;;AAcA,MAAM,eAAe;;;;;;;;;;;;AAarB,SAAgB,WAAW,EACzB,MACA,MACA,UACA,QAMC;CACD,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC;CACzE,MAAM,EAAE,aAAa,QAAQ,eAAe,aAAa,SAAS,EAAE;CACpE,UAAU,YACR,OAAO,QAAQ,MAAM,QAAQ,IAAI,OAAO,QAAQ,IAAK,YAAY,OAAQ,IAAI,CAC/E;CACA,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,QAAQ,OAAO;EAAE,MAAM;EAAI,IAAI;CAAE,CAAC;CAGxC,MAAM,gBAAgB,OAAO,IAAI;CACjC,gBAAgB;EACd,IAAI,CAAC,MAAM,cAAc,UAAU;CACrC,GAAG,CAAC,IAAI,CAAC;CAET,gBAAgB;EACd,IAAI,CAAC,QAAQ,aAAa,KAAA,GAAW;EACrC,IAAI,cAAc,WAAW,CAAC,KAAK,SAAS,SAAS,SAAS,aAAa,GAAG;EAI9E,MAHqB,KACnB,KAAK,SAAS,iBAA8B,mBAAmB,KAAK,CAAC,CACvE,CAAC,CAAC,MAAM,YAAY,QAAQ,QAAQ,cAAc,QAC7C,CAAC,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;CACxC,GAAG;EAAC;EAAM;EAAU;CAAI,CAAC;CAEzB,MAAM,aAAa,UAAyB;EAC1C,MAAM,EAAE,QAAQ;EAChB,IAAI,QAAQ,eAAe,QAAQ,WAAW;GAC5C,MAAM,eAAe;GACrB,WAAW,QAAQ,cAAc,IAAI,EAAE;EACzC,OAAO,IAAI,QAAQ,UAAU,QAAQ,OAAO;GAC1C,MAAM,eAAe;GACrB,MAAM,MAAM,QAAQ,SAAS,QAAQ,KAAK,QAAQ,QAAQ,SAAS;GACnE,IAAI,KAAK,OAAO,IAAI,EAAE;EACxB,OAAO,IACL,IAAI,WAAW,KACf,QAAQ,OACR,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM,QACP;GACA,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,IAAI,YAAY;GAC7B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK,eAAe,MAAM,QAAQ,OAAO,OAAO;GACjF,MAAM,UAAU;IAAE;IAAM,IAAI;GAAI;GAEhC,MAAM,OAAO,KAAK,WAAW,IAAI,cAAc,IAAI;GACnD,KAAK,IAAI,OAAO,GAAG,OAAO,QAAQ,QAAQ,QAAQ;IAChD,MAAM,MAAM,SAAS,OAAO,QAAQ,QAAQ;IAC5C,IAAI,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW,IAAI,GAAG;KAC5C,OAAO,IAAI,EAAE;KACb;IACF;GACF;EACF;CACF;CAEA,OAAO;EAAE;EAAU;CAAU;AAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-C01qUgsW.d.ts","names":["_$__types0.PriceHistoryPoint","_$__types0.PriceTarget"],"sources":["../src/components/charts/price-target-fan/types.ts","../src/components/charts/price-target-fan/context.ts","../src/components/charts/price-target-fan/tooltip.tsx"],"mappings":";;UAEiB;EACf;EACA;EACA;;EAEA;;UAGe;EACf;EACA;;KAGU;EACN;EAAiB;;EACjB;EAAgB;;UAEL;;EAEf;;EAEA;;EAEA,UAAU,aAAa,aAAa;;EAEpC;IAAU;IAAgB;IAAc;;;EAExC,UAAU;EACV,WAAW;EACX,SAAS;EACT,gBAAgB;EAChB,kBAAkB,QAAQ;EAC1B;;;;iBCyNc;;;;;;;EArNW,YAAA,MAAA;;;EAgBD,UAAA;EAEC,WAAA;;
|
|
1
|
+
{"version":3,"file":"tooltip-C01qUgsW.d.ts","names":["_$__types0.PriceHistoryPoint","_$__types0.PriceTarget"],"sources":["../src/components/charts/price-target-fan/types.ts","../src/components/charts/price-target-fan/context.ts","../src/components/charts/price-target-fan/tooltip.tsx"],"mappings":";;UAEiB;EACf;EACA;EACA;;EAEA;;UAGe;EACf;EACA;;KAGU;EACN;EAAiB;;EACjB;EAAgB;;UAEL;;EAEf;;EAEA;;EAEA,UAAU,aAAa,aAAa;;EAEpC;IAAU;IAAgB;IAAc;;;EAExC,UAAU;EACV,WAAW;EACX,SAAS;EACT,gBAAgB;EAChB,kBAAkB,QAAQ;EAC1B;;;;iBCyNc;;;;;;;EArNW,YAAA,MAAA;;;EAgBD,UAAA;EAEC,WAAA;;E,SAlBAA;;;;;;;;;EA0DnB,IAAA;EAGU,MAAA;EACA,MAAA;;IAQC,KAAA;;;;;;;;;;;;;;;;;;;;;;;;IA2EN;MAAE;MAAe;MAAe;;;;;;;;;;;;;;;;;;;;;;;;;;EA1DxB,SAAA,GAAA,MAAM;;;;iBCpHX,wBACd,UACA;EAEA,WACI,cACE,MAAM,YAAY,kBAAkB,mCAAmC;EAC7E;oBACD,IAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumix/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Kumix React UI kit: shadcn/ui (Base UI, base-nova) + ReUI components, Tailwind tokens, and hooks. Per-file ESM exports.",
|
|
5
5
|
"author": "Kumix Labs <hai@kumix.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"@dnd-kit/sortable": "^10.0.0",
|
|
74
74
|
"@dnd-kit/utilities": "^3.2.2",
|
|
75
75
|
"@floating-ui/dom": "^1.8.0",
|
|
76
|
-
"@headless-tree/core": "^1.
|
|
76
|
+
"@headless-tree/core": "^1.8.0",
|
|
77
77
|
"@kumix/tsconfig": "^0.1.0",
|
|
78
78
|
"@kumix/utils": "^0.3.0",
|
|
79
79
|
"@paper-design/shaders-react": "^0.0.81",
|
|
80
80
|
"@shadcn/react": "^0.3.1",
|
|
81
81
|
"@tanstack/react-table": "^9.3.1",
|
|
82
|
-
"@tanstack/react-virtual": "^3.14.
|
|
82
|
+
"@tanstack/react-virtual": "^3.14.21",
|
|
83
83
|
"@types/react": "^19.3.0",
|
|
84
84
|
"class-variance-authority": "^0.7.1",
|
|
85
85
|
"clsx": "^2.1.1",
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
"date-fns": "^4.4.0",
|
|
88
88
|
"embla-carousel-react": "^8.6.0",
|
|
89
89
|
"input-otp": "^1.5.0",
|
|
90
|
-
"lenis": "^1.3.
|
|
91
|
-
"lucide-react": "^1.
|
|
92
|
-
"motion": "^14.
|
|
90
|
+
"lenis": "^1.3.27",
|
|
91
|
+
"lucide-react": "^1.59.0",
|
|
92
|
+
"motion": "^14.4.0",
|
|
93
93
|
"next-themes": "^0.4.6",
|
|
94
|
-
"react": "^19.3.
|
|
94
|
+
"react": "^19.3.1",
|
|
95
95
|
"react-day-picker": "^10.0.2",
|
|
96
96
|
"react-phone-number-input": "^3.4.18",
|
|
97
|
-
"react-resizable-panels": "^4.14.
|
|
97
|
+
"react-resizable-panels": "^4.14.7",
|
|
98
98
|
"recharts": "3.10.1",
|
|
99
99
|
"shiki": "^4.5.0",
|
|
100
100
|
"tailwind-merge": "^3.7.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cascader-types-DVT-znZ-.d.ts","names":["React"],"sources":["../src/components/reui/cascader/cascader-types.tsx"],"mappings":";;;;;;;UASiB,aAAa;;EAE5B;EACA;EACA,OAAOA,QAAM;EACb;EACA,WAAW,aAAa;;EAExB;;EAEA;;EAEA;EACA;;;;;EAKA;EACA,OAAO;;;;;;UAOQ;;EAEf;EACA,OAAOA,QAAM;EACb,OAAOA,QAAM;EACb;;EAEA;;EAEA,QAAQ;;EAER;;;KAIU;KAEA;;;;;;;KAQA,mBAAmB,kCAAkC,MAAM,aAAa;KAExE;KAEA;KAEA;;UAGK,sBAAsB;;EAErC,MAAM,aAAa;;EAEnB,MAAM,aAAa;EACnB,OAAO,aAAa;EACpB,QAAQ;;;UAIO,cAAc;EAC7B,SAAS,YAAY,aAAa;;EAElC,YAAY,YAAY,aAAa;EACrC,UAAU;;EAEV,SAAS;;EAET,OAAO,aAAa;;EAEpB,KAAK,aAAa;;UAGH,iBAAiB;EAChC,MAAM,aAAa;EACnB;;EAEA;EACA;;EAEA;;EAEA;;;KAIU,oBAAoB;EAC1B;EAAc,MAAM,aAAa;;EACjC;EAAkB,QAAQ,aAAa;;;;;;;;UAQ5B;EACf;EACA;EACA;;EAEA;;;KAIU;;UAGK;;EAEf,QAAQ;EACR;EACA,SAAS;;;UAIM,mBAAmB;EAClC,OAAO,aAAa;EACpB;;EAEA;;;UAIe;EACf,QAAQ;;;EAGR;;;;;;;UAQe;;EAEf,mBAAmB;EACnB;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA,gBAAgB;EAChB;EACA;EACA,aAAa;;EAEb;;EAEA;EACA,YAAY;;EAEZ;;EAEA;;EAEA;EACA;EACA;EACA;EACA;;EAEA,eAAe,MAAM,cAAc;EACnC,mBAAmB;EACnB,uBAAuB,eAAe;EACtC,wBAAwB;EACxB,oBAAoB,qBAAqB,eAAe;EACxD,sBAAsB;EACtB,yBAAyB;;EAEzB,sBAAsB,eAAe,eAAe;EACpD"}
|