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.
Files changed (97) hide show
  1. package/dist/components/PlatformLabel.js +62 -0
  2. package/dist/core/components/lexical/GradientNode.js +126 -0
  3. package/dist/core/components/lexical/InlineLexicalEditor.js +37 -56
  4. package/dist/core/components/lexical/InlineStylesPlugin.js +183 -0
  5. package/dist/core/components/lexical/SelectionBroadcaster.js +49 -46
  6. package/dist/core/components/lexical/SidebarLexicalEditor.js +197 -151
  7. package/dist/core/components/lexical/editorConfig.js +25 -7
  8. package/dist/core/components/lexical/selectTextLink.js +21 -0
  9. package/dist/core/createApp.d.ts +30 -17
  10. package/dist/core/createApp.js +14 -3
  11. package/dist/core/createBlock.d.ts +2 -2
  12. package/dist/core/createBlock.js +18 -15
  13. package/dist/core/createLayout.d.ts +48 -4
  14. package/dist/core/createLayout.js +51 -23
  15. package/dist/core/derivedRoutes.js +36 -0
  16. package/dist/core/editing/createEditableBlock.d.ts +9 -8
  17. package/dist/core/editing/createEditableBlock.js +167 -168
  18. package/dist/core/lib/lexicalReact.d.ts +1 -26
  19. package/dist/core/lib/lexicalReact.js +46 -60
  20. package/dist/core/lib/lexicalState.js +164 -81
  21. package/dist/core/lib/modifierFormats.js +4 -15
  22. package/dist/core/lib/textStyles.d.ts +27 -0
  23. package/dist/core/lib/textStyles.js +47 -0
  24. package/dist/features/navigation/navigation.d.ts +2 -0
  25. package/dist/features/navigation/navigation.js +51 -46
  26. package/dist/features/page/DerivedPageContent.js +61 -0
  27. package/dist/features/page/PublishedPageContent.js +52 -83
  28. package/dist/features/page/SharedLayoutContent.js +66 -0
  29. package/dist/features/preview/CamoxPreview.d.ts +16 -1
  30. package/dist/features/preview/CamoxPreview.js +242 -265
  31. package/dist/features/preview/DerivedPreview.js +137 -0
  32. package/dist/features/preview/EditablePageExperience.js +25 -8
  33. package/dist/features/preview/components/AddBlockSidebar.js +43 -33
  34. package/dist/features/preview/components/AssetLightbox.js +1 -1
  35. package/dist/features/preview/components/BlockThumbnail.js +192 -0
  36. package/dist/features/preview/components/CreatePageModal.js +123 -115
  37. package/dist/features/preview/components/DerivedLayoutDialog.js +100 -0
  38. package/dist/features/preview/components/DerivedLayoutSidebar.d.ts +5 -0
  39. package/dist/features/preview/components/DerivedLayoutSidebar.js +163 -0
  40. package/dist/features/preview/components/DerivedPageInfoSidebar.js +57 -0
  41. package/dist/features/preview/components/FieldToolbar.js +42 -20
  42. package/dist/features/preview/components/Frame.js +133 -140
  43. package/dist/features/preview/components/LeftSidebar.js +42 -38
  44. package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
  45. package/dist/features/preview/components/Overlays.js +57 -42
  46. package/dist/features/preview/components/PageInfoSidebar.js +63 -55
  47. package/dist/features/preview/components/PageNavigatorSidebar.js +34 -483
  48. package/dist/features/preview/components/PagePicker.js +205 -153
  49. package/dist/features/preview/components/PageTree.js +298 -206
  50. package/dist/features/preview/components/PreviewActivation.js +78 -0
  51. package/dist/features/preview/components/PreviewPanel.js +67 -35
  52. package/dist/features/preview/components/PreviewToolbar.js +218 -232
  53. package/dist/features/preview/components/PublicationRow.js +431 -0
  54. package/dist/features/preview/components/PublishDialog.js +180 -97
  55. package/dist/features/preview/components/RightSidebar.js +19 -34
  56. package/dist/features/preview/components/previewStyles.js +8 -0
  57. package/dist/features/preview/components/useUpdateBlockPosition.js +7 -13
  58. package/dist/features/preview/previewConstants.js +8 -0
  59. package/dist/features/preview/previewStore.js +0 -10
  60. package/dist/features/preview/publication.js +71 -0
  61. package/dist/features/provider/AuthenticatedCamoxProvider.js +2 -1
  62. package/dist/features/provider/CoreCamoxProvider.js +11 -2
  63. package/dist/features/provider/LocalhostPreviewProvider.js +6 -7
  64. package/dist/features/routes/pageRuntime.d.ts +10 -0
  65. package/dist/features/routes/pageRuntime.js +7 -9
  66. package/dist/features/runtime/PreviewDocumentContext.js +7 -0
  67. package/dist/features/runtime/RuntimeChrome.js +137 -0
  68. package/dist/features/runtime/SharedChromeContext.js +7 -0
  69. package/dist/features/runtime/navigationRequest.js +21 -0
  70. package/dist/features/runtime/navigationTarget.js +23 -0
  71. package/dist/features/runtime/pageApp.js +196 -121
  72. package/dist/features/runtime/pageNavigation.js +79 -130
  73. package/dist/features/runtime/runtime.d.ts +11 -0
  74. package/dist/features/runtime/runtime.js +183 -47
  75. package/dist/features/runtime/studioApp.d.ts +2 -11
  76. package/dist/features/runtime/studioApp.js +14 -177
  77. package/dist/features/studio/CamoxStudio.js +27 -13
  78. package/dist/features/studio/components/Navbar.js +80 -74
  79. package/dist/features/studio/studioTheme.js +25 -0
  80. package/dist/features/studio/useTheme.js +94 -109
  81. package/dist/features/vite/appGeneration.js +12 -3
  82. package/dist/features/vite/definitionsSync.js +4 -2
  83. package/dist/features/vite/layoutGeneration.js +38 -0
  84. package/dist/features/vite/runtimeDev.js +3 -1
  85. package/dist/lib/auth.js +15 -13
  86. package/dist/lib/normalized-data.js +4 -4
  87. package/dist/lib/platform.js +13 -0
  88. package/dist/lib/utils.js +90 -38
  89. package/dist/studio-overlays.css +5 -40
  90. package/dist/studio.css +1 -1
  91. package/package.json +8 -4
  92. package/skills/camox/SKILL.md +2 -0
  93. package/skills/camox/references/block-definitions.md +31 -12
  94. package/skills/camox/references/layout-definitions.md +2 -0
  95. package/dist/core/lib/modifiers.js +0 -24
  96. package/dist/features/preview/previewQueryFns.js +0 -23
  97. package/dist/features/runtime/studioNavigation.js +0 -120
