camox 0.15.1 → 0.16.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/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 +485 -444
- package/dist/core/createLayout.js +40 -28
- package/dist/core/hooks/useFieldSelection.js +13 -9
- package/dist/core/hooks/useIsEditable.js +7 -1
- package/dist/core/hooks/useOverlayMessage.js +19 -15
- package/dist/core/lib/contentType.d.ts +1 -1
- 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 +163 -147
- package/dist/features/preview/components/AddBlockSheet.js +108 -113
- package/dist/features/preview/components/AgentChatSheet.js +28 -24
- 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 +2 -2
- 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 +91 -46
- 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 +20 -16
- package/dist/features/preview/components/Overlays.js +28 -24
- package/dist/features/preview/components/PageContentSheet.js +55 -5
- package/dist/features/preview/components/PageLocationFieldset.js +113 -109
- package/dist/features/preview/components/PagePicker.js +2 -2
- package/dist/features/preview/components/PageTree.js +443 -399
- package/dist/features/preview/components/PeekedBlock.js +70 -66
- package/dist/features/preview/components/PreviewPanel.js +64 -52
- package/dist/features/preview/components/PreviewSideSheet.js +26 -17
- package/dist/features/preview/components/PreviewToolbar.js +128 -124
- package/dist/features/preview/components/RepeatableItemsList.js +177 -172
- 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 +14 -10
- package/dist/features/preview/previewStore.js +1 -1
- package/dist/features/provider/CamoxProvider.js +60 -52
- package/dist/features/provider/actionsStore.js +1 -1
- package/dist/features/provider/components/CamoxAppContext.js +10 -6
- package/dist/features/provider/components/CommandPalette.js +78 -70
- package/dist/features/provider/useAdminShortcuts.js +12 -8
- 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/studioStore.js +1 -1
- package/dist/features/studio/useTheme.js +82 -42
- package/dist/features/vite/definitionsSync.js +5 -5
- package/dist/features/vite/skillGeneration.js +10 -5
- package/dist/features/vite/vite.d.ts +1 -1
- package/dist/features/vite/vite.js +2 -3
- 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 +11 -12
- package/skills/camox-cli/SKILL.md +65 -2
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { useAuthState } from "../lib/auth.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
|
|
3
4
|
//#region src/components/AuthGate.tsx
|
|
4
5
|
function AuthGate(t0) {
|
|
6
|
+
const $ = c(1);
|
|
7
|
+
if ($[0] !== "4192eaab250d489efbc0f5cc22f05bd4c40209bc6ef7f711bf8c40a7b16edbf7") {
|
|
8
|
+
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
9
|
+
$[0] = "4192eaab250d489efbc0f5cc22f05bd4c40209bc6ef7f711bf8c40a7b16edbf7";
|
|
10
|
+
}
|
|
5
11
|
const { authenticated, unauthenticated } = t0;
|
|
6
12
|
const { isAuthenticated, isLoading } = useAuthState();
|
|
7
13
|
if (isLoading) return unauthenticated;
|
|
@@ -4,38 +4,42 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
|
|
5
5
|
//#region src/core/components/AddBlockControlBar.tsx
|
|
6
6
|
const AddBlockControlBar = (t0) => {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(15);
|
|
8
|
+
if ($[0] !== "d9366ab3e4df81ff779951fd9bd4445144714dd2fedfe4b3b0ae1e49c65112b5") {
|
|
9
|
+
for (let $i = 0; $i < 15; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
10
|
+
$[0] = "d9366ab3e4df81ff779951fd9bd4445144714dd2fedfe4b3b0ae1e49c65112b5";
|
|
11
|
+
}
|
|
8
12
|
const { position, hidden, onClick, onMouseLeave } = t0;
|
|
9
13
|
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
10
14
|
const t1 = hidden || void 0;
|
|
11
15
|
let t2;
|
|
12
16
|
let t3;
|
|
13
|
-
if ($[
|
|
17
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
18
|
t2 = () => setIsExpanded(true);
|
|
15
19
|
t3 = () => setIsExpanded(false);
|
|
16
|
-
$[
|
|
17
|
-
$[
|
|
20
|
+
$[1] = t2;
|
|
21
|
+
$[2] = t3;
|
|
18
22
|
} else {
|
|
19
|
-
t2 = $[
|
|
20
|
-
t3 = $[
|
|
23
|
+
t2 = $[1];
|
|
24
|
+
t3 = $[2];
|
|
21
25
|
}
|
|
22
26
|
const t4 = isExpanded || void 0;
|
|
23
27
|
let t5;
|
|
24
|
-
if ($[
|
|
28
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
25
29
|
t5 = /* @__PURE__ */ jsx("span", {
|
|
26
30
|
style: { lineHeight: 1 },
|
|
27
31
|
children: "+"
|
|
28
32
|
});
|
|
29
|
-
$[
|
|
30
|
-
} else t5 = $[
|
|
33
|
+
$[3] = t5;
|
|
34
|
+
} else t5 = $[3];
|
|
31
35
|
let t6;
|
|
32
|
-
if ($[
|
|
36
|
+
if ($[4] !== isExpanded) {
|
|
33
37
|
t6 = isExpanded && /* @__PURE__ */ jsx("span", { children: "Add block" });
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
} else t6 = $[
|
|
38
|
+
$[4] = isExpanded;
|
|
39
|
+
$[5] = t6;
|
|
40
|
+
} else t6 = $[5];
|
|
37
41
|
let t7;
|
|
38
|
-
if ($[
|
|
42
|
+
if ($[6] !== onClick || $[7] !== t4 || $[8] !== t6) {
|
|
39
43
|
t7 = /* @__PURE__ */ jsx("div", {
|
|
40
44
|
className: "camox-add-block-hitarea",
|
|
41
45
|
onMouseEnter: t2,
|
|
@@ -47,13 +51,13 @@ const AddBlockControlBar = (t0) => {
|
|
|
47
51
|
children: [t5, t6]
|
|
48
52
|
})
|
|
49
53
|
});
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
} else t7 = $[
|
|
54
|
+
$[6] = onClick;
|
|
55
|
+
$[7] = t4;
|
|
56
|
+
$[8] = t6;
|
|
57
|
+
$[9] = t7;
|
|
58
|
+
} else t7 = $[9];
|
|
55
59
|
let t8;
|
|
56
|
-
if ($[
|
|
60
|
+
if ($[10] !== onMouseLeave || $[11] !== position || $[12] !== t1 || $[13] !== t7) {
|
|
57
61
|
t8 = /* @__PURE__ */ jsx("div", {
|
|
58
62
|
className: "camox-add-block",
|
|
59
63
|
"data-camox-position": position,
|
|
@@ -61,12 +65,12 @@ const AddBlockControlBar = (t0) => {
|
|
|
61
65
|
onMouseLeave,
|
|
62
66
|
children: t7
|
|
63
67
|
});
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
} else t8 = $[
|
|
68
|
+
$[10] = onMouseLeave;
|
|
69
|
+
$[11] = position;
|
|
70
|
+
$[12] = t1;
|
|
71
|
+
$[13] = t7;
|
|
72
|
+
$[14] = t8;
|
|
73
|
+
} else t8 = $[14];
|
|
70
74
|
return t8;
|
|
71
75
|
};
|
|
72
76
|
|
|
@@ -9,32 +9,36 @@ import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext
|
|
|
9
9
|
* so it can be nested inside phrasing elements like <h1>, <p>, etc.
|
|
10
10
|
*/
|
|
11
11
|
const InlineContentEditable = React.forwardRef(function InlineContentEditable(props, ref) {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(9);
|
|
13
|
+
if ($[0] !== "f51782e849cd836b7225033d5ff80235d50e414894520650c8d6d2b8f668364d") {
|
|
14
|
+
for (let $i = 0; $i < 9; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
15
|
+
$[0] = "f51782e849cd836b7225033d5ff80235d50e414894520650c8d6d2b8f668364d";
|
|
16
|
+
}
|
|
13
17
|
const [editor] = useLexicalComposerContext();
|
|
14
18
|
let t0;
|
|
15
|
-
if ($[
|
|
19
|
+
if ($[1] !== editor) {
|
|
16
20
|
t0 = (el) => {
|
|
17
21
|
if (el?.ownerDocument?.defaultView) editor.setRootElement(el);
|
|
18
22
|
else editor.setRootElement(null);
|
|
19
23
|
};
|
|
20
|
-
$[
|
|
21
|
-
$[
|
|
22
|
-
} else t0 = $[
|
|
24
|
+
$[1] = editor;
|
|
25
|
+
$[2] = t0;
|
|
26
|
+
} else t0 = $[2];
|
|
23
27
|
const handleRef = t0;
|
|
24
28
|
let t1;
|
|
25
|
-
if ($[
|
|
29
|
+
if ($[3] !== handleRef || $[4] !== ref) {
|
|
26
30
|
t1 = (el_0) => {
|
|
27
31
|
handleRef(el_0);
|
|
28
32
|
if (typeof ref === "function") ref(el_0);
|
|
29
33
|
else if (ref) ref.current = el_0;
|
|
30
34
|
};
|
|
31
|
-
$[
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
-
} else t1 = $[
|
|
35
|
+
$[3] = handleRef;
|
|
36
|
+
$[4] = ref;
|
|
37
|
+
$[5] = t1;
|
|
38
|
+
} else t1 = $[5];
|
|
35
39
|
const mergedRef = t1;
|
|
36
40
|
let t2;
|
|
37
|
-
if ($[
|
|
41
|
+
if ($[6] !== mergedRef || $[7] !== props) {
|
|
38
42
|
t2 = /* @__PURE__ */ jsx("span", {
|
|
39
43
|
...props,
|
|
40
44
|
contentEditable: true,
|
|
@@ -42,10 +46,10 @@ const InlineContentEditable = React.forwardRef(function InlineContentEditable(pr
|
|
|
42
46
|
role: "textbox",
|
|
43
47
|
spellCheck: true
|
|
44
48
|
});
|
|
45
|
-
$[
|
|
46
|
-
$[
|
|
47
|
-
$[
|
|
48
|
-
} else t2 = $[
|
|
49
|
+
$[6] = mergedRef;
|
|
50
|
+
$[7] = props;
|
|
51
|
+
$[8] = t2;
|
|
52
|
+
} else t2 = $[8];
|
|
49
53
|
return t2;
|
|
50
54
|
});
|
|
51
55
|
|
|
@@ -14,13 +14,17 @@ import { COMMAND_PRIORITY_LOW, INSERT_LINE_BREAK_COMMAND, KEY_ENTER_COMMAND, KEY
|
|
|
14
14
|
|
|
15
15
|
//#region src/core/components/lexical/InlineLexicalEditor.tsx
|
|
16
16
|
function ExternalStateSync(t0) {
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(8);
|
|
18
|
+
if ($[0] !== "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e") {
|
|
19
|
+
for (let $i = 0; $i < 8; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
20
|
+
$[0] = "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e";
|
|
21
|
+
}
|
|
18
22
|
const { externalState } = t0;
|
|
19
23
|
const [editor] = useLexicalComposerContext();
|
|
20
24
|
const isFocusedRef = React.useRef(false);
|
|
21
25
|
let t1;
|
|
22
26
|
let t2;
|
|
23
|
-
if ($[
|
|
27
|
+
if ($[1] !== editor) {
|
|
24
28
|
t1 = () => editor.registerRootListener((root) => {
|
|
25
29
|
if (!root) return;
|
|
26
30
|
const handleFocus = () => {
|
|
@@ -37,17 +41,17 @@ function ExternalStateSync(t0) {
|
|
|
37
41
|
};
|
|
38
42
|
});
|
|
39
43
|
t2 = [editor];
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
44
|
+
$[1] = editor;
|
|
45
|
+
$[2] = t1;
|
|
46
|
+
$[3] = t2;
|
|
43
47
|
} else {
|
|
44
|
-
t1 = $[
|
|
45
|
-
t2 = $[
|
|
48
|
+
t1 = $[2];
|
|
49
|
+
t2 = $[3];
|
|
46
50
|
}
|
|
47
51
|
React.useEffect(t1, t2);
|
|
48
52
|
let t3;
|
|
49
53
|
let t4;
|
|
50
|
-
if ($[
|
|
54
|
+
if ($[4] !== editor || $[5] !== externalState) {
|
|
51
55
|
t3 = () => {
|
|
52
56
|
if (isFocusedRef.current) return;
|
|
53
57
|
try {
|
|
@@ -57,67 +61,79 @@ function ExternalStateSync(t0) {
|
|
|
57
61
|
} catch {}
|
|
58
62
|
};
|
|
59
63
|
t4 = [editor, externalState];
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
+
$[4] = editor;
|
|
65
|
+
$[5] = externalState;
|
|
66
|
+
$[6] = t3;
|
|
67
|
+
$[7] = t4;
|
|
64
68
|
} else {
|
|
65
|
-
t3 = $[
|
|
66
|
-
t4 = $[
|
|
69
|
+
t3 = $[6];
|
|
70
|
+
t4 = $[7];
|
|
67
71
|
}
|
|
68
72
|
React.useEffect(t3, t4);
|
|
69
73
|
return null;
|
|
70
74
|
}
|
|
71
75
|
function EscapeHandler() {
|
|
72
|
-
const $ = c(
|
|
76
|
+
const $ = c(4);
|
|
77
|
+
if ($[0] !== "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e") {
|
|
78
|
+
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
79
|
+
$[0] = "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e";
|
|
80
|
+
}
|
|
73
81
|
const [editor] = useLexicalComposerContext();
|
|
74
82
|
let t0;
|
|
75
83
|
let t1;
|
|
76
|
-
if ($[
|
|
84
|
+
if ($[1] !== editor) {
|
|
77
85
|
t0 = () => editor.registerCommand(KEY_ESCAPE_COMMAND, () => {
|
|
78
86
|
editor.getRootElement()?.blur();
|
|
79
87
|
return true;
|
|
80
88
|
}, COMMAND_PRIORITY_LOW);
|
|
81
89
|
t1 = [editor];
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
90
|
+
$[1] = editor;
|
|
91
|
+
$[2] = t0;
|
|
92
|
+
$[3] = t1;
|
|
85
93
|
} else {
|
|
86
|
-
t0 = $[
|
|
87
|
-
t1 = $[
|
|
94
|
+
t0 = $[2];
|
|
95
|
+
t1 = $[3];
|
|
88
96
|
}
|
|
89
97
|
React.useEffect(t0, t1);
|
|
90
98
|
return null;
|
|
91
99
|
}
|
|
92
100
|
function EnterAsLineBreakHandler() {
|
|
93
|
-
const $ = c(
|
|
101
|
+
const $ = c(4);
|
|
102
|
+
if ($[0] !== "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e") {
|
|
103
|
+
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
104
|
+
$[0] = "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e";
|
|
105
|
+
}
|
|
94
106
|
const [editor] = useLexicalComposerContext();
|
|
95
107
|
let t0;
|
|
96
108
|
let t1;
|
|
97
|
-
if ($[
|
|
109
|
+
if ($[1] !== editor) {
|
|
98
110
|
t0 = () => editor.registerCommand(KEY_ENTER_COMMAND, (event) => {
|
|
99
111
|
event?.preventDefault();
|
|
100
112
|
editor.dispatchCommand(INSERT_LINE_BREAK_COMMAND, false);
|
|
101
113
|
return true;
|
|
102
114
|
}, COMMAND_PRIORITY_LOW);
|
|
103
115
|
t1 = [editor];
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
116
|
+
$[1] = editor;
|
|
117
|
+
$[2] = t0;
|
|
118
|
+
$[3] = t1;
|
|
107
119
|
} else {
|
|
108
|
-
t0 = $[
|
|
109
|
-
t1 = $[
|
|
120
|
+
t0 = $[2];
|
|
121
|
+
t1 = $[3];
|
|
110
122
|
}
|
|
111
123
|
React.useEffect(t0, t1);
|
|
112
124
|
return null;
|
|
113
125
|
}
|
|
114
126
|
function FocusBlurHandler(t0) {
|
|
115
|
-
const $ = c(
|
|
127
|
+
const $ = c(6);
|
|
128
|
+
if ($[0] !== "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e") {
|
|
129
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
130
|
+
$[0] = "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e";
|
|
131
|
+
}
|
|
116
132
|
const { onFocus, onBlur } = t0;
|
|
117
133
|
const [editor] = useLexicalComposerContext();
|
|
118
134
|
let t1;
|
|
119
135
|
let t2;
|
|
120
|
-
if ($[
|
|
136
|
+
if ($[1] !== editor || $[2] !== onBlur || $[3] !== onFocus) {
|
|
121
137
|
t1 = () => editor.registerRootListener((root) => {
|
|
122
138
|
if (!root) return;
|
|
123
139
|
root.addEventListener("focus", onFocus);
|
|
@@ -132,14 +148,14 @@ function FocusBlurHandler(t0) {
|
|
|
132
148
|
onFocus,
|
|
133
149
|
onBlur
|
|
134
150
|
];
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
151
|
+
$[1] = editor;
|
|
152
|
+
$[2] = onBlur;
|
|
153
|
+
$[3] = onFocus;
|
|
154
|
+
$[4] = t1;
|
|
155
|
+
$[5] = t2;
|
|
140
156
|
} else {
|
|
141
|
-
t1 = $[
|
|
142
|
-
t2 = $[
|
|
157
|
+
t1 = $[4];
|
|
158
|
+
t2 = $[5];
|
|
143
159
|
}
|
|
144
160
|
React.useEffect(t1, t2);
|
|
145
161
|
return null;
|
|
@@ -189,14 +205,18 @@ function InlineLexicalEditor({ initialState, externalState, onChange, onFocus, o
|
|
|
189
205
|
});
|
|
190
206
|
}
|
|
191
207
|
function LexicalErrorBoundary(t0) {
|
|
192
|
-
const $ = c(
|
|
208
|
+
const $ = c(3);
|
|
209
|
+
if ($[0] !== "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e") {
|
|
210
|
+
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
211
|
+
$[0] = "501972792dc9ac4710accbc9f8bc483460af3c973ab4f8c292c292dcf4408e7e";
|
|
212
|
+
}
|
|
193
213
|
const { children } = t0;
|
|
194
214
|
let t1;
|
|
195
|
-
if ($[
|
|
215
|
+
if ($[1] !== children) {
|
|
196
216
|
t1 = /* @__PURE__ */ jsx(Fragment, { children });
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
} else t1 = $[
|
|
217
|
+
$[1] = children;
|
|
218
|
+
$[2] = t1;
|
|
219
|
+
} else t1 = $[2];
|
|
200
220
|
return t1;
|
|
201
221
|
}
|
|
202
222
|
|
|
@@ -7,11 +7,15 @@ import { $getSelection, $isRangeSelection, FORMAT_TEXT_COMMAND } from "lexical";
|
|
|
7
7
|
|
|
8
8
|
//#region src/core/components/lexical/SelectionBroadcaster.tsx
|
|
9
9
|
function SelectionBroadcaster(t0) {
|
|
10
|
-
const $ = c(
|
|
10
|
+
const $ = c(13);
|
|
11
|
+
if ($[0] !== "f181f408b72db1d040043499cda238045ef0e0efdc3d9844365e16efc5215a41") {
|
|
12
|
+
for (let $i = 0; $i < 13; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
|
+
$[0] = "f181f408b72db1d040043499cda238045ef0e0efdc3d9844365e16efc5215a41";
|
|
14
|
+
}
|
|
11
15
|
const { targetWindow } = t0;
|
|
12
16
|
const [editor] = useLexicalComposerContext();
|
|
13
17
|
let t1;
|
|
14
|
-
if ($[
|
|
18
|
+
if ($[1] !== editor || $[2] !== targetWindow) {
|
|
15
19
|
t1 = () => {
|
|
16
20
|
const nativeSelection = targetWindow.getSelection();
|
|
17
21
|
if (!(nativeSelection != null && nativeSelection.rangeCount > 0 && !nativeSelection.isCollapsed)) {
|
|
@@ -37,14 +41,14 @@ function SelectionBroadcaster(t0) {
|
|
|
37
41
|
activeFormats: format
|
|
38
42
|
});
|
|
39
43
|
};
|
|
40
|
-
$[
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
43
|
-
} else t1 = $[
|
|
44
|
+
$[1] = editor;
|
|
45
|
+
$[2] = targetWindow;
|
|
46
|
+
$[3] = t1;
|
|
47
|
+
} else t1 = $[3];
|
|
44
48
|
const broadcastSelection = t1;
|
|
45
49
|
let t2;
|
|
46
50
|
let t3;
|
|
47
|
-
if ($[
|
|
51
|
+
if ($[4] !== broadcastSelection || $[5] !== targetWindow) {
|
|
48
52
|
t2 = () => {
|
|
49
53
|
const doc = targetWindow.document;
|
|
50
54
|
const handleSelectionChange = () => broadcastSelection();
|
|
@@ -52,18 +56,18 @@ function SelectionBroadcaster(t0) {
|
|
|
52
56
|
return () => doc.removeEventListener("selectionchange", handleSelectionChange);
|
|
53
57
|
};
|
|
54
58
|
t3 = [targetWindow, broadcastSelection];
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
+
$[4] = broadcastSelection;
|
|
60
|
+
$[5] = targetWindow;
|
|
61
|
+
$[6] = t2;
|
|
62
|
+
$[7] = t3;
|
|
59
63
|
} else {
|
|
60
|
-
t2 = $[
|
|
61
|
-
t3 = $[
|
|
64
|
+
t2 = $[6];
|
|
65
|
+
t3 = $[7];
|
|
62
66
|
}
|
|
63
67
|
React.useEffect(t2, t3);
|
|
64
68
|
let t4;
|
|
65
69
|
let t5;
|
|
66
|
-
if ($[
|
|
70
|
+
if ($[8] !== broadcastSelection || $[9] !== editor || $[10] !== targetWindow) {
|
|
67
71
|
t4 = () => {
|
|
68
72
|
const handleMessage = (event) => {
|
|
69
73
|
const data = event.data;
|
|
@@ -84,14 +88,14 @@ function SelectionBroadcaster(t0) {
|
|
|
84
88
|
targetWindow,
|
|
85
89
|
broadcastSelection
|
|
86
90
|
];
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
91
|
+
$[8] = broadcastSelection;
|
|
92
|
+
$[9] = editor;
|
|
93
|
+
$[10] = targetWindow;
|
|
94
|
+
$[11] = t4;
|
|
95
|
+
$[12] = t5;
|
|
92
96
|
} else {
|
|
93
|
-
t4 = $[
|
|
94
|
-
t5 = $[
|
|
97
|
+
t4 = $[11];
|
|
98
|
+
t5 = $[12];
|
|
95
99
|
}
|
|
96
100
|
React.useEffect(t4, t5);
|
|
97
101
|
return null;
|
|
@@ -13,34 +13,42 @@ import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
|
13
13
|
|
|
14
14
|
//#region src/core/components/lexical/SidebarLexicalEditor.tsx
|
|
15
15
|
function EnterAsLineBreakHandler() {
|
|
16
|
-
const $ = c(
|
|
16
|
+
const $ = c(4);
|
|
17
|
+
if ($[0] !== "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83") {
|
|
18
|
+
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
19
|
+
$[0] = "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83";
|
|
20
|
+
}
|
|
17
21
|
const [editor] = useLexicalComposerContext();
|
|
18
22
|
let t0;
|
|
19
23
|
let t1;
|
|
20
|
-
if ($[
|
|
24
|
+
if ($[1] !== editor) {
|
|
21
25
|
t0 = () => editor.registerCommand(KEY_ENTER_COMMAND, (event) => {
|
|
22
26
|
event?.preventDefault();
|
|
23
27
|
editor.dispatchCommand(INSERT_LINE_BREAK_COMMAND, false);
|
|
24
28
|
return true;
|
|
25
29
|
}, COMMAND_PRIORITY_LOW);
|
|
26
30
|
t1 = [editor];
|
|
27
|
-
$[
|
|
28
|
-
$[
|
|
29
|
-
$[
|
|
31
|
+
$[1] = editor;
|
|
32
|
+
$[2] = t0;
|
|
33
|
+
$[3] = t1;
|
|
30
34
|
} else {
|
|
31
|
-
t0 = $[
|
|
32
|
-
t1 = $[
|
|
35
|
+
t0 = $[2];
|
|
36
|
+
t1 = $[3];
|
|
33
37
|
}
|
|
34
38
|
React.useEffect(t0, t1);
|
|
35
39
|
return null;
|
|
36
40
|
}
|
|
37
41
|
function ExternalStateSync(t0) {
|
|
38
|
-
const $ = c(
|
|
42
|
+
const $ = c(6);
|
|
43
|
+
if ($[0] !== "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83") {
|
|
44
|
+
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
45
|
+
$[0] = "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83";
|
|
46
|
+
}
|
|
39
47
|
const { value, isSyncingRef } = t0;
|
|
40
48
|
const [editor] = useLexicalComposerContext();
|
|
41
49
|
let t1;
|
|
42
50
|
let t2;
|
|
43
|
-
if ($[
|
|
51
|
+
if ($[1] !== editor || $[2] !== isSyncingRef || $[3] !== value) {
|
|
44
52
|
t1 = () => {
|
|
45
53
|
const root = editor.getRootElement();
|
|
46
54
|
if (root !== null && root === document.activeElement) return;
|
|
@@ -56,14 +64,14 @@ function ExternalStateSync(t0) {
|
|
|
56
64
|
value,
|
|
57
65
|
isSyncingRef
|
|
58
66
|
];
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
67
|
+
$[1] = editor;
|
|
68
|
+
$[2] = isSyncingRef;
|
|
69
|
+
$[3] = value;
|
|
70
|
+
$[4] = t1;
|
|
71
|
+
$[5] = t2;
|
|
64
72
|
} else {
|
|
65
|
-
t1 = $[
|
|
66
|
-
t2 = $[
|
|
73
|
+
t1 = $[4];
|
|
74
|
+
t2 = $[5];
|
|
67
75
|
}
|
|
68
76
|
React.useEffect(t1, t2);
|
|
69
77
|
return null;
|
|
@@ -111,14 +119,18 @@ function SidebarLexicalEditor({ id, value, onChange, onFocus, onBlur }) {
|
|
|
111
119
|
});
|
|
112
120
|
}
|
|
113
121
|
function LexicalErrorBoundary(t0) {
|
|
114
|
-
const $ = c(
|
|
122
|
+
const $ = c(3);
|
|
123
|
+
if ($[0] !== "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83") {
|
|
124
|
+
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
125
|
+
$[0] = "88f4e45c0dd3fbedb327bd420bf55680acba533a2c5c538f49f6920a8e97fd83";
|
|
126
|
+
}
|
|
115
127
|
const { children } = t0;
|
|
116
128
|
let t1;
|
|
117
|
-
if ($[
|
|
129
|
+
if ($[1] !== children) {
|
|
118
130
|
t1 = /* @__PURE__ */ jsx(Fragment, { children });
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else t1 = $[
|
|
131
|
+
$[1] = children;
|
|
132
|
+
$[2] = t1;
|
|
133
|
+
} else t1 = $[2];
|
|
122
134
|
return t1;
|
|
123
135
|
}
|
|
124
136
|
|