agile-core 3.0.8 → 3.0.9

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/core.es.js CHANGED
@@ -1,49 +1,58 @@
1
- import { createApp as e, defineComponent as t, useAttrs as n, shallowRef as r, ref as o, useSlots as s, onMounted as i, onUpdated as a, h as u } from "vue";
2
- import { merge as l } from "ts-deepmerge";
1
+ import { createApp as e, defineComponent as t, useAttrs as n, shallowRef as o, ref as r, useSlots as i, onMounted as s, onUpdated as a, h as l } from "vue";
2
+ import { merge as u } from "ts-deepmerge";
3
3
  var h, c;
4
- const d = __AUI_CONFIG__.tagPrefix || "aui", p = "data-v-aui", m = "auix", f = Symbol("shadow");
4
+ const d = function() {
5
+ try {
6
+ return __AUI_CONFIG__;
7
+ } catch (e2) {
8
+ return { tagPrefix: "aui" };
9
+ }
10
+ }().tagPrefix || "aui", p = "data-v-aui", m = "auix", f = Symbol("shadow");
5
11
  const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
6
12
  constructor(e2) {
7
13
  super(), this.__hasVue__ = false, this[h] = { needHook: false, slot: {} }, this[_AuiComponent.shadowSymbol].options = e2 || {}, this.$initAttrs();
8
14
  }
9
15
  connectedCallback() {
10
- this.$needInit() && (this.$needHook(true), this.$initVue());
11
- }
12
- set textContent(e2) {
13
- this.$needHook() ? this.$textContent(e2) : super.textContent = e2;
14
- }
15
- get textContent() {
16
- return this.$needHook() ? this.$textContent("default") : super.textContent || "";
16
+ this.$needInit() && (this.$initVue(), this.$needHook(true));
17
17
  }
18
18
  set innerHTML(e2) {
19
- this.$needHook() ? this.$innerHTML(e2) : super.innerHTML = e2;
19
+ this.$needHook() ? this.$innerHTML("default", e2) : Reflect.set(HTMLElement.prototype, "innerHTML", e2, this);
20
20
  }
21
21
  get innerHTML() {
22
- return this.$needHook() ? this.$innerHTML("default") : super.innerHTML || "";
22
+ return this.$needHook() ? this.$innerHTML("default") : Reflect.get(HTMLElement.prototype, "innerHTML", this) || "";
23
23
  }