@@ -1,32 +1,30 @@
1
- import { actionsStore } from "../../provider/actionsStore.js";
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(74);
19
- if ($[0] !== "88648f3760cc744b4acae6ce6f9f000de00b69d7e7f65268463e98389ba90d90") {
20
- for (let $i = 0; $i < 74; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
21
- $[0] = "88648f3760cc744b4acae6ce6f9f000de00b69d7e7f65268463e98389ba90d90";
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 actions = useSelector(actionsStore, _temp4);
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] !== actions || $[7] !== editModeActionId) {
56
- t3 = getActionShortcut(actions, editModeActionId);
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 ", t3]
57
+ children: ["Edit mode ", formatShortcut(EDIT_MODE_SHORTCUT)]
67
58
  });
68
- $[9] = t3;
69
- $[10] = t4;
70
- } else t4 = $[10];
71
- let t5;
72
- if ($[11] !== t2 || $[12] !== t4) {
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, t4]
65
+ children: [t2, t3]
76
66
  });
77
- $[11] = t2;
78
- $[12] = t4;
79
- $[13] = t5;
80
- } else t5 = $[13];
81
- const t6 = viewportMode === "full" ? "on" : "off";
82
- const t7 = viewportMode === "full";
83
- let t8;
84
- if ($[14] !== viewportMode) {
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
- $[14] = viewportMode;
93
- $[15] = t8;
94
- } else t8 = $[15];
95
- let t9;
96
- if ($[16] !== t6 || $[17] !== t7 || $[18] !== t8) {
97
- t9 = /* @__PURE__ */ jsx(Toggle, {
98
- "data-state": t6,
99
- pressed: t7,
100
- onPressedChange: t8,
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
- $[16] = t6;
104
- $[17] = t7;
105
- $[18] = t8;
106
- $[19] = t9;
107
- } else t9 = $[19];
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 ($[20] === Symbol.for("react.memo_cache_sentinel")) {
110
- t10 = /* @__PURE__ */ jsx(Monitor, {});
111
- $[20] = t10;
112
- } else t10 = $[20];
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
- $[21] = t9;
120
- $[22] = t11;
121
- } else t11 = $[22];
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 ($[23] === Symbol.for("react.memo_cache_sentinel")) {
124
- t12 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Full view" });
125
- $[23] = t12;
126
- } else t12 = $[23];
127
- let t13;
128
- if ($[24] !== t11) {
129
- t13 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t11, t12] });
130
- $[24] = t11;
131
- $[25] = t13;
132
- } else t13 = $[25];
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
- $[26] = viewportMode;
145
- $[27] = t16;
146
- } else t16 = $[27];
147
- let t17;
148
- if ($[28] !== t14 || $[29] !== t15 || $[30] !== t16) {
149
- t17 = /* @__PURE__ */ jsx(Toggle, {
150
- "data-state": t14,
151
- pressed: t15,
152
- onPressedChange: t16,
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
- $[28] = t14;
156
- $[29] = t15;
157
- $[30] = t16;
158
- $[31] = t17;
159
- } else t17 = $[31];
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 ($[32] === Symbol.for("react.memo_cache_sentinel")) {
162
- t18 = /* @__PURE__ */ jsx(Tablet, {});
163
- $[32] = t18;
164
- } else t18 = $[32];
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
- $[33] = t17;
172
- $[34] = t19;
173
- } else t19 = $[34];
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 ($[35] === Symbol.for("react.memo_cache_sentinel")) {
176
- t20 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Tablet view" });
177
- $[35] = t20;
178
- } else t20 = $[35];
179
- let t21;
180
- if ($[36] !== t19) {
181
- t21 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t19, t20] });
182
- $[36] = t19;
183
- $[37] = t21;
184
- } else t21 = $[37];
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
- $[38] = viewportMode;
197
- $[39] = t24;
198
- } else t24 = $[39];
199
- let t25;
200
- if ($[40] !== t22 || $[41] !== t23 || $[42] !== t24) {
201
- t25 = /* @__PURE__ */ jsx(Toggle, {
202
- "data-state": t22,
203
- pressed: t23,
204
- onPressedChange: t24,
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
- $[40] = t22;
208
- $[41] = t23;
209
- $[42] = t24;
210
- $[43] = t25;
211
- } else t25 = $[43];
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 ($[44] === Symbol.for("react.memo_cache_sentinel")) {
214
- t26 = /* @__PURE__ */ jsx(Smartphone, {});
215
- $[44] = t26;
216
- } else t26 = $[44];
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
- $[45] = t25;
224
- $[46] = t27;
225
- } else t27 = $[46];
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 ($[47] === Symbol.for("react.memo_cache_sentinel")) {
228
- t28 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Mobile view" });
229
- $[47] = t28;
230
- } else t28 = $[47];
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 ($[48] !== t27) {
233
- t29 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t27, t28] });
234
- $[48] = t27;
235
- $[49] = t29;
236
- } else t29 = $[49];
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
- $[50] = t13;
245
- $[51] = t21;
246
- $[52] = t29;
247
- $[53] = t30;
248
- } else t30 = $[53];
249
- let t31;
250
- if ($[54] !== hasLiveVersion || $[55] !== pageStatus) {
251
- t31 = pageStatus && /* @__PURE__ */ jsx(Button, {
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: _temp6,
256
- children: "View live site"
244
+ onClick: _temp5,
245
+ children: "View published page"
257
246
  });
258
- $[54] = hasLiveVersion;
259
- $[55] = pageStatus;
260
- $[56] = t31;
261
- } else t31 = $[56];
262
- let t32;
263
- if ($[57] !== isEditMode) {
264
- t32 = /* @__PURE__ */ jsx(Button, {
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: _temp7,
258
+ onClick: _temp6,
270
259
  "aria-label": "Hide toolbar",
271
260
  className: "text-muted-foreground"
272
261
  });
273
- $[57] = isEditMode;
274
- $[58] = t32;
275
- } else t32 = $[58];
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 ($[59] === Symbol.for("react.memo_cache_sentinel")) {
278
- t33 = /* @__PURE__ */ jsx(X, {});
279
- $[59] = t33;
280
- } else t33 = $[59];
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
- $[60] = t32;
288
- $[61] = t34;
289
- } else t34 = $[61];
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 ($[62] === Symbol.for("react.memo_cache_sentinel")) {
292
- t35 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Hide toolbar" });
293
- $[62] = t35;
294
- } else t35 = $[62];
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 ($[63] !== t34) {
297
- t36 = /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t34, t35] });
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: [t31, t36]
294
+ children: [t30, t35]
306
295
  });
