@marimo-team/islands 0.23.10-dev24 → 0.23.10-dev25
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/{any-language-editor-QDDrgvfh.js → any-language-editor-DNmoSiWL.js} +18 -18
- package/dist/{chat-ui-BrKSZ7Yu.js → chat-ui-D6oraHT2.js} +11 -11
- package/dist/{code-visibility-CVmFerQM.js → code-visibility-CXkMXcdB.js} +5 -5
- package/dist/dist-7QfXoMdB.js +5 -0
- package/dist/{dist-DgnE8F-r.js → dist-A2846XWO.js} +1 -1
- package/dist/dist-BEXXyZig.js +5 -0
- package/dist/{dist-B3pZ0Ab6.js → dist-BR_gyG9L.js} +3 -3
- package/dist/{dist-CcXxepx6.js → dist-BSAt6RhH.js} +27 -27
- package/dist/{dist-Bde4a2kU.js → dist-BY018Paw.js} +8 -8
- package/dist/dist-BYj57OV4.js +5 -0
- package/dist/{dist-CUCNs1ja.js → dist-BaoDKvdy.js} +2 -2
- package/dist/{dist-Cy1WxgBD.js → dist-Bf7SHuNp.js} +5 -5
- package/dist/{dist-Bz_sYWbr.js → dist-Bk75fBZA.js} +2 -2
- package/dist/dist-BlSvQzNr.js +5 -0
- package/dist/{dist-C5VC_yzu.js → dist-BzEzfugY.js} +1 -1
- package/dist/dist-CCBlxAgS.js +8 -0
- package/dist/dist-CIDTVIUf.js +5 -0
- package/dist/{dist-CLUtPrdy.js → dist-CIYBwstr.js} +1 -1
- package/dist/{dist-BotSqB48.js → dist-C_Y3oV3C.js} +12 -12
- package/dist/{dist-BTfv03uy.js → dist-CcWX6tmx.js} +2 -2
- package/dist/{dist-BhM8gdSO.js → dist-CoXAujgg.js} +4 -4
- package/dist/{dist-4j4c7bjm.js → dist-CpxNdDkw.js} +3 -3
- package/dist/dist-CqQyhAM8.js +8 -0
- package/dist/dist-CwRu2Xzh.js +5 -0
- package/dist/{dist-BcuoonNH.js → dist-CxJDU6Bh.js} +9 -9
- package/dist/{dist-DxvORzUR.js → dist-D-W5ny5a.js} +8 -8
- package/dist/dist-D8CDTVgf.js +6 -0
- package/dist/dist-D8DNB0nO.js +8 -0
- package/dist/dist-DL6N_q-A.js +5 -0
- package/dist/{dist-BbbIBDiQ.js → dist-DMjWuVs8.js} +1 -1
- package/dist/dist-DOFbNV_b.js +8 -0
- package/dist/dist-DPrYzMY0.js +6 -0
- package/dist/{dist-h2c8sZvT.js → dist-DZORgqKY.js} +1 -1
- package/dist/{dist-B3P2fFpz.js → dist-DZo4nSS0.js} +14 -14
- package/dist/{dist-D4CewLk6.js → dist-Dax--nl9.js} +1 -1
- package/dist/{dist-DRfcqpxJ.js → dist-DgGbNavJ.js} +2 -2
- package/dist/{dist-fQ0ViXGs.js → dist-Dv_Y15yk.js} +107 -107
- package/dist/{dist-Bfwsv11D.js → dist-DyyjKEYf.js} +2 -2
- package/dist/{dist-p2qyWijU.js → dist-GZXUmt0b.js} +2 -2
- package/dist/{dist-CLJWPTX2.js → dist-LTU8Hdvn.js} +3 -3
- package/dist/{dist-DqAWR3CS.js → dist-M9Vag9Y0.js} +20 -20
- package/dist/{dist-DNdhYsgW.js → dist-U4F-tbMs.js} +79 -62
- package/dist/{dist-RqXTaiir.js → dist-abid3KgM.js} +11 -11
- package/dist/dist-cdmMjgsn.js +5 -0
- package/dist/dist-hT4QzYX-.js +1247 -0
- package/dist/{dist-luvabDEB.js → dist-t9Kf7xqC.js} +2 -2
- package/dist/esm-BaH2eg5-.js +1171 -0
- package/dist/{esm-Duie8iU-.js → esm-ga2Bf3O2.js} +43 -43
- package/dist/{extends-C3j0Pbh9.js → extends-D_hDsj6R.js} +1 -1
- package/dist/{html-to-image-D5fIgQg_.js → html-to-image-UEH5lFDZ.js} +2162 -2139
- package/dist/main.js +24 -24
- package/dist/{process-output-B59yoBQx.js → process-output-CyMLTogj.js} +1 -1
- package/dist/{reveal-component-bghJ00sb.js → reveal-component-dIolR_34.js} +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/editor/documentation.css +19 -0
- package/src/core/codemirror/language/languages/python.ts +2 -0
- package/src/core/codemirror/lsp/__tests__/markdown-renderer.test.ts +41 -0
- package/src/core/codemirror/lsp/markdown-renderer.ts +59 -0
- package/dist/dist-0Fif7jnk.js +0 -5
- package/dist/dist-B5h_9sHB.js +0 -6
- package/dist/dist-B9M6R5ye.js +0 -5
- package/dist/dist-BCt3tnck.js +0 -8
- package/dist/dist-BUIJwMwn.js +0 -8
- package/dist/dist-BpquMd3k.js +0 -5
- package/dist/dist-BzJsqYfz.js +0 -5
- package/dist/dist-CA5ELXAf.js +0 -6
- package/dist/dist-CLBRs6Uv.js +0 -5
- package/dist/dist-CStVCMbq.js +0 -5
- package/dist/dist-CZRIEY3Y.js +0 -8
- package/dist/dist-CuUHbFD0.js +0 -5
- package/dist/dist-DV7Iabxb.js +0 -8
- package/dist/dist-DhHh0jLg.js +0 -1247
- package/dist/dist-DuEeHMvL.js +0 -5
- package/dist/esm-DzhtSSSq.js +0 -1171
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as tags, O as indentNodeProp, S as foldInside, V as styleTags, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
2
|
var spec_Keyword = {
|
|
3
3
|
__proto__: null,
|
|
4
4
|
anyref: 34,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./dist-U4F-tbMs.js";
|
|
2
|
+
import "./dist-BSAt6RhH.js";
|
|
3
|
+
import "./dist-D-W5ny5a.js";
|
|
4
|
+
import "./dist-M9Vag9Y0.js";
|
|
5
|
+
import { i as jinjaLanguage, n as jinja, r as jinjaCompletionSource, t as closePercentBrace } from "./dist-BR_gyG9L.js";
|
|
6
|
+
export {
|
|
7
|
+
jinja
|
|
8
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as tags, O as indentNodeProp, S as foldInside, V as styleTags, h as continuedIndent, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
2
|
var jsonHighlighting = styleTags({
|
|
3
3
|
String: tags.string,
|
|
4
4
|
Number: tags.number,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as EditorView, H as tags, I as syntaxTree, O as indentNodeProp, Ot as EditorSelection, V as styleTags, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
2
|
var StartTag = 1, StartCloseTag = 2, MissingCloseTag = 3, mismatchedStartCloseTag = 4, incompleteStartCloseTag = 5, commentContent$1 = 36, piContent$1 = 37, cdataContent$1 = 38, Element$1 = 11, OpenTag = 13;
|
|
3
3
|
function nameChar(m) {
|
|
4
4
|
return m == 45 || m == 46 || m == 58 || m >= 65 && m <= 90 || m == 95 || m >= 97 && m <= 122 || m >= 161;
|
|
@@ -334,29 +334,29 @@ function elementName(m, V, H = m.length) {
|
|
|
334
334
|
let U = V.firstChild, W = U && U.getChild("TagName");
|
|
335
335
|
return W ? m.sliceString(W.from, Math.min(W.to, H)) : "";
|
|
336
336
|
}
|
|
337
|
-
var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m,
|
|
338
|
-
if (m.composing || m.state.readOnly ||
|
|
337
|
+
var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m, V, U, G, K) => {
|
|
338
|
+
if (m.composing || m.state.readOnly || V != U || G != ">" && G != "/" || !xmlLanguage.isActiveAt(m.state, V, -1)) return false;
|
|
339
339
|
let q = K(), { state: J } = q, Y = J.changeByRange((m2) => {
|
|
340
340
|
var _a, _b, _c;
|
|
341
|
-
let { head:
|
|
342
|
-
if (
|
|
343
|
-
let
|
|
344
|
-
if (((_b = (_a =
|
|
341
|
+
let { head: V2 } = m2, U2 = J.doc.sliceString(V2 - 1, V2) == G, K2 = syntaxTree(J).resolveInner(V2, -1), q2;
|
|
342
|
+
if (U2 && G == ">" && K2.name == "EndTag") {
|
|
343
|
+
let H = K2.parent;
|
|
344
|
+
if (((_b = (_a = H.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (q2 = elementName(J.doc, H.parent, V2))) return {
|
|
345
345
|
range: m2,
|
|
346
346
|
changes: {
|
|
347
|
-
from:
|
|
348
|
-
to:
|
|
347
|
+
from: V2,
|
|
348
|
+
to: V2 + (J.doc.sliceString(V2, V2 + 1) === ">" ? 1 : 0),
|
|
349
349
|
insert: `</${q2}>`
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
|
-
} else if (
|
|
352
|
+
} else if (U2 && G == "/" && K2.name == "StartCloseTag") {
|
|
353
353
|
let m3 = K2.parent;
|
|
354
|
-
if (K2.from ==
|
|
355
|
-
let m4 =
|
|
354
|
+
if (K2.from == V2 - 2 && ((_c = m3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (q2 = elementName(J.doc, m3, V2))) {
|
|
355
|
+
let m4 = V2 + (J.doc.sliceString(V2, V2 + 1) === ">" ? 1 : 0), H = `${q2}>`;
|
|
356
356
|
return {
|
|
357
|
-
range: EditorSelection.cursor(
|
|
357
|
+
range: EditorSelection.cursor(V2 + H.length, -1),
|
|
358
358
|
changes: {
|
|
359
|
-
from:
|
|
359
|
+
from: V2,
|
|
360
360
|
to: m4,
|
|
361
361
|
insert: H
|
|
362
362
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as tags, O as indentNodeProp, S as foldInside, V as styleTags, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
2
|
var closureParamDelim = 1, tpOpen = 2, tpClose = 3, RawString = 4, Float = 5, _b = 98, _e = 101, _f = 102, _r = 114, _E = 69, Zero = 48, Dot = 46, Plus = 43, Minus = 45, Hash = 35, Quote = 34, Pipe = 124, LessThan = 60, GreaterThan = 62;
|
|
3
3
|
function isNum(h) {
|
|
4
4
|
return h >= 48 && h <= 57;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import { i as xmlLanguage, n as completeFromSchema, r as xml, t as autoCloseTags } from "./dist-
|
|
1
|
+
import "./dist-U4F-tbMs.js";
|
|
2
|
+
import { i as xmlLanguage, n as completeFromSchema, r as xml, t as autoCloseTags } from "./dist-DZo4nSS0.js";
|
|
3
3
|
export {
|
|
4
4
|
xml
|
|
5
5
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as CompletionContext } from "./dist-
|
|
3
|
-
import { n as html, r as htmlCompletionSource } from "./dist-
|
|
1
|
+
import { $ as EditorView, G as NodeSet, H as tags, I as syntaxTree, J as Parser, K as NodeType, M as languageDataProp, Mt as Prec, O as indentNodeProp, Ot as EditorSelection, R as Tag, T as foldService, Ut as countColumn, V as styleTags, W as NodeProp, X as parseMixed, Y as Tree, _ as defineLanguageFacet, c as Language, d as ParseContext, j as indentUnit, kt as EditorState, l as LanguageDescription, pt as keymap, u as LanguageSupport, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
|
+
import { t as CompletionContext } from "./dist-hT4QzYX-.js";
|
|
3
|
+
import { n as html, r as htmlCompletionSource } from "./dist-BSAt6RhH.js";
|
|
4
4
|
var CompositeBlock = class l {
|
|
5
5
|
static create(R, z, B, V, H) {
|
|
6
6
|
return new l(R, z, B, V + (V << 8) + R + (z << 4) | 0, H, [], []);
|
|
7
7
|
}
|
|
8
|
-
constructor(l3, R, z, B, H, U
|
|
9
|
-
this.type = l3, this.value = R, this.from = z, this.hash = B, this.end =
|
|
8
|
+
constructor(l3, R, z, B, V, H, U) {
|
|
9
|
+
this.type = l3, this.value = R, this.from = z, this.hash = B, this.end = V, this.children = H, this.positions = U, this.hashProp = [[NodeProp.contextHash, B]];
|
|
10
10
|
}
|
|
11
11
|
addChild(l3, R) {
|
|
12
12
|
l3.prop(NodeProp.contextHash) != this.hash && (l3 = new Tree(l3.type, l3.children, l3.positions, l3.length, this.hashProp)), this.children.push(l3), this.positions.push(R);
|
|
@@ -516,52 +516,52 @@ var MarkdownParser = class l2 extends Parser {
|
|
|
516
516
|
for (let V of this.wrappers) B = V(B, l3, R, z);
|
|
517
517
|
return B;
|
|
518
518
|
}
|
|
519
|
-
configure(
|
|
520
|
-
let
|
|
521
|
-
if (!
|
|
522
|
-
let { nodeSet:
|
|
523
|
-
if (nonEmpty(
|
|
524
|
-
|
|
525
|
-
let l3 =
|
|
526
|
-
for (let
|
|
527
|
-
let { name:
|
|
528
|
-
if (l3.some((l4) => l4.name ==
|
|
529
|
-
W2 && (
|
|
530
|
-
let K2 = l3.length, J2 = W2 ? ["Block", "BlockContext"] :
|
|
519
|
+
configure(z) {
|
|
520
|
+
let B = resolveConfig(z);
|
|
521
|
+
if (!B) return this;
|
|
522
|
+
let { nodeSet: V, skipContextMarkup: U } = this, W = this.blockParsers.slice(), G = this.leafBlockParsers.slice(), K = this.blockNames.slice(), J = this.inlineParsers.slice(), Y = this.inlineNames.slice(), Q = this.endLeafBlock.slice(), $ = this.wrappers;
|
|
523
|
+
if (nonEmpty(B.defineNodes)) {
|
|
524
|
+
U = Object.assign({}, U);
|
|
525
|
+
let l3 = V.types.slice(), z2;
|
|
526
|
+
for (let R of B.defineNodes) {
|
|
527
|
+
let { name: B2, block: V2, composite: W2, style: G2 } = typeof R == "string" ? { name: R } : R;
|
|
528
|
+
if (l3.some((l4) => l4.name == B2)) continue;
|
|
529
|
+
W2 && (U[l3.length] = (l4, R2, z3) => W2(R2, z3, l4.value));
|
|
530
|
+
let K2 = l3.length, J2 = W2 ? ["Block", "BlockContext"] : V2 ? K2 >= Type.ATXHeading1 && K2 <= Type.SetextHeading2 ? [
|
|
531
531
|
"Block",
|
|
532
532
|
"LeafBlock",
|
|
533
533
|
"Heading"
|
|
534
534
|
] : ["Block", "LeafBlock"] : void 0;
|
|
535
535
|
l3.push(NodeType.define({
|
|
536
536
|
id: K2,
|
|
537
|
-
name:
|
|
537
|
+
name: B2,
|
|
538
538
|
props: J2 && [[NodeProp.group, J2]]
|
|
539
|
-
})), G2 && (
|
|
539
|
+
})), G2 && (z2 || (z2 = {}), Array.isArray(G2) || G2 instanceof Tag ? z2[B2] = G2 : Object.assign(z2, G2));
|
|
540
540
|
}
|
|
541
|
-
|
|
541
|
+
V = new NodeSet(l3), z2 && (V = V.extend(styleTags(z2)));
|
|
542
542
|
}
|
|
543
|
-
if (nonEmpty(
|
|
544
|
-
let
|
|
545
|
-
|
|
543
|
+
if (nonEmpty(B.props) && (V = V.extend(...B.props)), nonEmpty(B.remove)) for (let l3 of B.remove) {
|
|
544
|
+
let R = this.blockNames.indexOf(l3), z2 = this.inlineNames.indexOf(l3);
|
|
545
|
+
R > -1 && (W[R] = G[R] = void 0), z2 > -1 && (J[z2] = void 0);
|
|
546
546
|
}
|
|
547
|
-
if (nonEmpty(
|
|
548
|
-
let
|
|
549
|
-
if (
|
|
547
|
+
if (nonEmpty(B.parseBlock)) for (let l3 of B.parseBlock) {
|
|
548
|
+
let R = K.indexOf(l3.name);
|
|
549
|
+
if (R > -1) W[R] = l3.parse, G[R] = l3.leaf;
|
|
550
550
|
else {
|
|
551
|
-
let
|
|
552
|
-
|
|
551
|
+
let R2 = l3.before ? findName(K, l3.before) : l3.after ? findName(K, l3.after) + 1 : K.length - 1;
|
|
552
|
+
W.splice(R2, 0, l3.parse), G.splice(R2, 0, l3.leaf), K.splice(R2, 0, l3.name);
|
|
553
553
|
}
|
|
554
|
-
l3.endLeaf &&
|
|
554
|
+
l3.endLeaf && Q.push(l3.endLeaf);
|
|
555
555
|
}
|
|
556
|
-
if (nonEmpty(
|
|
557
|
-
let
|
|
558
|
-
if (
|
|
556
|
+
if (nonEmpty(B.parseInline)) for (let l3 of B.parseInline) {
|
|
557
|
+
let R = Y.indexOf(l3.name);
|
|
558
|
+
if (R > -1) J[R] = l3.parse;
|
|
559
559
|
else {
|
|
560
|
-
let
|
|
561
|
-
|
|
560
|
+
let R2 = l3.before ? findName(Y, l3.before) : l3.after ? findName(Y, l3.after) + 1 : Y.length - 1;
|
|
561
|
+
J.splice(R2, 0, l3.parse), Y.splice(R2, 0, l3.name);
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
|
-
return
|
|
564
|
+
return B.wrap && ($ = $.concat(B.wrap)), new l2(V, W, G, K, Q, U, J, Y, $);
|
|
565
565
|
}
|
|
566
566
|
getNodeType(l3) {
|
|
567
567
|
let R = this.nodeTypes[l3];
|
|
@@ -1267,10 +1267,10 @@ function findSectionEnd(l3, R) {
|
|
|
1267
1267
|
return z.to;
|
|
1268
1268
|
}
|
|
1269
1269
|
var headerIndent = /* @__PURE__ */ foldService.of((l3, R, z) => {
|
|
1270
|
-
for (let
|
|
1271
|
-
let l4 =
|
|
1270
|
+
for (let V = syntaxTree(l3).resolveInner(z, -1); V && !(V.from < R); V = V.parent) {
|
|
1271
|
+
let l4 = V.type.prop(headingProp);
|
|
1272
1272
|
if (l4 == null) continue;
|
|
1273
|
-
let R2 = findSectionEnd(
|
|
1273
|
+
let R2 = findSectionEnd(V, l4);
|
|
1274
1274
|
if (R2 > z) return {
|
|
1275
1275
|
from: z,
|
|
1276
1276
|
to: R2
|
|
@@ -1371,48 +1371,48 @@ function normalizeIndent(l3, R) {
|
|
|
1371
1371
|
return V + l3.slice(z);
|
|
1372
1372
|
}
|
|
1373
1373
|
var insertNewlineContinueMarkupCommand = (l3 = {}) => ({ state: R, dispatch: z }) => {
|
|
1374
|
-
let V = syntaxTree(R), { doc:
|
|
1375
|
-
if (!z2.empty || !markdownLanguage.isActiveAt(R, z2.from, -1) && !markdownLanguage.isActiveAt(R, z2.from, 1)) return
|
|
1376
|
-
let
|
|
1377
|
-
for (;
|
|
1378
|
-
if (!
|
|
1379
|
-
let q =
|
|
1380
|
-
if (q.to - q.spaceAfter.length >
|
|
1381
|
-
let J =
|
|
1374
|
+
let V = syntaxTree(R), { doc: H } = R, U = null, W = R.changeByRange((z2) => {
|
|
1375
|
+
if (!z2.empty || !markdownLanguage.isActiveAt(R, z2.from, -1) && !markdownLanguage.isActiveAt(R, z2.from, 1)) return U = { range: z2 };
|
|
1376
|
+
let B = z2.from, W2 = H.lineAt(B), G = getContext(V.resolveInner(B, -1), H);
|
|
1377
|
+
for (; G.length && G[G.length - 1].from > B - W2.from; ) G.pop();
|
|
1378
|
+
if (!G.length) return U = { range: z2 };
|
|
1379
|
+
let q = G[G.length - 1];
|
|
1380
|
+
if (q.to - q.spaceAfter.length > B - W2.from) return U = { range: z2 };
|
|
1381
|
+
let J = B >= q.to - q.spaceAfter.length && !/\S/.test(W2.text.slice(q.to));
|
|
1382
1382
|
if (q.item && J) {
|
|
1383
1383
|
let z3 = q.node.firstChild, V2 = q.node.getChild("ListItem", "ListItem");
|
|
1384
|
-
if (z3.to >=
|
|
1385
|
-
let l4 =
|
|
1386
|
-
l4 && l4.item ? (R2 =
|
|
1384
|
+
if (z3.to >= B || V2 && V2.to < B || W2.from > 0 && !/[^\s>]/.test(H.lineAt(W2.from - 1).text) || l3.nonTightLists === false) {
|
|
1385
|
+
let l4 = G.length > 1 ? G[G.length - 2] : null, R2, z4 = "";
|
|
1386
|
+
l4 && l4.item ? (R2 = W2.from + l4.from, z4 = l4.marker(H, 1)) : R2 = W2.from + (l4 ? l4.to : 0);
|
|
1387
1387
|
let V3 = [{
|
|
1388
1388
|
from: R2,
|
|
1389
|
-
to:
|
|
1389
|
+
to: B,
|
|
1390
1390
|
insert: z4
|
|
1391
1391
|
}];
|
|
1392
|
-
return q.node.name == "OrderedList" && renumberList(q.item,
|
|
1392
|
+
return q.node.name == "OrderedList" && renumberList(q.item, H, V3, -2), l4 && l4.node.name == "OrderedList" && renumberList(l4.item, H, V3), {
|
|
1393
1393
|
range: EditorSelection.cursor(R2 + z4.length),
|
|
1394
1394
|
changes: V3
|
|
1395
1395
|
};
|
|
1396
1396
|
} else {
|
|
1397
|
-
let l4 = blankLine(
|
|
1397
|
+
let l4 = blankLine(G, R, W2);
|
|
1398
1398
|
return {
|
|
1399
|
-
range: EditorSelection.cursor(
|
|
1399
|
+
range: EditorSelection.cursor(B + l4.length + 1),
|
|
1400
1400
|
changes: {
|
|
1401
|
-
from:
|
|
1401
|
+
from: W2.from,
|
|
1402
1402
|
insert: l4 + R.lineBreak
|
|
1403
1403
|
}
|
|
1404
1404
|
};
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
if (q.node.name == "Blockquote" && J &&
|
|
1408
|
-
let l4 =
|
|
1409
|
-
if (
|
|
1407
|
+
if (q.node.name == "Blockquote" && J && W2.from) {
|
|
1408
|
+
let l4 = H.lineAt(W2.from - 1), B2 = />\s*$/.exec(l4.text);
|
|
1409
|
+
if (B2 && B2.index == q.from) {
|
|
1410
1410
|
let V2 = R.changes([{
|
|
1411
|
-
from: l4.from +
|
|
1411
|
+
from: l4.from + B2.index,
|
|
1412
1412
|
to: l4.to
|
|
1413
1413
|
}, {
|
|
1414
|
-
from:
|
|
1415
|
-
to:
|
|
1414
|
+
from: W2.from + q.from,
|
|
1415
|
+
to: W2.to
|
|
1416
1416
|
}]);
|
|
1417
1417
|
return {
|
|
1418
1418
|
range: z2.map(V2),
|
|
@@ -1420,22 +1420,22 @@ var insertNewlineContinueMarkupCommand = (l3 = {}) => ({ state: R, dispatch: z }
|
|
|
1420
1420
|
};
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
let
|
|
1424
|
-
q.node.name == "OrderedList" && renumberList(q.item,
|
|
1425
|
-
let Z = q.item && q.item.from <
|
|
1426
|
-
if (!Z || /^[\s\d.)\-+*>]*/.exec(
|
|
1427
|
-
let $ =
|
|
1428
|
-
for (; $ >
|
|
1429
|
-
return Q = normalizeIndent(Q, R), nonTightList(q.node, R.doc) && (Q = blankLine(
|
|
1423
|
+
let X = [];
|
|
1424
|
+
q.node.name == "OrderedList" && renumberList(q.item, H, X);
|
|
1425
|
+
let Z = q.item && q.item.from < W2.from, Q = "";
|
|
1426
|
+
if (!Z || /^[\s\d.)\-+*>]*/.exec(W2.text)[0].length >= q.to) for (let l4 = 0, R2 = G.length - 1; l4 <= R2; l4++) Q += l4 == R2 && !Z ? G[l4].marker(H, 1) : G[l4].blank(l4 < R2 ? countColumn(W2.text, 4, G[l4 + 1].from) - Q.length : null);
|
|
1427
|
+
let $ = B;
|
|
1428
|
+
for (; $ > W2.from && /\s/.test(W2.text.charAt($ - W2.from - 1)); ) $--;
|
|
1429
|
+
return Q = normalizeIndent(Q, R), nonTightList(q.node, R.doc) && (Q = blankLine(G, R, W2) + R.lineBreak + Q), X.push({
|
|
1430
1430
|
from: $,
|
|
1431
|
-
to:
|
|
1431
|
+
to: B,
|
|
1432
1432
|
insert: R.lineBreak + Q
|
|
1433
1433
|
}), {
|
|
1434
1434
|
range: EditorSelection.cursor($ + Q.length + 1),
|
|
1435
|
-
changes:
|
|
1435
|
+
changes: X
|
|
1436
1436
|
};
|
|
1437
1437
|
});
|
|
1438
|
-
return
|
|
1438
|
+
return U ? false : (z(R.update(W, {
|
|
1439
1439
|
scrollIntoView: true,
|
|
1440
1440
|
userEvent: "input"
|
|
1441
1441
|
})), true);
|
|
@@ -1464,37 +1464,37 @@ function contextNodeForDelete(l3, R) {
|
|
|
1464
1464
|
return z;
|
|
1465
1465
|
}
|
|
1466
1466
|
var deleteMarkupBackward = ({ state: l3, dispatch: R }) => {
|
|
1467
|
-
let z = syntaxTree(l3), V = null,
|
|
1468
|
-
let
|
|
1467
|
+
let z = syntaxTree(l3), V = null, H = l3.changeByRange((R2) => {
|
|
1468
|
+
let B = R2.from, { doc: H2 } = l3;
|
|
1469
1469
|
if (R2.empty && markdownLanguage.isActiveAt(l3, R2.from)) {
|
|
1470
|
-
let R3 =
|
|
1470
|
+
let R3 = H2.lineAt(B), V2 = getContext(contextNodeForDelete(z, B), H2);
|
|
1471
1471
|
if (V2.length) {
|
|
1472
|
-
let z2 = V2[V2.length - 1],
|
|
1473
|
-
if (
|
|
1474
|
-
range: EditorSelection.cursor(R3.from +
|
|
1472
|
+
let z2 = V2[V2.length - 1], H3 = z2.to - z2.spaceAfter.length + (z2.spaceAfter ? 1 : 0);
|
|
1473
|
+
if (B - R3.from > H3 && !/\S/.test(R3.text.slice(H3, B - R3.from))) return {
|
|
1474
|
+
range: EditorSelection.cursor(R3.from + H3),
|
|
1475
1475
|
changes: {
|
|
1476
|
-
from: R3.from +
|
|
1477
|
-
to:
|
|
1476
|
+
from: R3.from + H3,
|
|
1477
|
+
to: B
|
|
1478
1478
|
}
|
|
1479
1479
|
};
|
|
1480
|
-
if (
|
|
1480
|
+
if (B - R3.from == H3 && (!z2.item || R3.from <= z2.item.from || !/\S/.test(R3.text.slice(0, z2.to)))) {
|
|
1481
1481
|
let V3 = R3.from + z2.from;
|
|
1482
1482
|
if (z2.item && z2.node.from < z2.item.from && /\S/.test(R3.text.slice(z2.from, z2.to))) {
|
|
1483
|
-
let
|
|
1484
|
-
return V3 == R3.from && (
|
|
1485
|
-
range: EditorSelection.cursor(V3 +
|
|
1483
|
+
let B2 = z2.blank(countColumn(R3.text, 4, z2.to) - countColumn(R3.text, 4, z2.from));
|
|
1484
|
+
return V3 == R3.from && (B2 = normalizeIndent(B2, l3)), {
|
|
1485
|
+
range: EditorSelection.cursor(V3 + B2.length),
|
|
1486
1486
|
changes: {
|
|
1487
1487
|
from: V3,
|
|
1488
1488
|
to: R3.from + z2.to,
|
|
1489
|
-
insert:
|
|
1489
|
+
insert: B2
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
|
-
if (V3 <
|
|
1493
|
+
if (V3 < B) return {
|
|
1494
1494
|
range: EditorSelection.cursor(V3),
|
|
1495
1495
|
changes: {
|
|
1496
1496
|
from: V3,
|
|
1497
|
-
to:
|
|
1497
|
+
to: B
|
|
1498
1498
|
}
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
@@ -1502,7 +1502,7 @@ var deleteMarkupBackward = ({ state: l3, dispatch: R }) => {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
return V = { range: R2 };
|
|
1504
1504
|
});
|
|
1505
|
-
return V ? false : (R(l3.update(
|
|
1505
|
+
return V ? false : (R(l3.update(H, {
|
|
1506
1506
|
scrollIntoView: true,
|
|
1507
1507
|
userEvent: "delete"
|
|
1508
1508
|
})), true);
|
|
@@ -1513,29 +1513,29 @@ var deleteMarkupBackward = ({ state: l3, dispatch: R }) => {
|
|
|
1513
1513
|
key: "Backspace",
|
|
1514
1514
|
run: deleteMarkupBackward
|
|
1515
1515
|
}], htmlNoMatch = /* @__PURE__ */ html({ matchClosingTags: false });
|
|
1516
|
-
function markdown(
|
|
1517
|
-
let { codeLanguages:
|
|
1518
|
-
if (!(
|
|
1519
|
-
let K =
|
|
1520
|
-
|
|
1521
|
-
let Y =
|
|
1516
|
+
function markdown(l3 = {}) {
|
|
1517
|
+
let { codeLanguages: R, defaultCodeLanguage: z, addKeymap: B = true, base: { parser: V } = commonmarkLanguage, completeHTMLTags: H = true, pasteURLAsLink: U = true, htmlTagLanguage: G = htmlNoMatch } = l3;
|
|
1518
|
+
if (!(V instanceof MarkdownParser)) throw RangeError("Base parser provided to `markdown` should be a Markdown parser");
|
|
1519
|
+
let K = l3.extensions ? [l3.extensions] : [], q = [G.support, headerIndent], J;
|
|
1520
|
+
U && q.push(pasteURLAsLink), z instanceof LanguageSupport ? (q.push(z.support), J = z.language) : z && (J = z);
|
|
1521
|
+
let Y = R || J ? getCodeParser(R, J) : void 0;
|
|
1522
1522
|
K.push(parseCode({
|
|
1523
1523
|
codeParser: Y,
|
|
1524
1524
|
htmlParser: G.language.parser
|
|
1525
|
-
})),
|
|
1526
|
-
let X = mkLang(
|
|
1527
|
-
return
|
|
1525
|
+
})), B && q.push(Prec.high(keymap.of(markdownKeymap)));
|
|
1526
|
+
let X = mkLang(V.configure(K));
|
|
1527
|
+
return H && q.push(X.data.of({ autocomplete: htmlTagCompletion })), new LanguageSupport(X, q);
|
|
1528
1528
|
}
|
|
1529
1529
|
function htmlTagCompletion(l3) {
|
|
1530
|
-
let { state: R, pos: z } = l3,
|
|
1531
|
-
if (!
|
|
1532
|
-
let
|
|
1533
|
-
for (;
|
|
1534
|
-
if (
|
|
1535
|
-
|
|
1530
|
+
let { state: R, pos: z } = l3, V = /<[:\-\.\w\u00b7-\uffff]*$/.exec(R.sliceDoc(z - 25, z));
|
|
1531
|
+
if (!V) return null;
|
|
1532
|
+
let H = syntaxTree(R).resolveInner(z, -1);
|
|
1533
|
+
for (; H && !H.type.isTop; ) {
|
|
1534
|
+
if (H.name == "CodeBlock" || H.name == "FencedCode" || H.name == "ProcessingInstructionBlock" || H.name == "CommentBlock" || H.name == "Link" || H.name == "Image") return null;
|
|
1535
|
+
H = H.parent;
|
|
1536
1536
|
}
|
|
1537
1537
|
return {
|
|
1538
|
-
from: z -
|
|
1538
|
+
from: z - V[0].length,
|
|
1539
1539
|
to: z,
|
|
1540
1540
|
options: htmlTagCompletions(),
|
|
1541
1541
|
validFor: /^<[:\-\.\w\u00b7-\uffff]*$/
|
|
@@ -1551,10 +1551,10 @@ var nonPlainText = /code|horizontalrule|html|link|comment|processing|escape|enti
|
|
|
1551
1551
|
var _a;
|
|
1552
1552
|
let { main: z } = R.state.selection;
|
|
1553
1553
|
if (z.empty) return false;
|
|
1554
|
-
let
|
|
1555
|
-
if (!
|
|
1556
|
-
let
|
|
1557
|
-
return
|
|
1554
|
+
let V = (_a = l3.clipboardData) == null ? void 0 : _a.getData("text/plain");
|
|
1555
|
+
if (!V || !/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(V) || (/^www\./.test(V) && (V = "https://" + V), !markdownLanguage.isActiveAt(R.state, z.from, 1))) return false;
|
|
1556
|
+
let H = syntaxTree(R.state), U = false;
|
|
1557
|
+
return H.iterate({
|
|
1558
1558
|
from: z.from,
|
|
1559
1559
|
to: z.to,
|
|
1560
1560
|
enter: (l4) => {
|
|
@@ -1569,7 +1569,7 @@ var nonPlainText = /code|horizontalrule|html|link|comment|processing|escape|enti
|
|
|
1569
1569
|
insert: "["
|
|
1570
1570
|
}, {
|
|
1571
1571
|
from: z.to,
|
|
1572
|
-
insert: `](${
|
|
1572
|
+
insert: `](${V})`
|
|
1573
1573
|
}],
|
|
1574
1574
|
userEvent: "input.paste",
|
|
1575
1575
|
scrollIntoView: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as defineCSSCompletionSource } from "./dist-
|
|
1
|
+
import { H as tags, O as indentNodeProp, S as foldInside, V as styleTags, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp } from "./dist-U4F-tbMs.js";
|
|
2
|
+
import { i as defineCSSCompletionSource } from "./dist-D-W5ny5a.js";
|
|
3
3
|
var indent = 168, dedent = 169, descendantOp = 170, InterpolationEnd = 1, InterpolationContinue = 2, Unit = 3, callee = 171, identifier = 172, VariableName = 4, queryIdentifier = 173, InterpolationStart = 5, newline = 174, blankLineStart = 175, eof = 176, whitespace = 177, LineComment = 6, Comment = 7, IndentedMixin = 8, IndentedInclude = 9, Dialect_indented = 0, space = [
|
|
4
4
|
9,
|
|
5
5
|
10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import { a as localCompletionSource, c as typescriptLanguage, i as jsxLanguage, l as typescriptSnippets, n as javascript, o as snippets, r as javascriptLanguage, s as tsxLanguage, t as autoCloseTags } from "./dist-
|
|
1
|
+
import "./dist-U4F-tbMs.js";
|
|
2
|
+
import { a as localCompletionSource, c as typescriptLanguage, i as jsxLanguage, l as typescriptSnippets, n as javascript, o as snippets, r as javascriptLanguage, s as tsxLanguage, t as autoCloseTags } from "./dist-M9Vag9Y0.js";
|
|
3
3
|
export {
|
|
4
4
|
javascript
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as html } from "./dist-
|
|
3
|
-
import { r as javascriptLanguage } from "./dist-
|
|
1
|
+
import { H as tags, V as styleTags, X as parseMixed, i as LocalTokenGroup, r as LRParser, s as LRLanguage, u as LanguageSupport } from "./dist-U4F-tbMs.js";
|
|
2
|
+
import { n as html } from "./dist-BSAt6RhH.js";
|
|
3
|
+
import { r as javascriptLanguage } from "./dist-M9Vag9Y0.js";
|
|
4
4
|
var parser = /* @__PURE__ */ LRParser.deserialize({
|
|
5
5
|
version: 14,
|
|
6
6
|
states: "%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-
|
|
1
|
+
import { $ as EditorView, H as tags, I as syntaxTree, O as indentNodeProp, Ot as EditorSelection, P as sublanguageProp, S as foldInside, U as IterMode, V as styleTags, _ as defineLanguageFacet, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, q as NodeWeakMap, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent } from "./dist-U4F-tbMs.js";
|
|
2
|
+
import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-hT4QzYX-.js";
|
|
3
3
|
var noSemi = 315, noSemiType = 316, incdec = 1, incdecPrefix = 2, questionDot = 3, JSXStartTag = 4, insertSemi = 317, spaces = 319, newline = 320, LineComment = 5, BlockComment = 6, Dialect_jsx = 0, space = [
|
|
4
4
|
9,
|
|
5
5
|
10,
|
|
@@ -576,13 +576,13 @@ var Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, dontComplete = [
|
|
|
576
576
|
function localCompletionSource(g) {
|
|
577
577
|
let G = syntaxTree(g.state).resolveInner(g.pos, -1);
|
|
578
578
|
if (dontComplete.indexOf(G.name) > -1) return null;
|
|
579
|
-
let
|
|
580
|
-
if (!
|
|
579
|
+
let q = G.name == "VariableName" || G.to - G.from < 20 && Identifier.test(g.state.sliceDoc(G.from, G.to));
|
|
580
|
+
if (!q && !g.explicit) return null;
|
|
581
581
|
let J = [];
|
|
582
|
-
for (let
|
|
582
|
+
for (let K = G; K; K = K.parent) ScopeNodes.has(K.name) && (J = J.concat(getScope(g.state.doc, K)));
|
|
583
583
|
return {
|
|
584
584
|
options: J,
|
|
585
|
-
from:
|
|
585
|
+
from: q ? G.from : g.pos,
|
|
586
586
|
validFor: Identifier
|
|
587
587
|
};
|
|
588
588
|
}
|
|
@@ -680,37 +680,37 @@ function elementName(g, G, K = g.length) {
|
|
|
680
680
|
for (let q = G == null ? void 0 : G.firstChild; q; q = q.nextSibling) if (q.name == "JSXIdentifier" || q.name == "JSXBuiltin" || q.name == "JSXNamespacedName" || q.name == "JSXMemberExpression") return g.sliceString(q.from, Math.min(q.to, K));
|
|
681
681
|
return "";
|
|
682
682
|
}
|
|
683
|
-
var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g,
|
|
684
|
-
if ((android ? g.composing : g.compositionStarted) || g.state.readOnly ||
|
|
683
|
+
var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g, G, q, Y, X) => {
|
|
684
|
+
if ((android ? g.composing : g.compositionStarted) || g.state.readOnly || G != q || Y != ">" && Y != "/" || !javascriptLanguage.isActiveAt(g.state, G, -1)) return false;
|
|
685
685
|
let Z = X(), { state: Q } = Z, $ = Q.changeByRange((g2) => {
|
|
686
686
|
var _a;
|
|
687
|
-
let { head:
|
|
688
|
-
if (
|
|
689
|
-
if (Y == ">" &&
|
|
687
|
+
let { head: G2 } = g2, q2 = syntaxTree(Q).resolveInner(G2 - 1, -1), X2;
|
|
688
|
+
if (q2.name == "JSXStartTag" && (q2 = q2.parent), !(Q.doc.sliceString(G2 - 1, G2) != Y || q2.name == "JSXAttributeValue" && q2.to > G2)) {
|
|
689
|
+
if (Y == ">" && q2.name == "JSXFragmentTag") return {
|
|
690
690
|
range: g2,
|
|
691
691
|
changes: {
|
|
692
|
-
from:
|
|
692
|
+
from: G2,
|
|
693
693
|
insert: "</>"
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
|
-
if (Y == "/" &&
|
|
697
|
-
let g3 =
|
|
698
|
-
if (
|
|
696
|
+
if (Y == "/" && q2.name == "JSXStartCloseTag") {
|
|
697
|
+
let g3 = q2.parent, K = g3.parent;
|
|
698
|
+
if (K && g3.from == G2 - 2 && ((X2 = elementName(Q.doc, K.firstChild, G2)) || ((_a = K.firstChild) == null ? void 0 : _a.name) == "JSXFragmentTag")) {
|
|
699
699
|
let g4 = `${X2}>`;
|
|
700
700
|
return {
|
|
701
|
-
range: EditorSelection.cursor(
|
|
701
|
+
range: EditorSelection.cursor(G2 + g4.length, -1),
|
|
702
702
|
changes: {
|
|
703
|
-
from:
|
|
703
|
+
from: G2,
|
|
704
704
|
insert: g4
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
708
|
} else if (Y == ">") {
|
|
709
|
-
let
|
|
710
|
-
if (
|
|
709
|
+
let K = findOpenTag(q2);
|
|
710
|
+
if (K && K.name == "JSXOpenTag" && !/^\/?>|^<\//.test(Q.doc.sliceString(G2, G2 + 2)) && (X2 = elementName(Q.doc, K, G2))) return {
|
|
711
711
|
range: g2,
|
|
712
712
|
changes: {
|
|
713
|
-
from:
|
|
713
|
+
from: G2,
|
|
714
714
|
insert: `</${X2}>`
|
|
715
715
|
}
|
|
716
716
|
};
|