camox 0.41.1 → 0.43.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/core/components/lexical/{GradientNode.js → HighlightNode.js} +34 -34
- package/dist/core/components/lexical/InlineLexicalEditor.js +14 -14
- package/dist/core/components/lexical/InlineStylesPlugin.js +6 -6
- package/dist/core/components/lexical/SelectionBroadcaster.js +5 -5
- package/dist/core/components/lexical/SidebarLexicalEditor.js +52 -49
- package/dist/core/components/lexical/TextLinkPopover.js +191 -208
- package/dist/core/components/lexical/editorConfig.js +2 -2
- package/dist/core/createApp.d.ts +19 -4
- package/dist/core/createApp.js +2 -1
- package/dist/core/createLayout.d.ts +16 -3
- package/dist/core/createLayout.js +15 -15
- package/dist/core/derivedRoutes.js +1 -1
- package/dist/core/dom.d.ts +17 -0
- package/dist/core/dom.js +22 -0
- package/dist/core/editing/createEditableBlock.d.ts +8 -1
- package/dist/core/editing/createEditableBlock.js +636 -459
- package/dist/core/hooks/useOverlayState.js +11 -0
- package/dist/core/lib/fieldTypes.js +5 -5
- package/dist/core/lib/lexicalReact.js +4 -4
- package/dist/core/lib/lexicalState.js +20 -4
- package/dist/core/lib/modifierFormats.js +1 -1
- package/dist/core/lib/textLinks.js +5 -2
- package/dist/core/lib/textStyles.d.ts +2 -2
- package/dist/core/lib/textStyles.js +6 -11
- package/dist/core/pageDestinations.js +37 -0
- package/dist/features/og/imageResponse.node.js +11 -9
- package/dist/features/preview/CamoxPreview.js +108 -124
- package/dist/features/preview/commentsEnabled.js +8 -0
- package/dist/features/preview/components/AddBlockSidebar.js +80 -90
- package/dist/features/preview/components/AssetLightbox.js +4 -11
- package/dist/features/preview/components/AttachedComments.js +194 -0
- package/dist/features/preview/components/BlockActionsPopover.js +14 -65
- package/dist/features/preview/components/CommentHeader.js +122 -0
- package/dist/features/preview/components/CommentSidebar.js +29 -0
- package/dist/features/preview/components/CommentTargetQuote.js +166 -0
- package/dist/features/preview/components/CreatePageModal.js +4 -10
- package/dist/features/preview/components/DerivedLayoutSidebar.js +45 -26
- package/dist/features/preview/components/DerivedPageInfoSidebar.js +38 -26
- package/dist/features/preview/components/FieldToolbar.js +7 -7
- package/dist/features/preview/components/ItemFieldsEditor.js +275 -204
- package/dist/features/preview/components/LeftSidebar.js +18 -18
- package/dist/features/preview/components/LinkFieldEditor.js +212 -209
- package/dist/features/preview/components/OverlayTracker.js +14 -20
- package/dist/features/preview/components/Overlays.js +26 -35
- package/dist/features/preview/components/PageEditorSidebar.js +90 -91
- package/dist/features/preview/components/PageInfoSidebar.js +128 -159
- package/dist/features/preview/components/PagePicker.js +29 -24
- package/dist/features/preview/components/PageTree.js +159 -157
- package/dist/features/preview/components/PreviewComments.js +56 -0
- package/dist/features/preview/components/PreviewPanel.js +122 -78
- package/dist/features/preview/components/PreviewToolbar.js +280 -231
- package/dist/features/preview/components/PublicationRow.js +8 -11
- package/dist/features/preview/components/RightSidebar.js +14 -11
- package/dist/features/preview/components/SidebarSection.js +121 -0
- package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
- package/dist/features/preview/previewCommentsStore.js +115 -0
- package/dist/features/preview/previewSelection.js +75 -0
- package/dist/features/preview/previewStore.js +19 -39
- package/dist/features/preview/publication.js +10 -0
- package/dist/features/provider/AuthenticatedCamoxProvider.js +46 -34
- package/dist/features/provider/CoreCamoxProvider.js +1 -1
- package/dist/features/provider/components/CommandPalette.js +142 -58
- package/dist/features/provider/useAdminShortcuts.js +19 -8
- package/dist/features/routes/pageRuntime.js +0 -6
- package/dist/features/runtime/RuntimeChrome.js +40 -37
- package/dist/features/runtime/runtime.js +20 -21
- package/dist/features/studio/CamoxStudio.js +30 -50
- package/dist/features/studio/components/EnvironmentMenu.js +3 -2
- package/dist/features/studio/components/Navbar.js +53 -80
- package/dist/features/vite/layoutGeneration.js +7 -3
- package/dist/features/vite/runtimeDev.js +4 -1
- package/dist/features/vite/vite.d.ts +3 -2
- package/dist/features/vite/vite.js +14 -6
- package/dist/hooks/use-file-upload.js +0 -2
- package/dist/hooks/use-page-destinations.js +53 -0
- package/dist/lib/auth.js +11 -14
- package/dist/lib/server-auth-cookie.js +21 -0
- package/dist/studio.css +1 -1
- package/package.json +9 -7
- package/skills/camox/SKILL.md +32 -9
- package/skills/camox/references/block-definitions.md +84 -290
- package/skills/camox/references/cli-common.md +2 -4
- package/skills/camox/references/cli-content.md +147 -0
- package/skills/camox/references/cli-environments.md +1 -1
- package/skills/camox/references/dom-integrations.md +93 -0
- package/skills/camox/references/field-styling.md +50 -0
- package/skills/camox/references/layout-definitions.md +33 -147
- package/skills/camox/references/routed-layouts.md +71 -0
- package/skills/camoxify/SKILL.md +52 -0
- package/dist/lib/telemetry-client.js +0 -66
- package/dist/lib/telemetry.js +0 -26
- package/skills/camox/references/cli-blocks.md +0 -78
- package/skills/camox/references/cli-pages.md +0 -53
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getPageIdFromTextLinkTarget, isValidTextLinkTarget } from "../../lib/textLinks.js";
|
|
2
|
+
import { destinationTextLink } from "../../pageDestinations.js";
|
|
3
|
+
import { usePageDestinations } from "../../../hooks/use-page-destinations.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { useQuery } from "@tanstack/react-query";
|
|
6
5
|
import * as React from "react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { Button } from "@camox/ui/button";
|
|
@@ -14,50 +13,32 @@ import { Tabs, TabsList, TabsTrigger } from "@camox/ui/tabs";
|
|
|
14
13
|
|
|
15
14
|
//#region src/core/components/lexical/TextLinkPopover.tsx
|
|
16
15
|
function TextLinkPopover(t0) {
|
|
17
|
-
const $ = c(
|
|
18
|
-
if ($[0] !== "
|
|
19
|
-
for (let $i = 0; $i <
|
|
20
|
-
$[0] = "
|
|
16
|
+
const $ = c(64);
|
|
17
|
+
if ($[0] !== "88824dfd1c731cbf3353050e8cf8a5de209861b0dd4f32c3d21d9b49cba42e9b") {
|
|
18
|
+
for (let $i = 0; $i < 64; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
19
|
+
$[0] = "88824dfd1c731cbf3353050e8cf8a5de209861b0dd4f32c3d21d9b49cba42e9b";
|
|
21
20
|
}
|
|
22
21
|
const { open, onOpenChange, trigger, text, target, onSave, onUnlink } = t0;
|
|
23
22
|
const [textValue, setTextValue] = React.useState(text);
|
|
24
23
|
const [mode, setMode] = React.useState("page");
|
|
25
24
|
const [pageValue, setPageValue] = React.useState("");
|
|
26
25
|
const [urlValue, setUrlValue] = React.useState("");
|
|
27
|
-
const
|
|
26
|
+
const pages = usePageDestinations();
|
|
28
27
|
let t1;
|
|
29
|
-
if ($[1] !==
|
|
30
|
-
t1 =
|
|
31
|
-
$[1] =
|
|
32
|
-
$[2] =
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
if ($[1] !== pages || $[2] !== target) {
|
|
29
|
+
t1 = target != null && (getPageIdFromTextLinkTarget(target) != null || pages.some((page) => destinationTextLink(page) === target));
|
|
30
|
+
$[1] = pages;
|
|
31
|
+
$[2] = target;
|
|
32
|
+
$[3] = t1;
|
|
33
|
+
} else t1 = $[3];
|
|
34
|
+
const isPageTarget = t1;
|
|
35
35
|
let t2;
|
|
36
|
-
if ($[
|
|
37
|
-
t2 =
|
|
38
|
-
$[3] = project?.id;
|
|
39
|
-
$[4] = t2;
|
|
40
|
-
} else t2 = $[4];
|
|
41
|
-
const t3 = !!project;
|
|
42
|
-
let t4;
|
|
43
|
-
if ($[5] !== t2 || $[6] !== t3) {
|
|
44
|
-
t4 = {
|
|
45
|
-
...t2,
|
|
46
|
-
enabled: t3
|
|
47
|
-
};
|
|
48
|
-
$[5] = t2;
|
|
49
|
-
$[6] = t3;
|
|
50
|
-
$[7] = t4;
|
|
51
|
-
} else t4 = $[7];
|
|
52
|
-
const { data: pages } = useQuery(t4);
|
|
53
|
-
let t5;
|
|
54
|
-
if ($[8] !== target || $[9] !== text) {
|
|
55
|
-
t5 = () => {
|
|
36
|
+
if ($[4] !== isPageTarget || $[5] !== target || $[6] !== text) {
|
|
37
|
+
t2 = () => {
|
|
56
38
|
setTextValue(text);
|
|
57
|
-
|
|
58
|
-
if (pageId != null) {
|
|
39
|
+
if (target && isPageTarget) {
|
|
59
40
|
setMode("page");
|
|
60
|
-
setPageValue(
|
|
41
|
+
setPageValue(target);
|
|
61
42
|
setUrlValue("");
|
|
62
43
|
return;
|
|
63
44
|
}
|
|
@@ -65,116 +46,117 @@ function TextLinkPopover(t0) {
|
|
|
65
46
|
setUrlValue(target ?? "");
|
|
66
47
|
setPageValue("");
|
|
67
48
|
};
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
let
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
$[4] = isPageTarget;
|
|
50
|
+
$[5] = target;
|
|
51
|
+
$[6] = text;
|
|
52
|
+
$[7] = t2;
|
|
53
|
+
} else t2 = $[7];
|
|
54
|
+
const prepare = t2;
|
|
55
|
+
let t3;
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[8] !== open || $[9] !== prepare) {
|
|
58
|
+
t3 = () => {
|
|
77
59
|
if (!open) return;
|
|
78
60
|
prepare();
|
|
79
61
|
};
|
|
80
|
-
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
62
|
+
t4 = [open, prepare];
|
|
63
|
+
$[8] = open;
|
|
64
|
+
$[9] = prepare;
|
|
65
|
+
$[10] = t3;
|
|
66
|
+
$[11] = t4;
|
|
85
67
|
} else {
|
|
86
|
-
|
|
87
|
-
|
|
68
|
+
t3 = $[10];
|
|
69
|
+
t4 = $[11];
|
|
88
70
|
}
|
|
89
|
-
React.useEffect(
|
|
90
|
-
let
|
|
91
|
-
if ($[
|
|
92
|
-
|
|
71
|
+
React.useEffect(t3, t4);
|
|
72
|
+
let t5;
|
|
73
|
+
if ($[12] !== onOpenChange || $[13] !== prepare) {
|
|
74
|
+
t5 = (nextOpen) => {
|
|
93
75
|
onOpenChange(nextOpen);
|
|
94
76
|
if (nextOpen) prepare();
|
|
95
77
|
};
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else
|
|
100
|
-
const handleOpenChange =
|
|
101
|
-
let
|
|
102
|
-
if ($[
|
|
103
|
-
|
|
78
|
+
$[12] = onOpenChange;
|
|
79
|
+
$[13] = prepare;
|
|
80
|
+
$[14] = t5;
|
|
81
|
+
} else t5 = $[14];
|
|
82
|
+
const handleOpenChange = t5;
|
|
83
|
+
let t6;
|
|
84
|
+
if ($[15] !== mode || $[16] !== onSave || $[17] !== pageValue || $[18] !== textValue || $[19] !== urlValue) {
|
|
85
|
+
t6 = (event) => {
|
|
104
86
|
event.preventDefault();
|
|
105
87
|
const nextText = textValue.trim();
|
|
106
88
|
if (!nextText) return;
|
|
107
89
|
if (mode === "page") {
|
|
108
90
|
if (!pageValue) return;
|
|
109
|
-
onSave(
|
|
91
|
+
onSave(pageValue, nextText);
|
|
110
92
|
return;
|
|
111
93
|
}
|
|
112
94
|
const nextTarget = urlValue.trim();
|
|
113
|
-
if (
|
|
95
|
+
if (!isValidTextLinkTarget(nextTarget)) return;
|
|
114
96
|
onSave(nextTarget, nextText);
|
|
115
97
|
};
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
} else
|
|
123
|
-
const handleSubmit =
|
|
124
|
-
let
|
|
125
|
-
if ($[
|
|
126
|
-
|
|
127
|
-
$[
|
|
128
|
-
} else
|
|
129
|
-
let
|
|
130
|
-
if ($[
|
|
131
|
-
|
|
98
|
+
$[15] = mode;
|
|
99
|
+
$[16] = onSave;
|
|
100
|
+
$[17] = pageValue;
|
|
101
|
+
$[18] = textValue;
|
|
102
|
+
$[19] = urlValue;
|
|
103
|
+
$[20] = t6;
|
|
104
|
+
} else t6 = $[20];
|
|
105
|
+
const handleSubmit = t6;
|
|
106
|
+
let t7;
|
|
107
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t7 = /* @__PURE__ */ jsx(Link2, {});
|
|
109
|
+
$[21] = t7;
|
|
110
|
+
} else t7 = $[21];
|
|
111
|
+
let t8;
|
|
112
|
+
if ($[22] !== trigger) {
|
|
113
|
+
t8 = /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
132
114
|
render: trigger,
|
|
133
|
-
children:
|
|
115
|
+
children: t7
|
|
134
116
|
});
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
} else
|
|
138
|
-
let
|
|
139
|
-
if ($[
|
|
140
|
-
|
|
117
|
+
$[22] = trigger;
|
|
118
|
+
$[23] = t8;
|
|
119
|
+
} else t8 = $[23];
|
|
120
|
+
let t9;
|
|
121
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
122
|
+
t9 = /* @__PURE__ */ jsx(Label, {
|
|
141
123
|
htmlFor: "text-link-text",
|
|
142
124
|
children: "Text"
|
|
143
125
|
});
|
|
144
|
-
$[
|
|
145
|
-
} else
|
|
146
|
-
let
|
|
147
|
-
if ($[
|
|
148
|
-
|
|
149
|
-
$[
|
|
150
|
-
} else
|
|
151
|
-
let
|
|
152
|
-
if ($[
|
|
153
|
-
|
|
126
|
+
$[24] = t9;
|
|
127
|
+
} else t9 = $[24];
|
|
128
|
+
let t10;
|
|
129
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
130
|
+
t10 = (event_0) => setTextValue(event_0.target.value);
|
|
131
|
+
$[25] = t10;
|
|
132
|
+
} else t10 = $[25];
|
|
133
|
+
let t11;
|
|
134
|
+
if ($[26] !== textValue) {
|
|
135
|
+
t11 = /* @__PURE__ */ jsxs("div", {
|
|
154
136
|
className: "grid gap-1.5",
|
|
155
|
-
children: [
|
|
137
|
+
children: [t9, /* @__PURE__ */ jsx(Input, {
|
|
156
138
|
id: "text-link-text",
|
|
157
139
|
value: textValue,
|
|
158
|
-
onChange:
|
|
140
|
+
onChange: t10,
|
|
159
141
|
autoFocus: true
|
|
160
142
|
})]
|
|
161
143
|
});
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
} else
|
|
165
|
-
let
|
|
166
|
-
if ($[
|
|
167
|
-
|
|
168
|
-
$[
|
|
169
|
-
} else
|
|
170
|
-
let
|
|
171
|
-
if ($[
|
|
172
|
-
|
|
173
|
-
$[
|
|
174
|
-
} else
|
|
175
|
-
let
|
|
176
|
-
if ($[
|
|
177
|
-
|
|
144
|
+
$[26] = textValue;
|
|
145
|
+
$[27] = t11;
|
|
146
|
+
} else t11 = $[27];
|
|
147
|
+
let t12;
|
|
148
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
149
|
+
t12 = /* @__PURE__ */ jsx(Label, { children: "Destination" });
|
|
150
|
+
$[28] = t12;
|
|
151
|
+
} else t12 = $[28];
|
|
152
|
+
let t13;
|
|
153
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
154
|
+
t13 = (nextMode) => setMode(nextMode);
|
|
155
|
+
$[29] = t13;
|
|
156
|
+
} else t13 = $[29];
|
|
157
|
+
let t14;
|
|
158
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
159
|
+
t14 = /* @__PURE__ */ jsxs(TabsList, {
|
|
178
160
|
className: "w-full",
|
|
179
161
|
children: [/* @__PURE__ */ jsx(TabsTrigger, {
|
|
180
162
|
value: "page",
|
|
@@ -184,21 +166,21 @@ function TextLinkPopover(t0) {
|
|
|
184
166
|
children: "URL"
|
|
185
167
|
})]
|
|
186
168
|
});
|
|
187
|
-
$[
|
|
188
|
-
} else
|
|
189
|
-
let
|
|
190
|
-
if ($[
|
|
191
|
-
|
|
169
|
+
$[30] = t14;
|
|
170
|
+
} else t14 = $[30];
|
|
171
|
+
let t15;
|
|
172
|
+
if ($[31] !== mode) {
|
|
173
|
+
t15 = /* @__PURE__ */ jsx(Tabs, {
|
|
192
174
|
value: mode,
|
|
193
|
-
onValueChange:
|
|
194
|
-
children:
|
|
175
|
+
onValueChange: t13,
|
|
176
|
+
children: t14
|
|
195
177
|
});
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
} else
|
|
199
|
-
let
|
|
200
|
-
if ($[
|
|
201
|
-
|
|
178
|
+
$[31] = mode;
|
|
179
|
+
$[32] = t15;
|
|
180
|
+
} else t15 = $[32];
|
|
181
|
+
let t16;
|
|
182
|
+
if ($[33] !== mode || $[34] !== pageValue || $[35] !== pages || $[36] !== urlValue) {
|
|
183
|
+
t16 = mode === "page" ? /* @__PURE__ */ jsxs("select", {
|
|
202
184
|
className: "border-input bg-background text-foreground h-9 rounded-md border px-2 text-sm",
|
|
203
185
|
value: pageValue,
|
|
204
186
|
onChange: (event_1) => setPageValue(event_1.target.value),
|
|
@@ -207,120 +189,121 @@ function TextLinkPopover(t0) {
|
|
|
207
189
|
children: pages && pages.length > 0 ? "Select a page" : "No pages found"
|
|
208
190
|
}), pages?.map(_temp)]
|
|
209
191
|
}) : /* @__PURE__ */ jsx(Input, {
|
|
210
|
-
type: "
|
|
211
|
-
|
|
192
|
+
type: "text",
|
|
193
|
+
inputMode: "url",
|
|
194
|
+
placeholder: "https:// or /path",
|
|
212
195
|
value: urlValue,
|
|
213
196
|
onChange: (event_2) => setUrlValue(event_2.target.value)
|
|
214
197
|
});
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else
|
|
221
|
-
let
|
|
222
|
-
if ($[
|
|
223
|
-
|
|
198
|
+
$[33] = mode;
|
|
199
|
+
$[34] = pageValue;
|
|
200
|
+
$[35] = pages;
|
|
201
|
+
$[36] = urlValue;
|
|
202
|
+
$[37] = t16;
|
|
203
|
+
} else t16 = $[37];
|
|
204
|
+
let t17;
|
|
205
|
+
if ($[38] !== t15 || $[39] !== t16) {
|
|
206
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
224
207
|
className: "grid gap-1.5",
|
|
225
208
|
children: [
|
|
209
|
+
t12,
|
|
226
210
|
t15,
|
|
227
|
-
|
|
228
|
-
t19
|
|
211
|
+
t16
|
|
229
212
|
]
|
|
230
213
|
});
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
} else
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
} else
|
|
244
|
-
let
|
|
245
|
-
if ($[
|
|
246
|
-
|
|
214
|
+
$[38] = t15;
|
|
215
|
+
$[39] = t16;
|
|
216
|
+
$[40] = t17;
|
|
217
|
+
} else t17 = $[40];
|
|
218
|
+
let t18;
|
|
219
|
+
if ($[41] !== mode || $[42] !== pageValue || $[43] !== textValue || $[44] !== urlValue) {
|
|
220
|
+
t18 = !textValue.trim() || (mode === "page" ? !pageValue : !/^https?:\/\//i.test(urlValue.trim()));
|
|
221
|
+
$[41] = mode;
|
|
222
|
+
$[42] = pageValue;
|
|
223
|
+
$[43] = textValue;
|
|
224
|
+
$[44] = urlValue;
|
|
225
|
+
$[45] = t18;
|
|
226
|
+
} else t18 = $[45];
|
|
227
|
+
let t19;
|
|
228
|
+
if ($[46] !== t18) {
|
|
229
|
+
t19 = /* @__PURE__ */ jsx(Button, {
|
|
247
230
|
type: "submit",
|
|
248
231
|
size: "sm",
|
|
249
|
-
disabled:
|
|
232
|
+
disabled: t18,
|
|
250
233
|
children: "Save"
|
|
251
234
|
});
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else
|
|
255
|
-
let
|
|
256
|
-
if ($[
|
|
257
|
-
|
|
235
|
+
$[46] = t18;
|
|
236
|
+
$[47] = t19;
|
|
237
|
+
} else t19 = $[47];
|
|
238
|
+
let t20;
|
|
239
|
+
if ($[48] !== onUnlink || $[49] !== target) {
|
|
240
|
+
t20 = target && /* @__PURE__ */ jsx(Button, {
|
|
258
241
|
type: "button",
|
|
259
242
|
variant: "outline",
|
|
260
243
|
size: "sm",
|
|
261
244
|
onClick: onUnlink,
|
|
262
245
|
children: "Unlink"
|
|
263
246
|
});
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else
|
|
268
|
-
let
|
|
269
|
-
if ($[
|
|
270
|
-
|
|
247
|
+
$[48] = onUnlink;
|
|
248
|
+
$[49] = target;
|
|
249
|
+
$[50] = t20;
|
|
250
|
+
} else t20 = $[50];
|
|
251
|
+
let t21;
|
|
252
|
+
if ($[51] !== t19 || $[52] !== t20) {
|
|
253
|
+
t21 = /* @__PURE__ */ jsxs("div", {
|
|
271
254
|
className: "grid gap-2",
|
|
272
|
-
children: [
|
|
255
|
+
children: [t19, t20]
|
|
273
256
|
});
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
} else
|
|
278
|
-
let
|
|
279
|
-
if ($[
|
|
280
|
-
|
|
257
|
+
$[51] = t19;
|
|
258
|
+
$[52] = t20;
|
|
259
|
+
$[53] = t21;
|
|
260
|
+
} else t21 = $[53];
|
|
261
|
+
let t22;
|
|
262
|
+
if ($[54] !== handleSubmit || $[55] !== t11 || $[56] !== t17 || $[57] !== t21) {
|
|
263
|
+
t22 = /* @__PURE__ */ jsx(PopoverContent, {
|
|
281
264
|
align: "center",
|
|
282
265
|
className: "w-72 p-3",
|
|
283
266
|
children: /* @__PURE__ */ jsxs("form", {
|
|
284
267
|
className: "grid gap-3",
|
|
285
268
|
onSubmit: handleSubmit,
|
|
286
269
|
children: [
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
270
|
+
t11,
|
|
271
|
+
t17,
|
|
272
|
+
t21
|
|
290
273
|
]
|
|
291
274
|
})
|
|
292
275
|
});
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
} else
|
|
299
|
-
let
|
|
300
|
-
if ($[
|
|
301
|
-
|
|
276
|
+
$[54] = handleSubmit;
|
|
277
|
+
$[55] = t11;
|
|
278
|
+
$[56] = t17;
|
|
279
|
+
$[57] = t21;
|
|
280
|
+
$[58] = t22;
|
|
281
|
+
} else t22 = $[58];
|
|
282
|
+
let t23;
|
|
283
|
+
if ($[59] !== handleOpenChange || $[60] !== open || $[61] !== t22 || $[62] !== t8) {
|
|
284
|
+
t23 = /* @__PURE__ */ jsxs(Popover, {
|
|
302
285
|
open,
|
|
303
286
|
onOpenChange: handleOpenChange,
|
|
304
|
-
children: [
|
|
287
|
+
children: [t8, t22]
|
|
305
288
|
});
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
} else
|
|
312
|
-
return
|
|
289
|
+
$[59] = handleOpenChange;
|
|
290
|
+
$[60] = open;
|
|
291
|
+
$[61] = t22;
|
|
292
|
+
$[62] = t8;
|
|
293
|
+
$[63] = t23;
|
|
294
|
+
} else t23 = $[63];
|
|
295
|
+
return t23;
|
|
313
296
|
}
|
|
314
|
-
function _temp(
|
|
297
|
+
function _temp(page_0) {
|
|
315
298
|
return /* @__PURE__ */ jsxs("option", {
|
|
316
|
-
value:
|
|
299
|
+
value: destinationTextLink(page_0),
|
|
317
300
|
children: [
|
|
318
|
-
|
|
301
|
+
page_0.title,
|
|
319
302
|
" (",
|
|
320
|
-
|
|
303
|
+
page_0.fullPath,
|
|
321
304
|
")"
|
|
322
305
|
]
|
|
323
|
-
},
|
|
306
|
+
}, page_0.key);
|
|
324
307
|
}
|
|
325
308
|
|
|
326
309
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isLexicalState, markdownToLexicalState } from "../../lib/lexicalState.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HighlightNode } from "./HighlightNode.js";
|
|
3
3
|
import { InlineParagraphNode } from "./InlineParagraphNode.js";
|
|
4
4
|
import { LinkNode } from "@lexical/link";
|
|
5
5
|
import { ParagraphNode } from "lexical";
|
|
@@ -39,7 +39,7 @@ function createEditorConfig(initialState) {
|
|
|
39
39
|
theme: {},
|
|
40
40
|
nodes: [
|
|
41
41
|
LinkNode,
|
|
42
|
-
|
|
42
|
+
HighlightNode,
|
|
43
43
|
InlineParagraphNode,
|
|
44
44
|
{
|
|
45
45
|
replace: ParagraphNode,
|
package/dist/core/createApp.d.ts
CHANGED
|
@@ -21,9 +21,10 @@ declare function createApp({
|
|
|
21
21
|
children
|
|
22
22
|
}: {
|
|
23
23
|
children: (props: {
|
|
24
|
+
"data-camox-comment-block-id"?: number;
|
|
24
25
|
ref: (element: HTMLElement | null) => void;
|
|
25
26
|
style: React.CSSProperties;
|
|
26
|
-
|
|
27
|
+
onClickCapture: (e: React.MouseEvent) => void;
|
|
27
28
|
onMouseEnter: () => void;
|
|
28
29
|
onMouseLeave: () => void;
|
|
29
30
|
}) => React.ReactNode;
|
|
@@ -45,6 +46,7 @@ declare function createApp({
|
|
|
45
46
|
"data-camox-overlay-mode"?: string;
|
|
46
47
|
onMouseEnter?: (() => void) | undefined;
|
|
47
48
|
onMouseLeave?: (() => void) | undefined;
|
|
49
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
48
50
|
}, data: {
|
|
49
51
|
text: string;
|
|
50
52
|
}) => React.ReactNode;
|
|
@@ -86,6 +88,7 @@ declare function createApp({
|
|
|
86
88
|
"data-camox-overlay-mode"?: string;
|
|
87
89
|
onMouseEnter?: (() => void) | undefined;
|
|
88
90
|
onMouseLeave?: (() => void) | undefined;
|
|
91
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
89
92
|
}, data: {
|
|
90
93
|
text: string;
|
|
91
94
|
href: string;
|
|
@@ -148,6 +151,7 @@ declare function createApp({
|
|
|
148
151
|
"data-camox-overlay-mode"?: string;
|
|
149
152
|
onMouseEnter?: (() => void) | undefined;
|
|
150
153
|
onMouseLeave?: (() => void) | undefined;
|
|
154
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
151
155
|
}, data: {
|
|
152
156
|
text: string;
|
|
153
157
|
}) => React.ReactNode;
|
|
@@ -175,6 +179,7 @@ declare function createApp({
|
|
|
175
179
|
"data-camox-overlay-mode"?: string;
|
|
176
180
|
onMouseEnter?: (() => void) | undefined;
|
|
177
181
|
onMouseLeave?: (() => void) | undefined;
|
|
182
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
178
183
|
}, data: {
|
|
179
184
|
text: string;
|
|
180
185
|
href: string;
|
|
@@ -272,6 +277,7 @@ declare function createApp({
|
|
|
272
277
|
"data-camox-overlay-mode"?: string;
|
|
273
278
|
onMouseEnter?: (() => void) | undefined;
|
|
274
279
|
onMouseLeave?: (() => void) | undefined;
|
|
280
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
275
281
|
}, data: {
|
|
276
282
|
text: string;
|
|
277
283
|
}) => React.ReactNode;
|
|
@@ -299,6 +305,7 @@ declare function createApp({
|
|
|
299
305
|
"data-camox-overlay-mode"?: string;
|
|
300
306
|
onMouseEnter?: (() => void) | undefined;
|
|
301
307
|
onMouseLeave?: (() => void) | undefined;
|
|
308
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
302
309
|
}, data: {
|
|
303
310
|
text: string;
|
|
304
311
|
href: string;
|
|
@@ -422,9 +429,10 @@ declare function createApp({
|
|
|
422
429
|
children
|
|
423
430
|
}: {
|
|
424
431
|
children: (props: {
|
|
432
|
+
"data-camox-comment-block-id"?: number;
|
|
425
433
|
ref: (element: HTMLElement | null) => void;
|
|
426
434
|
style: React.CSSProperties;
|
|
427
|
-
|
|
435
|
+
onClickCapture: (e: React.MouseEvent) => void;
|
|
428
436
|
onMouseEnter: () => void;
|
|
429
437
|
onMouseLeave: () => void;
|
|
430
438
|
}) => React.ReactNode;
|
|
@@ -446,6 +454,7 @@ declare function createApp({
|
|
|
446
454
|
"data-camox-overlay-mode"?: string;
|
|
447
455
|
onMouseEnter?: (() => void) | undefined;
|
|
448
456
|
onMouseLeave?: (() => void) | undefined;
|
|
457
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
449
458
|
}, data: {
|
|
450
459
|
text: string;
|
|
451
460
|
}) => React.ReactNode;
|
|
@@ -487,6 +496,7 @@ declare function createApp({
|
|
|
487
496
|
"data-camox-overlay-mode"?: string;
|
|
488
497
|
onMouseEnter?: (() => void) | undefined;
|
|
489
498
|
onMouseLeave?: (() => void) | undefined;
|
|
499
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
490
500
|
}, data: {
|
|
491
501
|
text: string;
|
|
492
502
|
href: string;
|
|
@@ -549,6 +559,7 @@ declare function createApp({
|
|
|
549
559
|
"data-camox-overlay-mode"?: string;
|
|
550
560
|
onMouseEnter?: (() => void) | undefined;
|
|
551
561
|
onMouseLeave?: (() => void) | undefined;
|
|
562
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
552
563
|
}, data: {
|
|
553
564
|
text: string;
|
|
554
565
|
}) => React.ReactNode;
|
|
@@ -576,6 +587,7 @@ declare function createApp({
|
|
|
576
587
|
"data-camox-overlay-mode"?: string;
|
|
577
588
|
onMouseEnter?: (() => void) | undefined;
|
|
578
589
|
onMouseLeave?: (() => void) | undefined;
|
|
590
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
579
591
|
}, data: {
|
|
580
592
|
text: string;
|
|
581
593
|
href: string;
|
|
@@ -673,6 +685,7 @@ declare function createApp({
|
|
|
673
685
|
"data-camox-overlay-mode"?: string;
|
|
674
686
|
onMouseEnter?: (() => void) | undefined;
|
|
675
687
|
onMouseLeave?: (() => void) | undefined;
|
|
688
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
676
689
|
}, data: {
|
|
677
690
|
text: string;
|
|
678
691
|
}) => React.ReactNode;
|
|
@@ -700,6 +713,7 @@ declare function createApp({
|
|
|
700
713
|
"data-camox-overlay-mode"?: string;
|
|
701
714
|
onMouseEnter?: (() => void) | undefined;
|
|
702
715
|
onMouseLeave?: (() => void) | undefined;
|
|
716
|
+
onClickCapture?: ((event: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
703
717
|
}, data: {
|
|
704
718
|
text: string;
|
|
705
719
|
href: string;
|
|
@@ -830,7 +844,7 @@ declare function createApp({
|
|
|
830
844
|
useData(): unknown;
|
|
831
845
|
_internal: {
|
|
832
846
|
id: string;
|
|
833
|
-
kind: "curated" | "derived";
|
|
847
|
+
kind: "curated" | "derived" | "singleton";
|
|
834
848
|
loader: ((context: {
|
|
835
849
|
params: Record<string, string>;
|
|
836
850
|
}) => unknown) | undefined;
|
|
@@ -905,7 +919,7 @@ declare function createApp({
|
|
|
905
919
|
useData(): unknown;
|
|
906
920
|
_internal: {
|
|
907
921
|
id: string;
|
|
908
|
-
kind: "curated" | "derived";
|
|
922
|
+
kind: "curated" | "derived" | "singleton";
|
|
909
923
|
loader: ((context: {
|
|
910
924
|
params: Record<string, string>;
|
|
911
925
|
}) => unknown) | undefined;
|
|
@@ -990,6 +1004,7 @@ declare function createApp({
|
|
|
990
1004
|
}[];
|
|
991
1005
|
getSerializableLayoutDefinitions(): {
|
|
992
1006
|
layoutId: string;
|
|
1007
|
+
kind: "curated" | "derived" | "singleton";
|
|
993
1008
|
description: string;
|
|
994
1009
|
blocks: ({
|
|
995
1010
|
type: string;
|