camox 0.66.0 → 0.68.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 (31) hide show
  1. package/dist/core/editing/createEditableBlock.js +2 -1
  2. package/dist/features/content/components/MissingFromLocale.js +1 -1
  3. package/dist/features/page/UnplacedLayoutContent.js +141 -0
  4. package/dist/features/preview/components/ItemFieldsEditor.js +50 -44
  5. package/dist/features/preview/components/PreviewToolbar.js +77 -68
  6. package/dist/features/preview/components/SelectionEditor.js +284 -231
  7. package/dist/features/preview/components/contentFieldSchema.js +5 -1
  8. package/dist/features/preview/repeatableItemTargets.js +13 -7
  9. package/dist/features/runtime/RuntimeChrome.js +47 -61
  10. package/dist/features/runtime/pageApp.js +24 -10
  11. package/dist/features/runtime/runtime.d.ts +13 -0
  12. package/dist/features/runtime/runtime.js +58 -2
  13. package/dist/features/studio/components/ChatWidget.js +3 -4
  14. package/dist/features/studio/components/ConnectAgent.js +33 -59
  15. package/dist/features/studio/components/ContentFindings.js +397 -0
  16. package/dist/features/studio/components/DraftBar.js +139 -0
  17. package/dist/features/studio/components/DraftsControl.js +13 -57
  18. package/dist/features/studio/components/Navbar.js +3 -2
  19. package/dist/features/studio/components/Patrol.js +52 -34
  20. package/dist/features/studio/components/ReviewDraftSheet.js +4 -4
  21. package/dist/features/studio/components/Squareling.js +0 -9
  22. package/dist/features/studio/components/UserButton.js +7 -11
  23. package/dist/features/studio/findingSentence.js +3 -5
  24. package/dist/features/studio/patrollerBio.js +0 -1
  25. package/dist/features/studio/reportSentence.js +0 -5
  26. package/dist/features/studio/studioStore.js +0 -13
  27. package/dist/features/studio/workingSentence.js +0 -4
  28. package/dist/package.js +1 -1
  29. package/dist/studio.css +1 -1
  30. package/package.json +4 -4
  31. package/dist/features/studio/components/UnnamedDraftBar.js +0 -349
@@ -714,7 +714,8 @@ function createEditableBlock(options) {
714
714
  $[5] = t2;
715
715
  } else t2 = $[5];
716
716
  const isHoveredFromSidebar = useOverlayMessage(iframeWindow, isContentEditable, "CAMOX_HOVER_FIELD", "CAMOX_HOVER_FIELD_END", t2);
717
- const overlayState = useOverlayState(isHovered || isHoveredFromSidebar);
717
+ const isFocused = useFieldSelection(blockId, fieldName, "Artifact", itemId);
718
+ const overlayState = useOverlayState(isHovered || isHoveredFromSidebar, isFocused);
718
719
  let t3;
