@datum-cloud/datum-ui 0.4.0 → 0.6.0-alpha.b817c77
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 +78 -39
- package/dist/adapter-context-B7L2ucTr.mjs +25 -0
- package/dist/alert/index.mjs +2 -3
- package/dist/{alert-BC2Mccfo.mjs → alert-BDj6od5I.mjs} +2 -4
- package/dist/app-navigation/index.mjs +4 -12
- package/dist/{app-navigation-DsCKgfPe.mjs → app-navigation-84ro28PU.mjs} +5 -8
- package/dist/autocomplete/index.mjs +2 -7
- package/dist/{autocomplete-DRB_kSVx.mjs → autocomplete-V5-qslzS.mjs} +5 -7
- package/dist/avatar/index.mjs +2 -4
- package/dist/{avatar-DyLq0xkt.mjs → avatar-BtKVcvO4.mjs} +2 -4
- package/dist/avatar-stack/index.mjs +2 -6
- package/dist/{avatar-stack-BT0dBswq.mjs → avatar-stack-oVr8tsU7.mjs} +4 -6
- package/dist/badge/index.mjs +2 -3
- package/dist/{badge-BgFj4Nsc.mjs → badge-DJR33ftJ.mjs} +2 -4
- package/dist/breadcrumb/index.mjs +2 -4
- package/dist/{breadcrumb-CJNaYyk1.mjs → breadcrumb-B-9G347O.mjs} +2 -4
- package/dist/button/index.mjs +3 -4
- package/dist/{button-0N61fmAR.mjs → button-BllvE9Lm.mjs} +3 -5
- package/dist/{button-D6AORsOz.mjs → button-D3RrsMfQ.mjs} +2 -4
- package/dist/{link-button-Cby0p4LW.mjs → button-fO8nazJE.mjs} +3 -5
- package/dist/button-group/index.mjs +2 -5
- package/dist/{button-group-BDk8btAy.mjs → button-group-CYPka2zz.mjs} +3 -5
- package/dist/calendar/index.mjs +2 -5
- package/dist/{calendar-BtfraIvX.mjs → calendar-DEkCw7I1.mjs} +4 -6
- package/dist/{calendar-date-picker-B9mxJM7f.mjs → calendar-date-picker-DWK94_DC.mjs} +6 -8
- package/dist/card/index.mjs +2 -4
- package/dist/{card-BiHXFt4s.mjs → card-DKG1Cwlj.mjs} +3 -6
- package/dist/chart/index.mjs +2 -4
- package/dist/{chart-CL0i-xIt.mjs → chart-CUa21ynK.mjs} +2 -4
- package/dist/checkbox/index.mjs +2 -4
- package/dist/{checkbox-CQrjygFt.mjs → checkbox-I5BvrMPe.mjs} +3 -6
- package/dist/{close.icon-D2r5q3bj.mjs → close.icon-HCfS4Y-N.mjs} +2 -4
- package/dist/{cn-DWCc1QRE.mjs → cn-D2KYQ917.mjs} +1 -3
- package/dist/code-editor/index.mjs +2 -0
- package/dist/{col-C9PDhvm5.mjs → col-YBbQ5wlb.mjs} +2 -7
- package/dist/collapsible/index.mjs +2 -3
- package/dist/{collapsible-Dw71o2um.mjs → collapsible-CUphkSBt.mjs} +1 -3
- package/dist/command/index.mjs +2 -5
- package/dist/{command-DVroicgn.mjs → command-DqHWukGK.mjs} +3 -5
- package/dist/components/features/code-editor/code-editor-tabs.d.ts +63 -0
- package/dist/components/features/code-editor/code-editor-tabs.d.ts.map +1 -0
- package/dist/components/features/code-editor/code-editor.d.ts +58 -0
- package/dist/components/features/code-editor/code-editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/index.d.ts +6 -0
- package/dist/components/features/code-editor/index.d.ts.map +1 -0
- package/dist/components/features/code-editor/lib/editor.d.ts +7 -0
- package/dist/components/features/code-editor/lib/editor.d.ts.map +1 -0
- package/dist/components/features/code-editor/types.d.ts +98 -0
- package/dist/components/features/code-editor/types.d.ts.map +1 -0
- package/dist/components/features/form/adapter-context.d.ts +17 -0
- package/dist/components/features/form/adapter-context.d.ts.map +1 -0
- package/dist/components/features/form/adapter-types.d.ts +100 -0
- package/dist/components/features/form/adapter-types.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts +9 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/index.d.ts +3 -0
- package/dist/components/features/form/adapters/conform/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts +3 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts +10 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts.map +1 -0
- package/dist/components/features/form/components/form-autocomplete.d.ts.map +1 -1
- package/dist/components/features/form/components/form-checkbox.d.ts.map +1 -1
- package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field-array.d.ts +5 -17
- package/dist/components/features/form/components/form-field-array.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field.d.ts +7 -21
- package/dist/components/features/form/components/form-field.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input-group.d.ts +4 -4
- package/dist/components/features/form/components/form-input-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input.d.ts.map +1 -1
- package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-root.d.ts +5 -25
- package/dist/components/features/form/components/form-root.d.ts.map +1 -1
- package/dist/components/features/form/components/form-select.d.ts.map +1 -1
- package/dist/components/features/form/components/form-switch.d.ts.map +1 -1
- package/dist/components/features/form/components/form-textarea.d.ts.map +1 -1
- package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
- package/dist/components/features/form/context/form-context.d.ts +2 -2
- package/dist/components/features/form/context/form-context.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-field.d.ts +12 -18
- package/dist/components/features/form/hooks/use-field.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-watch.d.ts +9 -20
- package/dist/components/features/form/hooks/use-watch.d.ts.map +1 -1
- package/dist/components/features/form/index.d.ts +33 -27
- package/dist/components/features/form/index.d.ts.map +1 -1
- package/dist/components/features/form/types/index.d.ts +32 -32
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts +11 -0
- package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -0
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/data-table/index.mjs +21 -51
- package/dist/date-picker/index.mjs +3 -10
- package/dist/dialog/index.mjs +2 -5
- package/dist/{dialog-B0B3Kbfk.mjs → dialog-Bm2H9lrx.mjs} +4 -6
- package/dist/{dialog-DdrHeboM.mjs → dialog-DASRaFxD.mjs} +2 -4
- package/dist/dropdown/index.mjs +2 -3
- package/dist/{dropdown-Cdx7rOKv.mjs → dropdown-DZiAt-jS.mjs} +3 -5
- package/dist/{dropdown-menu-CdShrDz_.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
- package/dist/dropzone/index.mjs +2 -5
- package/dist/{dropzone-B6kSN3DY.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
- package/dist/empty-content/index.mjs +2 -3
- package/dist/{empty-content-B1lwLr40.mjs → empty-content-C63GPJ5d.mjs} +3 -9
- package/dist/form/adapters/conform/index.mjs +237 -0
- package/dist/form/adapters/rhf/index.mjs +181 -0
- package/dist/form/index.mjs +3 -146
- package/dist/{use-stepper-DigoyHhX.mjs → form-BE1xBne4.mjs} +447 -601
- package/dist/get-field-constraints-BPMW8VvY.mjs +48 -0
- package/dist/grid/index.mjs +2 -3
- package/dist/hooks/index.mjs +3 -4
- package/dist/{use-debounce-MnfjH51L.mjs → hooks-DYjN7lvC.mjs} +1 -3
- package/dist/hover-card/index.mjs +2 -4
- package/dist/{hover-card-CEIauuie.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
- package/dist/{icon-wrapper-BBK4z4tj.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
- package/dist/icons/index.mjs +4 -5
- package/dist/index.mjs +66 -71
- package/dist/input/index.mjs +2 -5
- package/dist/{input-DEMoi_8F.mjs → input-DOmNpcQJ.mjs} +2 -4
- package/dist/{input-CYFN0Ap2.mjs → input-FKGqZypx.mjs} +3 -5
- package/dist/input-group/index.mjs +2 -7
- package/dist/{input-group-DJgYpOlq.mjs → input-group-DDtz-RT7.mjs} +5 -7
- package/dist/input-number/index.mjs +2 -6
- package/dist/{input-number-Cuy9CCg_.mjs → input-number-DEjXG2I6.mjs} +4 -6
- package/dist/input-with-addons/index.mjs +28 -3
- package/dist/label/index.mjs +2 -4
- package/dist/{label-mOg07fuQ.mjs → label-cnAhY-ej.mjs} +3 -6
- package/dist/loader-overlay/index.mjs +2 -3
- package/dist/{loader-overlay-8IWX_1Ga.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
- package/dist/map/index.mjs +2 -14
- package/dist/{map-CaI1EshG.mjs → map-Cw7u8r6E.mjs} +10 -14
- package/dist/{map-leaflet-imports-J7w1V7mh.mjs → map-leaflet-imports-D6nTEOIh.mjs} +1 -2
- package/dist/more-actions/index.mjs +2 -5
- package/dist/{more-actions-BO5ikUxY.mjs → more-actions-BNQ2yfWZ.mjs} +5 -7
- package/dist/nprogress/index.mjs +1 -3
- package/dist/page-title/index.mjs +2 -3
- package/dist/{page-title-DWteBy1E.mjs → page-title-CNiRNZ7p.mjs} +2 -4
- package/dist/popover/index.mjs +2 -4
- package/dist/{popover-ugw5MpuT.mjs → popover-FJAcbYoH.mjs} +2 -4
- package/dist/radio-group/index.mjs +2 -4
- package/dist/{radio-group-_gMymwnb.mjs → radio-group-CiITR0LO.mjs} +3 -6
- package/dist/select/index.mjs +2 -4
- package/dist/{select-BZOKWjlH.mjs → select-CiLR_DiQ.mjs} +3 -6
- package/dist/separator/index.mjs +2 -4
- package/dist/{separator-BzyALya2.mjs → separator-DXVTncCK.mjs} +2 -4
- package/dist/sheet/index.mjs +3 -5
- package/dist/{sheet-BX6lae56.mjs → sheet-BzXksqYY.mjs} +4 -6
- package/dist/{sheet-DAcFjaGw.mjs → sheet-Di3b-oPu.mjs} +2 -4
- package/dist/sidebar/index.mjs +2 -10
- package/dist/{sidebar-B3EV33mG.mjs → sidebar-BnhnjvfO.mjs} +10 -14
- package/dist/skeleton/index.mjs +2 -5
- package/dist/{skeleton-2vQ0vFQk.mjs → skeleton-BKl4mfJt.mjs} +2 -4
- package/dist/{skeleton-BgOwIgE0.mjs → skeleton-D1MUhAVo.mjs} +3 -5
- package/dist/spinner/index.mjs +2 -4
- package/dist/{spinner-osyXAlhr.mjs → spinner-OyOf9-Yu.mjs} +2 -4
- package/dist/{spinner.icon-C0MbtgqX.mjs → spinner.icon-C-vjSM6o.mjs} +2 -4
- package/dist/stepper/index.mjs +321 -5
- package/dist/switch/index.mjs +2 -4
- package/dist/{switch-C60FpEal.mjs → switch-DQJQhPIQ.mjs} +3 -6
- package/dist/table/index.mjs +2 -4
- package/dist/{table-Cl3UzIhI.mjs → table-Cdsh-39-.mjs} +2 -4
- package/dist/tabs/index.mjs +50 -3
- package/dist/tag-input/index.mjs +2 -5
- package/dist/{tag-input-DR2gukhL.mjs → tag-input-BKed-cul.mjs} +5 -7
- package/dist/task-queue/index.mjs +2 -7
- package/dist/{task-queue-dropdown-C9KHKbGh.mjs → task-queue-dropdown-Di_Wjspz.mjs} +10 -30
- package/dist/textarea/index.mjs +2 -5
- package/dist/{textarea-CVo38n3S.mjs → textarea-94vq_G_S.mjs} +2 -4
- package/dist/{textarea-CZF5n57i.mjs → textarea-BwD-MmTV.mjs} +3 -5
- package/dist/theme/index.mjs +2 -3
- package/dist/{theme.provider-TUHlMsjM.mjs → themes-DG1md8FI.mjs} +1 -6
- package/dist/{to-api-format-naIpF-NI.mjs → to-api-format-Cq4prffn.mjs} +9 -18
- package/dist/toast/index.mjs +3 -3
- package/dist/{use-toast-By9HuFwP.mjs → toast-BWnN5fax.mjs} +5 -42
- package/dist/toast-DpxlFNNx.mjs +37 -0
- package/dist/tooltip/index.mjs +2 -4
- package/dist/{tooltip-CuX2jQA9.mjs → tooltip-Cruvl5F6.mjs} +3 -6
- package/dist/types-BZNk3q65.mjs +357 -0
- package/dist/typography/index.mjs +2 -3
- package/dist/{typography-Iap9fU5P.mjs → typography-ClB8k55E.mjs} +2 -4
- package/dist/{use-copy-to-clipboard-n29wJwvW.mjs → use-copy-to-clipboard-BGdTmkFV.mjs} +2 -4
- package/dist/utils/index.mjs +2 -3
- package/dist/{utils-DJboNGQM.mjs → utils-C8KwMfT_.mjs} +1 -3
- package/dist/visually-hidden/index.mjs +2 -3
- package/dist/{visuallyhidden-BJsQCmg-.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
- package/package.json +44 -3
- package/dist/input-with-addons-B8rzNhpq.mjs +0 -30
- package/dist/stepper-BMsn7I78.mjs +0 -323
- package/dist/tabs-DJU7JA3h.mjs +0 -52
package/dist/stepper/index.mjs
CHANGED
|
@@ -1,5 +1,321 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../button-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Button } from "../button-D3RrsMfQ.mjs";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import * as Stepperize from "@stepperize/react";
|
|
8
|
+
//#region src/components/features/stepper/stepper.tsx
|
|
9
|
+
const StepperContext = React$1.createContext(null);
|
|
10
|
+
function useStepperProvider() {
|
|
11
|
+
const context = React$1.use(StepperContext);
|
|
12
|
+
if (!context) throw new Error("useStepper must be used within a StepperProvider.");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
const classForNavigationList = cva("flex gap-2", { variants: { variant: {
|
|
16
|
+
horizontal: "flex-row items-center justify-between",
|
|
17
|
+
vertical: "flex-col",
|
|
18
|
+
circle: "flex-row items-center justify-between"
|
|
19
|
+
} } });
|
|
20
|
+
const classForSeparator = cva([
|
|
21
|
+
"bg-muted",
|
|
22
|
+
"data-[state=completed]:bg-primary data-[disabled]:opacity-50",
|
|
23
|
+
"transition-all duration-300 ease-in-out"
|
|
24
|
+
], { variants: {
|
|
25
|
+
orientation: {
|
|
26
|
+
horizontal: "h-0.5 flex-1",
|
|
27
|
+
vertical: "h-full w-0.5"
|
|
28
|
+
},
|
|
29
|
+
labelOrientation: { vertical: "absolute left-[calc(50%+30px)] right-[calc(-50%+20px)] top-5 block shrink-0" }
|
|
30
|
+
} });
|
|
31
|
+
function defineStepper(...steps) {
|
|
32
|
+
const { Scoped, useStepper, steps: stepList, Stepper: StepperizePrimitives } = Stepperize.defineStepper(...steps);
|
|
33
|
+
const StepperContainer = ({ children, className, ...props }) => {
|
|
34
|
+
const methods = useStepper();
|
|
35
|
+
return /* @__PURE__ */ jsx("div", {
|
|
36
|
+
"date-component": "stepper",
|
|
37
|
+
className: cn("w-full", className),
|
|
38
|
+
...props,
|
|
39
|
+
children: typeof children === "function" ? children({ methods }) : children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
steps: stepList,
|
|
44
|
+
useStepper,
|
|
45
|
+
Stepper: {
|
|
46
|
+
...StepperizePrimitives,
|
|
47
|
+
Provider: ({ variant = "horizontal", labelOrientation = "horizontal", tracking = false, children, className, ...props }) => {
|
|
48
|
+
return /* @__PURE__ */ jsx(StepperContext, {
|
|
49
|
+
value: {
|
|
50
|
+
variant,
|
|
51
|
+
labelOrientation,
|
|
52
|
+
tracking
|
|
53
|
+
},
|
|
54
|
+
children: /* @__PURE__ */ jsx(Scoped, {
|
|
55
|
+
initialStep: props.initialStep,
|
|
56
|
+
initialMetadata: props.initialMetadata,
|
|
57
|
+
children: /* @__PURE__ */ jsx(StepperContainer, {
|
|
58
|
+
className,
|
|
59
|
+
...props,
|
|
60
|
+
children
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
Navigation: ({ children, "aria-label": ariaLabel = "Stepper Navigation", ...props }) => {
|
|
66
|
+
const { variant } = useStepperProvider();
|
|
67
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
68
|
+
"date-component": "stepper-navigation",
|
|
69
|
+
"aria-label": ariaLabel,
|
|
70
|
+
role: "tablist",
|
|
71
|
+
...props,
|
|
72
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
73
|
+
"date-component": "stepper-navigation-list",
|
|
74
|
+
className: classForNavigationList({ variant }),
|
|
75
|
+
children
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
Step: ({ children, className, icon, ...props }) => {
|
|
80
|
+
const { variant, labelOrientation } = useStepperProvider();
|
|
81
|
+
const stepper = useStepper();
|
|
82
|
+
const steps = stepList;
|
|
83
|
+
const stepIndex = stepper.lookup.getIndex(props.of);
|
|
84
|
+
const step = steps[stepIndex];
|
|
85
|
+
const currentIndex = stepper.lookup.getIndex(stepper.state.current.data.id);
|
|
86
|
+
const isLast = stepper.lookup.getLast().id === props.of;
|
|
87
|
+
const isActive = stepper.state.current.data.id === props.of;
|
|
88
|
+
const dataState = getStepState(currentIndex, stepIndex);
|
|
89
|
+
const childMap = useStepChildren(children);
|
|
90
|
+
const title = childMap.get("title");
|
|
91
|
+
const description = childMap.get("description");
|
|
92
|
+
const panel = childMap.get("panel");
|
|
93
|
+
if (variant === "circle") return /* @__PURE__ */ jsxs("li", {
|
|
94
|
+
"date-component": "stepper-step",
|
|
95
|
+
className: cn("flex shrink-0 items-center gap-4 rounded-md transition-colors", className),
|
|
96
|
+
children: [/* @__PURE__ */ jsx(CircleStepIndicator, {
|
|
97
|
+
currentStep: stepIndex + 1,
|
|
98
|
+
totalSteps: steps.length
|
|
99
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
100
|
+
"date-component": "stepper-step-content",
|
|
101
|
+
className: "flex flex-col items-start gap-1",
|
|
102
|
+
children: [title, description]
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
106
|
+
/* @__PURE__ */ jsxs("li", {
|
|
107
|
+
"date-component": "stepper-step",
|
|
108
|
+
className: cn([
|
|
109
|
+
"group peer relative flex items-center gap-2",
|
|
110
|
+
"data-[variant=vertical]:flex-row",
|
|
111
|
+
"data-[label-orientation=vertical]:w-full",
|
|
112
|
+
"data-[label-orientation=vertical]:flex-col",
|
|
113
|
+
"data-[label-orientation=vertical]:justify-center"
|
|
114
|
+
]),
|
|
115
|
+
"data-variant": variant,
|
|
116
|
+
"data-label-orientation": labelOrientation,
|
|
117
|
+
"data-state": dataState,
|
|
118
|
+
"data-disabled": props.disabled,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsx(Button, {
|
|
121
|
+
id: `step-${step.id}`,
|
|
122
|
+
"date-component": "stepper-step-indicator",
|
|
123
|
+
type: "button",
|
|
124
|
+
role: "tab",
|
|
125
|
+
tabIndex: dataState !== "inactive" ? 0 : -1,
|
|
126
|
+
className: cn("rounded-full", className),
|
|
127
|
+
variant: dataState !== "inactive" ? "default" : "secondary",
|
|
128
|
+
size: "icon",
|
|
129
|
+
"aria-controls": `step-panel-${props.of}`,
|
|
130
|
+
"aria-current": isActive ? "step" : void 0,
|
|
131
|
+
"aria-posinset": stepIndex + 1,
|
|
132
|
+
"aria-setsize": steps.length,
|
|
133
|
+
"aria-selected": isActive,
|
|
134
|
+
onKeyDown: (e) => onStepKeyDown(e, stepper.lookup.getNext(props.of), stepper.lookup.getPrev(props.of)),
|
|
135
|
+
...props,
|
|
136
|
+
children: icon ?? stepIndex + 1
|
|
137
|
+
}),
|
|
138
|
+
variant === "horizontal" && labelOrientation === "vertical" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
139
|
+
orientation: "horizontal",
|
|
140
|
+
labelOrientation,
|
|
141
|
+
isLast,
|
|
142
|
+
state: dataState,
|
|
143
|
+
disabled: props.disabled
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsxs("div", {
|
|
146
|
+
"date-component": "stepper-step-content",
|
|
147
|
+
className: "flex flex-col items-start",
|
|
148
|
+
children: [title, description]
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
variant === "horizontal" && labelOrientation === "horizontal" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
153
|
+
orientation: "horizontal",
|
|
154
|
+
isLast,
|
|
155
|
+
state: dataState,
|
|
156
|
+
disabled: props.disabled
|
|
157
|
+
}),
|
|
158
|
+
variant === "vertical" && /* @__PURE__ */ jsxs("div", {
|
|
159
|
+
className: "flex gap-4",
|
|
160
|
+
children: [!isLast && /* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: "flex justify-center ps-[calc(var(--spacing)_*_4.5_-_1px)]",
|
|
162
|
+
children: /* @__PURE__ */ jsx(StepperSeparator, {
|
|
163
|
+
orientation: "vertical",
|
|
164
|
+
isLast,
|
|
165
|
+
state: dataState,
|
|
166
|
+
disabled: props.disabled
|
|
167
|
+
})
|
|
168
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
169
|
+
className: "my-3 flex-1 ps-4",
|
|
170
|
+
children: panel
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
] });
|
|
174
|
+
},
|
|
175
|
+
Title,
|
|
176
|
+
Description,
|
|
177
|
+
Panel: ({ children, asChild, ...props }) => {
|
|
178
|
+
const Comp = asChild ? Slot : "div";
|
|
179
|
+
const { tracking } = useStepperProvider();
|
|
180
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
181
|
+
"date-component": "stepper-step-panel",
|
|
182
|
+
ref: (node) => scrollIntoStepperPanel(node, tracking),
|
|
183
|
+
...props,
|
|
184
|
+
children
|
|
185
|
+
});
|
|
186
|
+
},
|
|
187
|
+
Controls: ({ children, className, asChild, ...props }) => {
|
|
188
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
189
|
+
"date-component": "stepper-controls",
|
|
190
|
+
className: cn("flex justify-end gap-4", className),
|
|
191
|
+
...props,
|
|
192
|
+
children
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function Title({ children, className, asChild, ...props }) {
|
|
199
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "h4", {
|
|
200
|
+
"date-component": "stepper-step-title",
|
|
201
|
+
className: cn("text-base font-medium", className),
|
|
202
|
+
...props,
|
|
203
|
+
children
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function Description({ children, className, asChild, ...props }) {
|
|
207
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "p", {
|
|
208
|
+
"date-component": "stepper-step-description",
|
|
209
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
210
|
+
...props,
|
|
211
|
+
children
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
function StepperSeparator({ orientation, isLast, labelOrientation, state, disabled }) {
|
|
215
|
+
if (isLast) return null;
|
|
216
|
+
return /* @__PURE__ */ jsx("div", {
|
|
217
|
+
"date-component": "stepper-separator",
|
|
218
|
+
"data-orientation": orientation,
|
|
219
|
+
"data-state": state,
|
|
220
|
+
"data-disabled": disabled,
|
|
221
|
+
role: "separator",
|
|
222
|
+
tabIndex: -1,
|
|
223
|
+
className: classForSeparator({
|
|
224
|
+
orientation,
|
|
225
|
+
labelOrientation
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function CircleStepIndicator({ currentStep, totalSteps, size = 80, strokeWidth = 6 }) {
|
|
230
|
+
const radius = (size - strokeWidth) / 2;
|
|
231
|
+
const circumference = radius * 2 * Math.PI;
|
|
232
|
+
const dashOffset = circumference - circumference * (currentStep / totalSteps * 100) / 100;
|
|
233
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
234
|
+
"date-component": "stepper-step-indicator",
|
|
235
|
+
role: "progressbar",
|
|
236
|
+
"aria-valuenow": currentStep,
|
|
237
|
+
"aria-valuemin": 1,
|
|
238
|
+
"aria-valuemax": totalSteps,
|
|
239
|
+
tabIndex: -1,
|
|
240
|
+
className: "relative inline-flex items-center justify-center",
|
|
241
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
242
|
+
width: size,
|
|
243
|
+
height: size,
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ jsx("title", { children: "Step Indicator" }),
|
|
246
|
+
/* @__PURE__ */ jsx("circle", {
|
|
247
|
+
cx: size / 2,
|
|
248
|
+
cy: size / 2,
|
|
249
|
+
r: radius,
|
|
250
|
+
fill: "none",
|
|
251
|
+
stroke: "currentColor",
|
|
252
|
+
strokeWidth,
|
|
253
|
+
className: "text-muted-foreground"
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ jsx("circle", {
|
|
256
|
+
cx: size / 2,
|
|
257
|
+
cy: size / 2,
|
|
258
|
+
r: radius,
|
|
259
|
+
fill: "none",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
strokeWidth,
|
|
262
|
+
strokeDasharray: circumference,
|
|
263
|
+
strokeDashoffset: dashOffset,
|
|
264
|
+
className: "text-primary transition-all duration-300 ease-in-out",
|
|
265
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
269
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
270
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
271
|
+
className: "text-sm font-medium",
|
|
272
|
+
"aria-live": "polite",
|
|
273
|
+
children: [
|
|
274
|
+
currentStep,
|
|
275
|
+
" ",
|
|
276
|
+
"of",
|
|
277
|
+
totalSteps
|
|
278
|
+
]
|
|
279
|
+
})
|
|
280
|
+
})]
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function scrollIntoStepperPanel(node, tracking) {
|
|
284
|
+
if (tracking) node?.scrollIntoView({
|
|
285
|
+
behavior: "smooth",
|
|
286
|
+
block: "center"
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function useStepChildren(children) {
|
|
290
|
+
return React$1.useMemo(() => extractChildren(children), [children]);
|
|
291
|
+
}
|
|
292
|
+
function extractChildren(children) {
|
|
293
|
+
const childrenArray = React$1.Children.toArray(children);
|
|
294
|
+
const map = /* @__PURE__ */ new Map();
|
|
295
|
+
for (const child of childrenArray) if (React$1.isValidElement(child)) if (child.type === Title) map.set("title", child);
|
|
296
|
+
else if (child.type === Description) map.set("description", child);
|
|
297
|
+
else map.set("panel", child);
|
|
298
|
+
return map;
|
|
299
|
+
}
|
|
300
|
+
function onStepKeyDown(e, nextStep, prevStep) {
|
|
301
|
+
const { key } = e;
|
|
302
|
+
const directions = {
|
|
303
|
+
next: ["ArrowRight", "ArrowDown"],
|
|
304
|
+
prev: ["ArrowLeft", "ArrowUp"]
|
|
305
|
+
};
|
|
306
|
+
if (directions.next.includes(key) || directions.prev.includes(key)) {
|
|
307
|
+
const direction = directions.next.includes(key) ? "next" : "prev";
|
|
308
|
+
const step = direction === "next" ? nextStep : prevStep;
|
|
309
|
+
if (!step) return;
|
|
310
|
+
const stepElement = document.getElementById(`step-${step.id}`);
|
|
311
|
+
if (!stepElement) return;
|
|
312
|
+
if (stepElement.parentElement?.getAttribute("data-state") !== "inactive" || direction === "prev") stepElement.focus();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function getStepState(currentIndex, stepIndex) {
|
|
316
|
+
if (currentIndex === stepIndex) return "active";
|
|
317
|
+
if (currentIndex > stepIndex) return "completed";
|
|
318
|
+
return "inactive";
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
export { defineStepper };
|
package/dist/switch/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as cn$1 } from "./utils-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as cn$1 } from "./utils-C8KwMfT_.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
6
|
-
|
|
7
6
|
//#region ../shadcn/ui/switch.tsx
|
|
8
7
|
function Switch$1({ className, ...props }) {
|
|
9
8
|
return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
@@ -16,7 +15,6 @@ function Switch$1({ className, ...props }) {
|
|
|
16
15
|
})
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
|
|
20
18
|
//#endregion
|
|
21
19
|
//#region src/components/base/switch/switch.tsx
|
|
22
20
|
function Switch({ ref, className, ...props }) {
|
|
@@ -27,6 +25,5 @@ function Switch({ ref, className, ...props }) {
|
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
Switch.displayName = "Switch";
|
|
30
|
-
|
|
31
28
|
//#endregion
|
|
32
|
-
export { Switch as t };
|
|
29
|
+
export { Switch as t };
|
package/dist/table/index.mjs
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
1
|
+
import { a as TableFooter, c as TableRow, i as TableCell, n as TableBody, o as TableHead, r as TableCaption, s as TableHeader, t as Table } from "../table-Cdsh-39-.mjs";
|
|
2
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as cn } from "./utils-
|
|
1
|
+
import { t as cn } from "./utils-C8KwMfT_.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
4
|
//#region ../shadcn/ui/table.tsx
|
|
6
5
|
const Table = ({ className, ...props }) => {
|
|
7
6
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -63,6 +62,5 @@ const TableCaption = ({ className, ...props }) => {
|
|
|
63
62
|
...props
|
|
64
63
|
});
|
|
65
64
|
};
|
|
66
|
-
|
|
67
65
|
//#endregion
|
|
68
|
-
export { TableFooter as a, TableRow as c, TableCell as i, TableBody as n, TableHead as o, TableCaption as r, TableHeader as s, Table as t };
|
|
66
|
+
export { TableFooter as a, TableRow as c, TableCell as i, TableBody as n, TableHead as o, TableCaption as r, TableHeader as s, Table as t };
|
package/dist/tabs/index.mjs
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as cn } from "../cn-D2KYQ917.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
|
+
//#region src/components/base/tabs/tabs.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Datum Tabs Component
|
|
8
|
+
* Extends shadcn Tabs with:
|
|
9
|
+
* - TabsLinkTrigger for router-agnostic link integration
|
|
10
|
+
* - Dark mode customizations
|
|
11
|
+
*/
|
|
12
|
+
function Tabs({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
|
|
14
|
+
className: cn("flex flex-col gap-2", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function TabsList({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
20
|
+
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function TabsTrigger({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
26
|
+
className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground data-[state=active]:text-foreground dark:hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function TabsContent({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
32
|
+
className: cn("flex-1 outline-none", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function TabsLinkTrigger({ value, href, linkComponent: LinkComp = "a", children, className, ...props }) {
|
|
37
|
+
const linkProps = LinkComp === "a" ? { href } : { to: href };
|
|
38
|
+
return /* @__PURE__ */ jsx(TabsTrigger, {
|
|
39
|
+
value,
|
|
40
|
+
asChild: true,
|
|
41
|
+
className,
|
|
42
|
+
...props,
|
|
43
|
+
children: /* @__PURE__ */ jsx(LinkComp, {
|
|
44
|
+
...linkProps,
|
|
45
|
+
children
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger };
|
package/dist/tag-input/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as Badge } from "./badge-
|
|
3
|
-
import { t as Icon } from "./icon-wrapper-
|
|
4
|
-
import { t as Input } from "./input-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Badge } from "./badge-DJR33ftJ.mjs";
|
|
3
|
+
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
4
|
+
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
|
|
10
9
|
//#region src/components/features/tag-input/tag-input.tsx
|
|
11
10
|
/**
|
|
12
11
|
* Used for identifying split characters when pasting
|
|
@@ -279,6 +278,5 @@ function TagsInput({ ref, value, onValueChange, placeholder, maxItems, minItems,
|
|
|
279
278
|
});
|
|
280
279
|
}
|
|
281
280
|
TagsInput.displayName = "TagsInput";
|
|
282
|
-
|
|
283
281
|
//#endregion
|
|
284
|
-
export { TagsInput as t };
|
|
282
|
+
export { TagsInput as t };
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
|
|
3
|
-
import "../tooltip-CuX2jQA9.mjs";
|
|
4
|
-
import "../table-Cl3UzIhI.mjs";
|
|
5
|
-
import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "../task-queue-dropdown-C9KHKbGh.mjs";
|
|
6
|
-
|
|
7
|
-
export { LocalTaskStorage, RedisTaskStorage, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, createOrgMetadata, createProjectMetadata, createUserMetadata, detectStorage, getContextLabel, matchesCurrentScope, useCurrentScope, useTaskQueue, useTasksWithLabels };
|
|
1
|
+
import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "../task-queue-dropdown-Di_Wjspz.mjs";
|
|
2
|
+
export { LocalTaskStorage, RedisTaskStorage, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, createOrgMetadata, createProjectMetadata, createUserMetadata, detectStorage, getContextLabel, matchesCurrentScope, useCurrentScope, useTaskQueue, useTasksWithLabels };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { t as cn } from "./cn-
|
|
2
|
-
import { t as Badge } from "./badge-
|
|
3
|
-
import { t as SpinnerIcon } from "./spinner.icon-
|
|
4
|
-
import { t as Button } from "./button-
|
|
5
|
-
import { t as Icon } from "./icon-wrapper-
|
|
6
|
-
import { t as Dialog } from "./dialog-
|
|
7
|
-
import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-
|
|
8
|
-
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "./table-
|
|
9
|
-
import { h as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "./dropdown-
|
|
1
|
+
import { t as cn } from "./cn-D2KYQ917.mjs";
|
|
2
|
+
import { t as Badge } from "./badge-DJR33ftJ.mjs";
|
|
3
|
+
import { t as SpinnerIcon } from "./spinner.icon-C-vjSM6o.mjs";
|
|
4
|
+
import { t as Button } from "./button-BllvE9Lm.mjs";
|
|
5
|
+
import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
|
|
6
|
+
import { t as Dialog } from "./dialog-Bm2H9lrx.mjs";
|
|
7
|
+
import { a as TooltipTrigger, n as Tooltip, r as TooltipContent, t as Tooltip$1 } from "./tooltip-Cruvl5F6.mjs";
|
|
8
|
+
import { c as TableRow, i as TableCell, n as TableBody, o as TableHead, s as TableHeader, t as Table } from "./table-Cdsh-39-.mjs";
|
|
9
|
+
import { h as DropdownMenuTrigger, r as DropdownMenuContent, t as DropdownMenu } from "./dropdown-DZiAt-jS.mjs";
|
|
10
10
|
import { Ban, CheckCircle2, CircleAlert, CircleCheck, CornerDownRightIcon, FileIcon, ListTodo, X, XCircle } from "lucide-react";
|
|
11
11
|
import { createContext, use, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { formatDistanceToNowStrict } from "date-fns";
|
|
14
|
-
|
|
15
14
|
//#region src/components/features/task-queue/engine/executor.ts
|
|
16
15
|
function createTaskContext(task, callbacks) {
|
|
17
16
|
let cancelled = false;
|
|
@@ -110,7 +109,6 @@ async function executeTask(task, callbacks) {
|
|
|
110
109
|
result: task.result
|
|
111
110
|
};
|
|
112
111
|
}
|
|
113
|
-
|
|
114
112
|
//#endregion
|
|
115
113
|
//#region src/components/features/task-queue/constants.ts
|
|
116
114
|
const TASK_QUEUE_DEFAULTS = {
|
|
@@ -120,7 +118,6 @@ const TASK_QUEUE_DEFAULTS = {
|
|
|
120
118
|
retryable: true
|
|
121
119
|
};
|
|
122
120
|
const TASK_STORAGE_KEY = "datum-task-queue";
|
|
123
|
-
|
|
124
121
|
//#endregion
|
|
125
122
|
//#region src/components/features/task-queue/utils/index.ts
|
|
126
123
|
/**
|
|
@@ -184,7 +181,6 @@ function createUserMetadata(extra) {
|
|
|
184
181
|
...extra
|
|
185
182
|
};
|
|
186
183
|
}
|
|
187
|
-
|
|
188
184
|
//#endregion
|
|
189
185
|
//#region src/components/features/task-queue/engine/storage/local-storage.ts
|
|
190
186
|
var LocalTaskStorage = class {
|
|
@@ -236,7 +232,6 @@ var LocalTaskStorage = class {
|
|
|
236
232
|
}
|
|
237
233
|
}
|
|
238
234
|
};
|
|
239
|
-
|
|
240
235
|
//#endregion
|
|
241
236
|
//#region src/components/features/task-queue/engine/storage/memory-storage.ts
|
|
242
237
|
/**
|
|
@@ -265,7 +260,6 @@ var MemoryTaskStorage = class {
|
|
|
265
260
|
this.tasks.clear();
|
|
266
261
|
}
|
|
267
262
|
};
|
|
268
|
-
|
|
269
263
|
//#endregion
|
|
270
264
|
//#region src/components/features/task-queue/engine/storage/redis-storage.ts
|
|
271
265
|
const DEFAULT_TTL = 3600 * 24 * 7;
|
|
@@ -334,7 +328,6 @@ var RedisTaskStorage = class {
|
|
|
334
328
|
else this.client.set(this.key, value).catch(() => {});
|
|
335
329
|
}
|
|
336
330
|
};
|
|
337
|
-
|
|
338
331
|
//#endregion
|
|
339
332
|
//#region src/components/features/task-queue/engine/storage/detect-storage.ts
|
|
340
333
|
/**
|
|
@@ -354,7 +347,6 @@ function detectStorage(options = {}) {
|
|
|
354
347
|
if (redisClient && redisClient.status === "ready") return new RedisTaskStorage(redisClient, storageKey);
|
|
355
348
|
return new LocalTaskStorage(storageKey);
|
|
356
349
|
}
|
|
357
|
-
|
|
358
350
|
//#endregion
|
|
359
351
|
//#region src/components/features/task-queue/engine/queue.ts
|
|
360
352
|
var TaskQueue = class {
|
|
@@ -707,7 +699,6 @@ var TaskQueue = class {
|
|
|
707
699
|
}
|
|
708
700
|
}
|
|
709
701
|
};
|
|
710
|
-
|
|
711
702
|
//#endregion
|
|
712
703
|
//#region src/components/features/task-queue/provider/task-queue-provider.tsx
|
|
713
704
|
const TaskQueueContext = createContext(null);
|
|
@@ -739,7 +730,6 @@ function TaskQueueProvider({ children, config }) {
|
|
|
739
730
|
children
|
|
740
731
|
});
|
|
741
732
|
}
|
|
742
|
-
|
|
743
733
|
//#endregion
|
|
744
734
|
//#region src/components/features/task-queue/hooks/use-task-queue.ts
|
|
745
735
|
const EMPTY_TASKS = [];
|
|
@@ -771,7 +761,6 @@ function useTaskQueue(options) {
|
|
|
771
761
|
summaryRenderContent
|
|
772
762
|
]);
|
|
773
763
|
}
|
|
774
|
-
|
|
775
764
|
//#endregion
|
|
776
765
|
//#region src/components/features/task-queue/hooks/use-task-scope.ts
|
|
777
766
|
/**
|
|
@@ -838,7 +827,6 @@ function useTasksWithLabels(tasks, params) {
|
|
|
838
827
|
}, [tasks, currentScope])
|
|
839
828
|
};
|
|
840
829
|
}
|
|
841
|
-
|
|
842
830
|
//#endregion
|
|
843
831
|
//#region src/components/features/task-queue/core/task-panel-header.tsx
|
|
844
832
|
function TaskPanelHeader() {
|
|
@@ -850,7 +838,6 @@ function TaskPanelHeader() {
|
|
|
850
838
|
})
|
|
851
839
|
});
|
|
852
840
|
}
|
|
853
|
-
|
|
854
841
|
//#endregion
|
|
855
842
|
//#region src/components/features/task-queue/core/task-panel-actions.tsx
|
|
856
843
|
function TaskPanelActions({ task }) {
|
|
@@ -921,7 +908,6 @@ function resolveActions(task) {
|
|
|
921
908
|
}
|
|
922
909
|
return task.completionActions;
|
|
923
910
|
}
|
|
924
|
-
|
|
925
911
|
//#endregion
|
|
926
912
|
//#region src/components/features/task-queue/core/task-panel-counter.tsx
|
|
927
913
|
function TaskPanelCounter({ total, completed, failed = 0, status }) {
|
|
@@ -957,7 +943,6 @@ function TaskPanelCounter({ total, completed, failed = 0, status }) {
|
|
|
957
943
|
})] }, i))
|
|
958
944
|
});
|
|
959
945
|
}
|
|
960
|
-
|
|
961
946
|
//#endregion
|
|
962
947
|
//#region src/components/features/task-queue/core/task-panel-item.tsx
|
|
963
948
|
function TaskPanelItem({ task, contextLabel, onCancel }) {
|
|
@@ -1092,7 +1077,6 @@ function TaskStatusAction({ task, onCancel }) {
|
|
|
1092
1077
|
children: formatCompletedAt(task.completedAt)
|
|
1093
1078
|
});
|
|
1094
1079
|
}
|
|
1095
|
-
|
|
1096
1080
|
//#endregion
|
|
1097
1081
|
//#region src/components/features/task-queue/core/task-panel.tsx
|
|
1098
1082
|
/**
|
|
@@ -1114,7 +1098,6 @@ function TaskPanel() {
|
|
|
1114
1098
|
})]
|
|
1115
1099
|
});
|
|
1116
1100
|
}
|
|
1117
|
-
|
|
1118
1101
|
//#endregion
|
|
1119
1102
|
//#region src/components/features/task-queue/core/task-queue-trigger.tsx
|
|
1120
1103
|
function TaskQueueTrigger({ ref, tasks, ...props }) {
|
|
@@ -1165,7 +1148,6 @@ function TaskQueueTrigger({ ref, tasks, ...props }) {
|
|
|
1165
1148
|
})
|
|
1166
1149
|
});
|
|
1167
1150
|
}
|
|
1168
|
-
|
|
1169
1151
|
//#endregion
|
|
1170
1152
|
//#region src/components/features/task-queue/core/task-summary-dialog.tsx
|
|
1171
1153
|
function getStatusConfig(status) {
|
|
@@ -1286,7 +1268,6 @@ function TaskSummaryDialog(props) {
|
|
|
1286
1268
|
})
|
|
1287
1269
|
});
|
|
1288
1270
|
}
|
|
1289
|
-
|
|
1290
1271
|
//#endregion
|
|
1291
1272
|
//#region src/components/features/task-queue/core/task-queue-dropdown.tsx
|
|
1292
1273
|
const autoOpenedForIds = /* @__PURE__ */ new Set();
|
|
@@ -1351,6 +1332,5 @@ function TaskQueueDropdown() {
|
|
|
1351
1332
|
renderContent: activeSummary.renderContent ?? summaryRenderContent
|
|
1352
1333
|
})] });
|
|
1353
1334
|
}
|
|
1354
|
-
|
|
1355
1335
|
//#endregion
|
|
1356
|
-
export { RedisTaskStorage as _, TaskPanelItem as a, createProjectMetadata as b, TaskPanelHeader as c, useCurrentScope as d, useTasksWithLabels as f, detectStorage as g, TaskQueue as h, TaskPanel as i, getContextLabel as l, TaskQueueProvider as m, TaskSummaryDialog as n, TaskPanelCounter as o, useTaskQueue as p, TaskQueueTrigger as r, TaskPanelActions as s, TaskQueueDropdown as t, matchesCurrentScope as u, LocalTaskStorage as v, createUserMetadata as x, createOrgMetadata as y };
|
|
1336
|
+
export { RedisTaskStorage as _, TaskPanelItem as a, createProjectMetadata as b, TaskPanelHeader as c, useCurrentScope as d, useTasksWithLabels as f, detectStorage as g, TaskQueue as h, TaskPanel as i, getContextLabel as l, TaskQueueProvider as m, TaskSummaryDialog as n, TaskPanelCounter as o, useTaskQueue as p, TaskQueueTrigger as r, TaskPanelActions as s, TaskQueueDropdown as t, matchesCurrentScope as u, LocalTaskStorage as v, createUserMetadata as x, createOrgMetadata as y };
|
package/dist/textarea/index.mjs
CHANGED