@evinvest/uikit 0.27.0 → 0.29.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.
Files changed (40) hide show
  1. package/README.md +13 -13
  2. package/dist/components/alert-dialog.js +1 -2
  3. package/dist/components/alert-dialog.js.map +1 -1
  4. package/dist/components/auth-wall.js +42 -0
  5. package/dist/components/auth-wall.js.map +1 -0
  6. package/dist/components/checkbox.js +2 -0
  7. package/dist/components/checkbox.js.map +1 -1
  8. package/dist/components/command.js +55 -9
  9. package/dist/components/command.js.map +1 -1
  10. package/dist/components/dialog.js +29 -6
  11. package/dist/components/dialog.js.map +1 -1
  12. package/dist/components/field.js +3 -8
  13. package/dist/components/field.js.map +1 -1
  14. package/dist/components/input.js +2 -0
  15. package/dist/components/input.js.map +1 -1
  16. package/dist/components/native-select.js +2 -0
  17. package/dist/components/native-select.js.map +1 -1
  18. package/dist/components/select.js +2 -0
  19. package/dist/components/select.js.map +1 -1
  20. package/dist/components/sheet.js +1 -2
  21. package/dist/components/sheet.js.map +1 -1
  22. package/dist/components/switch.js +2 -0
  23. package/dist/components/switch.js.map +1 -1
  24. package/dist/components/textarea.js +2 -0
  25. package/dist/components/textarea.js.map +1 -1
  26. package/dist/generated/command.js +2 -2
  27. package/dist/generated/command.js.map +1 -1
  28. package/dist/index.d.ts +14 -57
  29. package/dist/index.js +1 -2
  30. package/dist/primitives/labelable.js +24 -0
  31. package/dist/primitives/labelable.js.map +1 -0
  32. package/package.json +1 -1
  33. package/dist/components/chart.js +0 -151
  34. package/dist/components/chart.js.map +0 -1
  35. package/dist/components/resizable.js +0 -193
  36. package/dist/components/resizable.js.map +0 -1
  37. package/dist/generated/chart.js +0 -9
  38. package/dist/generated/chart.js.map +0 -1
  39. package/dist/generated/resizable.js +0 -11
  40. package/dist/generated/resizable.js.map +0 -1
