@onereach/ui-components 6.2.0-beta.3294.0 → 6.2.0-beta.3299.0
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/bundled/v2/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v2/components/OrCode/index.js +5 -5
- package/dist/bundled/v2/components/OrCode/lang.js +5 -5
- package/dist/bundled/v2/components/OrCode/libs.js +5 -5
- package/dist/bundled/v2/components/OrCode/theme.js +1 -1
- package/dist/bundled/v2/components/OrCodeV3/OrCode.js +8 -8
- package/dist/bundled/v2/components/OrCodeV3/index.js +3 -3
- package/dist/bundled/v2/components/OrCodeV3/libs.js +3 -3
- package/dist/bundled/v2/components/index.js +6 -6
- package/dist/bundled/v2/{index-0ad0f605.js → index-003e27c5.js} +1 -1
- package/dist/bundled/v2/{index-379ec85d.js → index-13e363a1.js} +14 -12
- package/dist/bundled/v2/{index-d02cdc81.js → index-264444b5.js} +50 -13
- package/dist/bundled/{v3/index-c661340a.js → v2/index-2ff1af8f.js} +3 -3
- package/dist/bundled/v2/{index-0789b976.js → index-3f523d8c.js} +27 -25
- package/dist/bundled/v2/{index-b261a47e.js → index-4b36988f.js} +35 -25
- package/dist/bundled/v2/{index-ea7a689d.js → index-7488c2bc.js} +4 -4
- package/dist/bundled/v2/{index-7211e1c5.js → index-786635cb.js} +2 -2
- package/dist/bundled/v2/{index-9e0bdde8.js → index-e058b0e3.js} +2 -2
- package/dist/bundled/{v3/index-540ed5cb.js → v2/index-e9029e60.js} +288 -268
- package/dist/bundled/v2/index.js +6 -6
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-ad985f8f.js → OrCode.vue_vue_type_script_lang-53f0dbcf.js} +8 -8
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-1df17839.js → OrCode.vue_vue_type_script_lang-76b17c75.js} +2 -2
- package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCode/index.js +6 -6
- package/dist/bundled/v3/components/OrCode/lang.js +5 -5
- package/dist/bundled/v3/components/OrCode/libs.js +5 -5
- package/dist/bundled/v3/components/OrCode/theme.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/index.js +4 -4
- package/dist/bundled/v3/components/OrCodeV3/libs.js +3 -3
- package/dist/bundled/v3/components/index.js +8 -8
- package/dist/bundled/v3/{index-168d8a72.js → index-3957c5be.js} +1 -1
- package/dist/bundled/v3/{index-e0aaa8dc.js → index-4eb7137d.js} +27 -25
- package/dist/bundled/v3/{index-3074ab3c.js → index-6a637771.js} +14 -12
- package/dist/bundled/{v2/index-c321391a.js → v3/index-81622681.js} +288 -268
- package/dist/bundled/v3/{index-73699920.js → index-9fa743a3.js} +35 -25
- package/dist/bundled/v3/{index-ce11b31b.js → index-b1301e6b.js} +50 -13
- package/dist/bundled/v3/{index-fdffd536.js → index-b52e24e9.js} +4 -4
- package/dist/bundled/{v2/index-5e5d18d5.js → v3/index-c3a9da95.js} +3 -3
- package/dist/bundled/v3/{index-a59e89b4.js → index-eaeb4268.js} +2 -2
- package/dist/bundled/v3/{index-3de4069f.js → index-f41a6890.js} +2 -2
- package/dist/bundled/v3/index.js +8 -8
- package/package.json +1 -1
|
@@ -4057,11 +4057,8 @@ var shift = {
|
|
|
4057
4057
|
221: "}",
|
|
4058
4058
|
222: "\""
|
|
4059
4059
|
};
|
|
4060
|
-
var chrome$1 = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent);
|
|
4061
|
-
typeof navigator != "undefined" && /Gecko\/\d+/.test(navigator.userAgent);
|
|
4062
4060
|
var mac = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
|
|
4063
4061
|
var ie$1 = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
4064
|
-
var brokenModifierNames = mac || chrome$1 && +chrome$1[1] < 57;
|
|
4065
4062
|
|
|
4066
4063
|
// Fill in the digit keys
|
|
4067
4064
|
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
|
|
@@ -4078,7 +4075,9 @@ for (var i = 65; i <= 90; i++) {
|
|
|
4078
4075
|
// For each code that doesn't have a shift-equivalent, copy the base name
|
|
4079
4076
|
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
4080
4077
|
function keyName(event) {
|
|
4081
|
-
|
|
4078
|
+
// On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.
|
|
4079
|
+
// On IE, shift effect is never included in `.key`.
|
|
4080
|
+
var ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey || ie$1 && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
|
|
4082
4081
|
var name = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
|
|
4083
4082
|
// Edge sometimes produces wrong names (Issue #3)
|
|
4084
4083
|
if (name == "Esc") name = "Escape";
|
|
@@ -14157,14 +14156,16 @@ class Tree {
|
|
|
14157
14156
|
from = 0,
|
|
14158
14157
|
to = this.length
|
|
14159
14158
|
} = spec;
|
|
14160
|
-
|
|
14159
|
+
let mode = spec.mode || 0,
|
|
14160
|
+
anon = (mode & IterMode.IncludeAnonymous) > 0;
|
|
14161
|
+
for (let c = this.cursor(mode | IterMode.IncludeAnonymous);;) {
|
|
14161
14162
|
let entered = false;
|
|
14162
|
-
if (c.from <= to && c.to >= from && (c.type.isAnonymous || enter(c) !== false)) {
|
|
14163
|
+
if (c.from <= to && c.to >= from && (!anon && c.type.isAnonymous || enter(c) !== false)) {
|
|
14163
14164
|
if (c.firstChild()) continue;
|
|
14164
14165
|
entered = true;
|
|
14165
14166
|
}
|
|
14166
14167
|
for (;;) {
|
|
14167
|
-
if (entered && leave && !c.type.isAnonymous) leave(c);
|
|
14168
|
+
if (entered && leave && (anon || !c.type.isAnonymous)) leave(c);
|
|
14168
14169
|
if (c.nextSibling()) break;
|
|
14169
14170
|
if (!c.parent()) return;
|
|
14170
14171
|
entered = true;
|
|
@@ -15358,6 +15359,7 @@ class InnerParse {
|
|
|
15358
15359
|
this.overlay = overlay;
|
|
15359
15360
|
this.target = target;
|
|
15360
15361
|
this.ranges = ranges;
|
|
15362
|
+
if (!ranges.length || ranges.some(r => r.from >= r.to)) throw new RangeError("Invalid inner parse ranges given: " + JSON.stringify(ranges));
|
|
15361
15363
|
}
|
|
15362
15364
|
}
|
|
15363
15365
|
class ActiveOverlay {
|
|
@@ -16028,7 +16030,7 @@ class HighlightBuilder {
|
|
|
16028
16030
|
cls += tagCls;
|
|
16029
16031
|
if (rule.mode == 1 /* Inherit */) inheritedClass += (inheritedClass ? " " : "") + tagCls;
|
|
16030
16032
|
}
|
|
16031
|
-
this.startSpan(
|
|
16033
|
+
this.startSpan(Math.max(from, start), cls);
|
|
16032
16034
|
if (rule.opaque) return;
|
|
16033
16035
|
let mounted = cursor.tree && cursor.tree.prop(NodeProp.mounted);
|
|
16034
16036
|
if (mounted && mounted.overlay) {
|
|
@@ -16050,12 +16052,13 @@ class HighlightBuilder {
|
|
|
16050
16052
|
if (!next || nextPos > to) break;
|
|
16051
16053
|
pos = next.to + start;
|
|
16052
16054
|
if (pos > from) {
|
|
16053
|
-
this.highlightRange(inner.cursor(), Math.max(from, next.from + start), Math.min(to, pos),
|
|
16054
|
-
this.startSpan(pos, cls);
|
|
16055
|
+
this.highlightRange(inner.cursor(), Math.max(from, next.from + start), Math.min(to, pos), "", innerHighlighters);
|
|
16056
|
+
this.startSpan(Math.min(to, pos), cls);
|
|
16055
16057
|
}
|
|
16056
16058
|
}
|
|
16057
16059
|
if (hasChild) cursor.parent();
|
|
16058
16060
|
} else if (cursor.firstChild()) {
|
|
16061
|
+
if (mounted) inheritedClass = "";
|
|
16059
16062
|
do {
|
|
16060
16063
|
if (cursor.to <= from) continue;
|
|
16061
16064
|
if (cursor.from >= to) break;
|
|
@@ -17119,16 +17122,16 @@ class LanguageState {
|
|
|
17119
17122
|
// end position or the end of the viewport, to avoid slowing down
|
|
17120
17123
|
// state updates with parse work beyond the viewport.
|
|
17121
17124
|
let upto = this.context.treeLen == tr.startState.doc.length ? undefined : Math.max(tr.changes.mapPos(this.context.treeLen), newCx.viewport.to);
|
|
17122
|
-
if (!newCx.work(20 /*
|
|
17125
|
+
if (!newCx.work(20 /* Apply */, upto)) newCx.takeTree();
|
|
17123
17126
|
return new LanguageState(newCx);
|
|
17124
17127
|
}
|
|
17125
17128
|
static init(state) {
|
|
17126
|
-
let vpTo = Math.min(3000 /*
|
|
17129
|
+
let vpTo = Math.min(3000 /* InitViewport */, state.doc.length);
|
|
17127
17130
|
let parseState = ParseContext.create(state.facet(language).parser, state, {
|
|
17128
17131
|
from: 0,
|
|
17129
17132
|
to: vpTo
|
|
17130
17133
|
});
|
|
17131
|
-
if (!parseState.work(20 /*
|
|
17134
|
+
if (!parseState.work(20 /* Apply */, vpTo)) parseState.takeTree();
|
|
17132
17135
|
return new LanguageState(parseState);
|
|
17133
17136
|
}
|
|
17134
17137
|
}
|
|
@@ -17141,16 +17144,16 @@ Language.state = /*@__PURE__*/StateField.define({
|
|
|
17141
17144
|
}
|
|
17142
17145
|
});
|
|
17143
17146
|
let requestIdle = callback => {
|
|
17144
|
-
let timeout = setTimeout(() => callback(), 500 /*
|
|
17147
|
+
let timeout = setTimeout(() => callback(), 500 /* MaxPause */);
|
|
17145
17148
|
return () => clearTimeout(timeout);
|
|
17146
17149
|
};
|
|
17147
17150
|
if (typeof requestIdleCallback != "undefined") requestIdle = callback => {
|
|
17148
17151
|
let idle = -1,
|
|
17149
17152
|
timeout = setTimeout(() => {
|
|
17150
17153
|
idle = requestIdleCallback(callback, {
|
|
17151
|
-
timeout: 500 /*
|
|
17154
|
+
timeout: 500 /* MaxPause */ - 100 /* MinPause */
|
|
17152
17155
|
});
|
|
17153
|
-
}, 100 /*
|
|
17156
|
+
}, 100 /* MinPause */);
|
|
17154
17157
|
return () => idle < 0 ? clearTimeout(timeout) : cancelIdleCallback(idle);
|
|
17155
17158
|
};
|
|
17156
17159
|
const isInputPending = typeof navigator != "undefined" && ((_a = navigator.scheduling) === null || _a === void 0 ? void 0 : _a.isInputPending) ? () => navigator.scheduling.isInputPending() : null;
|
|
@@ -17170,7 +17173,7 @@ const parseWorker = /*@__PURE__*/ViewPlugin.fromClass(class ParseWorker {
|
|
|
17170
17173
|
let cx = this.view.state.field(Language.state).context;
|
|
17171
17174
|
if (cx.updateViewport(update.view.viewport) || this.view.viewport.to > cx.treeLen) this.scheduleWork();
|
|
17172
17175
|
if (update.docChanged) {
|
|
17173
|
-
if (this.view.hasFocus) this.chunkBudget += 50 /*
|
|
17176
|
+
if (this.view.hasFocus) this.chunkBudget += 50 /* ChangeBonus */;
|
|
17174
17177
|
this.scheduleWork();
|
|
17175
17178
|
}
|
|
17176
17179
|
this.checkAsyncSchedule(cx);
|
|
@@ -17188,8 +17191,8 @@ const parseWorker = /*@__PURE__*/ViewPlugin.fromClass(class ParseWorker {
|
|
|
17188
17191
|
let now = Date.now();
|
|
17189
17192
|
if (this.chunkEnd < now && (this.chunkEnd < 0 || this.view.hasFocus)) {
|
|
17190
17193
|
// Start a new chunk
|
|
17191
|
-
this.chunkEnd = now + 30000 /*
|
|
17192
|
-
this.chunkBudget = 3000 /*
|
|
17194
|
+
this.chunkEnd = now + 30000 /* ChunkTime */;
|
|
17195
|
+
this.chunkBudget = 3000 /* ChunkBudget */;
|
|
17193
17196
|
}
|
|
17194
17197
|
|
|
17195
17198
|
if (this.chunkBudget <= 0) return; // No more budget
|
|
@@ -17200,12 +17203,12 @@ const parseWorker = /*@__PURE__*/ViewPlugin.fromClass(class ParseWorker {
|
|
|
17200
17203
|
}
|
|
17201
17204
|
} = this.view,
|
|
17202
17205
|
field = state.field(Language.state);
|
|
17203
|
-
if (field.tree == field.context.tree && field.context.isDone(vpTo + 100000 /*
|
|
17204
|
-
let endTime = Date.now() + Math.min(this.chunkBudget, 100 /*
|
|
17206
|
+
if (field.tree == field.context.tree && field.context.isDone(vpTo + 100000 /* MaxParseAhead */)) return;
|
|
17207
|
+
let endTime = Date.now() + Math.min(this.chunkBudget, 100 /* Slice */, deadline && !isInputPending ? Math.max(25 /* MinSlice */, deadline.timeRemaining() - 5) : 1e9);
|
|
17205
17208
|
let viewportFirst = field.context.treeLen < vpTo && state.doc.length > vpTo + 1000;
|
|
17206
17209
|
let done = field.context.work(() => {
|
|
17207
17210
|
return isInputPending && isInputPending() || Date.now() > endTime;
|
|
17208
|
-
}, vpTo + (viewportFirst ? 0 : 100000 /*
|
|
17211
|
+
}, vpTo + (viewportFirst ? 0 : 100000 /* MaxParseAhead */));
|
|
17209
17212
|
this.chunkBudget -= Date.now() - now;
|
|
17210
17213
|
if (done || this.chunkBudget <= 0) {
|
|
17211
17214
|
field.context.takeTree();
|
|
@@ -17624,12 +17627,19 @@ class TreeIndentContext extends IndentContext {
|
|
|
17624
17627
|
on if it is covered by another such node.
|
|
17625
17628
|
*/
|
|
17626
17629
|
get baseIndent() {
|
|
17627
|
-
|
|
17630
|
+
return this.baseIndentFor(this.node);
|
|
17631
|
+
}
|
|
17632
|
+
/**
|
|
17633
|
+
Get the indentation for the reference line of the given node
|
|
17634
|
+
(see [`baseIndent`](https://codemirror.net/6/docs/ref/#language.TreeIndentContext.baseIndent)).
|
|
17635
|
+
*/
|
|
17636
|
+
baseIndentFor(node) {
|
|
17637
|
+
let line = this.state.doc.lineAt(node.from);
|
|
17628
17638
|
// Skip line starts that are covered by a sibling (or cousin, etc)
|
|
17629
17639
|
for (;;) {
|
|
17630
|
-
let atBreak =
|
|
17640
|
+
let atBreak = node.resolve(line.from);
|
|
17631
17641
|
while (atBreak.parent && atBreak.parent.from == atBreak.from) atBreak = atBreak.parent;
|
|
17632
|
-
if (isParent(atBreak,
|
|
17642
|
+
if (isParent(atBreak, node)) break;
|
|
17633
17643
|
line = this.state.doc.lineAt(atBreak.from);
|
|
17634
17644
|
}
|
|
17635
17645
|
return this.lineIndent(line.from);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ContextTracker, E as ExternalTokenizer, L as LRParser } from './index-
|
|
2
|
-
import { a3 as styleTags, a4 as tags, ah as parseMixed, a5 as LanguageSupport, E as EditorView, s as syntaxTree, b as EditorSelection, a6 as LRLanguage, a7 as indentNodeProp, ab as foldNodeProp, ai as bracketMatchingHandle } from './index-
|
|
3
|
-
import { cssLanguage, css } from './index-
|
|
4
|
-
import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-
|
|
1
|
+
import { C as ContextTracker, E as ExternalTokenizer, L as LRParser } from './index-264444b5.js';
|
|
2
|
+
import { a3 as styleTags, a4 as tags, ah as parseMixed, a5 as LanguageSupport, E as EditorView, s as syntaxTree, b as EditorSelection, a6 as LRLanguage, a7 as indentNodeProp, ab as foldNodeProp, ai as bracketMatchingHandle } from './index-4b36988f.js';
|
|
3
|
+
import { cssLanguage, css } from './index-786635cb.js';
|
|
4
|
+
import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from './index-2ff1af8f.js';
|
|
5
5
|
|
|
6
6
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
7
7
|
const scriptText = 54,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExternalTokenizer, L as LRParser } from './index-
|
|
2
|
-
import { a3 as styleTags, a4 as tags$1, a5 as LanguageSupport, s as syntaxTree, a6 as LRLanguage, a7 as indentNodeProp, a8 as continuedIndent, ab as foldNodeProp, ac as foldInside, ae as IterMode, ag as NodeWeakMap } from './index-
|
|
1
|
+
import { E as ExternalTokenizer, L as LRParser } from './index-264444b5.js';
|
|
2
|
+
import { a3 as styleTags, a4 as tags$1, a5 as LanguageSupport, s as syntaxTree, a6 as LRLanguage, a7 as indentNodeProp, a8 as continuedIndent, ab as foldNodeProp, ac as foldInside, ae as IterMode, ag as NodeWeakMap } from './index-4b36988f.js';
|
|
3
3
|
|
|
4
4
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
5
5
|
const descendantOp = 95,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LRParser } from './index-
|
|
2
|
-
import { a3 as styleTags, a4 as tags, a5 as LanguageSupport, a6 as LRLanguage, a7 as indentNodeProp, a8 as continuedIndent, ab as foldNodeProp, ac as foldInside } from './index-
|
|
1
|
+
import { L as LRParser } from './index-264444b5.js';
|
|
2
|
+
import { a3 as styleTags, a4 as tags, a5 as LanguageSupport, a6 as LRLanguage, a7 as indentNodeProp, a8 as continuedIndent, ab as foldNodeProp, ac as foldInside } from './index-4b36988f.js';
|
|
3
3
|
|
|
4
4
|
const jsonHighlighting = styleTags({
|
|
5
5
|
String: tags.string,
|