@adecore/editor-react 0.53.3 → 0.54.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/AnchoredPopup.d.ts +1 -1
- package/dist/AnchoredPopup.js +27 -12
- package/dist/AttributionCard.d.ts +1 -1
- package/dist/BaselineStatus.js +1 -1
- package/dist/CallHierarchyPanel.js +11 -10
- package/dist/ChangeReview.d.ts +1 -1
- package/dist/CodeAuthorsCard.js +2 -2
- package/dist/CompletionPopup.js +18 -14
- package/dist/DiffView.d.ts +2 -2
- package/dist/DiffView.js +159 -143
- package/dist/EditorContextMenu.js +1 -1
- package/dist/EditorView.d.ts +2 -2
- package/dist/EditorView.js +97 -81
- package/dist/FindReplace.js +3 -3
- package/dist/HoverCard.d.ts +3 -3
- package/dist/HoverCard.js +3 -3
- package/dist/HoverSections.js +1 -1
- package/dist/LanguagePopups.js +1 -1
- package/dist/Markdown.js +15 -3
- package/dist/PeekPanel.js +124 -103
- package/dist/PickPopup.js +8 -4
- package/dist/RenameCard.js +7 -7
- package/dist/RenderedDocs.d.ts +1 -1
- package/dist/RenderedDocs.js +1 -1
- package/dist/SplitDiffView.js +21 -4
- package/dist/SymbolPicker.js +93 -89
- package/dist/WrapCard.js +1 -1
- package/dist/call-hierarchy.d.ts +1 -1
- package/dist/call-hierarchy.js +3 -3
- package/dist/code-actions.js +2 -2
- package/dist/code-vision.d.ts +1 -1
- package/dist/completion-model.d.ts +1 -1
- package/dist/completion-model.js +2 -2
- package/dist/completion.d.ts +1 -1
- package/dist/completion.js +12 -12
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.js +1 -1
- package/dist/diff-overlays.js +2 -2
- package/dist/editor-language.d.ts +12 -12
- package/dist/editor-language.js +10 -10
- package/dist/editor-react.css +4 -4
- package/dist/highlights.d.ts +1 -1
- package/dist/highlights.js +2 -2
- package/dist/host-types.d.ts +4 -4
- package/dist/hover.js +1 -1
- package/dist/inlay-hints.js +1 -1
- package/dist/live-templates.js +1 -1
- package/dist/markup.js +1 -1
- package/dist/navigation.d.ts +1 -1
- package/dist/navigation.js +3 -3
- package/dist/peek.js +1 -1
- package/dist/popups.d.ts +5 -5
- package/dist/project-language.d.ts +4 -4
- package/dist/project-language.js +5 -5
- package/dist/rename.js +1 -1
- package/dist/rendered-docs.d.ts +1 -1
- package/dist/rendered-docs.js +1 -1
- package/dist/shortcut-keys.d.ts +1 -1
- package/dist/signature.js +1 -1
- package/dist/snippet-field-transforms.d.ts +2 -2
- package/dist/snippet-insert.js +3 -3
- package/dist/snippet-session.d.ts +2 -2
- package/dist/snippet-session.js +5 -5
- package/dist/snippet-transform-queue.d.ts +1 -1
- package/dist/surround.js +1 -1
- package/dist/symbol-picker.js +2 -2
- package/dist/templates.js +1 -1
- package/dist/use-problem-counts.d.ts +1 -1
- package/package.json +6 -6
- package/src/AnchoredPopup.tsx +7 -3
- package/src/AttributionCard.tsx +1 -1
- package/src/BaselineStatus.tsx +1 -1
- package/src/CallHierarchyPanel.tsx +13 -12
- package/src/ChangeReview.tsx +1 -1
- package/src/CodeAuthorsCard.tsx +2 -2
- package/src/CompletionPopup.tsx +16 -13
- package/src/DiffView.tsx +12 -6
- package/src/EditorContextMenu.tsx +2 -2
- package/src/EditorView.tsx +14 -6
- package/src/FindReplace.tsx +3 -3
- package/src/HoverCard.tsx +7 -7
- package/src/HoverSections.tsx +1 -1
- package/src/LanguagePopups.tsx +3 -3
- package/src/Markdown.tsx +13 -2
- package/src/PeekPanel.tsx +13 -13
- package/src/PickPopup.tsx +6 -5
- package/src/RenameCard.tsx +8 -8
- package/src/RenderedDocs.tsx +3 -3
- package/src/SplitDiffView.tsx +14 -5
- package/src/SymbolPicker.tsx +6 -6
- package/src/WrapCard.tsx +2 -2
- package/src/call-hierarchy.ts +5 -5
- package/src/code-actions.ts +3 -3
- package/src/code-authors.ts +1 -1
- package/src/code-vision.ts +3 -3
- package/src/completion-model.ts +3 -3
- package/src/completion.ts +15 -15
- package/src/diagnostics.ts +4 -4
- package/src/diff-overlays.tsx +4 -4
- package/src/editor-language.ts +13 -13
- package/src/editor-react.css +4 -4
- package/src/format-on-type.ts +1 -1
- package/src/highlights.ts +3 -3
- package/src/host-types.ts +4 -4
- package/src/hover.ts +3 -3
- package/src/inlay-hints.ts +1 -1
- package/src/line-edits.ts +1 -1
- package/src/live-templates.ts +2 -2
- package/src/markup.ts +2 -2
- package/src/navigation.ts +5 -5
- package/src/patch-decorations.ts +1 -1
- package/src/peek.ts +3 -3
- package/src/pick.ts +1 -1
- package/src/popups.ts +5 -5
- package/src/postfix.ts +1 -1
- package/src/project-language.ts +7 -7
- package/src/proposal-model.ts +1 -1
- package/src/rename.ts +3 -3
- package/src/rendered-docs.ts +2 -2
- package/src/shortcut-keys.ts +1 -1
- package/src/signature.ts +3 -3
- package/src/snippet-field-transforms.ts +2 -2
- package/src/snippet-insert.ts +3 -3
- package/src/snippet-session.ts +7 -7
- package/src/snippet-transform-queue.ts +1 -1
- package/src/surround.ts +1 -1
- package/src/symbol-picker-model.ts +1 -1
- package/src/symbol-picker.ts +3 -3
- package/src/templates.ts +1 -1
- package/src/use-problem-counts.ts +1 -1
- package/src/workspace-edit.ts +1 -1
package/dist/EditorView.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createHolder } from './holder.js';
|
|
3
|
-
import { useLayoutEffect, useMemo, useRef, useSyncExternalStore } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
2
|
import { DEFAULT_SMART_KEYS, DEFAULT_TODO_WORDS } from '@adecore/editor';
|
|
3
|
+
import { useOverlayScrollbars } from '@adecore/ui';
|
|
4
|
+
import { useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { EditorLanguage } from './editor-language.js';
|
|
7
|
+
import { createHolder } from './holder.js';
|
|
7
8
|
import { LanguagePopups } from "./LanguagePopups.js";
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
10
|
const DEFAULT_INDENTATION = {
|
|
@@ -78,7 +79,7 @@ function applyChangedOptions(editor, before, after) {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
export function EditorView(t0) {
|
|
81
|
-
const $ = _c(
|
|
82
|
+
const $ = _c(39);
|
|
82
83
|
const {
|
|
83
84
|
engine,
|
|
84
85
|
options,
|
|
@@ -126,9 +127,20 @@ export function EditorView(t0) {
|
|
|
126
127
|
}
|
|
127
128
|
const holder = t2;
|
|
128
129
|
const language = useSyncExternalStore(holder.subscribe, holder.get, holder.get);
|
|
130
|
+
const [scroller, setScroller] = useState(null);
|
|
129
131
|
let t3;
|
|
130
|
-
if ($[6]
|
|
131
|
-
t3 =
|
|
132
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
+
t3 = {
|
|
134
|
+
axis: "both"
|
|
135
|
+
};
|
|
136
|
+
$[6] = t3;
|
|
137
|
+
} else {
|
|
138
|
+
t3 = $[6];
|
|
139
|
+
}
|
|
140
|
+
const scrollbars = useOverlayScrollbars(scroller, t3);
|
|
141
|
+
let t4;
|
|
142
|
+
if ($[7] !== languageOptions || $[8] !== onMount || $[9] !== options || $[10] !== timers) {
|
|
143
|
+
t4 = () => {
|
|
132
144
|
latest.current = {
|
|
133
145
|
options,
|
|
134
146
|
timers,
|
|
@@ -136,19 +148,19 @@ export function EditorView(t0) {
|
|
|
136
148
|
onMount
|
|
137
149
|
};
|
|
138
150
|
};
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
151
|
+
$[7] = languageOptions;
|
|
152
|
+
$[8] = onMount;
|
|
153
|
+
$[9] = options;
|
|
154
|
+
$[10] = timers;
|
|
155
|
+
$[11] = t4;
|
|
144
156
|
} else {
|
|
145
|
-
|
|
157
|
+
t4 = $[11];
|
|
146
158
|
}
|
|
147
|
-
useLayoutEffect(
|
|
148
|
-
let t4;
|
|
159
|
+
useLayoutEffect(t4);
|
|
149
160
|
let t5;
|
|
150
|
-
|
|
151
|
-
|
|
161
|
+
let t6;
|
|
162
|
+
if ($[12] !== engine || $[13] !== languageId || $[14] !== project || $[15] !== uri) {
|
|
163
|
+
t5 = () => {
|
|
152
164
|
const host = element.current;
|
|
153
165
|
if (host === null) {
|
|
154
166
|
return;
|
|
@@ -163,32 +175,34 @@ export function EditorView(t0) {
|
|
|
163
175
|
});
|
|
164
176
|
mounted.current = editor;
|
|
165
177
|
applied.current = inputs.options;
|
|
178
|
+
setScroller(host.querySelector(".se-viewport"));
|
|
166
179
|
const attached = project === undefined || uri === undefined || languageId === undefined ? null : new EditorLanguage(project, editor, uri, languageId, inputs.timers, inputs.languageOptions);
|
|
167
180
|
holder.set(attached);
|
|
168
181
|
const stop = inputs.onMount?.(editor, attached);
|
|
169
182
|
return () => {
|
|
170
183
|
mounted.current = null;
|
|
184
|
+
setScroller(null);
|
|
171
185
|
holder.set(null);
|
|
172
186
|
stop?.();
|
|
173
187
|
attached?.dispose();
|
|
174
188
|
editor.dispose();
|
|
175
189
|
};
|
|
176
190
|
};
|
|
177
|
-
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[15] = t4;
|
|
191
|
+
t6 = [engine, project, uri, languageId, holder];
|
|
192
|
+
$[12] = engine;
|
|
193
|
+
$[13] = languageId;
|
|
194
|
+
$[14] = project;
|
|
195
|
+
$[15] = uri;
|
|
183
196
|
$[16] = t5;
|
|
197
|
+
$[17] = t6;
|
|
184
198
|
} else {
|
|
185
|
-
t4 = $[15];
|
|
186
199
|
t5 = $[16];
|
|
200
|
+
t6 = $[17];
|
|
187
201
|
}
|
|
188
|
-
useLayoutEffect(
|
|
189
|
-
let
|
|
190
|
-
if ($[
|
|
191
|
-
|
|
202
|
+
useLayoutEffect(t5, t6);
|
|
203
|
+
let t7;
|
|
204
|
+
if ($[18] !== options) {
|
|
205
|
+
t7 = () => {
|
|
192
206
|
const editor_0 = mounted.current;
|
|
193
207
|
if (editor_0 === null || applied.current === options) {
|
|
194
208
|
return;
|
|
@@ -196,29 +210,29 @@ export function EditorView(t0) {
|
|
|
196
210
|
applyChangedOptions(editor_0, applied.current, options);
|
|
197
211
|
applied.current = options;
|
|
198
212
|
};
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
213
|
+
$[18] = options;
|
|
214
|
+
$[19] = t7;
|
|
201
215
|
} else {
|
|
202
|
-
|
|
216
|
+
t7 = $[19];
|
|
203
217
|
}
|
|
204
|
-
useLayoutEffect(
|
|
205
|
-
let
|
|
206
|
-
if ($[
|
|
207
|
-
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
218
|
+
useLayoutEffect(t7);
|
|
219
|
+
let t8;
|
|
220
|
+
if ($[20] !== options.messages) {
|
|
221
|
+
t8 = options.messages ?? {};
|
|
222
|
+
$[20] = options.messages;
|
|
223
|
+
$[21] = t8;
|
|
210
224
|
} else {
|
|
211
|
-
|
|
225
|
+
t8 = $[21];
|
|
212
226
|
}
|
|
213
227
|
const {
|
|
214
228
|
fold,
|
|
215
229
|
unfold,
|
|
216
230
|
noMoreOccurrences
|
|
217
|
-
} =
|
|
218
|
-
let
|
|
231
|
+
} = t8;
|
|
232
|
+
let t10;
|
|
219
233
|
let t9;
|
|
220
|
-
if ($[
|
|
221
|
-
|
|
234
|
+
if ($[22] !== fold || $[23] !== noMoreOccurrences || $[24] !== t || $[25] !== unfold) {
|
|
235
|
+
t9 = () => {
|
|
222
236
|
words.current = t;
|
|
223
237
|
const localized = foldMessages(t);
|
|
224
238
|
mounted.current?.setMessages({
|
|
@@ -229,69 +243,71 @@ export function EditorView(t0) {
|
|
|
229
243
|
})
|
|
230
244
|
});
|
|
231
245
|
};
|
|
232
|
-
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
246
|
+
t10 = [t, fold, unfold, noMoreOccurrences];
|
|
247
|
+
$[22] = fold;
|
|
248
|
+
$[23] = noMoreOccurrences;
|
|
249
|
+
$[24] = t;
|
|
250
|
+
$[25] = unfold;
|
|
251
|
+
$[26] = t10;
|
|
252
|
+
$[27] = t9;
|
|
239
253
|
} else {
|
|
240
|
-
|
|
241
|
-
t9 = $[
|
|
254
|
+
t10 = $[26];
|
|
255
|
+
t9 = $[27];
|
|
242
256
|
}
|
|
243
|
-
useLayoutEffect(
|
|
244
|
-
let
|
|
245
|
-
if ($[
|
|
246
|
-
|
|
257
|
+
useLayoutEffect(t9, t10);
|
|
258
|
+
let t11;
|
|
259
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
260
|
+
t11 = {
|
|
247
261
|
position: "relative",
|
|
248
262
|
minHeight: 0
|
|
249
263
|
};
|
|
250
|
-
$[
|
|
264
|
+
$[28] = t11;
|
|
251
265
|
} else {
|
|
252
|
-
|
|
266
|
+
t11 = $[28];
|
|
253
267
|
}
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
268
|
+
let t12;
|
|
269
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
270
|
+
t12 = /*#__PURE__*/_jsx("div", {
|
|
257
271
|
ref: element,
|
|
258
272
|
style: {
|
|
259
273
|
position: "absolute",
|
|
260
|
-
inset: 0
|
|
274
|
+
inset: 0,
|
|
275
|
+
isolation: "isolate"
|
|
261
276
|
}
|
|
262
277
|
});
|
|
263
|
-
$[
|
|
278
|
+
$[29] = t12;
|
|
264
279
|
} else {
|
|
265
|
-
|
|
280
|
+
t12 = $[29];
|
|
266
281
|
}
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
282
|
+
let t13;
|
|
283
|
+
if ($[30] !== contextMenuItems || $[31] !== hoverFooter || $[32] !== language) {
|
|
284
|
+
t13 = language !== null && /*#__PURE__*/_jsx(LanguagePopups, {
|
|
270
285
|
language: language,
|
|
271
286
|
contextMenuItems: contextMenuItems,
|
|
272
287
|
hoverFooter: hoverFooter
|
|
273
288
|
});
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
289
|
+
$[30] = contextMenuItems;
|
|
290
|
+
$[31] = hoverFooter;
|
|
291
|
+
$[32] = language;
|
|
292
|
+
$[33] = t13;
|
|
278
293
|
} else {
|
|
279
|
-
|
|
294
|
+
t13 = $[33];
|
|
280
295
|
}
|
|
281
|
-
let
|
|
282
|
-
if ($[
|
|
283
|
-
|
|
296
|
+
let t14;
|
|
297
|
+
if ($[34] !== className || $[35] !== ref || $[36] !== scrollbars || $[37] !== t13) {
|
|
298
|
+
t14 = /*#__PURE__*/_jsxs("div", {
|
|
284
299
|
className: className,
|
|
285
300
|
ref: ref,
|
|
286
|
-
style:
|
|
287
|
-
children: [
|
|
301
|
+
style: t11,
|
|
302
|
+
children: [t12, scrollbars, t13]
|
|
288
303
|
});
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
304
|
+
$[34] = className;
|
|
305
|
+
$[35] = ref;
|
|
306
|
+
$[36] = scrollbars;
|
|
307
|
+
$[37] = t13;
|
|
308
|
+
$[38] = t14;
|
|
293
309
|
} else {
|
|
294
|
-
|
|
310
|
+
t14 = $[38];
|
|
295
311
|
}
|
|
296
|
-
return
|
|
312
|
+
return t14;
|
|
297
313
|
}
|
package/dist/FindReplace.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { MAX_REPLACEMENT_PAGE, MAX_REPLACEMENT_CHARACTERS } from '@adecore/editor';
|
|
4
3
|
import { Button } from '@adecore/ui';
|
|
5
4
|
import { formatNumber } from '@adecore/ui/format';
|
|
6
|
-
import {
|
|
5
|
+
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { compileFind, EMPTY_FIND_QUERY } from './find-query.js';
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
export function FindReplace(t0) {
|
package/dist/HoverCard.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { type Location } from '@adecore/lsp';
|
|
3
1
|
import type { EditorPosition } from '@adecore/editor';
|
|
4
|
-
import type
|
|
2
|
+
import { type Location } from '@adecore/lsp';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
5
4
|
import { type Problem } from './diagnostics-model.ts';
|
|
5
|
+
import type { EditorLanguage } from './editor-language.ts';
|
|
6
6
|
import type { HoverInfo } from './popups.ts';
|
|
7
7
|
export declare function DefinitionPlace({ definition, uri, folder }: {
|
|
8
8
|
definition: Location;
|
package/dist/HoverCard.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { CircleX, Info, TriangleAlert } from 'lucide-react';
|
|
4
2
|
import { fileUriToPath } from '@adecore/lsp';
|
|
5
3
|
import { Button, Icon, Tooltip } from '@adecore/ui';
|
|
6
4
|
import { formatNumber } from '@adecore/ui/format';
|
|
7
|
-
import {
|
|
5
|
+
import { CircleX, Info, TriangleAlert } from 'lucide-react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
8
7
|
import { codeLabelOf, severityOf } from './diagnostics-model.js';
|
|
9
8
|
import { SymbolSections } from "./HoverSections.js";
|
|
9
|
+
import { basenameOf } from './paths.js';
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
const SEVERITY_ICONS = {
|
|
12
12
|
error: CircleX,
|
package/dist/HoverSections.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
2
|
import { Tooltip } from '@adecore/ui';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
4
|
import { BaselineStatus } from "./BaselineStatus.js";
|
|
5
5
|
import { hoverSectionsOf, markdownParts } from './hover-content.js';
|
|
6
6
|
import { Markdown } from "./Markdown.js";
|
package/dist/LanguagePopups.js
CHANGED
|
@@ -10,8 +10,8 @@ import { PeekPanel } from "./PeekPanel.js";
|
|
|
10
10
|
import { PickPopup } from "./PickPopup.js";
|
|
11
11
|
import { RenameCard } from "./RenameCard.js";
|
|
12
12
|
import { RenderedDocs } from "./RenderedDocs.js";
|
|
13
|
-
import { SymbolPicker } from "./SymbolPicker.js";
|
|
14
13
|
import { SignatureCard } from "./SignatureCard.js";
|
|
14
|
+
import { SymbolPicker } from "./SymbolPicker.js";
|
|
15
15
|
import { WrapCard } from "./WrapCard.js";
|
|
16
16
|
/*
|
|
17
17
|
* Every card a language feature opens over the editor. Each feature keeps its own state and these
|
package/dist/Markdown.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ScrollArea } from '@adecore/ui';
|
|
2
3
|
import ReactMarkdown from 'react-markdown';
|
|
3
|
-
import remarkGfm from 'remark-gfm';
|
|
4
4
|
import remarkBreaks from 'remark-breaks';
|
|
5
|
+
import remarkGfm from 'remark-gfm';
|
|
6
|
+
/* A code block wider than its card scrolls on its own. */
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
const CODE_BLOCKS = {
|
|
9
|
+
pre: ({
|
|
10
|
+
children
|
|
11
|
+
}) => /*#__PURE__*/_jsx(ScrollArea, {
|
|
12
|
+
axis: "both",
|
|
13
|
+
render: /*#__PURE__*/_jsx("pre", {}),
|
|
14
|
+
children: children
|
|
15
|
+
})
|
|
16
|
+
};
|
|
5
17
|
/* An image becomes its alt text, so a comment cannot make the editor fetch a page of its choosing. */
|
|
6
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
7
18
|
const WITHOUT_IMAGES = {
|
|
19
|
+
...CODE_BLOCKS,
|
|
8
20
|
img: ({
|
|
9
21
|
alt
|
|
10
22
|
}) => /*#__PURE__*/_jsx(_Fragment, {
|
|
@@ -25,7 +37,7 @@ export function Markdown(t0) {
|
|
|
25
37
|
} else {
|
|
26
38
|
t2 = $[0];
|
|
27
39
|
}
|
|
28
|
-
const t3 = images ?
|
|
40
|
+
const t3 = images ? CODE_BLOCKS : WITHOUT_IMAGES;
|
|
29
41
|
let t4;
|
|
30
42
|
if ($[1] !== t3 || $[2] !== text) {
|
|
31
43
|
t4 = /*#__PURE__*/_jsx("div", {
|