24
- set innerText(e2) {
25
- this.$ignoreLog("innerText"), super.innerText = e2;
24
+ set textContent(e2) {
25
+ this.$needHook() ? this.$textContent("default", e2) : Reflect.set(HTMLElement.prototype, "innerHTML", e2, this);
26
26
  }
27
- prepend(e2) {
28
- if (!this.$needHook()) return super.prepend(e2);
29
- this.$prepend("default", e2);
27
+ get textContent() {
28
+ return this.$needHook() ? this.$textContent("default") : Reflect.get(HTMLElement.prototype, "innerHTML", this) || "";
30
29
  }
31
- appendChild(e2) {
32
- return this.$needHook() ? this.$appendChild("default", e2) : super.appendChild(e2);
30
+ set innerText(e2) {
31
+ this.$ignoreLog("innerText"), Reflect.set(HTMLElement.prototype, "innerText", e2, this);
33
32
  }
34
33
  set value(e2) {
35
34
  let t2 = e2;
36
35
  const n2 = this[_AuiComponent.shadowSymbol].value;
37
- let r2;
38
- this.$isArrayValue() ? (t2 = _AuiComponent.$anyToArray(e2), r2 = JSON.stringify(t2)) : r2 = t2.toString(), n2 !== r2 && (this[_AuiComponent.shadowSymbol].value = r2, this[_AuiComponent.shadowSymbol].el && this.$attrChange("value"));
36
+ let o2;
37
+ this.$isArrayValue() ? (t2 = _AuiComponent.$anyToArray(e2), o2 = JSON.stringify(t2)) : o2 = t2.toString(), n2 !== o2 && (this[_AuiComponent.shadowSymbol].value = o2, this[_AuiComponent.shadowSymbol].el && this.$attrChange("value"));
39
38
  }
40
39
  get value() {
41
40
  const e2 = this[_AuiComponent.shadowSymbol].value;
42
41
  return this.$isArrayValue() && "string" == typeof e2 ? JSON.parse(e2) : e2;
43
42
  }
43
+ prepend(e2) {
44
+ if (!this.$needHook()) return HTMLElement.prototype.prepend.call(this, e2);
45
+ this.$prepend("default", e2);
46
+ }
47
+ appendChild(e2) {
48
+ return this.$needHook() ? this.$appendChild("default", e2) : HTMLElement.prototype.appendChild.call(this, e2);
49
+ }
50
+ insertBefore(e2, t2) {
51
+ return this.$needHook() ? this.$insertBefore("default", e2, t2) : HTMLElement.prototype.insertBefore.call(this, e2, t2);
52
+ }
44
53
  hasAttribute(e2) {
45
54
  const t2 = this[_AuiComponent.shadowSymbol].el;
46
- return t2 ? t2.hasAttribute(e2) : super.hasAttribute(e2);
55
+ return t2 ? t2.hasAttribute(e2) : HTMLElement.prototype.hasAttribute.call(this, e2);
47
56
  }
48
57
  setAttribute(e2, t2) {
49
58
  t2 = t2.toString();
@@ -52,7 +61,7 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
52
61
  if (n2.getAttribute(e2) === t2) return;
53
62
  n2.setAttribute(e2, t2);
54
63
  }
55
- this.$isShowProp(b.vueAttrName(e2)) && super.setAttribute(e2, t2), "value" === e2 && n2 ? this.value = n2.getAttribute(e2) : this.$attrChange(e2);
64
+ this.$isShowProp(b.vueAttrName(e2)) && HTMLElement.prototype.setAttribute.call(this, e2, t2), "value" === e2 && n2 ? this.value = n2.getAttribute(e2) : this.$attrChange(e2);
56
65
  }
57
66
  getAttribute(e2) {
58
67
  const t2 = this[_AuiComponent.shadowSymbol].el;
@@ -61,11 +70,11 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
61
70
  removeAttribute(e2) {
62
71
  const t2 = this[_AuiComponent.shadowSymbol].el;
63
72
  t2 && t2.removeAttribute(e2);
64
- this.$isShowProp(b.vueAttrName(e2)) && super.removeAttribute(e2), this.$attrChange(e2);
73
+ this.$isShowProp(b.vueAttrName(e2)) && HTMLElement.prototype.removeAttribute.call(this, e2), this.$attrChange(e2);
65
74
  }
66
75
  attributeChangedCallback(e2, t2, n2) {
67
- const r2 = this[_AuiComponent.shadowSymbol].el;
68
- r2 && t2 !== n2 && (this.$isShowProp(b.vueAttrName(e2)) || super.removeAttribute(e2), r2.setAttribute(e2, n2 || ""), "value" !== e2 && this.$attrChange(e2));
76
+ const o2 = this[_AuiComponent.shadowSymbol].el;
77
+ o2 && t2 !== n2 && (this.$isShowProp(b.vueAttrName(e2)) || HTMLElement.prototype.removeAttribute.call(this, e2), o2.setAttribute(e2, n2 || ""), "value" !== e2 && this.$attrChange(e2));
69
78
  }
70
79
  static $anyToArray(e2) {
71
80
  let t2 = [];
@@ -79,6 +88,9 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
79
88
  } else e2 instanceof Array && (t2 = e2);
80
89
  return t2;
81
90
  }
91
+ $resetShadowSymbol() {
92
+ this[_AuiComponent.shadowSymbol] = { needHook: false, slot: {} };
93
+ }
82
94
  $customEvent(e2, t2) {
83
95
  this.dispatchEvent(new CustomEvent(e2, Object.assign({ bubbles: false, composed: false, cancelable: true }, t2 || {})));
84
96
  }
@@ -86,17 +98,17 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
86
98
  let e2 = null;
87
99
  const t2 = this[_AuiComponent.shadowSymbol].slot;
88
100
  for (const n2 in t2) {
89
- const r2 = this.$slotCollection(t2[n2]);
90
- e2 || (e2 = {}), e2[n2] = r2;
101
+ const o2 = this.$slotCollection(t2[n2]);
102
+ e2 || (e2 = {}), e2[n2] = o2;
91
103
  }
92
104
  e2 && (this[_AuiComponent.shadowSymbol].slotCollection = e2), this.$customEvent("aui-force-update");
93
105
  }
94
106
  $slotCollection(e2) {
95
107
  var _a;
96
- const { start: t2, end: n2 } = e2, r2 = [];
97
- let o2;
98
- for (; t2 && (o2 = t2.nextSibling) && o2 !== n2; ) (_a = t2.parentNode) == null ? void 0 : _a.removeChild(o2), r2.push(o2);
99
- return r2;
108
+ const { start: t2, end: n2 } = e2, o2 = [];
109
+ let r2;
110
+ for (; t2 && (r2 = t2.nextSibling) && r2 !== n2; ) (_a = t2.parentNode) == null ? void 0 : _a.removeChild(r2), o2.push(r2);
111
+ return o2;
100
112
  }
101
113
  $slotReplace() {
102
114
  const e2 = this[_AuiComponent.shadowSymbol].slotCollection;
@@ -109,29 +121,30 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
109
121
  }
110
122
  $textContent(e2, ...t2) {
111
123
  if (0 === t2.length) {
112
- const t3 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
113
- let o2 = n2;
114
- for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) t3.push(o2.textContent);
124
+ const t3 = [], { start: n2, end: o2 } = this.$slot(e2) || {};
125
+ let r2 = n2;
126
+ for (; r2 && (r2 = r2.nextSibling) && r2 !== o2; ) t3.push(r2.textContent);
115
127
  return t3.join("");
116
128
  }
117
- return this.$replaceChildren(e2, [document.createTextNode(t2[0] || "")]), "";
129
+ return this.$hasSlot() ? (this.$replaceChildren(e2, [document.createTextNode(t2[0] || "")]), "") : "";
118
130
  }
