@gsc-basic/components 1.0.1
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/es/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/es/index.js +35 -0
- package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +1371 -0
- package/dist/es/node_modules/@codemirror/commands/dist/index.js +838 -0
- package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +38 -0
- package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +300 -0
- package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +48 -0
- package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +399 -0
- package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +497 -0
- package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +216 -0
- package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +51 -0
- package/dist/es/node_modules/@codemirror/language/dist/index.js +1299 -0
- package/dist/es/node_modules/@codemirror/lint/dist/index.js +649 -0
- package/dist/es/node_modules/@codemirror/search/dist/index.js +872 -0
- package/dist/es/node_modules/@codemirror/state/dist/index.js +2639 -0
- package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +132 -0
- package/dist/es/node_modules/@codemirror/view/dist/index.js +7280 -0
- package/dist/es/node_modules/@lezer/common/dist/index.js +1430 -0
- package/dist/es/node_modules/@lezer/highlight/dist/index.js +637 -0
- package/dist/es/node_modules/@lezer/java/dist/index.js +62 -0
- package/dist/es/node_modules/@lezer/javascript/dist/index.js +161 -0
- package/dist/es/node_modules/@lezer/json/dist/index.js +34 -0
- package/dist/es/node_modules/@lezer/lr/dist/index.js +1307 -0
- package/dist/es/node_modules/@lezer/python/dist/index.js +221 -0
- package/dist/es/node_modules/@lezer/xml/dist/index.js +100 -0
- package/dist/es/node_modules/@lezer/yaml/dist/index.js +274 -0
- package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +69 -0
- package/dist/es/node_modules/@vueuse/core/dist/index.js +125 -0
- package/dist/es/node_modules/@vueuse/shared/dist/index.js +55 -0
- package/dist/es/node_modules/codemirror/dist/index.js +40 -0
- package/dist/es/node_modules/crelt/index.js +27 -0
- package/dist/es/node_modules/lodash-es/_Hash.js +20 -0
- package/dist/es/node_modules/lodash-es/_ListCache.js +20 -0
- package/dist/es/node_modules/lodash-es/_Map.js +6 -0
- package/dist/es/node_modules/lodash-es/_MapCache.js +20 -0
- package/dist/es/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/es/node_modules/lodash-es/_arrayMap.js +8 -0
- package/dist/es/node_modules/lodash-es/_assocIndexOf.js +10 -0
- package/dist/es/node_modules/lodash-es/_baseGet.js +11 -0
- package/dist/es/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/es/node_modules/lodash-es/_baseIsNative.js +16 -0
- package/dist/es/node_modules/lodash-es/_baseToString.js +18 -0
- package/dist/es/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/es/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/es/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/es/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/es/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/es/node_modules/lodash-es/_getRawTag.js +15 -0
- package/dist/es/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/es/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/es/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/es/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/es/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/es/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/es/node_modules/lodash-es/_isKey.js +12 -0
- package/dist/es/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/es/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/es/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/es/node_modules/lodash-es/_listCacheDelete.js +12 -0
- package/dist/es/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/es/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/es/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/es/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/es/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/es/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/es/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/es/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/es/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/es/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/es/node_modules/lodash-es/_root.js +5 -0
- package/dist/es/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/es/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/es/node_modules/lodash-es/_toSource.js +17 -0
- package/dist/es/node_modules/lodash-es/eq.js +6 -0
- package/dist/es/node_modules/lodash-es/get.js +8 -0
- package/dist/es/node_modules/lodash-es/isArray.js +4 -0
- package/dist/es/node_modules/lodash-es/isFunction.js +12 -0
- package/dist/es/node_modules/lodash-es/isNil.js +6 -0
- package/dist/es/node_modules/lodash-es/isObject.js +7 -0
- package/dist/es/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/es/node_modules/lodash-es/isString.js +10 -0
- package/dist/es/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/es/node_modules/lodash-es/memoize.js +18 -0
- package/dist/es/node_modules/lodash-es/toString.js +7 -0
- package/dist/es/node_modules/style-mod/src/style-mod.js +109 -0
- package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +132 -0
- package/dist/es/node_modules/w3c-keyname/index.js +93 -0
- package/dist/es/src/CodeEditor/index.js +6 -0
- package/dist/es/src/CodeEditor/src/index.css +1 -0
- package/dist/es/src/CodeEditor/src/index.vue.js +128 -0
- package/dist/es/src/CodeEditor/src/index2.css +1 -0
- package/dist/es/src/ConfigProvider/index.js +7 -0
- package/dist/es/src/ConfigProvider/src/configProvider.js +14 -0
- package/dist/es/src/ConfigProvider/src/configProviderProps.js +22 -0
- package/dist/es/src/ConfigProvider/src/constants.js +9 -0
- package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +45 -0
- package/dist/es/src/ScaleScreen/index.js +6 -0
- package/dist/es/src/ScaleScreen/src/index.css +1 -0
- package/dist/es/src/ScaleScreen/src/index.vue.js +115 -0
- package/dist/es/src/ScaleScreen/src/index2.css +1 -0
- package/dist/es/src/VideoBackground/index.js +6 -0
- package/dist/es/src/VideoBackground/src/helper.js +29 -0
- package/dist/es/src/VideoBackground/src/index.css +1 -0
- package/dist/es/src/VideoBackground/src/index.vue.js +108 -0
- package/dist/es/src/VideoBackground/src/index2.css +1 -0
- package/dist/es/src/VideoBackground/src/index3.css +1 -0
- package/dist/es/src/VideoBackground/src/videoBackground.js +31 -0
- package/dist/es/src/hooks/useLocale.js +24 -0
- package/dist/es/src/hooks/useNamespace.js +8 -0
- package/dist/es/src/index.js +28 -0
- package/dist/es/src/locale/lang/en-US.js +32 -0
- package/dist/es/src/locale/lang/ja-JP.js +32 -0
- package/dist/es/src/locale/lang/zh-CN.js +32 -0
- package/dist/es/src/styles/tokens.css +1 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/commands/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +13 -0
- package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +3 -0
- package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +2 -0
- package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/language/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/lint/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/search/dist/index.js +2 -0
- package/dist/lib/node_modules/@codemirror/state/dist/index.js +5 -0
- package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +1 -0
- package/dist/lib/node_modules/@codemirror/view/dist/index.js +5 -0
- package/dist/lib/node_modules/@lezer/common/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/highlight/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/java/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/javascript/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/json/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/python/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/xml/dist/index.js +1 -0
- package/dist/lib/node_modules/@lezer/yaml/dist/index.js +1 -0
- package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +1 -0
- package/dist/lib/node_modules/@vueuse/core/dist/index.js +1 -0
- package/dist/lib/node_modules/@vueuse/shared/dist/index.js +1 -0
- package/dist/lib/node_modules/codemirror/dist/index.js +1 -0
- package/dist/lib/node_modules/crelt/index.js +1 -0
- package/dist/lib/node_modules/lodash-es/_Hash.js +1 -0
- package/dist/lib/node_modules/lodash-es/_ListCache.js +1 -0
- package/dist/lib/node_modules/lodash-es/_Map.js +1 -0
- package/dist/lib/node_modules/lodash-es/_MapCache.js +1 -0
- package/dist/lib/node_modules/lodash-es/_Symbol.js +1 -0
- package/dist/lib/node_modules/lodash-es/_arrayMap.js +1 -0
- package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +1 -0
- package/dist/lib/node_modules/lodash-es/_baseGet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_baseGetTag.js +1 -0
- package/dist/lib/node_modules/lodash-es/_baseIsNative.js +1 -0
- package/dist/lib/node_modules/lodash-es/_baseToString.js +1 -0
- package/dist/lib/node_modules/lodash-es/_castPath.js +1 -0
- package/dist/lib/node_modules/lodash-es/_coreJsData.js +1 -0
- package/dist/lib/node_modules/lodash-es/_freeGlobal.js +1 -0
- package/dist/lib/node_modules/lodash-es/_getMapData.js +1 -0
- package/dist/lib/node_modules/lodash-es/_getNative.js +1 -0
- package/dist/lib/node_modules/lodash-es/_getRawTag.js +1 -0
- package/dist/lib/node_modules/lodash-es/_getValue.js +1 -0
- package/dist/lib/node_modules/lodash-es/_hashClear.js +1 -0
- package/dist/lib/node_modules/lodash-es/_hashDelete.js +1 -0
- package/dist/lib/node_modules/lodash-es/_hashGet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_hashHas.js +1 -0
- package/dist/lib/node_modules/lodash-es/_hashSet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_isKey.js +1 -0
- package/dist/lib/node_modules/lodash-es/_isKeyable.js +1 -0
- package/dist/lib/node_modules/lodash-es/_isMasked.js +1 -0
- package/dist/lib/node_modules/lodash-es/_listCacheClear.js +1 -0
- package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +1 -0
- package/dist/lib/node_modules/lodash-es/_listCacheGet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_listCacheHas.js +1 -0
- package/dist/lib/node_modules/lodash-es/_listCacheSet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +1 -0
- package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +1 -0
- package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +1 -0
- package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +1 -0
- package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +1 -0
- package/dist/lib/node_modules/lodash-es/_nativeCreate.js +1 -0
- package/dist/lib/node_modules/lodash-es/_objectToString.js +1 -0
- package/dist/lib/node_modules/lodash-es/_root.js +1 -0
- package/dist/lib/node_modules/lodash-es/_stringToPath.js +1 -0
- package/dist/lib/node_modules/lodash-es/_toKey.js +1 -0
- package/dist/lib/node_modules/lodash-es/_toSource.js +1 -0
- package/dist/lib/node_modules/lodash-es/eq.js +1 -0
- package/dist/lib/node_modules/lodash-es/get.js +1 -0
- package/dist/lib/node_modules/lodash-es/isArray.js +1 -0
- package/dist/lib/node_modules/lodash-es/isFunction.js +1 -0
- package/dist/lib/node_modules/lodash-es/isNil.js +1 -0
- package/dist/lib/node_modules/lodash-es/isObject.js +1 -0
- package/dist/lib/node_modules/lodash-es/isObjectLike.js +1 -0
- package/dist/lib/node_modules/lodash-es/isString.js +1 -0
- package/dist/lib/node_modules/lodash-es/isSymbol.js +1 -0
- package/dist/lib/node_modules/lodash-es/memoize.js +1 -0
- package/dist/lib/node_modules/lodash-es/toString.js +1 -0
- package/dist/lib/node_modules/style-mod/src/style-mod.js +3 -0
- package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +1 -0
- package/dist/lib/node_modules/w3c-keyname/index.js +1 -0
- package/dist/lib/src/CodeEditor/index.js +1 -0
- package/dist/lib/src/CodeEditor/src/index.css +1 -0
- package/dist/lib/src/CodeEditor/src/index.vue.js +1 -0
- package/dist/lib/src/CodeEditor/src/index2.css +1 -0
- package/dist/lib/src/ConfigProvider/index.js +1 -0
- package/dist/lib/src/ConfigProvider/src/configProvider.js +1 -0
- package/dist/lib/src/ConfigProvider/src/configProviderProps.js +1 -0
- package/dist/lib/src/ConfigProvider/src/constants.js +1 -0
- package/dist/lib/src/ConfigProvider/src/useGlobalConfig.js +1 -0
- package/dist/lib/src/ScaleScreen/index.js +1 -0
- package/dist/lib/src/ScaleScreen/src/index.css +1 -0
- package/dist/lib/src/ScaleScreen/src/index.vue.js +1 -0
- package/dist/lib/src/ScaleScreen/src/index2.css +1 -0
- package/dist/lib/src/VideoBackground/index.js +1 -0
- package/dist/lib/src/VideoBackground/src/helper.js +1 -0
- package/dist/lib/src/VideoBackground/src/index.css +1 -0
- package/dist/lib/src/VideoBackground/src/index.vue.js +1 -0
- package/dist/lib/src/VideoBackground/src/index2.css +1 -0
- package/dist/lib/src/VideoBackground/src/index3.css +1 -0
- package/dist/lib/src/VideoBackground/src/videoBackground.js +1 -0
- package/dist/lib/src/hooks/useLocale.js +1 -0
- package/dist/lib/src/hooks/useNamespace.js +1 -0
- package/dist/lib/src/index.js +1 -0
- package/dist/lib/src/locale/lang/en-US.js +1 -0
- package/dist/lib/src/locale/lang/ja-JP.js +1 -0
- package/dist/lib/src/locale/lang/zh-CN.js +1 -0
- package/dist/lib/src/styles/tokens.css +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { parser as h } from "../../../@lezer/python/dist/index.js";
|
|
2
|
+
import { LanguageSupport as S, LRLanguage as I, indentNodeProp as v, foldNodeProp as C, delimitedIndent as m, foldInside as k, syntaxTree as $ } from "../../language/dist/index.js";
|
|
3
|
+
import { NodeWeakMap as A, IterMode as F } from "../../../@lezer/common/dist/index.js";
|
|
4
|
+
import { ifNotIn as w, completeFromList as N, snippetCompletion as l } from "../../autocomplete/dist/index.js";
|
|
5
|
+
const c = /* @__PURE__ */ new A(), E = /* @__PURE__ */ new Set([
|
|
6
|
+
"Script",
|
|
7
|
+
"Body",
|
|
8
|
+
"FunctionDefinition",
|
|
9
|
+
"ClassDefinition",
|
|
10
|
+
"LambdaExpression",
|
|
11
|
+
"ForStatement",
|
|
12
|
+
"MatchClause"
|
|
13
|
+
]);
|
|
14
|
+
function p(e) {
|
|
15
|
+
return (r, t, n) => {
|
|
16
|
+
if (n)
|
|
17
|
+
return !1;
|
|
18
|
+
let o = r.node.getChild("VariableName");
|
|
19
|
+
return o && t(o, e), !0;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const B = {
|
|
23
|
+
FunctionDefinition: /* @__PURE__ */ p("function"),
|
|
24
|
+
ClassDefinition: /* @__PURE__ */ p("class"),
|
|
25
|
+
ForStatement(e, r, t) {
|
|
26
|
+
if (t) {
|
|
27
|
+
for (let n = e.node.firstChild; n; n = n.nextSibling)
|
|
28
|
+
if (n.name == "VariableName")
|
|
29
|
+
r(n, "variable");
|
|
30
|
+
else if (n.name == "in")
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
ImportStatement(e, r) {
|
|
35
|
+
var t, n;
|
|
36
|
+
let { node: o } = e, a = ((t = o.firstChild) === null || t === void 0 ? void 0 : t.name) == "from";
|
|
37
|
+
for (let i = o.getChild("import"); i; i = i.nextSibling)
|
|
38
|
+
i.name == "VariableName" && ((n = i.nextSibling) === null || n === void 0 ? void 0 : n.name) != "as" && r(i, a ? "variable" : "namespace");
|
|
39
|
+
},
|
|
40
|
+
AssignStatement(e, r) {
|
|
41
|
+
for (let t = e.node.firstChild; t; t = t.nextSibling)
|
|
42
|
+
if (t.name == "VariableName")
|
|
43
|
+
r(t, "variable");
|
|
44
|
+
else if (t.name == ":" || t.name == "AssignOp")
|
|
45
|
+
break;
|
|
46
|
+
},
|
|
47
|
+
ParamList(e, r) {
|
|
48
|
+
for (let t = null, n = e.node.firstChild; n; n = n.nextSibling)
|
|
49
|
+
n.name == "VariableName" && (!t || !/\*|AssignOp/.test(t.name)) && r(n, "variable"), t = n;
|
|
50
|
+
},
|
|
51
|
+
CapturePattern: /* @__PURE__ */ p("variable"),
|
|
52
|
+
AsPattern: /* @__PURE__ */ p("variable"),
|
|
53
|
+
__proto__: null
|
|
54
|
+
};
|
|
55
|
+
function y(e, r) {
|
|
56
|
+
let t = c.get(r);
|
|
57
|
+
if (t)
|
|
58
|
+
return t;
|
|
59
|
+
let n = [], o = !0;
|
|
60
|
+
function a(i, s) {
|
|
61
|
+
let _ = e.sliceString(i.from, i.to);
|
|
62
|
+
n.push({ label: _, type: s });
|
|
63
|
+
}
|
|
64
|
+
return r.cursor(F.IncludeAnonymous).iterate((i) => {
|
|
65
|
+
if (i.name) {
|
|
66
|
+
let s = B[i.name];
|
|
67
|
+
if (s && s(i, a, o) || !o && E.has(i.name))
|
|
68
|
+
return !1;
|
|
69
|
+
o = !1;
|
|
70
|
+
} else if (i.to - i.from > 8192) {
|
|
71
|
+
for (let s of y(e, i.node))
|
|
72
|
+
n.push(s);
|
|
73
|
+
return !1;
|
|
74
|
+
}
|
|
75
|
+
}), c.set(r, n), n;
|
|
76
|
+
}
|
|
77
|
+
const b = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/, g = ["String", "FormatString", "Comment", "PropertyName"];
|
|
78
|
+
function x(e) {
|
|
79
|
+
let r = $(e.state).resolveInner(e.pos, -1);
|
|
80
|
+
if (g.indexOf(r.name) > -1)
|
|
81
|
+
return null;
|
|
82
|
+
let t = r.name == "VariableName" || r.to - r.from < 20 && b.test(e.state.sliceDoc(r.from, r.to));
|
|
83
|
+
if (!t && !e.explicit)
|
|
84
|
+
return null;
|
|
85
|
+
let n = [];
|
|
86
|
+
for (let o = r; o; o = o.parent)
|
|
87
|
+
E.has(o.name) && (n = n.concat(y(e.state.doc, o)));
|
|
88
|
+
return {
|
|
89
|
+
options: n,
|
|
90
|
+
from: t ? r.from : e.pos,
|
|
91
|
+
validFor: b
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const D = /* @__PURE__ */ [
|
|
95
|
+
"__annotations__",
|
|
96
|
+
"__builtins__",
|
|
97
|
+
"__debug__",
|
|
98
|
+
"__doc__",
|
|
99
|
+
"__import__",
|
|
100
|
+
"__name__",
|
|
101
|
+
"__loader__",
|
|
102
|
+
"__package__",
|
|
103
|
+
"__spec__",
|
|
104
|
+
"False",
|
|
105
|
+
"None",
|
|
106
|
+
"True"
|
|
107
|
+
].map((e) => ({ label: e, type: "constant" })).concat(/* @__PURE__ */ [
|
|
108
|
+
"ArithmeticError",
|
|
109
|
+
"AssertionError",
|
|
110
|
+
"AttributeError",
|
|
111
|
+
"BaseException",
|
|
112
|
+
"BlockingIOError",
|
|
113
|
+
"BrokenPipeError",
|
|
114
|
+
"BufferError",
|
|
115
|
+
"BytesWarning",
|
|
116
|
+
"ChildProcessError",
|
|
117
|
+
"ConnectionAbortedError",
|
|
118
|
+
"ConnectionError",
|
|
119
|
+
"ConnectionRefusedError",
|
|
120
|
+
"ConnectionResetError",
|
|
121
|
+
"DeprecationWarning",
|
|
122
|
+
"EOFError",
|
|
123
|
+
"Ellipsis",
|
|
124
|
+
"EncodingWarning",
|
|
125
|
+
"EnvironmentError",
|
|
126
|
+
"Exception",
|
|
127
|
+
"FileExistsError",
|
|
128
|
+
"FileNotFoundError",
|
|
129
|
+
"FloatingPointError",
|
|
130
|
+
"FutureWarning",
|
|
131
|
+
"GeneratorExit",
|
|
132
|
+
"IOError",
|
|
133
|
+
"ImportError",
|
|
134
|
+
"ImportWarning",
|
|
135
|
+
"IndentationError",
|
|
136
|
+
"IndexError",
|
|
137
|
+
"InterruptedError",
|
|
138
|
+
"IsADirectoryError",
|
|
139
|
+
"KeyError",
|
|
140
|
+
"KeyboardInterrupt",
|
|
141
|
+
"LookupError",
|
|
142
|
+
"MemoryError",
|
|
143
|
+
"ModuleNotFoundError",
|
|
144
|
+
"NameError",
|
|
145
|
+
"NotADirectoryError",
|
|
146
|
+
"NotImplemented",
|
|
147
|
+
"NotImplementedError",
|
|
148
|
+
"OSError",
|
|
149
|
+
"OverflowError",
|
|
150
|
+
"PendingDeprecationWarning",
|
|
151
|
+
"PermissionError",
|
|
152
|
+
"ProcessLookupError",
|
|
153
|
+
"RecursionError",
|
|
154
|
+
"ReferenceError",
|
|
155
|
+
"ResourceWarning",
|
|
156
|
+
"RuntimeError",
|
|
157
|
+
"RuntimeWarning",
|
|
158
|
+
"StopAsyncIteration",
|
|
159
|
+
"StopIteration",
|
|
160
|
+
"SyntaxError",
|
|
161
|
+
"SyntaxWarning",
|
|
162
|
+
"SystemError",
|
|
163
|
+
"SystemExit",
|
|
164
|
+
"TabError",
|
|
165
|
+
"TimeoutError",
|
|
166
|
+
"TypeError",
|
|
167
|
+
"UnboundLocalError",
|
|
168
|
+
"UnicodeDecodeError",
|
|
169
|
+
"UnicodeEncodeError",
|
|
170
|
+
"UnicodeError",
|
|
171
|
+
"UnicodeTranslateError",
|
|
172
|
+
"UnicodeWarning",
|
|
173
|
+
"UserWarning",
|
|
174
|
+
"ValueError",
|
|
175
|
+
"Warning",
|
|
176
|
+
"ZeroDivisionError"
|
|
177
|
+
].map((e) => ({ label: e, type: "type" }))).concat(/* @__PURE__ */ [
|
|
178
|
+
"bool",
|
|
179
|
+
"bytearray",
|
|
180
|
+
"bytes",
|
|
181
|
+
"classmethod",
|
|
182
|
+
"complex",
|
|
183
|
+
"float",
|
|
184
|
+
"frozenset",
|
|
185
|
+
"int",
|
|
186
|
+
"list",
|
|
187
|
+
"map",
|
|
188
|
+
"memoryview",
|
|
189
|
+
"object",
|
|
190
|
+
"range",
|
|
191
|
+
"set",
|
|
192
|
+
"staticmethod",
|
|
193
|
+
"str",
|
|
194
|
+
"super",
|
|
195
|
+
"tuple",
|
|
196
|
+
"type"
|
|
197
|
+
].map((e) => ({ label: e, type: "class" }))).concat(/* @__PURE__ */ [
|
|
198
|
+
"abs",
|
|
199
|
+
"aiter",
|
|
200
|
+
"all",
|
|
201
|
+
"anext",
|
|
202
|
+
"any",
|
|
203
|
+
"ascii",
|
|
204
|
+
"bin",
|
|
205
|
+
"breakpoint",
|
|
206
|
+
"callable",
|
|
207
|
+
"chr",
|
|
208
|
+
"compile",
|
|
209
|
+
"delattr",
|
|
210
|
+
"dict",
|
|
211
|
+
"dir",
|
|
212
|
+
"divmod",
|
|
213
|
+
"enumerate",
|
|
214
|
+
"eval",
|
|
215
|
+
"exec",
|
|
216
|
+
"exit",
|
|
217
|
+
"filter",
|
|
218
|
+
"format",
|
|
219
|
+
"getattr",
|
|
220
|
+
"globals",
|
|
221
|
+
"hasattr",
|
|
222
|
+
"hash",
|
|
223
|
+
"help",
|
|
224
|
+
"hex",
|
|
225
|
+
"id",
|
|
226
|
+
"input",
|
|
227
|
+
"isinstance",
|
|
228
|
+
"issubclass",
|
|
229
|
+
"iter",
|
|
230
|
+
"len",
|
|
231
|
+
"license",
|
|
232
|
+
"locals",
|
|
233
|
+
"max",
|
|
234
|
+
"min",
|
|
235
|
+
"next",
|
|
236
|
+
"oct",
|
|
237
|
+
"open",
|
|
238
|
+
"ord",
|
|
239
|
+
"pow",
|
|
240
|
+
"print",
|
|
241
|
+
"property",
|
|
242
|
+
"quit",
|
|
243
|
+
"repr",
|
|
244
|
+
"reversed",
|
|
245
|
+
"round",
|
|
246
|
+
"setattr",
|
|
247
|
+
"slice",
|
|
248
|
+
"sorted",
|
|
249
|
+
"sum",
|
|
250
|
+
"vars",
|
|
251
|
+
"zip"
|
|
252
|
+
].map((e) => ({ label: e, type: "function" }))), P = [
|
|
253
|
+
/* @__PURE__ */ l("def ${name}(${params}):\n ${}", {
|
|
254
|
+
label: "def",
|
|
255
|
+
detail: "function",
|
|
256
|
+
type: "keyword"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ l("for ${name} in ${collection}:\n ${}", {
|
|
259
|
+
label: "for",
|
|
260
|
+
detail: "loop",
|
|
261
|
+
type: "keyword"
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ l("while ${}:\n ${}", {
|
|
264
|
+
label: "while",
|
|
265
|
+
detail: "loop",
|
|
266
|
+
type: "keyword"
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ l("try:\n ${}\nexcept ${error}:\n ${}", {
|
|
269
|
+
label: "try",
|
|
270
|
+
detail: "/ except block",
|
|
271
|
+
type: "keyword"
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ l(`if \${}:
|
|
274
|
+
|
|
275
|
+
`, {
|
|
276
|
+
label: "if",
|
|
277
|
+
detail: "block",
|
|
278
|
+
type: "keyword"
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ l("if ${}:\n ${}\nelse:\n ${}", {
|
|
281
|
+
label: "if",
|
|
282
|
+
detail: "/ else block",
|
|
283
|
+
type: "keyword"
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ l("class ${name}:\n def __init__(self, ${params}):\n ${}", {
|
|
286
|
+
label: "class",
|
|
287
|
+
detail: "definition",
|
|
288
|
+
type: "keyword"
|
|
289
|
+
}),
|
|
290
|
+
/* @__PURE__ */ l("import ${module}", {
|
|
291
|
+
label: "import",
|
|
292
|
+
detail: "statement",
|
|
293
|
+
type: "keyword"
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ l("from ${module} import ${names}", {
|
|
296
|
+
label: "from",
|
|
297
|
+
detail: "import",
|
|
298
|
+
type: "keyword"
|
|
299
|
+
})
|
|
300
|
+
], W = /* @__PURE__ */ w(g, /* @__PURE__ */ N(/* @__PURE__ */ D.concat(P)));
|
|
301
|
+
function d(e) {
|
|
302
|
+
let { node: r, pos: t } = e, n = e.lineIndent(t, -1), o = null;
|
|
303
|
+
for (; ; ) {
|
|
304
|
+
let a = r.childBefore(t);
|
|
305
|
+
if (a)
|
|
306
|
+
if (a.name == "Comment")
|
|
307
|
+
t = a.from;
|
|
308
|
+
else if (a.name == "Body" || a.name == "MatchBody")
|
|
309
|
+
e.baseIndentFor(a) + e.unit <= n && (o = a), r = a;
|
|
310
|
+
else if (a.name == "MatchClause")
|
|
311
|
+
r = a;
|
|
312
|
+
else if (a.type.is("Statement"))
|
|
313
|
+
r = a;
|
|
314
|
+
else
|
|
315
|
+
break;
|
|
316
|
+
else break;
|
|
317
|
+
}
|
|
318
|
+
return o;
|
|
319
|
+
}
|
|
320
|
+
function f(e, r) {
|
|
321
|
+
let t = e.baseIndentFor(r), n = e.lineAt(e.pos, -1), o = n.from + n.text.length;
|
|
322
|
+
return /^\s*($|#)/.test(n.text) && e.node.to < o + 100 && !/\S/.test(e.state.sliceDoc(o, e.node.to)) && e.lineIndent(e.pos, -1) <= t || /^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(e.textAfter) && e.lineIndent(e.pos, -1) > t ? null : t + e.unit;
|
|
323
|
+
}
|
|
324
|
+
const u = /* @__PURE__ */ I.define({
|
|
325
|
+
name: "python",
|
|
326
|
+
parser: /* @__PURE__ */ h.configure({
|
|
327
|
+
props: [
|
|
328
|
+
/* @__PURE__ */ v.add({
|
|
329
|
+
Body: (e) => {
|
|
330
|
+
var r;
|
|
331
|
+
let t = /^\s*(#|$)/.test(e.textAfter) && d(e) || e.node;
|
|
332
|
+
return (r = f(e, t)) !== null && r !== void 0 ? r : e.continue();
|
|
333
|
+
},
|
|
334
|
+
MatchBody: (e) => {
|
|
335
|
+
var r;
|
|
336
|
+
let t = d(e);
|
|
337
|
+
return (r = f(e, t || e.node)) !== null && r !== void 0 ? r : e.continue();
|
|
338
|
+
},
|
|
339
|
+
IfStatement: (e) => /^\s*(else:|elif )/.test(e.textAfter) ? e.baseIndent : e.continue(),
|
|
340
|
+
"ForStatement WhileStatement": (e) => /^\s*else:/.test(e.textAfter) ? e.baseIndent : e.continue(),
|
|
341
|
+
TryStatement: (e) => /^\s*(except[ :]|finally:|else:)/.test(e.textAfter) ? e.baseIndent : e.continue(),
|
|
342
|
+
MatchStatement: (e) => /^\s*case /.test(e.textAfter) ? e.baseIndent + e.unit : e.continue(),
|
|
343
|
+
"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": /* @__PURE__ */ m({ closing: ")" }),
|
|
344
|
+
"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": /* @__PURE__ */ m({ closing: "}" }),
|
|
345
|
+
"ArrayExpression ArrayComprehensionExpression": /* @__PURE__ */ m({ closing: "]" }),
|
|
346
|
+
MemberExpression: (e) => e.baseIndent + e.unit,
|
|
347
|
+
"String FormatString": () => null,
|
|
348
|
+
Script: (e) => {
|
|
349
|
+
var r;
|
|
350
|
+
let t = d(e);
|
|
351
|
+
return (r = t && f(e, t)) !== null && r !== void 0 ? r : e.continue();
|
|
352
|
+
}
|
|
353
|
+
}),
|
|
354
|
+
/* @__PURE__ */ C.add({
|
|
355
|
+
"ArrayExpression DictionaryExpression SetExpression TupleExpression": k,
|
|
356
|
+
Body: (e, r) => ({ from: e.from + 1, to: e.to - (e.to == r.doc.length ? 0 : 1) }),
|
|
357
|
+
"String FormatString": (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })
|
|
358
|
+
})
|
|
359
|
+
]
|
|
360
|
+
}),
|
|
361
|
+
languageData: {
|
|
362
|
+
closeBrackets: {
|
|
363
|
+
brackets: ["(", "[", "{", "'", '"', "'''", '"""'],
|
|
364
|
+
stringPrefixes: [
|
|
365
|
+
"f",
|
|
366
|
+
"fr",
|
|
367
|
+
"rf",
|
|
368
|
+
"r",
|
|
369
|
+
"u",
|
|
370
|
+
"b",
|
|
371
|
+
"br",
|
|
372
|
+
"rb",
|
|
373
|
+
"F",
|
|
374
|
+
"FR",
|
|
375
|
+
"RF",
|
|
376
|
+
"R",
|
|
377
|
+
"U",
|
|
378
|
+
"B",
|
|
379
|
+
"BR",
|
|
380
|
+
"RB"
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
commentTokens: { line: "#" },
|
|
384
|
+
// Indent logic logic are triggered upon below input patterns
|
|
385
|
+
indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
function O() {
|
|
389
|
+
return new S(u, [
|
|
390
|
+
u.data.of({ autocomplete: x }),
|
|
391
|
+
u.data.of({ autocomplete: W })
|
|
392
|
+
]);
|
|
393
|
+
}
|
|
394
|
+
export {
|
|
395
|
+
W as globalCompletion,
|
|
396
|
+
x as localCompletionSource,
|
|
397
|
+
O as python,
|
|
398
|
+
u as pythonLanguage
|
|
399
|
+
};
|