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.
Files changed (108) 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 +17 -28
  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/BlockEditingRuntime.js +4 -4
  17. package/dist/core/editing/CompleteBlockEditingRuntime.js +5 -5
  18. package/dist/core/editing/createEditableBlock.d.ts +9 -8
  19. package/dist/core/editing/createEditableBlock.js +265 -403
  20. package/dist/core/hooks/useIsEditable.js +4 -7
  21. package/dist/core/hooks/useRequireDraftSource.js +7 -11
  22. package/dist/core/lib/lexicalReact.d.ts +1 -26
  23. package/dist/core/lib/lexicalReact.js +46 -60
  24. package/dist/core/lib/lexicalState.js +164 -81
  25. package/dist/core/lib/modifierFormats.js +4 -15
  26. package/dist/core/lib/textStyles.d.ts +27 -0
  27. package/dist/core/lib/textStyles.js +47 -0
  28. package/dist/features/navigation/navigation.d.ts +2 -0
  29. package/dist/features/navigation/navigation.js +51 -46
  30. package/dist/features/page/DerivedPageContent.js +61 -0
  31. package/dist/features/page/PublishedPageContent.js +52 -83
  32. package/dist/features/page/SharedLayoutContent.js +66 -0
  33. package/dist/features/preview/CamoxPreview.d.ts +16 -1
  34. package/dist/features/preview/CamoxPreview.js +246 -290
  35. package/dist/features/preview/DerivedPreview.js +134 -0
  36. package/dist/features/preview/EditablePageExperience.js +25 -8
  37. package/dist/features/preview/components/AddBlockSidebar.js +43 -33
  38. package/dist/features/preview/components/AssetLightbox.js +1 -1
  39. package/dist/features/preview/components/BlockActionsPopover.js +8 -8
  40. package/dist/features/preview/components/BlockThumbnail.js +192 -0
  41. package/dist/features/preview/components/CreatePageModal.js +123 -115
  42. package/dist/features/preview/components/DerivedLayoutDialog.js +100 -0
  43. package/dist/features/preview/components/DerivedLayoutSidebar.d.ts +5 -0
  44. package/dist/features/preview/components/DerivedLayoutSidebar.js +160 -0
  45. package/dist/features/preview/components/DerivedPageInfoSidebar.js +57 -0
  46. package/dist/features/preview/components/FieldToolbar.js +42 -20
  47. package/dist/features/preview/components/Frame.js +133 -140
  48. package/dist/features/preview/components/LeftSidebar.js +42 -38
  49. package/dist/features/preview/components/LinkFieldEditor.js +3 -4
  50. package/dist/features/preview/components/MobilePreviewDrawer.js +4 -4
  51. package/dist/features/preview/components/Overlays.js +59 -47
  52. package/dist/features/preview/components/PageEditorSidebar.js +194 -203
  53. package/dist/features/preview/components/PageInfoSidebar.js +63 -55
  54. package/dist/features/preview/components/PageNavigatorSidebar.js +34 -483
  55. package/dist/features/preview/components/PagePicker.js +205 -153
  56. package/dist/features/preview/components/PageTree.js +366 -340
  57. package/dist/features/preview/components/PreviewActivation.js +78 -0
  58. package/dist/features/preview/components/PreviewPanel.js +98 -68
  59. package/dist/features/preview/components/PreviewToolbar.js +224 -241
  60. package/dist/features/preview/components/PreviewToolbarSpacer.js +43 -0
  61. package/dist/features/preview/components/PublicationRow.js +425 -0
  62. package/dist/features/preview/components/PublishDialog.js +180 -97
  63. package/dist/features/preview/components/RightSidebar.js +19 -34
  64. package/dist/features/preview/components/previewStyles.js +8 -0
  65. package/dist/features/preview/components/useUpdateBlockPosition.js +7 -13
  66. package/dist/features/preview/previewConstants.js +8 -0
  67. package/dist/features/preview/previewStore.js +18 -39
  68. package/dist/features/preview/publication.js +71 -0
  69. package/dist/features/provider/AuthenticatedCamoxProvider.js +2 -1
  70. package/dist/features/provider/CoreCamoxProvider.js +11 -2
  71. package/dist/features/provider/LocalhostPreviewProvider.js +6 -7
  72. package/dist/features/provider/useAdminShortcuts.js +5 -4
  73. package/dist/features/routes/pageRuntime.d.ts +10 -0
  74. package/dist/features/routes/pageRuntime.js +7 -9
  75. package/dist/features/runtime/PreviewDocumentContext.js +7 -0
  76. package/dist/features/runtime/RuntimeChrome.js +149 -0
  77. package/dist/features/runtime/SharedChromeContext.js +7 -0
  78. package/dist/features/runtime/navigationRequest.js +21 -0
  79. package/dist/features/runtime/navigationTarget.js +23 -0
  80. package/dist/features/runtime/pageApp.js +196 -121
  81. package/dist/features/runtime/pageNavigation.js +79 -130
  82. package/dist/features/runtime/runtime.d.ts +11 -0
  83. package/dist/features/runtime/runtime.js +183 -47
  84. package/dist/features/runtime/studioApp.d.ts +2 -11
  85. package/dist/features/runtime/studioApp.js +14 -177
  86. package/dist/features/studio/CamoxStudio.js +27 -13
  87. package/dist/features/studio/components/Navbar.js +80 -74
  88. package/dist/features/studio/components/UserButton.js +4 -4
  89. package/dist/features/studio/studioTheme.js +25 -0
  90. package/dist/features/studio/useTheme.js +94 -109
  91. package/dist/features/vite/appGeneration.js +12 -3
  92. package/dist/features/vite/definitionsSync.js +4 -2
  93. package/dist/features/vite/layoutGeneration.js +38 -0
  94. package/dist/features/vite/runtimeDev.js +3 -1
  95. package/dist/lib/auth.js +15 -13
  96. package/dist/lib/normalized-data.js +4 -4
  97. package/dist/lib/platform.js +13 -0
  98. package/dist/lib/utils.js +90 -38
  99. package/dist/studio-overlays.css +5 -40
  100. package/dist/studio.css +1 -1
  101. package/package.json +8 -4
  102. package/skills/camox/SKILL.md +2 -0
  103. package/skills/camox/references/block-definitions.md +31 -12
  104. package/skills/camox/references/layout-definitions.md +2 -0
  105. package/dist/core/lib/modifiers.js +0 -24
  106. package/dist/features/preview/components/DraftSwitchDialog.js +0 -66
  107. package/dist/features/preview/previewQueryFns.js +0 -23
  108. 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 { previewStore } from "../previewStore.js";
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] !== "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26") {
22
+ if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
22
23
  for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
23
- $[0] = "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26";
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] !== "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26") {
65
+ if ($[0] !== "647d74b06c71c6ab8b55c8d5a27ecde77d7de427871f875c0c983ee0b4506ad2") {
65
66
  for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
66
- $[0] = "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26";
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(17);
117
- if ($[0] !== "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26") {
118
- for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
119
- $[0] = "e11c3b34ca0f5fb034c9be15c118c7ca06abc87dbf81a94c0e4b32239a67ad26";
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
- useBlockActionsShortcuts();
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, _temp5);
129
- const isToolbarHidden = useSelector(previewStore, _temp6);
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(_temp16, t3);
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] = t5;
161
- } else t5 = $[7];
170
+ $[7] = sharedChrome;
171
+ $[8] = toolbarProps;
172
+ $[9] = t5;
173
+ } else t5 = $[9];
162
174
  let t6;
