camox 0.40.0 → 0.41.1
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 +17 -28
- 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/BlockEditingRuntime.js +4 -4
- package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
- package/dist/core/editing/createEditableBlock.d.ts +9 -8
- package/dist/core/editing/createEditableBlock.js +265 -403
- package/dist/core/hooks/useIsEditable.js +4 -7
- package/dist/core/hooks/useRequireDraftSource.js +7 -11
- 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 +246 -290
- package/dist/features/preview/DerivedPreview.js +134 -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/BlockActionsPopover.js +8 -8
- 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 +160 -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/LinkFieldEditor.js +3 -4
- package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
- package/dist/features/preview/components/Overlays.js +59 -47
- package/dist/features/preview/components/PageEditorSidebar.js +194 -203
- 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 +366 -340
- package/dist/features/preview/components/PreviewActivation.js +78 -0
- package/dist/features/preview/components/PreviewPanel.js +98 -68
- package/dist/features/preview/components/PreviewToolbar.js +224 -241
- package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
- package/dist/features/preview/components/PublicationRow.js +425 -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 +18 -39
- 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/provider/useAdminShortcuts.js +5 -4
- 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 +149 -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/components/UserButton.js +4 -4
- 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/components/DraftSwitchDialog.js +0 -66
- package/dist/features/preview/previewQueryFns.js +0 -23
- package/dist/features/runtime/studioNavigation.js +0 -120
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/features/preview/components/PreviewActivation.tsx
|
|
6
|
+
/** A replacement preview must load its document and commit before we reveal it. */
|
|
7
|
+
const PreviewActivationContext = React.createContext(void 0);
|
|
8
|
+
function PreviewActivation(t0) {
|
|
9
|
+
const $ = c(16);
|
|
10
|
+
if ($[0] !== "7173efcb0430a426f5e87095e95173285c836e918e936cfcdfbdaa6d172fdb6a") {
|
|
11
|
+
for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
12
|
+
$[0] = "7173efcb0430a426f5e87095e95173285c836e918e936cfcdfbdaa6d172fdb6a";
|
|
13
|
+
}
|
|
14
|
+
const { fallback, children } = t0;
|
|
15
|
+
const [ready, setReady] = React.useState(false);
|
|
16
|
+
let t1;
|
|
17
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18
|
+
t1 = () => setReady(true);
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else t1 = $[1];
|
|
21
|
+
const activate = t1;
|
|
22
|
+
const t2 = ready ? void 0 : "hidden";
|
|
23
|
+
let t3;
|
|
24
|
+
if ($[2] !== t2) {
|
|
25
|
+
t3 = { visibility: t2 };
|
|
26
|
+
$[2] = t2;
|
|
27
|
+
$[3] = t3;
|
|
28
|
+
} else t3 = $[3];
|
|
29
|
+
const t4 = ready ? fallback : null;
|
|
30
|
+
let t5;
|
|
31
|
+
if ($[4] !== children || $[5] !== t4) {
|
|
32
|
+
t5 = /* @__PURE__ */ jsx(PreviewActivationContext.Provider, {
|
|
33
|
+
value: activate,
|
|
34
|
+
children: /* @__PURE__ */ jsx(React.Suspense, {
|
|
35
|
+
fallback: t4,
|
|
36
|
+
children
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
$[4] = children;
|
|
40
|
+
$[5] = t4;
|
|
41
|
+
$[6] = t5;
|
|
42
|
+
} else t5 = $[6];
|
|
43
|
+
let t6;
|
|
44
|
+
if ($[7] !== t3 || $[8] !== t5) {
|
|
45
|
+
t6 = /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
47
|
+
style: t3,
|
|
48
|
+
children: t5
|
|
49
|
+
});
|
|
50
|
+
$[7] = t3;
|
|
51
|
+
$[8] = t5;
|
|
52
|
+
$[9] = t6;
|
|
53
|
+
} else t6 = $[9];
|
|
54
|
+
let t7;
|
|
55
|
+
if ($[10] !== fallback || $[11] !== ready) {
|
|
56
|
+
t7 = !ready && /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: "absolute inset-0",
|
|
58
|
+
children: fallback
|
|
59
|
+
});
|
|
60
|
+
$[10] = fallback;
|
|
61
|
+
$[11] = ready;
|
|
62
|
+
$[12] = t7;
|
|
63
|
+
} else t7 = $[12];
|
|
64
|
+
let t8;
|
|
65
|
+
if ($[13] !== t6 || $[14] !== t7) {
|
|
66
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: "relative flex min-h-0 flex-1 flex-col",
|
|
68
|
+
children: [t6, t7]
|
|
69
|
+
});
|
|
70
|
+
$[13] = t6;
|
|
71
|
+
$[14] = t7;
|
|
72
|
+
$[15] = t8;
|
|
73
|
+
} else t8 = $[15];
|
|
74
|
+
return t8;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { PreviewActivation, PreviewActivationContext };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { actionsStore } from "../../provider/actionsStore.js";
|
|
2
2
|
import { checkIfInputFocused, cn } from "../../../lib/utils.js";
|
|
3
|
-
import {
|
|
3
|
+
import { SharedChromeContext } from "../../runtime/SharedChromeContext.js";
|
|
4
|
+
import { previewStore, selectIsEditMode } from "../previewStore.js";
|
|
4
5
|
import { useBlockActionsShortcuts } from "./BlockActionsPopover.js";
|
|
5
6
|
import { FieldOverlayStyles } from "./FieldOverlayStyles.js";
|
|
6
7
|
import { FieldToolbar } from "./FieldToolbar.js";
|
|
@@ -18,9 +19,9 @@ import { PanelContent } from "@camox/ui/panel";
|
|
|
18
19
|
//#region src/features/preview/components/PreviewPanel.tsx
|
|
19
20
|
const PreviewFrame = (t0) => {
|
|
20
21
|
const $ = c(9);
|
|
21
|
-
if ($[0] !== "
|
|
22
|
+
if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
|
|
22
23
|
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
23
|
-
$[0] = "
|
|
24
|
+
$[0] = "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2";
|
|
24
25
|
}
|
|
25
26
|
const { children, style, className, onIframeReady } = t0;
|
|
26
27
|
let t1;
|
|
@@ -61,9 +62,9 @@ const PreviewFrame = (t0) => {
|
|
|
61
62
|
};
|
|
62
63
|
const KeyDownForwarder = () => {
|
|
63
64
|
const $ = c(5);
|
|
64
|
-
if ($[0] !== "
|
|
65
|
+
if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
|
|
65
66
|
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
66
|
-
$[0] = "
|
|
67
|
+
$[0] = "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2";
|
|
67
68
|
}
|
|
68
69
|
const { window: iframeWindow } = useFrame();
|
|
69
70
|
const actions = useSelector(actionsStore, _temp);
|
|
@@ -85,15 +86,16 @@ const KeyDownForwarder = () => {
|
|
|
85
86
|
});
|
|
86
87
|
if (matchingAction) {
|
|
87
88
|
e.preventDefault();
|
|
89
|
+
e.stopPropagation();
|
|
88
90
|
iframeWindow.parent.postMessage({
|
|
89
91
|
type: "executeAction",
|
|
90
92
|
actionId: matchingAction.id
|
|
91
93
|
}, "*");
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
|
-
iframeWindow.addEventListener("keydown", handleKeyDown);
|
|
96
|
+
iframeWindow.addEventListener("keydown", handleKeyDown, true);
|
|
95
97
|
return () => {
|
|
96
|
-
iframeWindow.removeEventListener("keydown", handleKeyDown);
|
|
98
|
+
iframeWindow.removeEventListener("keydown", handleKeyDown, true);
|
|
97
99
|
};
|
|
98
100
|
};
|
|
99
101
|
t1 = [iframeWindow, actions];
|
|
@@ -112,29 +114,37 @@ const viewportClassName = {
|
|
|
112
114
|
tablet: "h-[1024px] w-[768px] max-h-full max-w-full",
|
|
113
115
|
mobile: "h-175 w-[393px] max-h-full max-w-full"
|
|
114
116
|
};
|
|
117
|
+
function CuratedBlockShortcuts() {
|
|
118
|
+
const $ = c(1);
|
|
119
|
+
if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
|
|
120
|
+
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
121
|
+
$[0] = "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2";
|
|
122
|
+
}
|
|
123
|
+
useBlockActionsShortcuts();
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
115
126
|
const PreviewPanel = (t0) => {
|
|
116
|
-
const $ = c(
|
|
117
|
-
if ($[0] !== "
|
|
118
|
-
for (let $i = 0; $i <
|
|
119
|
-
$[0] = "
|
|
127
|
+
const $ = c(26);
|
|
128
|
+
if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
|
|
129
|
+
for (let $i = 0; $i < 26; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
130
|
+
$[0] = "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2";
|
|
120
131
|
}
|
|
121
132
|
const { children, isMobileExperience: t1, page, projectName: t2, toolbarProps } = t0;
|
|
122
133
|
const isMobileExperience = t1 === void 0 ? false : t1;
|
|
123
134
|
const projectName = t2 === void 0 ? "Project" : t2;
|
|
124
|
-
|
|
135
|
+
const sharedChrome = React.useContext(SharedChromeContext);
|
|
125
136
|
const iframeElement = useSelector(previewStore, _temp2);
|
|
126
137
|
const handleIframeReady = _temp3;
|
|
127
138
|
const viewportMode = useSelector(previewStore, _temp4);
|
|
128
|
-
const isEditMode = useSelector(previewStore,
|
|
129
|
-
const isToolbarHidden = useSelector(previewStore,
|
|
139
|
+
const isEditMode = useSelector(previewStore, selectIsEditMode);
|
|
140
|
+
const isToolbarHidden = useSelector(previewStore, _temp5);
|
|
130
141
|
let t3;
|
|
131
142
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
143
|
t3 = [];
|
|
133
144
|
$[1] = t3;
|
|
134
145
|
} else t3 = $[1];
|
|
135
|
-
React.useEffect(
|
|
146
|
+
React.useEffect(_temp15, t3);
|
|
136
147
|
if (isMobileExperience) {
|
|
137
|
-
if (!page) return null;
|
|
138
148
|
let t4;
|
|
139
149
|
if ($[2] !== children) {
|
|
140
150
|
t4 = /* @__PURE__ */ jsx("div", {
|
|
@@ -149,31 +159,39 @@ const PreviewPanel = (t0) => {
|
|
|
149
159
|
$[3] = t4;
|
|
150
160
|
} else t4 = $[3];
|
|
151
161
|
let t5;
|
|
152
|
-
if ($[4] !== isToolbarHidden || $[5] !== page || $[6] !== projectName) {
|
|
153
|
-
t5 = !isToolbarHidden && /* @__PURE__ */ jsx(MobilePreviewDrawer, {
|
|
162
|
+
if ($[4] !== isToolbarHidden || $[5] !== page || $[6] !== projectName || $[7] !== sharedChrome || $[8] !== toolbarProps) {
|
|
163
|
+
t5 = !isToolbarHidden && (page ? /* @__PURE__ */ jsx(MobilePreviewDrawer, {
|
|
154
164
|
page,
|
|
155
165
|
projectName
|
|
156
|
-
});
|
|
166
|
+
}) : !sharedChrome && /* @__PURE__ */ jsx(PreviewToolbar, { ...toolbarProps }));
|
|
157
167
|
$[4] = isToolbarHidden;
|
|
158
168
|
$[5] = page;
|
|
159
169
|
$[6] = projectName;
|
|
160
|
-
$[7] =
|
|
161
|
-
|
|
170
|
+
$[7] = sharedChrome;
|
|
171
|
+
$[8] = toolbarProps;
|
|
172
|
+
$[9] = t5;
|
|
173
|
+
} else t5 = $[9];
|
|
162
174
|
let t6;
|
|
163
|
-
if ($[
|
|
175
|
+
if ($[10] !== t4 || $[11] !== t5) {
|
|
164
176
|
t6 = /* @__PURE__ */ jsxs(PanelContent, {
|
|
165
177
|
className: "flex min-h-0 flex-col overflow-hidden bg-black",
|
|
166
178
|
children: [t4, t5]
|
|
167
179
|
});
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
} else t6 = $[
|
|
180
|
+
$[10] = t4;
|
|
181
|
+
$[11] = t5;
|
|
182
|
+
$[12] = t6;
|
|
183
|
+
} else t6 = $[12];
|
|
172
184
|
return t6;
|
|
173
185
|
}
|
|
174
186
|
let t4;
|
|
175
|
-
if ($[
|
|
176
|
-
t4 =
|
|
187
|
+
if ($[13] !== page) {
|
|
188
|
+
t4 = page && /* @__PURE__ */ jsx(CuratedBlockShortcuts, {});
|
|
189
|
+
$[13] = page;
|
|
190
|
+
$[14] = t4;
|
|
191
|
+
} else t4 = $[14];
|
|
192
|
+
let t5;
|
|
193
|
+
if ($[15] !== children || $[16] !== iframeElement || $[17] !== isEditMode || $[18] !== page || $[19] !== sharedChrome || $[20] !== toolbarProps || $[21] !== viewportMode) {
|
|
194
|
+
t5 = /* @__PURE__ */ jsx(PanelContent, {
|
|
177
195
|
className: "relative overflow-hidden bg-black",
|
|
178
196
|
children: /* @__PURE__ */ jsx("div", {
|
|
179
197
|
className: "absolute inset-0",
|
|
@@ -183,9 +201,12 @@ const PreviewPanel = (t0) => {
|
|
|
183
201
|
onIframeReady: handleIframeReady,
|
|
184
202
|
children
|
|
185
203
|
}),
|
|
186
|
-
isEditMode && /* @__PURE__ */ jsx(Overlays, {
|
|
204
|
+
isEditMode && /* @__PURE__ */ jsx(Overlays, {
|
|
205
|
+
iframeElement,
|
|
206
|
+
canAddBlocks: !!page
|
|
207
|
+
}),
|
|
187
208
|
isEditMode && /* @__PURE__ */ jsx(FieldToolbar, {}),
|
|
188
|
-
/* @__PURE__ */ jsx(PreviewToolbar, { ...toolbarProps })
|
|
209
|
+
!sharedChrome && /* @__PURE__ */ jsx(PreviewToolbar, { ...toolbarProps })
|
|
189
210
|
] }) : /* @__PURE__ */ jsxs("div", {
|
|
190
211
|
className: cn("checkered flex h-full justify-center", isEditMode ? "items-start" : "items-center"),
|
|
191
212
|
children: [
|
|
@@ -195,22 +216,34 @@ const PreviewPanel = (t0) => {
|
|
|
195
216
|
className: "overflow-auto",
|
|
196
217
|
onIframeReady: handleIframeReady,
|
|
197
218
|
children
|
|
198
|
-
}), isEditMode && /* @__PURE__ */ jsx(Overlays, {
|
|
219
|
+
}), isEditMode && /* @__PURE__ */ jsx(Overlays, {
|
|
220
|
+
iframeElement,
|
|
221
|
+
canAddBlocks: !!page
|
|
222
|
+
})]
|
|
199
223
|
}),
|
|
200
224
|
isEditMode && /* @__PURE__ */ jsx(FieldToolbar, {}),
|
|
201
|
-
/* @__PURE__ */ jsx(PreviewToolbar, { ...toolbarProps })
|
|
225
|
+
!sharedChrome && /* @__PURE__ */ jsx(PreviewToolbar, { ...toolbarProps })
|
|
202
226
|
]
|
|
203
227
|
})
|
|
204
228
|
})
|
|
205
|
-
})
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
|
|
213
|
-
|
|
229
|
+
});
|
|
230
|
+
$[15] = children;
|
|
231
|
+
$[16] = iframeElement;
|
|
232
|
+
$[17] = isEditMode;
|
|
233
|
+
$[18] = page;
|
|
234
|
+
$[19] = sharedChrome;
|
|
235
|
+
$[20] = toolbarProps;
|
|
236
|
+
$[21] = viewportMode;
|
|
237
|
+
$[22] = t5;
|
|
238
|
+
} else t5 = $[22];
|
|
239
|
+
let t6;
|
|
240
|
+
if ($[23] !== t4 || $[24] !== t5) {
|
|
241
|
+
t6 = /* @__PURE__ */ jsxs(Fragment, { children: [t4, t5] });
|
|
242
|
+
$[23] = t4;
|
|
243
|
+
$[24] = t5;
|
|
244
|
+
$[25] = t6;
|
|
245
|
+
} else t6 = $[25];
|
|
246
|
+
return t6;
|
|
214
247
|
};
|
|
215
248
|
function _temp(state) {
|
|
216
249
|
return state.context.actions;
|
|
@@ -228,54 +261,51 @@ function _temp4(state_0) {
|
|
|
228
261
|
return state_0.context.viewportMode;
|
|
229
262
|
}
|
|
230
263
|
function _temp5(state_1) {
|
|
231
|
-
return state_1.context.
|
|
232
|
-
}
|
|
233
|
-
function _temp6(state_2) {
|
|
234
|
-
return state_2.context.isToolbarHidden;
|
|
264
|
+
return state_1.context.isToolbarHidden;
|
|
235
265
|
}
|
|
236
|
-
function
|
|
266
|
+
function _temp6() {
|
|
237
267
|
return true;
|
|
238
268
|
}
|
|
239
|
-
function
|
|
269
|
+
function _temp7() {
|
|
240
270
|
return previewStore.send({ type: "cycleViewportMode" });
|
|
241
271
|
}
|
|
242
|
-
function
|
|
272
|
+
function _temp8() {
|
|
243
273
|
return true;
|
|
244
274
|
}
|
|
245
|
-
function
|
|
275
|
+
function _temp9() {
|
|
246
276
|
return previewStore.send({
|
|
247
277
|
type: "setViewportMode",
|
|
248
278
|
mode: "full"
|
|
249
279
|
});
|
|
250
280
|
}
|
|
251
|
-
function
|
|
281
|
+
function _temp0() {
|
|
252
282
|
return true;
|
|
253
283
|
}
|
|
254
|
-
function
|
|
284
|
+
function _temp1() {
|
|
255
285
|
return previewStore.send({
|
|
256
286
|
type: "setViewportMode",
|
|
257
287
|
mode: "tablet"
|
|
258
288
|
});
|
|
259
289
|
}
|
|
260
|
-
function
|
|
290
|
+
function _temp10() {
|
|
261
291
|
return true;
|
|
262
292
|
}
|
|
263
|
-
function
|
|
293
|
+
function _temp11() {
|
|
264
294
|
return previewStore.send({
|
|
265
295
|
type: "setViewportMode",
|
|
266
296
|
mode: "mobile"
|
|
267
297
|
});
|
|
268
298
|
}
|
|
269
|
-
function
|
|
299
|
+
function _temp12() {
|
|
270
300
|
return true;
|
|
271
301
|
}
|
|
272
|
-
function
|
|
302
|
+
function _temp13() {
|
|
273
303
|
previewStore.send({ type: "clearSelection" });
|
|
274
304
|
}
|
|
275
|
-
function
|
|
305
|
+
function _temp14(a) {
|
|
276
306
|
return a.id;
|
|
277
307
|
}
|
|
278
|
-
function
|
|
308
|
+
function _temp15() {
|
|
279
309
|
const actions = [
|
|
280
310
|
{
|
|
281
311
|
id: "cycle-viewport-mode",
|
|
@@ -286,8 +316,8 @@ function _temp16() {
|
|
|
286
316
|
"Device preview"
|
|
287
317
|
],
|
|
288
318
|
groupLabel: "Preview",
|
|
289
|
-
checkIfAvailable:
|
|
290
|
-
execute:
|
|
319
|
+
checkIfAvailable: _temp6,
|
|
320
|
+
execute: _temp7,
|
|
291
321
|
shortcut: { key: "m" }
|
|
292
322
|
},
|
|
293
323
|
{
|
|
@@ -299,16 +329,16 @@ function _temp16() {
|
|
|
299
329
|
"Full width preview"
|
|
300
330
|
],
|
|
301
331
|
groupLabel: "Preview",
|
|
302
|
-
checkIfAvailable:
|
|
303
|
-
execute:
|
|
332
|
+
checkIfAvailable: _temp8,
|
|
333
|
+
execute: _temp9
|
|
304
334
|
},
|
|
305
335
|
{
|
|
306
336
|
id: "set-viewport-tablet",
|
|
307
337
|
label: "Set tablet viewport",
|
|
308
338
|
aliases: ["Tablet preview", "Responsive preview"],
|
|
309
339
|
groupLabel: "Preview",
|
|
310
|
-
checkIfAvailable:
|
|
311
|
-
execute:
|
|
340
|
+
checkIfAvailable: _temp0,
|
|
341
|
+
execute: _temp1
|
|
312
342
|
},
|
|
313
343
|
{
|
|
314
344
|
id: "set-viewport-mobile",
|
|
@@ -319,16 +349,16 @@ function _temp16() {
|
|
|
319
349
|
"Responsive preview"
|
|
320
350
|
],
|
|
321
351
|
groupLabel: "Preview",
|
|
322
|
-
checkIfAvailable:
|
|
323
|
-
execute:
|
|
352
|
+
checkIfAvailable: _temp10,
|
|
353
|
+
execute: _temp11
|
|
324
354
|
},
|
|
325
355
|
{
|
|
326
356
|
id: "clear-selection",
|
|
327
357
|
label: "Clear selection",
|
|
328
358
|
aliases: ["Deselect", "Unselect"],
|
|
329
359
|
groupLabel: "Preview",
|
|
330
|
-
checkIfAvailable:
|
|
331
|
-
execute:
|
|
360
|
+
checkIfAvailable: _temp12,
|
|
361
|
+
execute: _temp13,
|
|
332
362
|
shortcut: { key: "Escape" }
|
|
333
363
|
}
|
|
334
364
|
];
|
|
@@ -339,7 +369,7 @@ function _temp16() {
|
|
|
339
369
|
return () => {
|
|
340
370
|
actionsStore.send({
|
|
341
371
|
type: "unregisterManyActions",
|
|
342
|
-
ids: actions.map(
|
|
372
|
+
ids: actions.map(_temp14)
|
|
343
373
|
});
|
|
344
374
|
};
|
|
345
375
|
}
|