camox 0.14.2 → 0.16.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/AuthGate.js +6 -0
- package/dist/core/components/AddBlockControlBar.js +30 -26
- package/dist/core/components/lexical/InlineContentEditable.js +19 -15
- package/dist/core/components/lexical/InlineLexicalEditor.js +62 -42
- package/dist/core/components/lexical/SelectionBroadcaster.js +25 -21
- package/dist/core/components/lexical/SidebarLexicalEditor.js +33 -21
- package/dist/core/createBlock.js +524 -488
- package/dist/core/createLayout.js +40 -28
- package/dist/core/hooks/useFieldSelection.js +12 -8
- package/dist/core/hooks/useIsEditable.js +6 -0
- package/dist/core/hooks/useOverlayMessage.js +19 -15
- package/dist/core/lib/contentType.d.ts +8 -8
- package/dist/core/lib/contentType.js +63 -0
- package/dist/features/content/CamoxContent.js +92 -88
- package/dist/features/content/components/AssetCard.js +46 -42
- package/dist/features/content/components/AssetCardSkeleton.js +8 -4
- package/dist/features/content/components/ContentSidebar.js +8 -4
- package/dist/features/content/components/UploadDropZone.js +31 -27
- package/dist/features/content/components/UploadProgressDrawer.js +98 -90
- package/dist/features/preview/CamoxPreview.js +162 -146
- package/dist/features/preview/components/AddBlockSheet.js +105 -101
- package/dist/features/preview/components/AgentChatSheet.js +74 -21
- package/dist/features/preview/components/AssetFieldEditor.js +98 -90
- package/dist/features/preview/components/AssetLightbox.js +21 -17
- package/dist/features/preview/components/AssetPickerGrid.js +84 -80
- package/dist/features/preview/components/BlockActionsPopover.js +35 -31
- package/dist/features/preview/components/BlockErrorBoundary.js +12 -8
- package/dist/features/preview/components/CreatePageModal.js +1 -1
- package/dist/features/preview/components/DebouncedFieldEditor.js +41 -37
- package/dist/features/preview/components/EditPageModal.js +114 -98
- package/dist/features/preview/components/FieldOverlayStyles.js +8 -4
- package/dist/features/preview/components/FieldToolbar.js +95 -54
- package/dist/features/preview/components/Frame.js +50 -46
- package/dist/features/preview/components/ItemFieldsEditor.js +81 -79
- package/dist/features/preview/components/LinkFieldEditor.js +138 -134
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +105 -97
- package/dist/features/preview/components/OverlayTracker.js +19 -15
- package/dist/features/preview/components/Overlays.js +27 -23
- package/dist/features/preview/components/PageContentSheet.js +54 -4
- package/dist/features/preview/components/PageLocationFieldset.js +113 -109
- package/dist/features/preview/components/PagePicker.js +1 -1
- package/dist/features/preview/components/PageTree.js +443 -399
- package/dist/features/preview/components/PeekedBlock.js +69 -65
- package/dist/features/preview/components/PreviewPanel.js +64 -52
- package/dist/features/preview/components/PreviewSideSheet.js +25 -16
- package/dist/features/preview/components/PreviewToolbar.js +127 -123
- package/dist/features/preview/components/RepeatableItemsList.js +176 -171
- package/dist/features/preview/components/ShikiMarkdown.js +18 -14
- package/dist/features/preview/components/UnlinkAssetButton.js +74 -70
- package/dist/features/preview/components/useRepeatableItemActions.js +266 -0
- package/dist/features/preview/components/useUpdateBlockPosition.js +13 -9
- package/dist/features/provider/CamoxProvider.js +60 -52
- package/dist/features/provider/components/CamoxAppContext.js +10 -6
- package/dist/features/provider/components/CommandPalette.js +77 -69
- package/dist/features/provider/useAdminShortcuts.js +11 -7
- package/dist/features/routes/pageRoute.js +8 -4
- package/dist/features/studio/CamoxStudio.js +23 -19
- package/dist/features/studio/components/EnvironmentMenu.js +32 -28
- package/dist/features/studio/components/Navbar.js +62 -54
- package/dist/features/studio/components/ProjectMenu.js +131 -123
- package/dist/features/studio/components/UserButton.js +15 -11
- package/dist/features/studio/useTheme.js +82 -42
- package/dist/features/vite/definitionsSync.js +5 -5
- package/dist/features/vite/skillGeneration.js +43 -8
- package/dist/features/vite/vite.d.ts +1 -1
- package/dist/features/vite/vite.js +20 -2
- package/dist/hooks/use-marquee-selection.js +36 -32
- package/dist/lib/auth.js +49 -22
- package/dist/lib/normalized-data.js +55 -47
- package/dist/lib/use-project-room.js +22 -18
- package/dist/studio.css +1 -1
- package/package.json +10 -11
- package/skills/camox-block/SKILL.md +4 -0
- package/skills/camox-cli/SKILL.md +142 -0
- package/skills/camox-layout/SKILL.md +4 -0
|
@@ -8,7 +8,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
|
|
9
9
|
//#region src/features/preview/components/PeekedBlock.tsx
|
|
10
10
|
const PeekedBlock = (t0) => {
|
|
11
|
-
const $ = c(
|
|
11
|
+
const $ = c(38);
|
|
12
|
+
if ($[0] !== "ff5157bba0a6ea6f2e8bf16a2dde67b22c4781735995c7f508a8ef374672cc97") {
|
|
13
|
+
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
|
+
$[0] = "ff5157bba0a6ea6f2e8bf16a2dde67b22c4781735995c7f508a8ef374672cc97";
|
|
15
|
+
}
|
|
12
16
|
const { onExitComplete } = t0;
|
|
13
17
|
const peekedBlock = useSelector(previewStore, _temp);
|
|
14
18
|
const skipExitAnimation = useSelector(previewStore, _temp2);
|
|
@@ -17,7 +21,7 @@ const PeekedBlock = (t0) => {
|
|
|
17
21
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
18
22
|
let t1;
|
|
19
23
|
let t2;
|
|
20
|
-
if ($[
|
|
24
|
+
if ($[1] !== onExitComplete || $[2] !== peekedBlock || $[3] !== skipExitAnimation) {
|
|
21
25
|
t1 = () => {
|
|
22
26
|
if (peekedBlock) {
|
|
23
27
|
setDisplayedBlock(peekedBlock);
|
|
@@ -37,36 +41,36 @@ const PeekedBlock = (t0) => {
|
|
|
37
41
|
skipExitAnimation,
|
|
38
42
|
onExitComplete
|
|
39
43
|
];
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
$[
|
|
44
|
-
$[
|
|
44
|
+
$[1] = onExitComplete;
|
|
45
|
+
$[2] = peekedBlock;
|
|
46
|
+
$[3] = skipExitAnimation;
|
|
47
|
+
$[4] = t1;
|
|
48
|
+
$[5] = t2;
|
|
45
49
|
} else {
|
|
46
|
-
t1 = $[
|
|
47
|
-
t2 = $[
|
|
50
|
+
t1 = $[4];
|
|
51
|
+
t2 = $[5];
|
|
48
52
|
}
|
|
49
53
|
React.useEffect(t1, t2);
|
|
50
54
|
let t3;
|
|
51
55
|
let t4;
|
|
52
|
-
if ($[
|
|
56
|
+
if ($[6] !== displayedBlock) {
|
|
53
57
|
t3 = () => {
|
|
54
58
|
if (!displayedBlock) return;
|
|
55
59
|
const id = requestAnimationFrame(() => setIsExpanded(true));
|
|
56
60
|
return () => cancelAnimationFrame(id);
|
|
57
61
|
};
|
|
58
62
|
t4 = [displayedBlock];
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
63
|
+
$[6] = displayedBlock;
|
|
64
|
+
$[7] = t3;
|
|
65
|
+
$[8] = t4;
|
|
62
66
|
} else {
|
|
63
|
-
t3 = $[
|
|
64
|
-
t4 = $[
|
|
67
|
+
t3 = $[7];
|
|
68
|
+
t4 = $[8];
|
|
65
69
|
}
|
|
66
70
|
React.useEffect(t3, t4);
|
|
67
71
|
let t5;
|
|
68
72
|
let t6;
|
|
69
|
-
if ($[
|
|
73
|
+
if ($[9] !== displayedBlock) {
|
|
70
74
|
t5 = () => {
|
|
71
75
|
if (displayedBlock && peekedBlockRef.current) peekedBlockRef.current.scrollIntoView({
|
|
72
76
|
behavior: "instant",
|
|
@@ -74,16 +78,16 @@ const PeekedBlock = (t0) => {
|
|
|
74
78
|
});
|
|
75
79
|
};
|
|
76
80
|
t6 = [displayedBlock];
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
81
|
+
$[9] = displayedBlock;
|
|
82
|
+
$[10] = t5;
|
|
83
|
+
$[11] = t6;
|
|
80
84
|
} else {
|
|
81
|
-
t5 = $[
|
|
82
|
-
t6 = $[
|
|
85
|
+
t5 = $[10];
|
|
86
|
+
t6 = $[11];
|
|
83
87
|
}
|
|
84
88
|
React.useEffect(t5, t6);
|
|
85
89
|
let t7;
|
|
86
|
-
if ($[
|
|
90
|
+
if ($[12] !== isExpanded || $[13] !== onExitComplete) {
|
|
87
91
|
t7 = (e) => {
|
|
88
92
|
if (e.propertyName !== "grid-template-rows" || e.target !== e.currentTarget) return;
|
|
89
93
|
if (isExpanded) {
|
|
@@ -96,10 +100,10 @@ const PeekedBlock = (t0) => {
|
|
|
96
100
|
setDisplayedBlock(null);
|
|
97
101
|
onExitComplete?.();
|
|
98
102
|
};
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t7 = $[
|
|
103
|
+
$[12] = isExpanded;
|
|
104
|
+
$[13] = onExitComplete;
|
|
105
|
+
$[14] = t7;
|
|
106
|
+
} else t7 = $[14];
|
|
103
107
|
const handleTransitionEnd = t7;
|
|
104
108
|
let t8;
|
|
105
109
|
bb0: {
|
|
@@ -108,18 +112,18 @@ const PeekedBlock = (t0) => {
|
|
|
108
112
|
break bb0;
|
|
109
113
|
}
|
|
110
114
|
let t9;
|
|
111
|
-
if ($[
|
|
115
|
+
if ($[15] !== displayedBlock._internal) {
|
|
112
116
|
t9 = displayedBlock._internal.getPeekBundle();
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
} else t9 = $[
|
|
117
|
+
$[15] = displayedBlock._internal;
|
|
118
|
+
$[16] = t9;
|
|
119
|
+
} else t9 = $[16];
|
|
116
120
|
t8 = t9;
|
|
117
121
|
}
|
|
118
122
|
const peekBundle = t8;
|
|
119
123
|
if (!displayedBlock || !peekBundle) return null;
|
|
120
124
|
const t9 = isExpanded ? "1fr" : "0fr";
|
|
121
125
|
let t10;
|
|
122
|
-
if ($[
|
|
126
|
+
if ($[17] !== t9) {
|
|
123
127
|
t10 = {
|
|
124
128
|
scrollMargin: "5rem",
|
|
125
129
|
display: "grid",
|
|
@@ -127,18 +131,18 @@ const PeekedBlock = (t0) => {
|
|
|
127
131
|
transition: "grid-template-rows 300ms ease-out",
|
|
128
132
|
background: "var(--background)"
|
|
129
133
|
};
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
} else t10 = $[
|
|
134
|
+
$[17] = t9;
|
|
135
|
+
$[18] = t10;
|
|
136
|
+
} else t10 = $[18];
|
|
133
137
|
let t11;
|
|
134
|
-
if ($[
|
|
138
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
135
139
|
t11 = { overflow: "hidden" };
|
|
136
|
-
$[
|
|
137
|
-
} else t11 = $[
|
|
140
|
+
$[19] = t11;
|
|
141
|
+
} else t11 = $[19];
|
|
138
142
|
const t12 = peekBundle.block.content;
|
|
139
143
|
const t13 = peekBundle.block.settings;
|
|
140
144
|
let t14;
|
|
141
|
-
if ($[
|
|
145
|
+
if ($[20] !== displayedBlock._internal.id || $[21] !== t12 || $[22] !== t13) {
|
|
142
146
|
t14 = {
|
|
143
147
|
_id: 0,
|
|
144
148
|
type: displayedBlock._internal.id,
|
|
@@ -146,35 +150,35 @@ const PeekedBlock = (t0) => {
|
|
|
146
150
|
settings: t13,
|
|
147
151
|
position: ""
|
|
148
152
|
};
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
} else t14 = $[
|
|
153
|
+
$[20] = displayedBlock._internal.id;
|
|
154
|
+
$[21] = t12;
|
|
155
|
+
$[22] = t13;
|
|
156
|
+
$[23] = t14;
|
|
157
|
+
} else t14 = $[23];
|
|
154
158
|
let t15;
|
|
155
|
-
if ($[
|
|
159
|
+
if ($[24] !== displayedBlock._internal.Component || $[25] !== t14) {
|
|
156
160
|
t15 = /* @__PURE__ */ jsx(displayedBlock._internal.Component, {
|
|
157
161
|
blockData: t14,
|
|
158
162
|
mode: "peek"
|
|
159
163
|
});
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
} else t15 = $[
|
|
164
|
+
$[24] = displayedBlock._internal.Component;
|
|
165
|
+
$[25] = t14;
|
|
166
|
+
$[26] = t15;
|
|
167
|
+
} else t15 = $[26];
|
|
164
168
|
let t16;
|
|
165
|
-
if ($[
|
|
169
|
+
if ($[27] !== peekBundle.files || $[28] !== peekBundle.repeatableItems || $[29] !== t15) {
|
|
166
170
|
t16 = /* @__PURE__ */ jsx(NormalizedDataProvider, {
|
|
167
171
|
files: peekBundle.files,
|
|
168
172
|
repeatableItems: peekBundle.repeatableItems,
|
|
169
173
|
children: t15
|
|
170
174
|
});
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
} else t16 = $[
|
|
175
|
+
$[27] = peekBundle.files;
|
|
176
|
+
$[28] = peekBundle.repeatableItems;
|
|
177
|
+
$[29] = t15;
|
|
178
|
+
$[30] = t16;
|
|
179
|
+
} else t16 = $[30];
|
|
176
180
|
let t17;
|
|
177
|
-
if ($[
|
|
181
|
+
if ($[31] !== displayedBlock._internal.id || $[32] !== t16) {
|
|
178
182
|
t17 = /* @__PURE__ */ jsx("div", {
|
|
179
183
|
style: t11,
|
|
180
184
|
children: /* @__PURE__ */ jsx(BlockErrorBoundary, {
|
|
@@ -183,23 +187,23 @@ const PeekedBlock = (t0) => {
|
|
|
183
187
|
children: t16
|
|
184
188
|
})
|
|
185
189
|
});
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else t17 = $[
|
|
190
|
+
$[31] = displayedBlock._internal.id;
|
|
191
|
+
$[32] = t16;
|
|
192
|
+
$[33] = t17;
|
|
193
|
+
} else t17 = $[33];
|
|
190
194
|
let t18;
|
|
191
|
-
if ($[
|
|
195
|
+
if ($[34] !== handleTransitionEnd || $[35] !== t10 || $[36] !== t17) {
|
|
192
196
|
t18 = /* @__PURE__ */ jsx("div", {
|
|
193
197
|
ref: peekedBlockRef,
|
|
194
198
|
style: t10,
|
|
195
199
|
onTransitionEnd: handleTransitionEnd,
|
|
196
200
|
children: t17
|
|
197
201
|
});
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
} else t18 = $[
|
|
202
|
+
$[34] = handleTransitionEnd;
|
|
203
|
+
$[35] = t10;
|
|
204
|
+
$[36] = t17;
|
|
205
|
+
$[37] = t18;
|
|
206
|
+
} else t18 = $[37];
|
|
203
207
|
return t18;
|
|
204
208
|
};
|
|
205
209
|
function _temp(state) {
|
|
@@ -17,25 +17,29 @@ import { PanelContent } from "@camox/ui/panel";
|
|
|
17
17
|
|
|
18
18
|
//#region src/features/preview/components/PreviewPanel.tsx
|
|
19
19
|
const PreviewFrame = (t0) => {
|
|
20
|
-
const $ = c(
|
|
20
|
+
const $ = c(9);
|
|
21
|
+
if ($[0] !== "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a") {
|
|
22
|
+
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
23
|
+
$[0] = "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a";
|
|
24
|
+
}
|
|
21
25
|
const { children, style, className, onIframeReady } = t0;
|
|
22
26
|
let t1;
|
|
23
27
|
let t2;
|
|
24
28
|
let t3;
|
|
25
|
-
if ($[
|
|
29
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
26
30
|
t1 = /* @__PURE__ */ jsx(FieldOverlayStyles, {});
|
|
27
31
|
t2 = /* @__PURE__ */ jsx(KeyDownForwarder, {});
|
|
28
32
|
t3 = /* @__PURE__ */ jsx(OverlayTracker, {});
|
|
29
|
-
$[
|
|
30
|
-
$[
|
|
31
|
-
$[
|
|
33
|
+
$[1] = t1;
|
|
34
|
+
$[2] = t2;
|
|
35
|
+
$[3] = t3;
|
|
32
36
|
} else {
|
|
33
|
-
t1 = $[
|
|
34
|
-
t2 = $[
|
|
35
|
-
t3 = $[
|
|
37
|
+
t1 = $[1];
|
|
38
|
+
t2 = $[2];
|
|
39
|
+
t3 = $[3];
|
|
36
40
|
}
|
|
37
41
|
let t4;
|
|
38
|
-
if ($[
|
|
42
|
+
if ($[4] !== children || $[5] !== className || $[6] !== onIframeReady || $[7] !== style) {
|
|
39
43
|
t4 = /* @__PURE__ */ jsxs(Frame, {
|
|
40
44
|
className,
|
|
41
45
|
style,
|
|
@@ -47,21 +51,25 @@ const PreviewFrame = (t0) => {
|
|
|
47
51
|
t3
|
|
48
52
|
]
|
|
49
53
|
});
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
} else t4 = $[
|
|
54
|
+
$[4] = children;
|
|
55
|
+
$[5] = className;
|
|
56
|
+
$[6] = onIframeReady;
|
|
57
|
+
$[7] = style;
|
|
58
|
+
$[8] = t4;
|
|
59
|
+
} else t4 = $[8];
|
|
56
60
|
return t4;
|
|
57
61
|
};
|
|
58
62
|
const KeyDownForwarder = () => {
|
|
59
|
-
const $ = c(
|
|
63
|
+
const $ = c(5);
|
|
64
|
+
if ($[0] !== "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a") {
|
|
65
|
+
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
66
|
+
$[0] = "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a";
|
|
67
|
+
}
|
|
60
68
|
const { window: iframeWindow } = useFrame();
|
|
61
69
|
const actions = useSelector(actionsStore, _temp);
|
|
62
70
|
let t0;
|
|
63
71
|
let t1;
|
|
64
|
-
if ($[
|
|
72
|
+
if ($[1] !== actions || $[2] !== iframeWindow) {
|
|
65
73
|
t0 = () => {
|
|
66
74
|
if (!iframeWindow || !iframeWindow.parent || iframeWindow.parent === iframeWindow) return;
|
|
67
75
|
const handleKeyDown = (e) => {
|
|
@@ -99,19 +107,23 @@ const KeyDownForwarder = () => {
|
|
|
99
107
|
};
|
|
100
108
|
};
|
|
101
109
|
t1 = [iframeWindow, actions];
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
110
|
+
$[1] = actions;
|
|
111
|
+
$[2] = iframeWindow;
|
|
112
|
+
$[3] = t0;
|
|
113
|
+
$[4] = t1;
|
|
106
114
|
} else {
|
|
107
|
-
t0 = $[
|
|
108
|
-
t1 = $[
|
|
115
|
+
t0 = $[3];
|
|
116
|
+
t1 = $[4];
|
|
109
117
|
}
|
|
110
118
|
React.useEffect(t0, t1);
|
|
111
119
|
return null;
|
|
112
120
|
};
|
|
113
121
|
const PreviewPanel = (t0) => {
|
|
114
|
-
const $ = c(
|
|
122
|
+
const $ = c(16);
|
|
123
|
+
if ($[0] !== "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a") {
|
|
124
|
+
for (let $i = 0; $i < 16; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
125
|
+
$[0] = "5933d2fdbd2df9c1913bc5ea18471cee06020a8ad70e86f537fee63569a5946a";
|
|
126
|
+
}
|
|
115
127
|
const { children } = t0;
|
|
116
128
|
useBlockActionsShortcuts();
|
|
117
129
|
const iframeElement = useSelector(previewStore, _temp2);
|
|
@@ -124,7 +136,7 @@ const PreviewPanel = (t0) => {
|
|
|
124
136
|
const [panelLeft, setPanelLeft] = React.useState(0);
|
|
125
137
|
let t1;
|
|
126
138
|
let t2;
|
|
127
|
-
if ($[
|
|
139
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
128
140
|
t1 = () => {
|
|
129
141
|
const el = wrapperRef.current?.parentElement;
|
|
130
142
|
if (!el) return;
|
|
@@ -139,18 +151,18 @@ const PreviewPanel = (t0) => {
|
|
|
139
151
|
return () => observer.disconnect();
|
|
140
152
|
};
|
|
141
153
|
t2 = [];
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
154
|
+
$[1] = t1;
|
|
155
|
+
$[2] = t2;
|
|
144
156
|
} else {
|
|
145
|
-
t1 = $[
|
|
146
|
-
t2 = $[
|
|
157
|
+
t1 = $[1];
|
|
158
|
+
t2 = $[2];
|
|
147
159
|
}
|
|
148
160
|
React.useEffect(t1, t2);
|
|
149
161
|
const sheetOverlap = Math.max(0, 400 - panelLeft);
|
|
150
162
|
const sheetOpenScale = panelWidth > 0 ? (panelWidth - sheetOverlap) / panelWidth : 1;
|
|
151
163
|
let t3;
|
|
152
164
|
let t4;
|
|
153
|
-
if ($[
|
|
165
|
+
if ($[3] !== isAgentChatSheetOpen) {
|
|
154
166
|
t3 = () => {
|
|
155
167
|
const actions = [
|
|
156
168
|
{
|
|
@@ -211,34 +223,34 @@ const PreviewPanel = (t0) => {
|
|
|
211
223
|
};
|
|
212
224
|
};
|
|
213
225
|
t4 = [isAgentChatSheetOpen];
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
226
|
+
$[3] = isAgentChatSheetOpen;
|
|
227
|
+
$[4] = t3;
|
|
228
|
+
$[5] = t4;
|
|
217
229
|
} else {
|
|
218
|
-
t3 = $[
|
|
219
|
-
t4 = $[
|
|
230
|
+
t3 = $[4];
|
|
231
|
+
t4 = $[5];
|
|
220
232
|
}
|
|
221
233
|
React.useEffect(t3, t4);
|
|
222
234
|
const t5 = isAnySideSheetOpen ? `${100 / sheetOpenScale}%` : "100%";
|
|
223
235
|
const t6 = isAnySideSheetOpen ? `scale(${sheetOpenScale})` : "scale(1)";
|
|
224
236
|
let t7;
|
|
225
|
-
if ($[
|
|
237
|
+
if ($[6] !== t5 || $[7] !== t6) {
|
|
226
238
|
t7 = {
|
|
227
239
|
height: t5,
|
|
228
240
|
transformOrigin: "top right",
|
|
229
241
|
transform: t6
|
|
230
242
|
};
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
} else t7 = $[
|
|
243
|
+
$[6] = t5;
|
|
244
|
+
$[7] = t6;
|
|
245
|
+
$[8] = t7;
|
|
246
|
+
} else t7 = $[8];
|
|
235
247
|
let t8;
|
|
236
|
-
if ($[
|
|
248
|
+
if ($[9] !== children || $[10] !== iframeElement || $[11] !== isMobileMode) {
|
|
237
249
|
t8 = isMobileMode ? /* @__PURE__ */ jsxs("div", {
|
|
238
250
|
className: "checkered flex h-full justify-center",
|
|
239
251
|
children: [
|
|
240
252
|
/* @__PURE__ */ jsxs("div", {
|
|
241
|
-
className: "relative mt-8 h-
|
|
253
|
+
className: "relative mt-8 h-175 w-[393px] overflow-hidden",
|
|
242
254
|
children: [/* @__PURE__ */ jsx(PreviewFrame, {
|
|
243
255
|
className: "overflow-auto",
|
|
244
256
|
onIframeReady: handleIframeReady,
|
|
@@ -258,13 +270,13 @@ const PreviewPanel = (t0) => {
|
|
|
258
270
|
/* @__PURE__ */ jsx(FieldToolbar, {}),
|
|
259
271
|
/* @__PURE__ */ jsx(PreviewToolbar, {})
|
|
260
272
|
] });
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
} else t8 = $[
|
|
273
|
+
$[9] = children;
|
|
274
|
+
$[10] = iframeElement;
|
|
275
|
+
$[11] = isMobileMode;
|
|
276
|
+
$[12] = t8;
|
|
277
|
+
} else t8 = $[12];
|
|
266
278
|
let t9;
|
|
267
|
-
if ($[
|
|
279
|
+
if ($[13] !== t7 || $[14] !== t8) {
|
|
268
280
|
t9 = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(PanelContent, {
|
|
269
281
|
className: "relative overflow-hidden bg-black",
|
|
270
282
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -274,10 +286,10 @@ const PreviewPanel = (t0) => {
|
|
|
274
286
|
children: t8
|
|
275
287
|
})
|
|
276
288
|
}) });
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else t9 = $[
|
|
289
|
+
$[13] = t7;
|
|
290
|
+
$[14] = t8;
|
|
291
|
+
$[15] = t9;
|
|
292
|
+
} else t9 = $[15];
|
|
281
293
|
return t9;
|
|
282
294
|
};
|
|
283
295
|
function _temp(state) {
|
|
@@ -7,15 +7,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
|
|
8
8
|
//#region src/features/preview/components/PreviewSideSheet.tsx
|
|
9
9
|
const PreviewSideSheet = (t0) => {
|
|
10
|
-
const $ = c(
|
|
10
|
+
const $ = c(10);
|
|
11
|
+
if ($[0] !== "c5d978e667783fedcb769bc26b0b2f3c7ea9b1a723f2413eb1bfaae8f7824b2b") {
|
|
12
|
+
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
|
+
$[0] = "c5d978e667783fedcb769bc26b0b2f3c7ea9b1a723f2413eb1bfaae8f7824b2b";
|
|
14
|
+
}
|
|
11
15
|
const { open, onOpenChange, initialFocus, children, className } = t0;
|
|
12
16
|
let t1;
|
|
13
|
-
if ($[
|
|
17
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
18
|
t1 = { minWidth: 400 };
|
|
15
|
-
$[
|
|
16
|
-
} else t1 = $[
|
|
19
|
+
$[1] = t1;
|
|
20
|
+
} else t1 = $[1];
|
|
17
21
|
let t2;
|
|
18
|
-
if ($[
|
|
22
|
+
if ($[2] !== children || $[3] !== className || $[4] !== initialFocus) {
|
|
19
23
|
t2 = /* @__PURE__ */ jsx(Sheet.SheetContent, {
|
|
20
24
|
className,
|
|
21
25
|
side: "left",
|
|
@@ -24,26 +28,31 @@ const PreviewSideSheet = (t0) => {
|
|
|
24
28
|
initialFocus,
|
|
25
29
|
children
|
|
26
30
|
});
|
|
27
|
-
$[
|
|
28
|
-
$[
|
|
29
|
-
$[
|
|
30
|
-
$[
|
|
31
|
-
} else t2 = $[
|
|
31
|
+
$[2] = children;
|
|
32
|
+
$[3] = className;
|
|
33
|
+
$[4] = initialFocus;
|
|
34
|
+
$[5] = t2;
|
|
35
|
+
} else t2 = $[5];
|
|
32
36
|
let t3;
|
|
33
|
-
if ($[
|
|
37
|
+
if ($[6] !== onOpenChange || $[7] !== open || $[8] !== t2) {
|
|
34
38
|
t3 = /* @__PURE__ */ jsx(Sheet.Sheet, {
|
|
35
39
|
open,
|
|
36
40
|
onOpenChange,
|
|
37
41
|
children: t2
|
|
38
42
|
});
|
|
39
|
-
$[
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
} else t3 = $[
|
|
43
|
+
$[6] = onOpenChange;
|
|
44
|
+
$[7] = open;
|
|
45
|
+
$[8] = t2;
|
|
46
|
+
$[9] = t3;
|
|
47
|
+
} else t3 = $[9];
|
|
44
48
|
return t3;
|
|
45
49
|
};
|
|
46
50
|
function useIsPreviewSheetOpen() {
|
|
51
|
+
const $ = c(1);
|
|
52
|
+
if ($[0] !== "c5d978e667783fedcb769bc26b0b2f3c7ea9b1a723f2413eb1bfaae8f7824b2b") {
|
|
53
|
+
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
54
|
+
$[0] = "c5d978e667783fedcb769bc26b0b2f3c7ea9b1a723f2413eb1bfaae8f7824b2b";
|
|
55
|
+
}
|
|
47
56
|
const isPageContentSheetOpen = useSelector(previewStore, _temp);
|
|
48
57
|
const isPeekingBlock = useSelector(previewStore, _temp2);
|
|
49
58
|
const isAgentChatSheetOpen = useSelector(previewStore, _temp3);
|