camox 0.14.2 → 0.16.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/components/AuthGate.js +6 -0
- package/dist/core/components/AddBlockControlBar.js +30 -26
- package/dist/core/components/lexical/InlineContentEditable.js +19 -15
- package/dist/core/components/lexical/InlineLexicalEditor.js +62 -42
- package/dist/core/components/lexical/SelectionBroadcaster.js +25 -21
- package/dist/core/components/lexical/SidebarLexicalEditor.js +33 -21
- package/dist/core/createBlock.js +524 -488
- package/dist/core/createLayout.js +40 -28
- package/dist/core/hooks/useFieldSelection.js +12 -8
- package/dist/core/hooks/useIsEditable.js +6 -0
- package/dist/core/hooks/useOverlayMessage.js +19 -15
- package/dist/core/lib/contentType.d.ts +8 -8
- package/dist/core/lib/contentType.js +63 -0
- package/dist/features/content/CamoxContent.js +92 -88
- package/dist/features/content/components/AssetCard.js +46 -42
- package/dist/features/content/components/AssetCardSkeleton.js +8 -4
- package/dist/features/content/components/ContentSidebar.js +8 -4
- package/dist/features/content/components/UploadDropZone.js +31 -27
- package/dist/features/content/components/UploadProgressDrawer.js +98 -90
- package/dist/features/preview/CamoxPreview.js +162 -146
- package/dist/features/preview/components/AddBlockSheet.js +105 -101
- package/dist/features/preview/components/AgentChatSheet.js +74 -21
- package/dist/features/preview/components/AssetFieldEditor.js +98 -90
- package/dist/features/preview/components/AssetLightbox.js +21 -17
- package/dist/features/preview/components/AssetPickerGrid.js +84 -80
- package/dist/features/preview/components/BlockActionsPopover.js +35 -31
- package/dist/features/preview/components/BlockErrorBoundary.js +12 -8
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/DebouncedFieldEditor.js +41 -37
- package/dist/features/preview/components/EditPageModal.js +114 -98
- package/dist/features/preview/components/FieldOverlayStyles.js +8 -4
- package/dist/features/preview/components/FieldToolbar.js +95 -54
- package/dist/features/preview/components/Frame.js +50 -46
- package/dist/features/preview/components/ItemFieldsEditor.js +81 -79
- package/dist/features/preview/components/LinkFieldEditor.js +138 -134
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +105 -97
- package/dist/features/preview/components/OverlayTracker.js +19 -15
- package/dist/features/preview/components/Overlays.js +27 -23
- package/dist/features/preview/components/PageContentSheet.js +54 -4
- package/dist/features/preview/components/PageLocationFieldset.js +113 -109
- package/dist/features/preview/components/PagePicker.js +1 -1
- package/dist/features/preview/components/PageTree.js +443 -399
- package/dist/features/preview/components/PeekedBlock.js +69 -65
- package/dist/features/preview/components/PreviewPanel.js +64 -52
- package/dist/features/preview/components/PreviewSideSheet.js +25 -16
- package/dist/features/preview/components/PreviewToolbar.js +127 -123
- package/dist/features/preview/components/RepeatableItemsList.js +176 -171
- package/dist/features/preview/components/ShikiMarkdown.js +18 -14
- package/dist/features/preview/components/UnlinkAssetButton.js +74 -70
- package/dist/features/preview/components/useRepeatableItemActions.js +266 -0
- package/dist/features/preview/components/useUpdateBlockPosition.js +13 -9
- package/dist/features/provider/CamoxProvider.js +60 -52
- package/dist/features/provider/components/CamoxAppContext.js +10 -6
- package/dist/features/provider/components/CommandPalette.js +77 -69
- package/dist/features/provider/useAdminShortcuts.js +11 -7
- package/dist/features/routes/pageRoute.js +8 -4
- package/dist/features/studio/CamoxStudio.js +23 -19
- package/dist/features/studio/components/EnvironmentMenu.js +32 -28
- package/dist/features/studio/components/Navbar.js +62 -54
- package/dist/features/studio/components/ProjectMenu.js +131 -123
- package/dist/features/studio/components/UserButton.js +15 -11
- package/dist/features/studio/useTheme.js +82 -42
- package/dist/features/vite/definitionsSync.js +5 -5
- package/dist/features/vite/skillGeneration.js +43 -8
- package/dist/features/vite/vite.d.ts +1 -1
- package/dist/features/vite/vite.js +20 -2
- package/dist/hooks/use-marquee-selection.js +36 -32
- package/dist/lib/auth.js +49 -22
- package/dist/lib/normalized-data.js +55 -47
- package/dist/lib/use-project-room.js +22 -18
- package/dist/studio.css +1 -1
- package/package.json +10 -11
- package/skills/camox-block/SKILL.md +4 -0
- package/skills/camox-cli/SKILL.md +142 -0
- package/skills/camox-layout/SKILL.md +4 -0
|
@@ -5,50 +5,54 @@ import { FileIcon } from "lucide-react";
|
|
|
5
5
|
|
|
6
6
|
//#region src/features/content/components/AssetCard.tsx
|
|
7
7
|
const AssetCard = (t0) => {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(26);
|
|
9
|
+
if ($[0] !== "62dab0d9b73ffb903a48127d8b52340688d238c98cfa8a817c9ae69dc68148ec") {
|
|
10
|
+
for (let $i = 0; $i < 26; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
11
|
+
$[0] = "62dab0d9b73ffb903a48127d8b52340688d238c98cfa8a817c9ae69dc68148ec";
|
|
12
|
+
}
|
|
9
13
|
const { file, selected, onSelect, onOpen } = t0;
|
|
10
14
|
let t1;
|
|
11
|
-
if ($[
|
|
15
|
+
if ($[1] !== file.mimeType) {
|
|
12
16
|
t1 = file.mimeType?.startsWith("image/");
|
|
13
|
-
$[
|
|
14
|
-
$[
|
|
15
|
-
} else t1 = $[
|
|
17
|
+
$[1] = file.mimeType;
|
|
18
|
+
$[2] = t1;
|
|
19
|
+
} else t1 = $[2];
|
|
16
20
|
const isImage = t1;
|
|
17
21
|
let t2;
|
|
18
|
-
if ($[
|
|
22
|
+
if ($[3] !== file.filename) {
|
|
19
23
|
t2 = file.filename?.split(".").pop()?.toUpperCase() ?? "";
|
|
20
|
-
$[
|
|
21
|
-
$[
|
|
22
|
-
} else t2 = $[
|
|
24
|
+
$[3] = file.filename;
|
|
25
|
+
$[4] = t2;
|
|
26
|
+
} else t2 = $[4];
|
|
23
27
|
const extension = t2;
|
|
24
28
|
const t3 = file.id;
|
|
25
29
|
const t4 = selected ? "bg-primary/20 border-2 border-primary" : "hover:bg-accent/75";
|
|
26
30
|
let t5;
|
|
27
|
-
if ($[
|
|
31
|
+
if ($[5] !== t4) {
|
|
28
32
|
t5 = cn("group flex flex-col gap-1.5 rounded-lg p-2 text-left border-2 border-transparent", t4);
|
|
29
|
-
$[
|
|
30
|
-
$[
|
|
31
|
-
} else t5 = $[
|
|
33
|
+
$[5] = t4;
|
|
34
|
+
$[6] = t5;
|
|
35
|
+
} else t5 = $[6];
|
|
32
36
|
let t6;
|
|
33
|
-
if ($[
|
|
37
|
+
if ($[7] !== onSelect) {
|
|
34
38
|
t6 = (e) => {
|
|
35
39
|
e.stopPropagation();
|
|
36
40
|
onSelect();
|
|
37
41
|
};
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
40
|
-
} else t6 = $[
|
|
42
|
+
$[7] = onSelect;
|
|
43
|
+
$[8] = t6;
|
|
44
|
+
} else t6 = $[8];
|
|
41
45
|
let t7;
|
|
42
|
-
if ($[
|
|
46
|
+
if ($[9] !== onOpen) {
|
|
43
47
|
t7 = (e_0) => {
|
|
44
48
|
e_0.stopPropagation();
|
|
45
49
|
onOpen();
|
|
46
50
|
};
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
} else t7 = $[
|
|
51
|
+
$[9] = onOpen;
|
|
52
|
+
$[10] = t7;
|
|
53
|
+
} else t7 = $[10];
|
|
50
54
|
let t8;
|
|
51
|
-
if ($[
|
|
55
|
+
if ($[11] !== extension || $[12] !== file.alt || $[13] !== file.filename || $[14] !== file.url || $[15] !== isImage) {
|
|
52
56
|
t8 = /* @__PURE__ */ jsx("div", {
|
|
53
57
|
className: "bg-muted flex aspect-4/3 w-full items-center justify-center overflow-hidden rounded-sm",
|
|
54
58
|
children: isImage ? /* @__PURE__ */ jsx("img", {
|
|
@@ -64,24 +68,24 @@ const AssetCard = (t0) => {
|
|
|
64
68
|
})]
|
|
65
69
|
})
|
|
66
70
|
});
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
$[
|
|
72
|
-
$[
|
|
73
|
-
} else t8 = $[
|
|
71
|
+
$[11] = extension;
|
|
72
|
+
$[12] = file.alt;
|
|
73
|
+
$[13] = file.filename;
|
|
74
|
+
$[14] = file.url;
|
|
75
|
+
$[15] = isImage;
|
|
76
|
+
$[16] = t8;
|
|
77
|
+
} else t8 = $[16];
|
|
74
78
|
let t9;
|
|
75
|
-
if ($[
|
|
79
|
+
if ($[17] !== file.filename) {
|
|
76
80
|
t9 = /* @__PURE__ */ jsx("p", {
|
|
77
81
|
className: "line-clamp-2 px-0.5 text-xs break-all",
|
|
78
82
|
children: file.filename
|
|
79
83
|
});
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
} else t9 = $[
|
|
84
|
+
$[17] = file.filename;
|
|
85
|
+
$[18] = t9;
|
|
86
|
+
} else t9 = $[18];
|
|
83
87
|
let t10;
|
|
84
|
-
if ($[
|
|
88
|
+
if ($[19] !== file.id || $[20] !== t5 || $[21] !== t6 || $[22] !== t7 || $[23] !== t8 || $[24] !== t9) {
|
|
85
89
|
t10 = /* @__PURE__ */ jsxs("button", {
|
|
86
90
|
type: "button",
|
|
87
91
|
"data-asset-id": t3,
|
|
@@ -90,14 +94,14 @@ const AssetCard = (t0) => {
|
|
|
90
94
|
onDoubleClick: t7,
|
|
91
95
|
children: [t8, t9]
|
|
92
96
|
});
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
} else t10 = $[
|
|
97
|
+
$[19] = file.id;
|
|
98
|
+
$[20] = t5;
|
|
99
|
+
$[21] = t6;
|
|
100
|
+
$[22] = t7;
|
|
101
|
+
$[23] = t8;
|
|
102
|
+
$[24] = t9;
|
|
103
|
+
$[25] = t10;
|
|
104
|
+
} else t10 = $[25];
|
|
101
105
|
return t10;
|
|
102
106
|
};
|
|
103
107
|
|
|
@@ -4,15 +4,19 @@ import { Skeleton } from "@camox/ui/skeleton";
|
|
|
4
4
|
|
|
5
5
|
//#region src/features/content/components/AssetCardSkeleton.tsx
|
|
6
6
|
const AssetCardSkeleton = () => {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(2);
|
|
8
|
+
if ($[0] !== "8482af88dbf68759f07a7fd9d987585773fb02742da8f06d71c01356bc4d8461") {
|
|
9
|
+
for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
10
|
+
$[0] = "8482af88dbf68759f07a7fd9d987585773fb02742da8f06d71c01356bc4d8461";
|
|
11
|
+
}
|
|
8
12
|
let t0;
|
|
9
|
-
if ($[
|
|
13
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10
14
|
t0 = /* @__PURE__ */ jsxs("div", {
|
|
11
15
|
className: "flex flex-col gap-1.5 rounded-lg p-2",
|
|
12
16
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "aspect-4/3 w-full rounded-md" }), /* @__PURE__ */ jsx(Skeleton, { className: "mx-0.5 h-3.5 w-3/4" })]
|
|
13
17
|
});
|
|
14
|
-
$[
|
|
15
|
-
} else t0 = $[
|
|
18
|
+
$[1] = t0;
|
|
19
|
+
} else t0 = $[1];
|
|
16
20
|
return t0;
|
|
17
21
|
};
|
|
18
22
|
|
|
@@ -4,9 +4,13 @@ import { ImageIcon } from "lucide-react";
|
|
|
4
4
|
|
|
5
5
|
//#region src/features/content/components/ContentSidebar.tsx
|
|
6
6
|
const ContentSidebar = () => {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(2);
|
|
8
|
+
if ($[0] !== "99c3497dbd0e23b64f180c215c65800585b3d7d6e4b4835c7c6beb6e8a25355a") {
|
|
9
|
+
for (let $i = 0; $i < 2; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
10
|
+
$[0] = "99c3497dbd0e23b64f180c215c65800585b3d7d6e4b4835c7c6beb6e8a25355a";
|
|
11
|
+
}
|
|
8
12
|
let t0;
|
|
9
|
-
if ($[
|
|
13
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10
14
|
t0 = /* @__PURE__ */ jsx("div", {
|
|
11
15
|
className: "flex w-[220px] flex-col border-r-2 p-2",
|
|
12
16
|
children: /* @__PURE__ */ jsxs("button", {
|
|
@@ -15,8 +19,8 @@ const ContentSidebar = () => {
|
|
|
15
19
|
children: [/* @__PURE__ */ jsx(ImageIcon, { className: "h-4 w-4" }), "Assets"]
|
|
16
20
|
})
|
|
17
21
|
});
|
|
18
|
-
$[
|
|
19
|
-
} else t0 = $[
|
|
22
|
+
$[1] = t0;
|
|
23
|
+
} else t0 = $[1];
|
|
20
24
|
return t0;
|
|
21
25
|
};
|
|
22
26
|
|
|
@@ -6,36 +6,40 @@ import { Upload } from "lucide-react";
|
|
|
6
6
|
|
|
7
7
|
//#region src/features/content/components/UploadDropZone.tsx
|
|
8
8
|
function UploadDropZone(t0) {
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(15);
|
|
10
|
+
if ($[0] !== "e31ae4b0282f0aa7fc6688fbbc94a646974a560b3692e1092a971e6f3bb3f86a") {
|
|
11
|
+
for (let $i = 0; $i < 15; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
12
|
+
$[0] = "e31ae4b0282f0aa7fc6688fbbc94a646974a560b3692e1092a971e6f3bb3f86a";
|
|
13
|
+
}
|
|
10
14
|
const { onDrop, children, className, label: t1 } = t0;
|
|
11
15
|
const label = t1 === void 0 ? "Drop files to upload" : t1;
|
|
12
16
|
const [isDragging, setIsDragging] = useState(false);
|
|
13
17
|
const dragCounter = useRef(0);
|
|
14
18
|
let t2;
|
|
15
|
-
if ($[
|
|
19
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
16
20
|
t2 = (e) => {
|
|
17
21
|
e.preventDefault();
|
|
18
22
|
e.stopPropagation();
|
|
19
23
|
dragCounter.current = dragCounter.current + 1;
|
|
20
24
|
if (dragCounter.current === 1) setIsDragging(true);
|
|
21
25
|
};
|
|
22
|
-
$[
|
|
23
|
-
} else t2 = $[
|
|
26
|
+
$[1] = t2;
|
|
27
|
+
} else t2 = $[1];
|
|
24
28
|
const handleDragEnter = t2;
|
|
25
29
|
let t3;
|
|
26
|
-
if ($[
|
|
30
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
27
31
|
t3 = (e_0) => {
|
|
28
32
|
e_0.preventDefault();
|
|
29
33
|
e_0.stopPropagation();
|
|
30
34
|
dragCounter.current = dragCounter.current - 1;
|
|
31
35
|
if (dragCounter.current === 0) setIsDragging(false);
|
|
32
36
|
};
|
|
33
|
-
$[
|
|
34
|
-
} else t3 = $[
|
|
37
|
+
$[2] = t3;
|
|
38
|
+
} else t3 = $[2];
|
|
35
39
|
const handleDragLeave = t3;
|
|
36
40
|
const handleDragOver = _temp;
|
|
37
41
|
let t4;
|
|
38
|
-
if ($[
|
|
42
|
+
if ($[3] !== onDrop) {
|
|
39
43
|
t4 = (e_2) => {
|
|
40
44
|
e_2.preventDefault();
|
|
41
45
|
e_2.stopPropagation();
|
|
@@ -43,18 +47,18 @@ function UploadDropZone(t0) {
|
|
|
43
47
|
setIsDragging(false);
|
|
44
48
|
if (e_2.dataTransfer.files.length > 0) onDrop(e_2.dataTransfer.files);
|
|
45
49
|
};
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
} else t4 = $[
|
|
50
|
+
$[3] = onDrop;
|
|
51
|
+
$[4] = t4;
|
|
52
|
+
} else t4 = $[4];
|
|
49
53
|
const handleDrop = t4;
|
|
50
54
|
let t5;
|
|
51
|
-
if ($[
|
|
55
|
+
if ($[5] !== className) {
|
|
52
56
|
t5 = cn("relative min-h-full", className);
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
} else t5 = $[
|
|
57
|
+
$[5] = className;
|
|
58
|
+
$[6] = t5;
|
|
59
|
+
} else t5 = $[6];
|
|
56
60
|
let t6;
|
|
57
|
-
if ($[
|
|
61
|
+
if ($[7] !== isDragging || $[8] !== label) {
|
|
58
62
|
t6 = isDragging && /* @__PURE__ */ jsx("div", {
|
|
59
63
|
className: "bg-background absolute inset-0 z-40 flex flex-col items-center justify-center gap-2 p-4",
|
|
60
64
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -65,12 +69,12 @@ function UploadDropZone(t0) {
|
|
|
65
69
|
})]
|
|
66
70
|
})
|
|
67
71
|
});
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
} else t6 = $[
|
|
72
|
+
$[7] = isDragging;
|
|
73
|
+
$[8] = label;
|
|
74
|
+
$[9] = t6;
|
|
75
|
+
} else t6 = $[9];
|
|
72
76
|
let t7;
|
|
73
|
-
if ($[
|
|
77
|
+
if ($[10] !== children || $[11] !== handleDrop || $[12] !== t5 || $[13] !== t6) {
|
|
74
78
|
t7 = /* @__PURE__ */ jsxs("div", {
|
|
75
79
|
className: t5,
|
|
76
80
|
onDragEnter: handleDragEnter,
|
|
@@ -79,12 +83,12 @@ function UploadDropZone(t0) {
|
|
|
79
83
|
onDrop: handleDrop,
|
|
80
84
|
children: [children, t6]
|
|
81
85
|
});
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
} else t7 = $[
|
|
86
|
+
$[10] = children;
|
|
87
|
+
$[11] = handleDrop;
|
|
88
|
+
$[12] = t5;
|
|
89
|
+
$[13] = t6;
|
|
90
|
+
$[14] = t7;
|
|
91
|
+
} else t7 = $[14];
|
|
88
92
|
return t7;
|
|
89
93
|
}
|
|
90
94
|
function _temp(e_1) {
|
|
@@ -5,97 +5,101 @@ import { AlertCircle, Check, ChevronDown, ChevronUp, File, Loader2, X } from "lu
|
|
|
5
5
|
|
|
6
6
|
//#region src/features/content/components/UploadProgressDrawer.tsx
|
|
7
7
|
function UploadProgressDrawer(t0) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(23);
|
|
9
|
+
if ($[0] !== "fd950cd0a238c5e34d82cdc6857c25405b7e4e2566c1b7789506b71d34f84c8f") {
|
|
10
|
+
for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
11
|
+
$[0] = "fd950cd0a238c5e34d82cdc6857c25405b7e4e2566c1b7789506b71d34f84c8f";
|
|
12
|
+
}
|
|
9
13
|
const { uploads, onClose } = t0;
|
|
10
14
|
const [collapsed, setCollapsed] = useState(false);
|
|
11
15
|
if (uploads.length === 0) return null;
|
|
12
16
|
let t1;
|
|
13
|
-
if ($[
|
|
17
|
+
if ($[1] !== uploads) {
|
|
14
18
|
t1 = uploads.filter(_temp);
|
|
15
|
-
$[
|
|
16
|
-
$[
|
|
17
|
-
} else t1 = $[
|
|
19
|
+
$[1] = uploads;
|
|
20
|
+
$[2] = t1;
|
|
21
|
+
} else t1 = $[2];
|
|
18
22
|
const completedCount = t1.length;
|
|
19
23
|
const headerText = completedCount === uploads.length ? `${completedCount} upload${completedCount !== 1 ? "s" : ""} complete` : `Uploading ${uploads.length} file${uploads.length !== 1 ? "s" : ""}`;
|
|
20
24
|
let t2;
|
|
21
|
-
if ($[
|
|
25
|
+
if ($[3] !== headerText) {
|
|
22
26
|
t2 = /* @__PURE__ */ jsx("span", {
|
|
23
27
|
className: "text-sm font-medium",
|
|
24
28
|
children: headerText
|
|
25
29
|
});
|
|
26
|
-
$[
|
|
27
|
-
$[
|
|
28
|
-
} else t2 = $[
|
|
30
|
+
$[3] = headerText;
|
|
31
|
+
$[4] = t2;
|
|
32
|
+
} else t2 = $[4];
|
|
29
33
|
let t3;
|
|
30
|
-
if ($[
|
|
34
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
35
|
t3 = () => setCollapsed(_temp2);
|
|
32
|
-
$[
|
|
33
|
-
} else t3 = $[
|
|
36
|
+
$[5] = t3;
|
|
37
|
+
} else t3 = $[5];
|
|
34
38
|
let t4;
|
|
35
|
-
if ($[
|
|
39
|
+
if ($[6] !== collapsed) {
|
|
36
40
|
t4 = /* @__PURE__ */ jsx("button", {
|
|
37
41
|
onClick: t3,
|
|
38
42
|
className: "hover:bg-muted rounded p-1",
|
|
39
43
|
children: collapsed ? /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
40
44
|
});
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
} else t4 = $[
|
|
45
|
+
$[6] = collapsed;
|
|
46
|
+
$[7] = t4;
|
|
47
|
+
} else t4 = $[7];
|
|
44
48
|
let t5;
|
|
45
|
-
if ($[
|
|
49
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
50
|
t5 = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" });
|
|
47
|
-
$[
|
|
48
|
-
} else t5 = $[
|
|
51
|
+
$[8] = t5;
|
|
52
|
+
} else t5 = $[8];
|
|
49
53
|
let t6;
|
|
50
|
-
if ($[
|
|
54
|
+
if ($[9] !== onClose) {
|
|
51
55
|
t6 = /* @__PURE__ */ jsx("button", {
|
|
52
56
|
onClick: onClose,
|
|
53
57
|
className: "hover:bg-muted rounded p-1",
|
|
54
58
|
children: t5
|
|
55
59
|
});
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
} else t6 = $[
|
|
60
|
+
$[9] = onClose;
|
|
61
|
+
$[10] = t6;
|
|
62
|
+
} else t6 = $[10];
|
|
59
63
|
let t7;
|
|
60
|
-
if ($[
|
|
64
|
+
if ($[11] !== t4 || $[12] !== t6) {
|
|
61
65
|
t7 = /* @__PURE__ */ jsxs("div", {
|
|
62
66
|
className: "flex items-center gap-1",
|
|
63
67
|
children: [t4, t6]
|
|
64
68
|
});
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
} else t7 = $[
|
|
69
|
+
$[11] = t4;
|
|
70
|
+
$[12] = t6;
|
|
71
|
+
$[13] = t7;
|
|
72
|
+
} else t7 = $[13];
|
|
69
73
|
let t8;
|
|
70
|
-
if ($[
|
|
74
|
+
if ($[14] !== t2 || $[15] !== t7) {
|
|
71
75
|
t8 = /* @__PURE__ */ jsxs("div", {
|
|
72
76
|
className: "border-border flex items-center justify-between border-b px-3 py-2",
|
|
73
77
|
children: [t2, t7]
|
|
74
78
|
});
|
|
75
|
-
$[
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
78
|
-
} else t8 = $[
|
|
79
|
+
$[14] = t2;
|
|
80
|
+
$[15] = t7;
|
|
81
|
+
$[16] = t8;
|
|
82
|
+
} else t8 = $[16];
|
|
79
83
|
let t9;
|
|
80
|
-
if ($[
|
|
84
|
+
if ($[17] !== collapsed || $[18] !== uploads) {
|
|
81
85
|
t9 = !collapsed && /* @__PURE__ */ jsx("div", {
|
|
82
86
|
className: "max-h-60 overflow-y-auto",
|
|
83
87
|
children: uploads.map(_temp3)
|
|
84
88
|
});
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
} else t9 = $[
|
|
89
|
+
$[17] = collapsed;
|
|
90
|
+
$[18] = uploads;
|
|
91
|
+
$[19] = t9;
|
|
92
|
+
} else t9 = $[19];
|
|
89
93
|
let t10;
|
|
90
|
-
if ($[
|
|
94
|
+
if ($[20] !== t8 || $[21] !== t9) {
|
|
91
95
|
t10 = /* @__PURE__ */ jsxs("div", {
|
|
92
96
|
className: "border-border bg-background fixed right-4 bottom-4 z-50 w-80 rounded-lg border shadow-lg",
|
|
93
97
|
children: [t8, t9]
|
|
94
98
|
});
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
} else t10 = $[
|
|
99
|
+
$[20] = t8;
|
|
100
|
+
$[21] = t9;
|
|
101
|
+
$[22] = t10;
|
|
102
|
+
} else t10 = $[22];
|
|
99
103
|
return t10;
|
|
100
104
|
}
|
|
101
105
|
function _temp3(item) {
|
|
@@ -108,24 +112,28 @@ function _temp(u) {
|
|
|
108
112
|
return u.status === "complete";
|
|
109
113
|
}
|
|
110
114
|
function UploadItemRow(t0) {
|
|
111
|
-
const $ = c(
|
|
115
|
+
const $ = c(27);
|
|
116
|
+
if ($[0] !== "fd950cd0a238c5e34d82cdc6857c25405b7e4e2566c1b7789506b71d34f84c8f") {
|
|
117
|
+
for (let $i = 0; $i < 27; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
118
|
+
$[0] = "fd950cd0a238c5e34d82cdc6857c25405b7e4e2566c1b7789506b71d34f84c8f";
|
|
119
|
+
}
|
|
112
120
|
const { item } = t0;
|
|
113
121
|
let t1;
|
|
114
|
-
if ($[
|
|
122
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
115
123
|
t1 = /* @__PURE__ */ jsx(File, { className: "text-muted-foreground h-4 w-4 shrink-0" });
|
|
116
|
-
$[
|
|
117
|
-
} else t1 = $[
|
|
124
|
+
$[1] = t1;
|
|
125
|
+
} else t1 = $[1];
|
|
118
126
|
let t2;
|
|
119
|
-
if ($[
|
|
127
|
+
if ($[2] !== item.filename) {
|
|
120
128
|
t2 = /* @__PURE__ */ jsx("p", {
|
|
121
129
|
className: "truncate text-sm",
|
|
122
130
|
children: item.filename
|
|
123
131
|
});
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
} else t2 = $[
|
|
132
|
+
$[2] = item.filename;
|
|
133
|
+
$[3] = t2;
|
|
134
|
+
} else t2 = $[3];
|
|
127
135
|
let t3;
|
|
128
|
-
if ($[
|
|
136
|
+
if ($[4] !== item.progress || $[5] !== item.status) {
|
|
129
137
|
t3 = item.status === "uploading" && /* @__PURE__ */ jsx("div", {
|
|
130
138
|
className: "bg-muted mt-1 h-1.5 overflow-hidden rounded-full",
|
|
131
139
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -133,22 +141,22 @@ function UploadItemRow(t0) {
|
|
|
133
141
|
style: { width: `${item.progress}%` }
|
|
134
142
|
})
|
|
135
143
|
});
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
} else t3 = $[
|
|
144
|
+
$[4] = item.progress;
|
|
145
|
+
$[5] = item.status;
|
|
146
|
+
$[6] = t3;
|
|
147
|
+
} else t3 = $[6];
|
|
140
148
|
let t4;
|
|
141
|
-
if ($[
|
|
149
|
+
if ($[7] !== item.error || $[8] !== item.status) {
|
|
142
150
|
t4 = item.status === "error" && /* @__PURE__ */ jsx("p", {
|
|
143
151
|
className: "text-destructive mt-0.5 text-xs",
|
|
144
152
|
children: item.error
|
|
145
153
|
});
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else t4 = $[
|
|
154
|
+
$[7] = item.error;
|
|
155
|
+
$[8] = item.status;
|
|
156
|
+
$[9] = t4;
|
|
157
|
+
} else t4 = $[9];
|
|
150
158
|
let t5;
|
|
151
|
-
if ($[
|
|
159
|
+
if ($[10] !== t2 || $[11] !== t3 || $[12] !== t4) {
|
|
152
160
|
t5 = /* @__PURE__ */ jsxs("div", {
|
|
153
161
|
className: "min-w-0 flex-1",
|
|
154
162
|
children: [
|
|
@@ -157,31 +165,31 @@ function UploadItemRow(t0) {
|
|
|
157
165
|
t4
|
|
158
166
|
]
|
|
159
167
|
});
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
} else t5 = $[
|
|
168
|
+
$[10] = t2;
|
|
169
|
+
$[11] = t3;
|
|
170
|
+
$[12] = t4;
|
|
171
|
+
$[13] = t5;
|
|
172
|
+
} else t5 = $[13];
|
|
165
173
|
let t6;
|
|
166
|
-
if ($[
|
|
174
|
+
if ($[14] !== item.status) {
|
|
167
175
|
t6 = item.status === "uploading" && /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" });
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
} else t6 = $[
|
|
176
|
+
$[14] = item.status;
|
|
177
|
+
$[15] = t6;
|
|
178
|
+
} else t6 = $[15];
|
|
171
179
|
let t7;
|
|
172
|
-
if ($[
|
|
180
|
+
if ($[16] !== item.status) {
|
|
173
181
|
t7 = item.status === "complete" && /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-green-500" });
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
} else t7 = $[
|
|
182
|
+
$[16] = item.status;
|
|
183
|
+
$[17] = t7;
|
|
184
|
+
} else t7 = $[17];
|
|
177
185
|
let t8;
|
|
178
|
-
if ($[
|
|
186
|
+
if ($[18] !== item.status) {
|
|
179
187
|
t8 = item.status === "error" && /* @__PURE__ */ jsx(AlertCircle, { className: "text-destructive h-4 w-4" });
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else t8 = $[
|
|
188
|
+
$[18] = item.status;
|
|
189
|
+
$[19] = t8;
|
|
190
|
+
} else t8 = $[19];
|
|
183
191
|
let t9;
|
|
184
|
-
if ($[
|
|
192
|
+
if ($[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
|
|
185
193
|
t9 = /* @__PURE__ */ jsxs("div", {
|
|
186
194
|
className: "shrink-0",
|
|
187
195
|
children: [
|
|
@@ -190,13 +198,13 @@ function UploadItemRow(t0) {
|
|
|
190
198
|
t8
|
|
191
199
|
]
|
|
192
200
|
});
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
} else t9 = $[
|
|
201
|
+
$[20] = t6;
|
|
202
|
+
$[21] = t7;
|
|
203
|
+
$[22] = t8;
|
|
204
|
+
$[23] = t9;
|
|
205
|
+
} else t9 = $[23];
|
|
198
206
|
let t10;
|
|
199
|
-
if ($[
|
|
207
|
+
if ($[24] !== t5 || $[25] !== t9) {
|
|
200
208
|
t10 = /* @__PURE__ */ jsxs("div", {
|
|
201
209
|
className: "flex items-center gap-2 px-3 py-2",
|
|
202
210
|
children: [
|
|
@@ -205,10 +213,10 @@ function UploadItemRow(t0) {
|
|
|
205
213
|
t9
|
|
206
214
|
]
|
|
207
215
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else t10 = $[
|
|
216
|
+
$[24] = t5;
|
|
217
|
+
$[25] = t9;
|
|
218
|
+
$[26] = t10;
|
|
219
|
+
} else t10 = $[26];
|
|
212
220
|
return t10;
|
|
213
221
|
}
|
|
214
222
|
|