@inkandswitch/patchwork-pkg-base 0.0.123 → 0.0.124
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/module-settings-url +1 -1
- package/package.json +1 -1
- package/packages/codemirror-markdown/dist/{chunk-IJCIGXUN.js → chunk-3U6A6M3C.js} +3 -3
- package/packages/codemirror-markdown/dist/{chunk-IJCIGXUN.js.map → chunk-3U6A6M3C.js.map} +2 -2
- package/packages/codemirror-markdown/dist/{chunk-DQNB5ERJ.js → chunk-AOCXO46Z.js} +4 -4
- package/packages/codemirror-markdown/dist/{chunk-4ZTKTN2T.js → chunk-BK6BYU4X.js} +3 -3
- package/packages/codemirror-markdown/dist/{chunk-4RNBFSBX.js → chunk-JCGWNVO7.js} +2 -2
- package/packages/codemirror-markdown/dist/{chunk-6JHOS434.js → chunk-ZMDZRV6X.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-5FW47RX2.js → dist-3WYN573Y.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-XVLR6T5U.js → dist-4STDX7WZ.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-PAVPWBMY.js → dist-66V2OZNR.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-D27NTZAI.js → dist-7EHN4UZA.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-STDOJSRA.js → dist-D4E7IXYD.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-EG4ZREHT.js → dist-E6QAN4VQ.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-4N6A6FHO.js → dist-E72K6GKZ.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-B5G4LYVR.js → dist-EVYTVY4T.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-6BZJTPMQ.js → dist-ITLHNFUL.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-YSRXNTXV.js → dist-KLLOFSEO.js} +3 -3
- package/packages/codemirror-markdown/dist/{dist-6NY2CMU2.js → dist-LCUXA5AJ.js} +3 -3
- package/packages/codemirror-markdown/dist/{dist-HB4M34TX.js → dist-NFD5VVC6.js} +6 -6
- package/packages/codemirror-markdown/dist/{dist-SFP5SWTJ.js → dist-O6G7IUZY.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-TYTABVEN.js → dist-OU44YTSZ.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-XM4FBMZA.js → dist-RCBHVDL7.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-DX7TJIOI.js → dist-RUK5SWS5.js} +2 -2
- package/packages/codemirror-markdown/dist/{dist-VYHSBFVD.js → dist-TFWDIHAP.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-BYFOH52X.js → dist-VBHD2NRU.js} +3 -3
- package/packages/codemirror-markdown/dist/{dist-TV5CSRQ2.js → dist-XL62MJER.js} +5 -5
- package/packages/codemirror-markdown/dist/{dist-ITGX4OZJ.js → dist-YK6XD4UJ.js} +3 -3
- package/packages/codemirror-markdown/dist/{dist-KBGGPCDW.js → dist-YNO26IAD.js} +2 -2
- package/packages/codemirror-markdown/dist/extensions/links.js +6 -1
- package/packages/codemirror-markdown/dist/extensions/links.js.map +2 -2
- package/packages/codemirror-markdown/dist/extensions/markdown.js +328 -161
- package/packages/codemirror-markdown/dist/extensions/markdown.js.map +4 -4
- package/packages/codemirror-markdown/package.json +1 -1
- package/plugin-registry-url +1 -1
- /package/packages/codemirror-markdown/dist/{chunk-DQNB5ERJ.js.map → chunk-AOCXO46Z.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{chunk-4ZTKTN2T.js.map → chunk-BK6BYU4X.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{chunk-4RNBFSBX.js.map → chunk-JCGWNVO7.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{chunk-6JHOS434.js.map → chunk-ZMDZRV6X.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-5FW47RX2.js.map → dist-3WYN573Y.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-HB4M34TX.js.map → dist-4STDX7WZ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-PAVPWBMY.js.map → dist-66V2OZNR.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-D27NTZAI.js.map → dist-7EHN4UZA.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-STDOJSRA.js.map → dist-D4E7IXYD.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-EG4ZREHT.js.map → dist-E6QAN4VQ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-4N6A6FHO.js.map → dist-E72K6GKZ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-B5G4LYVR.js.map → dist-EVYTVY4T.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-6BZJTPMQ.js.map → dist-ITLHNFUL.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-ITGX4OZJ.js.map → dist-KLLOFSEO.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-6NY2CMU2.js.map → dist-LCUXA5AJ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-XVLR6T5U.js.map → dist-NFD5VVC6.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-SFP5SWTJ.js.map → dist-O6G7IUZY.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-TYTABVEN.js.map → dist-OU44YTSZ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-XM4FBMZA.js.map → dist-RCBHVDL7.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-DX7TJIOI.js.map → dist-RUK5SWS5.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-VYHSBFVD.js.map → dist-TFWDIHAP.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-BYFOH52X.js.map → dist-VBHD2NRU.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-TV5CSRQ2.js.map → dist-XL62MJER.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-YSRXNTXV.js.map → dist-YK6XD4UJ.js.map} +0 -0
- /package/packages/codemirror-markdown/dist/{dist-KBGGPCDW.js.map → dist-YNO26IAD.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
css,
|
|
3
3
|
cssLanguage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JCGWNVO7.js";
|
|
5
5
|
import {
|
|
6
6
|
javascript,
|
|
7
7
|
javascriptLanguage,
|
|
8
8
|
jsxLanguage,
|
|
9
9
|
tsxLanguage,
|
|
10
10
|
typescriptLanguage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZMDZRV6X.js";
|
|
12
12
|
import {
|
|
13
13
|
ContextTracker,
|
|
14
14
|
ExternalTokenizer,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseMixed,
|
|
17
17
|
styleTags,
|
|
18
18
|
tags
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3U6A6M3C.js";
|
|
20
20
|
|
|
21
21
|
// node_modules/.pnpm/@lezer+html@1.3.12/node_modules/@lezer/html/dist/index.js
|
|
22
22
|
var scriptText = 55;
|
|
@@ -1101,4 +1101,4 @@ export {
|
|
|
1101
1101
|
html,
|
|
1102
1102
|
autoCloseTags
|
|
1103
1103
|
};
|
|
1104
|
-
//# sourceMappingURL=chunk-
|
|
1104
|
+
//# sourceMappingURL=chunk-AOCXO46Z.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html,
|
|
3
3
|
htmlCompletionSource
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AOCXO46Z.js";
|
|
5
5
|
import {
|
|
6
6
|
CompletionContext
|
|
7
7
|
} from "./chunk-UQ2NFKSJ.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
parseMixed,
|
|
16
16
|
styleTags,
|
|
17
17
|
tags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3U6A6M3C.js";
|
|
19
19
|
|
|
20
20
|
// node_modules/.pnpm/@codemirror+lang-markdown@6.5.0/node_modules/@codemirror/lang-markdown/dist/index.js
|
|
21
21
|
import { EditorSelection, countColumn, Prec, EditorState } from "@codemirror/state";
|
|
@@ -2512,4 +2512,4 @@ export {
|
|
|
2512
2512
|
markdown,
|
|
2513
2513
|
pasteURLAsLink
|
|
2514
2514
|
};
|
|
2515
|
-
//# sourceMappingURL=chunk-
|
|
2515
|
+
//# sourceMappingURL=chunk-BK6BYU4X.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
NodeWeakMap,
|
|
7
7
|
styleTags,
|
|
8
8
|
tags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3U6A6M3C.js";
|
|
10
10
|
|
|
11
11
|
// node_modules/.pnpm/@lezer+css@1.3.0/node_modules/@lezer/css/dist/index.js
|
|
12
12
|
var descendantOp = 122;
|
|
@@ -1048,4 +1048,4 @@ export {
|
|
|
1048
1048
|
cssLanguage,
|
|
1049
1049
|
css
|
|
1050
1050
|
};
|
|
1051
|
-
//# sourceMappingURL=chunk-
|
|
1051
|
+
//# sourceMappingURL=chunk-JCGWNVO7.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
NodeWeakMap,
|
|
13
13
|
styleTags,
|
|
14
14
|
tags
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3U6A6M3C.js";
|
|
16
16
|
|
|
17
17
|
// node_modules/.pnpm/@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js
|
|
18
18
|
var noSemi = 316;
|
|
@@ -667,4 +667,4 @@ export {
|
|
|
667
667
|
autoCloseTags,
|
|
668
668
|
esLint
|
|
669
669
|
};
|
|
670
|
-
//# sourceMappingURL=chunk-
|
|
670
|
+
//# sourceMappingURL=chunk-ZMDZRV6X.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
LRParser,
|
|
8
8
|
styleTags,
|
|
9
9
|
tags
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3U6A6M3C.js";
|
|
11
11
|
|
|
12
12
|
// node_modules/.pnpm/@codemirror+lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js
|
|
13
13
|
import { syntaxTree, indentNodeProp, continuedIndent, foldNodeProp, LRLanguage, LanguageSupport } from "@codemirror/language";
|
|
@@ -738,4 +738,4 @@ export {
|
|
|
738
738
|
schemaCompletionSource,
|
|
739
739
|
sql
|
|
740
740
|
};
|
|
741
|
-
//# sourceMappingURL=dist-
|
|
741
|
+
//# sourceMappingURL=dist-3WYN573Y.js.map
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
htmlCompletionSource,
|
|
5
5
|
htmlCompletionSourceWith,
|
|
6
6
|
htmlLanguage
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-AOCXO46Z.js";
|
|
8
|
+
import "./chunk-JCGWNVO7.js";
|
|
9
|
+
import "./chunk-ZMDZRV6X.js";
|
|
10
10
|
import "./chunk-UQ2NFKSJ.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-3U6A6M3C.js";
|
|
12
12
|
export {
|
|
13
13
|
autoCloseTags,
|
|
14
14
|
html,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
htmlCompletionSourceWith,
|
|
17
17
|
htmlLanguage
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=dist-
|
|
19
|
+
//# sourceMappingURL=dist-4STDX7WZ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LRParser,
|
|
4
4
|
styleTags,
|
|
5
5
|
tags
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3U6A6M3C.js";
|
|
7
7
|
|
|
8
8
|
// node_modules/.pnpm/@lezer+cpp@1.1.3/node_modules/@lezer/cpp/dist/index.js
|
|
9
9
|
var RawString = 1;
|
|
@@ -180,4 +180,4 @@ export {
|
|
|
180
180
|
cpp,
|
|
181
181
|
cppLanguage
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=dist-
|
|
183
|
+
//# sourceMappingURL=dist-66V2OZNR.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOCXO46Z.js";
|
|
4
|
+
import "./chunk-JCGWNVO7.js";
|
|
5
|
+
import "./chunk-ZMDZRV6X.js";
|
|
6
6
|
import "./chunk-UQ2NFKSJ.js";
|
|
7
7
|
import {
|
|
8
8
|
ExternalTokenizer,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
parseMixed,
|
|
11
11
|
styleTags,
|
|
12
12
|
tags
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3U6A6M3C.js";
|
|
14
14
|
|
|
15
15
|
// node_modules/.pnpm/@codemirror+lang-liquid@6.3.0/node_modules/@codemirror/lang-liquid/dist/index.js
|
|
16
16
|
import { syntaxTree, LRLanguage, indentNodeProp, delimitedIndent, foldNodeProp, LanguageSupport } from "@codemirror/language";
|
|
@@ -323,4 +323,4 @@ export {
|
|
|
323
323
|
liquidCompletionSource,
|
|
324
324
|
liquidLanguage
|
|
325
325
|
};
|
|
326
|
-
//# sourceMappingURL=dist-
|
|
326
|
+
//# sourceMappingURL=dist-7EHN4UZA.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOCXO46Z.js";
|
|
4
|
+
import "./chunk-JCGWNVO7.js";
|
|
5
5
|
import {
|
|
6
6
|
javascriptLanguage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZMDZRV6X.js";
|
|
8
8
|
import "./chunk-UQ2NFKSJ.js";
|
|
9
9
|
import {
|
|
10
10
|
ExternalTokenizer,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseMixed,
|
|
13
13
|
styleTags,
|
|
14
14
|
tags
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3U6A6M3C.js";
|
|
16
16
|
|
|
17
17
|
// node_modules/.pnpm/@codemirror+lang-angular@0.1.4/node_modules/@codemirror/lang-angular/dist/index.js
|
|
18
18
|
import { LRLanguage, LanguageSupport } from "@codemirror/language";
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
angular,
|
|
135
135
|
angularLanguage
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=dist-
|
|
137
|
+
//# sourceMappingURL=dist-D4E7IXYD.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
parseMixed,
|
|
6
6
|
styleTags,
|
|
7
7
|
tags
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3U6A6M3C.js";
|
|
9
9
|
|
|
10
10
|
// node_modules/.pnpm/@lezer+yaml@1.0.3/node_modules/@lezer/yaml/dist/index.js
|
|
11
11
|
var blockEnd = 63;
|
|
@@ -441,4 +441,4 @@ export {
|
|
|
441
441
|
yamlFrontmatter,
|
|
442
442
|
yamlLanguage
|
|
443
443
|
};
|
|
444
|
-
//# sourceMappingURL=dist-
|
|
444
|
+
//# sourceMappingURL=dist-E6QAN4VQ.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
LRParser,
|
|
5
5
|
styleTags,
|
|
6
6
|
tags
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3U6A6M3C.js";
|
|
8
8
|
|
|
9
9
|
// node_modules/.pnpm/@lezer+xml@1.0.6/node_modules/@lezer/xml/dist/index.js
|
|
10
10
|
var StartTag = 1;
|
|
@@ -406,4 +406,4 @@ export {
|
|
|
406
406
|
xml,
|
|
407
407
|
xmlLanguage
|
|
408
408
|
};
|
|
409
|
-
//# sourceMappingURL=dist-
|
|
409
|
+
//# sourceMappingURL=dist-E72K6GKZ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOCXO46Z.js";
|
|
4
|
+
import "./chunk-JCGWNVO7.js";
|
|
5
|
+
import "./chunk-ZMDZRV6X.js";
|
|
6
6
|
import "./chunk-UQ2NFKSJ.js";
|
|
7
7
|
import {
|
|
8
8
|
ExternalTokenizer,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
parseMixed,
|
|
12
12
|
styleTags,
|
|
13
13
|
tags
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3U6A6M3C.js";
|
|
15
15
|
|
|
16
16
|
// node_modules/.pnpm/@codemirror+lang-jinja@6.0.0/node_modules/@codemirror/lang-jinja/dist/index.js
|
|
17
17
|
import { syntaxTree, LRLanguage, indentNodeProp, delimitedIndent, foldNodeProp, LanguageSupport } from "@codemirror/language";
|
|
@@ -308,4 +308,4 @@ export {
|
|
|
308
308
|
jinjaCompletionSource,
|
|
309
309
|
jinjaLanguage
|
|
310
310
|
};
|
|
311
|
-
//# sourceMappingURL=dist-
|
|
311
|
+
//# sourceMappingURL=dist-EVYTVY4T.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
NodeWeakMap,
|
|
13
13
|
styleTags,
|
|
14
14
|
tags
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3U6A6M3C.js";
|
|
16
16
|
|
|
17
17
|
// node_modules/.pnpm/@lezer+go@1.0.1/node_modules/@lezer/go/dist/index.js
|
|
18
18
|
var insertedSemi = 177;
|
|
@@ -347,4 +347,4 @@ export {
|
|
|
347
347
|
localCompletionSource,
|
|
348
348
|
snippets
|
|
349
349
|
};
|
|
350
|
-
//# sourceMappingURL=dist-
|
|
350
|
+
//# sourceMappingURL=dist-ITLHNFUL.js.map
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
tsxLanguage,
|
|
12
12
|
typescriptLanguage,
|
|
13
13
|
typescriptSnippets
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZMDZRV6X.js";
|
|
15
15
|
import "./chunk-UQ2NFKSJ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-3U6A6M3C.js";
|
|
17
17
|
export {
|
|
18
18
|
autoCloseTags,
|
|
19
19
|
completionPath,
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
typescriptLanguage,
|
|
29
29
|
typescriptSnippets
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=dist-
|
|
31
|
+
//# sourceMappingURL=dist-KLLOFSEO.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineCSSCompletionSource
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JCGWNVO7.js";
|
|
4
4
|
import {
|
|
5
5
|
ContextTracker,
|
|
6
6
|
ExternalTokenizer,
|
|
7
7
|
LRParser,
|
|
8
8
|
styleTags,
|
|
9
9
|
tags
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3U6A6M3C.js";
|
|
11
11
|
|
|
12
12
|
// node_modules/.pnpm/@lezer+sass@1.1.0/node_modules/@lezer/sass/dist/index.js
|
|
13
13
|
var indent = 168;
|
|
@@ -371,4 +371,4 @@ export {
|
|
|
371
371
|
sassCompletionSource,
|
|
372
372
|
sassLanguage
|
|
373
373
|
};
|
|
374
|
-
//# sourceMappingURL=dist-
|
|
374
|
+
//# sourceMappingURL=dist-LCUXA5AJ.js.map
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
markdownKeymap,
|
|
8
8
|
markdownLanguage,
|
|
9
9
|
pasteURLAsLink
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-BK6BYU4X.js";
|
|
11
|
+
import "./chunk-AOCXO46Z.js";
|
|
12
|
+
import "./chunk-JCGWNVO7.js";
|
|
13
|
+
import "./chunk-ZMDZRV6X.js";
|
|
14
14
|
import "./chunk-UQ2NFKSJ.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-3U6A6M3C.js";
|
|
16
16
|
export {
|
|
17
17
|
commonmarkLanguage,
|
|
18
18
|
deleteMarkupBackward,
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
markdownLanguage,
|
|
24
24
|
pasteURLAsLink
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=dist-
|
|
26
|
+
//# sourceMappingURL=dist-NFD5VVC6.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
LRParser,
|
|
4
4
|
styleTags,
|
|
5
5
|
tags
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3U6A6M3C.js";
|
|
7
7
|
|
|
8
8
|
// node_modules/.pnpm/@lezer+rust@1.0.2/node_modules/@lezer/rust/dist/index.js
|
|
9
9
|
var closureParamDelim = 1;
|
|
@@ -202,4 +202,4 @@ export {
|
|
|
202
202
|
rust,
|
|
203
203
|
rustLanguage
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=dist-
|
|
205
|
+
//# sourceMappingURL=dist-O6G7IUZY.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
LRParser,
|
|
3
3
|
styleTags,
|
|
4
4
|
tags
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3U6A6M3C.js";
|
|
6
6
|
|
|
7
7
|
// node_modules/.pnpm/@lezer+java@1.1.3/node_modules/@lezer/java/dist/index.js
|
|
8
8
|
var javaHighlighting = styleTags({
|
|
@@ -103,4 +103,4 @@ export {
|
|
|
103
103
|
java,
|
|
104
104
|
javaLanguage
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=dist-
|
|
106
|
+
//# sourceMappingURL=dist-OU44YTSZ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
LRParser,
|
|
3
3
|
styleTags,
|
|
4
4
|
tags
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3U6A6M3C.js";
|
|
6
6
|
|
|
7
7
|
// node_modules/.pnpm/@codemirror+lang-wast@6.0.2/node_modules/@codemirror/lang-wast/dist/index.js
|
|
8
8
|
import { LRLanguage, indentNodeProp, delimitedIndent, foldNodeProp, foldInside, LanguageSupport } from "@codemirror/language";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
wast,
|
|
66
66
|
wastLanguage
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=dist-
|
|
68
|
+
//# sourceMappingURL=dist-RCBHVDL7.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
NodeWeakMap,
|
|
12
12
|
styleTags,
|
|
13
13
|
tags
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3U6A6M3C.js";
|
|
15
15
|
|
|
16
16
|
// node_modules/.pnpm/@lezer+python@1.1.18/node_modules/@lezer/python/dist/index.js
|
|
17
17
|
var printKeyword = 1;
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
python,
|
|
776
776
|
pythonLanguage
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=dist-
|
|
778
|
+
//# sourceMappingURL=dist-RUK5SWS5.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOCXO46Z.js";
|
|
4
|
+
import "./chunk-JCGWNVO7.js";
|
|
5
5
|
import {
|
|
6
6
|
javascriptLanguage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZMDZRV6X.js";
|
|
8
8
|
import "./chunk-UQ2NFKSJ.js";
|
|
9
9
|
import {
|
|
10
10
|
LRParser,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseMixed,
|
|
13
13
|
styleTags,
|
|
14
14
|
tags
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3U6A6M3C.js";
|
|
16
16
|
|
|
17
17
|
// node_modules/.pnpm/@codemirror+lang-vue@0.1.3/node_modules/@codemirror/lang-vue/dist/index.js
|
|
18
18
|
import { LRLanguage, LanguageSupport } from "@codemirror/language";
|
|
@@ -94,4 +94,4 @@ export {
|
|
|
94
94
|
vue,
|
|
95
95
|
vueLanguage
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=dist-
|
|
97
|
+
//# sourceMappingURL=dist-TFWDIHAP.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineCSSCompletionSource
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JCGWNVO7.js";
|
|
4
4
|
import {
|
|
5
5
|
ExternalTokenizer,
|
|
6
6
|
LRParser,
|
|
7
7
|
styleTags,
|
|
8
8
|
tags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3U6A6M3C.js";
|
|
10
10
|
|
|
11
11
|
// node_modules/.pnpm/@codemirror+lang-less@6.0.2/node_modules/@codemirror/lang-less/dist/index.js
|
|
12
12
|
import { LRLanguage, indentNodeProp, continuedIndent, foldNodeProp, foldInside, LanguageSupport } from "@codemirror/language";
|
|
@@ -160,4 +160,4 @@ export {
|
|
|
160
160
|
lessCompletionSource,
|
|
161
161
|
lessLanguage
|
|
162
162
|
};
|
|
163
|
-
//# sourceMappingURL=dist-
|
|
163
|
+
//# sourceMappingURL=dist-VBHD2NRU.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
html
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOCXO46Z.js";
|
|
4
|
+
import "./chunk-JCGWNVO7.js";
|
|
5
|
+
import "./chunk-ZMDZRV6X.js";
|
|
6
6
|
import "./chunk-UQ2NFKSJ.js";
|
|
7
7
|
import {
|
|
8
8
|
ExternalTokenizer,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
parseMixed,
|
|
11
11
|
styleTags,
|
|
12
12
|
tags
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3U6A6M3C.js";
|
|
14
14
|
|
|
15
15
|
// node_modules/.pnpm/@lezer+php@1.0.5/node_modules/@lezer/php/dist/index.js
|
|
16
16
|
var castOpen = 1;
|
|
@@ -412,4 +412,4 @@ export {
|
|
|
412
412
|
php,
|
|
413
413
|
phpLanguage
|
|
414
414
|
};
|
|
415
|
-
//# sourceMappingURL=dist-
|
|
415
|
+
//# sourceMappingURL=dist-XL62MJER.js.map
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
cssCompletionSource,
|
|
4
4
|
cssLanguage,
|
|
5
5
|
defineCSSCompletionSource
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-JCGWNVO7.js";
|
|
7
|
+
import "./chunk-3U6A6M3C.js";
|
|
8
8
|
export {
|
|
9
9
|
css,
|
|
10
10
|
cssCompletionSource,
|
|
11
11
|
cssLanguage,
|
|
12
12
|
defineCSSCompletionSource
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=dist-
|
|
14
|
+
//# sourceMappingURL=dist-YK6XD4UJ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
LRParser,
|
|
3
3
|
styleTags,
|
|
4
4
|
tags
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3U6A6M3C.js";
|
|
6
6
|
|
|
7
7
|
// node_modules/.pnpm/@lezer+json@1.0.3/node_modules/@lezer/json/dist/index.js
|
|
8
8
|
var jsonHighlighting = styleTags({
|
|
@@ -88,4 +88,4 @@ export {
|
|
|
88
88
|
jsonLanguage,
|
|
89
89
|
jsonParseLinter
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=dist-
|
|
91
|
+
//# sourceMappingURL=dist-YNO26IAD.js.map
|
|
@@ -18,8 +18,13 @@ var linkTheme = EditorView.baseTheme({
|
|
|
18
18
|
".cm-link": {
|
|
19
19
|
textDecoration: "underline",
|
|
20
20
|
cursor: "var(--studio-cursor-pointer, pointer)",
|
|
21
|
-
|
|
21
|
+
// the widget replaces the link's text, so the theme's `t.link` highlight
|
|
22
|
+
// (theming/src/codemirror-theme.ts) never reaches it: read the same tokens.
|
|
23
|
+
fontFamily: "var(--markdown-body-family, var(--text-editor-family-sans))",
|
|
22
24
|
color: "var(--syntax-link, #0066cc)",
|
|
25
|
+
backgroundColor: "var(--syntax-fill-link)",
|
|
26
|
+
fontStyle: "var(--syntax-style-link)",
|
|
27
|
+
fontWeight: "var(--syntax-weight-link)",
|
|
23
28
|
"&:hover": {
|
|
24
29
|
color: "inherit"
|
|
25
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/extensions/links.ts", "../../src/themes/links.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n EditorView,\n Decoration,\n WidgetType,\n ViewPlugin,\n ViewUpdate,\n type DecorationSet,\n} from \"@codemirror/view\";\nimport {\n type EditorState,\n Range,\n StateEffect,\n StateField,\n} from \"@codemirror/state\";\nimport { syntaxTree } from \"@codemirror/language\";\nimport { isValidAutomergeUrl } from \"@automerge/automerge-repo/slim\";\nimport { linkTheme } from \"../themes/links.ts\";\n\n/**\n * Open a link from the editor. Automerge urls open inside Patchwork rather\n * than as a browser URL (automerge: isn't navigable); bubbles/composed so the\n * event escapes the editor and any shadow root up to whoever drives selection.\n */\nexport function openUrl(url: string, from: Element) {\n if (isValidAutomergeUrl(url)) {\n from.dispatchEvent(\n new CustomEvent(\"patchwork:open-document\", {\n detail: { url },\n bubbles: true,\n composed: true,\n }),\n );\n } else {\n // GFM autolinks `www.example.com` with no scheme.\n const href = /^[a-z][a-z0-9+.-]*:/i.test(url) ? url : `https://${url}`;\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n }\n}\n\n/**\n * Widget to render a clickable link in the editor\n */\nclass LinkWidget extends WidgetType {\n readonly url: string;\n readonly text: string;\n\n constructor(url: string, text: string) {\n super();\n this.url = url;\n this.text = text;\n }\n\n eq(other: LinkWidget) {\n return other.url === this.url && other.text === this.text;\n }\n\n toDOM() {\n const link = document.createElement(\"a\");\n link.href = this.url;\n link.textContent = this.text;\n link.className = \"cm-link\";\n link.title = this.url;\n\n link.onclick = (e) => {\n e.preventDefault();\n openUrl(this.url, link);\n };\n\n return link;\n }\n\n ignoreEvent(e: Event) {\n // Let click events through to our widget\n return e.type !== \"click\";\n }\n}\n\nfunction getLinks(view: EditorView) {\n const widgets: Range<Decoration>[] = [];\n const { state } = view;\n const selection = state.selection.main;\n\n for (let { from, to } of view.visibleRanges) {\n syntaxTree(state).iterate({\n from,\n to,\n enter: (node) => {\n // Match markdown link syntax\n if (node.name === \"Link\") {\n const linkFrom = node.from;\n const linkTo = node.to;\n\n // Check if cursor is inside this link\n const cursorInLink =\n selection.from >= linkFrom && selection.from <= linkTo;\n // Check if the link is inside the selection\n const selectionSpansLink =\n selection.from < linkFrom && selection.to > linkTo;\n\n // Replace if cursor is outside the link and there's no selection across the link\n if (!cursorInLink && !selectionSpansLink) {\n const linkText = state.doc.sliceString(linkFrom, linkTo);\n const match = linkText.match(/\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n if (match) {\n const [, text, url] = match;\n\n // Replace the entire [text](url) with just the link widget\n const deco = Decoration.replace({\n widget: new LinkWidget(url, text),\n });\n\n widgets.push(deco.range(linkFrom, linkTo));\n }\n }\n }\n },\n });\n }\n\n return Decoration.set(widgets);\n}\n\nconst linkPlugin = ViewPlugin.fromClass(\n class {\n decorations: DecorationSet;\n\n constructor(view: EditorView) {\n this.decorations = getLinks(view);\n }\n\n update(update: ViewUpdate) {\n // Recompute when doc changes, selection moves, or viewport changes\n if (\n update.docChanged ||\n update.selectionSet ||\n update.viewportChanged ||\n syntaxTree(update.startState) !== syntaxTree(update.state)\n ) {\n this.decorations = getLinks(update.view);\n }\n }\n },\n {\n decorations: (v) => v.decorations,\n }\n);\n\ntype SyntaxNode = ReturnType<ReturnType<typeof syntaxTree>[\"resolveInner\"]>;\n\n/**\n * The link at `pos`, if any: an inline `[text](url)`, an autolink `<url>`, a\n * GFM bare url, or the url in a `[ref]: url` definition. `from`/`to` cover\n * the whole link as written. Reference-style `[text][ref]` links have no url\n * of their own and are skipped.\n */\nexport function linkAt(\n state: EditorState,\n pos: number\n): { from: number; to: number; url: string } | null {\n const slice = (n: SyntaxNode) => state.doc.sliceString(n.from, n.to);\n for (const side of [1, -1] as const) {\n for (\n let node: SyntaxNode | null = syntaxTree(state).resolveInner(pos, side);\n node;\n node = node.parent\n ) {\n const inLink = node.parent?.name === \"Link\" || node.parent?.name === \"Autolink\";\n if (node.name === \"URL\" && !inLink)\n return { from: node.from, to: node.to, url: slice(node) };\n if (node.name === \"Link\" || node.name === \"Autolink\") {\n const url = node.getChild(\"URL\");\n return url ? { from: node.from, to: node.to, url: slice(url) } : null;\n }\n }\n }\n return null;\n}\n\nexport const urlAt = (state: EditorState, pos: number) =>\n linkAt(state, pos)?.url ?? null;\n\n/**\n * The link actually under the pointer. `posAndSideAtCoords` snaps to the\n * nearest position, so without the distance check the blank space past the\n * end of a line would count as hovering a link that ends the line.\n */\nfunction linkUnderPointer(view: EditorView, x: number, y: number) {\n const hit = view.posAndSideAtCoords({ x, y });\n if (!hit) return null;\n const at = view.coordsAtPos(hit.pos, hit.assoc);\n if (\n !at ||\n y < at.top ||\n y > at.bottom ||\n Math.abs(x - at.left) > view.defaultCharacterWidth * 1.5\n )\n return null;\n return linkAt(view.state, hit.pos);\n}\n\nconst isMac =\n typeof navigator !== \"undefined\" &&\n /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);\nconst modHeld = (e: KeyboardEvent | MouseEvent) =>\n isMac ? e.metaKey : e.ctrlKey;\n\n/** The one link to show as clickable: under the pointer, with Mod held. */\nconst setHover = StateEffect.define<{ from: number; to: number } | null>();\nconst hoverMark = Decoration.mark({ class: \"cm-md-link-hover\" });\n\nconst hoverField = StateField.define<DecorationSet>({\n create: () => Decoration.none,\n update(deco, tr) {\n deco = deco.map(tr.changes);\n for (const e of tr.effects) {\n if (e.is(setHover)) {\n deco = e.value\n ? Decoration.set(hoverMark.range(e.value.from, e.value.to))\n : Decoration.none;\n }\n }\n return deco;\n },\n provide: (f) => EditorView.decorations.from(f),\n});\n\n/**\n * Cmd-click (Ctrl off a Mac) opens the link under the pointer, even while the\n * cursor is inside it and it's showing as raw markdown. While the key is held\n * the hovered link gets `cm-md-link-hover`, so the theme can underline it.\n */\nconst modClick = ViewPlugin.fromClass(\n class {\n pointer: { x: number; y: number } | null = null;\n mod = false;\n\n constructor(readonly view: EditorView) {}\n\n refresh() {\n const { view } = this;\n const link =\n this.mod && this.pointer\n ? linkUnderPointer(view, this.pointer.x, this.pointer.y)\n : null;\n let current: { from: number; to: number } | null = null;\n view.state.field(hoverField).between(0, view.state.doc.length, (from, to) => {\n current = { from, to };\n });\n const same = (a: typeof current, b: typeof current) =>\n a?.from === b?.from && a?.to === b?.to;\n const next = link && { from: link.from, to: link.to };\n if (!same(current, next)) view.dispatch({ effects: setHover.of(next) });\n }\n },\n {\n eventHandlers: {\n mousedown(event, view) {\n if (event.button !== 0 || !modHeld(event)) return false;\n const link = linkUnderPointer(view, event.clientX, event.clientY);\n if (!link) return false;\n event.preventDefault();\n openUrl(link.url, view.dom);\n return true;\n },\n mousemove(event) {\n this.pointer = { x: event.clientX, y: event.clientY };\n this.mod = modHeld(event);\n this.refresh();\n },\n mouseleave() {\n this.pointer = null;\n this.refresh();\n },\n keydown(event) {\n this.mod = modHeld(event);\n this.refresh();\n },\n keyup(event) {\n this.mod = modHeld(event);\n this.refresh();\n },\n blur() {\n this.mod = false;\n this.refresh();\n },\n },\n }\n);\n\nexport function markdownLinks() {\n return [linkPlugin, hoverField, modClick, linkTheme];\n}\n", "import { EditorView } from \"@codemirror/view\";\n\nexport const linkTheme = EditorView.baseTheme({\n \".cm-link\": {\n textDecoration: \"underline\",\n cursor: \"var(--studio-cursor-pointer, pointer)\",\n
|
|
5
|
-
"mappings": ";AAAA;AAAA,EACE,cAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;;;ACfpC,SAAS,kBAAkB;AAEpB,IAAM,YAAY,WAAW,UAAU;AAAA,EAC5C,YAAY;AAAA,IACV,gBAAgB;AAAA,IAChB,QAAQ;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n EditorView,\n Decoration,\n WidgetType,\n ViewPlugin,\n ViewUpdate,\n type DecorationSet,\n} from \"@codemirror/view\";\nimport {\n type EditorState,\n Range,\n StateEffect,\n StateField,\n} from \"@codemirror/state\";\nimport { syntaxTree } from \"@codemirror/language\";\nimport { isValidAutomergeUrl } from \"@automerge/automerge-repo/slim\";\nimport { linkTheme } from \"../themes/links.ts\";\n\n/**\n * Open a link from the editor. Automerge urls open inside Patchwork rather\n * than as a browser URL (automerge: isn't navigable); bubbles/composed so the\n * event escapes the editor and any shadow root up to whoever drives selection.\n */\nexport function openUrl(url: string, from: Element) {\n if (isValidAutomergeUrl(url)) {\n from.dispatchEvent(\n new CustomEvent(\"patchwork:open-document\", {\n detail: { url },\n bubbles: true,\n composed: true,\n }),\n );\n } else {\n // GFM autolinks `www.example.com` with no scheme.\n const href = /^[a-z][a-z0-9+.-]*:/i.test(url) ? url : `https://${url}`;\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n }\n}\n\n/**\n * Widget to render a clickable link in the editor\n */\nclass LinkWidget extends WidgetType {\n readonly url: string;\n readonly text: string;\n\n constructor(url: string, text: string) {\n super();\n this.url = url;\n this.text = text;\n }\n\n eq(other: LinkWidget) {\n return other.url === this.url && other.text === this.text;\n }\n\n toDOM() {\n const link = document.createElement(\"a\");\n link.href = this.url;\n link.textContent = this.text;\n link.className = \"cm-link\";\n link.title = this.url;\n\n link.onclick = (e) => {\n e.preventDefault();\n openUrl(this.url, link);\n };\n\n return link;\n }\n\n ignoreEvent(e: Event) {\n // Let click events through to our widget\n return e.type !== \"click\";\n }\n}\n\nfunction getLinks(view: EditorView) {\n const widgets: Range<Decoration>[] = [];\n const { state } = view;\n const selection = state.selection.main;\n\n for (let { from, to } of view.visibleRanges) {\n syntaxTree(state).iterate({\n from,\n to,\n enter: (node) => {\n // Match markdown link syntax\n if (node.name === \"Link\") {\n const linkFrom = node.from;\n const linkTo = node.to;\n\n // Check if cursor is inside this link\n const cursorInLink =\n selection.from >= linkFrom && selection.from <= linkTo;\n // Check if the link is inside the selection\n const selectionSpansLink =\n selection.from < linkFrom && selection.to > linkTo;\n\n // Replace if cursor is outside the link and there's no selection across the link\n if (!cursorInLink && !selectionSpansLink) {\n const linkText = state.doc.sliceString(linkFrom, linkTo);\n const match = linkText.match(/\\[([^\\]]+)\\]\\(([^)]+)\\)/);\n\n if (match) {\n const [, text, url] = match;\n\n // Replace the entire [text](url) with just the link widget\n const deco = Decoration.replace({\n widget: new LinkWidget(url, text),\n });\n\n widgets.push(deco.range(linkFrom, linkTo));\n }\n }\n }\n },\n });\n }\n\n return Decoration.set(widgets);\n}\n\nconst linkPlugin = ViewPlugin.fromClass(\n class {\n decorations: DecorationSet;\n\n constructor(view: EditorView) {\n this.decorations = getLinks(view);\n }\n\n update(update: ViewUpdate) {\n // Recompute when doc changes, selection moves, or viewport changes\n if (\n update.docChanged ||\n update.selectionSet ||\n update.viewportChanged ||\n syntaxTree(update.startState) !== syntaxTree(update.state)\n ) {\n this.decorations = getLinks(update.view);\n }\n }\n },\n {\n decorations: (v) => v.decorations,\n }\n);\n\ntype SyntaxNode = ReturnType<ReturnType<typeof syntaxTree>[\"resolveInner\"]>;\n\n/**\n * The link at `pos`, if any: an inline `[text](url)`, an autolink `<url>`, a\n * GFM bare url, or the url in a `[ref]: url` definition. `from`/`to` cover\n * the whole link as written. Reference-style `[text][ref]` links have no url\n * of their own and are skipped.\n */\nexport function linkAt(\n state: EditorState,\n pos: number\n): { from: number; to: number; url: string } | null {\n const slice = (n: SyntaxNode) => state.doc.sliceString(n.from, n.to);\n for (const side of [1, -1] as const) {\n for (\n let node: SyntaxNode | null = syntaxTree(state).resolveInner(pos, side);\n node;\n node = node.parent\n ) {\n const inLink = node.parent?.name === \"Link\" || node.parent?.name === \"Autolink\";\n if (node.name === \"URL\" && !inLink)\n return { from: node.from, to: node.to, url: slice(node) };\n if (node.name === \"Link\" || node.name === \"Autolink\") {\n const url = node.getChild(\"URL\");\n return url ? { from: node.from, to: node.to, url: slice(url) } : null;\n }\n }\n }\n return null;\n}\n\nexport const urlAt = (state: EditorState, pos: number) =>\n linkAt(state, pos)?.url ?? null;\n\n/**\n * The link actually under the pointer. `posAndSideAtCoords` snaps to the\n * nearest position, so without the distance check the blank space past the\n * end of a line would count as hovering a link that ends the line.\n */\nfunction linkUnderPointer(view: EditorView, x: number, y: number) {\n const hit = view.posAndSideAtCoords({ x, y });\n if (!hit) return null;\n const at = view.coordsAtPos(hit.pos, hit.assoc);\n if (\n !at ||\n y < at.top ||\n y > at.bottom ||\n Math.abs(x - at.left) > view.defaultCharacterWidth * 1.5\n )\n return null;\n return linkAt(view.state, hit.pos);\n}\n\nconst isMac =\n typeof navigator !== \"undefined\" &&\n /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);\nconst modHeld = (e: KeyboardEvent | MouseEvent) =>\n isMac ? e.metaKey : e.ctrlKey;\n\n/** The one link to show as clickable: under the pointer, with Mod held. */\nconst setHover = StateEffect.define<{ from: number; to: number } | null>();\nconst hoverMark = Decoration.mark({ class: \"cm-md-link-hover\" });\n\nconst hoverField = StateField.define<DecorationSet>({\n create: () => Decoration.none,\n update(deco, tr) {\n deco = deco.map(tr.changes);\n for (const e of tr.effects) {\n if (e.is(setHover)) {\n deco = e.value\n ? Decoration.set(hoverMark.range(e.value.from, e.value.to))\n : Decoration.none;\n }\n }\n return deco;\n },\n provide: (f) => EditorView.decorations.from(f),\n});\n\n/**\n * Cmd-click (Ctrl off a Mac) opens the link under the pointer, even while the\n * cursor is inside it and it's showing as raw markdown. While the key is held\n * the hovered link gets `cm-md-link-hover`, so the theme can underline it.\n */\nconst modClick = ViewPlugin.fromClass(\n class {\n pointer: { x: number; y: number } | null = null;\n mod = false;\n\n constructor(readonly view: EditorView) {}\n\n refresh() {\n const { view } = this;\n const link =\n this.mod && this.pointer\n ? linkUnderPointer(view, this.pointer.x, this.pointer.y)\n : null;\n let current: { from: number; to: number } | null = null;\n view.state.field(hoverField).between(0, view.state.doc.length, (from, to) => {\n current = { from, to };\n });\n const same = (a: typeof current, b: typeof current) =>\n a?.from === b?.from && a?.to === b?.to;\n const next = link && { from: link.from, to: link.to };\n if (!same(current, next)) view.dispatch({ effects: setHover.of(next) });\n }\n },\n {\n eventHandlers: {\n mousedown(event, view) {\n if (event.button !== 0 || !modHeld(event)) return false;\n const link = linkUnderPointer(view, event.clientX, event.clientY);\n if (!link) return false;\n event.preventDefault();\n openUrl(link.url, view.dom);\n return true;\n },\n mousemove(event) {\n this.pointer = { x: event.clientX, y: event.clientY };\n this.mod = modHeld(event);\n this.refresh();\n },\n mouseleave() {\n this.pointer = null;\n this.refresh();\n },\n keydown(event) {\n this.mod = modHeld(event);\n this.refresh();\n },\n keyup(event) {\n this.mod = modHeld(event);\n this.refresh();\n },\n blur() {\n this.mod = false;\n this.refresh();\n },\n },\n }\n);\n\nexport function markdownLinks() {\n return [linkPlugin, hoverField, modClick, linkTheme];\n}\n", "import { EditorView } from \"@codemirror/view\";\n\nexport const linkTheme = EditorView.baseTheme({\n \".cm-link\": {\n textDecoration: \"underline\",\n cursor: \"var(--studio-cursor-pointer, pointer)\",\n // the widget replaces the link's text, so the theme's `t.link` highlight\n // (theming/src/codemirror-theme.ts) never reaches it: read the same tokens.\n fontFamily: \"var(--markdown-body-family, var(--text-editor-family-sans))\",\n color: \"var(--syntax-link, #0066cc)\",\n backgroundColor: \"var(--syntax-fill-link)\",\n fontStyle: \"var(--syntax-style-link)\",\n fontWeight: \"var(--syntax-weight-link)\",\n \"&:hover\": {\n color: \"inherit\",\n },\n },\n \".cm-md-link-hover, .cm-md-link-hover *\": {\n textDecoration: \"underline\",\n cursor: \"var(--studio-cursor-pointer, pointer)\",\n },\n});\n"],
|
|
5
|
+
"mappings": ";AAAA;AAAA,EACE,cAAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,2BAA2B;;;ACfpC,SAAS,kBAAkB;AAEpB,IAAM,YAAY,WAAW,UAAU;AAAA,EAC5C,YAAY;AAAA,IACV,gBAAgB;AAAA,IAChB,QAAQ;AAAA;AAAA;AAAA,IAGR,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,MACT,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,0CAA0C;AAAA,IACxC,gBAAgB;AAAA,IAChB,QAAQ;AAAA,EACV;AACF,CAAC;;;ADEM,SAAS,QAAQ,KAAa,MAAe;AAClD,MAAI,oBAAoB,GAAG,GAAG;AAC5B,SAAK;AAAA,MACH,IAAI,YAAY,2BAA2B;AAAA,QACzC,QAAQ,EAAE,IAAI;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