camox 0.6.1 → 0.7.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/core/components/AddBlockControlBar.d.ts.map +1 -1
- package/dist/core/components/AddBlockControlBar.js +51 -117
- package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
- package/dist/core/components/lexical/SidebarLexicalEditor.js +1 -1
- package/dist/core/createApp.d.ts +314 -44
- package/dist/core/createApp.d.ts.map +1 -1
- package/dist/core/createBlock.d.ts +160 -22
- package/dist/core/createBlock.d.ts.map +1 -1
- package/dist/core/createBlock.js +467 -579
- package/dist/features/content/components/AssetCard.js +1 -1
- package/dist/features/preview/CamoxPreview.d.ts.map +1 -1
- package/dist/features/preview/CamoxPreview.js +12 -16
- package/dist/features/preview/components/AddBlockSheet.d.ts.map +1 -1
- package/dist/features/preview/components/AddBlockSheet.js +1 -2
- package/dist/features/preview/components/AssetLightbox.d.ts.map +1 -1
- package/dist/features/preview/components/AssetLightbox.js +13 -15
- package/dist/features/preview/components/BlockActionsPopover.d.ts.map +1 -1
- package/dist/features/preview/components/BlockActionsPopover.js +19 -22
- package/dist/features/preview/components/CreatePageSheet.d.ts.map +1 -1
- package/dist/features/preview/components/CreatePageSheet.js +10 -4
- package/dist/features/preview/components/EditPageSheet.d.ts +1 -1
- package/dist/features/preview/components/EditPageSheet.d.ts.map +1 -1
- package/dist/features/preview/components/EditPageSheet.js +20 -17
- package/dist/features/preview/components/FieldOverlayStyles.d.ts +2 -0
- package/dist/features/preview/components/FieldOverlayStyles.d.ts.map +1 -0
- package/dist/features/preview/components/FieldOverlayStyles.js +15 -0
- package/dist/features/preview/components/Frame.d.ts +20 -0
- package/dist/features/preview/components/Frame.d.ts.map +1 -0
- package/dist/features/preview/components/Frame.js +162 -0
- package/dist/features/preview/components/LinkFieldEditor.d.ts.map +1 -1
- package/dist/features/preview/components/LinkFieldEditor.js +11 -12
- package/dist/features/preview/components/OverlayTracker.js +1 -1
- package/dist/features/preview/components/PageContentSheet.d.ts.map +1 -1
- package/dist/features/preview/components/PageContentSheet.js +3 -3
- package/dist/features/preview/components/PageLocationFieldset.d.ts.map +1 -1
- package/dist/features/preview/components/PageLocationFieldset.js +9 -11
- package/dist/features/preview/components/PagePicker.d.ts.map +1 -1
- package/dist/features/preview/components/PagePicker.js +15 -15
- package/dist/features/preview/components/PageTree.d.ts.map +1 -1
- package/dist/features/preview/components/PageTree.js +215 -203
- package/dist/features/preview/components/PreviewPanel.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewPanel.js +21 -15
- package/dist/features/preview/components/PreviewSideSheet.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewSideSheet.js +42 -26
- package/dist/features/preview/components/PreviewToolbar.d.ts.map +1 -1
- package/dist/features/preview/components/PreviewToolbar.js +191 -171
- package/dist/features/preview/components/RepeatableItemsList.d.ts.map +1 -1
- package/dist/features/preview/components/RepeatableItemsList.js +4 -5
- package/dist/features/preview/components/TextFormatToolbar.d.ts.map +1 -1
- package/dist/features/preview/components/TextFormatToolbar.js +5 -6
- package/dist/features/preview/components/UnlinkAssetButton.d.ts.map +1 -1
- package/dist/features/preview/components/UnlinkAssetButton.js +70 -91
- package/dist/features/preview/studio-overlays.css?inline.js +4 -0
- package/dist/features/provider/components/CamoxAppContext.d.ts +314 -44
- package/dist/features/provider/components/CamoxAppContext.d.ts.map +1 -1
- package/dist/features/provider/components/CommandPalette.d.ts.map +1 -1
- package/dist/features/provider/components/CommandPalette.js +22 -14
- package/dist/features/studio/CamoxStudio.d.ts +2 -3
- package/dist/features/studio/CamoxStudio.d.ts.map +1 -1
- package/dist/features/studio/components/EnvironmentMenu.d.ts.map +1 -1
- package/dist/features/studio/components/EnvironmentMenu.js +39 -35
- package/dist/features/studio/components/Navbar.js +2 -2
- package/dist/features/studio/components/ProjectMenu.d.ts.map +1 -1
- package/dist/features/studio/components/ProjectMenu.js +143 -129
- package/dist/features/studio/components/UserButton.d.ts.map +1 -1
- package/dist/features/studio/components/UserButton.js +8 -9
- package/dist/features/vite/vite.d.ts +2 -0
- package/dist/features/vite/vite.d.ts.map +1 -1
- package/dist/features/vite/vite.js +26 -30
- package/dist/lib/api-client.d.ts +17 -17
- package/dist/lib/queries.d.ts +7 -7
- package/dist/studio.css +1 -1
- package/package.json +5 -6
- package/skills/camox-block/SKILL.md +55 -28
- package/dist/features/preview/overlayConstants.d.ts +0 -19
- package/dist/features/preview/overlayConstants.d.ts.map +0 -1
- package/dist/features/preview/overlayConstants.js +0 -21
|
@@ -1,46 +1,62 @@
|
|
|
1
1
|
import { previewStore } from "../previewStore.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useSelector } from "@xstate/store/react";
|
|
4
|
-
import "react";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import * as Sheet from "@camox/ui/sheet";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/features/preview/components/PreviewSideSheet.tsx
|
|
8
8
|
var PreviewSideSheet = (t0) => {
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(12);
|
|
10
10
|
const { open, onOpenChange, onOpenAutoFocus, children, className } = t0;
|
|
11
|
+
const prevOpenRef = React.useRef(open);
|
|
11
12
|
let t1;
|
|
12
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13
|
-
t1 = { minWidth: 400 };
|
|
14
|
-
$[0] = t1;
|
|
15
|
-
} else t1 = $[0];
|
|
16
13
|
let t2;
|
|
17
|
-
if ($[
|
|
18
|
-
|
|
14
|
+
if ($[0] !== onOpenAutoFocus || $[1] !== open) {
|
|
15
|
+
t1 = () => {
|
|
16
|
+
if (open && !prevOpenRef.current && onOpenAutoFocus) onOpenAutoFocus(new Event("focus"));
|
|
17
|
+
prevOpenRef.current = open;
|
|
18
|
+
};
|
|
19
|
+
t2 = [open, onOpenAutoFocus];
|
|
20
|
+
$[0] = onOpenAutoFocus;
|
|
21
|
+
$[1] = open;
|
|
22
|
+
$[2] = t1;
|
|
23
|
+
$[3] = t2;
|
|
24
|
+
} else {
|
|
25
|
+
t1 = $[2];
|
|
26
|
+
t2 = $[3];
|
|
27
|
+
}
|
|
28
|
+
React.useEffect(t1, t2);
|
|
29
|
+
let t3;
|
|
30
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t3 = { minWidth: 400 };
|
|
32
|
+
$[4] = t3;
|
|
33
|
+
} else t3 = $[4];
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[5] !== children || $[6] !== className) {
|
|
36
|
+
t4 = /* @__PURE__ */ jsx(Sheet.SheetContent, {
|
|
19
37
|
className,
|
|
20
38
|
side: "left",
|
|
21
|
-
|
|
22
|
-
style:
|
|
23
|
-
onOpenAutoFocus,
|
|
39
|
+
showOverlay: false,
|
|
40
|
+
style: t3,
|
|
24
41
|
children
|
|
25
42
|
});
|
|
26
|
-
$[
|
|
27
|
-
$[
|
|
28
|
-
$[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
t3 = /* @__PURE__ */ jsx(Sheet.Sheet, {
|
|
43
|
+
$[5] = children;
|
|
44
|
+
$[6] = className;
|
|
45
|
+
$[7] = t4;
|
|
46
|
+
} else t4 = $[7];
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[8] !== onOpenChange || $[9] !== open || $[10] !== t4) {
|
|
49
|
+
t5 = /* @__PURE__ */ jsx(Sheet.Sheet, {
|
|
34
50
|
open,
|
|
35
51
|
onOpenChange,
|
|
36
|
-
children:
|
|
52
|
+
children: t4
|
|
37
53
|
});
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
} else
|
|
43
|
-
return
|
|
54
|
+
$[8] = onOpenChange;
|
|
55
|
+
$[9] = open;
|
|
56
|
+
$[10] = t4;
|
|
57
|
+
$[11] = t5;
|
|
58
|
+
} else t5 = $[11];
|
|
59
|
+
return t5;
|
|
44
60
|
};
|
|
45
61
|
function useIsPreviewSheetOpen() {
|
|
46
62
|
const isPageContentSheetOpen = useSelector(previewStore, _temp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PreviewToolbar.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,+
|
|
1
|
+
{"version":3,"file":"PreviewToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/PreviewToolbar.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,+CA4G1B,CAAC"}
|
|
@@ -13,7 +13,7 @@ import { FloatingToolbar } from "@camox/ui/floating-toolbar";
|
|
|
13
13
|
import { Toggle } from "@camox/ui/toggle";
|
|
14
14
|
//#region src/features/preview/components/PreviewToolbar.tsx
|
|
15
15
|
var PreviewToolbar = () => {
|
|
16
|
-
const $ = c(
|
|
16
|
+
const $ = c(64);
|
|
17
17
|
const isEditingLocked = useSelector(previewStore, _temp);
|
|
18
18
|
const isEditingPanelOpen = useSelector(previewStore, _temp2);
|
|
19
19
|
const isPresentationMode = useSelector(previewStore, _temp3);
|
|
@@ -33,211 +33,231 @@ var PreviewToolbar = () => {
|
|
|
33
33
|
const t2 = isEditingPanelOpen ? "off" : "on";
|
|
34
34
|
const t3 = !isEditingPanelOpen;
|
|
35
35
|
let t4;
|
|
36
|
-
if ($[2]
|
|
37
|
-
t4 = /* @__PURE__ */ jsx(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
t5 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
43
|
-
asChild: true,
|
|
44
|
-
children: /* @__PURE__ */ jsx(Toggle, {
|
|
45
|
-
"data-state": t2,
|
|
46
|
-
pressed: t3,
|
|
47
|
-
variant: "outline",
|
|
48
|
-
onClick: _temp9,
|
|
49
|
-
children: t4
|
|
50
|
-
})
|
|
36
|
+
if ($[2] !== t2 || $[3] !== t3) {
|
|
37
|
+
t4 = /* @__PURE__ */ jsx(Toggle, {
|
|
38
|
+
"data-state": t2,
|
|
39
|
+
pressed: t3,
|
|
40
|
+
variant: "outline",
|
|
41
|
+
onClick: _temp9
|
|
51
42
|
});
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
43
|
+
$[2] = t2;
|
|
44
|
+
$[3] = t3;
|
|
45
|
+
$[4] = t4;
|
|
46
|
+
} else t4 = $[4];
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t5 = /* @__PURE__ */ jsx(PanelRight, {});
|
|
54
50
|
$[5] = t5;
|
|
55
51
|
} else t5 = $[5];
|
|
56
52
|
let t6;
|
|
57
|
-
if ($[6] !==
|
|
58
|
-
t6 =
|
|
59
|
-
|
|
53
|
+
if ($[6] !== t4) {
|
|
54
|
+
t6 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
55
|
+
render: t4,
|
|
56
|
+
children: t5
|
|
57
|
+
});
|
|
58
|
+
$[6] = t4;
|
|
60
59
|
$[7] = t6;
|
|
61
60
|
} else t6 = $[7];
|
|
62
61
|
let t7;
|
|
63
|
-
if ($[8] !==
|
|
64
|
-
t7 =
|
|
65
|
-
$[8] =
|
|
62
|
+
if ($[8] !== actions) {
|
|
63
|
+
t7 = getActionShortcut(actions, "toggle-editing-panel");
|
|
64
|
+
$[8] = actions;
|
|
66
65
|
$[9] = t7;
|
|
67
66
|
} else t7 = $[9];
|
|
68
67
|
let t8;
|
|
69
|
-
if ($[10] !==
|
|
70
|
-
t8 = /* @__PURE__ */ jsxs(Tooltip$1.
|
|
71
|
-
$[10] =
|
|
72
|
-
$[11] =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
$[
|
|
80
|
-
} else
|
|
68
|
+
if ($[10] !== t7) {
|
|
69
|
+
t8 = /* @__PURE__ */ jsxs(Tooltip$1.TooltipContent, { children: ["Toggle sidebar ", t7] });
|
|
70
|
+
$[10] = t7;
|
|
71
|
+
$[11] = t8;
|
|
72
|
+
} else t8 = $[11];
|
|
73
|
+
let t9;
|
|
74
|
+
if ($[12] !== t6 || $[13] !== t8) {
|
|
75
|
+
t9 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t6, t8] });
|
|
76
|
+
$[12] = t6;
|
|
77
|
+
$[13] = t8;
|
|
78
|
+
$[14] = t9;
|
|
79
|
+
} else t9 = $[14];
|
|
80
|
+
const t10 = isEditingLocked ? "on" : "off";
|
|
81
81
|
let t11;
|
|
82
|
-
if ($[
|
|
83
|
-
t11 = /* @__PURE__ */ jsx(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onPressedChange: _temp0,
|
|
89
|
-
variant: "outline",
|
|
90
|
-
children: t10
|
|
91
|
-
})
|
|
82
|
+
if ($[15] !== isEditingLocked || $[16] !== t10) {
|
|
83
|
+
t11 = /* @__PURE__ */ jsx(Toggle, {
|
|
84
|
+
"data-state": t10,
|
|
85
|
+
pressed: isEditingLocked,
|
|
86
|
+
onPressedChange: _temp0,
|
|
87
|
+
variant: "outline"
|
|
92
88
|
});
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
} else t11 = $[
|
|
89
|
+
$[15] = isEditingLocked;
|
|
90
|
+
$[16] = t10;
|
|
91
|
+
$[17] = t11;
|
|
92
|
+
} else t11 = $[17];
|
|
97
93
|
let t12;
|
|
98
|
-
if ($[
|
|
99
|
-
t12 = /* @__PURE__ */
|
|
100
|
-
$[
|
|
101
|
-
} else t12 = $[
|
|
94
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
95
|
+
t12 = /* @__PURE__ */ jsx(Lock, {});
|
|
96
|
+
$[18] = t12;
|
|
97
|
+
} else t12 = $[18];
|
|
102
98
|
let t13;
|
|
103
|
-
if ($[
|
|
104
|
-
t13 = /* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} else t13 = $[19];
|
|
108
|
-
const t14 = isMobileMode ? "on" : "off";
|
|
109
|
-
let t15;
|
|
110
|
-
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
|
-
t15 = /* @__PURE__ */ jsx(TabletSmartphone, {});
|
|
112
|
-
$[20] = t15;
|
|
113
|
-
} else t15 = $[20];
|
|
114
|
-
let t16;
|
|
115
|
-
if ($[21] !== isMobileMode || $[22] !== t14) {
|
|
116
|
-
t16 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
117
|
-
asChild: true,
|
|
118
|
-
children: /* @__PURE__ */ jsx(Toggle, {
|
|
119
|
-
"data-state": t14,
|
|
120
|
-
pressed: isMobileMode,
|
|
121
|
-
onPressedChange: _temp1,
|
|
122
|
-
variant: "outline",
|
|
123
|
-
children: t15
|
|
124
|
-
})
|
|
99
|
+
if ($[19] !== t11) {
|
|
100
|
+
t13 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
101
|
+
render: t11,
|
|
102
|
+
children: t12
|
|
125
103
|
});
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
|
|
129
|
-
|
|
104
|
+
$[19] = t11;
|
|
105
|
+
$[20] = t13;
|
|
106
|
+
} else t13 = $[20];
|
|
107
|
+
let t14;
|
|
108
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
109
|
+
t14 = /* @__PURE__ */ jsxs(Tooltip$1.TooltipContent, { children: ["Toggle edit mode ", /* @__PURE__ */ jsx(Kbd, { children: "L" })] });
|
|
110
|
+
$[21] = t14;
|
|
111
|
+
} else t14 = $[21];
|
|
112
|
+
let t15;
|
|
113
|
+
if ($[22] !== t13) {
|
|
114
|
+
t15 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t13, t14] });
|
|
115
|
+
$[22] = t13;
|
|
116
|
+
$[23] = t15;
|
|
117
|
+
} else t15 = $[23];
|
|
118
|
+
const t16 = isMobileMode ? "on" : "off";
|
|
130
119
|
let t17;
|
|
131
|
-
if ($[24] !==
|
|
132
|
-
t17 =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
120
|
+
if ($[24] !== isMobileMode || $[25] !== t16) {
|
|
121
|
+
t17 = /* @__PURE__ */ jsx(Toggle, {
|
|
122
|
+
"data-state": t16,
|
|
123
|
+
pressed: isMobileMode,
|
|
124
|
+
onPressedChange: _temp1,
|
|
125
|
+
variant: "outline"
|
|
126
|
+
});
|
|
127
|
+
$[24] = isMobileMode;
|
|
128
|
+
$[25] = t16;
|
|
139
129
|
$[26] = t17;
|
|
130
|
+
} else t17 = $[26];
|
|
131
|
+
let t18;
|
|
132
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
+
t18 = /* @__PURE__ */ jsx(TabletSmartphone, {});
|
|
140
134
|
$[27] = t18;
|
|
141
135
|
} else t18 = $[27];
|
|
142
136
|
let t19;
|
|
143
|
-
if ($[28] !==
|
|
144
|
-
t19 = /* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
137
|
+
if ($[28] !== t17) {
|
|
138
|
+
t19 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
139
|
+
render: t17,
|
|
140
|
+
children: t18
|
|
141
|
+
});
|
|
142
|
+
$[28] = t17;
|
|
143
|
+
$[29] = t19;
|
|
144
|
+
} else t19 = $[29];
|
|
145
|
+
let t20;
|
|
146
|
+
if ($[30] !== actions) {
|
|
147
|
+
t20 = getActionShortcut(actions, "toggle-mobile-mode");
|
|
148
|
+
$[30] = actions;
|
|
149
|
+
$[31] = t20;
|
|
150
|
+
} else t20 = $[31];
|
|
150
151
|
let t21;
|
|
151
|
-
if ($[
|
|
152
|
-
t21 = /* @__PURE__ */
|
|
153
|
-
$[
|
|
154
|
-
|
|
152
|
+
if ($[32] !== t20) {
|
|
153
|
+
t21 = /* @__PURE__ */ jsxs(Tooltip$1.TooltipContent, { children: ["Toggle mobile layout ", t20] });
|
|
154
|
+
$[32] = t20;
|
|
155
|
+
$[33] = t21;
|
|
156
|
+
} else t21 = $[33];
|
|
155
157
|
let t22;
|
|
156
|
-
if ($[
|
|
157
|
-
t22 = /* @__PURE__ */
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
onClick: _temp10,
|
|
164
|
-
children: [t21, "Preview"]
|
|
165
|
-
})
|
|
166
|
-
});
|
|
167
|
-
$[32] = isPresentationMode;
|
|
168
|
-
$[33] = t20;
|
|
169
|
-
$[34] = t22;
|
|
170
|
-
} else t22 = $[34];
|
|
171
|
-
let t23;
|
|
172
|
-
if ($[35] !== actions) {
|
|
173
|
-
t23 = getActionShortcut(actions, "enter-presentation-mode");
|
|
174
|
-
$[35] = actions;
|
|
175
|
-
$[36] = t23;
|
|
176
|
-
} else t23 = $[36];
|
|
158
|
+
if ($[34] !== t19 || $[35] !== t21) {
|
|
159
|
+
t22 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t19, t21] });
|
|
160
|
+
$[34] = t19;
|
|
161
|
+
$[35] = t21;
|
|
162
|
+
$[36] = t22;
|
|
163
|
+
} else t22 = $[36];
|
|
164
|
+
const t23 = isPresentationMode ? "on" : "off";
|
|
177
165
|
let t24;
|
|
178
|
-
if ($[37] !== t23) {
|
|
179
|
-
t24 = /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
166
|
+
if ($[37] !== isPresentationMode || $[38] !== t23) {
|
|
167
|
+
t24 = /* @__PURE__ */ jsx(Toggle, {
|
|
168
|
+
"data-state": t23,
|
|
169
|
+
pressed: isPresentationMode,
|
|
170
|
+
variant: "outline",
|
|
171
|
+
onClick: _temp10
|
|
172
|
+
});
|
|
173
|
+
$[37] = isPresentationMode;
|
|
174
|
+
$[38] = t23;
|
|
175
|
+
$[39] = t24;
|
|
176
|
+
} else t24 = $[39];
|
|
183
177
|
let t25;
|
|
184
|
-
if ($[
|
|
185
|
-
t25 = /* @__PURE__ */
|
|
186
|
-
$[
|
|
187
|
-
|
|
188
|
-
$[41] = t25;
|
|
189
|
-
} else t25 = $[41];
|
|
178
|
+
if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
|
|
179
|
+
t25 = /* @__PURE__ */ jsx(MonitorPlay, {});
|
|
180
|
+
$[40] = t25;
|
|
181
|
+
} else t25 = $[40];
|
|
190
182
|
let t26;
|
|
191
|
-
if ($[
|
|
192
|
-
t26 = /* @__PURE__ */ jsxs(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
]
|
|
198
|
-
|
|
199
|
-
$[43] = t19;
|
|
200
|
-
$[44] = t25;
|
|
201
|
-
$[45] = t8;
|
|
202
|
-
$[46] = t26;
|
|
203
|
-
} else t26 = $[46];
|
|
183
|
+
if ($[41] !== t24) {
|
|
184
|
+
t26 = /* @__PURE__ */ jsxs(Tooltip$1.TooltipTrigger, {
|
|
185
|
+
render: t24,
|
|
186
|
+
children: [t25, "Preview"]
|
|
187
|
+
});
|
|
188
|
+
$[41] = t24;
|
|
189
|
+
$[42] = t26;
|
|
190
|
+
} else t26 = $[42];
|
|
204
191
|
let t27;
|
|
205
|
-
if ($[
|
|
206
|
-
t27 =
|
|
192
|
+
if ($[43] !== actions) {
|
|
193
|
+
t27 = getActionShortcut(actions, "enter-presentation-mode");
|
|
194
|
+
$[43] = actions;
|
|
195
|
+
$[44] = t27;
|
|
196
|
+
} else t27 = $[44];
|
|
197
|
+
let t28;
|
|
198
|
+
if ($[45] !== t27) {
|
|
199
|
+
t28 = /* @__PURE__ */ jsxs(Tooltip$1.TooltipContent, { children: ["Hide all Camox UI ", t27] });
|
|
200
|
+
$[45] = t27;
|
|
201
|
+
$[46] = t28;
|
|
202
|
+
} else t28 = $[46];
|
|
203
|
+
let t29;
|
|
204
|
+
if ($[47] !== t26 || $[48] !== t28) {
|
|
205
|
+
t29 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t26, t28] });
|
|
206
|
+
$[47] = t26;
|
|
207
|
+
$[48] = t28;
|
|
208
|
+
$[49] = t29;
|
|
209
|
+
} else t29 = $[49];
|
|
210
|
+
let t30;
|
|
211
|
+
if ($[50] !== t15 || $[51] !== t22 || $[52] !== t29 || $[53] !== t9) {
|
|
212
|
+
t30 = /* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
213
|
+
t9,
|
|
214
|
+
t15,
|
|
215
|
+
t22,
|
|
216
|
+
t29
|
|
217
|
+
] });
|
|
218
|
+
$[50] = t15;
|
|
219
|
+
$[51] = t22;
|
|
220
|
+
$[52] = t29;
|
|
221
|
+
$[53] = t9;
|
|
222
|
+
$[54] = t30;
|
|
223
|
+
} else t30 = $[54];
|
|
224
|
+
let t31;
|
|
225
|
+
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t31 = /* @__PURE__ */ jsx("span", {
|
|
207
227
|
className: "text-muted-foreground",
|
|
208
228
|
children: "Ask for changes..."
|
|
209
229
|
});
|
|
210
|
-
$[
|
|
211
|
-
} else
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
214
|
-
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
230
|
+
$[55] = t31;
|
|
231
|
+
} else t31 = $[55];
|
|
232
|
+
let t32;
|
|
233
|
+
if ($[56] !== actions) {
|
|
234
|
+
t32 = getActionShortcut(actions, "open-agent-chat");
|
|
235
|
+
$[56] = actions;
|
|
236
|
+
$[57] = t32;
|
|
237
|
+
} else t32 = $[57];
|
|
238
|
+
let t33;
|
|
239
|
+
if ($[58] !== t32) {
|
|
240
|
+
t33 = /* @__PURE__ */ jsxs(Button, {
|
|
221
241
|
variant: "outline",
|
|
222
242
|
className: "bg-transparent dark:bg-transparent",
|
|
223
243
|
onClick: _temp11,
|
|
224
|
-
children: [
|
|
244
|
+
children: [t31, t32]
|
|
225
245
|
});
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else
|
|
229
|
-
let
|
|
230
|
-
if ($[
|
|
231
|
-
|
|
246
|
+
$[58] = t32;
|
|
247
|
+
$[59] = t33;
|
|
248
|
+
} else t33 = $[59];
|
|
249
|
+
let t34;
|
|
250
|
+
if ($[60] !== t1 || $[61] !== t30 || $[62] !== t33) {
|
|
251
|
+
t34 = /* @__PURE__ */ jsxs(FloatingToolbar, {
|
|
232
252
|
className: t1,
|
|
233
|
-
children: [
|
|
253
|
+
children: [t30, t33]
|
|
234
254
|
});
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
} else
|
|
240
|
-
return
|
|
255
|
+
$[60] = t1;
|
|
256
|
+
$[61] = t30;
|
|
257
|
+
$[62] = t33;
|
|
258
|
+
$[63] = t34;
|
|
259
|
+
} else t34 = $[63];
|
|
260
|
+
return t34;
|
|
241
261
|
};
|
|
242
262
|
function _temp(state) {
|
|
243
263
|
return state.context.isContentLocked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatableItemsList.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/RepeatableItemsList.tsx"],"names":[],"mappings":"AAkCA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"RepeatableItemsList.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/RepeatableItemsList.tsx"],"names":[],"mappings":"AAkCA,KAAK,cAAc,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC;AAiIF,UAAU,wBAAwB;IAChC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,mBAAmB,GAAI,4DAO1B,wBAAwB,4CA+J1B,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -152,8 +152,7 @@ var SortableRepeatableItem = (t0) => {
|
|
|
152
152
|
let t17;
|
|
153
153
|
if ($[33] !== canRemove || $[34] !== item.id || $[35] !== onRemove) {
|
|
154
154
|
t17 = canRemove && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
155
|
-
|
|
156
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
155
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
157
156
|
type: "button",
|
|
158
157
|
variant: "ghost",
|
|
159
158
|
size: "icon-sm",
|
|
@@ -161,9 +160,9 @@ var SortableRepeatableItem = (t0) => {
|
|
|
161
160
|
onClick: (e) => {
|
|
162
161
|
e.stopPropagation();
|
|
163
162
|
onRemove(String(item.id));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
})
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
children: /* @__PURE__ */ jsx(CircleMinus, { className: "h-4 w-4" })
|
|
167
166
|
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
168
167
|
side: "right",
|
|
169
168
|
children: "Remove item"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFormatToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/TextFormatToolbar.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"TextFormatToolbar.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/TextFormatToolbar.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB,+CAgE7B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { previewStore } from "../previewStore.js";
|
|
2
2
|
import { useIsPreviewSheetOpen } from "./PreviewSideSheet.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
3
4
|
import { isOverlayMessage } from "../overlayMessages.js";
|
|
4
5
|
import { FORMAT_FLAGS } from "../../../core/lib/modifierFormats.js";
|
|
5
|
-
import { cn } from "../../../lib/utils.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { Kbd } from "@camox/ui/kbd";
|
|
8
8
|
import { useSelector } from "@xstate/store/react";
|
|
@@ -87,14 +87,13 @@ var TextFormatToolbar = () => {
|
|
|
87
87
|
const { key, flag, icon: Icon, label, shortcut } = t7;
|
|
88
88
|
const isActive = !!(activeFormats & flag);
|
|
89
89
|
return /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [/* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
90
|
-
|
|
91
|
-
children: /* @__PURE__ */ jsx(Toggle, {
|
|
90
|
+
render: /* @__PURE__ */ jsx(Toggle, {
|
|
92
91
|
"data-state": isActive ? "on" : "off",
|
|
93
92
|
pressed: isActive,
|
|
94
93
|
variant: "outline",
|
|
95
|
-
onPressedChange: () => sendFormat(key)
|
|
96
|
-
|
|
97
|
-
})
|
|
94
|
+
onPressedChange: () => sendFormat(key)
|
|
95
|
+
}),
|
|
96
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
98
97
|
}), /* @__PURE__ */ jsxs(Tooltip$1.TooltipContent, { children: [
|
|
99
98
|
label,
|
|
100
99
|
" ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnlinkAssetButton.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/UnlinkAssetButton.tsx"],"names":[],"mappings":"AAkBA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,iBAAiB,GAAI,iCAAiC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"UnlinkAssetButton.d.ts","sourceRoot":"","sources":["../../../../src/features/preview/components/UnlinkAssetButton.tsx"],"names":[],"mappings":"AAkBA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,iBAAiB,GAAI,iCAAiC,sBAAsB,4CA+DjF,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|