307
- $[65] = t31;
308
- $[66] = t36;
309
- $[67] = t37;
310
- } else t37 = $[67];
311
- let t38;
312
- if ($[68] !== t30 || $[69] !== t37) {
313
- t38 = /* @__PURE__ */ jsxs("div", {
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: [t30, t37]
304
+ children: [t29, t36]
316
305
  });
317
- $[68] = t30;
318
- $[69] = t37;
319
- $[70] = t38;
320
- } else t38 = $[70];
321
- let t39;
322
- if ($[71] !== t38 || $[72] !== t5) {
323
- t39 = /* @__PURE__ */ jsxs(FloatingToolbar, {
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: [t5, t38]
314
+ children: [t4, t37]
326
315
  });
327
- $[71] = t38;
328
- $[72] = t5;
329
- $[73] = t39;
330
- } else t39 = $[73];
331
- return t39;
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.actions;
344
- }
345
- function _temp5(state_3) {
346
- return state_3.context.viewportMode;
332
+ return state_2.context.viewportMode;
347
333
  }
348
- function _temp6() {
334
+ function _temp5() {
349
335
  return previewStore.send({ type: "viewLivePage" });
350
336
  }
351
- function _temp7() {
337
+ function _temp6() {
352
338
  return previewStore.send({ type: "hideToolbar" });
353
339
  }
354
340