719
720
  if ($[6] !== blockId || $[7] !== fieldName || $[8] !== itemId || $[9] !== selectTarget) {
720
721
  t3 = () => {
@@ -2,8 +2,8 @@ import { useViewLocale } from "../../../lib/view-locale-context.js";
2
2
  import { useProjectUuid } from "../../../lib/auth.js";
3
3
  import { reads, useReadQuery, useStudioCache } from "../../../lib/studio-reads.js";
4
4
  import { localeMutations } from "../../../lib/queries.js";
5
- import { ContentSidebarGroup } from "./ContentSidebarGroup.js";
6
5
  import { localeLabel } from "../../studio/localeOptions.js";
6
+ import { ContentSidebarGroup } from "./ContentSidebarGroup.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useMutation } from "@tanstack/react-query";
@@ -0,0 +1,141 @@
1
+ import { useViewLocale } from "../../lib/view-locale-context.js";
2
+ import { usePageBlocks } from "../../lib/normalized-data.js";
3
+ import { buildLayoutContext } from "../../core/layoutContext.js";
4
+ import { SharedLayoutContent } from "./SharedLayoutContent.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { jsx } from "react/jsx-runtime";
7
+
8
+ //#region src/features/page/UnplacedLayoutContent.tsx
9
+ const EMPTY_PAGE = { blockIds: [] };
10
+ /**
11
+ * How tall the placeholder stands: short enough to leave the footer on the first screen, which
12
+ * shows whether it rises up it, or taller than any screen, as a long page is.
13
+ */
14
+ const PLACEHOLDER_HEIGHTS = {
15
+ short: "16rem",
16
+ tall: "300vh"
17
+ };
18
+ /** A grey that reads on light and dark Themes alike. */
19
+ const HATCH = "rgba(128, 128, 128, 0.35)";
20
+ /**
21
+ * Where a page's content goes, as the look document's Layout Definition mode shows it: a labelled,
22
+ * hatched area, styled inline, since the site's stylesheet knows nothing of it.
23
+ */
24
+ function PageContentPlaceholder(t0) {
25
+ const $ = c(6);
26
+ const { height } = t0;
27
+ const t1 = PLACEHOLDER_HEIGHTS[height];
28
+ let t2;
29
+ if ($[0] !== t1) {
30
+ t2 = {
31
+ minHeight: t1,
32
+ display: "flex",
33
+ alignItems: "flex-start",
34
+ justifyContent: "center",
35
+ padding: "2rem",
36
+ border: `2px dashed ${HATCH}`,
37
+ backgroundImage: `repeating-linear-gradient(45deg, ${HATCH} 0 2px, transparent 2px 14px)`,
38
+ font: "600 14px/1.4 system-ui, sans-serif",
39
+ color: "rgb(128, 128, 128)"
40
+ };
41
+ $[0] = t1;
42
+ $[1] = t2;
43
+ } else t2 = $[1];
44
+ const style = t2;
45
+ let t3;
46
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
47
+ t3 = /* @__PURE__ */ jsx("span", { children: "Page content" });
48
+ $[2] = t3;
49
+ } else t3 = $[2];
50
+ let t4;
51
+ if ($[3] !== height || $[4] !== style) {
52
+ t4 = /* @__PURE__ */ jsx("div", {
53
+ "data-camox-look-placeholder": height,
54
+ style,
55
+ children: t3
56
+ });
57
+ $[3] = height;
58
+ $[4] = style;
59
+ $[5] = t4;
60
+ } else t4 = $[5];
61
+ return t4;
62
+ }
63
+ /**
64
+ * A curated Layout around no page, alone, as the look document's Layout Definition mode shows it
65
+ * (ADR 0032): its blocks, read like a Layout's, around a placeholder for a page's content.
66
+ */
67
+ function UnplacedLayoutContent(t0) {
68
+ const $ = c(21);
69
+ const { camoxApp, lookLayout } = t0;
70
+ let t1;
71
+ if ($[0] !== lookLayout.layout) {
72
+ t1 = {
73
+ page: EMPTY_PAGE,
74
+ layout: lookLayout.layout
75
+ };
76
+ $[0] = lookLayout.layout;
77
+ $[1] = t1;
78
+ } else t1 = $[1];
79
+ const { beforeBlocks, afterBlocks, layoutFiles, layoutItems } = usePageBlocks(t1);
80
+ const { locale } = useViewLocale();
81
+ let t2;
82
+ if ($[2] !== camoxApp || $[3] !== lookLayout.layoutId) {
83
+ t2 = camoxApp.getLayoutById(lookLayout.layoutId);
84
+ $[2] = camoxApp;
85
+ $[3] = lookLayout.layoutId;
86
+ $[4] = t2;
87
+ } else t2 = $[4];
88
+ const layout = t2;
89
+ if (!layout) throw new Error(`Unknown layout: ${lookLayout.layoutId}`);
90
+ let t3;
91
+ if ($[5] !== locale.tag || $[6] !== lookLayout.path || $[7] !== lookLayout.projectName) {
92
+ t3 = buildLayoutContext({
93
+ kind: "curated",
94
+ title: ""
95
+ }, {
96
+ path: lookLayout.path,
97
+ locale: locale.tag,
98
+ projectName: lookLayout.projectName
99
+ });
100
+ $[5] = locale.tag;
101
+ $[6] = lookLayout.path;
102
+ $[7] = lookLayout.projectName;
103
+ $[8] = t3;
104
+ } else t3 = $[8];
105
+ const context = t3;
106
+ let t4;
107
+ if ($[9] !== afterBlocks || $[10] !== beforeBlocks) {
108
+ t4 = [...beforeBlocks, ...afterBlocks];
109
+ $[9] = afterBlocks;
110
+ $[10] = beforeBlocks;
111
+ $[11] = t4;
112
+ } else t4 = $[11];
113
+ let t5;
114
+ if ($[12] !== lookLayout.placeholder) {
115
+ t5 = /* @__PURE__ */ jsx(PageContentPlaceholder, { height: lookLayout.placeholder });
116
+ $[12] = lookLayout.placeholder;
117
+ $[13] = t5;
118
+ } else t5 = $[13];
119
+ let t6;
120
+ if ($[14] !== context || $[15] !== layout || $[16] !== layoutFiles || $[17] !== layoutItems || $[18] !== t4 || $[19] !== t5) {
121
+ t6 = /* @__PURE__ */ jsx(SharedLayoutContent, {
122
+ layout,
123
+ context,
124
+ blocks: t4,
125
+ files: layoutFiles,
126
+ repeatableItems: layoutItems,
127
+ children: t5
128
+ });
129
+ $[14] = context;
130
+ $[15] = layout;
131
+ $[16] = layoutFiles;
132
+ $[17] = layoutItems;
133
+ $[18] = t4;
134
+ $[19] = t5;
135
+ $[20] = t6;
136
+ } else t6 = $[20];
137
+ return t6;
138
+ }
139
+
140
+ //#endregion
141
+ export { UnplacedLayoutContent };
@@ -45,8 +45,8 @@ const getSchemaFieldsInOrder = (schema) => {
45
45
  });