119
131
  $innerHTML(e2, ...t2) {
120
132
  if (0 === t2.length) {
121
- const t3 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
122
- let o2 = n2;
123
- for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) if (o2.outerHTML) t3.push(o2.outerHTML);
133
+ const t3 = [], { start: n2, end: o2 } = this.$slot(e2) || {};
134
+ let r2 = n2;
135
+ for (; r2 && (r2 = r2.nextSibling) && r2 !== o2; ) if (r2.outerHTML) t3.push(r2.outerHTML);
124
136
  else {
125
- let e3 = o2.textContent;
126
- o2 instanceof Comment && (e3 = `<!--${e3}-->`), t3.push(e3);
137
+ let e3 = r2.textContent;
138
+ r2 instanceof Comment && (e3 = `<!--${e3}-->`), t3.push(e3);
127
139
  }
128
140
  return t3.join("");
129
141
  }
130
142
  {
143
+ if (!this.$hasSlot()) return "";
131
144
  const n2 = document.createElement("div");
132
145
  n2.innerHTML = t2[0] || "";
133
- const r2 = this.$moveChildren(n2);
134
- this.$replaceChildren(e2, r2.default);
146
+ const o2 = this.$moveChildren(n2);
147
+ this.$replaceChildren(e2, o2.default);
135
148
  }
136
149
  return "";
137
150
  }
@@ -145,29 +158,36 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
145
158
  const { end: n2 } = this.$slot(e2) || {};
146
159
  return (_a = n2 == null ? void 0 : n2.parentNode) == null ? void 0 : _a.insertBefore(t2, n2), t2;
147
160
  }
