@adyen/bento-vue3 1.26.0 → 1.27.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/components.d.ts +4 -0
- package/dist/@types/packages/core/src/utils/ts/storybook.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/code-snippet/utils/get-lang-loader.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-reorderer/use-column-reorderer.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-resizer.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +1 -18
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +36 -54
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +27 -22
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +76 -1
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +21 -2
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue.d.ts +78 -0
- package/dist/@types/packages/vue2/src/templates/dashboard-template/dashboard-template.types.d.ts +8 -0
- package/dist/@types/packages/vue2/src/templates/dashboard-template/dashboard-template.vue.d.ts +103 -0
- package/dist/@types/packages/vue2/src/templates/dashboard-template/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/utils/ts/storybook.d.ts +1 -12
- package/dist/accordion.js +3 -3
- package/dist/action-bar.js +71 -155
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +6 -6
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.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/index2.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/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.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/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.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/index49.css +1 -0
- 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/assets/use-cached-selected-values.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +4 -4
- package/dist/card.js +4 -4
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.e84acf30.js → base-button.a0140a4c.js} +2 -2
- package/dist/chunks/{base-button.e84acf30.js.map → base-button.a0140a4c.js.map} +1 -1
- package/dist/chunks/{base-modal.29e062d0.js → base-modal.4102f69d.js} +7 -7
- package/dist/chunks/{base-modal.29e062d0.js.map → base-modal.4102f69d.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.7fce47a2.js → button-actions-with-menu.4f311411.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.7fce47a2.js.map → button-actions-with-menu.4f311411.js.map} +1 -1
- package/dist/chunks/{button-actions.642b37de.js → button-actions.82163994.js} +42 -40
- package/dist/chunks/button-actions.82163994.js.map +1 -0
- package/dist/chunks/{button.60dad578.js → button.ae4760cd.js} +27 -26
- package/dist/chunks/button.ae4760cd.js.map +1 -0
- package/dist/chunks/{calendar.f38cdab9.js → calendar.a9c5a68c.js} +6 -6
- package/dist/chunks/{calendar.f38cdab9.js.map → calendar.a9c5a68c.js.map} +1 -1
- package/dist/chunks/{checkbox-input.ab758a81.js → checkbox-input.99336948.js} +2 -2
- package/dist/chunks/{checkbox-input.ab758a81.js.map → checkbox-input.99336948.js.map} +1 -1
- package/dist/chunks/{checkbox.f55ee3a5.js → checkbox.9c30c07b.js} +4 -4
- package/dist/chunks/{checkbox.f55ee3a5.js.map → checkbox.9c30c07b.js.map} +1 -1
- package/dist/chunks/{checkmark-circle-fill.f3a69c6a.js → checkmark-circle-fill.c45a999d.js} +2 -2
- package/dist/chunks/{checkmark-circle-fill.f3a69c6a.js.map → checkmark-circle-fill.c45a999d.js.map} +1 -1
- package/dist/chunks/{checkmark-small.d7e31e5e.js → checkmark-small.c79220d9.js} +2 -2
- package/dist/chunks/{checkmark-small.d7e31e5e.js.map → checkmark-small.c79220d9.js.map} +1 -1
- package/dist/chunks/{chevron-left.963d35e9.js → chevron-left.4ee92950.js} +2 -2
- package/dist/chunks/{chevron-left.963d35e9.js.map → chevron-left.4ee92950.js.map} +1 -1
- package/dist/chunks/{chevron-up.05ca20db.js → chevron-up.638a9f34.js} +2 -2
- package/dist/chunks/{chevron-up.05ca20db.js.map → chevron-up.638a9f34.js.map} +1 -1
- package/dist/chunks/{controls-group.9e0f17b2.js → controls-group.8357e3fd.js} +3 -3
- package/dist/chunks/{controls-group.9e0f17b2.js.map → controls-group.8357e3fd.js.map} +1 -1
- package/dist/chunks/{copy.852d4cb8.js → copy.60ee6ac3.js} +4 -4
- package/dist/chunks/{copy.852d4cb8.js.map → copy.60ee6ac3.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.81925c7f.js → cross-circle-fill.1abec1a2.js} +2 -2
- package/dist/chunks/{cross-circle-fill.81925c7f.js.map → cross-circle-fill.1abec1a2.js.map} +1 -1
- package/dist/chunks/{cross-small.9bc6a02f.js → cross-small.b85406fe.js} +2 -2
- package/dist/chunks/{cross-small.9bc6a02f.js.map → cross-small.b85406fe.js.map} +1 -1
- package/dist/chunks/{cross.a60533f6.js → cross.26509efc.js} +2 -2
- package/dist/chunks/{cross.a60533f6.js.map → cross.26509efc.js.map} +1 -1
- package/dist/chunks/{dialog-page.ea67bb14.js → dialog-page.cb6ce9b6.js} +3 -3
- package/dist/chunks/{dialog-page.ea67bb14.js.map → dialog-page.cb6ce9b6.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.ad5063c2.js → dropdown-default-textbox.cda0798f.js} +5 -5
- package/dist/chunks/{dropdown-default-textbox.ad5063c2.js.map → dropdown-default-textbox.cda0798f.js.map} +1 -1
- package/dist/chunks/{dropdown.d8587f36.js → dropdown.0ae3b842.js} +122 -132
- package/dist/chunks/dropdown.0ae3b842.js.map +1 -0
- package/dist/chunks/{error-message.3fb5573a.js → error-message.d2bdeb80.js} +3 -3
- package/dist/chunks/{error-message.3fb5573a.js.map → error-message.d2bdeb80.js.map} +1 -1
- package/dist/chunks/{events.58c00e6d.js → events.f14a214b.js} +5 -5
- package/dist/chunks/events.f14a214b.js.map +1 -0
- package/dist/chunks/{fixed-scroller.59aefd1b.js → fixed-scroller.7b42cb1e.js} +3 -3
- package/dist/chunks/{fixed-scroller.59aefd1b.js.map → fixed-scroller.7b42cb1e.js.map} +1 -1
- package/dist/chunks/{footer-actions.89e68269.js → footer-actions.64f6f5d8.js} +4 -4
- package/dist/chunks/{footer-actions.89e68269.js.map → footer-actions.64f6f5d8.js.map} +1 -1
- package/dist/chunks/{index.96cd0d4c.js → index.2d7b4511.js} +15 -15
- package/dist/chunks/{index.96cd0d4c.js.map → index.2d7b4511.js.map} +1 -1
- package/dist/chunks/index.2fcd1233.js +103 -0
- package/dist/chunks/index.2fcd1233.js.map +1 -0
- package/dist/chunks/{index.9bf04b01.js → index.6295e754.js} +3 -3
- package/dist/chunks/{index.9bf04b01.js.map → index.6295e754.js.map} +1 -1
- package/dist/chunks/{index.030c1dd7.js → index.6bb6f38c.js} +7 -7
- package/dist/chunks/{index.030c1dd7.js.map → index.6bb6f38c.js.map} +1 -1
- package/dist/chunks/{index.ba3396d3.js → index.8aa536a8.js} +3 -3
- package/dist/chunks/{index.ba3396d3.js.map → index.8aa536a8.js.map} +1 -1
- package/dist/chunks/{index.8be283d5.js → index.9d7fb316.js} +2 -2
- package/dist/chunks/{index.8be283d5.js.map → index.9d7fb316.js.map} +1 -1
- package/dist/chunks/{index.5bdebf9d.js → index.a001a0a8.js} +7 -7
- package/dist/chunks/{index.5bdebf9d.js.map → index.a001a0a8.js.map} +1 -1
- package/dist/chunks/{index.07122048.js → index.b18c78d6.js} +2 -2
- package/dist/chunks/{index.07122048.js.map → index.b18c78d6.js.map} +1 -1
- package/dist/chunks/{index.6e0e9d21.js → index.eb38a6c4.js} +3 -3
- package/dist/chunks/{index.6e0e9d21.js.map → index.eb38a6c4.js.map} +1 -1
- package/dist/chunks/{index.a3d60e4f.js → index.ee15db35.js} +2 -2
- package/dist/chunks/{index.a3d60e4f.js.map → index.ee15db35.js.map} +1 -1
- package/dist/chunks/{index.146f967e.js → index.f9d081d2.js} +2 -2
- package/dist/chunks/{index.146f967e.js.map → index.f9d081d2.js.map} +1 -1
- package/dist/chunks/index.fedbb4c2.js +125 -0
- package/dist/chunks/index.fedbb4c2.js.map +1 -0
- package/dist/chunks/{info.205b4496.js → info.550f9511.js} +2 -2
- package/dist/chunks/{info.205b4496.js.map → info.550f9511.js.map} +1 -1
- package/dist/chunks/{keyboard-navigation.ca47dfa8.js → keyboard-navigation.bbc3d15c.js} +2 -2
- package/dist/chunks/{keyboard-navigation.ca47dfa8.js.map → keyboard-navigation.bbc3d15c.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.b6182b2e.js → listbox-option-tag.2aea037c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.b6182b2e.js.map → listbox-option-tag.2aea037c.js.map} +1 -1
- package/dist/chunks/{loading-button.0391ad8b.js → loading-button.6b81b546.js} +4 -4
- package/dist/chunks/{loading-button.0391ad8b.js.map → loading-button.6b81b546.js.map} +1 -1
- package/dist/chunks/{payment-method.31a68b9b.js → payment-method.d5595a7c.js} +2 -2
- package/dist/chunks/{payment-method.31a68b9b.js.map → payment-method.d5595a7c.js.map} +1 -1
- package/dist/chunks/{refresh.53691839.js → refresh.bd60f6a8.js} +2 -2
- package/dist/chunks/{refresh.53691839.js.map → refresh.bd60f6a8.js.map} +1 -1
- package/dist/chunks/{search.4e4ee4dd.js → search.ade93bda.js} +2 -2
- package/dist/chunks/{search.4e4ee4dd.js.map → search.ade93bda.js.map} +1 -1
- package/dist/chunks/{tooltip.1084d92b.js → tooltip.36172265.js} +4 -4
- package/dist/chunks/{tooltip.1084d92b.js.map → tooltip.36172265.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.98d8613c.js → use-bento-toast-controller.3dc4e113.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.98d8613c.js.map → use-bento-toast-controller.3dc4e113.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.852aeafe.js → use-cached-selected-values.3c312296.js} +396 -375
- package/dist/chunks/use-cached-selected-values.3c312296.js.map +1 -0
- package/dist/code-snippet.js +137 -135
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +169 -0
- package/dist/dashboard-template.js.map +1 -0
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +52 -44
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +19 -19
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +7 -7
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +85 -83
- 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 +66 -63
- package/dist/index.js.map +1 -1
- 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 +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 +4 -4
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +66 -72
- package/dist/segmented-control.js.map +1 -1
- package/dist/selection-card.js +5 -5
- package/dist/sidepanel.js +7 -7
- package/dist/status.js +2 -2
- package/dist/stepper.js +5 -5
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +80 -78
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +7 -7
- package/dist/toast.js +4 -4
- package/dist/toggle.js +3 -3
- package/dist/tutorial.js +125 -110
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +8 -6
- package/dist/chunks/button-actions.642b37de.js.map +0 -1
- package/dist/chunks/button.60dad578.js.map +0 -1
- package/dist/chunks/checkmark.87919b24.js +0 -29
- package/dist/chunks/checkmark.87919b24.js.map +0 -1
- package/dist/chunks/dropdown.d8587f36.js.map +0 -1
- package/dist/chunks/events.58c00e6d.js.map +0 -1
- package/dist/chunks/index.c8ffede1.js +0 -168
- package/dist/chunks/index.c8ffede1.js.map +0 -1
- package/dist/chunks/use-cached-selected-values.852aeafe.js.map +0 -1
- /package/dist/assets/{checkmark-circle-fill.css → cross.css} +0 -0
package/dist/code-snippet.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { openBlock as O, createElementBlock as le, mergeProps as Fe, toDisplayString as Ae, createCommentVNode as F, createElementVNode as ae, defineComponent as
|
|
2
|
-
import { highlightActiveLine as at, keymap as ut, EditorView as
|
|
1
|
+
import { openBlock as O, createElementBlock as le, mergeProps as Fe, toDisplayString as Ae, createCommentVNode as F, createElementVNode as ae, defineComponent as Qe, ref as ge, computed as ue, shallowRef as Pe, onMounted as et, watch as tt, watchEffect as nt, resolveComponent as K, normalizeClass as He, createBlock as oe, createVNode as me, withCtx as he, createTextVNode as $e, renderSlot as rt, normalizeProps as it, guardReactiveProps as st, pushScopeId as ot, popScopeId as lt } from "vue";
|
|
2
|
+
import { highlightActiveLine as at, keymap as ut, EditorView as Ve, lineNumbers as ht } from "@codemirror/view";
|
|
3
3
|
import { EditorSelection as ft, Compartment as Ne, EditorState as je } from "@codemirror/state";
|
|
4
4
|
import { indentWithTab as ct, history as dt } from "@codemirror/commands";
|
|
5
5
|
import { syntaxHighlighting as pt, HighlightStyle as gt } from "@codemirror/language";
|
|
6
|
-
import { B as mt } from "./chunks/dropdown.
|
|
7
|
-
import { a as bt } from "./chunks/button.
|
|
8
|
-
import { B as yt } from "./chunks/index.
|
|
9
|
-
import { b as xt } from "./chunks/tooltip.
|
|
6
|
+
import { B as mt } from "./chunks/dropdown.0ae3b842.js";
|
|
7
|
+
import { a as bt } from "./chunks/button.ae4760cd.js";
|
|
8
|
+
import { B as yt } from "./chunks/index.ee15db35.js";
|
|
9
|
+
import { b as xt } from "./chunks/tooltip.36172265.js";
|
|
10
10
|
import { BentoLoadingIndicator as kt } from "./loading-indicator.js";
|
|
11
11
|
import { u as _t } from "./chunks/i18n.f7e6533e.js";
|
|
12
12
|
import { _ as qe } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
13
|
-
import { h as vt } from "./chunks/base-modal.
|
|
14
|
-
import { C as wt } from "./chunks/copy.
|
|
13
|
+
import { h as vt } from "./chunks/base-modal.4102f69d.js";
|
|
14
|
+
import { C as wt } from "./chunks/copy.60ee6ac3.js";
|
|
15
15
|
import { json as Ct } from "@codemirror/lang-json";
|
|
16
16
|
import { xml as Nt } from "@codemirror/lang-xml";
|
|
17
17
|
import { javascript as St } from "@codemirror/lang-javascript";
|
|
18
18
|
import { java as At } from "@codemirror/lang-java";
|
|
19
|
-
import "
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import { python as It } from "@codemirror/lang-python";
|
|
20
|
+
import "./assets/index46.css";
|
|
21
|
+
const Lt = 1024;
|
|
22
|
+
let Bt = 0;
|
|
22
23
|
class v {
|
|
23
24
|
/**
|
|
24
25
|
Create a new node prop type.
|
|
25
26
|
*/
|
|
26
27
|
constructor(e = {}) {
|
|
27
|
-
this.id =
|
|
28
|
+
this.id = Bt++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
|
|
28
29
|
throw new Error("This node type doesn't define a deserialize function");
|
|
29
30
|
});
|
|
30
31
|
}
|
|
@@ -68,7 +69,7 @@ class we {
|
|
|
68
69
|
return e && e.props && e.props[v.mounted.id];
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
const
|
|
72
|
+
const Et = /* @__PURE__ */ Object.create(null);
|
|
72
73
|
class G {
|
|
73
74
|
/**
|
|
74
75
|
@internal
|
|
@@ -80,7 +81,7 @@ class G {
|
|
|
80
81
|
Define a node type.
|
|
81
82
|
*/
|
|
82
83
|
static define(e) {
|
|
83
|
-
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) :
|
|
84
|
+
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : Et, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new G(e.name || "", t, e.id, n);
|
|
84
85
|
if (e.props) {
|
|
85
86
|
for (let s of e.props)
|
|
86
87
|
if (Array.isArray(s) || (s = s(i)), s) {
|
|
@@ -253,7 +254,7 @@ class R {
|
|
|
253
254
|
position.
|
|
254
255
|
*/
|
|
255
256
|
resolveStack(e, t = 0) {
|
|
256
|
-
return
|
|
257
|
+
return Mt(this, e, t);
|
|
257
258
|
}
|
|
258
259
|
/**
|
|
259
260
|
Iterate over the tree and its children, calling `enter` for any
|
|
@@ -310,7 +311,7 @@ class R {
|
|
|
310
311
|
or a cursor over such a buffer.
|
|
311
312
|
*/
|
|
312
313
|
static build(e) {
|
|
313
|
-
return
|
|
314
|
+
return Tt(e);
|
|
314
315
|
}
|
|
315
316
|
}
|
|
316
317
|
R.empty = new R(G.none, [], [], 0);
|
|
@@ -430,7 +431,7 @@ function de(r, e, t, n) {
|
|
|
430
431
|
r = o;
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
|
-
class
|
|
434
|
+
class Ye {
|
|
434
435
|
cursor(e = 0) {
|
|
435
436
|
return new Le(this, e);
|
|
436
437
|
}
|
|
@@ -467,7 +468,7 @@ class Ze {
|
|
|
467
468
|
return this.parent;
|
|
468
469
|
}
|
|
469
470
|
}
|
|
470
|
-
class z extends
|
|
471
|
+
class z extends Ye {
|
|
471
472
|
constructor(e, t, n, i) {
|
|
472
473
|
super(), this._tree = e, this.from = t, this.index = n, this._parent = i;
|
|
473
474
|
}
|
|
@@ -490,7 +491,7 @@ class z extends Ze {
|
|
|
490
491
|
continue;
|
|
491
492
|
let A = w.findChild(0, w.buffer.length, t, n - C, i);
|
|
492
493
|
if (A > -1)
|
|
493
|
-
return new Z(new
|
|
494
|
+
return new Z(new Ot(o, w, e, C), null, A);
|
|
494
495
|
} else if (s & I.IncludeAnonymous || !w.type.isAnonymous || Oe(w)) {
|
|
495
496
|
let A;
|
|
496
497
|
if (!(s & I.IgnoreMounts) && (A = we.get(w)) && !A.overlay)
|
|
@@ -618,12 +619,12 @@ function Ie(r, e, t = e.length - 1) {
|
|
|
618
619
|
}
|
|
619
620
|
return !0;
|
|
620
621
|
}
|
|
621
|
-
class
|
|
622
|
+
class Ot {
|
|
622
623
|
constructor(e, t, n, i) {
|
|
623
624
|
this.parent = e, this.buffer = t, this.index = n, this.start = i;
|
|
624
625
|
}
|
|
625
626
|
}
|
|
626
|
-
class Z extends
|
|
627
|
+
class Z extends Ye {
|
|
627
628
|
get name() {
|
|
628
629
|
return this.type.name;
|
|
629
630
|
}
|
|
@@ -723,7 +724,7 @@ class Z extends Ze {
|
|
|
723
724
|
return this.context.buffer.childString(this.index);
|
|
724
725
|
}
|
|
725
726
|
}
|
|
726
|
-
function
|
|
727
|
+
function Ze(r) {
|
|
727
728
|
if (!r.length)
|
|
728
729
|
return null;
|
|
729
730
|
let e = 0, t = r[0];
|
|
@@ -732,17 +733,17 @@ function Qe(r) {
|
|
|
732
733
|
(o.from > t.from || o.to < t.to) && (t = o, e = s);
|
|
733
734
|
}
|
|
734
735
|
let n = t instanceof z && t.index < 0 ? null : t.parent, i = r.slice();
|
|
735
|
-
return n ? i[e] = n : i.splice(e, 1), new
|
|
736
|
+
return n ? i[e] = n : i.splice(e, 1), new zt(i, t);
|
|
736
737
|
}
|
|
737
|
-
class
|
|
738
|
+
class zt {
|
|
738
739
|
constructor(e, t) {
|
|
739
740
|
this.heads = e, this.node = t;
|
|
740
741
|
}
|
|
741
742
|
get next() {
|
|
742
|
-
return
|
|
743
|
+
return Ze(this.heads);
|
|
743
744
|
}
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function Mt(r, e, t) {
|
|
746
747
|
let n = r.resolveInner(e, t), i = null;
|
|
747
748
|
for (let s = n instanceof z ? n : n.context.parent; s; s = s.parent)
|
|
748
749
|
if (s.index < 0) {
|
|
@@ -755,7 +756,7 @@ function zt(r, e, t) {
|
|
|
755
756
|
(i || (i = [n])).push(de(u, e, t, !1));
|
|
756
757
|
}
|
|
757
758
|
}
|
|
758
|
-
return i ?
|
|
759
|
+
return i ? Ze(i) : n;
|
|
759
760
|
}
|
|
760
761
|
class Le {
|
|
761
762
|
/**
|
|
@@ -1057,9 +1058,9 @@ class Le {
|
|
|
1057
1058
|
function Oe(r) {
|
|
1058
1059
|
return r.children.some((e) => e instanceof Q || !e.type.isAnonymous || Oe(e));
|
|
1059
1060
|
}
|
|
1060
|
-
function
|
|
1061
|
+
function Tt(r) {
|
|
1061
1062
|
var e;
|
|
1062
|
-
let { buffer: t, nodeSet: n, maxBufferLength: i =
|
|
1063
|
+
let { buffer: t, nodeSet: n, maxBufferLength: i = Lt, reused: s = [], minRepeatType: o = n.types.length } = r, u = Array.isArray(t) ? new Ee(t, t.length) : t, f = n.types, x = 0, w = 0;
|
|
1063
1064
|
function C(g, b, h, y, p, m) {
|
|
1064
1065
|
let { id: c, start: d, end: _, size: k } = u, L = w;
|
|
1065
1066
|
for (; k < 0; )
|
|
@@ -1075,23 +1076,23 @@ function Mt(r) {
|
|
|
1075
1076
|
return;
|
|
1076
1077
|
} else
|
|
1077
1078
|
throw new RangeError(`Unrecognized record size: ${k}`);
|
|
1078
|
-
let
|
|
1079
|
-
if (_ - d <= i && (
|
|
1080
|
-
let W = new Uint16Array(
|
|
1079
|
+
let ee = f[c], ie, te, Me = d - g;
|
|
1080
|
+
if (_ - d <= i && (te = M(u.pos - b, p))) {
|
|
1081
|
+
let W = new Uint16Array(te.size - te.skip), E = u.pos - te.size, P = W.length;
|
|
1081
1082
|
for (; u.pos > E; )
|
|
1082
|
-
P = D(
|
|
1083
|
-
ie = new Q(W, _ -
|
|
1083
|
+
P = D(te.start, W, P);
|
|
1084
|
+
ie = new Q(W, _ - te.start, n), Me = te.start - g;
|
|
1084
1085
|
} else {
|
|
1085
1086
|
let W = u.pos - k;
|
|
1086
1087
|
u.next();
|
|
1087
|
-
let E = [], P = [],
|
|
1088
|
+
let E = [], P = [], ne = c >= o ? c : -1, se = 0, pe = _;
|
|
1088
1089
|
for (; u.pos > W; )
|
|
1089
|
-
|
|
1090
|
-
if (
|
|
1091
|
-
let Te = B(
|
|
1092
|
-
ie = ze(
|
|
1090
|
+
ne >= 0 && u.id == ne && u.size >= 0 ? (u.end <= pe - i && (N(E, P, d, se, u.end, pe, ne, L), se = E.length, pe = u.end), u.next()) : m > 2500 ? A(d, W, E, P) : C(d, W, E, P, ne, m + 1);
|
|
1091
|
+
if (ne >= 0 && se > 0 && se < E.length && N(E, P, d, se, d, pe, ne, L), E.reverse(), P.reverse(), ne > -1 && se > 0) {
|
|
1092
|
+
let Te = B(ee);
|
|
1093
|
+
ie = ze(ee, E, P, 0, E.length, 0, _ - d, Te, Te);
|
|
1093
1094
|
} else
|
|
1094
|
-
ie = T(
|
|
1095
|
+
ie = T(ee, E, P, _ - d, L - _);
|
|
1095
1096
|
}
|
|
1096
1097
|
h.push(ie), y.push(Me);
|
|
1097
1098
|
}
|
|
@@ -1154,18 +1155,18 @@ function Mt(r) {
|
|
|
1154
1155
|
let L = h.pos - k;
|
|
1155
1156
|
if (k < 0 || L < _ || h.start < c)
|
|
1156
1157
|
break;
|
|
1157
|
-
let
|
|
1158
|
+
let ee = h.id >= o ? 4 : 0, ie = h.start;
|
|
1158
1159
|
for (h.next(); h.pos > L; ) {
|
|
1159
1160
|
if (h.size < 0)
|
|
1160
1161
|
if (h.size == -3)
|
|
1161
|
-
|
|
1162
|
+
ee += 4;
|
|
1162
1163
|
else
|
|
1163
1164
|
break e;
|
|
1164
1165
|
else
|
|
1165
|
-
h.id >= o && (
|
|
1166
|
+
h.id >= o && (ee += 4);
|
|
1166
1167
|
h.next();
|
|
1167
1168
|
}
|
|
1168
|
-
p = ie, y += k, m +=
|
|
1169
|
+
p = ie, y += k, m += ee;
|
|
1169
1170
|
}
|
|
1170
1171
|
return (b < 0 || y == g) && (d.size = y, d.start = p, d.skip = m), d.size > 4 ? d : void 0;
|
|
1171
1172
|
}
|
|
@@ -1241,13 +1242,13 @@ function ze(r, e, t, n, i, s, o, u, f) {
|
|
|
1241
1242
|
return B(e, t, n, i, 0), (u || f)(C, A, o);
|
|
1242
1243
|
}
|
|
1243
1244
|
new v({ perNode: !0 });
|
|
1244
|
-
let
|
|
1245
|
+
let Pt = 0;
|
|
1245
1246
|
class j {
|
|
1246
1247
|
/**
|
|
1247
1248
|
@internal
|
|
1248
1249
|
*/
|
|
1249
1250
|
constructor(e, t, n) {
|
|
1250
|
-
this.set = e, this.base = t, this.modified = n, this.id =
|
|
1251
|
+
this.set = e, this.base = t, this.modified = n, this.id = Pt++;
|
|
1251
1252
|
}
|
|
1252
1253
|
/**
|
|
1253
1254
|
Define a new tag. If `parent` is given, the tag is treated as a
|
|
@@ -1282,10 +1283,10 @@ class j {
|
|
|
1282
1283
|
return (t) => t.modified.indexOf(e) > -1 ? t : Ce.get(t.base || t, t.modified.concat(e).sort((n, i) => n.id - i.id));
|
|
1283
1284
|
}
|
|
1284
1285
|
}
|
|
1285
|
-
let
|
|
1286
|
+
let Ht = 0;
|
|
1286
1287
|
class Ce {
|
|
1287
1288
|
constructor() {
|
|
1288
|
-
this.instances = [], this.id =
|
|
1289
|
+
this.instances = [], this.id = Ht++;
|
|
1289
1290
|
}
|
|
1290
1291
|
static get(e, t) {
|
|
1291
1292
|
if (!t.length)
|
|
@@ -1315,7 +1316,7 @@ function Vt(r) {
|
|
|
1315
1316
|
return e.sort((t, n) => n.length - t.length);
|
|
1316
1317
|
}
|
|
1317
1318
|
new v();
|
|
1318
|
-
function
|
|
1319
|
+
function jt(r, e) {
|
|
1319
1320
|
let t = /* @__PURE__ */ Object.create(null);
|
|
1320
1321
|
for (let s of r)
|
|
1321
1322
|
if (!Array.isArray(s.tag))
|
|
@@ -1340,7 +1341,7 @@ function Ht(r, e) {
|
|
|
1340
1341
|
scope: n
|
|
1341
1342
|
};
|
|
1342
1343
|
}
|
|
1343
|
-
const a = j.define, ye = a(), q = a(), Je = a(q), We = a(q), X = a(), xe = a(X), Se = a(X),
|
|
1344
|
+
const a = j.define, ye = a(), q = a(), Je = a(q), We = a(q), X = a(), xe = a(X), Se = a(X), V = a(), re = a(V), H = a(), $ = a(), Be = a(), fe = a(Be), ke = a(), l = {
|
|
1344
1345
|
/**
|
|
1345
1346
|
A comment.
|
|
1346
1347
|
*/
|
|
@@ -1453,85 +1454,85 @@ const a = j.define, ye = a(), q = a(), Je = a(q), We = a(q), X = a(), xe = a(X),
|
|
|
1453
1454
|
/**
|
|
1454
1455
|
A language keyword.
|
|
1455
1456
|
*/
|
|
1456
|
-
keyword:
|
|
1457
|
+
keyword: H,
|
|
1457
1458
|
/**
|
|
1458
1459
|
The [keyword](#highlight.tags.keyword) for the self or this
|
|
1459
1460
|
object.
|
|
1460
1461
|
*/
|
|
1461
|
-
self: a(
|
|
1462
|
+
self: a(H),
|
|
1462
1463
|
/**
|
|
1463
1464
|
The [keyword](#highlight.tags.keyword) for null.
|
|
1464
1465
|
*/
|
|
1465
|
-
null: a(
|
|
1466
|
+
null: a(H),
|
|
1466
1467
|
/**
|
|
1467
1468
|
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
1468
1469
|
*/
|
|
1469
|
-
atom: a(
|
|
1470
|
+
atom: a(H),
|
|
1470
1471
|
/**
|
|
1471
1472
|
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
1472
1473
|
*/
|
|
1473
|
-
unit: a(
|
|
1474
|
+
unit: a(H),
|
|
1474
1475
|
/**
|
|
1475
1476
|
A modifier [keyword](#highlight.tags.keyword).
|
|
1476
1477
|
*/
|
|
1477
|
-
modifier: a(
|
|
1478
|
+
modifier: a(H),
|
|
1478
1479
|
/**
|
|
1479
1480
|
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
1480
1481
|
*/
|
|
1481
|
-
operatorKeyword: a(
|
|
1482
|
+
operatorKeyword: a(H),
|
|
1482
1483
|
/**
|
|
1483
1484
|
A control-flow related [keyword](#highlight.tags.keyword).
|
|
1484
1485
|
*/
|
|
1485
|
-
controlKeyword: a(
|
|
1486
|
+
controlKeyword: a(H),
|
|
1486
1487
|
/**
|
|
1487
1488
|
A [keyword](#highlight.tags.keyword) that defines something.
|
|
1488
1489
|
*/
|
|
1489
|
-
definitionKeyword: a(
|
|
1490
|
+
definitionKeyword: a(H),
|
|
1490
1491
|
/**
|
|
1491
1492
|
A [keyword](#highlight.tags.keyword) related to defining or
|
|
1492
1493
|
interfacing with modules.
|
|
1493
1494
|
*/
|
|
1494
|
-
moduleKeyword: a(
|
|
1495
|
+
moduleKeyword: a(H),
|
|
1495
1496
|
/**
|
|
1496
1497
|
An operator.
|
|
1497
1498
|
*/
|
|
1498
|
-
operator:
|
|
1499
|
+
operator: $,
|
|
1499
1500
|
/**
|
|
1500
1501
|
An [operator](#highlight.tags.operator) that dereferences something.
|
|
1501
1502
|
*/
|
|
1502
|
-
derefOperator: a(
|
|
1503
|
+
derefOperator: a($),
|
|
1503
1504
|
/**
|
|
1504
1505
|
Arithmetic-related [operator](#highlight.tags.operator).
|
|
1505
1506
|
*/
|
|
1506
|
-
arithmeticOperator: a(
|
|
1507
|
+
arithmeticOperator: a($),
|
|
1507
1508
|
/**
|
|
1508
1509
|
Logical [operator](#highlight.tags.operator).
|
|
1509
1510
|
*/
|
|
1510
|
-
logicOperator: a(
|
|
1511
|
+
logicOperator: a($),
|
|
1511
1512
|
/**
|
|
1512
1513
|
Bit [operator](#highlight.tags.operator).
|
|
1513
1514
|
*/
|
|
1514
|
-
bitwiseOperator: a(
|
|
1515
|
+
bitwiseOperator: a($),
|
|
1515
1516
|
/**
|
|
1516
1517
|
Comparison [operator](#highlight.tags.operator).
|
|
1517
1518
|
*/
|
|
1518
|
-
compareOperator: a(
|
|
1519
|
+
compareOperator: a($),
|
|
1519
1520
|
/**
|
|
1520
1521
|
[Operator](#highlight.tags.operator) that updates its operand.
|
|
1521
1522
|
*/
|
|
1522
|
-
updateOperator: a(
|
|
1523
|
+
updateOperator: a($),
|
|
1523
1524
|
/**
|
|
1524
1525
|
[Operator](#highlight.tags.operator) that defines something.
|
|
1525
1526
|
*/
|
|
1526
|
-
definitionOperator: a(
|
|
1527
|
+
definitionOperator: a($),
|
|
1527
1528
|
/**
|
|
1528
1529
|
Type-related [operator](#highlight.tags.operator).
|
|
1529
1530
|
*/
|
|
1530
|
-
typeOperator: a(
|
|
1531
|
+
typeOperator: a($),
|
|
1531
1532
|
/**
|
|
1532
1533
|
Control-flow [operator](#highlight.tags.operator).
|
|
1533
1534
|
*/
|
|
1534
|
-
controlOperator: a(
|
|
1535
|
+
controlOperator: a($),
|
|
1535
1536
|
/**
|
|
1536
1537
|
Program or markup punctuation.
|
|
1537
1538
|
*/
|
|
@@ -1568,69 +1569,69 @@ const a = j.define, ye = a(), q = a(), Je = a(q), We = a(q), X = a(), xe = a(X),
|
|
|
1568
1569
|
/**
|
|
1569
1570
|
Content, for example plain text in XML or markup documents.
|
|
1570
1571
|
*/
|
|
1571
|
-
content:
|
|
1572
|
+
content: V,
|
|
1572
1573
|
/**
|
|
1573
1574
|
[Content](#highlight.tags.content) that represents a heading.
|
|
1574
1575
|
*/
|
|
1575
|
-
heading:
|
|
1576
|
+
heading: re,
|
|
1576
1577
|
/**
|
|
1577
1578
|
A level 1 [heading](#highlight.tags.heading).
|
|
1578
1579
|
*/
|
|
1579
|
-
heading1: a(
|
|
1580
|
+
heading1: a(re),
|
|
1580
1581
|
/**
|
|
1581
1582
|
A level 2 [heading](#highlight.tags.heading).
|
|
1582
1583
|
*/
|
|
1583
|
-
heading2: a(
|
|
1584
|
+
heading2: a(re),
|
|
1584
1585
|
/**
|
|
1585
1586
|
A level 3 [heading](#highlight.tags.heading).
|
|
1586
1587
|
*/
|
|
1587
|
-
heading3: a(
|
|
1588
|
+
heading3: a(re),
|
|
1588
1589
|
/**
|
|
1589
1590
|
A level 4 [heading](#highlight.tags.heading).
|
|
1590
1591
|
*/
|
|
1591
|
-
heading4: a(
|
|
1592
|
+
heading4: a(re),
|
|
1592
1593
|
/**
|
|
1593
1594
|
A level 5 [heading](#highlight.tags.heading).
|
|
1594
1595
|
*/
|
|
1595
|
-
heading5: a(
|
|
1596
|
+
heading5: a(re),
|
|
1596
1597
|
/**
|
|
1597
1598
|
A level 6 [heading](#highlight.tags.heading).
|
|
1598
1599
|
*/
|
|
1599
|
-
heading6: a(
|
|
1600
|
+
heading6: a(re),
|
|
1600
1601
|
/**
|
|
1601
1602
|
A prose separator (such as a horizontal rule).
|
|
1602
1603
|
*/
|
|
1603
|
-
contentSeparator: a(
|
|
1604
|
+
contentSeparator: a(V),
|
|
1604
1605
|
/**
|
|
1605
1606
|
[Content](#highlight.tags.content) that represents a list.
|
|
1606
1607
|
*/
|
|
1607
|
-
list: a(
|
|
1608
|
+
list: a(V),
|
|
1608
1609
|
/**
|
|
1609
1610
|
[Content](#highlight.tags.content) that represents a quote.
|
|
1610
1611
|
*/
|
|
1611
|
-
quote: a(
|
|
1612
|
+
quote: a(V),
|
|
1612
1613
|
/**
|
|
1613
1614
|
[Content](#highlight.tags.content) that is emphasized.
|
|
1614
1615
|
*/
|
|
1615
|
-
emphasis: a(
|
|
1616
|
+
emphasis: a(V),
|
|
1616
1617
|
/**
|
|
1617
1618
|
[Content](#highlight.tags.content) that is styled strong.
|
|
1618
1619
|
*/
|
|
1619
|
-
strong: a(
|
|
1620
|
+
strong: a(V),
|
|
1620
1621
|
/**
|
|
1621
1622
|
[Content](#highlight.tags.content) that is part of a link.
|
|
1622
1623
|
*/
|
|
1623
|
-
link: a(
|
|
1624
|
+
link: a(V),
|
|
1624
1625
|
/**
|
|
1625
1626
|
[Content](#highlight.tags.content) that is styled as code or
|
|
1626
1627
|
monospace.
|
|
1627
1628
|
*/
|
|
1628
|
-
monospace: a(
|
|
1629
|
+
monospace: a(V),
|
|
1629
1630
|
/**
|
|
1630
1631
|
[Content](#highlight.tags.content) that has a strike-through
|
|
1631
1632
|
style.
|
|
1632
1633
|
*/
|
|
1633
|
-
strikethrough: a(
|
|
1634
|
+
strikethrough: a(V),
|
|
1634
1635
|
/**
|
|
1635
1636
|
Inserted text in a change-tracking format.
|
|
1636
1637
|
*/
|
|
@@ -1706,7 +1707,7 @@ const a = j.define, ye = a(), q = a(), Je = a(q), We = a(q), X = a(), xe = a(X),
|
|
|
1706
1707
|
*/
|
|
1707
1708
|
special: j.defineModifier()
|
|
1708
1709
|
};
|
|
1709
|
-
|
|
1710
|
+
jt([
|
|
1710
1711
|
{ tag: l.link, class: "tok-link" },
|
|
1711
1712
|
{ tag: l.heading, class: "tok-heading" },
|
|
1712
1713
|
{ tag: l.emphasis, class: "tok-emphasis" },
|
|
@@ -1738,13 +1739,13 @@ Ht([
|
|
|
1738
1739
|
{ tag: l.invalid, class: "tok-invalid" },
|
|
1739
1740
|
{ tag: l.punctuation, class: "tok-punctuation" }
|
|
1740
1741
|
]);
|
|
1741
|
-
const
|
|
1742
|
-
red:
|
|
1743
|
-
orange:
|
|
1744
|
-
green:
|
|
1745
|
-
blue:
|
|
1742
|
+
const Rt = "#c72727", Dt = "#9b5700", Ut = "#067934", Jt = "#0063d7", Wt = {
|
|
1743
|
+
red: Rt,
|
|
1744
|
+
orange: Dt,
|
|
1745
|
+
green: Ut,
|
|
1746
|
+
blue: Jt,
|
|
1746
1747
|
invalid: "#ffffff"
|
|
1747
|
-
},
|
|
1748
|
+
}, Gt = (r) => gt.define([
|
|
1748
1749
|
{
|
|
1749
1750
|
tag: l.keyword,
|
|
1750
1751
|
color: r.red
|
|
@@ -1811,22 +1812,23 @@ const jt = "#c72727", Rt = "#9b5700", Dt = "#067934", Ut = "#0063d7", Jt = {
|
|
|
1811
1812
|
tag: l.invalid,
|
|
1812
1813
|
color: r.invalid
|
|
1813
1814
|
}
|
|
1814
|
-
]),
|
|
1815
|
-
var ve = /* @__PURE__ */ ((r) => (r.INLINE = "inline", r.SINGLELINE = "singleline", r.MULTILINE = "multiline", r))(ve || {}),
|
|
1816
|
-
const
|
|
1817
|
-
[
|
|
1818
|
-
[
|
|
1819
|
-
[
|
|
1820
|
-
[
|
|
1821
|
-
|
|
1815
|
+
]), Kt = pt(Gt(Wt));
|
|
1816
|
+
var ve = /* @__PURE__ */ ((r) => (r.INLINE = "inline", r.SINGLELINE = "singleline", r.MULTILINE = "multiline", r))(ve || {}), Y = /* @__PURE__ */ ((r) => (r.JSON = "json", r.XML = "xml", r.JAVA = "java", r.JAVASCRIPT = "javascript", r.PYTHON = "python", r))(Y || {}), ce = /* @__PURE__ */ ((r) => (r.ACTION = "action", r.CHANGE = "change", r))(ce || {});
|
|
1817
|
+
const Ft = {
|
|
1818
|
+
[Y.JSON]: Ct,
|
|
1819
|
+
[Y.XML]: Nt,
|
|
1820
|
+
[Y.JAVASCRIPT]: St,
|
|
1821
|
+
[Y.JAVA]: At,
|
|
1822
|
+
[Y.PYTHON]: It
|
|
1823
|
+
}, qt = (r) => async () => Ft[r], Xt = (r, e) => {
|
|
1822
1824
|
const t = r.doc.lineAt(e.from), n = /^\s*/.exec(t.text);
|
|
1823
1825
|
return n ? n[0] : "";
|
|
1824
|
-
},
|
|
1826
|
+
}, Yt = {
|
|
1825
1827
|
key: "Enter",
|
|
1826
1828
|
run: ({ state: r, dispatch: e }) => {
|
|
1827
1829
|
const t = r.changeByRange((n) => {
|
|
1828
1830
|
const s = `
|
|
1829
|
-
${
|
|
1831
|
+
${Xt(r, n)}`;
|
|
1830
1832
|
return {
|
|
1831
1833
|
changes: { from: n.from, to: n.to, insert: s },
|
|
1832
1834
|
range: ft.cursor(n.from + s.length)
|
|
@@ -1840,14 +1842,14 @@ const Zt = {
|
|
|
1840
1842
|
beforeCreate() {
|
|
1841
1843
|
this.uuid = Ge.toString(), Ge += 1;
|
|
1842
1844
|
}
|
|
1843
|
-
}, Qt = { key: 0 },
|
|
1845
|
+
}, Qt = { key: 0 }, en = /* @__PURE__ */ ae("path", {
|
|
1844
1846
|
fill: "#00112C",
|
|
1845
1847
|
d: "M14.75 1.25V6.75H13.25V3.81083L10.0001 7.06072L8.93945 6.00006L12.1895 2.75H9.25V1.25H14.75Z"
|
|
1846
|
-
}, null, -1),
|
|
1848
|
+
}, null, -1), tn = /* @__PURE__ */ ae("path", {
|
|
1847
1849
|
fill: "#00112C",
|
|
1848
1850
|
d: "M2.75 12.1895V9.25H1.25V14.75H6.75V13.25H3.81083L7.06072 10.0001L6.00006 8.93945L2.75 12.1895Z"
|
|
1849
1851
|
}, null, -1);
|
|
1850
|
-
function
|
|
1852
|
+
function nn(r, e, t, n, i, s) {
|
|
1851
1853
|
return O(), le("svg", Fe({ role: "img" }, r.$attrs, {
|
|
1852
1854
|
class: "ui-assets-icons-16",
|
|
1853
1855
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1856,16 +1858,16 @@ function tn(r, e, t, n, i, s) {
|
|
|
1856
1858
|
fill: "none"
|
|
1857
1859
|
}), [
|
|
1858
1860
|
r.$attrs["svg-title"] ? (O(), le("title", Qt, Ae(r.$attrs["svg-title"]), 1)) : F("", !0),
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
+
en,
|
|
1862
|
+
tn
|
|
1861
1863
|
], 16);
|
|
1862
1864
|
}
|
|
1863
|
-
const
|
|
1865
|
+
const rn = /* @__PURE__ */ qe(Zt, [["render", nn]]), Ke = {
|
|
1864
1866
|
"en-US": {
|
|
1865
1867
|
run: "Run",
|
|
1866
1868
|
expand: "Expand"
|
|
1867
1869
|
}
|
|
1868
|
-
},
|
|
1870
|
+
}, sn = Qe({
|
|
1869
1871
|
i18n: { messages: Ke },
|
|
1870
1872
|
name: "bento-code-snippet",
|
|
1871
1873
|
components: {
|
|
@@ -1875,7 +1877,7 @@ const nn = /* @__PURE__ */ qe(Zt, [["render", tn]]), Ke = {
|
|
|
1875
1877
|
Copy: wt,
|
|
1876
1878
|
BaseModal: vt,
|
|
1877
1879
|
BentoLoadingIndicator: kt,
|
|
1878
|
-
ExpandIcon:
|
|
1880
|
+
ExpandIcon: rn
|
|
1879
1881
|
},
|
|
1880
1882
|
directives: { BentoTooltipDirective: xt },
|
|
1881
1883
|
props: {
|
|
@@ -1892,8 +1894,8 @@ const nn = /* @__PURE__ */ qe(Zt, [["render", tn]]), Ke = {
|
|
|
1892
1894
|
*/
|
|
1893
1895
|
lang: {
|
|
1894
1896
|
type: String,
|
|
1895
|
-
default:
|
|
1896
|
-
validator: (r) => Object.values(
|
|
1897
|
+
default: Y.JSON,
|
|
1898
|
+
validator: (r) => Object.values(Y).includes(r)
|
|
1897
1899
|
},
|
|
1898
1900
|
/**
|
|
1899
1901
|
* Label to show in the action-bar, describing the language
|
|
@@ -1956,7 +1958,7 @@ const nn = /* @__PURE__ */ qe(Zt, [["render", tn]]), Ke = {
|
|
|
1956
1958
|
"b-code-snippet--scrollable": !u.value
|
|
1957
1959
|
})), x = ue(() => ({
|
|
1958
1960
|
"b-code-snippet__code-area-content--editable": r.editable
|
|
1959
|
-
})), w =
|
|
1961
|
+
})), w = qt(r.lang), C = Pe(), A = Pe(), B = new Ne(), N = new Ne(), T = new Ne(), M = ge(null), D = ge(0);
|
|
1960
1962
|
et(async () => {
|
|
1961
1963
|
const g = await w();
|
|
1962
1964
|
M.value = r.content;
|
|
@@ -1964,18 +1966,18 @@ const nn = /* @__PURE__ */ qe(Zt, [["render", tn]]), Ke = {
|
|
|
1964
1966
|
M.value = p.doc.toString();
|
|
1965
1967
|
}, h = [
|
|
1966
1968
|
at(),
|
|
1967
|
-
ut.of([ct,
|
|
1969
|
+
ut.of([ct, Yt]),
|
|
1968
1970
|
B.of(g()),
|
|
1969
|
-
N.of(
|
|
1971
|
+
N.of(Kt),
|
|
1970
1972
|
T.of(je.readOnly.of(!r.editable)),
|
|
1971
|
-
|
|
1973
|
+
Ve.updateListener.of((p) => b(p))
|
|
1972
1974
|
];
|
|
1973
1975
|
r.variant === "multiline" && h.push([ht(), dt()]);
|
|
1974
1976
|
const y = je.create({
|
|
1975
1977
|
doc: r.content,
|
|
1976
1978
|
extensions: [...h]
|
|
1977
1979
|
});
|
|
1978
|
-
D.value = y.doc.length, A.value = new
|
|
1980
|
+
D.value = y.doc.length, A.value = new Ve({
|
|
1979
1981
|
state: y,
|
|
1980
1982
|
parent: C.value
|
|
1981
1983
|
});
|
|
@@ -2022,20 +2024,20 @@ const nn = /* @__PURE__ */ qe(Zt, [["render", tn]]), Ke = {
|
|
|
2022
2024
|
};
|
|
2023
2025
|
}
|
|
2024
2026
|
});
|
|
2025
|
-
const
|
|
2027
|
+
const on = (r) => (ot("data-v-5eb6a936"), r = r(), lt(), r), ln = {
|
|
2026
2028
|
key: 0,
|
|
2027
2029
|
class: "b-code-snippet__action-bar"
|
|
2028
|
-
},
|
|
2030
|
+
}, an = { class: "b-code-snippet__action-bar--start" }, un = { class: "b-code-snippet__action-bar--end" }, hn = {
|
|
2029
2031
|
key: 1,
|
|
2030
2032
|
class: "b-code-snippet__code-area"
|
|
2031
|
-
},
|
|
2032
|
-
function
|
|
2033
|
+
}, fn = { key: 2 }, cn = /* @__PURE__ */ on(() => /* @__PURE__ */ ae("div", { class: "b-code-snippet__empty-state" }, "Nothing to show", -1));
|
|
2034
|
+
function dn(r, e, t, n, i, s) {
|
|
2033
2035
|
const o = K("bento-dropdown"), u = K("bento-typography"), f = K("bento-loading-indicator"), x = K("copy"), w = K("expand-icon"), C = K("bento-button"), A = K("bento-code-snippet"), B = K("base-modal");
|
|
2034
2036
|
return O(), le("div", {
|
|
2035
|
-
class:
|
|
2037
|
+
class: He(["b-code-snippet", r.conditionalClasses])
|
|
2036
2038
|
}, [
|
|
2037
|
-
r.isInlineVariant ? F("", !0) : (O(), le("section",
|
|
2038
|
-
ae("div",
|
|
2039
|
+
r.isInlineVariant ? F("", !0) : (O(), le("section", ln, [
|
|
2040
|
+
ae("div", an, [
|
|
2039
2041
|
r.availableLanguages.length > 0 ? (O(), oe(o, Fe({
|
|
2040
2042
|
key: 0,
|
|
2041
2043
|
modelValue: r.selectedLanguage,
|
|
@@ -2051,12 +2053,12 @@ function cn(r, e, t, n, i, s) {
|
|
|
2051
2053
|
stronger: ""
|
|
2052
2054
|
}, {
|
|
2053
2055
|
default: he(() => [
|
|
2054
|
-
|
|
2056
|
+
$e(Ae(r.displayedLang), 1)
|
|
2055
2057
|
]),
|
|
2056
2058
|
_: 1
|
|
2057
2059
|
})
|
|
2058
2060
|
]),
|
|
2059
|
-
ae("div",
|
|
2061
|
+
ae("div", un, [
|
|
2060
2062
|
r.loading ? (O(), oe(f, { key: 0 })) : F("", !0),
|
|
2061
2063
|
r.currentContents !== null ? (O(), oe(x, {
|
|
2062
2064
|
key: 1,
|
|
@@ -2088,7 +2090,7 @@ function cn(r, e, t, n, i, s) {
|
|
|
2088
2090
|
class: "b-code-snippet__action-button"
|
|
2089
2091
|
}, {
|
|
2090
2092
|
default: he(() => [
|
|
2091
|
-
|
|
2093
|
+
$e(Ae(r.runText), 1)
|
|
2092
2094
|
]),
|
|
2093
2095
|
_: 1
|
|
2094
2096
|
})
|
|
@@ -2097,14 +2099,14 @@ function cn(r, e, t, n, i, s) {
|
|
|
2097
2099
|
}, 8, ["onClick"])) : F("", !0)
|
|
2098
2100
|
])
|
|
2099
2101
|
])),
|
|
2100
|
-
r.content || r.editable ? (O(), le("code",
|
|
2102
|
+
r.content || r.editable ? (O(), le("code", hn, [
|
|
2101
2103
|
ae("div", {
|
|
2102
2104
|
ref: "container",
|
|
2103
|
-
class:
|
|
2105
|
+
class: He(["b-code-snippet__code-area-content", r.codeAreaContentConditionalClasses])
|
|
2104
2106
|
}, null, 2)
|
|
2105
|
-
])) : (O(), le("section",
|
|
2107
|
+
])) : (O(), le("section", fn, [
|
|
2106
2108
|
rt(r.$slots, "empty-state", {}, () => [
|
|
2107
|
-
|
|
2109
|
+
cn
|
|
2108
2110
|
], !0)
|
|
2109
2111
|
])),
|
|
2110
2112
|
r.expandable ? (O(), oe(B, {
|
|
@@ -2124,11 +2126,11 @@ function cn(r, e, t, n, i, s) {
|
|
|
2124
2126
|
}, 8, ["is-open"])) : F("", !0)
|
|
2125
2127
|
], 2);
|
|
2126
2128
|
}
|
|
2127
|
-
const
|
|
2129
|
+
const zn = /* @__PURE__ */ qe(sn, [["render", dn], ["__scopeId", "data-v-5eb6a936"]]);
|
|
2128
2130
|
export {
|
|
2129
|
-
|
|
2131
|
+
zn as BentoCodeSnippet,
|
|
2130
2132
|
ce as BentoCodeSnippetEvent,
|
|
2131
|
-
|
|
2133
|
+
Y as BentoCodeSnippetSupportedLanguage,
|
|
2132
2134
|
ve as BentoCodeSnippetVariant
|
|
2133
2135
|
};
|
|
2134
2136
|
//# sourceMappingURL=code-snippet.js.map
|