163
- if ($[8] !== t4 || $[9] !== t5) {
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
- $[8] = t4;
169
- $[9] = t5;
170
- $[10] = t6;
171
- } else t6 = $[10];
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 ($[11] !== children || $[12] !== iframeElement || $[13] !== isEditMode || $[14] !== toolbarProps || $[15] !== viewportMode) {
176
- t4 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(PanelContent, {
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, { iframeElement }),
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, { iframeElement })]
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
- $[11] = children;
207
- $[12] = iframeElement;
208
- $[13] = isEditMode;
209
- $[14] = toolbarProps;
210
- $[15] = viewportMode;
211
- $[16] = t4;
212
- } else t4 = $[16];
213
- return t4;
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.isEditMode;
232
- }
233
- function _temp6(state_2) {
234
- return state_2.context.isToolbarHidden;
264
+ return state_1.context.isToolbarHidden;
235
265
  }
236
- function _temp7() {
266
+ function _temp6() {
237
267
  return true;
238
268
  }
239
- function _temp8() {
269
+ function _temp7() {
240
270
  return previewStore.send({ type: "cycleViewportMode" });
241
271
  }
242
- function _temp9() {
272
+ function _temp8() {
243
273
  return true;
244
274
  }
245
- function _temp0() {
275
+ function _temp9() {
246
276
  return previewStore.send({
247
277
  type: "setViewportMode",
248
278
  mode: "full"
249
279
  });
250
280
  }
251
- function _temp1() {
281
+ function _temp0() {
252
282
  return true;
253
283
  }
254
- function _temp10() {
284
+ function _temp1() {
255
285
  return previewStore.send({
256
286
  type: "setViewportMode",
257
287
  mode: "tablet"
258
288
  });
259
289
  }
260
- function _temp11() {
290
+ function _temp10() {
261
291
  return true;
262
292
  }
263
- function _temp12() {
293
+ function _temp11() {
264
294
  return previewStore.send({
265
295
  type: "setViewportMode",
266
296
  mode: "mobile"
267
297
  });
268
298
  }
269
- function _temp13() {
299
+ function _temp12() {
270
300
  return true;
271
301
  }
272
- function _temp14() {
302
+ function _temp13() {
273
303
  previewStore.send({ type: "clearSelection" });
274
304
  }
275
- function _temp15(a) {
305
+ function _temp14(a) {
276
306
  return a.id;
277
307
  }
278
- function _temp16() {
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: _temp7,
290
- execute: _temp8,
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: _temp9,
303
- execute: _temp0
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: _temp1,
311
- execute: _temp10
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: _temp11,
323
- execute: _temp12
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: _temp13,
331
- execute: _temp14,
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(_temp15)
372
+ ids: actions.map(_temp14)
343
373
  });
344
374
  };
345
375
  }