@marimo-team/islands 0.17.4 → 0.17.6
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/{ConnectedDataExplorerComponent-DY9cADKc.js → ConnectedDataExplorerComponent-BC1bAfWX.js} +4 -4
- package/dist/{any-language-editor-Bs2c1bKU.js → any-language-editor-BpWjHMW2.js} +22 -22
- package/dist/{dist-DlSZED-1.js → dist-1NPzctn9.js} +2 -2
- package/dist/{dist-qGpLTiEi.js → dist-59eZyXwa.js} +3 -3
- package/dist/dist-8Gr13wFT.js +6 -0
- package/dist/{dist-D4LUTYHc.js → dist-8IZEIZE_.js} +2 -2
- package/dist/dist-BA1Ol0Yn.js +6 -0
- package/dist/{dist-DzKKEoge.js → dist-BGBHvY7x.js} +3 -3
- package/dist/{dist-8v4BI_h_.js → dist-BJKL0WEK.js} +1 -1
- package/dist/{dist-B3CNaJau.js → dist-BPwzuLH_.js} +119 -119
- package/dist/{dist-D08oiinq.js → dist-BRfGeCYG.js} +77 -77
- package/dist/{dist-CxRajUZ6.js → dist-BXNAv-Y6.js} +1 -1
- package/dist/{dist-7CqcJssH.js → dist-BZrCuBDi.js} +6 -6
- package/dist/{dist-C02gS--y.js → dist-Bevt_gzr.js} +41 -41
- package/dist/{dist-DGKjHTv9.js → dist-C1xRKkqR.js} +5 -5
- package/dist/{dist-DSDOMDNR.js → dist-C8SV9SiM.js} +4 -4
- package/dist/{dist-HKzG1oF6.js → dist-CCFXVP1F.js} +1 -1
- package/dist/{dist-BgsDu-bU.js → dist-CLkbwjpG.js} +1 -1
- package/dist/{dist-BMhv6XDi.js → dist-CP1MdHH-.js} +27 -27
- package/dist/{dist-Dh7gw0Ay.js → dist-CWyLmhAN.js} +2 -2
- package/dist/{dist-CXimnGhI.js → dist-C_BPvPwx.js} +2 -2
- package/dist/dist-CbNrcsEy.js +10 -0
- package/dist/{dist-DiO9ni9a.js → dist-Cba8uTcG.js} +2 -2
- package/dist/{dist-C5Ns3q-m.js → dist-Cf1Q6zai.js} +31 -31
- package/dist/{dist-_tHnp24J.js → dist-CiMy2-5u.js} +3 -3
- package/dist/dist-CkXa7yhd.js +10 -0
- package/dist/dist-CoHj7yHI.js +6 -0
- package/dist/{dist-XkGsOiy0.js → dist-CqG4DwQn.js} +2 -2
- package/dist/{dist-owpR56zn.js → dist-Ct4F6_s2.js} +1 -1
- package/dist/{dist-DTNqkRGE.js → dist-DG9oMdD2.js} +3 -3
- package/dist/{dist-CawOxmKh.js → dist-DKdtgJ4Q.js} +5 -5
- package/dist/{dist-K_AqLCfS.js → dist-DQOkkAzs.js} +3 -3
- package/dist/dist-DVuYVZws.js +6 -0
- package/dist/{dist-DvsjKDQ4.js → dist-DgnYtm7R.js} +1 -1
- package/dist/dist-DjH2J8yO.js +6 -0
- package/dist/{dist-DGnWQOnS.js → dist-Djl1P_Vh.js} +3 -3
- package/dist/{dist-DbHWFmjZ.js → dist-Kh7kDIJB.js} +1 -1
- package/dist/dist-MCqj0bEP.js +12 -0
- package/dist/{dist-eSnWVS11.js → dist-k6dhIy0O.js} +3 -3
- package/dist/dist-l9YJLCkC.js +6 -0
- package/dist/{dist-BYS0EtbC.js → dist-m4uUGntS.js} +2 -2
- package/dist/{dist-D_GkrgWD.js → dist-qXlX_Isq.js} +2 -2
- package/dist/{dist-CBu8cgzz.js → dist-t5bQPtMZ.js} +43 -45
- package/dist/{esm-CQIOyi5v.js → esm-HxIp3fzy.js} +1387 -1435
- package/dist/{formats-kyFd0DPJ.js → formats-b5g0iERd.js} +1 -1
- package/dist/{glide-data-editor-1bUl_mRe.js → glide-data-editor-hF8NzJm2.js} +2 -2
- package/dist/main.js +93 -1074
- package/dist/{mermaid-DIjoC4T4.js → mermaid-BAe4A_1z.js} +2 -2
- package/dist/{react-vega-DM3e8kar.js → react-vega-BhZaW0DJ.js} +1 -1
- package/dist/{react-vega-B9eMrRW1.js → react-vega-C3G6aCB7.js} +1560 -869
- package/dist/{spec-rqRnkIf4.js → spec-9eipa51K.js} +1 -1
- package/dist/{types-Bt7p5SYB.js → types-O1gHduIo.js} +1 -1
- package/dist/{useAsyncData-Dp2V69OV.js → useAsyncData-D8_fNj6a.js} +1 -1
- package/dist/{useTheme-D7vlj42b.js → useTheme-BzICL4qs.js} +23 -24
- package/dist/{vega-component-C58Jk3ub.js → vega-component-B26vOtT-.js} +4 -4
- package/package.json +2 -2
- package/src/components/app-config/data-form.tsx +3 -3
- package/src/core/codemirror/language/__tests__/markdown.test.ts +36 -13
- package/src/core/codemirror/language/__tests__/utils.test.ts +6 -2
- package/src/core/codemirror/language/languages/sql/sql.ts +2 -1
- package/src/plugins/layout/TexPlugin.tsx +33 -5
- package/dist/dist-B9JCXzyv.js +0 -6
- package/dist/dist-C6QrJGYr.js +0 -10
- package/dist/dist-CFZ32udY.js +0 -6
- package/dist/dist-CmgxQNWN.js +0 -10
- package/dist/dist-Cr6Cu8sC.js +0 -6
- package/dist/dist-NxHLuq7w.js +0 -6
- package/dist/dist-S2JcqPPB.js +0 -12
- package/dist/dist-hcPlrsR9.js +0 -6
- package/dist/dist-poXa8G8m.js +0 -6
- package/dist/node-sql-parser-IKID_dZE.js +0 -70437
- /package/dist/{esm-CopBBL2y.js → esm-CS8JKDQL.js} +0 -0
- /package/dist/{react-plotly-Cs07wkly.js → react-plotly-YQqow0sD.js} +0 -0
|
@@ -2,7 +2,7 @@ import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __c
|
|
|
2
2
|
import { t as require_react } from "./react-DHL_F5hS.js";
|
|
3
3
|
import { t as require_compiler_runtime } from "./compiler-runtime-5MdCVm0X.js";
|
|
4
4
|
import { A as createLucideIcon } from "./Combination-DrSsMSEB.js";
|
|
5
|
-
import { A as Badge, B as ListFilter, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, V as Hash, W as Calendar, j as createReducerAndAtoms, t as augmentSpecWithData, z as SquareFunction } from "./spec-
|
|
5
|
+
import { A as Badge, B as ListFilter, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, V as Hash, W as Calendar, j as createReducerAndAtoms, t as augmentSpecWithData, z as SquareFunction } from "./spec-9eipa51K.js";
|
|
6
6
|
import "./check-BZnPxXnd.js";
|
|
7
7
|
import { T as useOnMount, a as SelectItem, c as SelectTrigger, i as SelectGroup, j as $a916eb452884faea$export$b7a616150fdb9f44, l as SelectValue, n as Select, o as SelectLabel, r as SelectContent, s as SelectSeparator, t as Label } from "./label-Wr-xTlW7.js";
|
|
8
8
|
import { d as cn, t as Button } from "./button-B8zS4Mtw.js";
|
|
@@ -10,7 +10,7 @@ import { o as Objects, s as Logger } from "./hotkeys-DVxFjl2s.js";
|
|
|
10
10
|
import { t as require_jsx_runtime } from "./jsx-runtime-CvL6gNI-.js";
|
|
11
11
|
import "./react-dom-BTjywDxo.js";
|
|
12
12
|
import { c as Tooltip, n as ErrorBanner } from "./error-banner-B7LmpmGT.js";
|
|
13
|
-
import {
|
|
13
|
+
import { _ as useAtomValue, b as atom, h as Provider, t as useTheme, x as createStore } from "./useTheme-BzICL4qs.js";
|
|
14
14
|
import "./isArrayLikeObject-1qkWxZbL.js";
|
|
15
15
|
import "./isSymbol-BnxbuvDK.js";
|
|
16
16
|
import "./toString-CT4n1k2E.js";
|
|
@@ -23,11 +23,11 @@ import { t as isString_default } from "./isString-BsphYkXQ.js";
|
|
|
23
23
|
import { a as tooltipHandler, n as vegaLoadData } from "./loader-Dj9XWZTh.js";
|
|
24
24
|
import "./zod-0AbTN3Cg.js";
|
|
25
25
|
import { t as invariant } from "./invariant-Cl2wkkjN.js";
|
|
26
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
26
|
+
import { t as useAsyncData } from "./useAsyncData-D8_fNj6a.js";
|
|
27
27
|
import "./vega-loader.browser-BK7-IO9k.js";
|
|
28
28
|
import "./precisionRound-DMLkFNYv.js";
|
|
29
29
|
import "./linear-CgANSWNu.js";
|
|
30
|
-
import { n as q, r as contains } from "./react-vega-
|
|
30
|
+
import { n as q, r as contains } from "./react-vega-C3G6aCB7.js";
|
|
31
31
|
import "./ordinal-pQYxWJYN.js";
|
|
32
32
|
import "./time-U9NHhrDC.js";
|
|
33
33
|
import "./range-sX2tw-Jz.js";
|
|
@@ -9,29 +9,29 @@ import { s as Logger } from "./hotkeys-DVxFjl2s.js";
|
|
|
9
9
|
import { t as require_jsx_runtime } from "./jsx-runtime-CvL6gNI-.js";
|
|
10
10
|
import "./react-dom-BTjywDxo.js";
|
|
11
11
|
import { n as ErrorBanner } from "./error-banner-B7LmpmGT.js";
|
|
12
|
-
import {
|
|
13
|
-
import "./dist-
|
|
14
|
-
import "./dist-
|
|
12
|
+
import { i as loadLanguage, r as langs, t as esm_default, u as CopyClipboardIcon } from "./esm-HxIp3fzy.js";
|
|
13
|
+
import "./dist-t5bQPtMZ.js";
|
|
14
|
+
import "./dist-BRfGeCYG.js";
|
|
15
15
|
import "./zod-0AbTN3Cg.js";
|
|
16
|
-
import "./dist-
|
|
17
|
-
import "./dist-
|
|
18
|
-
import "./dist-
|
|
19
|
-
import "./dist-
|
|
20
|
-
import "./dist-
|
|
16
|
+
import "./dist-Bevt_gzr.js";
|
|
17
|
+
import "./dist-Cf1Q6zai.js";
|
|
18
|
+
import "./dist-BXNAv-Y6.js";
|
|
19
|
+
import "./dist-BPwzuLH_.js";
|
|
20
|
+
import "./dist-qXlX_Isq.js";
|
|
21
21
|
import "./stex-BmcrV7cx.js";
|
|
22
|
-
import "./dist-
|
|
23
|
-
import "./dist-
|
|
24
|
-
import "./dist-
|
|
25
|
-
import "./dist-
|
|
26
|
-
import "./dist-
|
|
27
|
-
import "./dist-
|
|
28
|
-
import "./dist-
|
|
29
|
-
import "./dist-
|
|
30
|
-
import "./dist-
|
|
31
|
-
import "./dist-
|
|
32
|
-
import "./dist-
|
|
33
|
-
import "./dist-
|
|
34
|
-
import "./dist-
|
|
22
|
+
import "./dist-8IZEIZE_.js";
|
|
23
|
+
import "./dist-Ct4F6_s2.js";
|
|
24
|
+
import "./dist-C_BPvPwx.js";
|
|
25
|
+
import "./dist-DgnYtm7R.js";
|
|
26
|
+
import "./dist-CLkbwjpG.js";
|
|
27
|
+
import "./dist-Cba8uTcG.js";
|
|
28
|
+
import "./dist-C8SV9SiM.js";
|
|
29
|
+
import "./dist-CqG4DwQn.js";
|
|
30
|
+
import "./dist-Kh7kDIJB.js";
|
|
31
|
+
import "./dist-1NPzctn9.js";
|
|
32
|
+
import "./dist-CCFXVP1F.js";
|
|
33
|
+
import "./dist-CP1MdHH-.js";
|
|
34
|
+
import "./dist-BJKL0WEK.js";
|
|
35
35
|
import "./apl-Css595_H.js";
|
|
36
36
|
import "./asciiarmor-BTCuJwxh.js";
|
|
37
37
|
import "./asn1-DXjhS5QI.js";
|
|
@@ -116,7 +116,7 @@ import "./xquery-BErHIIc-.js";
|
|
|
116
116
|
import "./yacas-BBBJNs0h.js";
|
|
117
117
|
import "./z80-nG9RRukG.js";
|
|
118
118
|
import "./mscgen-DWWpdZnb.js";
|
|
119
|
-
import "./dist-
|
|
119
|
+
import "./dist-DG9oMdD2.js";
|
|
120
120
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1);
|
|
121
121
|
const LANGUAGE_MAP = {
|
|
122
122
|
python: "py",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-
|
|
2
|
-
import { i as defineCSSCompletionSource } from "./dist-
|
|
1
|
+
import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
|
|
2
|
+
import { i as defineCSSCompletionSource } from "./dist-BXNAv-Y6.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,6 +1,6 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./dist-
|
|
3
|
-
import { i as snippets, n as goLanguage, r as localCompletionSource, t as go } from "./dist-
|
|
1
|
+
import "./dist-t5bQPtMZ.js";
|
|
2
|
+
import "./dist-BRfGeCYG.js";
|
|
3
|
+
import { i as snippets, n as goLanguage, r as localCompletionSource, t as go } from "./dist-C_BPvPwx.js";
|
|
4
4
|
export {
|
|
5
5
|
go,
|
|
6
6
|
goLanguage,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as tags, I as syntaxTree, O as indentNodeProp, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-
|
|
2
|
-
import { l as ifNotIn, s as completeFromList } from "./dist-
|
|
1
|
+
import { B as tags, I as syntaxTree, O as indentNodeProp, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
|
|
2
|
+
import { l as ifNotIn, s as completeFromList } from "./dist-BRfGeCYG.js";
|
|
3
3
|
var whitespace = 36, LineComment = 1, BlockComment = 2, String$1 = 3, Number = 4, Bool = 5, Null = 6, ParenL = 7, ParenR = 8, BraceL = 9, BraceR = 10, BracketL = 11, BracketR = 12, Semi = 13, Dot = 14, Operator = 15, Punctuation = 16, SpecialVar = 17, Identifier = 18, QuotedIdentifier = 19, Keyword = 20, Type = 21, Bits = 22, Bytes = 23, Builtin = 24;
|
|
4
4
|
function isAlpha(h3) {
|
|
5
5
|
return h3 >= 65 && h3 <= 90 || h3 >= 97 && h3 <= 122 || h3 >= 48 && h3 <= 57;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./dist-
|
|
3
|
-
import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-
|
|
1
|
+
import "./dist-t5bQPtMZ.js";
|
|
2
|
+
import "./dist-BRfGeCYG.js";
|
|
3
|
+
import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-8IZEIZE_.js";
|
|
4
4
|
export {
|
|
5
5
|
Cassandra,
|
|
6
6
|
MSSQL,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as tags, O as indentNodeProp, S as foldInside, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-
|
|
1
|
+
import { B as tags, O as indentNodeProp, S as foldInside, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-t5bQPtMZ.js";
|
|
2
2
|
var blockEnd = 63, eof = 64, DirectiveEnd = 1, DocEnd = 2, sequenceStartMark = 3, sequenceContinueMark = 4, explicitMapStartMark = 5, explicitMapContinueMark = 6, flowMapMark = 7, mapStartMark = 65, mapContinueMark = 66, Literal = 8, QuotedLiteral = 9, Anchor = 10, Alias = 11, Tag = 12, BlockLiteralContent = 13, BracketL = 19, FlowSequence = 20, Colon = 29, BraceL = 33, FlowMapping = 34, BlockLiteralHeader = 47, type_Top = 0, type_Seq = 1, type_Map = 2, type_Flow = 3, type_Lit = 4, Context = class {
|
|
3
3
|
constructor(v, q, J) {
|
|
4
4
|
this.parent = v, this.depth = q, this.type = J, this.hash = (v ? v.hash + v.hash << 8 : 0) + q + (q << 4) + J;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as tags, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, P as sublanguageProp, S as foldInside,
|
|
2
|
-
import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-
|
|
1
|
+
import { B as tags, Ct as EditorSelection, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, P as sublanguageProp, S as foldInside, V as IterMode, Z as EditorView, _ as defineLanguageFacet, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent, z as styleTags } from "./dist-t5bQPtMZ.js";
|
|
2
|
+
import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-BRfGeCYG.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,
|
|
@@ -28,52 +28,52 @@ var noSemi = 315, noSemiType = 316, incdec = 1, incdecPrefix = 2, questionDot =
|
|
|
28
28
|
12288
|
|
29
29
|
], braceR = 125, semicolon = 59, slash = 47, star = 42, plus = 43, minus = 45, lt = 60, comma = 44, question = 63, dot = 46, bracketL = 91, trackNewline = new ContextTracker({
|
|
30
30
|
start: false,
|
|
31
|
-
shift(
|
|
32
|
-
return
|
|
31
|
+
shift(g, G) {
|
|
32
|
+
return G == LineComment || G == BlockComment || G == spaces ? g : G == newline;
|
|
33
33
|
},
|
|
34
34
|
strict: false
|
|
35
|
-
}), insertSemicolon = new ExternalTokenizer((
|
|
36
|
-
let { next:
|
|
37
|
-
(
|
|
35
|
+
}), insertSemicolon = new ExternalTokenizer((g, G) => {
|
|
36
|
+
let { next: K } = g;
|
|
37
|
+
(K == braceR || K == -1 || G.context) && g.acceptToken(insertSemi);
|
|
38
38
|
}, {
|
|
39
39
|
contextual: true,
|
|
40
40
|
fallback: true
|
|
41
|
-
}), noSemicolon = new ExternalTokenizer((
|
|
42
|
-
let { next:
|
|
43
|
-
space.indexOf(
|
|
44
|
-
}, { contextual: true }), noSemicolonType = new ExternalTokenizer((
|
|
45
|
-
|
|
46
|
-
}, { contextual: true }), operatorToken = new ExternalTokenizer((
|
|
47
|
-
let { next:
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
let
|
|
52
|
-
|
|
41
|
+
}), noSemicolon = new ExternalTokenizer((g, G) => {
|
|
42
|
+
let { next: K } = g, q;
|
|
43
|
+
space.indexOf(K) > -1 || K == slash && ((q = g.peek(1)) == slash || q == star) || K != braceR && K != semicolon && K != -1 && !G.context && g.acceptToken(noSemi);
|
|
44
|
+
}, { contextual: true }), noSemicolonType = new ExternalTokenizer((g, G) => {
|
|
45
|
+
g.next == bracketL && !G.context && g.acceptToken(noSemiType);
|
|
46
|
+
}, { contextual: true }), operatorToken = new ExternalTokenizer((g, G) => {
|
|
47
|
+
let { next: K } = g;
|
|
48
|
+
if (K == plus || K == minus) {
|
|
49
|
+
if (g.advance(), K == g.next) {
|
|
50
|
+
g.advance();
|
|
51
|
+
let K2 = !G.context && G.canShift(incdec);
|
|
52
|
+
g.acceptToken(K2 ? incdec : incdecPrefix);
|
|
53
53
|
}
|
|
54
|
-
} else
|
|
54
|
+
} else K == question && g.peek(1) == dot && (g.advance(), g.advance(), (g.next < 48 || g.next > 57) && g.acceptToken(questionDot));
|
|
55
55
|
}, { contextual: true });
|
|
56
|
-
function identifierChar(
|
|
57
|
-
return
|
|
56
|
+
function identifierChar(g, G) {
|
|
57
|
+
return g >= 65 && g <= 90 || g >= 97 && g <= 122 || g == 95 || g >= 192 || !G && g >= 48 && g <= 57;
|
|
58
58
|
}
|
|
59
|
-
var jsx = new ExternalTokenizer((
|
|
60
|
-
if (
|
|
61
|
-
let
|
|
62
|
-
for (; space.indexOf(
|
|
63
|
-
if (identifierChar(
|
|
64
|
-
for (
|
|
65
|
-
for (; space.indexOf(
|
|
66
|
-
if (
|
|
67
|
-
for (let
|
|
68
|
-
if (
|
|
69
|
-
if (!identifierChar(
|
|
59
|
+
var jsx = new ExternalTokenizer((g, G) => {
|
|
60
|
+
if (g.next != lt || !G.dialectEnabled(Dialect_jsx) || (g.advance(), g.next == slash)) return;
|
|
61
|
+
let K = 0;
|
|
62
|
+
for (; space.indexOf(g.next) > -1; ) g.advance(), K++;
|
|
63
|
+
if (identifierChar(g.next, true)) {
|
|
64
|
+
for (g.advance(), K++; identifierChar(g.next, false); ) g.advance(), K++;
|
|
65
|
+
for (; space.indexOf(g.next) > -1; ) g.advance(), K++;
|
|
66
|
+
if (g.next == comma) return;
|
|
67
|
+
for (let G2 = 0; ; G2++) {
|
|
68
|
+
if (G2 == 7) {
|
|
69
|
+
if (!identifierChar(g.next, true)) return;
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
|
|
72
|
+
if (g.next != "extends".charCodeAt(G2)) break;
|
|
73
|
+
g.advance(), K++;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
g.acceptToken(JSXStartTag, -K);
|
|
77
77
|
}), jsHighlight = styleTags({
|
|
78
78
|
"get set async static": tags.modifier,
|
|
79
79
|
"for while do if else switch try catch finally return throw break continue default case": tags.controlKeyword,
|
|
@@ -416,15 +416,15 @@ var jsx = new ExternalTokenizer((_, K) => {
|
|
|
416
416
|
specialized: [
|
|
417
417
|
{
|
|
418
418
|
term: 326,
|
|
419
|
-
get: (
|
|
419
|
+
get: (g) => spec_identifier[g] || -1
|
|
420
420
|
},
|
|
421
421
|
{
|
|
422
422
|
term: 342,
|
|
423
|
-
get: (
|
|
423
|
+
get: (g) => spec_word[g] || -1
|
|
424
424
|
},
|
|
425
425
|
{
|
|
426
426
|
term: 95,
|
|
427
|
-
get: (
|
|
427
|
+
get: (g) => spec_LessThan[g] || -1
|
|
428
428
|
}
|
|
429
429
|
],
|
|
430
430
|
tokenPrec: 15124
|
|
@@ -509,10 +509,10 @@ var jsx = new ExternalTokenizer((_, K) => {
|
|
|
509
509
|
"MethodDeclaration",
|
|
510
510
|
"ForStatement"
|
|
511
511
|
]);
|
|
512
|
-
function defID(
|
|
513
|
-
return (
|
|
514
|
-
let
|
|
515
|
-
return
|
|
512
|
+
function defID(g) {
|
|
513
|
+
return (G, K) => {
|
|
514
|
+
let q = G.node.getChild("VariableDefinition");
|
|
515
|
+
return q && K(q, g), true;
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
var functionContext = ["FunctionDeclaration"], gatherCompletions = {
|
|
@@ -522,35 +522,35 @@ var functionContext = ["FunctionDeclaration"], gatherCompletions = {
|
|
|
522
522
|
EnumDeclaration: /* @__PURE__ */ defID("constant"),
|
|
523
523
|
TypeAliasDeclaration: /* @__PURE__ */ defID("type"),
|
|
524
524
|
NamespaceDeclaration: /* @__PURE__ */ defID("namespace"),
|
|
525
|
-
VariableDefinition(
|
|
526
|
-
|
|
525
|
+
VariableDefinition(g, G) {
|
|
526
|
+
g.matchContext(functionContext) || G(g, "variable");
|
|
527
527
|
},
|
|
528
|
-
TypeDefinition(
|
|
529
|
-
|
|
528
|
+
TypeDefinition(g, G) {
|
|
529
|
+
G(g, "type");
|
|
530
530
|
},
|
|
531
531
|
__proto__: null
|
|
532
532
|
};
|
|
533
|
-
function getScope(
|
|
534
|
-
let
|
|
535
|
-
if (
|
|
536
|
-
let
|
|
537
|
-
function
|
|
538
|
-
let
|
|
539
|
-
|
|
540
|
-
label:
|
|
541
|
-
type:
|
|
533
|
+
function getScope(g, G) {
|
|
534
|
+
let K = cache.get(G);
|
|
535
|
+
if (K) return K;
|
|
536
|
+
let q = [], J = true;
|
|
537
|
+
function Y(G2, K2) {
|
|
538
|
+
let J2 = g.sliceString(G2.from, G2.to);
|
|
539
|
+
q.push({
|
|
540
|
+
label: J2,
|
|
541
|
+
type: K2
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
return
|
|
545
|
-
if (
|
|
546
|
-
else if (
|
|
547
|
-
let
|
|
548
|
-
if (
|
|
549
|
-
} else if (
|
|
550
|
-
for (let
|
|
544
|
+
return G.cursor(IterMode.IncludeAnonymous).iterate((G2) => {
|
|
545
|
+
if (J) J = false;
|
|
546
|
+
else if (G2.name) {
|
|
547
|
+
let g2 = gatherCompletions[G2.name];
|
|
548
|
+
if (g2 && g2(G2, Y) || ScopeNodes.has(G2.name)) return false;
|
|
549
|
+
} else if (G2.to - G2.from > 8192) {
|
|
550
|
+
for (let K2 of getScope(g, G2.node)) q.push(K2);
|
|
551
551
|
return false;
|
|
552
552
|
}
|
|
553
|
-
}), cache.set(
|
|
553
|
+
}), cache.set(G, q), q;
|
|
554
554
|
}
|
|
555
555
|
var Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, dontComplete = [
|
|
556
556
|
"TemplateString",
|
|
@@ -573,16 +573,16 @@ var Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, dontComplete = [
|
|
|
573
573
|
".",
|
|
574
574
|
"?."
|
|
575
575
|
];
|
|
576
|
-
function localCompletionSource(
|
|
577
|
-
let
|
|
578
|
-
if (dontComplete.indexOf(
|
|
579
|
-
let
|
|
580
|
-
if (!
|
|
581
|
-
let
|
|
582
|
-
for (let
|
|
576
|
+
function localCompletionSource(g) {
|
|
577
|
+
let G = syntaxTree(g.state).resolveInner(g.pos, -1);
|
|
578
|
+
if (dontComplete.indexOf(G.name) > -1) return null;
|
|
579
|
+
let K = G.name == "VariableName" || G.to - G.from < 20 && Identifier.test(g.state.sliceDoc(G.from, G.to));
|
|
580
|
+
if (!K && !g.explicit) return null;
|
|
581
|
+
let J = [];
|
|
582
|
+
for (let K2 = G; K2; K2 = K2.parent) ScopeNodes.has(K2.name) && (J = J.concat(getScope(g.state.doc, K2)));
|
|
583
583
|
return {
|
|
584
|
-
options:
|
|
585
|
-
from:
|
|
584
|
+
options: J,
|
|
585
|
+
from: K ? G.from : g.pos,
|
|
586
586
|
validFor: Identifier
|
|
587
587
|
};
|
|
588
588
|
}
|
|
@@ -592,31 +592,31 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
|
|
|
592
592
|
IfStatement: /* @__PURE__ */ continuedIndent({ except: /^\s*({|else\b)/ }),
|
|
593
593
|
TryStatement: /* @__PURE__ */ continuedIndent({ except: /^\s*({|catch\b|finally\b)/ }),
|
|
594
594
|
LabeledStatement: flatIndent,
|
|
595
|
-
SwitchBody: (
|
|
596
|
-
let
|
|
597
|
-
return
|
|
595
|
+
SwitchBody: (g) => {
|
|
596
|
+
let G = g.textAfter, K = /^\s*\}/.test(G), q = /^\s*(case|default)\b/.test(G);
|
|
597
|
+
return g.baseIndent + (K ? 0 : q ? 1 : 2) * g.unit;
|
|
598
598
|
},
|
|
599
599
|
Block: /* @__PURE__ */ delimitedIndent({ closing: "}" }),
|
|
600
|
-
ArrowFunction: (
|
|
600
|
+
ArrowFunction: (g) => g.baseIndent + g.unit,
|
|
601
601
|
"TemplateString BlockComment": () => null,
|
|
602
602
|
"Statement Property": /* @__PURE__ */ continuedIndent({ except: /^\s*{/ }),
|
|
603
|
-
JSXElement(
|
|
604
|
-
let
|
|
605
|
-
return
|
|
603
|
+
JSXElement(g) {
|
|
604
|
+
let G = /^\s*<\//.test(g.textAfter);
|
|
605
|
+
return g.lineIndent(g.node.from) + (G ? 0 : g.unit);
|
|
606
606
|
},
|
|
607
|
-
JSXEscape(
|
|
608
|
-
let
|
|
609
|
-
return
|
|
607
|
+
JSXEscape(g) {
|
|
608
|
+
let G = /\s*\}/.test(g.textAfter);
|
|
609
|
+
return g.lineIndent(g.node.from) + (G ? 0 : g.unit);
|
|
610
610
|
},
|
|
611
|
-
"JSXOpenTag JSXSelfClosingTag"(
|
|
612
|
-
return
|
|
611
|
+
"JSXOpenTag JSXSelfClosingTag"(g) {
|
|
612
|
+
return g.column(g.node.from) + g.unit;
|
|
613
613
|
}
|
|
614
614
|
}), /* @__PURE__ */ foldNodeProp.add({
|
|
615
615
|
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": foldInside,
|
|
616
|
-
BlockComment(
|
|
616
|
+
BlockComment(g) {
|
|
617
617
|
return {
|
|
618
|
-
from:
|
|
619
|
-
to:
|
|
618
|
+
from: g.from + 2,
|
|
619
|
+
to: g.to - 2
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
622
|
})] }),
|
|
@@ -640,19 +640,19 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
|
|
|
640
640
|
wordChars: "$"
|
|
641
641
|
}
|
|
642
642
|
}), jsxSublanguage = {
|
|
643
|
-
test: (
|
|
643
|
+
test: (g) => /^JSX/.test(g.name),
|
|
644
644
|
facet: /* @__PURE__ */ defineLanguageFacet({ commentTokens: { block: {
|
|
645
645
|
open: "{/*",
|
|
646
646
|
close: "*/}"
|
|
647
647
|
} } })
|
|
648
648
|
}, typescriptLanguage = /* @__PURE__ */ javascriptLanguage.configure({ dialect: "ts" }, "typescript"), jsxLanguage = /* @__PURE__ */ javascriptLanguage.configure({
|
|
649
649
|
dialect: "jsx",
|
|
650
|
-
props: [/* @__PURE__ */ sublanguageProp.add((
|
|
650
|
+
props: [/* @__PURE__ */ sublanguageProp.add((g) => g.isTop ? [jsxSublanguage] : void 0)]
|
|
651
651
|
}), tsxLanguage = /* @__PURE__ */ javascriptLanguage.configure({
|
|
652
652
|
dialect: "jsx ts",
|
|
653
|
-
props: [/* @__PURE__ */ sublanguageProp.add((
|
|
654
|
-
}, "typescript"), kwCompletion = (
|
|
655
|
-
label:
|
|
653
|
+
props: [/* @__PURE__ */ sublanguageProp.add((g) => g.isTop ? [jsxSublanguage] : void 0)]
|
|
654
|
+
}, "typescript"), kwCompletion = (g) => ({
|
|
655
|
+
label: g,
|
|
656
656
|
type: "keyword"
|
|
657
657
|
}), keywords = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(kwCompletion), typescriptKeywords = /* @__PURE__ */ keywords.concat(/* @__PURE__ */ [
|
|
658
658
|
"declare",
|
|
@@ -661,54 +661,54 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
|
|
|
661
661
|
"protected",
|
|
662
662
|
"public"
|
|
663
663
|
].map(kwCompletion));
|
|
664
|
-
function javascript(
|
|
665
|
-
let
|
|
666
|
-
return new LanguageSupport(
|
|
667
|
-
javascriptLanguage.data.of({ autocomplete: ifNotIn(dontComplete, completeFromList(
|
|
664
|
+
function javascript(g = {}) {
|
|
665
|
+
let G = g.jsx ? g.typescript ? tsxLanguage : jsxLanguage : g.typescript ? typescriptLanguage : javascriptLanguage, K = g.typescript ? typescriptSnippets.concat(typescriptKeywords) : snippets.concat(keywords);
|
|
666
|
+
return new LanguageSupport(G, [
|
|
667
|
+
javascriptLanguage.data.of({ autocomplete: ifNotIn(dontComplete, completeFromList(K)) }),
|
|
668
668
|
javascriptLanguage.data.of({ autocomplete: localCompletionSource }),
|
|
669
|
-
|
|
669
|
+
g.jsx ? autoCloseTags : []
|
|
670
670
|
]);
|
|
671
671
|
}
|
|
672
|
-
function findOpenTag(
|
|
672
|
+
function findOpenTag(g) {
|
|
673
673
|
for (; ; ) {
|
|
674
|
-
if (
|
|
675
|
-
if (
|
|
676
|
-
|
|
674
|
+
if (g.name == "JSXOpenTag" || g.name == "JSXSelfClosingTag" || g.name == "JSXFragmentTag") return g;
|
|
675
|
+
if (g.name == "JSXEscape" || !g.parent) return null;
|
|
676
|
+
g = g.parent;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
function elementName(
|
|
680
|
-
for (let
|
|
679
|
+
function elementName(g, G, K = g.length) {
|
|
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((
|
|
684
|
-
if ((android ?
|
|
685
|
-
let Z = X(), { state: Q } = Z, $ = Q.changeByRange((
|
|
683
|
+
var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g, K, J, Y, X) => {
|
|
684
|
+
if ((android ? g.composing : g.compositionStarted) || g.state.readOnly || K != J || Y != ">" && Y != "/" || !javascriptLanguage.isActiveAt(g.state, K, -1)) return false;
|
|
685
|
+
let Z = X(), { state: Q } = Z, $ = Q.changeByRange((g2) => {
|
|
686
686
|
var _a;
|
|
687
|
-
let { head: K2 } =
|
|
687
|
+
let { head: K2 } = g2, J2 = syntaxTree(Q).resolveInner(K2 - 1, -1), X2;
|
|
688
688
|
if (J2.name == "JSXStartTag" && (J2 = J2.parent), !(Q.doc.sliceString(K2 - 1, K2) != Y || J2.name == "JSXAttributeValue" && J2.to > K2)) {
|
|
689
689
|
if (Y == ">" && J2.name == "JSXFragmentTag") return {
|
|
690
|
-
range:
|
|
690
|
+
range: g2,
|
|
691
691
|
changes: {
|
|
692
692
|
from: K2,
|
|
693
693
|
insert: "</>"
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
if (Y == "/" && J2.name == "JSXStartCloseTag") {
|
|
697
|
-
let
|
|
698
|
-
if (q &&
|
|
699
|
-
let
|
|
697
|
+
let g3 = J2.parent, q = g3.parent;
|
|
698
|
+
if (q && g3.from == K2 - 2 && ((X2 = elementName(Q.doc, q.firstChild, K2)) || ((_a = q.firstChild) == null ? void 0 : _a.name) == "JSXFragmentTag")) {
|
|
699
|
+
let g4 = `${X2}>`;
|
|
700
700
|
return {
|
|
701
|
-
range: EditorSelection.cursor(K2 +
|
|
701
|
+
range: EditorSelection.cursor(K2 + g4.length, -1),
|
|
702
702
|
changes: {
|
|
703
703
|
from: K2,
|
|
704
|
-
insert:
|
|
704
|
+
insert: g4
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
707
|
}
|
|
708
708
|
} else if (Y == ">") {
|
|
709
|
-
let
|
|
710
|
-
if (
|
|
711
|
-
range:
|
|
709
|
+
let G = findOpenTag(J2);
|
|
710
|
+
if (G && G.name == "JSXOpenTag" && !/^\/?>|^<\//.test(Q.doc.sliceString(K2, K2 + 2)) && (X2 = elementName(Q.doc, G, K2))) return {
|
|
711
|
+
range: g2,
|
|
712
712
|
changes: {
|
|
713
713
|
from: K2,
|
|
714
714
|
insert: `</${X2}>`
|
|
@@ -716,9 +716,9 @@ var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(n
|
|
|
716
716
|
};
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
return { range:
|
|
719
|
+
return { range: g2 };
|
|
720
720
|
});
|
|
721
|
-
return $.changes.empty ? false : (
|
|
721
|
+
return $.changes.empty ? false : (g.dispatch([Z, Q.update($, {
|
|
722
722
|
userEvent: "input.complete",
|
|
723
723
|
scrollIntoView: true
|
|
724
724
|
})]), true);
|