46
46
  };
47
47
  const ItemFieldsEditor = (t0) => {
48
- const $ = c(58);
49
- const { selectedFieldName, schema, data, blockId, itemId, onFieldChange, postToIframe, filesMap, itemsMap, references, placement, fieldIdPrefix } = t0;
48
+ const $ = c(59);
49
+ const { selectedFieldName, schema, data, blockId, itemId, onFieldChange, postToIframe, filesMap, itemsMap, references, placement, fieldIdPrefix, fieldHint } = t0;
50
50
  const owner = React.useContext(PreviewEditingOwnerContext);
51
51
  let t1;
52
52
  if ($[0] !== schema || $[1] !== selectedFieldName) {
@@ -146,7 +146,7 @@ const ItemFieldsEditor = (t0) => {
146
146
  React.useEffect(t8, t9);
147
147
  let t10;
148
148
  let t11;
149
- if ($[25] !== blockId || $[26] !== data || $[27] !== fields || $[28] !== filesMap || $[29] !== form || $[30] !== getFieldElementId || $[31] !== getFieldId || $[32] !== itemId || $[33] !== itemsMap || $[34] !== onFieldChange || $[35] !== owner || $[36] !== placement || $[37] !== postToIframe || $[38] !== references || $[39] !== schema || $[40] !== selectedFieldName) {
149
+ if ($[25] !== blockId || $[26] !== data || $[27] !== fieldHint || $[28] !== fields || $[29] !== filesMap || $[30] !== form || $[31] !== getFieldElementId || $[32] !== getFieldId || $[33] !== itemId || $[34] !== itemsMap || $[35] !== onFieldChange || $[36] !== owner || $[37] !== placement || $[38] !== postToIframe || $[39] !== references || $[40] !== schema || $[41] !== selectedFieldName) {
150
150
  const handleScalarChange = (fieldName_2, value, fieldApi) => {
151
151
  fieldApi.handleChange(value);
152
152
  if (timerRef.current) clearTimeout(timerRef.current);
@@ -158,7 +158,7 @@ const ItemFieldsEditor = (t0) => {
158
158
  }, 500);
159
159
  };
160
160
  let t12;
161
- if ($[43] !== blockId || $[44] !== itemId || $[45] !== owner || $[46] !== placement) {
161
+ if ($[44] !== blockId || $[45] !== itemId || $[46] !== owner || $[47] !== placement) {
162
162
  t12 = (fieldName_3, fieldType) => {
163
163
  if (owner === null) return;
164
164
  if (placement) {
@@ -190,12 +190,12 @@ const ItemFieldsEditor = (t0) => {
190
190
  fieldType
191
191
  });
192
192
  };
193
- $[43] = blockId;
194
- $[44] = itemId;
195
- $[45] = owner;
196
- $[46] = placement;
197
- $[47] = t12;
198
- } else t12 = $[47];
193
+ $[44] = blockId;
194
+ $[45] = itemId;
195
+ $[46] = owner;
196
+ $[47] = placement;
197
+ $[48] = t12;
198
+ } else t12 = $[48];
199
199
  const selectField = t12;
200
200
  const handleFieldFocus = (fieldName_4, fieldType_0) => {
201
201
  if (owner === null) return;
@@ -216,7 +216,7 @@ const ItemFieldsEditor = (t0) => {
216
216
  });
217
217
  };
218
218
  let t13;
219
- if ($[48] !== blockId || $[49] !== itemId || $[50] !== placement) {
219
+ if ($[49] !== blockId || $[50] !== itemId || $[51] !== placement) {
220
220
  t13 = (fieldName_6, recordId) => placement ? {
221
221
  ...placement,
222
222
  nested: {
@@ -229,15 +229,15 @@ const ItemFieldsEditor = (t0) => {
229
229
  fieldName: fieldName_6,
230
230
  recordId
231
231
  };
232
- $[48] = blockId;
233
- $[49] = itemId;
234
- $[50] = placement;
235
- $[51] = t13;
236
- } else t13 = $[51];
232
+ $[49] = blockId;
233
+ $[50] = itemId;
234
+ $[51] = placement;
235
+ $[52] = t13;
236
+ } else t13 = $[52];
237
237
  const placementOf = t13;
238
238
  const opensRecords = !placement?.nested;
239
239
  let t14;
240
- if ($[52] !== owner || $[53] !== placementOf) {
240
+ if ($[53] !== owner || $[54] !== placementOf) {
241
241
  t14 = (fieldName_7, recordId_0) => {
242
242
  if (owner === null) return;
243
243
  previewStore.send({
@@ -246,10 +246,10 @@ const ItemFieldsEditor = (t0) => {
246
246
  ...placementOf(fieldName_7, recordId_0)
247
247
  });
248
248
  };
249
- $[52] = owner;
250
- $[53] = placementOf;
251
- $[54] = t14;
252
- } else t14 = $[54];
249
+ $[53] = owner;
250
+ $[54] = placementOf;
251
+ $[55] = t14;
252
+ } else t14 = $[55];
253
253
  const openRecord = t14;
254
254
  t10 = "space-y-4 px-2 py-4";
255
255
  t11 = fields.map((field_0) => {
@@ -342,6 +342,7 @@ const ItemFieldsEditor = (t0) => {
342
342
  const preview = field_0.fieldType === "String" ? lexicalStateToPlainText(value_2 ?? "") || "Empty text" : field_0.fieldType === "Repeater" ? `${Array.isArray(value_2) ? value_2.length : 0} items` : field_0.fieldType === "Boolean" ? value_2 ? "On" : "Off" : typeof value_2 === "string" && value_2 ? value_2 : "Empty";
343
343
  return /* @__PURE__ */ jsx(DrillRow, {
344
344
  label,
345
+ hint: fieldHint?.(field_0.name),
345
346
  preview,
346
347
  Icon: field_0.fieldType === "String" ? Type : field_0.fieldType === "Repeater" ? List : field_0.fieldType === "Embed" ? Code : field_0.fieldType === "Boolean" ? ToggleLeft : ListFilter,
347
348
  onClick: () => selectField(field_0.name, field_0.fieldType),
@@ -444,6 +445,7 @@ const ItemFieldsEditor = (t0) => {
444
445
  const preview_0 = linkValue?.text || linkValue?.href || "Empty link";
445
446
  return /* @__PURE__ */ jsx(DrillRow, {
446
447
  label,
448
+ hint: fieldHint?.(field_0.name),
447
449
  preview: preview_0,
448
450
  Icon: Link2,
449
451
  onClick: () => selectField(field_0.name, "Link"),
@@ -465,6 +467,7 @@ const ItemFieldsEditor = (t0) => {
465
467
  else preview_1 = `${count} ${noun}s`;
466
468
  return /* @__PURE__ */ jsx(DrillRow, {
467
469
  label,
470
+ hint: fieldHint?.(field_0.name),
468
471
  preview: preview_1,
469
472
  Icon: isImage ? Images : FileIcon,
470
473
  onClick: () => selectField(field_0.name, isImage ? "Image" : "File"),
@@ -480,6 +483,7 @@ const ItemFieldsEditor = (t0) => {
480
483
  const preview_2 = resolveAssetValue(data[field_0.name], filesMap)?.filename || "No image";
481
484
  return /* @__PURE__ */ jsx(DrillRow, {
482
485
  label,
486
+ hint: fieldHint?.(field_0.name),
483
487
  preview: preview_2,
484
488
  Icon: ImageIcon,
485
489
  onClick: () => selectField(field_0.name, "Image"),
@@ -494,6 +498,7 @@ const ItemFieldsEditor = (t0) => {
494
498
  const preview_3 = resolveAssetValue(data[field_0.name], filesMap)?.filename || "No file";
495
499
  return /* @__PURE__ */ jsx(DrillRow, {
496
500
  label,
501
+ hint: fieldHint?.(field_0.name),
497
502
  preview: preview_3,
498
503
  Icon: FileIcon,
499
504
  onClick: () => selectField(field_0.name, "File"),
@@ -526,36 +531,37 @@ const ItemFieldsEditor = (t0) => {
526
531
  });
527
532
  $[25] = blockId;
528
533
  $[26] = data;
529
- $[27] = fields;
530
- $[28] = filesMap;
531
- $[29] = form;
532
- $[30] = getFieldElementId;
533
- $[31] = getFieldId;
534
- $[32] = itemId;
535
- $[33] = itemsMap;
536
- $[34] = onFieldChange;
537
- $[35] = owner;
538
- $[36] = placement;
539
- $[37] = postToIframe;
540
- $[38] = references;
541
- $[39] = schema;
542
- $[40] = selectedFieldName;
543
- $[41] = t10;
544
- $[42] = t11;
534
+ $[27] = fieldHint;
535
+ $[28] = fields;
536
+ $[29] = filesMap;
537
+ $[30] = form;
538
+ $[31] = getFieldElementId;
539
+ $[32] = getFieldId;
540
+ $[33] = itemId;
541
+ $[34] = itemsMap;
542
+ $[35] = onFieldChange;
543
+ $[36] = owner;
544
+ $[37] = placement;
545
+ $[38] = postToIframe;
546
+ $[39] = references;
547
+ $[40] = schema;
548
+ $[41] = selectedFieldName;
549
+ $[42] = t10;
550
+ $[43] = t11;
545
551
  } else {
546
- t10 = $[41];
547
- t11 = $[42];
552
+ t10 = $[42];
553
+ t11 = $[43];
548
554
  }
549
555
  let t12;
550
- if ($[55] !== t10 || $[56] !== t11) {
556
+ if ($[56] !== t10 || $[57] !== t11) {
551
557
  t12 = /* @__PURE__ */ jsx("form", {
552
558
  className: t10,
553
559
  children: t11
554
560
  });
555
- $[55] = t10;
556
- $[56] = t11;
557
- $[57] = t12;
558
- } else t12 = $[57];
561
+ $[56] = t10;
562
+ $[57] = t11;
563
+ $[58] = t12;
564
+ } else t12 = $[58];
559
565
  return t12;
560
566
  };
561
567
  function _temp(f) {
@@ -3,6 +3,7 @@ import { formatShortcut } from "../../../lib/shortcuts.js";
3
3
  import { TOGGLE_CANVAS_SHORTCUT } from "../previewConstants.js";
4
4
  import { prefetchCanvas } from "./CanvasPreview.js";
5
5
  import { DeviceSelector } from "../../../components/DeviceSelector.js";
6
+ import { DraftBar } from "../../studio/components/DraftBar.js";
6
7
  import { c } from "react/compiler-runtime";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import { useSelector } from "@xstate/store-react";
@@ -15,55 +16,60 @@ import { FloatingToolbar } from "@camox/ui/floating-toolbar";
15
16
 
16
17
  //#region src/features/preview/components/PreviewToolbar.tsx
17
18
  const PreviewToolbar = () => {
18
- const $ = c(21);
19
+ const $ = c(22);
19
20
  const isCanvasShown = useSelector(previewStore, selectIsCanvasShown);
20
21
  const isToolbarHidden = useSelector(previewStore, _temp);
21
22
  const viewportMode = useSelector(previewStore, _temp2);
22
23
  if (isToolbarHidden) return null;
23
24
  let t0;
24
- if ($[0] !== isCanvasShown) {
25
- t0 = /* @__PURE__ */ jsx(Switch, {
25
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
26
+ t0 = /* @__PURE__ */ jsx(DraftBar, { stacked: true });
27
+ $[0] = t0;
28
+ } else t0 = $[0];
29
+ let t1;
30
+ if ($[1] !== isCanvasShown) {
31
+ t1 = /* @__PURE__ */ jsx(Switch, {
26
32
  id: "show-canvas",
27
33
  checked: isCanvasShown,
28
34
  onCheckedChange: _temp3
29
35
  });
30
- $[0] = isCanvasShown;
31
- $[1] = t0;
32
- } else t0 = $[1];
33
- let t1;
34
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
35
- t1 = /* @__PURE__ */ jsxs(Label, {
36
+ $[1] = isCanvasShown;
37
+ $[2] = t1;
38
+ } else t1 = $[2];
39
+ let t2;
40
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t2 = /* @__PURE__ */ jsxs(Label, {
36
42
  htmlFor: "show-canvas",
37
43
  className: "flex items-center gap-2",
38
44
  children: ["Show canvas ", formatShortcut(TOGGLE_CANVAS_SHORTCUT)]
39
45
  });
40
- $[2] = t1;
41
- } else t1 = $[2];
42
- let t2;
43
- if ($[3] !== t0) {
44
- t2 = /* @__PURE__ */ jsxs("div", {
46
+ $[3] = t2;
47
+ } else t2 = $[3];
48
+ let t3;
49
+ if ($[4] !== t1) {
50
+ t3 = /* @__PURE__ */ jsxs("div", {
45
51
  className: "flex shrink-0 items-center gap-2 px-2",
46
52
  onPointerEnter: prefetchCanvas,
47
53
  onFocus: prefetchCanvas,
48
- children: [t0, t1]
54
+ children: [t1, t2]
49
55
  });
50
- $[3] = t0;
51
- $[4] = t2;
52
- } else t2 = $[4];
53
- const t3 = viewportMode === "full" ? "desktop" : viewportMode;
54
- let t4;
55
- if ($[5] !== t3) {
56
- t4 = /* @__PURE__ */ jsx(DeviceSelector, {
57
- value: t3,
56
+ $[4] = t1;
57
+ $[5] = t3;
58
+ } else t3 = $[5];
59
+ const t4 = viewportMode === "full" ? "desktop" : viewportMode;
60
+ let t5;
61
+ if ($[6] !== t4) {
62
+ t5 = /* @__PURE__ */ jsx(DeviceSelector, {
63
+ value: t4,
58
64
  desktopLabel: "Full view",
59
65
  onValueChange: _temp4
60
66
  });
61
- $[5] = t3;
62
67
  $[6] = t4;
63
- } else t4 = $[6];
64
- let t5;
65
- if ($[7] !== isCanvasShown) {
66
- t5 = /* @__PURE__ */ jsx(Button, {
68
+ $[7] = t5;
69
+ } else t5 = $[7];
70
+ let t6;
71
+ if ($[8] !== isCanvasShown) {
72
+ t6 = /* @__PURE__ */ jsx(Button, {
67
73
  type: "button",
68
74
  variant: "ghost",
69
75
  size: "icon",
@@ -72,58 +78,61 @@ const PreviewToolbar = () => {
72
78
  "aria-label": "Hide toolbar",
73
79
  className: "text-muted-foreground"
74
80
  });
75
- $[7] = isCanvasShown;
76
- $[8] = t5;
77
- } else t5 = $[8];
78
- let t6;
79
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
80
- t6 = /* @__PURE__ */ jsx(X, {});
81
+ $[8] = isCanvasShown;
81
82
  $[9] = t6;
82
83
  } else t6 = $[9];
83
84
  let t7;
84
- if ($[10] !== t5) {
85
- t7 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
86
- render: t5,
87
- children: t6
88
- });
89
- $[10] = t5;
90
- $[11] = t7;
91
- } else t7 = $[11];
85
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
86
+ t7 = /* @__PURE__ */ jsx(X, {});
87
+ $[10] = t7;
88
+ } else t7 = $[10];
92
89
  let t8;
93
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
94
- t8 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Hide toolbar" });
90
+ if ($[11] !== t6) {
91
+ t8 = /* @__PURE__ */ jsx(Tooltip$1.TooltipTrigger, {
92
+ render: t6,
93
+ children: t7
94
+ });
95
+ $[11] = t6;
95
96
  $[12] = t8;
96
97
  } else t8 = $[12];
97
98
  let t9;
98
- if ($[13] !== t7) {
99
- t9 = /* @__PURE__ */ jsx("div", {
99
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
100
+ t9 = /* @__PURE__ */ jsx(Tooltip$1.TooltipContent, { children: "Hide toolbar" });
101
+ $[13] = t9;
102
+ } else t9 = $[13];
103
+ let t10;
104
+ if ($[14] !== t8) {
105
+ t10 = /* @__PURE__ */ jsx("div", {
100
106
  className: "-ml-2 flex items-center gap-2",
101
- children: /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t7, t8] })
107
+ children: /* @__PURE__ */ jsxs(Tooltip$1.Tooltip, { children: [t8, t9] })
102
108
  });
103
- $[13] = t7;
104
- $[14] = t9;
105
- } else t9 = $[14];
106
- let t10;
107
- if ($[15] !== t4 || $[16] !== t9) {
108
- t10 = /* @__PURE__ */ jsxs("div", {
109
+ $[14] = t8;
110
+ $[15] = t10;
111
+ } else t10 = $[15];
112
+ let t11;
113
+ if ($[16] !== t10 || $[17] !== t5) {
114
+ t11 = /* @__PURE__ */ jsxs("div", {
109
115
  className: "flex shrink-0 items-center gap-6 self-stretch",
110
- children: [t4, t9]
116
+ children: [t5, t10]
111
117
  });
112
- $[15] = t4;
113
- $[16] = t9;
114
- $[17] = t10;
115
- } else t10 = $[17];
116
- let t11;
117
- if ($[18] !== t10 || $[19] !== t2) {
118
- t11 = /* @__PURE__ */ jsxs(FloatingToolbar, {
119
- className: "fixed bottom-2 w-max justify-between gap-6 transition-none",
120
- children: [t2, t10]
118
+ $[16] = t10;
119
+ $[17] = t5;
120
+ $[18] = t11;
121
+ } else t11 = $[18];
122
+ let t12;
123
+ if ($[19] !== t11 || $[20] !== t3) {
124
+ t12 = /* @__PURE__ */ jsxs("div", {
125
+ className: "pointer-events-none fixed bottom-2 left-1/2 z-30 flex -translate-x-1/2 flex-col items-center gap-2",
126
+ children: [t0, /* @__PURE__ */ jsxs(FloatingToolbar, {
127
+ className: "pointer-events-auto relative left-auto w-max translate-x-0 justify-between gap-6 transition-none",
128
+ children: [t3, t11]
129
+ })]
121
130
  });
122
- $[18] = t10;
123
- $[19] = t2;
124
- $[20] = t11;
125
- } else t11 = $[20];
126
- return t11;
131
+ $[19] = t11;
132
+ $[20] = t3;
133
+ $[21] = t12;
134
+ } else t12 = $[21];
135
+ return t12;
127
136
  };
128
137
  function _temp(state) {
129
138
  return state.context.isToolbarHidden;