@@ -0,0 +1,24 @@
1
+ const LABELABLE = /* @__PURE__ */ Symbol.for("@evinvest/uikit/labelable@1");
2
+ const LAZY = /* @__PURE__ */ Symbol.for("react.lazy");
3
+ function markLabelable(component) {
4
+ Object.defineProperty(component, LABELABLE, { value: true });
5
+ }
6
+ function isLabelable(type) {
7
+ const resolved = unwrapLazy(type);
8
+ return (typeof resolved === "function" || typeof resolved === "object" && resolved !== null) && Reflect.get(resolved, LABELABLE) === true;
9
+ }
10
+ function unwrapLazy(type) {
11
+ if (typeof type !== "object" || type === null || Reflect.get(type, "$$typeof") !== LAZY) return type;
12
+ const init = Reflect.get(type, "_init");
13
+ if (typeof init !== "function") return void 0;
14
+ try {
15
+ return Reflect.apply(init, void 0, [Reflect.get(type, "_payload")]);
16
+ } catch {
17
+ return void 0;
18
+ }
19
+ }
20
+ export {
21
+ isLabelable,
22
+ markLabelable
23
+ };
24
+ //# sourceMappingURL=labelable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/primitives/labelable.ts"],"sourcesContent":["// How `FieldLabel` tells a kit control from any other component without\n// importing it: each control marks itself in its own module. Recognising them\n// by identity meant `field.tsx` imported every control, so a page with one\n// `Field` and an `Input` still shipped the whole `Select` (floating, portal,\n// focus scope, listbox — ~4 KB gz).\n//\n// `Symbol.for`, not `Symbol`: two copies of the kit in one app (a hoisting\n// accident) still read each other's marks.\nconst LABELABLE = Symbol.for(\"@evinvest/uikit/labelable@1\");\nconst LAZY = Symbol.for(\"react.lazy\");\n\n/** Marks a component that renders one labelable element and takes its `Field`'s id. */\nexport function markLabelable(component: object): void {\n Object.defineProperty(component, LABELABLE, { value: true });\n}\n\n/** Whether an element `type` is a component marked with `markLabelable`. */\nexport function isLabelable(type: unknown): boolean {\n const resolved = unwrapLazy(type);\n return (\n (typeof resolved === \"function\" || (typeof resolved === \"object\" && resolved !== null)) &&\n Reflect.get(resolved, LABELABLE) === true\n );\n}\n\n// An element a Server Component rendered reaches the client with a lazy type:\n// the Flight client wraps every client reference in a `React.lazy`-shaped\n// object, so the control's own function (and its mark) sits behind it. The\n// mark cannot travel through the reference instead — the server holds only the\n// module id, never the module. So resolve the lazy the way the reconciler\n// does, by calling its `_init` on its `_payload`: once the module has loaded\n// that returns the export synchronously. Until then it throws (a thenable while\n// pending, the error if loading failed); that is answered \"not a control\",\n// the pre-mark behaviour, and the reconciler meets the same throw itself when\n// it renders the element.\nfunction unwrapLazy(type: unknown): unknown {\n if (typeof type !== \"object\" || type === null || Reflect.get(type, \"$$typeof\") !== LAZY) return type;\n const init: unknown = Reflect.get(type, \"_init\");\n if (typeof init !== \"function\") return undefined;\n try {\n return Reflect.apply(init, undefined, [Reflect.get(type, \"_payload\")]);\n } catch {\n return undefined;\n }\n}\n"],"mappings":"AAQA,MAAM,YAAY,uBAAO,IAAI,6BAA6B;AAC1D,MAAM,OAAO,uBAAO,IAAI,YAAY;AAG7B,SAAS,cAAc,WAAyB;AACrD,SAAO,eAAe,WAAW,WAAW,EAAE,OAAO,KAAK,CAAC;AAC7D;AAGO,SAAS,YAAY,MAAwB;AAClD,QAAM,WAAW,WAAW,IAAI;AAChC,UACG,OAAO,aAAa,cAAe,OAAO,aAAa,YAAY,aAAa,SACjF,QAAQ,IAAI,UAAU,SAAS,MAAM;AAEzC;AAYA,SAAS,WAAW,MAAwB;AAC1C,MAAI,OAAO,SAAS,YAAY,SAAS,QAAQ,QAAQ,IAAI,MAAM,UAAU,MAAM,KAAM,QAAO;AAChG,QAAM,OAAgB,QAAQ,IAAI,MAAM,OAAO;AAC/C,MAAI,OAAO,SAAS,WAAY,QAAO;AACvC,MAAI;AACF,WAAO,QAAQ,MAAM,MAAM,QAAW,CAAC,QAAQ,IAAI,MAAM,UAAU,CAAC,CAAC;AAAA,EACvE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evinvest/uikit",
3
- "version": "0.27.0",
3
+ "version": "0.29.2",
4
4
  "description": "Dep-light React UI kit: shadcn-semantics components with zero @radix-ui / cva, mirroring the ev_lib::uikit Rust feature. Ships the shared design tokens.",
5
5
  "license": "BlueOak-1.0.0",