161
+ $insertBefore(e2, t2, n2) {
162
+ const { start: o2 } = this.$slot(e2) || {}, r2 = (o2 == null ? void 0 : o2.parentNode) || this;
163
+ return n2 ? r2 === this ? HTMLElement.prototype.insertBefore.call(this, t2, n2) : r2.insertBefore(t2, n2) : this.appendChild(t2), t2;
164
+ }
148
165
  $childNodes(e2) {
149
- const t2 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
150
- let o2 = n2;
151
- for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) t2.push(o2);
166
+ const t2 = [], { start: n2, end: o2 } = this.$slot(e2) || {};
167
+ let r2 = n2;
168
+ for (; r2 && (r2 = r2.nextSibling) && r2 !== o2; ) t2.push(r2);
152
169
  return t2;
153
170
  }
154
171
  $children(e2) {
155
- const t2 = [], { start: n2, end: r2 } = this.$slot(e2) || {};
156
- let o2 = n2;
157
- for (; o2 && (o2 = o2.nextSibling) && o2 !== r2; ) o2 instanceof HTMLElement && t2.push(o2);
172
+ const t2 = [], { start: n2, end: o2 } = this.$slot(e2) || {};
173
+ let r2 = n2;
174
+ for (; r2 && (r2 = r2.nextSibling) && r2 !== o2; ) r2 instanceof HTMLElement && t2.push(r2);
158
175
  return t2;
159
176
  }
160
177
  $replaceChildren(e2, t2) {
161
178
  var _a, _b;
162
- const { start: n2, end: r2 } = this.$slot(e2) || {};
163
- let o2 = null;
164
- for (; n2 && (o2 = n2.nextSibling) && o2 !== r2; ) (_a = o2.parentNode) == null ? void 0 : _a.removeChild(o2);
165
- if (r2) for (; o2 = t2.shift(); ) (_b = r2.parentNode) == null ? void 0 : _b.insertBefore(o2, r2);
179
+ const { start: n2, end: o2 } = this.$slot(e2) || {};
180
+ let r2 = null;
181
+ for (; n2 && (r2 = n2.nextSibling) && r2 !== o2; ) (_a = r2.parentNode) == null ? void 0 : _a.removeChild(r2);
182
+ if (o2) for (; r2 = t2.shift(); ) (_b = o2.parentNode) == null ? void 0 : _b.insertBefore(r2, o2);
166
183
  }
167
184
  $slot(e2, t2) {
168
185
  if (e2 = e2 || "default", !t2) return this[_AuiComponent.shadowSymbol].slot[e2];
169
186
  this[_AuiComponent.shadowSymbol].slot[e2] = t2;
170
187
  }
188
+ $hasSlot() {
189
+ return Object.keys(this[_AuiComponent.shadowSymbol].slot).length > 0;
190
+ }
171
191
  $needHook(e2) {
172
192
  return "boolean" == typeof e2 && (this[_AuiComponent.shadowSymbol].needHook = e2), this[_AuiComponent.shadowSymbol].needHook;
173
193
  }
@@ -177,13 +197,13 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
177
197
  var _a;
178
198
  const t2 = (e2 = e2 || this).childNodes, n2 = { default: [] };
179
199
  for (; t2.length > 0; ) {
180
- const r2 = t2[0];
181
- if ((_a = r2.parentNode) == null ? void 0 : _a.removeChild(r2), $.$isForAuiSlot(r2)) {
182
- const t3 = r2.getAttribute("for") || "default";
200
+ const o2 = t2[0];
201
+ if ((_a = o2.parentNode) == null ? void 0 : _a.removeChild(o2), $.$isForAuiSlot(o2)) {
202
+ const t3 = o2.getAttribute("for") || "default";
183
203
  n2[t3] = n2[t3] || [];
184
- const o2 = Array.prototype.slice.call(r2.childNodes);
185
- $.prototype.$bind.call(r2, e2), n2[t3].push(...o2);
186
- } else n2.default.push(r2);
204
+ const r2 = Array.prototype.slice.call(o2.childNodes);
205
+ $.prototype.$bind.call(o2, e2), n2[t3].push(...r2);
206
+ } else n2.default.push(o2);
187
207
  }
