@oomol-lab/open-flow 0.1.0-beta.10 → 0.1.0-beta.12
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/browser/DesignerIcon-ckcKnxxJ.js +2267 -0
- package/dist/browser/createResourceDialog-2pESP2wA.js +111 -0
- package/dist/browser/{dist-meg_oHVR.js → dist-BZ5PTFAs.js} +335 -335
- package/dist/browser/dist-Bmb2mZvW.js +795 -0
- package/dist/browser/{dist-Cc0y2Pli.js → dist-Ce71Szg7.js} +622 -622
- package/dist/browser/dist-DSe6KRsr.js +1224 -0
- package/dist/browser/{dist-Dg_VXC8f.js → dist-DY4qlXTK.js} +134 -134
- package/dist/browser/{esm-yhVU_KbQ.js → esm-BPZ0P6x4.js} +59 -59
- package/dist/browser/flow-authoring-node.d.ts +11 -4
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +5032 -275
- package/dist/browser/flow-change-schema.d.ts +6 -0
- package/dist/browser/flow-change.d.ts +21 -8
- package/dist/browser/flow-change.js +5048 -155
- package/dist/browser/{flowChanges-B2ttnaj9.js → flowChanges-CHPdBmZb.js} +4433 -3786
- package/dist/browser/{flowRunInputEditorStore-DDidwd8h.js → flowRunInputEditorStore-NPGePkvP.js} +679 -689
- package/dist/browser/flowWorkspace-BLGcgnHj.js +158418 -0
- package/dist/browser/{getPseudoElementBounds-5LArT6Xc.js → getPseudoElementBounds-Dfqo78k7.js} +691 -687
- package/dist/browser/host-conformance.d.ts +7 -0
- package/dist/browser/host-conformance.js +33 -0
- package/dist/browser/{languages-DgJehE1g.js → languages-i3Xmpt6S.js} +6 -15
- package/dist/browser/licenses.md +82 -0
- package/dist/browser/{markdownContent-DUfLdnUt.js → markdownContent-BawLYUjh.js} +23 -23
- package/dist/browser/select-Dn3vpjGC.js +6872 -0
- package/dist/browser/theme.css +34 -34
- package/dist/browser/{typeScriptSession-_TgJ_7Oq.js → typeScriptSession-BoV-FDl3.js} +257 -257
- package/dist/browser/waitNotificationInputs-BFbQUOyp.js +29 -0
- package/dist/browser/workbench-contract.d.ts +8 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +1277 -1021
- package/dist/browser/workbenchSelect-DzF8oik9.js +435 -0
- package/dist/common/control-api-conformance.d.ts +6 -0
- package/dist/common/control-api-conformance.js +300 -85
- package/dist/common/control-api.d.ts +37 -10
- package/dist/common/control-api.js +5199 -437
- package/dist/common/control-requests.d.ts +68 -0
- package/dist/common/control-requests.js +4913 -0
- package/dist/common/engine-contract.d.ts +1 -1
- package/dist/common/flow-encoding.d.ts +3 -1
- package/dist/common/flow-encoding.js +4761 -63
- package/dist/common/flow-graph.d.ts +6 -0
- package/dist/common/flow-json.d.ts +2 -0
- package/dist/common/flow-modules.d.ts +20 -0
- package/dist/common/flow-schema.d.ts +8 -0
- package/dist/common/flow-semantics.d.ts +6 -5
- package/dist/common/flow-semantics.js +14641 -9800
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/mcp-conformance.d.ts +2 -0
- package/dist/common/mcp.d.ts +545 -0
- package/dist/common/mcp.js +4964 -0
- package/dist/common/run-events.d.ts +2 -2
- package/dist/common/run-events.js +8 -15
- package/dist/common/runtime-contract.d.ts +9 -1
- package/dist/common/runtime-contract.js +137 -27
- package/dist/common/scheduler.d.ts +11 -33
- package/dist/common/scheduler.js +7241 -428
- package/dist/index.d.ts +5 -5
- package/package.json +13 -1
- package/dist/browser/DesignerIcon-DjgOMYI5.js +0 -2065
- package/dist/browser/createResourceDialog-DNBueSYZ.js +0 -505
- package/dist/browser/dist-BMRLCebL.js +0 -1893
- package/dist/browser/flowWorkspace-Dr8-Hut9.js +0 -45541
- package/dist/browser/icons-KIOgjHpD.js +0 -730
- package/dist/browser/waitNotificationInputs-BPulOxYt.js +0 -26
- package/dist/browser/workbenchSelect-CbXrdwxW.js +0 -1375
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-CEFd7nDs.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import { r as
|
|
6
|
-
import { a as
|
|
2
|
+
import { a as t } from "./dist-Mecbzdl2.js";
|
|
3
|
+
import { r as n } from "./dist-BKuSVKCC.js";
|
|
4
|
+
import { A as r, C as i, F as a, H as o, I as s, M as c, R as l, f as ee, g as te, m as ne, o as re, p as ie, r as ae, u, v as d } from "./dist-DxahK_I8.js";
|
|
5
|
+
import { i as f, n as p, r as oe, t as se } from "./dist-By46o5UV.js";
|
|
6
|
+
import { a as ce, s as le, u as m } from "./dist-BZ5PTFAs.js";
|
|
7
7
|
//#region ../../node_modules/.bun/@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js
|
|
8
|
-
var
|
|
8
|
+
var ue = 316, de = 317, h = 1, fe = 2, pe = 3, me = 4, he = 318, ge = 320, _e = 321, ve = 5, ye = 6, be = 0, g = [
|
|
9
9
|
9,
|
|
10
10
|
10,
|
|
11
11
|
11,
|
|
@@ -31,43 +31,43 @@ var de = 316, fe = 317, m = 1, pe = 2, me = 3, he = 4, ge = 318, _e = 320, ve =
|
|
|
31
31
|
8239,
|
|
32
32
|
8287,
|
|
33
33
|
12288
|
|
34
|
-
],
|
|
34
|
+
], _ = 125, xe = 59, v = 47, Se = 42, Ce = 43, y = 45, b = 60, x = 44, S = 63, C = 46, w = 91, T = new se({
|
|
35
35
|
start: !1,
|
|
36
36
|
shift(e, t) {
|
|
37
|
-
return t ==
|
|
37
|
+
return t == ve || t == ye || t == ge ? e : t == _e;
|
|
38
38
|
},
|
|
39
39
|
strict: !1
|
|
40
|
-
}), E = new
|
|
40
|
+
}), E = new p((e, t) => {
|
|
41
41
|
let { next: n } = e;
|
|
42
|
-
(n ==
|
|
42
|
+
(n == _ || n == -1 || t.context) && e.acceptToken(he);
|
|
43
43
|
}, {
|
|
44
44
|
contextual: !0,
|
|
45
45
|
fallback: !0
|
|
46
|
-
}), D = new
|
|
46
|
+
}), D = new p((e, t) => {
|
|
47
47
|
let { next: n } = e, r;
|
|
48
|
-
|
|
49
|
-
}, { contextual: !0 }), O = new
|
|
50
|
-
e.next == w && !t.context && e.acceptToken(
|
|
51
|
-
}, { contextual: !0 }), k = new
|
|
48
|
+
g.indexOf(n) > -1 || (n != v || (r = e.peek(1)) != v && r != Se) && n != _ && n != xe && n != -1 && !t.context && e.acceptToken(ue);
|
|
49
|
+
}, { contextual: !0 }), O = new p((e, t) => {
|
|
50
|
+
e.next == w && !t.context && e.acceptToken(de);
|
|
51
|
+
}, { contextual: !0 }), k = new p((e, t) => {
|
|
52
52
|
let { next: n } = e;
|
|
53
|
-
if (n ==
|
|
53
|
+
if (n == Ce || n == y) {
|
|
54
54
|
if (e.advance(), n == e.next) {
|
|
55
55
|
e.advance();
|
|
56
|
-
let n = !t.context && t.canShift(
|
|
57
|
-
e.acceptToken(n ?
|
|
56
|
+
let n = !t.context && t.canShift(h);
|
|
57
|
+
e.acceptToken(n ? h : fe);
|
|
58
58
|
}
|
|
59
|
-
} else n == S && e.peek(1) == C && (e.advance(), e.advance(), (e.next < 48 || e.next > 57) && e.acceptToken(
|
|
59
|
+
} else n == S && e.peek(1) == C && (e.advance(), e.advance(), (e.next < 48 || e.next > 57) && e.acceptToken(pe));
|
|
60
60
|
}, { contextual: !0 });
|
|
61
61
|
function A(e, t) {
|
|
62
62
|
return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e == 95 || e >= 192 || !t && e >= 48 && e <= 57;
|
|
63
63
|
}
|
|
64
|
-
var we = new
|
|
65
|
-
if (e.next != b || !t.dialectEnabled(
|
|
64
|
+
var we = new p((e, t) => {
|
|
65
|
+
if (e.next != b || !t.dialectEnabled(be) || (e.advance(), e.next == v)) return;
|
|
66
66
|
let n = 0;
|
|
67
|
-
for (;
|
|
67
|
+
for (; g.indexOf(e.next) > -1;) e.advance(), n++;
|
|
68
68
|
if (A(e.next, !0)) {
|
|
69
69
|
for (e.advance(), n++; A(e.next, !1);) e.advance(), n++;
|
|
70
|
-
for (;
|
|
70
|
+
for (; g.indexOf(e.next) > -1;) e.advance(), n++;
|
|
71
71
|
if (e.next == x) return;
|
|
72
72
|
for (let t = 0;; t++) {
|
|
73
73
|
if (t == 7) {
|
|
@@ -78,64 +78,64 @@ var we = new d((e, t) => {
|
|
|
78
78
|
e.advance(), n++;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
e.acceptToken(
|
|
82
|
-
}), Te =
|
|
83
|
-
"get set async static":
|
|
84
|
-
"for while do if else switch try catch finally return throw break continue default case defer":
|
|
85
|
-
"in of await yield void typeof delete instanceof as satisfies":
|
|
86
|
-
"let var const using function class extends":
|
|
87
|
-
"import export from":
|
|
88
|
-
"with debugger new":
|
|
89
|
-
TemplateString:
|
|
90
|
-
super:
|
|
91
|
-
BooleanLiteral:
|
|
92
|
-
this:
|
|
93
|
-
null:
|
|
94
|
-
Star:
|
|
95
|
-
VariableName:
|
|
96
|
-
"CallExpression/VariableName TaggedTemplateExpression/VariableName":
|
|
97
|
-
VariableDefinition:
|
|
98
|
-
Label:
|
|
99
|
-
PropertyName:
|
|
100
|
-
PrivatePropertyName:
|
|
101
|
-
"CallExpression/MemberExpression/PropertyName":
|
|
102
|
-
"FunctionDeclaration/VariableDefinition":
|
|
103
|
-
"ClassDeclaration/VariableDefinition":
|
|
104
|
-
"NewExpression/VariableName":
|
|
105
|
-
PropertyDefinition:
|
|
106
|
-
PrivatePropertyDefinition:
|
|
107
|
-
UpdateOp:
|
|
108
|
-
"LineComment Hashbang":
|
|
109
|
-
BlockComment:
|
|
110
|
-
Number:
|
|
111
|
-
String:
|
|
112
|
-
Escape:
|
|
113
|
-
ArithOp:
|
|
114
|
-
LogicOp:
|
|
115
|
-
BitOp:
|
|
116
|
-
CompareOp:
|
|
117
|
-
RegExp:
|
|
118
|
-
Equals:
|
|
119
|
-
Arrow:
|
|
120
|
-
": Spread":
|
|
121
|
-
"( )":
|
|
122
|
-
"[ ]":
|
|
123
|
-
"{ }":
|
|
124
|
-
"InterpolationStart InterpolationEnd":
|
|
125
|
-
".":
|
|
126
|
-
", ;":
|
|
127
|
-
"@":
|
|
128
|
-
TypeName:
|
|
129
|
-
TypeDefinition:
|
|
130
|
-
"type enum interface implements namespace module declare":
|
|
131
|
-
"abstract global Privacy readonly override":
|
|
132
|
-
"is keyof unique infer asserts":
|
|
133
|
-
JSXAttributeValue:
|
|
134
|
-
JSXText:
|
|
135
|
-
"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":
|
|
136
|
-
"JSXIdentifier JSXNameSpacedName":
|
|
137
|
-
"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":
|
|
138
|
-
"JSXBuiltin/JSXIdentifier":
|
|
81
|
+
e.acceptToken(me, -n);
|
|
82
|
+
}), Te = a({
|
|
83
|
+
"get set async static": s.modifier,
|
|
84
|
+
"for while do if else switch try catch finally return throw break continue default case defer": s.controlKeyword,
|
|
85
|
+
"in of await yield void typeof delete instanceof as satisfies": s.operatorKeyword,
|
|
86
|
+
"let var const using function class extends": s.definitionKeyword,
|
|
87
|
+
"import export from": s.moduleKeyword,
|
|
88
|
+
"with debugger new": s.keyword,
|
|
89
|
+
TemplateString: s.special(s.string),
|
|
90
|
+
super: s.atom,
|
|
91
|
+
BooleanLiteral: s.bool,
|
|
92
|
+
this: s.self,
|
|
93
|
+
null: s.null,
|
|
94
|
+
Star: s.modifier,
|
|
95
|
+
VariableName: s.variableName,
|
|
96
|
+
"CallExpression/VariableName TaggedTemplateExpression/VariableName": s.function(s.variableName),
|
|
97
|
+
VariableDefinition: s.definition(s.variableName),
|
|
98
|
+
Label: s.labelName,
|
|
99
|
+
PropertyName: s.propertyName,
|
|
100
|
+
PrivatePropertyName: s.special(s.propertyName),
|
|
101
|
+
"CallExpression/MemberExpression/PropertyName": s.function(s.propertyName),
|
|
102
|
+
"FunctionDeclaration/VariableDefinition": s.function(s.definition(s.variableName)),
|
|
103
|
+
"ClassDeclaration/VariableDefinition": s.definition(s.className),
|
|
104
|
+
"NewExpression/VariableName": s.className,
|
|
105
|
+
PropertyDefinition: s.definition(s.propertyName),
|
|
106
|
+
PrivatePropertyDefinition: s.definition(s.special(s.propertyName)),
|
|
107
|
+
UpdateOp: s.updateOperator,
|
|
108
|
+
"LineComment Hashbang": s.lineComment,
|
|
109
|
+
BlockComment: s.blockComment,
|
|
110
|
+
Number: s.number,
|
|
111
|
+
String: s.string,
|
|
112
|
+
Escape: s.escape,
|
|
113
|
+
ArithOp: s.arithmeticOperator,
|
|
114
|
+
LogicOp: s.logicOperator,
|
|
115
|
+
BitOp: s.bitwiseOperator,
|
|
116
|
+
CompareOp: s.compareOperator,
|
|
117
|
+
RegExp: s.regexp,
|
|
118
|
+
Equals: s.definitionOperator,
|
|
119
|
+
Arrow: s.function(s.punctuation),
|
|
120
|
+
": Spread": s.punctuation,
|
|
121
|
+
"( )": s.paren,
|
|
122
|
+
"[ ]": s.squareBracket,
|
|
123
|
+
"{ }": s.brace,
|
|
124
|
+
"InterpolationStart InterpolationEnd": s.special(s.brace),
|
|
125
|
+
".": s.derefOperator,
|
|
126
|
+
", ;": s.separator,
|
|
127
|
+
"@": s.meta,
|
|
128
|
+
TypeName: s.typeName,
|
|
129
|
+
TypeDefinition: s.definition(s.typeName),
|
|
130
|
+
"type enum interface implements namespace module declare": s.definitionKeyword,
|
|
131
|
+
"abstract global Privacy readonly override": s.modifier,
|
|
132
|
+
"is keyof unique infer asserts": s.operatorKeyword,
|
|
133
|
+
JSXAttributeValue: s.attributeValue,
|
|
134
|
+
JSXText: s.content,
|
|
135
|
+
"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag": s.angleBracket,
|
|
136
|
+
"JSXIdentifier JSXNameSpacedName": s.tagName,
|
|
137
|
+
"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName": s.attributeName,
|
|
138
|
+
"JSXBuiltin/JSXIdentifier": s.standard(s.tagName)
|
|
139
139
|
}), j = {
|
|
140
140
|
__proto__: null,
|
|
141
141
|
export: 20,
|
|
@@ -400,8 +400,8 @@ var we = new d((e, t) => {
|
|
|
400
400
|
13,
|
|
401
401
|
14,
|
|
402
402
|
E,
|
|
403
|
-
new
|
|
404
|
-
new
|
|
403
|
+
new f("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~", 141, 340),
|
|
404
|
+
new f("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~", 25, 323)
|
|
405
405
|
],
|
|
406
406
|
topRules: {
|
|
407
407
|
Script: [0, 7],
|
|
@@ -448,78 +448,78 @@ var we = new d((e, t) => {
|
|
|
448
448
|
typescriptLanguage: () => G,
|
|
449
449
|
typescriptSnippets: () => N
|
|
450
450
|
}), M = [
|
|
451
|
-
/*@__PURE__*/
|
|
451
|
+
/*@__PURE__*/ m("function ${name}(${params}) {\n ${}\n}", {
|
|
452
452
|
label: "function",
|
|
453
453
|
detail: "definition",
|
|
454
454
|
type: "keyword"
|
|
455
455
|
}),
|
|
456
|
-
/*@__PURE__*/
|
|
456
|
+
/*@__PURE__*/ m("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}", {
|
|
457
457
|
label: "for",
|
|
458
458
|
detail: "loop",
|
|
459
459
|
type: "keyword"
|
|
460
460
|
}),
|
|
461
|
-
/*@__PURE__*/
|
|
461
|
+
/*@__PURE__*/ m("for (let ${name} of ${collection}) {\n ${}\n}", {
|
|
462
462
|
label: "for",
|
|
463
463
|
detail: "of loop",
|
|
464
464
|
type: "keyword"
|
|
465
465
|
}),
|
|
466
|
-
/*@__PURE__*/
|
|
466
|
+
/*@__PURE__*/ m("do {\n ${}\n} while (${})", {
|
|
467
467
|
label: "do",
|
|
468
468
|
detail: "loop",
|
|
469
469
|
type: "keyword"
|
|
470
470
|
}),
|
|
471
|
-
/*@__PURE__*/
|
|
471
|
+
/*@__PURE__*/ m("while (${}) {\n ${}\n}", {
|
|
472
472
|
label: "while",
|
|
473
473
|
detail: "loop",
|
|
474
474
|
type: "keyword"
|
|
475
475
|
}),
|
|
476
|
-
/*@__PURE__*/
|
|
476
|
+
/*@__PURE__*/ m("try {\n ${}\n} catch (${error}) {\n ${}\n}", {
|
|
477
477
|
label: "try",
|
|
478
478
|
detail: "/ catch block",
|
|
479
479
|
type: "keyword"
|
|
480
480
|
}),
|
|
481
|
-
/*@__PURE__*/
|
|
481
|
+
/*@__PURE__*/ m("if (${}) {\n ${}\n}", {
|
|
482
482
|
label: "if",
|
|
483
483
|
detail: "block",
|
|
484
484
|
type: "keyword"
|
|
485
485
|
}),
|
|
486
|
-
/*@__PURE__*/
|
|
486
|
+
/*@__PURE__*/ m("if (${}) {\n ${}\n} else {\n ${}\n}", {
|
|
487
487
|
label: "if",
|
|
488
488
|
detail: "/ else block",
|
|
489
489
|
type: "keyword"
|
|
490
490
|
}),
|
|
491
|
-
/*@__PURE__*/
|
|
491
|
+
/*@__PURE__*/ m("class ${name} {\n constructor(${params}) {\n ${}\n }\n}", {
|
|
492
492
|
label: "class",
|
|
493
493
|
detail: "definition",
|
|
494
494
|
type: "keyword"
|
|
495
495
|
}),
|
|
496
|
-
/*@__PURE__*/
|
|
496
|
+
/*@__PURE__*/ m("import {${names}} from \"${module}\"\n${}", {
|
|
497
497
|
label: "import",
|
|
498
498
|
detail: "named",
|
|
499
499
|
type: "keyword"
|
|
500
500
|
}),
|
|
501
|
-
/*@__PURE__*/
|
|
501
|
+
/*@__PURE__*/ m("import ${name} from \"${module}\"\n${}", {
|
|
502
502
|
label: "import",
|
|
503
503
|
detail: "default",
|
|
504
504
|
type: "keyword"
|
|
505
505
|
})
|
|
506
506
|
], N = /*@__PURE__*/ M.concat([
|
|
507
|
-
/*@__PURE__*/
|
|
507
|
+
/*@__PURE__*/ m("interface ${name} {\n ${}\n}", {
|
|
508
508
|
label: "interface",
|
|
509
509
|
detail: "definition",
|
|
510
510
|
type: "keyword"
|
|
511
511
|
}),
|
|
512
|
-
/*@__PURE__*/
|
|
512
|
+
/*@__PURE__*/ m("type ${name} = ${type}", {
|
|
513
513
|
label: "type",
|
|
514
514
|
detail: "definition",
|
|
515
515
|
type: "keyword"
|
|
516
516
|
}),
|
|
517
|
-
/*@__PURE__*/
|
|
517
|
+
/*@__PURE__*/ m("enum ${name} {\n ${}\n}", {
|
|
518
518
|
label: "enum",
|
|
519
519
|
detail: "definition",
|
|
520
520
|
type: "keyword"
|
|
521
521
|
})
|
|
522
|
-
]), P = /*@__PURE__*/ new
|
|
522
|
+
]), P = /*@__PURE__*/ new o(), F = /*@__PURE__*/ new Set([
|
|
523
523
|
"Script",
|
|
524
524
|
"Block",
|
|
525
525
|
"FunctionExpression",
|
|
@@ -560,7 +560,7 @@ function L(e, t) {
|
|
|
560
560
|
type: n
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
-
return t.cursor(
|
|
563
|
+
return t.cursor(l.IncludeAnonymous).iterate((t) => {
|
|
564
564
|
if (i) i = !1;
|
|
565
565
|
else if (t.name) {
|
|
566
566
|
let e = je[t.name];
|
|
@@ -593,7 +593,7 @@ var R = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, z = [
|
|
|
593
593
|
"?."
|
|
594
594
|
];
|
|
595
595
|
function B(e) {
|
|
596
|
-
let t =
|
|
596
|
+
let t = c(e.state).resolveInner(e.pos, -1);
|
|
597
597
|
if (z.indexOf(t.name) > -1) return null;
|
|
598
598
|
let n = t.name == "VariableName" || t.to - t.from < 20 && R.test(e.state.sliceDoc(t.from, t.to));
|
|
599
599
|
if (!n && !e.explicit) return null;
|
|
@@ -618,7 +618,7 @@ function V(e, t, n) {
|
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
function H(e) {
|
|
621
|
-
let t = (t) => e.state.doc.sliceString(t.from, t.to), n =
|
|
621
|
+
let t = (t) => e.state.doc.sliceString(t.from, t.to), n = c(e.state).resolveInner(e.pos, -1);
|
|
622
622
|
return n.name == "PropertyName" ? V(t, n.parent, t(n)) : (n.name == "." || n.name == "?.") && n.parent.name == "MemberExpression" ? V(t, n.parent, "") : z.indexOf(n.name) > -1 ? null : n.name == "VariableName" || n.to - n.from < 20 && R.test(t(n)) ? {
|
|
623
623
|
path: [],
|
|
624
624
|
name: t(n)
|
|
@@ -665,20 +665,20 @@ function Ne(e) {
|
|
|
665
665
|
};
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
var U = /*@__PURE__*/
|
|
668
|
+
var U = /*@__PURE__*/ ae.define({
|
|
669
669
|
name: "javascript",
|
|
670
|
-
parser: /*@__PURE__*/ Oe.configure({ props: [/*@__PURE__*/
|
|
671
|
-
IfStatement: /*@__PURE__*/
|
|
672
|
-
TryStatement: /*@__PURE__*/
|
|
673
|
-
LabeledStatement:
|
|
670
|
+
parser: /*@__PURE__*/ Oe.configure({ props: [/*@__PURE__*/ i.add({
|
|
671
|
+
IfStatement: /*@__PURE__*/ u({ except: /^\s*({|else\b)/ }),
|
|
672
|
+
TryStatement: /*@__PURE__*/ u({ except: /^\s*({|catch\b|finally\b)/ }),
|
|
673
|
+
LabeledStatement: ne,
|
|
674
674
|
SwitchBody: (e) => {
|
|
675
675
|
let t = e.textAfter, n = /^\s*\}/.test(t), r = /^\s*(case|default)\b/.test(t);
|
|
676
676
|
return e.baseIndent + (n ? 0 : r ? 1 : 2) * e.unit;
|
|
677
677
|
},
|
|
678
|
-
Block: /*@__PURE__*/
|
|
678
|
+
Block: /*@__PURE__*/ ie({ closing: "}" }),
|
|
679
679
|
ArrowFunction: (e) => e.baseIndent + e.unit,
|
|
680
680
|
"TemplateString BlockComment": () => null,
|
|
681
|
-
"Statement Property": /*@__PURE__*/
|
|
681
|
+
"Statement Property": /*@__PURE__*/ u({ except: /^\s*{/ }),
|
|
682
682
|
JSXElement(e) {
|
|
683
683
|
let t = /^\s*<\//.test(e.textAfter);
|
|
684
684
|
return e.lineIndent(e.node.from) + (t ? 0 : e.unit);
|
|
@@ -690,8 +690,8 @@ var U = /*@__PURE__*/ ie.define({
|
|
|
690
690
|
"JSXOpenTag JSXSelfClosingTag"(e) {
|
|
691
691
|
return e.column(e.node.from) + e.unit;
|
|
692
692
|
}
|
|
693
|
-
}), /*@__PURE__*/
|
|
694
|
-
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":
|
|
693
|
+
}), /*@__PURE__*/ d.add({
|
|
694
|
+
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": te,
|
|
695
695
|
BlockComment(e) {
|
|
696
696
|
return {
|
|
697
697
|
from: e.from + 2,
|
|
@@ -736,16 +736,16 @@ var U = /*@__PURE__*/ ie.define({
|
|
|
736
736
|
}
|
|
737
737
|
}), W = {
|
|
738
738
|
test: (e) => /^JSX/.test(e.name),
|
|
739
|
-
facet: /*@__PURE__*/
|
|
739
|
+
facet: /*@__PURE__*/ ee({ commentTokens: { block: {
|
|
740
740
|
open: "{/*",
|
|
741
741
|
close: "*/}"
|
|
742
742
|
} } })
|
|
743
743
|
}, G = /*@__PURE__*/ U.configure({ dialect: "ts" }, "typescript"), K = /*@__PURE__*/ U.configure({
|
|
744
744
|
dialect: "jsx",
|
|
745
|
-
props: [/*@__PURE__*/
|
|
745
|
+
props: [/*@__PURE__*/ r.add((e) => e.isTop ? [W] : void 0)]
|
|
746
746
|
}), q = /*@__PURE__*/ U.configure({
|
|
747
747
|
dialect: "jsx ts",
|
|
748
|
-
props: [/*@__PURE__*/
|
|
748
|
+
props: [/*@__PURE__*/ r.add((e) => e.isTop ? [W] : void 0)]
|
|
749
749
|
}, "typescript"), J = (e) => ({
|
|
750
750
|
label: e,
|
|
751
751
|
type: "keyword"
|
|
@@ -758,8 +758,8 @@ var U = /*@__PURE__*/ ie.define({
|
|
|
758
758
|
].map(J));
|
|
759
759
|
function X(e = {}) {
|
|
760
760
|
let t = e.jsx ? e.typescript ? q : K : e.typescript ? G : U, n = e.typescript ? N.concat(Pe) : M.concat(Y);
|
|
761
|
-
return new
|
|
762
|
-
U.data.of({ autocomplete:
|
|
761
|
+
return new re(t, [
|
|
762
|
+
U.data.of({ autocomplete: le(z, ce(n)) }),
|
|
763
763
|
U.data.of({ autocomplete: B }),
|
|
764
764
|
e.jsx ? Q : []
|
|
765
765
|
]);
|
|
@@ -775,44 +775,44 @@ function Z(e, t, n = e.length) {
|
|
|
775
775
|
for (let r = t?.firstChild; r; r = r.nextSibling) if (r.name == "JSXIdentifier" || r.name == "JSXBuiltin" || r.name == "JSXNamespacedName" || r.name == "JSXMemberExpression") return e.sliceString(r.from, Math.min(r.to, n));
|
|
776
776
|
return "";
|
|
777
777
|
}
|
|
778
|
-
var Ie = typeof navigator == "object" && /*@__PURE__*/ /Android\b/.test(navigator.userAgent), Q = /*@__PURE__*/
|
|
779
|
-
if ((Ie ? e.composing : e.compositionStarted) || e.state.readOnly ||
|
|
780
|
-
let
|
|
781
|
-
let { head:
|
|
782
|
-
if (
|
|
783
|
-
if (
|
|
778
|
+
var Ie = typeof navigator == "object" && /*@__PURE__*/ /Android\b/.test(navigator.userAgent), Q = /*@__PURE__*/ n.inputHandler.of((e, n, r, i, a) => {
|
|
779
|
+
if ((Ie ? e.composing : e.compositionStarted) || e.state.readOnly || n != r || i != ">" && i != "/" || !U.isActiveAt(e.state, n, -1)) return !1;
|
|
780
|
+
let o = a(), { state: s } = o, l = s.changeByRange((e) => {
|
|
781
|
+
let { head: n } = e, r = c(s).resolveInner(n - 1, -1), a;
|
|
782
|
+
if (r.name == "JSXStartTag" && (r = r.parent), !(s.doc.sliceString(n - 1, n) != i || r.name == "JSXAttributeValue" && r.to > n)) {
|
|
783
|
+
if (i == ">" && r.name == "JSXFragmentTag") return {
|
|
784
784
|
range: e,
|
|
785
785
|
changes: {
|
|
786
|
-
from:
|
|
786
|
+
from: n,
|
|
787
787
|
insert: "</>"
|
|
788
788
|
}
|
|
789
789
|
};
|
|
790
|
-
if (
|
|
791
|
-
let e =
|
|
792
|
-
if (
|
|
793
|
-
let e = `${
|
|
790
|
+
if (i == "/" && r.name == "JSXStartCloseTag") {
|
|
791
|
+
let e = r.parent, i = e.parent;
|
|
792
|
+
if (i && e.from == n - 2 && ((a = Z(s.doc, i.firstChild, n)) || i.firstChild?.name == "JSXFragmentTag")) {
|
|
793
|
+
let e = `${a}>`;
|
|
794
794
|
return {
|
|
795
|
-
range:
|
|
795
|
+
range: t.cursor(n + e.length, -1),
|
|
796
796
|
changes: {
|
|
797
|
-
from:
|
|
797
|
+
from: n,
|
|
798
798
|
insert: e
|
|
799
799
|
}
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
} else if (
|
|
803
|
-
let
|
|
804
|
-
if (
|
|
802
|
+
} else if (i == ">") {
|
|
803
|
+
let t = Fe(r);
|
|
804
|
+
if (t && t.name == "JSXOpenTag" && !/^\/?>|^<\//.test(s.doc.sliceString(n, n + 2)) && (a = Z(s.doc, t, n))) return {
|
|
805
805
|
range: e,
|
|
806
806
|
changes: {
|
|
807
|
-
from:
|
|
808
|
-
insert: `</${
|
|
807
|
+
from: n,
|
|
808
|
+
insert: `</${a}>`
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
return { range: e };
|
|
814
814
|
});
|
|
815
|
-
return !
|
|
815
|
+
return !l.changes.empty && (e.dispatch([o, s.update(l, {
|
|
816
816
|
userEvent: "input.complete",
|
|
817
817
|
scrollIntoView: !0
|
|
818
818
|
})]), !0);
|