@hankchen/canvas-editor-vue 0.1.1 → 0.1.3

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.
@@ -1,5 +1,6 @@
1
- import { E as e, L as t, M as n, R as r, V as i, a, r as o, w as s } from "./layerPath-BRZK9ka1.js";
2
- import { a as c, c as l, l as u, n as d, o as f, s as p, t as m, u as h } from "./completionAnchor-4lhR2kJz.js";
1
+ import { a as e, r as t } from "./layerPath-uy2ywyld.js";
2
+ import { a as n, c as r, l as i, n as a, o, s, t as c, u as l } from "./completionAnchor-CDR5YZhu.js";
3
+ import { nextTick as u, onMounted as d, onScopeDispose as f, reactive as p, toValue as m, watch as h } from "vue";
3
4
  //#region ../canvas-editor/src/shared/expressionCandidates.ts
4
5
  function g(e) {
5
6
  return e.kind === "row" ? "row" : e.kind === "root" ? "$root" : e.name;
@@ -16,24 +17,24 @@ function v(e, t) {
16
17
  };
17
18
  }
18
19
  function y(e, t, n) {
19
- let r = u(e), i = r.entries.map((e) => v(e, ""));
20
- return i.push({
20
+ let r = i(e), a = r.entries.map((e) => v(e, ""));
21
+ return a.push({
21
22
  path: "$root",
22
23
  segment: "$root"
23
- }), t === "row" && (i.push(n ? {
24
+ }), t === "row" && (a.push(n ? {
24
25
  path: "row",
25
26
  segment: "row",
26
27
  ..._(n)
27
28
  } : {
28
29
  path: "row",
29
30
  segment: "row"
30
- }), i.push({
31
+ }), a.push({
31
32
  path: "$index",
32
33
  segment: "$index"
33
34
  })), r.open === !0 ? {
34
- candidates: i,
35
+ candidates: a,
35
36
  open: !0
36
- } : { candidates: i };
37
+ } : { candidates: a };
37
38
  }
38
39
  function b(e, t) {
39
40
  if (e === null) return {
@@ -52,64 +53,64 @@ function b(e, t) {
52
53
  ok: !1,
53
54
  reason: "expression_syntax_error"
54
55
  };
55
- let i = p(r);
56
- if (!i.ok) return {
56
+ let a = s(r);
57
+ if (!a.ok) return {
57
58
  ok: !1,
58
59
  reason: "expression_syntax_error"
59
60
  };
60
- let { head: a, rest: o } = i, s, c;
61
- if (n ? (s = [g(a), ...o], c = "") : o.length > 0 ? (s = [g(a), ...o.slice(0, -1)], c = o[o.length - 1]) : (s = [], c = g(a)), s.length === 0) return {
61
+ let { head: o, rest: c } = a, u, d;
62
+ if (n ? (u = [g(o), ...c], d = "") : c.length > 0 ? (u = [g(o), ...c.slice(0, -1)], d = c[c.length - 1]) : (u = [], d = g(o)), u.length === 0) return {
62
63
  ok: !0,
63
64
  prefix: "",
64
- partial: c,
65
+ partial: d,
65
66
  ...y(e, t.context, t.rowSchema)
66
67
  };
67
- let l, d;
68
- if (a.kind === "row") {
68
+ let f, p;
69
+ if (o.kind === "row") {
69
70
  if (t.context !== "row") return {
70
71
  ok: !0,
71
- prefix: s.join("."),
72
- partial: c,
72
+ prefix: u.join("."),
73
+ partial: d,
73
74
  candidates: []
74
75
  };
75
- l = t.rowSchema ?? null, d = s.slice(1);
76
- } else if (a.kind === "root") l = e, d = s.slice(1);
77
- else if (a.name === "$index") return {
76
+ f = t.rowSchema ?? null, p = u.slice(1);
77
+ } else if (o.kind === "root") f = e, p = u.slice(1);
78
+ else if (o.name === "$index") return {
78
79
  ok: !0,
79
- prefix: s.join("."),
80
- partial: c,
80
+ prefix: u.join("."),
81
+ partial: d,
81
82
  candidates: []
82
83
  };
83
- else l = e, d = s;
84
- let f = l === null ? null : h(l, d), m = s.join(".");
85
- if (f === null) return {
84
+ else f = e, p = u;
85
+ let m = f === null ? null : l(f, p), h = u.join(".");
86
+ if (m === null) return {
86
87
  ok: !0,
87
- prefix: m,
88
- partial: c,
88
+ prefix: h,
89
+ partial: d,
89
90
  candidates: []
90
91
  };
91
- let _ = u(f);
92
+ let _ = i(m);
92
93
  return {
93
94
  ok: !0,
94
- prefix: m,
95
- partial: c,
96
- candidates: _.entries.map((e) => v(e, m)),
95
+ prefix: h,
96
+ partial: d,
97
+ candidates: _.entries.map((e) => v(e, h)),
97
98
  ..._.open === !0 ? { open: !0 } : {}
98
99
  };
99
100
  }
100
101
  //#endregion
101
102
  //#region src/shared/expressionContext.ts
102
- function x(e, t, n) {
103
- let r = null;
104
- for (let i = 0; i < t.length; i += 1) {
105
- if (t[i] !== "template") continue;
106
- let o = a(e, t.slice(0, i));
107
- if (o === null || o.type !== "TableLayer" || (r = l(r ?? n, o.rowsPath), r === null)) return null;
103
+ function x(t, n, i) {
104
+ let a = null;
105
+ for (let o = 0; o < n.length; o += 1) {
106
+ if (n[o] !== "template") continue;
107
+ let s = e(t, n.slice(0, o));
108
+ if (s === null || s.type !== "TableLayer" || (a = r(a ?? i, s.rowsPath), a === null)) return null;
108
109
  }
109
- return r;
110
+ return a;
110
111
  }
111
112
  function S(e) {
112
- return e[e.length - 1] === "content" && o(e);
113
+ return e[e.length - 1] === "content" && t(e);
113
114
  }
114
115
  function C(e, t, n) {
115
116
  return e === null || t === null || n === null || !S(n) ? {
@@ -144,71 +145,71 @@ var T = 4, E = [
144
145
  "PageUp",
145
146
  "PageDown"
146
147
  ];
147
- function D(a) {
148
- let o = r({
148
+ function D(e) {
149
+ let t = p({
149
150
  open: !1,
150
151
  items: [],
151
152
  activeIndex: 0,
152
153
  top: 0,
153
154
  left: 0,
154
155
  openMapping: !1
155
- }), l = null, u = !1, p = null;
156
- function h() {
157
- o.open = !1, o.items = [], o.activeIndex = 0, o.openMapping = !1, p = null;
156
+ }), r = null, i = !1, s = null;
157
+ function l() {
158
+ t.open = !1, t.items = [], t.activeIndex = 0, t.openMapping = !1, s = null;
158
159
  }
159
160
  function g() {
160
- if (!o.open || !l) return;
161
- let e = m(l, i(a.scale ?? 1));
162
- o.top = e.bottom + T, o.left = _(e.left);
161
+ if (!t.open || !r) return;
162
+ let n = c(r, m(e.scale ?? 1));
163
+ t.top = n.bottom + T, t.left = _(n.left);
163
164
  }
164
- function _(e) {
165
- let t = (a.popupEl ? i(a.popupEl) : null)?.offsetWidth ?? 0;
166
- return t <= 0 ? e : Math.max(0, Math.min(e, window.innerWidth - 4 - t));
165
+ function _(t) {
166
+ let n = (e.popupEl ? m(e.popupEl) : null)?.offsetWidth ?? 0;
167
+ return n <= 0 ? t : Math.max(0, Math.min(t, window.innerWidth - 4 - n));
167
168
  }
168
- function v(e, t = !1) {
169
- if (!i(a.enabled)) {
170
- h();
169
+ function v(i, a = !1) {
170
+ if (!m(e.enabled)) {
171
+ l();
171
172
  return;
172
173
  }
173
- let n = l;
174
- if (!n) {
175
- h();
174
+ let c = r;
175
+ if (!c) {
176
+ l();
176
177
  return;
177
178
  }
178
- let r = n.value, u = n.selectionStart ?? r.length, d = c(f(r), u);
179
- if (!d) {
180
- h();
179
+ let d = c.value, f = c.selectionStart ?? d.length, p = n(o(d), f);
180
+ if (!p) {
181
+ l();
181
182
  return;
182
183
  }
183
- let m = a.resolve(d.expr);
184
- if (!m) {
185
- h();
184
+ let h = e.resolve(p.expr);
185
+ if (!h) {
186
+ l();
186
187
  return;
187
188
  }
188
- let _ = t ? m.candidates : m.candidates.filter((e) => e.segment.startsWith(m.partial));
189
- if (_.length === 0 && m.open !== !0) {
190
- h();
189
+ let _ = a ? h.candidates : h.candidates.filter((e) => e.segment.startsWith(h.partial));
190
+ if (_.length === 0 && h.open !== !0) {
191
+ l();
191
192
  return;
192
193
  }
193
- p = {
194
- fragment: d,
195
- partial: m.partial
196
- }, (o.open || e) && (o.items = _, o.activeIndex = 0, o.openMapping = m.open === !0, o.open = !0, g(), s(g));
194
+ s = {
195
+ fragment: p,
196
+ partial: h.partial
197
+ }, (t.open || i) && (t.items = _, t.activeIndex = 0, t.openMapping = h.open === !0, t.open = !0, g(), u(g));
197
198
  }
198
199
  function y(e) {
199
- let t = l;
200
- if (!o.open || u || !t || !p) return;
201
- let n = o.items[e ?? o.activeIndex];
202
- if (!n) return;
203
- let r = d(t.value, p.fragment, p.partial, n.segment);
204
- if (!r) {
205
- h();
200
+ let n = r;
201
+ if (!t.open || i || !n || !s) return;
202
+ let o = t.items[e ?? t.activeIndex];
203
+ if (!o) return;
204
+ let c = a(n.value, s.fragment, s.partial, o.segment);
205
+ if (!c) {
206
+ l();
206
207
  return;
207
208
  }
208
- t.value = r.value, t.setSelectionRange(r.cursor, r.cursor), t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 })), h();
209
+ n.value = c.value, n.setSelectionRange(c.cursor, c.cursor), n.dispatchEvent(new Event("input", { bubbles: !0 })), n.dispatchEvent(new Event("change", { bubbles: !0 })), l();
209
210
  }
210
211
  function b() {
211
- return i(a.pairing ?? a.enabled);
212
+ return m(e.pairing ?? e.enabled);
212
213
  }
213
214
  function x(e) {
214
215
  let t = e.selectionStart;
@@ -217,42 +218,42 @@ function D(a) {
217
218
  let S = !1;
218
219
  function C(e) {
219
220
  if (S || !b()) return;
220
- let t = l;
221
+ let t = r;
221
222
  if (!t) return;
222
223
  let n = e.inputType;
223
224
  if (n !== void 0 && n !== "" && n !== "insertText") return;
224
- let r = x(t);
225
- if (r === null || r < 2) return;
226
- let i = t.value;
227
- i.startsWith("{{", r - 2) && (i.includes("}}", r) || (S = !0, t.value = `${i.slice(0, r)}}}${i.slice(r)}`, t.setSelectionRange(r, r), t.dispatchEvent(new Event("input", { bubbles: !0 })), S = !1));
225
+ let i = x(t);
226
+ if (i === null || i < 2) return;
227
+ let a = t.value;
228
+ a.startsWith("{{", i - 2) && (a.includes("}}", i) || (S = !0, t.value = `${a.slice(0, i)}}}${a.slice(i)}`, t.setSelectionRange(i, i), t.dispatchEvent(new Event("input", { bubbles: !0 })), S = !1));
228
229
  }
229
230
  function w(e) {
230
231
  if (!b()) return !1;
231
- let t = l;
232
+ let t = r;
232
233
  if (!t) return !1;
233
234
  let n = x(t);
234
235
  if (n === null || n < 2) return !1;
235
- let r = t.value;
236
- return !r.startsWith("{{", n - 2) || !r.startsWith("}}", n) ? !1 : (e.preventDefault(), S = !0, t.value = r.slice(0, n - 2) + r.slice(n + 2), t.setSelectionRange(n - 2, n - 2), t.dispatchEvent(new Event("input", { bubbles: !0 })), S = !1, !0);
236
+ let i = t.value;
237
+ return !i.startsWith("{{", n - 2) || !i.startsWith("}}", n) ? !1 : (e.preventDefault(), S = !0, t.value = i.slice(0, n - 2) + i.slice(n + 2), t.setSelectionRange(n - 2, n - 2), t.dispatchEvent(new Event("input", { bubbles: !0 })), S = !1, !0);
237
238
  }
238
239
  function D(e) {
239
240
  if (!b()) return !1;
240
- let t = l;
241
+ let t = r;
241
242
  if (!t) return !1;
242
243
  let n = x(t);
243
244
  return n === null || t.value[n] !== "}" ? !1 : (e.preventDefault(), t.setSelectionRange(n + 1, n + 1), v(!1), !0);
244
245
  }
245
246
  function O(e) {
246
- u || e.isComposing || (C(e), v(!0));
247
+ i || e.isComposing || (C(e), v(!0));
247
248
  }
248
249
  function k() {
249
- u = !0;
250
+ i = !0;
250
251
  }
251
252
  function A() {
252
- u = !1, v(!0);
253
+ i = !1, v(!0);
253
254
  }
254
255
  function j(e) {
255
- return u || e.isComposing || e.keyCode === 229;
256
+ return i || e.isComposing || e.keyCode === 229;
256
257
  }
257
258
  function M(e) {
258
259
  if (!j(e)) {
@@ -260,32 +261,32 @@ function D(a) {
260
261
  e.preventDefault(), v(!0, !0);
261
262
  return;
262
263
  }
263
- if (!(e.key === "Backspace" && w(e)) && !(e.key === "}" && D(e)) && o.open) {
264
+ if (!(e.key === "Backspace" && w(e)) && !(e.key === "}" && D(e)) && t.open) {
264
265
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
265
266
  e.preventDefault();
266
- let t = o.items.length;
267
- t > 0 && (o.activeIndex = (o.activeIndex + (e.key === "ArrowDown" ? 1 : t - 1)) % t);
267
+ let n = t.items.length;
268
+ n > 0 && (t.activeIndex = (t.activeIndex + (e.key === "ArrowDown" ? 1 : n - 1)) % n);
268
269
  return;
269
270
  }
270
271
  if (e.key === "Enter" || e.key === "Tab") {
271
272
  e.preventDefault(), y();
272
273
  return;
273
274
  }
274
- e.key === "Escape" && (e.preventDefault(), h());
275
+ e.key === "Escape" && (e.preventDefault(), l());
275
276
  }
276
277
  }
277
278
  }
278
279
  function N(e) {
279
- o.open && !j(e) && E.includes(e.key) && v(!1);
280
+ t.open && !j(e) && E.includes(e.key) && v(!1);
280
281
  }
281
282
  function P() {
282
- u || v(!1);
283
+ i || v(!1);
283
284
  }
284
285
  function F() {
285
- h();
286
+ l();
286
287
  }
287
288
  function I(e) {
288
- o.open && e.target !== l && h();
289
+ t.open && e.target !== r && l();
289
290
  }
290
291
  function L() {
291
292
  g();
@@ -306,14 +307,14 @@ function D(a) {
306
307
  for (let [t, n] of R) e.removeEventListener(t, n);
307
308
  }
308
309
  function V(e) {
309
- l !== e && (l && B(l), l = e, e && z(e));
310
+ r !== e && (r && B(r), r = e, e && z(e));
310
311
  }
311
- return e(() => V(a.target.value)), n(a.target, (e) => V(e)), n(() => i(a.enabled), (e) => {
312
- e || h();
313
- }), document.addEventListener("mousedown", I), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), t(() => {
314
- l && B(l), document.removeEventListener("mousedown", I), window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L);
312
+ return d(() => V(e.target.value)), h(e.target, (e) => V(e)), h(() => m(e.enabled), (e) => {
313
+ e || l();
314
+ }), document.addEventListener("mousedown", I), window.addEventListener("scroll", L, !0), window.addEventListener("resize", L), f(() => {
315
+ r && B(r), document.removeEventListener("mousedown", I), window.removeEventListener("scroll", L, !0), window.removeEventListener("resize", L);
315
316
  }), {
316
- popup: o,
317
+ popup: t,
317
318
  accept: y
318
319
  };
319
320
  }
@@ -1,8 +1,8 @@
1
- import { A as e, B as t, C as n, D as r, G as i, H as a, L as o, M as s, W as c, _ as l, b as u, d, g as f, k as p, m, p as h, u as g, v as _, w as v, z as y } from "./layerPath-BRZK9ka1.js";
2
- import { l as b, n as x } from "./useTransientFeedback-gS9Xa9GY.js";
1
+ import { l as e, n as t } from "./useTransientFeedback-Cnp6aNB7.js";
2
+ import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeProps as l, nextTick as u, normalizeStyle as d, onScopeDispose as f, openBlock as p, ref as m, renderList as h, renderSlot as g, shallowRef as _, toDisplayString as v, unref as y, watch as b, withModifiers as x } from "vue";
3
3
  //#region src/shared/useDropdownMenu.ts
4
4
  function S(e) {
5
- let t = y(!1);
5
+ let t = m(!1);
6
6
  function n(n) {
7
7
  let r = e.container.value, i = n.target;
8
8
  r !== null && i instanceof Node && r.contains(i) || (t.value = !1);
@@ -13,9 +13,9 @@ function S(e) {
13
13
  function i() {
14
14
  window.removeEventListener("pointerdown", n), window.removeEventListener("keydown", r);
15
15
  }
16
- return s(t, (e) => {
16
+ return b(t, (e) => {
17
17
  e ? (window.addEventListener("pointerdown", n), window.addEventListener("keydown", r)) : i();
18
- }), o(i, !0), {
18
+ }), f(i, !0), {
19
19
  open: t,
20
20
  toggle: () => {
21
21
  t.value = !t.value;
@@ -57,7 +57,7 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
57
57
  ], O = { class: "cn-dropdown__item-label" }, k = {
58
58
  key: 0,
59
59
  class: "cn-dropdown__shortcut"
60
- }, A = 6, j = 2, M = /*#__PURE__*/ b(/* @__PURE__ */ u({
60
+ }, A = 6, j = 2, M = /*#__PURE__*/ e(/* @__PURE__ */ c({
61
61
  __name: "DropdownMenu",
62
62
  props: {
63
63
  label: {},
@@ -66,12 +66,12 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
66
66
  direction: { default: "down" }
67
67
  },
68
68
  emits: ["closed"],
69
- setup(t, { emit: o }) {
70
- let u = t, h = o, b = y(null), M = y(null), N = y(null), { open: P, toggle: F, closeMenu: I } = S({ container: b });
71
- s(P, (e) => {
72
- e || h("closed");
69
+ setup(e, { emit: r }) {
70
+ let c = e, f = r, _ = m(null), M = m(null), N = m(null), { open: P, toggle: F, closeMenu: I } = S({ container: _ });
71
+ b(P, (e) => {
72
+ e || f("closed");
73
73
  });
74
- let L = y({
74
+ let L = m({
75
75
  left: 0,
76
76
  edge: "top",
77
77
  offset: 0
@@ -83,12 +83,12 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
83
83
  M.value = e instanceof HTMLElement ? e : null;
84
84
  }
85
85
  async function B() {
86
- if (await v(), !P.value) return;
86
+ if (await u(), !P.value) return;
87
87
  let e = N.value;
88
88
  e !== null && (e.querySelector("[data-dropdown-item]:not([disabled])") ?? e).focus();
89
89
  }
90
90
  function V() {
91
- return u.items.filter((e) => e !== "separator");
91
+ return c.items.filter((e) => e !== "separator");
92
92
  }
93
93
  function H() {
94
94
  return Array.from(N.value?.querySelectorAll("[data-dropdown-item]") ?? []);
@@ -111,24 +111,24 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
111
111
  t !== void 0 && !t.disabled && U(t);
112
112
  }
113
113
  function K(e) {
114
- let t = e.key;
115
- if (t === "Escape" || t === "Tab") {
116
- if (t === "Tab") {
117
- let t = e.target;
118
- if (t instanceof HTMLElement && !t.matches("[data-dropdown-item]") && x(t)) return;
114
+ let n = e.key;
115
+ if (n === "Escape" || n === "Tab") {
116
+ if (n === "Tab") {
117
+ let n = e.target;
118
+ if (n instanceof HTMLElement && !n.matches("[data-dropdown-item]") && t(n)) return;
119
119
  }
120
120
  I(), R();
121
121
  return;
122
122
  }
123
- if (t === "Enter" || t === " ") {
123
+ if (n === "Enter" || n === " ") {
124
124
  let t = e.target;
125
125
  t instanceof HTMLElement && t.matches("[data-dropdown-item]") && (e.preventDefault(), G(t));
126
126
  return;
127
127
  }
128
- if (t === "ArrowDown" || t === "ArrowUp" || t === "Home" || t === "End") {
129
- let n = e.target;
130
- if (n instanceof HTMLElement && !n.matches("[data-dropdown-item]") && x(n)) return;
131
- e.preventDefault(), W(t);
128
+ if (n === "ArrowDown" || n === "ArrowUp" || n === "Home" || n === "End") {
129
+ let r = e.target;
130
+ if (r instanceof HTMLElement && !r.matches("[data-dropdown-item]") && t(r)) return;
131
+ e.preventDefault(), W(n);
132
132
  }
133
133
  }
134
134
  function q(e) {
@@ -143,7 +143,7 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
143
143
  async function J() {
144
144
  if (!P.value) {
145
145
  let e = M.value?.getBoundingClientRect();
146
- e && (L.value = u.direction === "up" ? {
146
+ e && (L.value = c.direction === "up" ? {
147
147
  left: e.left,
148
148
  edge: "bottom",
149
149
  offset: window.innerHeight - e.top + A
@@ -157,7 +157,7 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
157
157
  R();
158
158
  return;
159
159
  }
160
- await v();
160
+ await u();
161
161
  let e = N.value?.getBoundingClientRect();
162
162
  if (!e) return;
163
163
  let t = L.value;
@@ -167,47 +167,47 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
167
167
  offset: Math.max(j, Math.min(t.offset, window.innerHeight - e.height - j))
168
168
  }, B();
169
169
  }
170
- return (o, s) => (r(), l("div", {
170
+ return (t, r) => (p(), a("div", {
171
171
  ref_key: "container",
172
- ref: b,
172
+ ref: _,
173
173
  class: "cn-dropdown"
174
- }, [e(o.$slots, "trigger", {
175
- open: a(P),
174
+ }, [g(t.$slots, "trigger", {
175
+ open: y(P),
176
176
  toggle: J,
177
- closeMenu: a(I),
177
+ closeMenu: y(I),
178
178
  triggerRef: z,
179
179
  onKeydown: q
180
- }, () => [m("button", {
180
+ }, () => [o("button", {
181
181
  ref: z,
182
182
  type: "button",
183
183
  class: "cn-dropdown__trigger",
184
184
  "data-dropdown-trigger": "",
185
185
  "aria-haspopup": "menu",
186
- "aria-expanded": a(P),
187
- title: t.title ?? t.label,
188
- onClick: s[0] ||= (e) => J(),
186
+ "aria-expanded": y(P),
187
+ title: e.title ?? e.label,
188
+ onClick: r[0] ||= (e) => J(),
189
189
  onKeydown: q
190
- }, [_(i(t.label) + " ", 1), s[2] ||= m("span", {
190
+ }, [s(v(e.label) + " ", 1), r[2] ||= o("span", {
191
191
  class: "cn-dropdown__caret",
192
192
  "aria-hidden": "true"
193
- }, "▾", -1)], 40, w)], !0), a(P) ? (r(), l("div", {
193
+ }, "▾", -1)], 40, w)], !0), y(P) ? (p(), a("div", {
194
194
  key: 0,
195
195
  ref_key: "menuEl",
196
196
  ref: N,
197
197
  class: "cn-dropdown__menu",
198
198
  role: "menu",
199
- "aria-label": t.label,
199
+ "aria-label": e.label,
200
200
  "data-dropdown-menu": "",
201
201
  tabindex: "-1",
202
- style: c(L.value.edge === "top" ? {
202
+ style: d(L.value.edge === "top" ? {
203
203
  left: `${L.value.left}px`,
204
204
  top: `${L.value.offset}px`
205
205
  } : {
206
206
  left: `${L.value.left}px`,
207
207
  bottom: `${L.value.offset}px`
208
208
  }),
209
- onKeydown: s[1] ||= g((e) => K(e), ["stop"])
210
- }, [(r(!0), l(d, null, p(t.items, (e, t) => (r(), l(d, { key: t }, [e === "separator" ? (r(), l("div", E)) : (r(), l("button", n({
209
+ onKeydown: r[1] ||= x((e) => K(e), ["stop"])
210
+ }, [(p(!0), a(n, null, h(e.items, (e, t) => (p(), a(n, { key: t }, [e === "separator" ? (p(), a("div", E)) : (p(), a("button", l({
211
211
  key: 1,
212
212
  type: "button",
213
213
  role: "menuitem",
@@ -216,22 +216,22 @@ var w = ["aria-expanded", "title"], T = ["aria-label"], E = {
216
216
  tabindex: "-1",
217
217
  disabled: e.disabled,
218
218
  title: e.title
219
- }, { ref_for: !0 }, e.dataAttrs, { onClick: (t) => U(e) }), [m("span", O, i(e.label), 1), e.shortcut ? (r(), l("span", k, i(e.shortcut), 1)) : f("", !0)], 16, D))], 64))), 128)), e(o.$slots, "body", {
220
- open: a(P),
219
+ }, { ref_for: !0 }, e.dataAttrs, { onClick: (t) => U(e) }), [o("span", O, v(e.label), 1), e.shortcut ? (p(), a("span", k, v(e.shortcut), 1)) : i("", !0)], 16, D))], 64))), 128)), g(t.$slots, "body", {
220
+ open: y(P),
221
221
  toggle: J,
222
- closeMenu: a(I),
222
+ closeMenu: y(I),
223
223
  triggerRef: z,
224
224
  onKeydown: q
225
- }, void 0, !0)], 44, T)) : f("", !0)], 512));
225
+ }, void 0, !0)], 44, T)) : i("", !0)], 512));
226
226
  }
227
227
  }), [["__scopeId", "data-v-ec8a19c1"]]);
228
228
  //#endregion
229
229
  //#region src/shared/useDataSourceSchema.ts
230
230
  function N(e) {
231
- let n = t(e.store.ui.dataSourceSchema), r = e.subscribe((t) => {
232
- t.scope === "ui" && t.branch === "dataSourceSchema" && (n.value = e.store.ui.dataSourceSchema);
231
+ let t = _(e.store.ui.dataSourceSchema), n = e.subscribe((n) => {
232
+ n.scope === "ui" && n.branch === "dataSourceSchema" && (t.value = e.store.ui.dataSourceSchema);
233
233
  });
234
- return o(r, !0), h(() => n.value);
234
+ return f(n, !0), r(() => t.value);
235
235
  }
236
236
  //#endregion
237
237
  export { M as n, S as r, N as t };