@devalok/shilp-sutra 0.31.0 → 0.32.0
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/dist/_chunks/badge-group.js +123 -172
- package/dist/_chunks/document-preview.js +92 -0
- package/dist/_chunks/file-preview.js +511 -0
- package/dist/_chunks/image-preview.js +90 -0
- package/dist/_chunks/primitives.js +109 -109
- package/dist/_chunks/stat-row.js +144 -124
- package/dist/_chunks/use-calendar.js +558 -490
- package/dist/ai/block-renderer.d.ts +2 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +30 -29
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +18 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +126 -125
- package/dist/ai/conversation.d.ts +13 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +78 -78
- package/dist/ai/types.d.ts +0 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +0 -1
- package/dist/composed/bulk-action-bar.d.ts +6 -4
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +102 -58
- package/dist/composed/command-palette.d.ts +9 -0
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +68 -68
- package/dist/composed/confirm-dialog.d.ts +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +10 -10
- package/dist/composed/date-picker/date-picker.d.ts +11 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +39 -36
- package/dist/composed/emoji-picker.d.ts +6 -0
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +22 -20
- package/dist/composed/error-boundary.d.ts +21 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +47 -32
- package/dist/composed/file-preview/audio-preview.d.ts +7 -0
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/document-preview.d.ts +7 -0
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/embed-preview.d.ts +7 -0
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/image-preview.d.ts +7 -0
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/shared.d.ts +20 -0
- package/dist/composed/file-preview/shared.d.ts.map +1 -0
- package/dist/composed/file-preview/video-preview.d.ts +6 -0
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +10 -662
- package/dist/composed/filter-bar.d.ts +10 -2
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +42 -43
- package/dist/composed/form-section.d.ts +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +22 -21
- package/dist/composed/index.d.ts +2 -2
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +58 -57
- package/dist/composed/inline-edit.d.ts +1 -1
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +33 -32
- package/dist/composed/markdown-viewer.d.ts +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +60 -59
- package/dist/composed/master-detail.d.ts +11 -7
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +123 -84
- package/dist/composed/responsive-overlay.d.ts +8 -0
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.d.ts +11 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +21 -20
- package/dist/composed/schedule-view.d.ts +9 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +8 -4
- package/dist/hooks/use-touch-device.d.ts +12 -0
- package/dist/hooks/use-touch-device.d.ts.map +1 -0
- package/dist/hooks/use-touch-device.js +13 -0
- package/dist/hooks/use-viewport-height.d.ts +11 -0
- package/dist/hooks/use-viewport-height.d.ts.map +1 -0
- package/dist/hooks/use-viewport-height.js +16 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +72 -63
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +77 -77
- package/dist/shell/top-bar.d.ts +2 -2
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +61 -60
- package/dist/tailwind/index.cjs +51 -7
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +51 -7
- package/dist/tokens/primitives.css +3 -1
- package/dist/tokens/semantic.css +16 -13
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +38 -39
- package/dist/ui/badge.d.ts +104 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +8 -7
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -74
- package/dist/ui/card.js +24 -24
- package/dist/ui/charts/area-chart.d.ts +2 -0
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +2 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +583 -577
- package/dist/ui/charts/line-chart.d.ts +2 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -0
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +2 -0
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +36 -27
- package/dist/ui/color-input.js +5 -5
- package/dist/ui/combobox.d.ts +6 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/data-table-body.d.ts +12 -0
- package/dist/ui/data-table-body.d.ts.map +1 -0
- package/dist/ui/data-table-body.js +219 -0
- package/dist/ui/data-table-bulk-actions.d.ts +19 -0
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +61 -0
- package/dist/ui/data-table-card.d.ts +9 -0
- package/dist/ui/data-table-card.d.ts.map +1 -0
- package/dist/ui/data-table-card.js +73 -0
- package/dist/ui/data-table-context.d.ts +62 -0
- package/dist/ui/data-table-context.d.ts.map +1 -0
- package/dist/ui/data-table-context.js +48 -0
- package/dist/ui/data-table-header.d.ts +10 -0
- package/dist/ui/data-table-header.d.ts.map +1 -0
- package/dist/ui/data-table-header.js +141 -0
- package/dist/ui/data-table-pagination.d.ts +13 -0
- package/dist/ui/data-table-pagination.d.ts.map +1 -0
- package/dist/ui/data-table-pagination.js +84 -0
- package/dist/ui/data-table.d.ts +11 -9
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +258 -573
- package/dist/ui/dialog.d.ts +6 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +84 -82
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +3 -3
- package/dist/ui/icon-group.d.ts +2 -4
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +22 -23
- package/dist/ui/index.d.ts +1 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +94 -99
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts +16 -0
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -73
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +40 -44
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +19 -17
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +107 -32
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +80 -80
- package/dist/ui/progress.js +4 -4
- package/dist/ui/radio.d.ts +5 -2
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +29 -20
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +13 -12
- package/dist/ui/segmented-control.d.ts +6 -108
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +86 -272
- package/dist/ui/select.js +5 -5
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts +2 -0
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +102 -84
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +200 -175
- package/dist/ui/slider.js +14 -14
- package/dist/ui/status-dot.js +8 -8
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +33 -31
- package/dist/ui/switch.js +3 -3
- package/dist/ui/tabs.js +6 -6
- package/dist/ui/toast-types.d.ts +0 -1
- package/dist/ui/toast-types.d.ts.map +1 -1
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +156 -150
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.js +3 -3
- package/docs/components/ui/data-table-body.md +13 -0
- package/docs/components/ui/data-table-bulk-actions.md +13 -0
- package/docs/components/ui/data-table-card.md +13 -0
- package/docs/components/ui/data-table-context.md +13 -0
- package/docs/components/ui/data-table-header.md +13 -0
- package/docs/components/ui/data-table-pagination.md +13 -0
- package/llms-full.txt +79 -48
- package/llms.txt +32 -0
- package/package.json +1 -6
- package/dist/ui/chip.d.ts +0 -19
- package/dist/ui/chip.d.ts.map +0 -1
- package/dist/ui/chip.js +0 -14
- package/dist/ui/lib/use-ripple.d.ts +0 -14
- package/dist/ui/lib/use-ripple.d.ts.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { cn as m } from "../ui/lib/utils.js";
|
|
5
5
|
import { springs as u } from "../ui/lib/motion.js";
|
|
6
6
|
import { Skeleton as f } from "../ui/skeleton.js";
|
|
7
|
-
import { Popover as
|
|
7
|
+
import { Popover as P, PopoverTrigger as v, PopoverContent as S } from "../ui/popover.js";
|
|
8
8
|
import { A as x, m as h } from "../_chunks/framer.js";
|
|
9
|
-
const
|
|
9
|
+
const j = n.lazy(
|
|
10
10
|
() => import("@emoji-mart/react").then((t) => ({
|
|
11
11
|
default: t.default
|
|
12
12
|
}))
|
|
13
13
|
);
|
|
14
|
-
function
|
|
14
|
+
function E(t) {
|
|
15
15
|
return t !== "auto" ? t : typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function y({
|
|
18
18
|
onSelect: t,
|
|
19
19
|
theme: r = "auto",
|
|
20
20
|
previewPosition: s = "none",
|
|
21
21
|
skinTonePosition: c = "search",
|
|
22
22
|
className: o
|
|
23
23
|
}) {
|
|
24
|
-
const [d, l] = n.useState(!1), [
|
|
24
|
+
const [d, l] = n.useState(!1), [i, a] = n.useState(null);
|
|
25
25
|
return n.useEffect(() => {
|
|
26
26
|
l(!0), import("@emoji-mart/data").then((p) => {
|
|
27
|
-
|
|
27
|
+
a(p.default);
|
|
28
28
|
});
|
|
29
|
-
}, []), /* @__PURE__ */ e(x, { mode: "wait", children: d && !!
|
|
29
|
+
}, []), /* @__PURE__ */ e(x, { mode: "wait", children: d && !!i ? /* @__PURE__ */ e(
|
|
30
30
|
h.div,
|
|
31
31
|
{
|
|
32
32
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -38,11 +38,11 @@ function w({
|
|
|
38
38
|
{
|
|
39
39
|
fallback: /* @__PURE__ */ e("div", { className: m("rounded-ds-lg", o), children: /* @__PURE__ */ e(f, { className: "h-[435px] w-[352px] rounded-ds-lg" }) }),
|
|
40
40
|
children: /* @__PURE__ */ e(
|
|
41
|
-
|
|
41
|
+
j,
|
|
42
42
|
{
|
|
43
|
-
data:
|
|
43
|
+
data: i,
|
|
44
44
|
onEmojiSelect: t,
|
|
45
|
-
theme:
|
|
45
|
+
theme: E(r),
|
|
46
46
|
previewPosition: s,
|
|
47
47
|
skinTonePosition: c
|
|
48
48
|
}
|
|
@@ -64,7 +64,7 @@ function w({
|
|
|
64
64
|
"skeleton"
|
|
65
65
|
) });
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function w({
|
|
68
68
|
children: t,
|
|
69
69
|
align: r = "start",
|
|
70
70
|
onSelect: s,
|
|
@@ -73,20 +73,20 @@ function z({
|
|
|
73
73
|
skinTonePosition: d,
|
|
74
74
|
className: l
|
|
75
75
|
}) {
|
|
76
|
-
const [
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ e(
|
|
76
|
+
const [i, a] = n.useState(!1);
|
|
77
|
+
return /* @__PURE__ */ k(P, { open: i, onOpenChange: a, children: [
|
|
78
|
+
/* @__PURE__ */ e(v, { asChild: !0, children: t }),
|
|
79
79
|
/* @__PURE__ */ e(
|
|
80
|
-
|
|
80
|
+
S,
|
|
81
81
|
{
|
|
82
82
|
align: r,
|
|
83
83
|
className: "w-auto border-none bg-transparent p-0 shadow-none",
|
|
84
84
|
sideOffset: 8,
|
|
85
85
|
children: /* @__PURE__ */ e(
|
|
86
|
-
|
|
86
|
+
y,
|
|
87
87
|
{
|
|
88
88
|
onSelect: (p) => {
|
|
89
|
-
s(p),
|
|
89
|
+
s(p), a(!1);
|
|
90
90
|
},
|
|
91
91
|
theme: c,
|
|
92
92
|
previewPosition: o,
|
|
@@ -98,7 +98,9 @@ function z({
|
|
|
98
98
|
)
|
|
99
99
|
] });
|
|
100
100
|
}
|
|
101
|
+
y.displayName = "EmojiPicker";
|
|
102
|
+
w.displayName = "EmojiPickerPopover";
|
|
101
103
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
y as EmojiPicker,
|
|
105
|
+
w as EmojiPickerPopover
|
|
104
106
|
};
|
|
@@ -5,5 +5,25 @@ export interface ErrorDisplayProps extends React.ComponentPropsWithoutRef<'div'>
|
|
|
5
5
|
onReset?: () => void;
|
|
6
6
|
}
|
|
7
7
|
declare const ErrorDisplay: React.ForwardRefExoticComponent<ErrorDisplayProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
|
|
8
|
+
interface ErrorBoundaryProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/** Optional callback when the user clicks "Try Again" */
|
|
11
|
+
onReset?: () => void;
|
|
12
|
+
/** Optional custom fallback — receives the caught error. Defaults to ErrorDisplay. */
|
|
13
|
+
fallback?: (props: {
|
|
14
|
+
error: unknown;
|
|
15
|
+
onReset?: () => void;
|
|
16
|
+
}) => React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
interface ErrorBoundaryState {
|
|
19
|
+
error: unknown | null;
|
|
20
|
+
}
|
|
21
|
+
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
22
|
+
constructor(props: ErrorBoundaryProps);
|
|
23
|
+
static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
|
|
24
|
+
private handleReset;
|
|
25
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
export { ErrorDisplay, ErrorBoundary };
|
|
28
|
+
export type { ErrorBoundaryProps };
|
|
9
29
|
//# sourceMappingURL=error-boundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/composed/error-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC9E,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAmFD,QAAA,MAAM,YAAY,0FA2EjB,CAAA;AAID,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/composed/error-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC9E,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAmFD,QAAA,MAAM,YAAY,0FA2EjB,CAAA;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAA;CAChF;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CACtB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACrE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB;IAInE,OAAO,CAAC,WAAW,CAGlB;IAED,MAAM;CASP;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAA;AACtC,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { IconAlertTriangle as x, IconServerOff as b, IconBan as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Button as
|
|
2
|
+
import { jsx as s, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { IconAlertTriangle as x, IconServerOff as b, IconBan as v, IconFileUnknown as y } from "@tabler/icons-react";
|
|
5
|
+
import { Icon as w } from "../ui/icon.js";
|
|
6
|
+
import { Button as C } from "../ui/button.js";
|
|
7
7
|
import { cn as c } from "../ui/lib/utils.js";
|
|
8
|
-
function
|
|
8
|
+
function E(e) {
|
|
9
9
|
if (e && typeof e == "object" && "status" in e && typeof e.status == "number")
|
|
10
10
|
return e.status;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function N(e) {
|
|
13
13
|
if (e instanceof Error)
|
|
14
14
|
return e.message;
|
|
15
15
|
if (e && typeof e == "object" && "data" in e) {
|
|
16
|
-
const
|
|
17
|
-
if (typeof
|
|
18
|
-
if (
|
|
19
|
-
return String(
|
|
16
|
+
const t = e.data;
|
|
17
|
+
if (typeof t == "string") return t;
|
|
18
|
+
if (t && typeof t == "object" && "message" in t)
|
|
19
|
+
return String(t.message);
|
|
20
20
|
}
|
|
21
21
|
if (typeof e == "string")
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function k(e) {
|
|
25
25
|
if (e instanceof Error)
|
|
26
26
|
return e.stack;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function S(e) {
|
|
29
29
|
switch (e) {
|
|
30
30
|
case 404:
|
|
31
31
|
return {
|
|
32
|
-
icon:
|
|
32
|
+
icon: y,
|
|
33
33
|
title: "Page not found",
|
|
34
34
|
message: "The page you are looking for does not exist or has been moved.",
|
|
35
35
|
bgClass: "bg-accent-2",
|
|
@@ -37,7 +37,7 @@ function k(e) {
|
|
|
37
37
|
};
|
|
38
38
|
case 403:
|
|
39
39
|
return {
|
|
40
|
-
icon:
|
|
40
|
+
icon: v,
|
|
41
41
|
title: "Access denied",
|
|
42
42
|
message: "You do not have permission to view this page. Contact your administrator if you believe this is a mistake.",
|
|
43
43
|
bgClass: "bg-warning-3",
|
|
@@ -61,25 +61,25 @@ function k(e) {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
function({ error:
|
|
66
|
-
const o =
|
|
67
|
-
return /* @__PURE__ */
|
|
64
|
+
const d = l.forwardRef(
|
|
65
|
+
function({ error: t, onReset: a, className: f, ...u }, m) {
|
|
66
|
+
const o = E(t), g = N(t), i = k(t), p = typeof process < "u" && process.env && process.env.NODE_ENV === "development", r = S(o), h = r.icon;
|
|
67
|
+
return /* @__PURE__ */ s("div", { ref: m, ...u, className: c("flex min-h-[60vh] items-center justify-center p-ds-05", f), children: /* @__PURE__ */ n(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
className: "flex w-full max-w-lg flex-col items-center gap-ds-06 rounded-ds-xl border border-surface-border-strong bg-surface-raised p-ds-07 text-center shadow-raised",
|
|
71
71
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ s(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: c(
|
|
76
76
|
"flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-2xl",
|
|
77
77
|
r.bgClass
|
|
78
78
|
),
|
|
79
|
-
children: /* @__PURE__ */
|
|
80
|
-
|
|
79
|
+
children: /* @__PURE__ */ s(
|
|
80
|
+
w,
|
|
81
81
|
{
|
|
82
|
-
icon:
|
|
82
|
+
icon: h,
|
|
83
83
|
size: "2xl",
|
|
84
84
|
className: r.iconClass
|
|
85
85
|
}
|
|
@@ -91,11 +91,11 @@ const S = p.forwardRef(
|
|
|
91
91
|
"Error ",
|
|
92
92
|
o
|
|
93
93
|
] }),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ s("h2", { className: "text-ds-2xl font-semibold text-surface-fg", children: r.title }),
|
|
95
|
+
/* @__PURE__ */ s("p", { className: "text-ds-base text-surface-fg-subtle", children: g || r.message })
|
|
96
96
|
] }),
|
|
97
|
-
a && /* @__PURE__ */
|
|
98
|
-
|
|
97
|
+
a && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: /* @__PURE__ */ s(
|
|
98
|
+
C,
|
|
99
99
|
{
|
|
100
100
|
variant: "outline",
|
|
101
101
|
size: "md",
|
|
@@ -103,16 +103,31 @@ const S = p.forwardRef(
|
|
|
103
103
|
children: "Try Again"
|
|
104
104
|
}
|
|
105
105
|
) }),
|
|
106
|
-
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
106
|
+
p && i && /* @__PURE__ */ n("div", { className: "w-full overflow-auto rounded-ds-lg border border-surface-border-strong bg-surface-raised p-ds-05 text-left", children: [
|
|
107
|
+
/* @__PURE__ */ s("p", { className: "text-ds-sm mb-ds-03 font-semibold text-surface-fg", children: "Stack Trace (development only)" }),
|
|
108
|
+
/* @__PURE__ */ s("pre", { className: "whitespace-pre-wrap text-ds-sm text-surface-fg-subtle", children: i })
|
|
109
109
|
] })
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
) });
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
|
|
115
|
+
d.displayName = "ErrorDisplay";
|
|
116
|
+
class A extends l.Component {
|
|
117
|
+
constructor(t) {
|
|
118
|
+
super(t), this.state = { error: null };
|
|
119
|
+
}
|
|
120
|
+
static getDerivedStateFromError(t) {
|
|
121
|
+
return { error: t };
|
|
122
|
+
}
|
|
123
|
+
handleReset = () => {
|
|
124
|
+
this.setState({ error: null }), this.props.onReset?.();
|
|
125
|
+
};
|
|
126
|
+
render() {
|
|
127
|
+
return this.state.error !== null ? this.props.fallback ? this.props.fallback({ error: this.state.error, onReset: this.handleReset }) : /* @__PURE__ */ s(d, { error: this.state.error, onReset: this.handleReset }) : this.props.children;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
116
130
|
export {
|
|
117
|
-
|
|
131
|
+
A as ErrorBoundary,
|
|
132
|
+
d as ErrorDisplay
|
|
118
133
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/audio-preview.tsx"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8KnI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/document-preview.tsx"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CAmG3I"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/embed-preview.tsx"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8BlI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/image-preview.tsx"],"names":[],"mappings":"AAuBA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA6GzH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare function ErrorFallback({ message, url }: {
|
|
4
|
+
message: string;
|
|
5
|
+
url: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Toolbar({ children, className }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function ToolbarDivider(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function VolumeControl({ volume, muted, onVolumeChange, onMuteToggle, variant, }: {
|
|
13
|
+
volume: number;
|
|
14
|
+
muted: boolean;
|
|
15
|
+
onVolumeChange: (v: number) => void;
|
|
16
|
+
onMuteToggle: () => void;
|
|
17
|
+
variant?: 'light' | 'dark';
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function formatTime(s: number): string;
|
|
20
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,2CAa/E;AAMD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAcjG;AAED,wBAAgB,cAAc,4CAE7B;AAOD,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,cAAc,EACd,YAAY,EACZ,OAAiB,GAClB,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC3B,2CAuEA;AAMD,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAO5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/video-preview.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8NtG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/composed/file-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/composed/file-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAC7F,GAAG,EAAE,MAAM,CAAA;IACX,iDAAiD;IACjD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AA8CD,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,GAAG,EACH,WAAe,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuClB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,QAAQ,EAAE,CAAA"}
|