6
6
  "publishConfig": {
@@ -1,151 +0,0 @@
1
- "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/cn.js";
5
- import { CHART_CONTAINER, CHART_LEGEND, CHART_TOOLTIP } from "../generated/chart.js";
6
- const ChartContext = React.createContext(null);
7
- function useChart() {
8
- const context = React.useContext(ChartContext);
9
- if (!context) {
10
- throw new Error("useChart must be used within a <ChartContainer />");
11
- }
12
- return context;
13
- }
14
- function ChartContainer({
15
- id,
16
- className,
17
- children,
18
- config,
19
- ...props
20
- }) {
21
- const uniqueId = React.useId();
22
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
23
- return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
24
- "div",
25
- {
26
- "data-slot": "chart",
27
- "data-chart": chartId,
28
- className: cn(CHART_CONTAINER, className),
29
- ...props,
30
- children: [
31
- /* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
32
- children
33
- ]
34
- }
35
- ) });
36
- }
37
- const ChartStyle = ({ id, config }) => {
38
- const colorConfig = Object.entries(config).filter(([, c]) => c.color);
39
- if (!colorConfig.length) {
40
- return null;
41
- }
42
- return /* @__PURE__ */ jsx(
43
- "style",
44
- {
45
- dangerouslySetInnerHTML: {
46
- __html: `[data-chart=${id}] {
47
- ${colorConfig.map(([key, itemConfig]) => ` --color-${key}: ${itemConfig.color};`).join("\n")}
48
- }`
49
- }
50
- }
51
- );
52
- };
53
- const ChartTooltip = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
54
- function ChartTooltipContent({
55
- className,
56
- items = [],
57
- label,
58
- hideLabel = false,
59
- hideIndicator = false,
60
- labelClassName
61
- }) {
62
- useChart();
63
- if (!items.length) {
64
- return null;
65
- }
66
- return /* @__PURE__ */ jsxs(
67
- "div",
68
- {
69
- "data-slot": "chart-tooltip",
70
- className: cn(CHART_TOOLTIP, className),
71
- children: [
72
- !hideLabel && label ? /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: label }) : null,
73
- /* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: items.map((item, index) => /* @__PURE__ */ jsxs(
74
- "div",
75
- {
76
- className: cn(
77
- "[&>svg]:text-ink-soft flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 items-center"
78
- ),
79
- children: [
80
- !hideIndicator && /* @__PURE__ */ jsx(
81
- "div",
82
- {
83
- className: "shrink-0 rounded-[2px] h-2.5 w-2.5",
84
- style: {
85
- backgroundColor: item.color,
86
- borderColor: item.color
87
- }
88
- }
89
- ),
90
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 justify-between leading-none items-center", children: [
91
- /* @__PURE__ */ jsx("span", { className: "text-ink-soft", children: item.label }),
92
- item.value !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-ink font-mono font-medium tabular-nums", children: item.value })
93
- ] })
94
- ]
95
- },
96
- index
97
- )) })
98
- ]
99
- }
100
- );
101
- }
102
- const ChartLegend = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
103
- function ChartLegendContent({
104
- className,
105
- hideIcon = false,
106
- items
107
- }) {
108
- const { config } = useChart();
109
- const rows = items ?? Object.entries(config).map(([key, c]) => ({
110
- label: c.label ?? key,
111
- ...c.color ? { color: c.color } : {}
112
- }));
113
- if (!rows.length) {
114
- return null;
115
- }
116
- return /* @__PURE__ */ jsx(
117
- "div",
118
- {
119
- "data-slot": "chart-legend",
120
- className: cn(CHART_LEGEND, className),
121
- children: rows.map((item, index) => /* @__PURE__ */ jsxs(
122
- "div",
123
- {
124
- className: cn(
125
- "[&>svg]:text-ink-soft flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
126
- ),
127
- children: [
128
- !hideIcon && /* @__PURE__ */ jsx(
129
- "div",
130
- {
131
- className: "h-2 w-2 shrink-0 rounded-[2px]",
132
- style: { backgroundColor: item.color }
133
- }
134
- ),
135
- item.label
136
- ]
137
- },
138
- index
139
- ))
140
- }
141
- );
142
- }
143
- export {
144
- ChartContainer,
145
- ChartLegend,
146
- ChartLegendContent,
147
- ChartStyle,
148
- ChartTooltip,
149
- ChartTooltipContent
150
- };
151
- //# sourceMappingURL=chart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/chart.tsx"],"sourcesContent":["\"use client\";\n\n// Dep-light chart primitives: the shadcn/recharts wrapper minus recharts.\n//\n// Upstream shadcn `chart` is theming + presentational tooltip/legend wrappers\n// around recharts, which does the actual plotting. We keep the wrappers and\n// drop recharts: `ChartContainer` is a themed SVG host that emits per-key\n// `--color-<key>` custom properties from its `config`, and consumers draw their\n// own <svg>/series inside it. `ChartTooltipContent` and `ChartLegendContent`\n// are purely presentational and take explicit `items` instead of a recharts\n// payload. `ChartTooltip`/`ChartLegend` are passthrough wrappers. `dark:*`\n// selectors are dropped; the recharts-specific `[&_.recharts-*]` selectors are\n// dropped from the container base.\n\nimport * as React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { CHART_CONTAINER, CHART_LEGEND, CHART_TOOLTIP } from \"../generated/chart\";\n\nexport type ChartConfig = {\n [k in string]: {\n label?: React.ReactNode;\n color?: string;\n };\n};\n\ntype ChartContextProps = {\n config: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n const context = React.useContext(ChartContext);\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\");\n }\n\n return context;\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig;\n}) {\n const uniqueId = React.useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(CHART_CONTAINER, className)}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n {children}\n </div>\n </ChartContext.Provider>\n );\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(([, c]) => c.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: `[data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => ` --color-${key}: ${itemConfig.color};`)\n .join(\"\\n\")}\n}`,\n }}\n />\n );\n};\n\n// One rendered tooltip/legend row. Replaces the recharts payload.\nexport type ChartItem = {\n label?: React.ReactNode;\n value?: React.ReactNode;\n color?: string;\n};\n\nconst ChartTooltip = ({ children }: { children?: React.ReactNode }) => (\n <>{children}</>\n);\n\nfunction ChartTooltipContent({\n className,\n items = [],\n label,\n hideLabel = false,\n hideIndicator = false,\n labelClassName,\n}: React.ComponentProps<\"div\"> & {\n items?: ChartItem[];\n label?: React.ReactNode;\n hideLabel?: boolean;\n hideIndicator?: boolean;\n labelClassName?: string;\n}) {\n useChart();\n\n if (!items.length) {\n return null;\n }\n\n return (\n <div\n data-slot=\"chart-tooltip\"\n className={cn(CHART_TOOLTIP, className)}\n >\n {!hideLabel && label ? (\n <div className={cn(\"font-medium\", labelClassName)}>{label}</div>\n ) : null}\n <div className=\"grid gap-1.5\">\n {items.map((item, index) => (\n <div\n key={index}\n className={cn(\n \"[&>svg]:text-ink-soft flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 items-center\",\n )}\n >\n {!hideIndicator && (\n <div\n className=\"shrink-0 rounded-[2px] h-2.5 w-2.5\"\n style={\n {\n backgroundColor: item.color,\n borderColor: item.color,\n } as React.CSSProperties\n }\n />\n )}\n <div className=\"flex flex-1 justify-between leading-none items-center\">\n <span className=\"text-ink-soft\">{item.label}</span>\n {item.value !== undefined && (\n <span className=\"text-ink font-mono font-medium tabular-nums\">\n {item.value}\n </span>\n )}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nconst ChartLegend = ({ children }: { children?: React.ReactNode }) => (\n <>{children}</>\n);\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n items,\n}: React.ComponentProps<\"div\"> & {\n hideIcon?: boolean;\n items?: ChartItem[];\n}) {\n const { config } = useChart();\n\n const rows: ChartItem[] =\n items ??\n Object.entries(config).map(([key, c]) => ({\n label: c.label ?? key,\n ...(c.color ? { color: c.color } : {}),\n }));\n\n if (!rows.length) {\n return null;\n }\n\n return (\n <div\n data-slot=\"chart-legend\"\n className={cn(CHART_LEGEND, className)}\n >\n {rows.map((item, index) => (\n <div\n key={index}\n className={cn(\n \"[&>svg]:text-ink-soft flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3\",\n )}\n >\n {!hideIcon && (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{ backgroundColor: item.color }}\n />\n )}\n {item.label}\n </div>\n ))}\n </div>\n );\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n};\n"],"mappings":";AAuDM,SAyCJ,UAnCM,KANF;AAzCN,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,iBAAiB,cAAc,qBAAqB;AAa7D,MAAM,eAAe,MAAM,cAAwC,IAAI;AAEvE,SAAS,WAAW;AAClB,QAAM,UAAU,MAAM,WAAW,YAAY;AAE7C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,mDAAmD;AAAA,EACrE;AAEA,SAAO;AACT;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,QAAM,WAAW,MAAM,MAAM;AAC7B,QAAM,UAAU,SAAS,MAAM,SAAS,QAAQ,MAAM,EAAE,CAAC;AAEzD,SACE,oBAAC,aAAa,UAAb,EAAsB,OAAO,EAAE,OAAO,GACrC;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,cA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ACE,iBAAiB,KAAK;AAAA,oBACtB,aAAa,KAAK;AAAA,kBACpB;AAAA;AAAA,cAEJ;AAAA,cAEF,qBAAC,SAAI,WAAU,yDACb;AAAA,oCAAC,UAAK,WAAU,iBAAiB,eAAK,OAAM;AAAA,gBAC3C,KAAK,UAAU,UACd,oBAAC,UAAK,WAAU,+CACb,eAAK,OACR;AAAA,iBAEJ;AAAA;AAAA;AAAA,UAvBK;AAAA,QAwBP,CACD,GACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,cAAc,CAAC,EAAE,SAAS,MAC9B,gCAAG,UAAS;AAGd,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,WAAW;AAAA,EACX;AACF,GAGG;AACD,QAAM,EAAE,OAAO,IAAI,SAAS;AAE5B,QAAM,OACJ,SACA,OAAO,QAAQ,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO;AAAA,IACxC,OAAO,EAAE,SAAS;AAAA,IAClB,GAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAAA,EACtC,EAAE;AAEJ,MAAI,CAAC,KAAK,QAAQ;AAChB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,cAAc,SAAS;AAAA,MAEpC,eAAK,IAAI,CAAC,MAAM,UACf;AAAA,QAAC;AAAA;AAAA,UAEC,WAAW;AAAA,YACT;AAAA,UACF;AAAA,UAEC;AAAA,aAAC,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,OAAO,EAAE,iBAAiB,KAAK,MAAM;AAAA;AAAA,YACvC;AAAA,YAED,KAAK;AAAA;AAAA;AAAA,QAXD;AAAA,MAYP,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -1,193 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/cn.js";
5
- import {
6
- RESIZABLE_GROUP,
7
- RESIZABLE_HANDLE,
8
- RESIZABLE_HANDLE_GRIP,
9
- RESIZABLE_PANEL
10
- } from "../generated/resizable.js";
11
- const ResizableContext = React.createContext(null);
12
- function useResizable() {
13
- const ctx = React.useContext(ResizableContext);
14
- if (!ctx)
15
- throw new Error("Resizable parts must be used within a ResizablePanelGroup");
16
- return ctx;
17
- }
18
- function redistribute(sizes, index, delta) {
19
- const before = sizes[index];
20
- const after = sizes[index + 1];
21
- if (before === void 0 || after === void 0) return sizes;
22
- const moved = Math.max(-before, Math.min(after, delta));
23
- const next = sizes.slice();
24
- next[index] = before + moved;
25
- next[index + 1] = after - moved;
26
- return next;
27
- }
28
- function ResizablePanelGroup({
29
- className,
30
- direction = "horizontal",
31
- keyboardStep = 10,
32
- onLayout,
33
- children,
34
- ...props
35
- }) {
36
- const [sizes, setSizes] = React.useState([]);
37
- const groupRef = React.useRef(null);
38
- const register = React.useCallback((index, defaultSize) => {
39
- setSizes((prev) => {
40
- if (prev[index] !== void 0) return prev;
41
- const next = prev.slice();
42
- while (next.length <= index) next.push(0);
43
- next[index] = defaultSize;
44
- return next;
45
- });
46
- }, []);
47
- React.useEffect(() => {
48
- if (sizes.length) onLayout?.(sizes);
49
- }, [sizes, onLayout]);
50
- const value = React.useMemo(
51
- () => ({ sizes, setSizes, register, direction, keyboardStep, groupRef }),
52
- [sizes, register, direction, keyboardStep]
53
- );
54
- return /* @__PURE__ */ jsx(ResizableContext.Provider, { value, children: /* @__PURE__ */ jsx(
55
- "div",
56
- {
57
- ref: groupRef,
58
- "data-slot": "resizable-panel-group",
59
- "data-panel-group-direction": direction,
60
- className: cn(RESIZABLE_GROUP, className),
61
- ...props,
62
- children
63
- }
64
- ) });
65
- }
66
- function ResizablePanel({
67
- className,
68
- index,
69
- defaultSize = 50,
70
- style,
71
- children,
72
- ...props
73
- }) {
74
- const { sizes, register } = useResizable();
75
- React.useEffect(() => {
76
- register(index, defaultSize);
77
- }, [register, index, defaultSize]);
78
- const basis = sizes[index] ?? defaultSize;
79
- return /* @__PURE__ */ jsx(
80
- "div",
81
- {
82
- "data-slot": "resizable-panel",
83
- className: cn(RESIZABLE_PANEL, className),
84
- style: { flex: `${basis} 1 0%`, ...style },
85
- ...props,
86
- children
87
- }
88
- );
89
- }
90
- function ResizableHandle({
91
- className,
92
- index,
93
- withHandle,
94
- children,
95
- ...props
96
- }) {
97
- const { setSizes, direction, keyboardStep, groupRef } = useResizable();
98
- const draggingRef = React.useRef(false);
99
- const resize = React.useCallback(
100
- (delta) => setSizes((prev) => redistribute(prev, index, delta)),
101
- [setSizes, index]
102
- );
103
- const onPointerMove = React.useCallback(
104
- (event) => {
105
- if (!draggingRef.current) return;
106
- const rect = groupRef.current?.getBoundingClientRect();
107
- if (!rect) return;
108
- const span = direction === "vertical" ? rect.height : rect.width;
109
- if (span <= 0) return;
110
- const px = direction === "vertical" ? event.movementY : event.movementX;
111
- resize(px / span * 100);
112
- },
113
- [direction, resize, groupRef]
114
- );
115
- const onPointerUp = React.useCallback(() => {
116
- draggingRef.current = false;
117
- window.removeEventListener("pointermove", onPointerMove);
118
- window.removeEventListener("pointerup", onPointerUp);
119
- }, [onPointerMove]);
120
- const onPointerDown = (event) => {
121
- event.preventDefault();
122
- draggingRef.current = true;
123
- window.addEventListener("pointermove", onPointerMove);
124
- window.addEventListener("pointerup", onPointerUp);
125
- };
126
- React.useEffect(() => () => onPointerUp(), [onPointerUp]);
127
- const onKeyDown = (event) => {
128
- let delta;
129
- switch (event.key) {
130
- case "ArrowLeft":
131
- case "ArrowUp":
132
- delta = -keyboardStep;
133
- break;
134
- case "ArrowRight":
135
- case "ArrowDown":
136
- delta = keyboardStep;
137
- break;
138
- default:
139
- return;
140
- }
141
- if (direction === "horizontal" && (event.key === "ArrowUp" || event.key === "ArrowDown") || direction === "vertical" && (event.key === "ArrowLeft" || event.key === "ArrowRight"))
142
- return;
143
- event.preventDefault();
144
- resize(delta);
145
- };
146
- return /* @__PURE__ */ jsxs(
147
- "div",
148
- {
149
- "data-slot": "resizable-handle",
150
- "data-panel-group-direction": direction,
151
- role: "separator",
152
- "aria-orientation": direction === "horizontal" ? "vertical" : "horizontal",
153
- tabIndex: 0,
154
- className: cn(RESIZABLE_HANDLE, className),
155
- onPointerDown,
156
- onKeyDown,
157
- ...props,
158
- children: [
159
- withHandle && /* @__PURE__ */ jsx("div", { className: RESIZABLE_HANDLE_GRIP, children: /* @__PURE__ */ jsxs(
160
- "svg",
161
- {
162
- className: "size-2.5",
163
- xmlns: "http://www.w3.org/2000/svg",
164
- width: "15",
165
- height: "15",
166
- viewBox: "0 0 24 24",
167
- fill: "none",
168
- stroke: "currentColor",
169
- strokeWidth: "2",
170
- strokeLinecap: "round",
171
- strokeLinejoin: "round",
172
- "aria-hidden": "true",
173
- children: [
174
- /* @__PURE__ */ jsx("circle", { cx: "9", cy: "12", r: "1" }),
175
- /* @__PURE__ */ jsx("circle", { cx: "9", cy: "5", r: "1" }),
176
- /* @__PURE__ */ jsx("circle", { cx: "9", cy: "19", r: "1" }),
177
- /* @__PURE__ */ jsx("circle", { cx: "15", cy: "12", r: "1" }),
178
- /* @__PURE__ */ jsx("circle", { cx: "15", cy: "5", r: "1" }),
179
- /* @__PURE__ */ jsx("circle", { cx: "15", cy: "19", r: "1" })
180
- ]
181
- }
182
- ) }),
183
- children
184
- ]
185
- }
186
- );
187
- }
188
- export {
189
- ResizableHandle,
190
- ResizablePanel,
191
- ResizablePanelGroup
192
- };
193
- //# sourceMappingURL=resizable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport {\n RESIZABLE_GROUP,\n RESIZABLE_HANDLE,\n RESIZABLE_HANDLE_GRIP,\n RESIZABLE_PANEL,\n} from \"../generated/resizable\";\n\nexport type ResizableDirection = \"horizontal\" | \"vertical\";\n\ninterface ResizableContextValue {\n sizes: number[];\n setSizes: React.Dispatch<React.SetStateAction<number[]>>;\n register: (index: number, defaultSize: number) => void;\n direction: ResizableDirection;\n keyboardStep: number;\n groupRef: React.RefObject<HTMLDivElement | null>;\n}\n\nconst ResizableContext = React.createContext<ResizableContextValue | null>(null);\n\nfunction useResizable(): ResizableContextValue {\n const ctx = React.useContext(ResizableContext);\n if (!ctx)\n throw new Error(\"Resizable parts must be used within a ResizablePanelGroup\");\n return ctx;\n}\n\n/** Grows the panel before `index` by `delta` %, shrinking the one after it. */\nfunction redistribute(sizes: number[], index: number, delta: number): number[] {\n const before = sizes[index];\n const after = sizes[index + 1];\n if (before === undefined || after === undefined) return sizes;\n const moved = Math.max(-before, Math.min(after, delta));\n const next = sizes.slice();\n next[index] = before + moved;\n next[index + 1] = after - moved;\n return next;\n}\n\nexport interface ResizablePanelGroupProps\n extends React.ComponentProps<\"div\"> {\n direction?: ResizableDirection;\n keyboardStep?: number;\n onLayout?: (sizes: number[]) => void;\n}\n\nexport function ResizablePanelGroup({\n className,\n direction = \"horizontal\",\n keyboardStep = 10,\n onLayout,\n children,\n ...props\n}: ResizablePanelGroupProps) {\n const [sizes, setSizes] = React.useState<number[]>([]);\n const groupRef = React.useRef<HTMLDivElement>(null);\n\n const register = React.useCallback((index: number, defaultSize: number) => {\n setSizes((prev) => {\n if (prev[index] !== undefined) return prev;\n const next = prev.slice();\n while (next.length <= index) next.push(0);\n next[index] = defaultSize;\n return next;\n });\n }, []);\n\n React.useEffect(() => {\n if (sizes.length) onLayout?.(sizes);\n }, [sizes, onLayout]);\n\n const value = React.useMemo<ResizableContextValue>(\n () => ({ sizes, setSizes, register, direction, keyboardStep, groupRef }),\n [sizes, register, direction, keyboardStep],\n );\n\n return (\n <ResizableContext.Provider value={value}>\n <div\n ref={groupRef}\n data-slot=\"resizable-panel-group\"\n data-panel-group-direction={direction}\n className={cn(RESIZABLE_GROUP, className)}\n {...props}\n >\n {children}\n </div>\n </ResizableContext.Provider>\n );\n}\n\nexport interface ResizablePanelProps extends React.ComponentProps<\"div\"> {\n index: number;\n defaultSize?: number;\n}\n\nexport function ResizablePanel({\n className,\n index,\n defaultSize = 50,\n style,\n children,\n ...props\n}: ResizablePanelProps) {\n const { sizes, register } = useResizable();\n React.useEffect(() => {\n register(index, defaultSize);\n }, [register, index, defaultSize]);\n const basis = sizes[index] ?? defaultSize;\n return (\n <div\n data-slot=\"resizable-panel\"\n className={cn(RESIZABLE_PANEL, className)}\n style={{ flex: `${basis} 1 0%`, ...style }}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport interface ResizableHandleProps extends React.ComponentProps<\"div\"> {\n index: number;\n withHandle?: boolean;\n}\n\nexport function ResizableHandle({\n className,\n index,\n withHandle,\n children,\n ...props\n}: ResizableHandleProps) {\n const { setSizes, direction, keyboardStep, groupRef } = useResizable();\n const draggingRef = React.useRef(false);\n\n const resize = React.useCallback(\n (delta: number) => setSizes((prev) => redistribute(prev, index, delta)),\n [setSizes, index],\n );\n\n const onPointerMove = React.useCallback(\n (event: PointerEvent) => {\n if (!draggingRef.current) return;\n const rect = groupRef.current?.getBoundingClientRect();\n if (!rect) return;\n const span = direction === \"vertical\" ? rect.height : rect.width;\n if (span <= 0) return;\n const px = direction === \"vertical\" ? event.movementY : event.movementX;\n resize((px / span) * 100);\n },\n [direction, resize, groupRef],\n );\n\n const onPointerUp = React.useCallback(() => {\n draggingRef.current = false;\n window.removeEventListener(\"pointermove\", onPointerMove);\n window.removeEventListener(\"pointerup\", onPointerUp);\n }, [onPointerMove]);\n\n const onPointerDown = (event: React.PointerEvent) => {\n event.preventDefault();\n draggingRef.current = true;\n window.addEventListener(\"pointermove\", onPointerMove);\n window.addEventListener(\"pointerup\", onPointerUp);\n };\n\n React.useEffect(() => () => onPointerUp(), [onPointerUp]);\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n let delta: number;\n switch (event.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n delta = -keyboardStep;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n delta = keyboardStep;\n break;\n default:\n return;\n }\n if (\n (direction === \"horizontal\" &&\n (event.key === \"ArrowUp\" || event.key === \"ArrowDown\")) ||\n (direction === \"vertical\" &&\n (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\"))\n )\n return;\n event.preventDefault();\n resize(delta);\n };\n\n return (\n <div\n data-slot=\"resizable-handle\"\n data-panel-group-direction={direction}\n role=\"separator\"\n aria-orientation={direction === \"horizontal\" ? \"vertical\" : \"horizontal\"}\n tabIndex={0}\n className={cn(RESIZABLE_HANDLE, className)}\n onPointerDown={onPointerDown}\n onKeyDown={onKeyDown}\n {...props}\n >\n {withHandle && (\n <div className={RESIZABLE_HANDLE_GRIP}>\n <svg\n className=\"size-2.5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <circle cx=\"9\" cy=\"12\" r=\"1\" />\n <circle cx=\"9\" cy=\"5\" r=\"1\" />\n <circle cx=\"9\" cy=\"19\" r=\"1\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" />\n <circle cx=\"15\" cy=\"5\" r=\"1\" />\n <circle cx=\"15\" cy=\"19\" r=\"1\" />\n </svg>\n </div>\n )}\n {children}\n </div>\n );\n}\n"],"mappings":";AAkFM,cAkII,YAlIJ;AAhFN,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,MAAM,mBAAmB,MAAM,cAA4C,IAAI;AAE/E,SAAS,eAAsC;AAC7C,QAAM,MAAM,MAAM,WAAW,gBAAgB;AAC7C,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,2DAA2D;AAC7E,SAAO;AACT;AAGA,SAAS,aAAa,OAAiB,OAAe,OAAyB;AAC7E,Q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AE,KAAI;AAAA,cAC7B,oBAAC,YAAO,IAAG,KAAI,IAAG,KAAI,GAAE,KAAI;AAAA,cAC5B,oBAAC,YAAO,IAAG,KAAI,IAAG,MAAK,GAAE,KAAI;AAAA,cAC7B,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,cAC9B,oBAAC,YAAO,IAAG,MAAK,IAAG,KAAI,GAAE,KAAI;AAAA,cAC7B,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA;AAAA;AAAA,QAChC,GACF;AAAA,QAED;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -1,9 +0,0 @@
1
- const CHART_CONTAINER = "flex aspect-video justify-center text-xs [&_.recharts-layer]:outline-hidden [&_.recharts-surface]:outline-hidden [&_svg]:outline-hidden";
2
- const CHART_TOOLTIP = "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl";
3
- const CHART_LEGEND = "flex items-center justify-center gap-4";
4
- export {
5
- CHART_CONTAINER,
6
- CHART_LEGEND,
7
- CHART_TOOLTIP
8
- };
9
- //# sourceMappingURL=chart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/generated/chart.ts"],"sourcesContent":["// AUTO-GENERATED by `nix run .#gen` — do not edit.\n\nexport const CHART_CONTAINER = \"flex aspect-video justify-center text-xs [&_.recharts-layer]:outline-hidden [&_.recharts-surface]:outline-hidden [&_svg]:outline-hidden\";\n\nexport const CHART_TOOLTIP = \"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl\";\n\nexport const CHART_LEGEND = \"flex items-center justify-center gap-4\";\n"],"mappings":"AAEO,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAEtB,MAAM,eAAe;","names":[]}
@@ -1,11 +0,0 @@
1
- const RESIZABLE_GROUP = "flex h-full w-full data-[panel-group-direction=vertical]:flex-col";
2
- const RESIZABLE_PANEL = "relative";
3
- const RESIZABLE_HANDLE = "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90";
4
- const RESIZABLE_HANDLE_GRIP = "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border";
5
- export {
6
- RESIZABLE_GROUP,
7
- RESIZABLE_HANDLE,
8
- RESIZABLE_HANDLE_GRIP,
9
- RESIZABLE_PANEL
10
- };
11
- //# sourceMappingURL=resizable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/generated/resizable.ts"],"sourcesContent":["// AUTO-GENERATED by `nix run .#gen` — do not edit.\n\nexport const RESIZABLE_GROUP = \"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\";\n\nexport const RESIZABLE_PANEL = \"relative\";\n\nexport const RESIZABLE_HANDLE = \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90\";\n\nexport const RESIZABLE_HANDLE_GRIP = \"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border\";\n"],"mappings":"AAEO,MAAM,kBAAkB;AAExB,MAAM,kBAAkB;AAExB,MAAM,mBAAmB;AAEzB,MAAM,wBAAwB;","names":[]}