188
208
  return n2;
189
209
  }
@@ -194,15 +214,15 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
194
214
  $attrChange(e2) {
195
215
  if ("value" === e2) {
196
216
  const e3 = this.value;
197
- super.hasAttribute(p) ? this.$call("$emit", "update:value", e3) : this.$customEvent("input", { bubbles: true, composed: true });
217
+ HTMLElement.prototype.hasAttribute.call(this, p) ? this.$call("$emit", "update:value", e3) : this.$customEvent("input", { bubbles: true, composed: true });
198
218
  }
199
219
  this.$customEvent("aui-attr-change", { bubbles: true, composed: true, detail: { attributeName: b.vueAttrName(e2) } });
200
220
  }
201
221
  $initAttrs() {
202
222
  const e2 = this.attributes, t2 = document.createElement("div");
203
223
  for (let n2 = 0; n2 < e2.length; n2++) {
204
- const r2 = e2[n2];
205
- t2.setAttribute(r2.name, r2.value), this.$isShowProp(b.vueAttrName(r2.name)) || super.removeAttribute(r2.name), "value" === r2.name && (this.value = r2.value);
224
+ const o2 = e2[n2];
225
+ t2.setAttribute(o2.name, o2.value), this.$isShowProp(b.vueAttrName(o2.name)) || HTMLElement.prototype.removeAttribute.call(this, o2.name), "value" === o2.name && (this.value = o2.value);
206
226
  }
207
227
  Object.defineProperty(this, "attributes", { get value() {
208
228
  return t2.attributes;
@@ -225,7 +245,7 @@ const _AuiComponent = class _AuiComponent extends (c = HTMLElement, h = f, c) {
225
245
  b.cache.getAuiVueDefined(t2) && e(b.createVueComponent(t2, this)).mount(this);
226
246
  }
227
247
  $needInit() {
228
- return !super.hasAttribute(p);
248
+ return !HTMLElement.prototype.hasAttribute.call(this, p);
229
249
  }
230
250
  $bindVue(e2) {
231
251
  var _a, _b;
@@ -250,19 +270,19 @@ class $ extends HTMLElement {
250
270
  }
251
271
  set textContent(e2) {
252
272
  var _a;
253
- this._name_ ? (_a = this._el_) == null ? void 0 : _a.$textContent(this._name_, e2) : super.textContent = e2;
273
+ this._name_ ? (_a = this._el_) == null ? void 0 : _a.$textContent(this._name_, e2) : Reflect.set(HTMLElement.prototype, "textContent", e2, this);
254
274
  }
255
275
  set innerHTML(e2) {
256
276
  var _a;
257
- this._name_ ? (_a = this._el_) == null ? void 0 : _a.$innerHTML(this._name_, e2) : super.innerHTML = e2;
277
+ this._name_ ? (_a = this._el_) == null ? void 0 : _a.$innerHTML(this._name_, e2) : Reflect.set(HTMLElement.prototype, "innerHTML", e2, this);
258
278
  }
259
279
  prepend(e2) {
260
280
  var _a;
261
- this._name_ ? (_a = this._el_) == null ? void 0 : _a.$prepend(this._name_, e2) : super.prepend(e2);
281
+ this._name_ ? (_a = this._el_) == null ? void 0 : _a.$prepend(this._name_, e2) : HTMLElement.prototype.prepend.call(this, e2);
262
282
  }
263
283
  appendChild(e2) {
264
284
  var _a;
265
- return this._name_ ? ((_a = this._el_) == null ? void 0 : _a.$appendChild(this._name_, e2), e2) : super.appendChild(e2);
285
+ return this._name_ ? ((_a = this._el_) == null ? void 0 : _a.$appendChild(this._name_, e2), e2) : HTMLElement.prototype.appendChild.call(this, e2);
266
286
  }
267
287
  static $isAuiSlot(e2) {
268
288
  return !(!e2 || e2.nodeType !== Node.ELEMENT_NODE) && "aui-slot" === e2.tagName.toLowerCase();
@@ -274,8 +294,15 @@ class $ extends HTMLElement {
274
294
  this._el_ = e2, this._name_ = this.getAttribute("for") || "default";
275
295
  }
276
296
  $replace(e2) {
277
- const t2 = this.getAttribute("name") || "default", n2 = document.createComment(`aui-slot-${t2}-start`), r2 = document.createComment(`aui-slot-${t2}-end`);
278
- e2.$slot(t2, { start: n2, end: r2 }), this.replaceWith(n2, r2);
297
+ const t2 = this.getAttribute("name") || "default", n2 = document.createComment(`aui-slot-${t2}-start`), o2 = document.createComment(`aui-slot-${t2}-end`);
298
+ e2.$slot(t2, { start: n2, end: o2 }), this.$replaceWith(n2, o2);
299
+ }
300
+ $replaceWith(...e2) {
301
+ var _a;
302
+ e2.forEach((e3) => {
303
+ var _a2;
304
+ (_a2 = this.parentNode) == null ? void 0 : _a2.insertBefore(e3, this);
305
+ }), (_a = this.parentNode) == null ? void 0 : _a.removeChild(this);
279
306
  }
280
307
  }
281
308
  const b = { init: () => (b.defineSlot(), b), defineSlot() {
@@ -284,20 +311,21 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
284
311
  if (!e2) return new Error("not init");
285
312
  if (!t2) return e2;
286
313
  if ("function" == typeof e2[t2]) return e2[t2].call(e2, ...n2);
287
- const r2 = t2.split(".");
288
- let o2 = e2, s2 = r2.pop() || "", i2 = null;
289
- for (; i2 = r2.shift(); ) {
290
- if (!Object.prototype.hasOwnProperty.call(o2, i2)) return new Error("no match name");
291
- o2 = o2[i2];
292
- }
293
- return 0 === n2.length ? o2[s2] : (o2[s2] = n2[0], null);
314
+ const o2 = t2.split(".");
315
+ let r2 = e2, i2 = null;
316
+ const s2 = o2.pop() || "";
317
+ for (; i2 = o2.shift(); ) {
318
+ if (!Object.prototype.hasOwnProperty.call(r2, i2)) return new Error("no match name");
319
+ r2 = r2[i2];
320
+ }
321
+ return 0 === n2.length ? r2[s2] : (r2[s2] = n2[0], null);
294
322
  }, formatName: (e2) => e2 ? (e2 = e2.replace(/[A-Z]/g, function(e3) {
295
323
  return "-" + e3.toLowerCase();
296
324
  }), d + e2) : "", cache: { defined: {}, getAuiVueDefined: (e2) => (e2 = e2.toLowerCase(), b.cache.defined[e2]), getAuiPropNames(e2) {
297
325
  var _a;
298
- const t2 = b.cache.getAuiVueDefined(e2), n2 = ((_a = t2 == null ? void 0 : t2.origin) == null ? void 0 : _a.props) || {}, r2 = [];
299
- for (const e3 in n2) r2.push(b.auiAttrName(e3));
300
- return -1 === r2.indexOf(m) && r2.push(m), r2;
326
+ const t2 = b.cache.getAuiVueDefined(e2), n2 = ((_a = t2 == null ? void 0 : t2.origin) == null ? void 0 : _a.props) || {}, o2 = [];
327
+ for (const e3 in n2) o2.push(b.auiAttrName(e3));
328
+ return -1 === o2.indexOf(m) && o2.push(m), o2;
301
329
  }, addHooks(e2, t2) {
302
330
  e2 = e2.toLowerCase();
303
331
  const n2 = b.cache.getAuiVueDefined(e2);
@@ -321,18 +349,18 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
321
349
  return e2.mixins || (e2.mixins = []), e2.mixins.push(b.createExtendComp(e2)), t2;
322
350
  }, defineAuiComponent(e2, t2, n2) {
323
351
  var _a, _b;
324
- const r2 = b.patchDefaultProps(n2);
352
+ const o2 = b.patchDefaultProps(n2);
325
353
  if ((_a = b.cache.defined[e2]) == null ? void 0 : _a.origin) b.cache.defined[e2].origin = n2;
326
354
  else {
327
- class o2 extends AuiComponent {
355
+ class r2 extends AuiComponent {
328
356
  constructor() {
329
- super({ valueType: r2 });
357
+ super({ valueType: o2 });
330
358
  }
331
359
  static get observedAttributes() {
332
360
  return b.cache.getAuiPropNames(e2);
333
361
  }
334
362
  }
335
- b.cache.defined[e2] = { aui: o2, vue: t2, origin: n2, hooks: ((_b = b.cache.defined[e2]) == null ? void 0 : _b.hooks) || [] }, b.defineCustomElement(e2, o2);
363
+ b.cache.defined[e2] = { aui: r2, vue: t2, origin: n2, hooks: ((_b = b.cache.defined[e2]) == null ? void 0 : _b.hooks) || [] }, b.defineCustomElement(e2, r2);
336
364
  }
337
365
  }, defineCustomElement(e2, t2) {
338
366
  try {
@@ -341,8 +369,8 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
341
369
  }
342
370
  }, sameComponent(e2, t2) {
343
371
  if (!Object.prototype.hasOwnProperty.call(t2, "__hmrId")) return false;
344
- const n2 = b.cache.getAuiVueDefined(e2), r2 = n2 == null ? void 0 : n2.origin;
345
- return !!r2 && t2.__hmrId === r2.__hmrId;
372
+ const n2 = b.cache.getAuiVueDefined(e2), o2 = n2 == null ? void 0 : n2.origin;
373
+ return !!o2 && t2.__hmrId === o2.__hmrId;
346
374
  }, notifyComponentUpdate(e2) {
347
375
  document.querySelectorAll(e2).forEach((e3) => {
348
376
  e3.$forceUpdate();
@@ -350,26 +378,26 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
350
378
  }, define(e2, t2 = true) {
351
379
  const n2 = b.formatName(e2.name);
352
380
  if (!n2) return e2;
353
- const r2 = b.cache.getAuiVueDefined(n2);
354
- if (r2 && r2.vue) return (t2 || b.sameComponent(n2, e2)) && (b.defineAuiComponent(n2, r2.vue, e2), b.notifyComponentUpdate(n2)), r2.vue;
355
- const o2 = b.createVueComponent(n2);
356
- return b.defineAuiComponent(n2, o2, e2), o2;
381
+ const o2 = b.cache.getAuiVueDefined(n2);
382
+ if (o2 && o2.vue) return (t2 || b.sameComponent(n2, e2)) && (b.defineAuiComponent(n2, o2.vue, e2), b.notifyComponentUpdate(n2)), o2.vue;
383
+ const r2 = b.createVueComponent(n2);
384
+ return b.defineAuiComponent(n2, r2, e2), r2;
357
385
  }, createTempSlot(e2) {
358
386
  const t2 = {};
359
387
  return Object.keys(e2).forEach((e3) => {
360
- t2[e3] = () => u("aui-slot", { name: e3 });
388
+ t2[e3] = () => l("aui-slot", { name: e3 });
361
389
  }), t2;
362
390
  }, replaceTempSlot(e2, t2) {
363
391
  Object.keys(t2).forEach((n2) => {
364
- const r2 = e2.querySelector(`aui-slot[name="${n2}"]`);
365
- r2 && ($.prototype.$replace.call(r2, e2), e2.$replaceChildren(n2, t2[n2]));
392
+ const o2 = e2.querySelector(`aui-slot[name="${n2}"]`);
393
+ o2 && ($.prototype.$replace.call(o2, e2), e2.$replaceChildren(n2, t2[n2]));
366
394
  });
367
395
  }, createVueComponent(e2, t2) {
368
- const l2 = t2 ? t2.$moveChildren() : { default: [] };
396
+ const u2 = t2 ? t2.$moveChildren() : { default: [] };
369
397
  return { setup() {
370
- const h2 = n(), c2 = r(null), d2 = r(null), m2 = o({}), f2 = r(t2 ? b.createTempSlot(l2) : s()), $2 = r(null);
371
- return i(() => {
372
- c2.value && d2.value && d2.value.$bindVue && (d2.value.$bindVue(c2.value), t2 && b.replaceTempSlot(t2, l2), d2.value.addEventListener("aui-attr-change", () => {
398
+ const h2 = n(), c2 = o(null), d2 = o(null), m2 = r({}), f2 = o(t2 ? b.createTempSlot(u2) : i()), $2 = o(null);
399
+ return s(() => {
400
+ c2.value && d2.value && d2.value.$bindVue && (d2.value.$bindVue(c2.value), t2 && b.replaceTempSlot(t2, u2), d2.value.addEventListener("aui-attr-change", () => {
373
401
  d2.value && (m2.value = b.getAuiAttrs(d2.value));
374
402
  }), d2.value.addEventListener("aui-force-update", () => {
375
403
  $2.value = null;
@@ -378,15 +406,15 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
378
406
  d2.value && d2.value.$slotReplace();
379
407
  }), () => {
380
408
  if (t2 && (d2.value = t2, m2.value = b.getAuiAttrs(t2)), $2.value || ($2.value = b.formatStructure(e2)), !$2.value) return null;
381
- const n2 = u($2.value, { ...h2, ...m2.value, ref: c2 }, f2.value || {});
382
- return t2 ? n2 : u(e2, { ref: d2, [p]: "" }, [n2]);
409
+ const n2 = l($2.value, { ...h2, ...m2.value, ref: c2 }, f2.value || {});
410
+ return t2 ? n2 : l(e2, { ref: d2, [p]: "" }, [n2]);
383
411
  };
384
412
  } };
385
413
  }, getAuiAttrs(e2) {
386
414
  const t2 = {}, n2 = e2.attributes;
387
415
  for (let e3 = 0; e3 < n2.length; e3++) {
388
- const r2 = n2[e3];
389
- r2.name === d || b.isVueAttr(r2.name) || (t2[r2.name] = r2.value);
416
+ const o2 = n2[e3];
417
+ o2.name === d || b.isVueAttr(o2.name) || (t2[o2.name] = o2.value);
390
418
  }
391
419
  return null !== e2.value && (t2.value = e2.value), t2;
392
420
  }, isVueAttr: (e2) => 0 === e2.indexOf("data-v-"), auiAttrName: (e2) => e2.replace(/([A-Z])/g, (e3) => "-" + e3.toLowerCase()), vueAttrName: (e2) => b.isVueAttr(e2) ? e2 : e2.replace(/-([a-z])/g, (e3, t2) => t2.toUpperCase()), hookStructure(e2, t2) {
@@ -397,17 +425,18 @@ const b = { init: () => (b.defineSlot(), b), defineSlot() {
397
425
  }, formatStructure(e2) {
398
426
  const t2 = b.cache.getAuiVueDefined(e2);
399
427
  if (!(t2 == null ? void 0 : t2.origin)) return null;
400
- let n2 = l({}, t2.origin);
401
- const r2 = b.getHookStructure(e2);
402
- let o2;
403
- for (; o2 = r2.shift(); ) {
404
- const e3 = o2(n2);
428
+ let n2 = u({}, t2.origin);
429
+ const o2 = b.getHookStructure(e2);
430
+ let r2;
431
+ for (; r2 = o2.shift(); ) {
432
+ const e3 = r2(n2);
405
433
  e3 && (n2 = e3);
406
434
  }
407
435
  return n2;
408
- } }, v = b.init();
436
+ } }, y = b.init();
409
437
  export {
410
438
  AuiComponent,
411
- v as default
439
+ $ as AuiSlot,
440
+ y as default
412
441
  };
413
442
  //# sourceMappingURL=core.es.js.map