@adyen/bento-vue2 1.19.0 → 1.20.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/@types/packages/vue2/src/components/code-snippet/utils/indent-same-as-line-before-extension.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/code-snippet/utils/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.types.d.ts +3 -1079
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +7 -8
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +1 -1
- package/dist/accordion.js +3 -3
- package/dist/action-bar.js +7 -7
- package/dist/alert.js +7 -7
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +4 -4
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{arrow-left.2db60716.js → arrow-left.93ae08f5.js} +2 -2
- package/dist/chunks/{arrow-left.2db60716.js.map → arrow-left.93ae08f5.js.map} +1 -1
- package/dist/chunks/{base-button.3c3d473d.js → base-button.2abda566.js} +2 -2
- package/dist/chunks/{base-button.3c3d473d.js.map → base-button.2abda566.js.map} +1 -1
- package/dist/chunks/{base-modal.27c6f2db.js → base-modal.9d4f6201.js} +38 -33
- package/dist/chunks/base-modal.9d4f6201.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.a38327c2.js → button-actions-with-menu.db38aa1d.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.a38327c2.js.map → button-actions-with-menu.db38aa1d.js.map} +1 -1
- package/dist/chunks/{button-actions.1dc90a19.js → button-actions.0ed5f462.js} +3 -3
- package/dist/chunks/{button-actions.1dc90a19.js.map → button-actions.0ed5f462.js.map} +1 -1
- package/dist/chunks/{button.0b6cda85.js → button.8738aa07.js} +3 -3
- package/dist/chunks/{button.0b6cda85.js.map → button.8738aa07.js.map} +1 -1
- package/dist/chunks/{calendar.263cfc88.js → calendar.ce3f34b7.js} +137 -137
- package/dist/chunks/{calendar.263cfc88.js.map → calendar.ce3f34b7.js.map} +1 -1
- package/dist/chunks/{checkbox.c7a74005.js → checkbox.4f4e8f67.js} +4 -4
- package/dist/chunks/{checkbox.c7a74005.js.map → checkbox.4f4e8f67.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill.345311d2.js → checkmark-circle-fill.d1cdb44b.js} +2 -2
- package/dist/chunks/{checkmark-circle-fill.345311d2.js.map → checkmark-circle-fill.d1cdb44b.js.map} +1 -1
- package/dist/chunks/{checkmark-small.520f01b1.js → checkmark-small.73cf8f1d.js} +2 -2
- package/dist/chunks/{checkmark-small.520f01b1.js.map → checkmark-small.73cf8f1d.js.map} +1 -1
- package/dist/chunks/{checkmark.a6ed8f47.js → checkmark.b6d2d4d1.js} +2 -2
- package/dist/chunks/{checkmark.a6ed8f47.js.map → checkmark.b6d2d4d1.js.map} +1 -1
- package/dist/chunks/{chevron-left.5edf02ac.js → chevron-left.ddc658ff.js} +2 -2
- package/dist/chunks/{chevron-left.5edf02ac.js.map → chevron-left.ddc658ff.js.map} +1 -1
- package/dist/chunks/{chevron-up.81185563.js → chevron-up.52aea493.js} +2 -2
- package/dist/chunks/{chevron-up.81185563.js.map → chevron-up.52aea493.js.map} +1 -1
- package/dist/chunks/{controls-group.8abe0bd1.js → controls-group.0e3d1fc5.js} +3 -3
- package/dist/chunks/{controls-group.8abe0bd1.js.map → controls-group.0e3d1fc5.js.map} +1 -1
- package/dist/chunks/{copy.647aae54.js → copy.2aca9aaf.js} +4 -4
- package/dist/chunks/{copy.647aae54.js.map → copy.2aca9aaf.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.27580c4b.js → cross-circle-fill.42f9b938.js} +2 -2
- package/dist/chunks/{cross-circle-fill.27580c4b.js.map → cross-circle-fill.42f9b938.js.map} +1 -1
- package/dist/chunks/{cross-small.e851e0de.js → cross-small.3aadf170.js} +2 -2
- package/dist/chunks/{cross-small.e851e0de.js.map → cross-small.3aadf170.js.map} +1 -1
- package/dist/chunks/{cross.04678d81.js → cross.eaaaf355.js} +2 -2
- package/dist/chunks/{cross.04678d81.js.map → cross.eaaaf355.js.map} +1 -1
- package/dist/chunks/{dialog-page.f787969c.js → dialog-page.6bc19d1a.js} +4 -4
- package/dist/chunks/{dialog-page.f787969c.js.map → dialog-page.6bc19d1a.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.59803edd.js → dropdown-default-textbox.a55b9de3.js} +94 -92
- package/dist/chunks/dropdown-default-textbox.a55b9de3.js.map +1 -0
- package/dist/chunks/{dropdown.0574f613.js → dropdown.7ad3a860.js} +7 -7
- package/dist/chunks/{dropdown.0574f613.js.map → dropdown.7ad3a860.js.map} +1 -1
- package/dist/chunks/{error-message.75666843.js → error-message.775f9114.js} +3 -3
- package/dist/chunks/{error-message.75666843.js.map → error-message.775f9114.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.06574a66.js → fixed-scroller.5764a0d4.js} +3 -3
- package/dist/chunks/{fixed-scroller.06574a66.js.map → fixed-scroller.5764a0d4.js.map} +1 -1
- package/dist/chunks/{footer-actions.0268a57b.js → footer-actions.093f0cbe.js} +4 -4
- package/dist/chunks/{footer-actions.0268a57b.js.map → footer-actions.093f0cbe.js.map} +1 -1
- package/dist/chunks/{index.302e9cf2.js → index.096f3429.js} +2 -2
- package/dist/chunks/{index.302e9cf2.js.map → index.096f3429.js.map} +1 -1
- package/dist/chunks/{index.932c230b.js → index.4c011bf9.js} +7 -7
- package/dist/chunks/{index.932c230b.js.map → index.4c011bf9.js.map} +1 -1
- package/dist/chunks/index.7e9406c4.js +32 -0
- package/dist/chunks/{index.026ae47b.js.map → index.7e9406c4.js.map} +1 -1
- package/dist/chunks/{index.45cd2344.js → index.973e0dbe.js} +15 -15
- package/dist/chunks/{index.45cd2344.js.map → index.973e0dbe.js.map} +1 -1
- package/dist/chunks/{index.408e1419.js → index.9e16359f.js} +138 -137
- package/dist/chunks/index.9e16359f.js.map +1 -0
- package/dist/chunks/{index.0bb773a7.js → index.9f7e23cb.js} +7 -7
- package/dist/chunks/{index.0bb773a7.js.map → index.9f7e23cb.js.map} +1 -1
- package/dist/chunks/{index.10b9618d.js → index.b86a901b.js} +2 -2
- package/dist/chunks/{index.10b9618d.js.map → index.b86a901b.js.map} +1 -1
- package/dist/chunks/{index.5bfc67d1.js → index.e1f51235.js} +2 -2
- package/dist/chunks/{index.5bfc67d1.js.map → index.e1f51235.js.map} +1 -1
- package/dist/chunks/{index.5b47c56b.js → index.e537c4f4.js} +18 -16
- package/dist/chunks/index.e537c4f4.js.map +1 -0
- package/dist/chunks/{index.a52b98d1.js → index.efda8afc.js} +8 -8
- package/dist/chunks/{index.a52b98d1.js.map → index.efda8afc.js.map} +1 -1
- package/dist/chunks/{index.dc985e76.js → index.f03831cf.js} +3 -3
- package/dist/chunks/{index.dc985e76.js.map → index.f03831cf.js.map} +1 -1
- package/dist/chunks/{index.de687404.js → index.f64eee15.js} +22 -22
- package/dist/chunks/{index.de687404.js.map → index.f64eee15.js.map} +1 -1
- package/dist/chunks/{info-filled.c37e091d.js → info-filled.c7bd493a.js} +2 -2
- package/dist/chunks/{info-filled.c37e091d.js.map → info-filled.c7bd493a.js.map} +1 -1
- package/dist/chunks/{info.8b6328aa.js → info.04ff164c.js} +2 -2
- package/dist/chunks/{info.8b6328aa.js.map → info.04ff164c.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.89846151.js → listbox-option-tag.1c6a0605.js} +3 -3
- package/dist/chunks/{listbox-option-tag.89846151.js.map → listbox-option-tag.1c6a0605.js.map} +1 -1
- package/dist/chunks/{listbox.a8180c4a.js → listbox.2a5fb14f.js} +8 -8
- package/dist/chunks/{listbox.a8180c4a.js.map → listbox.2a5fb14f.js.map} +1 -1
- package/dist/chunks/{loading-button.50dddf2f.js → loading-button.c7b30923.js} +4 -4
- package/dist/chunks/{loading-button.50dddf2f.js.map → loading-button.c7b30923.js.map} +1 -1
- package/dist/chunks/{refresh.71a03998.js → refresh.14e39831.js} +2 -2
- package/dist/chunks/{refresh.71a03998.js.map → refresh.14e39831.js.map} +1 -1
- package/dist/chunks/{search.471270fe.js → search.eca6bd88.js} +2 -2
- package/dist/chunks/{search.471270fe.js.map → search.eca6bd88.js.map} +1 -1
- package/dist/chunks/{tooltip.6748027a.js → tooltip.a76de645.js} +3 -3
- package/dist/chunks/{tooltip.6748027a.js.map → tooltip.a76de645.js.map} +1 -1
- package/dist/code-snippet.js +181 -165
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +8 -8
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +6 -6
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +608 -602
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +5 -5
- package/dist/index.js +19 -19
- package/dist/info-icon.js +4 -4
- package/dist/input-field.js +4 -4
- package/dist/internal.js +8 -8
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +7 -7
- package/dist/modal.js +6 -6
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +43 -43
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +10 -10
- package/dist/search-bar.js.map +1 -1
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +6 -6
- package/dist/status.js +1 -1
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +7 -7
- package/dist/toast.js +5 -5
- package/dist/toggle.js +3 -3
- package/dist/tutorial.js +7 -7
- package/dist/typography.js +1 -1
- package/dist/web-types.json +10 -1
- package/package.json +3 -3
- package/dist/chunks/base-modal.27c6f2db.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.59803edd.js.map +0 -1
- package/dist/chunks/index.026ae47b.js +0 -32
- package/dist/chunks/index.408e1419.js.map +0 -1
- package/dist/chunks/index.5b47c56b.js.map +0 -1
- /package/dist/assets/{cross.css → checkmark-circle-fill.css} +0 -0
package/dist/code-snippet.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { defineComponent as Ve, ref as ae, computed as re, shallowRef as Ae, onMounted as $e, watch as De, watchEffect as Je } from "vue";
|
|
2
2
|
import { highlightActiveLine as Ue, keymap as We, EditorView as Ie, lineNumbers as Ge } from "@codemirror/view";
|
|
3
|
-
import { Compartment as be, EditorState as Le } from "@codemirror/state";
|
|
4
|
-
import { indentWithTab as Ke, history as
|
|
5
|
-
import { syntaxHighlighting as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { B as
|
|
19
|
-
import "./assets/
|
|
20
|
-
const
|
|
21
|
-
let
|
|
3
|
+
import { EditorSelection as Fe, Compartment as be, EditorState as Le } from "@codemirror/state";
|
|
4
|
+
import { indentWithTab as Ke, history as qe } from "@codemirror/commands";
|
|
5
|
+
import { syntaxHighlighting as Xe, HighlightStyle as Ze } from "@codemirror/language";
|
|
6
|
+
import { B as Qe } from "./chunks/dropdown.7ad3a860.js";
|
|
7
|
+
import { g as Ye } from "./chunks/base-modal.9d4f6201.js";
|
|
8
|
+
import { a as et } from "./chunks/button.8738aa07.js";
|
|
9
|
+
import { B as tt } from "./chunks/index.f64eee15.js";
|
|
10
|
+
import { BentoLoadingIndicator as nt } from "./loading-indicator.js";
|
|
11
|
+
import { u as rt } from "./chunks/i18n.eb5b985b.js";
|
|
12
|
+
import { n as He } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
13
|
+
import { C as it } from "./chunks/copy.2aca9aaf.js";
|
|
14
|
+
import { json as st } from "@codemirror/lang-json";
|
|
15
|
+
import { xml as lt } from "@codemirror/lang-xml";
|
|
16
|
+
import { javascript as ot } from "@codemirror/lang-javascript";
|
|
17
|
+
import { java as at } from "@codemirror/lang-java";
|
|
18
|
+
import { B as ut } from "./chunks/tooltip.a76de645.js";
|
|
19
|
+
import "./assets/index22.css";
|
|
20
|
+
const ft = 1024;
|
|
21
|
+
let ht = 0;
|
|
22
22
|
class v {
|
|
23
23
|
/**
|
|
24
24
|
Create a new node prop type.
|
|
25
25
|
*/
|
|
26
26
|
constructor(e = {}) {
|
|
27
|
-
this.id =
|
|
27
|
+
this.id = ht++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
|
|
28
28
|
throw new Error("This node type doesn't define a deserialize function");
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -68,7 +68,7 @@ class ge {
|
|
|
68
68
|
return e && e.props && e.props[v.mounted.id];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const ct = /* @__PURE__ */ Object.create(null);
|
|
72
72
|
class W {
|
|
73
73
|
/**
|
|
74
74
|
@internal
|
|
@@ -80,7 +80,7 @@ class W {
|
|
|
80
80
|
Define a node type.
|
|
81
81
|
*/
|
|
82
82
|
static define(e) {
|
|
83
|
-
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) :
|
|
83
|
+
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : ct, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), r = new W(e.name || "", t, e.id, n);
|
|
84
84
|
if (e.props) {
|
|
85
85
|
for (let s of e.props)
|
|
86
86
|
if (Array.isArray(s) || (s = s(r)), s) {
|
|
@@ -217,7 +217,7 @@ class V {
|
|
|
217
217
|
tree.
|
|
218
218
|
*/
|
|
219
219
|
get topNode() {
|
|
220
|
-
return new
|
|
220
|
+
return new E(this, 0, 0, null);
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
223
|
Get the [syntax node](#common.SyntaxNode) at the given position.
|
|
@@ -253,7 +253,7 @@ class V {
|
|
|
253
253
|
position.
|
|
254
254
|
*/
|
|
255
255
|
resolveStack(e, t = 0) {
|
|
256
|
-
return
|
|
256
|
+
return gt(this, e, t);
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
Iterate over the tree and its children, calling `enter` for any
|
|
@@ -310,7 +310,7 @@ class V {
|
|
|
310
310
|
or a cursor over such a buffer.
|
|
311
311
|
*/
|
|
312
312
|
static build(e) {
|
|
313
|
-
return
|
|
313
|
+
return mt(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
V.empty = new V(W.none, [], [], 0);
|
|
@@ -379,7 +379,7 @@ class q {
|
|
|
379
379
|
*/
|
|
380
380
|
findChild(e, t, n, r, s) {
|
|
381
381
|
let { buffer: l } = this, u = -1;
|
|
382
|
-
for (let h = e; h != t && !(
|
|
382
|
+
for (let h = e; h != t && !(Pe(s, r, l[h + 1], l[h + 2]) && (u = h, n > 0)); h = l[h + 3])
|
|
383
383
|
;
|
|
384
384
|
return u;
|
|
385
385
|
}
|
|
@@ -396,7 +396,7 @@ class q {
|
|
|
396
396
|
return new q(s, l, this.set);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Pe(i, e, t, n) {
|
|
400
400
|
switch (i) {
|
|
401
401
|
case -2:
|
|
402
402
|
return t < e;
|
|
@@ -414,7 +414,7 @@ function Te(i, e, t, n) {
|
|
|
414
414
|
}
|
|
415
415
|
function le(i, e, t, n) {
|
|
416
416
|
for (var r; i.from == i.to || (t < 1 ? i.from >= e : i.from > e) || (t > -1 ? i.to <= e : i.to < e); ) {
|
|
417
|
-
let l = !n && i instanceof
|
|
417
|
+
let l = !n && i instanceof E && i.index < 0 ? null : i.parent;
|
|
418
418
|
if (!l)
|
|
419
419
|
return i;
|
|
420
420
|
i = l;
|
|
@@ -422,7 +422,7 @@ function le(i, e, t, n) {
|
|
|
422
422
|
let s = n ? 0 : S.IgnoreOverlays;
|
|
423
423
|
if (n)
|
|
424
424
|
for (let l = i, u = l.parent; u; l = u, u = l.parent)
|
|
425
|
-
l instanceof
|
|
425
|
+
l instanceof E && l.index < 0 && ((r = u.enter(e, t, s)) === null || r === void 0 ? void 0 : r.from) != l.from && (i = u);
|
|
426
426
|
for (; ; ) {
|
|
427
427
|
let l = i.enter(e, t, s);
|
|
428
428
|
if (!l)
|
|
@@ -435,11 +435,11 @@ class je {
|
|
|
435
435
|
return new _e(this, e);
|
|
436
436
|
}
|
|
437
437
|
getChild(e, t = null, n = null) {
|
|
438
|
-
let r =
|
|
438
|
+
let r = Ee(this, e, t, n);
|
|
439
439
|
return r.length ? r[0] : null;
|
|
440
440
|
}
|
|
441
441
|
getChildren(e, t = null, n = null) {
|
|
442
|
-
return
|
|
442
|
+
return Ee(this, e, t, n);
|
|
443
443
|
}
|
|
444
444
|
resolve(e, t = 0) {
|
|
445
445
|
return le(this, e, t, !1);
|
|
@@ -467,7 +467,7 @@ class je {
|
|
|
467
467
|
return this.parent;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
class
|
|
470
|
+
class E extends je {
|
|
471
471
|
constructor(e, t, n, r) {
|
|
472
472
|
super(), this._tree = e, this.from = t, this.index = n, this._parent = r;
|
|
473
473
|
}
|
|
@@ -484,19 +484,19 @@ class O extends je {
|
|
|
484
484
|
for (let l = this; ; ) {
|
|
485
485
|
for (let { children: u, positions: h } = l._tree, k = t > 0 ? u.length : -1; e != k; e += t) {
|
|
486
486
|
let C = u[e], N = h[e] + l.from;
|
|
487
|
-
if (
|
|
487
|
+
if (Pe(r, n, N, N + C.length)) {
|
|
488
488
|
if (C instanceof q) {
|
|
489
489
|
if (s & S.ExcludeBuffers)
|
|
490
490
|
continue;
|
|
491
491
|
let A = C.findChild(0, C.buffer.length, t, n - N, r);
|
|
492
492
|
if (A > -1)
|
|
493
|
-
return new
|
|
493
|
+
return new K(new dt(l, C, e, N), null, A);
|
|
494
494
|
} else if (s & S.IncludeAnonymous || !C.type.isAnonymous || Ce(C)) {
|
|
495
495
|
let A;
|
|
496
496
|
if (!(s & S.IgnoreMounts) && (A = ge.get(C)) && !A.overlay)
|
|
497
|
-
return new
|
|
498
|
-
let
|
|
499
|
-
return s & S.IncludeAnonymous || !
|
|
497
|
+
return new E(A.tree, N, e, l);
|
|
498
|
+
let z = new E(C, N, e, l);
|
|
499
|
+
return s & S.IncludeAnonymous || !z.type.isAnonymous ? z : z.nextChild(t < 0 ? C.children.length - 1 : 0, t, n, r);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}
|
|
@@ -546,7 +546,7 @@ class O extends je {
|
|
|
546
546
|
let s = e - this.from;
|
|
547
547
|
for (let { from: l, to: u } of r.overlay)
|
|
548
548
|
if ((t > 0 ? l <= s : l < s) && (t < 0 ? u >= s : u > s))
|
|
549
|
-
return new
|
|
549
|
+
return new E(r.tree, r.overlay[0].from + this.from, -1, this);
|
|
550
550
|
}
|
|
551
551
|
return this.nextChild(0, 1, e, t, n);
|
|
552
552
|
}
|
|
@@ -590,7 +590,7 @@ class O extends je {
|
|
|
590
590
|
return this._tree.toString();
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Ee(i, e, t, n) {
|
|
594
594
|
let r = i.cursor(), s = [];
|
|
595
595
|
if (!r.firstChild())
|
|
596
596
|
return s;
|
|
@@ -618,12 +618,12 @@ function xe(i, e, t = e.length - 1) {
|
|
|
618
618
|
}
|
|
619
619
|
return !0;
|
|
620
620
|
}
|
|
621
|
-
class
|
|
621
|
+
class dt {
|
|
622
622
|
constructor(e, t, n, r) {
|
|
623
623
|
this.parent = e, this.buffer = t, this.index = n, this.start = r;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
class
|
|
626
|
+
class K extends je {
|
|
627
627
|
get name() {
|
|
628
628
|
return this.type.name;
|
|
629
629
|
}
|
|
@@ -638,7 +638,7 @@ class F extends je {
|
|
|
638
638
|
}
|
|
639
639
|
child(e, t, n) {
|
|
640
640
|
let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], e, t - this.context.start, n);
|
|
641
|
-
return s < 0 ? null : new
|
|
641
|
+
return s < 0 ? null : new K(this.context, this, s);
|
|
642
642
|
}
|
|
643
643
|
get firstChild() {
|
|
644
644
|
return this.child(
|
|
@@ -676,7 +676,7 @@ class F extends je {
|
|
|
676
676
|
if (n & S.ExcludeBuffers)
|
|
677
677
|
return null;
|
|
678
678
|
let { buffer: r } = this.context, s = r.findChild(this.index + 4, r.buffer[this.index + 3], t > 0 ? 1 : -1, e - this.context.start, t);
|
|
679
|
-
return s < 0 ? null : new
|
|
679
|
+
return s < 0 ? null : new K(this.context, this, s);
|
|
680
680
|
}
|
|
681
681
|
get parent() {
|
|
682
682
|
return this._parent || this.context.parent.nextSignificantParent();
|
|
@@ -692,11 +692,11 @@ class F extends je {
|
|
|
692
692
|
}
|
|
693
693
|
get nextSibling() {
|
|
694
694
|
let { buffer: e } = this.context, t = e.buffer[this.index + 3];
|
|
695
|
-
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new
|
|
695
|
+
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new K(this.context, this._parent, t) : this.externalSibling(1);
|
|
696
696
|
}
|
|
697
697
|
get prevSibling() {
|
|
698
698
|
let { buffer: e } = this.context, t = this._parent ? this._parent.index + 4 : 0;
|
|
699
|
-
return this.index == t ? this.externalSibling(-1) : new
|
|
699
|
+
return this.index == t ? this.externalSibling(-1) : new K(this.context, this._parent, e.findChild(
|
|
700
700
|
t,
|
|
701
701
|
this.index,
|
|
702
702
|
-1,
|
|
@@ -731,10 +731,10 @@ function Re(i) {
|
|
|
731
731
|
let l = i[s];
|
|
732
732
|
(l.from > t.from || l.to < t.to) && (t = l, e = s);
|
|
733
733
|
}
|
|
734
|
-
let n = t instanceof
|
|
735
|
-
return n ? r[e] = n : r.splice(e, 1), new
|
|
734
|
+
let n = t instanceof E && t.index < 0 ? null : t.parent, r = i.slice();
|
|
735
|
+
return n ? r[e] = n : r.splice(e, 1), new pt(r, t);
|
|
736
736
|
}
|
|
737
|
-
class
|
|
737
|
+
class pt {
|
|
738
738
|
constructor(e, t) {
|
|
739
739
|
this.heads = e, this.node = t;
|
|
740
740
|
}
|
|
@@ -742,16 +742,16 @@ class dt {
|
|
|
742
742
|
return Re(this.heads);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function gt(i, e, t) {
|
|
746
746
|
let n = i.resolveInner(e, t), r = null;
|
|
747
|
-
for (let s = n instanceof
|
|
747
|
+
for (let s = n instanceof E ? n : n.context.parent; s; s = s.parent)
|
|
748
748
|
if (s.index < 0) {
|
|
749
749
|
let l = s.parent;
|
|
750
750
|
(r || (r = [n])).push(l.resolve(e, t)), s = l;
|
|
751
751
|
} else {
|
|
752
752
|
let l = ge.get(s.tree);
|
|
753
753
|
if (l && l.overlay && l.overlay[0].from <= e && l.overlay[l.overlay.length - 1].to >= e) {
|
|
754
|
-
let u = new
|
|
754
|
+
let u = new E(l.tree, l.overlay[0].from + s.from, -1, s);
|
|
755
755
|
(r || (r = [n])).push(le(u, e, t, !1));
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -768,7 +768,7 @@ class _e {
|
|
|
768
768
|
@internal
|
|
769
769
|
*/
|
|
770
770
|
constructor(e, t = 0) {
|
|
771
|
-
if (this.mode = t, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof
|
|
771
|
+
if (this.mode = t, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof E)
|
|
772
772
|
this.yieldNode(e);
|
|
773
773
|
else {
|
|
774
774
|
this._tree = e.context.parent, this.buffer = e.context;
|
|
@@ -789,7 +789,7 @@ class _e {
|
|
|
789
789
|
@internal
|
|
790
790
|
*/
|
|
791
791
|
yield(e) {
|
|
792
|
-
return e ? e instanceof
|
|
792
|
+
return e ? e instanceof E ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
|
|
793
793
|
}
|
|
794
794
|
/**
|
|
795
795
|
@internal
|
|
@@ -998,8 +998,8 @@ class _e {
|
|
|
998
998
|
r = this.stack[--s];
|
|
999
999
|
}
|
|
1000
1000
|
for (let r = n; r < this.stack.length; r++)
|
|
1001
|
-
t = new
|
|
1002
|
-
return this.bufferNode = new
|
|
1001
|
+
t = new K(this.buffer, t, this.stack[r]);
|
|
1002
|
+
return this.bufferNode = new K(this.buffer, t, this.index);
|
|
1003
1003
|
}
|
|
1004
1004
|
/**
|
|
1005
1005
|
Get the [tree](#common.Tree) that represents the current node, if
|
|
@@ -1057,9 +1057,9 @@ class _e {
|
|
|
1057
1057
|
function Ce(i) {
|
|
1058
1058
|
return i.children.some((e) => e instanceof q || !e.type.isAnonymous || Ce(e));
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function mt(i) {
|
|
1061
1061
|
var e;
|
|
1062
|
-
let { buffer: t, nodeSet: n, maxBufferLength: r =
|
|
1062
|
+
let { buffer: t, nodeSet: n, maxBufferLength: r = ft, reused: s = [], minRepeatType: l = n.types.length } = i, u = Array.isArray(t) ? new ke(t, t.length) : t, h = n.types, k = 0, C = 0;
|
|
1063
1063
|
function N(g, b, f, y, p, m) {
|
|
1064
1064
|
let { id: c, start: d, end: _, size: x } = u, L = C;
|
|
1065
1065
|
for (; x < 0; )
|
|
@@ -1076,22 +1076,22 @@ function gt(i) {
|
|
|
1076
1076
|
} else
|
|
1077
1077
|
throw new RangeError(`Unrecognized record size: ${x}`);
|
|
1078
1078
|
let X = h[c], te, Z, Ne = d - g;
|
|
1079
|
-
if (_ - d <= r && (Z =
|
|
1080
|
-
let U = new Uint16Array(Z.size - Z.skip), B = u.pos - Z.size,
|
|
1079
|
+
if (_ - d <= r && (Z = O(u.pos - b, p))) {
|
|
1080
|
+
let U = new Uint16Array(Z.size - Z.skip), B = u.pos - Z.size, T = U.length;
|
|
1081
1081
|
for (; u.pos > B; )
|
|
1082
|
-
|
|
1082
|
+
T = $(Z.start, U, T);
|
|
1083
1083
|
te = new q(U, _ - Z.start, n), Ne = Z.start - g;
|
|
1084
1084
|
} else {
|
|
1085
1085
|
let U = u.pos - x;
|
|
1086
1086
|
u.next();
|
|
1087
|
-
let B = [],
|
|
1087
|
+
let B = [], T = [], Q = c >= l ? c : -1, ne = 0, oe = _;
|
|
1088
1088
|
for (; u.pos > U; )
|
|
1089
|
-
Q >= 0 && u.id == Q && u.size >= 0 ? (u.end <= oe - r && (I(B,
|
|
1090
|
-
if (Q >= 0 && ne > 0 && ne < B.length && I(B,
|
|
1091
|
-
let Se =
|
|
1092
|
-
te = we(X, B,
|
|
1089
|
+
Q >= 0 && u.id == Q && u.size >= 0 ? (u.end <= oe - r && (I(B, T, d, ne, u.end, oe, Q, L), ne = B.length, oe = u.end), u.next()) : m > 2500 ? A(d, U, B, T) : N(d, U, B, T, Q, m + 1);
|
|
1090
|
+
if (Q >= 0 && ne > 0 && ne < B.length && I(B, T, d, ne, d, oe, Q, L), B.reverse(), T.reverse(), Q > -1 && ne > 0) {
|
|
1091
|
+
let Se = z(X);
|
|
1092
|
+
te = we(X, B, T, 0, B.length, 0, _ - d, Se, Se);
|
|
1093
1093
|
} else
|
|
1094
|
-
te = M(X, B,
|
|
1094
|
+
te = M(X, B, T, _ - d, L - _);
|
|
1095
1095
|
}
|
|
1096
1096
|
f.push(te), y.push(Ne);
|
|
1097
1097
|
}
|
|
@@ -1114,7 +1114,7 @@ function gt(i) {
|
|
|
1114
1114
|
f.push(new q(d, p[2] - _, n)), y.push(_ - g);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function z(g) {
|
|
1118
1118
|
return (b, f, y) => {
|
|
1119
1119
|
let p = 0, m = b.length - 1, c, d;
|
|
1120
1120
|
if (m >= 0 && (c = b[m]) instanceof V) {
|
|
@@ -1142,7 +1142,7 @@ function gt(i) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
return new V(g, b, f, y, m);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function O(g, b) {
|
|
1146
1146
|
let f = u.fork(), y = 0, p = 0, m = 0, c = f.end - r, d = { size: 0, start: 0, skip: 0 };
|
|
1147
1147
|
e:
|
|
1148
1148
|
for (let _ = f.pos - g; f.pos > _; ) {
|
|
@@ -1189,11 +1189,11 @@ function gt(i) {
|
|
|
1189
1189
|
let J = (e = i.length) !== null && e !== void 0 ? e : D.length ? w[0] + D[0].length : 0;
|
|
1190
1190
|
return new V(h[i.topID], D.reverse(), w.reverse(), J);
|
|
1191
1191
|
}
|
|
1192
|
-
const
|
|
1192
|
+
const Oe = /* @__PURE__ */ new WeakMap();
|
|
1193
1193
|
function de(i, e) {
|
|
1194
1194
|
if (!i.isAnonymous || e instanceof q || e.type != i)
|
|
1195
1195
|
return 1;
|
|
1196
|
-
let t =
|
|
1196
|
+
let t = Oe.get(e);
|
|
1197
1197
|
if (t == null) {
|
|
1198
1198
|
t = 1;
|
|
1199
1199
|
for (let n of e.children) {
|
|
@@ -1203,7 +1203,7 @@ function de(i, e) {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
t += de(i, n);
|
|
1205
1205
|
}
|
|
1206
|
-
|
|
1206
|
+
Oe.set(e, t);
|
|
1207
1207
|
}
|
|
1208
1208
|
return t;
|
|
1209
1209
|
}
|
|
@@ -1215,8 +1215,8 @@ function we(i, e, t, n, r, s, l, u, h) {
|
|
|
1215
1215
|
k * 1.5 / 8
|
|
1216
1216
|
/* Balance.BranchFactor */
|
|
1217
1217
|
), N = [], A = [];
|
|
1218
|
-
function
|
|
1219
|
-
for (let w =
|
|
1218
|
+
function z(I, M, O, $, D) {
|
|
1219
|
+
for (let w = O; w < $; ) {
|
|
1220
1220
|
let J = w, g = M[w], b = de(i, I[w]);
|
|
1221
1221
|
for (w++; w < $; w++) {
|
|
1222
1222
|
let f = de(i, I[w]);
|
|
@@ -1227,7 +1227,7 @@ function we(i, e, t, n, r, s, l, u, h) {
|
|
|
1227
1227
|
if (w == J + 1) {
|
|
1228
1228
|
if (b > C) {
|
|
1229
1229
|
let f = I[J];
|
|
1230
|
-
|
|
1230
|
+
z(f.children, f.positions, 0, f.children.length, M[J] + D);
|
|
1231
1231
|
continue;
|
|
1232
1232
|
}
|
|
1233
1233
|
N.push(I[J]);
|
|
@@ -1238,16 +1238,16 @@ function we(i, e, t, n, r, s, l, u, h) {
|
|
|
1238
1238
|
A.push(g + D - s);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
return
|
|
1241
|
+
return z(e, t, n, r, 0), (u || h)(N, A, l);
|
|
1242
1242
|
}
|
|
1243
1243
|
new v({ perNode: !0 });
|
|
1244
|
-
let
|
|
1244
|
+
let bt = 0;
|
|
1245
1245
|
class R {
|
|
1246
1246
|
/**
|
|
1247
1247
|
@internal
|
|
1248
1248
|
*/
|
|
1249
1249
|
constructor(e, t, n) {
|
|
1250
|
-
this.set = e, this.base = t, this.modified = n, this.id =
|
|
1250
|
+
this.set = e, this.base = t, this.modified = n, this.id = bt++;
|
|
1251
1251
|
}
|
|
1252
1252
|
/**
|
|
1253
1253
|
Define a new tag. If `parent` is given, the tag is treated as a
|
|
@@ -1282,21 +1282,21 @@ class R {
|
|
|
1282
1282
|
return (t) => t.modified.indexOf(e) > -1 ? t : me.get(t.base || t, t.modified.concat(e).sort((n, r) => n.id - r.id));
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
let
|
|
1285
|
+
let yt = 0;
|
|
1286
1286
|
class me {
|
|
1287
1287
|
constructor() {
|
|
1288
|
-
this.instances = [], this.id =
|
|
1288
|
+
this.instances = [], this.id = yt++;
|
|
1289
1289
|
}
|
|
1290
1290
|
static get(e, t) {
|
|
1291
1291
|
if (!t.length)
|
|
1292
1292
|
return e;
|
|
1293
|
-
let n = t[0].instances.find((u) => u.base == e &&
|
|
1293
|
+
let n = t[0].instances.find((u) => u.base == e && xt(t, u.modified));
|
|
1294
1294
|
if (n)
|
|
1295
1295
|
return n;
|
|
1296
1296
|
let r = [], s = new R(r, e, t);
|
|
1297
1297
|
for (let u of t)
|
|
1298
1298
|
u.instances.push(s);
|
|
1299
|
-
let l =
|
|
1299
|
+
let l = _t(t);
|
|
1300
1300
|
for (let u of e.set)
|
|
1301
1301
|
if (!u.modified.length)
|
|
1302
1302
|
for (let h of l)
|
|
@@ -1304,10 +1304,10 @@ class me {
|
|
|
1304
1304
|
return s;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function xt(i, e) {
|
|
1308
1308
|
return i.length == e.length && i.every((t, n) => t == e[n]);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function _t(i) {
|
|
1311
1311
|
let e = [[]];
|
|
1312
1312
|
for (let t = 0; t < i.length; t++)
|
|
1313
1313
|
for (let n = 0, r = e.length; n < r; n++)
|
|
@@ -1315,7 +1315,7 @@ function xt(i) {
|
|
|
1315
1315
|
return e.sort((t, n) => n.length - t.length);
|
|
1316
1316
|
}
|
|
1317
1317
|
new v();
|
|
1318
|
-
function
|
|
1318
|
+
function vt(i, e) {
|
|
1319
1319
|
let t = /* @__PURE__ */ Object.create(null);
|
|
1320
1320
|
for (let s of i)
|
|
1321
1321
|
if (!Array.isArray(s.tag))
|
|
@@ -1340,7 +1340,7 @@ function _t(i, e) {
|
|
|
1340
1340
|
scope: n
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
|
-
const a = R.define, fe = a(), G = a(),
|
|
1343
|
+
const a = R.define, fe = a(), G = a(), ze = a(G), Me = a(G), F = a(), he = a(F), ye = a(F), j = a(), Y = a(j), H = a(), P = a(), ve = a(), ie = a(ve), ce = a(), o = {
|
|
1344
1344
|
/**
|
|
1345
1345
|
A comment.
|
|
1346
1346
|
*/
|
|
@@ -1368,11 +1368,11 @@ const a = R.define, fe = a(), G = a(), Ee = a(G), Me = a(G), K = a(), he = a(K),
|
|
|
1368
1368
|
/**
|
|
1369
1369
|
A type [name](#highlight.tags.name).
|
|
1370
1370
|
*/
|
|
1371
|
-
typeName:
|
|
1371
|
+
typeName: ze,
|
|
1372
1372
|
/**
|
|
1373
1373
|
A tag name (subtag of [`typeName`](#highlight.tags.typeName)).
|
|
1374
1374
|
*/
|
|
1375
|
-
tagName: a(
|
|
1375
|
+
tagName: a(ze),
|
|
1376
1376
|
/**
|
|
1377
1377
|
A property or field [name](#highlight.tags.name).
|
|
1378
1378
|
*/
|
|
@@ -1400,7 +1400,7 @@ const a = R.define, fe = a(), G = a(), Ee = a(G), Me = a(G), K = a(), he = a(K),
|
|
|
1400
1400
|
/**
|
|
1401
1401
|
A literal value.
|
|
1402
1402
|
*/
|
|
1403
|
-
literal:
|
|
1403
|
+
literal: F,
|
|
1404
1404
|
/**
|
|
1405
1405
|
A string [literal](#highlight.tags.literal).
|
|
1406
1406
|
*/
|
|
@@ -1432,106 +1432,106 @@ const a = R.define, fe = a(), G = a(), Ee = a(G), Me = a(G), K = a(), he = a(K),
|
|
|
1432
1432
|
/**
|
|
1433
1433
|
A boolean [literal](#highlight.tags.literal).
|
|
1434
1434
|
*/
|
|
1435
|
-
bool: a(
|
|
1435
|
+
bool: a(F),
|
|
1436
1436
|
/**
|
|
1437
1437
|
Regular expression [literal](#highlight.tags.literal).
|
|
1438
1438
|
*/
|
|
1439
|
-
regexp: a(
|
|
1439
|
+
regexp: a(F),
|
|
1440
1440
|
/**
|
|
1441
1441
|
An escape [literal](#highlight.tags.literal), for example a
|
|
1442
1442
|
backslash escape in a string.
|
|
1443
1443
|
*/
|
|
1444
|
-
escape: a(
|
|
1444
|
+
escape: a(F),
|
|
1445
1445
|
/**
|
|
1446
1446
|
A color [literal](#highlight.tags.literal).
|
|
1447
1447
|
*/
|
|
1448
|
-
color: a(
|
|
1448
|
+
color: a(F),
|
|
1449
1449
|
/**
|
|
1450
1450
|
A URL [literal](#highlight.tags.literal).
|
|
1451
1451
|
*/
|
|
1452
|
-
url: a(
|
|
1452
|
+
url: a(F),
|
|
1453
1453
|
/**
|
|
1454
1454
|
A language keyword.
|
|
1455
1455
|
*/
|
|
1456
|
-
keyword:
|
|
1456
|
+
keyword: H,
|
|
1457
1457
|
/**
|
|
1458
1458
|
The [keyword](#highlight.tags.keyword) for the self or this
|
|
1459
1459
|
object.
|
|
1460
1460
|
*/
|
|
1461
|
-
self: a(
|
|
1461
|
+
self: a(H),
|
|
1462
1462
|
/**
|
|
1463
1463
|
The [keyword](#highlight.tags.keyword) for null.
|
|
1464
1464
|
*/
|
|
1465
|
-
null: a(
|
|
1465
|
+
null: a(H),
|
|
1466
1466
|
/**
|
|
1467
1467
|
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
1468
1468
|
*/
|
|
1469
|
-
atom: a(
|
|
1469
|
+
atom: a(H),
|
|
1470
1470
|
/**
|
|
1471
1471
|
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
1472
1472
|
*/
|
|
1473
|
-
unit: a(
|
|
1473
|
+
unit: a(H),
|
|
1474
1474
|
/**
|
|
1475
1475
|
A modifier [keyword](#highlight.tags.keyword).
|
|
1476
1476
|
*/
|
|
1477
|
-
modifier: a(
|
|
1477
|
+
modifier: a(H),
|
|
1478
1478
|
/**
|
|
1479
1479
|
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
1480
1480
|
*/
|
|
1481
|
-
operatorKeyword: a(
|
|
1481
|
+
operatorKeyword: a(H),
|
|
1482
1482
|
/**
|
|
1483
1483
|
A control-flow related [keyword](#highlight.tags.keyword).
|
|
1484
1484
|
*/
|
|
1485
|
-
controlKeyword: a(
|
|
1485
|
+
controlKeyword: a(H),
|
|
1486
1486
|
/**
|
|
1487
1487
|
A [keyword](#highlight.tags.keyword) that defines something.
|
|
1488
1488
|
*/
|
|
1489
|
-
definitionKeyword: a(
|
|
1489
|
+
definitionKeyword: a(H),
|
|
1490
1490
|
/**
|
|
1491
1491
|
A [keyword](#highlight.tags.keyword) related to defining or
|
|
1492
1492
|
interfacing with modules.
|
|
1493
1493
|
*/
|
|
1494
|
-
moduleKeyword: a(
|
|
1494
|
+
moduleKeyword: a(H),
|
|
1495
1495
|
/**
|
|
1496
1496
|
An operator.
|
|
1497
1497
|
*/
|
|
1498
|
-
operator:
|
|
1498
|
+
operator: P,
|
|
1499
1499
|
/**
|
|
1500
1500
|
An [operator](#highlight.tags.operator) that dereferences something.
|
|
1501
1501
|
*/
|
|
1502
|
-
derefOperator: a(
|
|
1502
|
+
derefOperator: a(P),
|
|
1503
1503
|
/**
|
|
1504
1504
|
Arithmetic-related [operator](#highlight.tags.operator).
|
|
1505
1505
|
*/
|
|
1506
|
-
arithmeticOperator: a(
|
|
1506
|
+
arithmeticOperator: a(P),
|
|
1507
1507
|
/**
|
|
1508
1508
|
Logical [operator](#highlight.tags.operator).
|
|
1509
1509
|
*/
|
|
1510
|
-
logicOperator: a(
|
|
1510
|
+
logicOperator: a(P),
|
|
1511
1511
|
/**
|
|
1512
1512
|
Bit [operator](#highlight.tags.operator).
|
|
1513
1513
|
*/
|
|
1514
|
-
bitwiseOperator: a(
|
|
1514
|
+
bitwiseOperator: a(P),
|
|
1515
1515
|
/**
|
|
1516
1516
|
Comparison [operator](#highlight.tags.operator).
|
|
1517
1517
|
*/
|
|
1518
|
-
compareOperator: a(
|
|
1518
|
+
compareOperator: a(P),
|
|
1519
1519
|
/**
|
|
1520
1520
|
[Operator](#highlight.tags.operator) that updates its operand.
|
|
1521
1521
|
*/
|
|
1522
|
-
updateOperator: a(
|
|
1522
|
+
updateOperator: a(P),
|
|
1523
1523
|
/**
|
|
1524
1524
|
[Operator](#highlight.tags.operator) that defines something.
|
|
1525
1525
|
*/
|
|
1526
|
-
definitionOperator: a(
|
|
1526
|
+
definitionOperator: a(P),
|
|
1527
1527
|
/**
|
|
1528
1528
|
Type-related [operator](#highlight.tags.operator).
|
|
1529
1529
|
*/
|
|
1530
|
-
typeOperator: a(
|
|
1530
|
+
typeOperator: a(P),
|
|
1531
1531
|
/**
|
|
1532
1532
|
Control-flow [operator](#highlight.tags.operator).
|
|
1533
1533
|
*/
|
|
1534
|
-
controlOperator: a(
|
|
1534
|
+
controlOperator: a(P),
|
|
1535
1535
|
/**
|
|
1536
1536
|
Program or markup punctuation.
|
|
1537
1537
|
*/
|
|
@@ -1706,7 +1706,7 @@ const a = R.define, fe = a(), G = a(), Ee = a(G), Me = a(G), K = a(), he = a(K),
|
|
|
1706
1706
|
*/
|
|
1707
1707
|
special: R.defineModifier()
|
|
1708
1708
|
};
|
|
1709
|
-
|
|
1709
|
+
vt([
|
|
1710
1710
|
{ tag: o.link, class: "tok-link" },
|
|
1711
1711
|
{ tag: o.heading, class: "tok-heading" },
|
|
1712
1712
|
{ tag: o.emphasis, class: "tok-emphasis" },
|
|
@@ -1738,13 +1738,13 @@ _t([
|
|
|
1738
1738
|
{ tag: o.invalid, class: "tok-invalid" },
|
|
1739
1739
|
{ tag: o.punctuation, class: "tok-punctuation" }
|
|
1740
1740
|
]);
|
|
1741
|
-
const
|
|
1742
|
-
red:
|
|
1743
|
-
orange:
|
|
1744
|
-
green:
|
|
1745
|
-
blue:
|
|
1741
|
+
const kt = "#c72727", Ct = "#9b5700", wt = "#067934", Nt = "#0063d7", St = {
|
|
1742
|
+
red: kt,
|
|
1743
|
+
orange: Ct,
|
|
1744
|
+
green: wt,
|
|
1745
|
+
blue: Nt,
|
|
1746
1746
|
invalid: "#ffffff"
|
|
1747
|
-
},
|
|
1747
|
+
}, At = (i) => Ze.define([
|
|
1748
1748
|
{
|
|
1749
1749
|
tag: o.keyword,
|
|
1750
1750
|
color: i.red
|
|
@@ -1811,51 +1811,67 @@ const vt = "#c72727", kt = "#9b5700", Ct = "#067934", wt = "#0063d7", Nt = {
|
|
|
1811
1811
|
tag: o.invalid,
|
|
1812
1812
|
color: i.invalid
|
|
1813
1813
|
}
|
|
1814
|
-
]),
|
|
1814
|
+
]), It = Xe(At(St));
|
|
1815
1815
|
var pe = /* @__PURE__ */ ((i) => (i.INLINE = "inline", i.SINGLELINE = "singleline", i.MULTILINE = "multiline", i))(pe || {}), ee = /* @__PURE__ */ ((i) => (i.JSON = "json", i.XML = "xml", i.JAVA = "java", i.JAVASCRIPT = "javascript", i))(ee || {}), se = /* @__PURE__ */ ((i) => (i.ACTION = "action", i.CHANGE = "change", i))(se || {});
|
|
1816
|
-
const
|
|
1817
|
-
[ee.JSON]:
|
|
1818
|
-
[ee.XML]:
|
|
1819
|
-
[ee.JAVASCRIPT]:
|
|
1820
|
-
[ee.JAVA]:
|
|
1821
|
-
},
|
|
1822
|
-
|
|
1823
|
-
|
|
1816
|
+
const Lt = {
|
|
1817
|
+
[ee.JSON]: st,
|
|
1818
|
+
[ee.XML]: lt,
|
|
1819
|
+
[ee.JAVASCRIPT]: ot,
|
|
1820
|
+
[ee.JAVA]: at
|
|
1821
|
+
}, Bt = (i) => async () => Lt[i], Et = (i, e) => {
|
|
1822
|
+
const t = i.doc.lineAt(e.from), n = /^\s*/.exec(t.text);
|
|
1823
|
+
return n ? n[0] : "";
|
|
1824
|
+
}, Ot = {
|
|
1825
|
+
key: "Enter",
|
|
1826
|
+
run: ({ state: i, dispatch: e }) => {
|
|
1827
|
+
const t = i.changeByRange((n) => {
|
|
1828
|
+
const s = `
|
|
1829
|
+
${Et(i, n)}`;
|
|
1830
|
+
return {
|
|
1831
|
+
changes: { from: n.from, to: n.to, insert: s },
|
|
1832
|
+
range: Fe.cursor(n.from + s.length)
|
|
1833
|
+
};
|
|
1834
|
+
});
|
|
1835
|
+
return e(i.update(t, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
1836
|
+
}
|
|
1837
|
+
};
|
|
1838
|
+
let Te = 0;
|
|
1839
|
+
const zt = {
|
|
1824
1840
|
beforeCreate() {
|
|
1825
|
-
this.uuid =
|
|
1841
|
+
this.uuid = Te.toString(), Te += 1;
|
|
1826
1842
|
}
|
|
1827
1843
|
};
|
|
1828
|
-
var
|
|
1844
|
+
var Mt = function() {
|
|
1829
1845
|
var e = this, t = e._self._c;
|
|
1830
1846
|
return t("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("path", { attrs: { fill: "#00112C", d: "M14.75 1.25V6.75H13.25V3.81083L10.0001 7.06072L8.93945 6.00006L12.1895 2.75H9.25V1.25H14.75Z" } }), t("path", { attrs: { fill: "#00112C", d: "M2.75 12.1895V9.25H1.25V14.75H6.75V13.25H3.81083L7.06072 10.0001L6.00006 8.93945L2.75 12.1895Z" } })]);
|
|
1831
|
-
},
|
|
1832
|
-
Bt,
|
|
1833
|
-
Ot,
|
|
1847
|
+
}, Tt = [], Ht = /* @__PURE__ */ He(
|
|
1834
1848
|
zt,
|
|
1849
|
+
Mt,
|
|
1850
|
+
Tt,
|
|
1835
1851
|
!1,
|
|
1836
1852
|
null,
|
|
1837
1853
|
null,
|
|
1838
1854
|
null,
|
|
1839
1855
|
null
|
|
1840
1856
|
);
|
|
1841
|
-
const
|
|
1857
|
+
const Pt = Ht.exports, jt = {
|
|
1842
1858
|
"en-US": {
|
|
1843
1859
|
run: "Run",
|
|
1844
1860
|
expand: "Expand"
|
|
1845
1861
|
}
|
|
1846
|
-
},
|
|
1847
|
-
i18n: { messages:
|
|
1862
|
+
}, Rt = Ve({
|
|
1863
|
+
i18n: { messages: jt },
|
|
1848
1864
|
name: "bento-code-snippet",
|
|
1849
1865
|
components: {
|
|
1850
|
-
BentoTypography:
|
|
1851
|
-
BentoButton:
|
|
1852
|
-
BentoDropdown:
|
|
1853
|
-
Copy:
|
|
1854
|
-
BaseModal:
|
|
1855
|
-
BentoLoadingIndicator:
|
|
1856
|
-
ExpandIcon:
|
|
1866
|
+
BentoTypography: tt,
|
|
1867
|
+
BentoButton: et,
|
|
1868
|
+
BentoDropdown: Qe,
|
|
1869
|
+
Copy: it,
|
|
1870
|
+
BaseModal: Ye,
|
|
1871
|
+
BentoLoadingIndicator: nt,
|
|
1872
|
+
ExpandIcon: Pt
|
|
1857
1873
|
},
|
|
1858
|
-
directives: { BentoTooltipDirective:
|
|
1874
|
+
directives: { BentoTooltipDirective: ut },
|
|
1859
1875
|
props: {
|
|
1860
1876
|
/**
|
|
1861
1877
|
* Defines the variant of code-snippet
|
|
@@ -1928,27 +1944,27 @@ const Mt = Et.exports, Ht = {
|
|
|
1928
1944
|
},
|
|
1929
1945
|
emits: [se.ACTION, se.CHANGE],
|
|
1930
1946
|
setup(i, { emit: e }) {
|
|
1931
|
-
const { t } =
|
|
1947
|
+
const { t } = rt(), n = ae(null), r = [], s = () => {
|
|
1932
1948
|
}, l = re(() => i.langLabel ?? i.lang.toUpperCase()), u = re(() => i.variant === pe.INLINE), h = re(() => ({
|
|
1933
1949
|
"b-code-snippet--inline": u.value,
|
|
1934
1950
|
"b-code-snippet--scrollable": !u.value
|
|
1935
1951
|
})), k = re(() => ({
|
|
1936
1952
|
"b-code-snippet__code-area-content--editable": i.editable
|
|
1937
|
-
})), C =
|
|
1953
|
+
})), C = Bt(i.lang), N = Ae(), A = Ae(), z = new be(), I = new be(), M = new be(), O = ae(null), $ = ae(0);
|
|
1938
1954
|
$e(async () => {
|
|
1939
1955
|
const g = await C();
|
|
1940
|
-
|
|
1956
|
+
O.value = i.content;
|
|
1941
1957
|
const b = ({ state: p }) => {
|
|
1942
|
-
|
|
1958
|
+
O.value = p.doc.toString();
|
|
1943
1959
|
}, f = [
|
|
1944
1960
|
Ue(),
|
|
1945
|
-
We.of([Ke]),
|
|
1946
|
-
|
|
1947
|
-
I.of(
|
|
1961
|
+
We.of([Ke, Ot]),
|
|
1962
|
+
z.of(g()),
|
|
1963
|
+
I.of(It),
|
|
1948
1964
|
M.of(Le.readOnly.of(!i.editable)),
|
|
1949
1965
|
Ie.updateListener.of((p) => b(p))
|
|
1950
1966
|
];
|
|
1951
|
-
i.variant === "multiline" && f.push([Ge(),
|
|
1967
|
+
i.variant === "multiline" && f.push([Ge(), qe()]);
|
|
1952
1968
|
const y = Le.create({
|
|
1953
1969
|
doc: i.content,
|
|
1954
1970
|
extensions: [...f]
|
|
@@ -1960,7 +1976,7 @@ const Mt = Et.exports, Ht = {
|
|
|
1960
1976
|
}), De(
|
|
1961
1977
|
() => i.content,
|
|
1962
1978
|
() => {
|
|
1963
|
-
if (i.content !==
|
|
1979
|
+
if (i.content !== O.value) {
|
|
1964
1980
|
const g = i.content.length;
|
|
1965
1981
|
A.value.dispatch({
|
|
1966
1982
|
changes: {
|
|
@@ -1973,10 +1989,10 @@ const Mt = Et.exports, Ht = {
|
|
|
1973
1989
|
}
|
|
1974
1990
|
);
|
|
1975
1991
|
const D = re(() => t(i.actionableText)), w = () => {
|
|
1976
|
-
e(se.ACTION,
|
|
1992
|
+
e(se.ACTION, O.value);
|
|
1977
1993
|
};
|
|
1978
1994
|
Je(() => {
|
|
1979
|
-
|
|
1995
|
+
O.value !== null && e(se.CHANGE, O.value);
|
|
1980
1996
|
});
|
|
1981
1997
|
const J = ae(!1);
|
|
1982
1998
|
return {
|
|
@@ -1985,7 +2001,7 @@ const Mt = Et.exports, Ht = {
|
|
|
1985
2001
|
codeAreaContentConditionalClasses: k,
|
|
1986
2002
|
conditionalClasses: h,
|
|
1987
2003
|
container: N,
|
|
1988
|
-
currentContents:
|
|
2004
|
+
currentContents: O,
|
|
1989
2005
|
displayedLang: l,
|
|
1990
2006
|
editor: A,
|
|
1991
2007
|
selectedLanguage: n,
|
|
@@ -2000,7 +2016,7 @@ const Mt = Et.exports, Ht = {
|
|
|
2000
2016
|
};
|
|
2001
2017
|
}
|
|
2002
2018
|
});
|
|
2003
|
-
var
|
|
2019
|
+
var Vt = function() {
|
|
2004
2020
|
var e = this, t = e._self._c;
|
|
2005
2021
|
return e._self._setupProxy, t("div", { staticClass: "b-code-snippet", class: e.conditionalClasses }, [e.isInlineVariant ? e._e() : t("section", { staticClass: "b-code-snippet__action-bar" }, [t("div", { staticClass: "b-code-snippet__action-bar--start" }, [e.availableLanguages.length > 0 ? t("bento-dropdown", e._b({ staticClass: "b-code-snippet__language-picker", attrs: { disabled: e.availableLanguages.length === 1, items: e.availableLanguages }, on: { input: e.handleChangeLanguage }, model: { value: e.selectedLanguage, callback: function(n) {
|
|
2006
2022
|
e.selectedLanguage = n;
|
|
@@ -2017,19 +2033,19 @@ var Tt = function() {
|
|
|
2017
2033
|
} }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
2018
2034
|
return [t("bento-code-snippet", e._b({}, "bento-code-snippet", { ...e.$props, expandable: !1 }, !1))];
|
|
2019
2035
|
}, proxy: !0 }], null, !1, 3343589027) }) : e._e()], 1);
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2036
|
+
}, $t = [], Dt = /* @__PURE__ */ He(
|
|
2037
|
+
Rt,
|
|
2038
|
+
Vt,
|
|
2039
|
+
$t,
|
|
2024
2040
|
!1,
|
|
2025
2041
|
null,
|
|
2026
|
-
"
|
|
2042
|
+
"23626e8d",
|
|
2027
2043
|
null,
|
|
2028
2044
|
null
|
|
2029
2045
|
);
|
|
2030
|
-
const
|
|
2046
|
+
const an = Dt.exports;
|
|
2031
2047
|
export {
|
|
2032
|
-
|
|
2048
|
+
an as BentoCodeSnippet,
|
|
2033
2049
|
se as BentoCodeSnippetEvent,
|
|
2034
2050
|
ee as BentoCodeSnippetSupportedLanguage,
|
|
2035
2051
|
pe as BentoCodeSnippetVariant
|