camox 0.40.0 → 0.41.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/PlatformLabel.js +62 -0
- package/dist/core/components/lexical/GradientNode.js +126 -0
- package/dist/core/components/lexical/InlineLexicalEditor.js +37 -56
- package/dist/core/components/lexical/InlineStylesPlugin.js +183 -0
- package/dist/core/components/lexical/SelectionBroadcaster.js +49 -46
- package/dist/core/components/lexical/SidebarLexicalEditor.js +197 -151
- package/dist/core/components/lexical/editorConfig.js +25 -7
- package/dist/core/components/lexical/selectTextLink.js +21 -0
- package/dist/core/createApp.d.ts +30 -17
- package/dist/core/createApp.js +14 -3
- package/dist/core/createBlock.d.ts +2 -2
- package/dist/core/createBlock.js +18 -15
- package/dist/core/createLayout.d.ts +48 -4
- package/dist/core/createLayout.js +51 -23
- package/dist/core/derivedRoutes.js +36 -0
- package/dist/core/editing/createEditableBlock.d.ts +9 -8
- package/dist/core/editing/createEditableBlock.js +167 -168
- package/dist/core/lib/lexicalReact.d.ts +1 -26
- package/dist/core/lib/lexicalReact.js +46 -60
- package/dist/core/lib/lexicalState.js +164 -81
- package/dist/core/lib/modifierFormats.js +4 -15
- package/dist/core/lib/textStyles.d.ts +27 -0
- package/dist/core/lib/textStyles.js +47 -0
- package/dist/features/navigation/navigation.d.ts +2 -0
- package/dist/features/navigation/navigation.js +51 -46
- package/dist/features/page/DerivedPageContent.js +61 -0
- package/dist/features/page/PublishedPageContent.js +52 -83
- package/dist/features/page/SharedLayoutContent.js +66 -0
- package/dist/features/preview/CamoxPreview.d.ts +16 -1
- package/dist/features/preview/CamoxPreview.js +242 -265
- package/dist/features/preview/DerivedPreview.js +137 -0
- package/dist/features/preview/EditablePageExperience.js +25 -8
- package/dist/features/preview/components/AddBlockSidebar.js +43 -33
- package/dist/features/preview/components/AssetLightbox.js +1 -1
- package/dist/features/preview/components/BlockThumbnail.js +192 -0
- package/dist/features/preview/components/CreatePageModal.js +123 -115
- package/dist/features/preview/components/DerivedLayoutDialog.js +100 -0
- package/dist/features/preview/components/DerivedLayoutSidebar.d.ts +5 -0
- package/dist/features/preview/components/DerivedLayoutSidebar.js +163 -0
- package/dist/features/preview/components/DerivedPageInfoSidebar.js +57 -0
- package/dist/features/preview/components/FieldToolbar.js +42 -20
- package/dist/features/preview/components/Frame.js +133 -140
- package/dist/features/preview/components/LeftSidebar.js +42 -38
- package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
- package/dist/features/preview/components/Overlays.js +57 -42
- package/dist/features/preview/components/PageInfoSidebar.js +63 -55
- package/dist/features/preview/components/PageNavigatorSidebar.js +34 -483
- package/dist/features/preview/components/PagePicker.js +205 -153
- package/dist/features/preview/components/PageTree.js +298 -206
- package/dist/features/preview/components/PreviewActivation.js +78 -0
- package/dist/features/preview/components/PreviewPanel.js +67 -35
- package/dist/features/preview/components/PreviewToolbar.js +218 -232
- package/dist/features/preview/components/PublicationRow.js +431 -0
- package/dist/features/preview/components/PublishDialog.js +180 -97
- package/dist/features/preview/components/RightSidebar.js +19 -34
- package/dist/features/preview/components/previewStyles.js +8 -0
- package/dist/features/preview/components/useUpdateBlockPosition.js +7 -13
- package/dist/features/preview/previewConstants.js +8 -0
- package/dist/features/preview/previewStore.js +0 -10
- package/dist/features/preview/publication.js +71 -0
- package/dist/features/provider/AuthenticatedCamoxProvider.js +2 -1
- package/dist/features/provider/CoreCamoxProvider.js +11 -2
- package/dist/features/provider/LocalhostPreviewProvider.js +6 -7
- package/dist/features/routes/pageRuntime.d.ts +10 -0
- package/dist/features/routes/pageRuntime.js +7 -9
- package/dist/features/runtime/PreviewDocumentContext.js +7 -0
- package/dist/features/runtime/RuntimeChrome.js +137 -0
- package/dist/features/runtime/SharedChromeContext.js +7 -0
- package/dist/features/runtime/navigationRequest.js +21 -0
- package/dist/features/runtime/navigationTarget.js +23 -0
- package/dist/features/runtime/pageApp.js +196 -121
- package/dist/features/runtime/pageNavigation.js +79 -130
- package/dist/features/runtime/runtime.d.ts +11 -0
- package/dist/features/runtime/runtime.js +183 -47
- package/dist/features/runtime/studioApp.d.ts +2 -11
- package/dist/features/runtime/studioApp.js +14 -177
- package/dist/features/studio/CamoxStudio.js +27 -13
- package/dist/features/studio/components/Navbar.js +80 -74
- package/dist/features/studio/studioTheme.js +25 -0
- package/dist/features/studio/useTheme.js +94 -109
- package/dist/features/vite/appGeneration.js +12 -3
- package/dist/features/vite/definitionsSync.js +4 -2
- package/dist/features/vite/layoutGeneration.js +38 -0
- package/dist/features/vite/runtimeDev.js +3 -1
- package/dist/lib/auth.js +15 -13
- package/dist/lib/normalized-data.js +4 -4
- package/dist/lib/platform.js +13 -0
- package/dist/lib/utils.js +90 -38
- package/dist/studio-overlays.css +5 -40
- package/dist/studio.css +1 -1
- package/package.json +8 -4
- package/skills/camox/SKILL.md +2 -0
- package/skills/camox/references/block-definitions.md +31 -12
- package/skills/camox/references/layout-definitions.md +2 -0
- package/dist/core/lib/modifiers.js +0 -24
- package/dist/features/preview/previewQueryFns.js +0 -23
- package/dist/features/runtime/studioNavigation.js +0 -120
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getActionShortcut } from "../../../lib/utils.js";
|
|
1
|
+
import { formatShortcut } from "../../../lib/utils.js";
|
|
3
2
|
import { previewStore } from "../previewStore.js";
|
|
3
|
+
import { EDIT_MODE_SHORTCUT } from "../previewConstants.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useSelector } from "@xstate/store-react";
|
|
7
7
|
import { Button } from "@camox/ui/button";
|
|
8
8
|
import { Monitor, Smartphone, Tablet, X } from "lucide-react";
|
|
9
9
|
import { Label } from "@camox/ui/label";
|
|
10
|
-
import { ButtonGroup } from "@camox/ui/button-group";
|
|
11
10
|
import * as Tooltip$1 from "@camox/ui/tooltip";
|
|
11
|
+
import { ButtonGroup } from "@camox/ui/button-group";
|
|
12
12
|
import { Switch } from "@camox/ui/switch";
|
|
13
13
|
import { FloatingToolbar } from "@camox/ui/floating-toolbar";
|
|
14
14
|
import { Toggle } from "@camox/ui/toggle";
|
|
15
15
|
|
|
16
16
|
//#region src/features/preview/components/PreviewToolbar.tsx
|
|
17
17
|
const PreviewToolbar = (t0) => {
|
|
18
|
-
const $ = c(
|
|
19
|
-
if ($[0] !== "
|
|
20
|
-
for (let $i = 0; $i <
|
|
21
|
-
$[0] = "
|
|
18
|
+
const $ = c(69);
|
|
19
|
+
if ($[0] !== "28b5aba454e9e27b527d788b0a718f0f7279d24fb295ca9356bcc28d27dd3df0") {
|
|
20
|
+
for (let $i = 0; $i < 69; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
21
|
+
$[0] = "28b5aba454e9e27b527d788b0a718f0f7279d24fb295ca9356bcc28d27dd3df0";
|
|
22
22
|
}
|
|
23
23
|
const { onEditModeChange, pageStatus, hasLiveVersion } = t0;
|
|
24
24
|
const isEditMode = useSelector(previewStore, _temp);
|
|
25
25
|
const isToolbarHidden = useSelector(previewStore, _temp2);
|
|
26
26
|
const peekedBlock = useSelector(previewStore, _temp3);
|
|
27
|
-
const
|
|
28
|
-
const viewportMode = useSelector(previewStore, _temp5);
|
|
29
|
-
const editModeActionId = isEditMode ? "exit-edit-mode" : "enter-edit-mode";
|
|
27
|
+
const viewportMode = useSelector(previewStore, _temp4);
|
|
30
28
|
if (isToolbarHidden || peekedBlock) return null;
|
|
31
29
|
let t1;
|
|
32
30
|
if ($[1] !== onEditModeChange) {
|
|
@@ -52,283 +50,274 @@ const PreviewToolbar = (t0) => {
|
|
|
52
50
|
$[5] = t2;
|
|
53
51
|
} else t2 = $[5];
|
|
54
52
|
let t3;
|
|
55
|
-
if ($[6]
|
|
56
|
-
t3 =
|
|
57
|
-
$[6] = actions;
|
|
58
|
-
$[7] = editModeActionId;
|
|
59
|
-
$[8] = t3;
|
|
60
|
-
} else t3 = $[8];
|
|
61
|
-
let t4;
|
|
62
|
-
if ($[9] !== t3) {
|
|
63
|
-
t4 = /* @__PURE__ */ jsxs(Label, {
|
|
53
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
54
|
+
t3 = /* @__PURE__ */ jsxs(Label, {
|
|
64
55
|
htmlFor: "edit-mode",
|
|
65
56
|
className: "flex items-center gap-2",
|
|
66
|
-
children: ["Edit mode ",
|
|
57
|
+
children: ["Edit mode ", formatShortcut(EDIT_MODE_SHORTCUT)]
|
|
67
58
|
});
|
|
68
|
-
$[
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
t5 = /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
$[6] = t3;
|
|
60
|
+
} else t3 = $[6];
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[7] !== t2) {
|
|
63
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
74
64
|
className: "flex shrink-0 items-center gap-2 px-2",
|
|
75
|
-
children: [t2,
|
|
65
|
+
children: [t2, t3]
|
|
76
66
|
});
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const t6 = viewportMode === "full"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
t8 = () => {
|
|
67
|
+
$[7] = t2;
|
|
68
|
+
$[8] = t4;
|
|
69
|
+
} else t4 = $[8];
|
|
70
|
+
const t5 = viewportMode === "full" ? "on" : "off";
|
|
71
|
+
const t6 = viewportMode === "full";
|
|
72
|
+
let t7;
|
|
73
|
+
if ($[9] !== viewportMode) {
|
|
74
|
+
t7 = () => {
|
|
86
75
|
if (viewportMode === "full") return;
|
|
87
76
|
previewStore.send({
|
|
88
77
|
type: "setViewportMode",
|
|
89
78
|
mode: "full"
|
|
90
79
|
});
|
|
91
80
|
};
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
} else
|
|
95
|
-
let
|
|
96
|
-
if ($[
|
|
97
|
-
|
|
98
|
-
"data-state":
|
|
99
|
-
pressed:
|
|
100
|
-
onPressedChange:
|
|
81
|
+
$[9] = viewportMode;
|
|
82
|
+
$[10] = t7;
|
|
83
|
+
} else t7 = $[10];
|
|
84
|
+
let t8;
|
|
85
|
+
if ($[11] !== t5 || $[12] !== t6 || $[13] !== t7) {
|
|
86
|
+
t8 = /* @__PURE__ */ jsx(Toggle, {
|
|
87
|
+
"data-state": t5,
|
|
88
|
+
pressed: t6,
|
|
89
|
+
onPressedChange: t7,
|
|
101
90
|
variant: "outline"
|
|
102
91
|
});
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
} else
|
|
92
|
+
$[11] = t5;
|
|
93
|
+
$[12] = t6;
|
|
94
|
+
$[13] = t7;
|
|
95
|
+
$[14] = t8;
|
|
96
|
+
} else t8 = $[14];
|
|
97
|
+
let t9;
|
|
98
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
+
t9 = /* @__PURE__ */ jsx(Monitor, {});
|
|
100
|
+
$[15] = t9;
|
|
101
|
+
} else t9 = $[15];
|
|
108
102
|
let t10;
|
|
109
|
-
if ($[
|
|
110
|
-
t10 = /* @__PURE__ */ jsx(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
let t11;
|
|
114
|
-
if ($[21] !== t9) {
|
|
115
|
-
t11 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
116
|
-
render: t9,
|
|
117
|
-
children: t10
|
|
103
|
+
if ($[16] !== t8) {
|
|
104
|
+
t10 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
105
|
+
render: t8,
|
|
106
|
+
children: t9
|
|
118
107
|
});
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else
|
|
108
|
+
$[16] = t8;
|
|
109
|
+
$[17] = t10;
|
|
110
|
+
} else t10 = $[17];
|
|
111
|
+
let t11;
|
|
112
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
113
|
+
t11 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Full view" });
|
|
114
|
+
$[18] = t11;
|
|
115
|
+
} else t11 = $[18];
|
|
122
116
|
let t12;
|
|
123
|
-
if ($[
|
|
124
|
-
t12 = /* @__PURE__ */
|
|
125
|
-
$[
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const t14 = viewportMode === "tablet" ? "on" : "off";
|
|
134
|
-
const t15 = viewportMode === "tablet";
|
|
135
|
-
let t16;
|
|
136
|
-
if ($[26] !== viewportMode) {
|
|
137
|
-
t16 = () => {
|
|
117
|
+
if ($[19] !== t10) {
|
|
118
|
+
t12 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t10, t11] });
|
|
119
|
+
$[19] = t10;
|
|
120
|
+
$[20] = t12;
|
|
121
|
+
} else t12 = $[20];
|
|
122
|
+
const t13 = viewportMode === "tablet" ? "on" : "off";
|
|
123
|
+
const t14 = viewportMode === "tablet";
|
|
124
|
+
let t15;
|
|
125
|
+
if ($[21] !== viewportMode) {
|
|
126
|
+
t15 = () => {
|
|
138
127
|
if (viewportMode === "tablet") return;
|
|
139
128
|
previewStore.send({
|
|
140
129
|
type: "setViewportMode",
|
|
141
130
|
mode: "tablet"
|
|
142
131
|
});
|
|
143
132
|
};
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
} else
|
|
147
|
-
let
|
|
148
|
-
if ($[
|
|
149
|
-
|
|
150
|
-
"data-state":
|
|
151
|
-
pressed:
|
|
152
|
-
onPressedChange:
|
|
133
|
+
$[21] = viewportMode;
|
|
134
|
+
$[22] = t15;
|
|
135
|
+
} else t15 = $[22];
|
|
136
|
+
let t16;
|
|
137
|
+
if ($[23] !== t13 || $[24] !== t14 || $[25] !== t15) {
|
|
138
|
+
t16 = /* @__PURE__ */ jsx(Toggle, {
|
|
139
|
+
"data-state": t13,
|
|
140
|
+
pressed: t14,
|
|
141
|
+
onPressedChange: t15,
|
|
153
142
|
variant: "outline"
|
|
154
143
|
});
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
144
|
+
$[23] = t13;
|
|
145
|
+
$[24] = t14;
|
|
146
|
+
$[25] = t15;
|
|
147
|
+
$[26] = t16;
|
|
148
|
+
} else t16 = $[26];
|
|
149
|
+
let t17;
|
|
150
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t17 = /* @__PURE__ */ jsx(Tablet, {});
|
|
152
|
+
$[27] = t17;
|
|
153
|
+
} else t17 = $[27];
|
|
160
154
|
let t18;
|
|
161
|
-
if ($[
|
|
162
|
-
t18 = /* @__PURE__ */ jsx(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
let t19;
|
|
166
|
-
if ($[33] !== t17) {
|
|
167
|
-
t19 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
168
|
-
render: t17,
|
|
169
|
-
children: t18
|
|
155
|
+
if ($[28] !== t16) {
|
|
156
|
+
t18 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
157
|
+
render: t16,
|
|
158
|
+
children: t17
|
|
170
159
|
});
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
} else
|
|
160
|
+
$[28] = t16;
|
|
161
|
+
$[29] = t18;
|
|
162
|
+
} else t18 = $[29];
|
|
163
|
+
let t19;
|
|
164
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
165
|
+
t19 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Tablet view" });
|
|
166
|
+
$[30] = t19;
|
|
167
|
+
} else t19 = $[30];
|
|
174
168
|
let t20;
|
|
175
|
-
if ($[
|
|
176
|
-
t20 = /* @__PURE__ */
|
|
177
|
-
$[
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const t22 = viewportMode === "mobile" ? "on" : "off";
|
|
186
|
-
const t23 = viewportMode === "mobile";
|
|
187
|
-
let t24;
|
|
188
|
-
if ($[38] !== viewportMode) {
|
|
189
|
-
t24 = () => {
|
|
169
|
+
if ($[31] !== t18) {
|
|
170
|
+
t20 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t18, t19] });
|
|
171
|
+
$[31] = t18;
|
|
172
|
+
$[32] = t20;
|
|
173
|
+
} else t20 = $[32];
|
|
174
|
+
const t21 = viewportMode === "mobile" ? "on" : "off";
|
|
175
|
+
const t22 = viewportMode === "mobile";
|
|
176
|
+
let t23;
|
|
177
|
+
if ($[33] !== viewportMode) {
|
|
178
|
+
t23 = () => {
|
|
190
179
|
if (viewportMode === "mobile") return;
|
|
191
180
|
previewStore.send({
|
|
192
181
|
type: "setViewportMode",
|
|
193
182
|
mode: "mobile"
|
|
194
183
|
});
|
|
195
184
|
};
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
} else
|
|
199
|
-
let
|
|
200
|
-
if ($[
|
|
201
|
-
|
|
202
|
-
"data-state":
|
|
203
|
-
pressed:
|
|
204
|
-
onPressedChange:
|
|
185
|
+
$[33] = viewportMode;
|
|
186
|
+
$[34] = t23;
|
|
187
|
+
} else t23 = $[34];
|
|
188
|
+
let t24;
|
|
189
|
+
if ($[35] !== t21 || $[36] !== t22 || $[37] !== t23) {
|
|
190
|
+
t24 = /* @__PURE__ */ jsx(Toggle, {
|
|
191
|
+
"data-state": t21,
|
|
192
|
+
pressed: t22,
|
|
193
|
+
onPressedChange: t23,
|
|
205
194
|
variant: "outline"
|
|
206
195
|
});
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else
|
|
196
|
+
$[35] = t21;
|
|
197
|
+
$[36] = t22;
|
|
198
|
+
$[37] = t23;
|
|
199
|
+
$[38] = t24;
|
|
200
|
+
} else t24 = $[38];
|
|
201
|
+
let t25;
|
|
202
|
+
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
203
|
+
t25 = /* @__PURE__ */ jsx(Smartphone, {});
|
|
204
|
+
$[39] = t25;
|
|
205
|
+
} else t25 = $[39];
|
|
212
206
|
let t26;
|
|
213
|
-
if ($[
|
|
214
|
-
t26 = /* @__PURE__ */ jsx(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
let t27;
|
|
218
|
-
if ($[45] !== t25) {
|
|
219
|
-
t27 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
220
|
-
render: t25,
|
|
221
|
-
children: t26
|
|
207
|
+
if ($[40] !== t24) {
|
|
208
|
+
t26 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
209
|
+
render: t24,
|
|
210
|
+
children: t25
|
|
222
211
|
});
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
} else
|
|
212
|
+
$[40] = t24;
|
|
213
|
+
$[41] = t26;
|
|
214
|
+
} else t26 = $[41];
|
|
215
|
+
let t27;
|
|
216
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
217
|
+
t27 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Mobile view" });
|
|
218
|
+
$[42] = t27;
|
|
219
|
+
} else t27 = $[42];
|
|
226
220
|
let t28;
|
|
227
|
-
if ($[
|
|
228
|
-
t28 = /* @__PURE__ */
|
|
229
|
-
$[
|
|
230
|
-
|
|
221
|
+
if ($[43] !== t26) {
|
|
222
|
+
t28 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t26, t27] });
|
|
223
|
+
$[43] = t26;
|
|
224
|
+
$[44] = t28;
|
|
225
|
+
} else t28 = $[44];
|
|
231
226
|
let t29;
|
|
232
|
-
if ($[
|
|
233
|
-
t29 = /* @__PURE__ */ jsxs(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
let t30;
|
|
238
|
-
if ($[50] !== t13 || $[51] !== t21 || $[52] !== t29) {
|
|
239
|
-
t30 = /* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
240
|
-
t13,
|
|
241
|
-
t21,
|
|
242
|
-
t29
|
|
227
|
+
if ($[45] !== t12 || $[46] !== t20 || $[47] !== t28) {
|
|
228
|
+
t29 = /* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
229
|
+
t12,
|
|
230
|
+
t20,
|
|
231
|
+
t28
|
|
243
232
|
] });
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
} else
|
|
249
|
-
let
|
|
250
|
-
if ($[
|
|
251
|
-
|
|
233
|
+
$[45] = t12;
|
|
234
|
+
$[46] = t20;
|
|
235
|
+
$[47] = t28;
|
|
236
|
+
$[48] = t29;
|
|
237
|
+
} else t29 = $[48];
|
|
238
|
+
let t30;
|
|
239
|
+
if ($[49] !== hasLiveVersion || $[50] !== pageStatus) {
|
|
240
|
+
t30 = pageStatus && /* @__PURE__ */ jsx(Button, {
|
|
252
241
|
type: "button",
|
|
253
242
|
variant: "outline",
|
|
254
243
|
disabled: pageStatus === "published" || !hasLiveVersion,
|
|
255
|
-
onClick:
|
|
256
|
-
children: "View
|
|
244
|
+
onClick: _temp5,
|
|
245
|
+
children: "View published page"
|
|
257
246
|
});
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
} else
|
|
262
|
-
let
|
|
263
|
-
if ($[
|
|
264
|
-
|
|
247
|
+
$[49] = hasLiveVersion;
|
|
248
|
+
$[50] = pageStatus;
|
|
249
|
+
$[51] = t30;
|
|
250
|
+
} else t30 = $[51];
|
|
251
|
+
let t31;
|
|
252
|
+
if ($[52] !== isEditMode) {
|
|
253
|
+
t31 = /* @__PURE__ */ jsx(Button, {
|
|
265
254
|
type: "button",
|
|
266
255
|
variant: "ghost",
|
|
267
256
|
size: "icon",
|
|
268
257
|
disabled: isEditMode,
|
|
269
|
-
onClick:
|
|
258
|
+
onClick: _temp6,
|
|
270
259
|
"aria-label": "Hide toolbar",
|
|
271
260
|
className: "text-muted-foreground"
|
|
272
261
|
});
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
} else
|
|
262
|
+
$[52] = isEditMode;
|
|
263
|
+
$[53] = t31;
|
|
264
|
+
} else t31 = $[53];
|
|
265
|
+
let t32;
|
|
266
|
+
if ($[54] === Symbol.for("react.memo_cache_sentinel")) {
|
|
267
|
+
t32 = /* @__PURE__ */ jsx(X, {});
|
|
268
|
+
$[54] = t32;
|
|
269
|
+
} else t32 = $[54];
|
|
276
270
|
let t33;
|
|
277
|
-
if ($[
|
|
278
|
-
t33 = /* @__PURE__ */ jsx(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
let t34;
|
|
282
|
-
if ($[60] !== t32) {
|
|
283
|
-
t34 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
284
|
-
render: t32,
|
|
285
|
-
children: t33
|
|
271
|
+
if ($[55] !== t31) {
|
|
272
|
+
t33 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
|
|
273
|
+
render: t31,
|
|
274
|
+
children: t32
|
|
286
275
|
});
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
} else
|
|
276
|
+
$[55] = t31;
|
|
277
|
+
$[56] = t33;
|
|
278
|
+
} else t33 = $[56];
|
|
279
|
+
let t34;
|
|
280
|
+
if ($[57] === Symbol.for("react.memo_cache_sentinel")) {
|
|
281
|
+
t34 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Hide toolbar" });
|
|
282
|
+
$[57] = t34;
|
|
283
|
+
} else t34 = $[57];
|
|
290
284
|
let t35;
|
|
291
|
-
if ($[
|
|
292
|
-
t35 = /* @__PURE__ */
|
|
293
|
-
$[
|
|
294
|
-
|
|
285
|
+
if ($[58] !== t33) {
|
|
286
|
+
t35 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t33, t34] });
|
|
287
|
+
$[58] = t33;
|
|
288
|
+
$[59] = t35;
|
|
289
|
+
} else t35 = $[59];
|
|
295
290
|
let t36;
|
|
296
|
-
if ($[
|
|
297
|
-
t36 = /* @__PURE__ */ jsxs(
|
|
298
|
-
$[63] = t34;
|
|
299
|
-
$[64] = t36;
|
|
300
|
-
} else t36 = $[64];
|
|
301
|
-
let t37;
|
|
302
|
-
if ($[65] !== t31 || $[66] !== t36) {
|
|
303
|
-
t37 = /* @__PURE__ */ jsxs("div", {
|
|
291
|
+
if ($[60] !== t30 || $[61] !== t35) {
|
|
292
|
+
t36 = /* @__PURE__ */ jsxs("div", {
|
|
304
293
|
className: "flex items-center gap-2",
|
|
305
|
-
children: [
|
|
294
|
+
children: [t30, t35]
|
|
306
295
|
});
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
} else
|
|
311
|
-
let
|
|
312
|
-
if ($[
|
|
313
|
-
|
|
296
|
+
$[60] = t30;
|
|
297
|
+
$[61] = t35;
|
|
298
|
+
$[62] = t36;
|
|
299
|
+
} else t36 = $[62];
|
|
300
|
+
let t37;
|
|
301
|
+
if ($[63] !== t29 || $[64] !== t36) {
|
|
302
|
+
t37 = /* @__PURE__ */ jsxs("div", {
|
|
314
303
|
className: "flex shrink-0 items-center gap-8 self-stretch",
|
|
315
|
-
children: [
|
|
304
|
+
children: [t29, t36]
|
|
316
305
|
});
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
} else
|
|
321
|
-
let
|
|
322
|
-
if ($[
|
|
323
|
-
|
|
306
|
+
$[63] = t29;
|
|
307
|
+
$[64] = t36;
|
|
308
|
+
$[65] = t37;
|
|
309
|
+
} else t37 = $[65];
|
|
310
|
+
let t38;
|
|
311
|
+
if ($[66] !== t37 || $[67] !== t4) {
|
|
312
|
+
t38 = /* @__PURE__ */ jsxs(FloatingToolbar, {
|
|
324
313
|
className: "bottom-2 w-max justify-between gap-8 transition-none",
|
|
325
|
-
children: [
|
|
314
|
+
children: [t4, t37]
|
|
326
315
|
});
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
} else
|
|
331
|
-
return
|
|
316
|
+
$[66] = t37;
|
|
317
|
+
$[67] = t4;
|
|
318
|
+
$[68] = t38;
|
|
319
|
+
} else t38 = $[68];
|
|
320
|
+
return t38;
|
|
332
321
|
};
|
|
333
322
|
function _temp(state) {
|
|
334
323
|
return state.context.isEditMode;
|
|
@@ -340,15 +329,12 @@ function _temp3(state_1) {
|
|
|
340
329
|
return state_1.context.peekedBlock;
|
|
341
330
|
}
|
|
342
331
|
function _temp4(state_2) {
|
|
343
|
-
return state_2.context.
|
|
344
|
-
}
|
|
345
|
-
function _temp5(state_3) {
|
|
346
|
-
return state_3.context.viewportMode;
|
|
332
|
+
return state_2.context.viewportMode;
|
|
347
333
|
}
|
|
348
|
-
function
|
|
334
|
+
function _temp5() {
|
|
349
335
|
return previewStore.send({ type: "viewLivePage" });
|
|
350
336
|
}
|
|
351
|
-
function
|
|
337
|
+
function _temp6() {
|
|
352
338
|
return previewStore.send({ type: "hideToolbar" });
|
|
353
339
|
}
|
|
354
340
|
|