@agent-ui-kit/web-components 0.0.14 → 0.0.15
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/agent-ui.css +1 -1
- package/dist/api.colors.json +2 -2
- package/dist/api.colors.yaml +2 -2
- package/dist/api.components.json +4570 -1641
- package/dist/api.tokens.json +34 -2
- package/dist/api.tokens.yaml +26 -2
- package/dist/chunks/{agent-C72JZNe6.js → agent-BF_R_HJk.js} +65 -61
- package/dist/chunks/{agent-C72JZNe6.js.map → agent-BF_R_HJk.js.map} +1 -1
- package/dist/chunks/{empty-state-5M3uR5CM.js → meter-Dju8ik6C.js} +1169 -934
- package/dist/chunks/meter-Dju8ik6C.js.map +1 -0
- package/dist/components/agent.js +6 -6
- package/dist/components/avatar/avatar.d.ts +0 -0
- package/dist/components/badge/badge.d.ts +0 -0
- package/dist/components/bar/bar.d.ts +0 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/button-group/button-group.d.ts +0 -0
- package/dist/components/code/code.d.ts +0 -0
- package/dist/components/color-area/color-area.d.ts +2 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -0
- package/dist/components/color-picker/oklch-utils.d.ts +18 -0
- package/dist/components/color-slider/color-slider.d.ts +1 -1
- package/dist/components/color-swatch/color-swatch.d.ts +0 -0
- package/dist/components/content/content.d.ts +0 -0
- package/dist/components/description-list/description-list.d.ts +0 -0
- package/dist/components/divider/divider.d.ts +0 -0
- package/dist/components/editor.js +1 -1
- package/dist/components/fieldset/fieldset.d.ts +0 -0
- package/dist/components/footer/footer.d.ts +0 -0
- package/dist/components/graph.js +1 -1
- package/dist/components/grid/grid.d.ts +0 -0
- package/dist/components/header/header.d.ts +0 -0
- package/dist/components/heading/heading.d.ts +0 -0
- package/dist/components/input-group/input-group.d.ts +0 -0
- package/dist/components/inset/inset.d.ts +0 -0
- package/dist/components/kbd/kbd.d.ts +0 -0
- package/dist/components/stack/stack.d.ts +0 -0
- package/dist/components/stat/stat.d.ts +4 -0
- package/dist/components/text/text.d.ts +0 -0
- package/dist/components/time-field/time-field.d.ts +1 -0
- package/dist/components/wrap/wrap.d.ts +0 -0
- package/dist/components.js +114 -127
- package/dist/components.js.map +1 -1
- package/dist/docs/blocks/login-two-column.yaml +6 -6
- package/dist/docs/blocks/profile-card.yaml +5 -5
- package/dist/docs/components/accordion-item.yaml +13 -21
- package/dist/docs/components/accordion.yaml +23 -29
- package/dist/docs/components/agent-activity.yaml +27 -39
- package/dist/docs/components/agent-feed.yaml +15 -22
- package/dist/docs/components/agent-input.yaml +238 -0
- package/dist/docs/components/agent-message.yaml +29 -48
- package/dist/docs/components/agent-panel.yaml +21 -24
- package/dist/docs/components/agent-prompt.yaml +28 -46
- package/dist/docs/components/agent-seeds.yaml +15 -23
- package/dist/docs/components/agent-text.yaml +14 -24
- package/dist/docs/components/agent-thread.yaml +15 -24
- package/dist/docs/components/alert.yaml +41 -39
- package/dist/docs/components/avatar-group.yaml +72 -45
- package/dist/docs/components/avatar.yaml +99 -0
- package/dist/docs/components/badge.yaml +110 -0
- package/dist/docs/components/bar.yaml +84 -0
- package/dist/docs/components/breadcrumb-item.yaml +8 -17
- package/dist/docs/components/breadcrumb.yaml +60 -25
- package/dist/docs/components/button-group.yaml +93 -0
- package/dist/docs/components/button.yaml +177 -261
- package/dist/docs/components/calendar-picker.yaml +14 -34
- package/dist/docs/components/calendar-range-picker.yaml +11 -29
- package/dist/docs/components/calendar.yaml +11 -29
- package/dist/docs/components/canvas.yaml +44 -61
- package/dist/docs/components/checkbox.yaml +37 -49
- package/dist/docs/components/chip.yaml +88 -54
- package/dist/docs/components/code-block.yaml +54 -53
- package/dist/docs/components/code.yaml +37 -0
- package/dist/docs/components/color-area.yaml +119 -0
- package/dist/docs/components/color-field.yaml +121 -0
- package/dist/docs/components/color-picker.yaml +64 -38
- package/dist/docs/components/color-slider.yaml +153 -0
- package/dist/docs/components/color-swatch.yaml +98 -0
- package/dist/docs/components/command.yaml +13 -18
- package/dist/docs/components/container.yaml +83 -73
- package/dist/docs/components/content.yaml +100 -0
- package/dist/docs/components/context-menu.yaml +11 -20
- package/dist/docs/components/date-field.yaml +81 -33
- package/dist/docs/components/description-list.yaml +81 -0
- package/dist/docs/components/disclosure-group.yaml +61 -42
- package/dist/docs/components/disclosure.yaml +60 -46
- package/dist/docs/components/divider.yaml +63 -0
- package/dist/docs/components/dropdown-menu.yaml +16 -25
- package/dist/docs/components/feed.yaml +15 -24
- package/dist/docs/components/field.yaml +50 -71
- package/dist/docs/components/fieldset.yaml +92 -0
- package/dist/docs/components/footer.yaml +147 -0
- package/dist/docs/components/grid.yaml +87 -0
- package/dist/docs/components/gripper.yaml +11 -23
- package/dist/docs/components/header.yaml +168 -0
- package/dist/docs/components/heading.yaml +54 -0
- package/dist/docs/components/hover-card.yaml +17 -25
- package/dist/docs/components/icon.yaml +32 -65
- package/dist/docs/components/input-group.yaml +102 -0
- package/dist/docs/components/input-otp.yaml +20 -19
- package/dist/docs/components/input.yaml +92 -132
- package/dist/docs/components/inset.yaml +59 -0
- package/dist/docs/components/kbd.yaml +57 -0
- package/dist/docs/components/link.yaml +36 -45
- package/dist/docs/components/meter.yaml +27 -38
- package/dist/docs/components/nav-item.yaml +51 -40
- package/dist/docs/components/noodles.yaml +72 -104
- package/dist/docs/components/option.yaml +12 -23
- package/dist/docs/components/pagination.yaml +21 -18
- package/dist/docs/components/pane.yaml +18 -32
- package/dist/docs/components/panes.yaml +19 -27
- package/dist/docs/components/progress-circle.yaml +64 -55
- package/dist/docs/components/progress.yaml +35 -51
- package/dist/docs/components/radio-group.yaml +99 -40
- package/dist/docs/components/radio.yaml +40 -41
- package/dist/docs/components/range.yaml +24 -27
- package/dist/docs/components/segmented-control.yaml +58 -17
- package/dist/docs/components/select.yaml +80 -100
- package/dist/docs/components/skeleton.yaml +39 -39
- package/dist/docs/components/sparkline.yaml +28 -45
- package/dist/docs/components/spinner.yaml +32 -33
- package/dist/docs/components/stack.yaml +126 -0
- package/dist/docs/components/stepper.yaml +31 -38
- package/dist/docs/components/switch.yaml +36 -47
- package/dist/docs/components/tab-panel.yaml +27 -18
- package/dist/docs/components/tab.yaml +25 -22
- package/dist/docs/components/table-header.yaml +22 -12
- package/dist/docs/components/tabs.yaml +103 -20
- package/dist/docs/components/tag-group.yaml +63 -47
- package/dist/docs/components/text.yaml +67 -0
- package/dist/docs/components/textarea.yaml +43 -60
- package/dist/docs/components/time-field.yaml +74 -33
- package/dist/docs/components/toast.yaml +13 -30
- package/dist/docs/components/tooltip.yaml +56 -49
- package/dist/docs/components/tree-item.yaml +9 -10
- package/dist/docs/components/tree.yaml +127 -10
- package/dist/docs/components/wrap.yaml +60 -0
- package/dist/docs/traits/toggle-theme.yaml +34 -0
- package/dist/element.js +1 -1
- package/dist/icons.js +79 -59
- package/dist/icons.js.map +1 -1
- package/dist/reactivity.js +2 -2
- package/dist/register.d.ts +0 -1
- package/dist/register.js +258 -244
- package/dist/register.js.map +1 -1
- package/dist/store.js +1 -1
- package/dist/traits/toggle-theme/toggle-theme.d.ts +0 -0
- package/dist/traits/toggle-theme/toggle-theme.trait.d.ts +2 -0
- package/dist/traits.js +528 -485
- package/dist/traits.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/empty-state-5M3uR5CM.js.map +0 -1
package/dist/register.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { A as T,
|
|
1
|
+
import { A as T, l as S, m as I, n as $, o as z, p as n, q as O, v as X, d as _, k as B, f as K, j, b as J, i as V, g as Z, e as Q, h as tt } from "./chunks/agent-BF_R_HJk.js";
|
|
2
2
|
import { registerBuiltinTraits as et } from "./traits.js";
|
|
3
3
|
import { AuiEditor as it, AuiEditorLayer as st } from "./components/editor.js";
|
|
4
4
|
import { AuiGraphUi as at, AuiGraphLayer as nt, AuiGraphNode as ot, AuiGraphNoodle as rt, AuiGraphPort as ut } from "./components/graph.js";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import "./icons.js";
|
|
6
|
+
import { f as lt, N as dt, j as ct, ac as ht, $ as mt, a0 as ft, an as pt, w as bt, B as gt, E as vt, L as At, aq as yt, a1 as wt, O as Ct, J as xt, S as Et, R as kt, a5 as St, ap as Pt, al as $t, ad as Mt, ae as Lt, A as Dt, a as Tt, d as It, e as Nt, a4 as Yt, a3 as qt, W as Rt, q as Ft, t as zt, v as Gt, u as Ut, s as Ht, r as Wt, Y as Ot, X as Xt, af as _t, ai as Bt, ag as Kt, ak as jt, aj as Jt, ah as Vt, ar as Zt, as as Qt, H as te, a2 as ee, g as ie, h as se, b as ae, T as ne, V as oe, U as re, a6 as ue, a9 as le, a7 as de, a8 as ce, Z as he, l as me, aa as fe, k as pe, C as be, c as ge, _ as ve, D as Ae, am as ye, m as we, p as Ce, n as xe, ao as Ee, z as ke, x as Se, F as Pe, K as $e, o as Me, I as Le, y as De, ab as Te, M as Ie, i as Ne, Q as Ye, G as qe, P as Re } from "./chunks/meter-Dju8ik6C.js";
|
|
7
|
+
class Fe extends T {
|
|
7
8
|
static attributes = {
|
|
8
9
|
key: { type: "string", default: "" },
|
|
9
10
|
label: { type: "string", default: "" },
|
|
@@ -14,7 +15,7 @@ class Re extends T {
|
|
|
14
15
|
align: { type: "enum", values: ["start", "center", "end"], default: "start" }
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
class
|
|
18
|
+
class ze extends T {
|
|
18
19
|
static attributes = {
|
|
19
20
|
background: { type: "string", default: "none" },
|
|
20
21
|
orientation: { type: "string", default: "horizontal" },
|
|
@@ -33,7 +34,7 @@ class Fe extends T {
|
|
|
33
34
|
#l = 0;
|
|
34
35
|
#i = 0;
|
|
35
36
|
#m = 0;
|
|
36
|
-
#
|
|
37
|
+
#f = 0;
|
|
37
38
|
// Zoom state
|
|
38
39
|
#r = 1;
|
|
39
40
|
// ── Public API ──
|
|
@@ -119,10 +120,10 @@ class Fe extends T {
|
|
|
119
120
|
#y = (t) => {
|
|
120
121
|
if (t.button !== 0) return;
|
|
121
122
|
const e = t.target, i = this.#t;
|
|
122
|
-
i && i.contains(e) || (this.#u = !0, this.#l = t.clientX, this.#i = t.clientY, this.#m = this.#a, this.#
|
|
123
|
+
i && i.contains(e) || (this.#u = !0, this.#l = t.clientX, this.#i = t.clientY, this.#m = this.#a, this.#f = this.#s, this.#e.setPointerCapture(t.pointerId), this.setAttribute("data-canvas-panning", ""));
|
|
123
124
|
};
|
|
124
125
|
#w = (t) => {
|
|
125
|
-
this.#u && (this.#a = this.#m + (t.clientX - this.#l), this.#s = this.#
|
|
126
|
+
this.#u && (this.#a = this.#m + (t.clientX - this.#l), this.#s = this.#f + (t.clientY - this.#i), this.#o());
|
|
126
127
|
};
|
|
127
128
|
#v = (t) => {
|
|
128
129
|
this.#u && (this.#u = !1, this.removeAttribute("data-canvas-panning"), this.#d());
|
|
@@ -156,19 +157,19 @@ class Fe extends T {
|
|
|
156
157
|
}
|
|
157
158
|
};
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
-
if (!
|
|
161
|
-
const t = /* @__PURE__ */ new Date(
|
|
160
|
+
function M(f) {
|
|
161
|
+
if (!f) return null;
|
|
162
|
+
const t = /* @__PURE__ */ new Date(f + "T00:00:00");
|
|
162
163
|
return isNaN(t.getTime()) ? null : t;
|
|
163
164
|
}
|
|
164
|
-
function
|
|
165
|
-
const t =
|
|
165
|
+
function Ge(f) {
|
|
166
|
+
const t = f.getFullYear(), e = String(f.getMonth() + 1).padStart(2, "0"), i = String(f.getDate()).padStart(2, "0");
|
|
166
167
|
return `${t}-${e}-${i}`;
|
|
167
168
|
}
|
|
168
|
-
function N(
|
|
169
|
-
return
|
|
169
|
+
function N(f, t) {
|
|
170
|
+
return f.getFullYear() === t.getFullYear() && f.getMonth() === t.getMonth() && f.getDate() === t.getDate();
|
|
170
171
|
}
|
|
171
|
-
class
|
|
172
|
+
class Ue {
|
|
172
173
|
view;
|
|
173
174
|
focusedYear;
|
|
174
175
|
focusedMonth;
|
|
@@ -183,7 +184,7 @@ class Ge {
|
|
|
183
184
|
years;
|
|
184
185
|
title;
|
|
185
186
|
constructor(t = {}) {
|
|
186
|
-
const e = /* @__PURE__ */ new Date(), i =
|
|
187
|
+
const e = /* @__PURE__ */ new Date(), i = M(t.value ?? null) ?? e;
|
|
187
188
|
this.view = S("day"), this.focusedYear = S(i.getFullYear()), this.focusedMonth = S(i.getMonth()), this.value = S(t.value ?? null), this.rangeStart = S(t.rangeStart ?? null), this.rangeEnd = S(t.rangeEnd ?? null), this.min = S(t.min ?? null), this.max = S(t.max ?? null), this.days = I(() => this.#n()), this.months = I(() => this.#t()), this.years = I(() => this.#e()), this.title = I(() => this.#a());
|
|
188
189
|
}
|
|
189
190
|
// ── Navigation ──
|
|
@@ -231,32 +232,32 @@ class Ge {
|
|
|
231
232
|
}
|
|
232
233
|
// ── Validation ──
|
|
233
234
|
isDateDisabled(t) {
|
|
234
|
-
const e =
|
|
235
|
+
const e = M(this.min.value), i = M(this.max.value), s = M(t);
|
|
235
236
|
return !!(!s || e && s < e || i && s > i);
|
|
236
237
|
}
|
|
237
238
|
// ── Private Computations ──
|
|
238
239
|
#n() {
|
|
239
|
-
const t = this.focusedYear.value, e = this.focusedMonth.value, i =
|
|
240
|
-
for (let
|
|
241
|
-
const
|
|
242
|
-
let
|
|
240
|
+
const t = this.focusedYear.value, e = this.focusedMonth.value, i = M(this.value.value), s = /* @__PURE__ */ new Date(), a = M(this.rangeStart.value), o = M(this.rangeEnd.value), c = new Date(t, e, 1).getDay(), u = new Date(t, e, 1 - c), m = [];
|
|
241
|
+
for (let h = 0; h < 42; h++) {
|
|
242
|
+
const d = new Date(u.getFullYear(), u.getMonth(), u.getDate() + h), v = Ge(d), l = d.getMonth() === e, p = N(d, s), b = i ? N(d, i) : !1, x = this.isDateDisabled(v);
|
|
243
|
+
let g = !1, y = !1, P = !1;
|
|
243
244
|
if (a && o) {
|
|
244
245
|
const E = a <= o ? a : o, D = a <= o ? o : a;
|
|
245
|
-
|
|
246
|
+
g = d >= E && d <= D, y = N(d, E), P = N(d, D);
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
m.push({
|
|
248
249
|
date: v,
|
|
249
|
-
day:
|
|
250
|
-
inMonth:
|
|
251
|
-
isToday:
|
|
252
|
-
isSelected:
|
|
253
|
-
isDisabled:
|
|
254
|
-
inRange:
|
|
250
|
+
day: d.getDate(),
|
|
251
|
+
inMonth: l,
|
|
252
|
+
isToday: p,
|
|
253
|
+
isSelected: b,
|
|
254
|
+
isDisabled: x,
|
|
255
|
+
inRange: g,
|
|
255
256
|
isRangeStart: y,
|
|
256
257
|
isRangeEnd: P
|
|
257
258
|
});
|
|
258
259
|
}
|
|
259
|
-
return
|
|
260
|
+
return m;
|
|
260
261
|
}
|
|
261
262
|
#t() {
|
|
262
263
|
const t = this.focusedYear.value, e = this.focusedMonth.value;
|
|
@@ -305,7 +306,7 @@ class Ge {
|
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
|
-
class
|
|
309
|
+
class He extends T {
|
|
309
310
|
static attributes = {
|
|
310
311
|
value: { type: "string", default: "" },
|
|
311
312
|
min: { type: "string", default: "" },
|
|
@@ -314,7 +315,7 @@ class Ue extends T {
|
|
|
314
315
|
range: { type: "boolean", default: !1 }
|
|
315
316
|
};
|
|
316
317
|
#n;
|
|
317
|
-
#t = new
|
|
318
|
+
#t = new Ue();
|
|
318
319
|
#e = S(!1);
|
|
319
320
|
// WHY: Track focused cell index for keyboard navigation within the grid
|
|
320
321
|
#a = S(0);
|
|
@@ -375,7 +376,7 @@ class Ue extends T {
|
|
|
375
376
|
});
|
|
376
377
|
}
|
|
377
378
|
dispose() {
|
|
378
|
-
this.querySelector('aui-button[data-role="prev"]')?.removeEventListener("click", this.#m), this.querySelector('aui-button[data-role="next"]')?.removeEventListener("click", this.#
|
|
379
|
+
this.querySelector('aui-button[data-role="prev"]')?.removeEventListener("click", this.#m), this.querySelector('aui-button[data-role="next"]')?.removeEventListener("click", this.#f), this.querySelector('aui-button[data-role="title"]')?.removeEventListener("click", this.#r);
|
|
379
380
|
const t = this.querySelector("[data-cal-grid]");
|
|
380
381
|
t?.removeEventListener("click", this.#h), t?.removeEventListener("pointermove", this.#o), t?.removeEventListener("pointerdown", this.#d), t?.removeEventListener("pointerup", this.#b), this.removeEventListener("keydown", this.#E), super.dispose();
|
|
381
382
|
}
|
|
@@ -392,7 +393,7 @@ class Ue extends T {
|
|
|
392
393
|
for (const a of this.querySelectorAll("[data-cal-header] aui-button"))
|
|
393
394
|
a.setAttribute("tabindex", "-1");
|
|
394
395
|
const t = this.querySelector('aui-button[data-role="prev"]'), e = this.querySelector('aui-button[data-role="next"]'), i = this.querySelector('aui-button[data-role="title"]');
|
|
395
|
-
t?.addEventListener("click", this.#m), e?.addEventListener("click", this.#
|
|
396
|
+
t?.addEventListener("click", this.#m), e?.addEventListener("click", this.#f), i?.addEventListener("click", this.#r);
|
|
396
397
|
const s = this.querySelector("[data-cal-grid]");
|
|
397
398
|
s?.addEventListener("click", this.#h), s?.addEventListener("pointermove", this.#o), s?.addEventListener("pointerdown", this.#d), s?.addEventListener("pointerup", this.#b);
|
|
398
399
|
}
|
|
@@ -403,8 +404,8 @@ class Ue extends T {
|
|
|
403
404
|
this.setAttribute("view", "day"), i.innerHTML = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((o) => `<span data-cal-weekday>${o}</span>`).join("");
|
|
404
405
|
const a = this.#t.days.value;
|
|
405
406
|
s.innerHTML = a.map((o, r) => {
|
|
406
|
-
let
|
|
407
|
-
return o.inMonth || (
|
|
407
|
+
let c = `data-date="${o.date}" data-index="${r}" tabindex="-1"`;
|
|
408
|
+
return o.inMonth || (c += " data-outside"), o.isToday && (c += ' data-today aria-current="date"'), o.isSelected && (c += ' data-selected aria-selected="true"'), o.isDisabled && (c += " disabled"), o.inRange && (c += " data-in-range"), o.isRangeStart && (c += " data-range-start"), o.isRangeEnd && (c += " data-range-end"), `<div data-cal-day ${c}>${o.day}</div>`;
|
|
408
409
|
}).join("");
|
|
409
410
|
} else if (t === "month") {
|
|
410
411
|
this.setAttribute("view", "month"), i.innerHTML = "";
|
|
@@ -428,7 +429,7 @@ class Ue extends T {
|
|
|
428
429
|
#m = () => {
|
|
429
430
|
this.#y();
|
|
430
431
|
};
|
|
431
|
-
#
|
|
432
|
+
#f = () => {
|
|
432
433
|
this.#w();
|
|
433
434
|
};
|
|
434
435
|
#r = () => {
|
|
@@ -438,13 +439,13 @@ class Ue extends T {
|
|
|
438
439
|
this.#A(t);
|
|
439
440
|
};
|
|
440
441
|
#o = (t) => {
|
|
441
|
-
this.#
|
|
442
|
+
this.#x(t);
|
|
442
443
|
};
|
|
443
444
|
#d = (t) => {
|
|
444
445
|
this.#k(t);
|
|
445
446
|
};
|
|
446
447
|
#b = (t) => {
|
|
447
|
-
this.#
|
|
448
|
+
this.#p(t);
|
|
448
449
|
};
|
|
449
450
|
#y() {
|
|
450
451
|
const t = this.#t.view.value;
|
|
@@ -493,7 +494,7 @@ class Ue extends T {
|
|
|
493
494
|
this.#t.selectDate(i), this.#t.setRange(i, null);
|
|
494
495
|
}), this.setAttribute("value", i), this.#s = "selecting"));
|
|
495
496
|
}
|
|
496
|
-
#
|
|
497
|
+
#p(t) {
|
|
497
498
|
if (!this.#u || (this.#u = !1, this.#s !== "selecting")) return;
|
|
498
499
|
const e = t.target.closest("[data-cal-day]");
|
|
499
500
|
if (!e || e.hasAttribute("disabled")) return;
|
|
@@ -502,7 +503,7 @@ class Ue extends T {
|
|
|
502
503
|
const s = this.#t.rangeStart.value;
|
|
503
504
|
s && s !== i && this.#g(i);
|
|
504
505
|
}
|
|
505
|
-
#
|
|
506
|
+
#x(t) {
|
|
506
507
|
if (this.#e.value || !this.range || this.#s !== "selecting") return;
|
|
507
508
|
const e = t.target.closest("[data-cal-day]");
|
|
508
509
|
if (!e || e.hasAttribute("disabled")) return;
|
|
@@ -552,12 +553,12 @@ class Ue extends T {
|
|
|
552
553
|
a && (t.preventDefault(), s = Math.max(0, Math.min(41, s)), this.#a.value = s, s < 0 && this.#t.prevMonth(), s > 41 && this.#t.nextMonth());
|
|
553
554
|
};
|
|
554
555
|
}
|
|
555
|
-
let
|
|
556
|
-
function H(
|
|
557
|
-
return `${
|
|
556
|
+
let We = 0;
|
|
557
|
+
function H(f) {
|
|
558
|
+
return `${f}-${Date.now().toString(36)}-${(++We).toString(36)}`;
|
|
558
559
|
}
|
|
559
|
-
const Oe = 50,
|
|
560
|
-
class
|
|
560
|
+
const Oe = 50, L = "http://www.w3.org/2000/svg";
|
|
561
|
+
class Xe {
|
|
561
562
|
host;
|
|
562
563
|
// ── Public mutable options ──
|
|
563
564
|
selector;
|
|
@@ -580,7 +581,7 @@ class We {
|
|
|
580
581
|
#l = null;
|
|
581
582
|
#i = null;
|
|
582
583
|
#m = null;
|
|
583
|
-
#
|
|
584
|
+
#f = null;
|
|
584
585
|
#r = 0;
|
|
585
586
|
#h = !1;
|
|
586
587
|
#o = !1;
|
|
@@ -598,19 +599,19 @@ class We {
|
|
|
598
599
|
// ── Lifecycle ──
|
|
599
600
|
attach() {
|
|
600
601
|
if (this.#n) return;
|
|
601
|
-
this.#n = !0, getComputedStyle(this.host).position === "static" && (this.host.style.position = "relative"), this.host.style.isolation = "isolate", this.#b(), this.#w(), this.#R(), this.showPorts && this.#S(), this.host.addEventListener("aui:magnet-snap", this.#
|
|
602
|
+
this.#n = !0, getComputedStyle(this.host).position === "static" && (this.host.style.position = "relative"), this.host.style.isolation = "isolate", this.#b(), this.#w(), this.#R(), this.showPorts && this.#S(), this.host.addEventListener("aui:magnet-snap", this.#C), this.host.addEventListener("aui:magnet-drop", this.#C), this.host.addEventListener("aui:drag-move", this.#C), this.#p();
|
|
602
603
|
}
|
|
603
604
|
detach() {
|
|
604
|
-
this.#n && (this.#n = !1, this.#F(), this.#T(), this.#y(), this.#v(), this.host.style.isolation = "", this.host.removeEventListener("aui:magnet-snap", this.#
|
|
605
|
+
this.#n && (this.#n = !1, this.#F(), this.#T(), this.#y(), this.#v(), this.host.style.isolation = "", this.host.removeEventListener("aui:magnet-snap", this.#C), this.host.removeEventListener("aui:magnet-drop", this.#C), this.host.removeEventListener("aui:drag-move", this.#C), this.#r && (cancelAnimationFrame(this.#r), this.#r = 0), this.#h = !1);
|
|
605
606
|
}
|
|
606
607
|
destroy() {
|
|
607
|
-
this.#
|
|
608
|
+
this.#L(), this.detach(), this.#e.clear();
|
|
608
609
|
}
|
|
609
610
|
// ── Public API ──
|
|
610
611
|
/** Add a connection. Returns the connection ID. */
|
|
611
612
|
connect(t, e, i = "right", s = "left") {
|
|
612
613
|
const a = H("noodle"), o = { id: a, from: t, to: e, fromPort: i, toPort: s };
|
|
613
|
-
return this.#e.set(a, o), this.#
|
|
614
|
+
return this.#e.set(a, o), this.#p(), this.host.dispatchEvent(new CustomEvent("aui:noodle-connect", {
|
|
614
615
|
bubbles: !0,
|
|
615
616
|
composed: !0,
|
|
616
617
|
detail: { id: a, from: t, to: e, fromPort: i, toPort: s }
|
|
@@ -619,7 +620,7 @@ class We {
|
|
|
619
620
|
/** Remove a connection by ID. */
|
|
620
621
|
disconnect(t) {
|
|
621
622
|
const e = this.#e.get(t);
|
|
622
|
-
return e ? (this.#e.delete(t), this.#
|
|
623
|
+
return e ? (this.#e.delete(t), this.#p(), this.host.dispatchEvent(new CustomEvent("aui:noodle-disconnect", {
|
|
623
624
|
bubbles: !0,
|
|
624
625
|
composed: !0,
|
|
625
626
|
detail: { id: t, from: e.from, to: e.to, fromPort: e.fromPort, toPort: e.toPort }
|
|
@@ -628,7 +629,7 @@ class We {
|
|
|
628
629
|
/** Remove all connections. */
|
|
629
630
|
clear() {
|
|
630
631
|
const t = [...this.#e.values()];
|
|
631
|
-
this.#e.clear(), this.#
|
|
632
|
+
this.#e.clear(), this.#p();
|
|
632
633
|
for (const e of t)
|
|
633
634
|
this.host.dispatchEvent(new CustomEvent("aui:noodle-disconnect", {
|
|
634
635
|
bubbles: !0,
|
|
@@ -649,17 +650,17 @@ class We {
|
|
|
649
650
|
fromPort: e.fromPort ?? "right",
|
|
650
651
|
toPort: e.toPort ?? "left"
|
|
651
652
|
});
|
|
652
|
-
this.#
|
|
653
|
+
this.#p();
|
|
653
654
|
}
|
|
654
655
|
/** Force re-render all paths and rebuild port indicators.
|
|
655
656
|
* Call after programmatic element moves or when the set of port elements changes. */
|
|
656
657
|
update() {
|
|
657
|
-
this.#
|
|
658
|
+
this.#p(), this.showPorts && !this.#l && this.#S();
|
|
658
659
|
}
|
|
659
660
|
// ── SVG overlay ──
|
|
660
661
|
#b() {
|
|
661
|
-
const t = document.createElementNS(
|
|
662
|
-
t.setAttribute("data-noodle-svg", ""), t.style.cssText = "position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:0;", this.#s = document.createElementNS(
|
|
662
|
+
const t = document.createElementNS(L, "svg");
|
|
663
|
+
t.setAttribute("data-noodle-svg", ""), t.style.cssText = "position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:0;", this.#s = document.createElementNS(L, "g"), this.#s.setAttribute("data-noodle-hits", ""), t.appendChild(this.#s), this.#a = document.createElementNS(L, "g"), this.#a.setAttribute("data-noodle-paths", ""), t.appendChild(this.#a), this.host.appendChild(t), this.#t = t;
|
|
663
664
|
}
|
|
664
665
|
#y() {
|
|
665
666
|
this.#t?.remove(), this.#t = null, this.#a = null, this.#s = null;
|
|
@@ -689,23 +690,23 @@ class We {
|
|
|
689
690
|
let s = 0, a = 0, o = i;
|
|
690
691
|
for (; o && o !== this.host; ) {
|
|
691
692
|
s += o.offsetLeft, a += o.offsetTop;
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
694
|
-
const
|
|
695
|
-
|
|
693
|
+
const u = o.style.translate;
|
|
694
|
+
if (u) {
|
|
695
|
+
const m = u.match(/-?[\d.]+/g);
|
|
696
|
+
m && (s += parseFloat(m[0]) || 0, a += parseFloat(m[1]) || 0);
|
|
696
697
|
}
|
|
697
698
|
o = o.offsetParent;
|
|
698
699
|
}
|
|
699
|
-
const r = i.offsetWidth,
|
|
700
|
+
const r = i.offsetWidth, c = i.offsetHeight;
|
|
700
701
|
switch (e) {
|
|
701
702
|
case "top":
|
|
702
703
|
return { x: s + r / 2, y: a };
|
|
703
704
|
case "right":
|
|
704
|
-
return { x: s + r, y: a +
|
|
705
|
+
return { x: s + r, y: a + c / 2 };
|
|
705
706
|
case "bottom":
|
|
706
|
-
return { x: s + r / 2, y: a +
|
|
707
|
+
return { x: s + r / 2, y: a + c };
|
|
707
708
|
case "left":
|
|
708
|
-
return { x: s, y: a +
|
|
709
|
+
return { x: s, y: a + c / 2 };
|
|
709
710
|
}
|
|
710
711
|
}
|
|
711
712
|
#g(t, e, i, s) {
|
|
@@ -732,23 +733,23 @@ class We {
|
|
|
732
733
|
}
|
|
733
734
|
case "bezier":
|
|
734
735
|
default: {
|
|
735
|
-
const s = Math.max(Math.abs(i.x - e.x), Math.abs(i.y - e.y)), a = Math.max(50, s * this.tension), [o, r] = this.#g(e.x, e.y, t.fromPort, a), [
|
|
736
|
-
return `M ${e.x} ${e.y} C ${o} ${r}, ${
|
|
736
|
+
const s = Math.max(Math.abs(i.x - e.x), Math.abs(i.y - e.y)), a = Math.max(50, s * this.tension), [o, r] = this.#g(e.x, e.y, t.fromPort, a), [c, u] = this.#g(i.x, i.y, t.toPort, a);
|
|
737
|
+
return `M ${e.x} ${e.y} C ${o} ${r}, ${c} ${u}, ${i.x} ${i.y}`;
|
|
737
738
|
}
|
|
738
739
|
}
|
|
739
740
|
}
|
|
740
741
|
// ── Rendering ──
|
|
741
|
-
#
|
|
742
|
+
#p() {
|
|
742
743
|
if (!(!this.#a || !this.#s)) {
|
|
743
744
|
this.#o = !0, this.#a.textContent = "", this.#s.textContent = "", this.#i && this.#a.appendChild(this.#i);
|
|
744
745
|
for (const t of this.#e.values()) {
|
|
745
746
|
const e = this.#k(t);
|
|
746
747
|
if (!e) continue;
|
|
747
748
|
if (this.editable) {
|
|
748
|
-
const s = document.createElementNS(
|
|
749
|
+
const s = document.createElementNS(L, "path");
|
|
749
750
|
s.setAttribute("d", e), s.setAttribute("stroke", "transparent"), s.setAttribute("stroke-width", "14"), s.setAttribute("fill", "none"), s.style.pointerEvents = "stroke", s.style.cursor = "pointer", s.dataset.noodleId = t.id, s.addEventListener("pointerdown", this.#q), this.#s.appendChild(s);
|
|
750
751
|
}
|
|
751
|
-
const i = document.createElementNS(
|
|
752
|
+
const i = document.createElementNS(L, "path");
|
|
752
753
|
i.setAttribute("d", e), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "round"), this.disabled ? (i.setAttribute("stroke", "var(--aui-ink-muted)"), i.setAttribute("stroke-width", String(this.strokeWidth)), i.setAttribute("stroke-dasharray", "6 4"), i.style.opacity = "0.6") : (i.setAttribute("stroke", t.color ?? this.color), i.setAttribute("stroke-width", String(this.strokeWidth)), this.animated && (i.setAttribute("stroke-dasharray", "8 4"), i.style.animation = "noodle-flow 0.6s linear infinite")), this.#a.appendChild(i);
|
|
753
754
|
}
|
|
754
755
|
this.#l || queueMicrotask(() => {
|
|
@@ -756,15 +757,15 @@ class We {
|
|
|
756
757
|
});
|
|
757
758
|
}
|
|
758
759
|
}
|
|
759
|
-
#
|
|
760
|
+
#x() {
|
|
760
761
|
this.#h || (this.#h = !0, this.#r = requestAnimationFrame(() => {
|
|
761
|
-
this.#h = !1, this.#
|
|
762
|
+
this.#h = !1, this.#p(), this.showPorts && this.#D();
|
|
762
763
|
}));
|
|
763
764
|
}
|
|
764
765
|
/** Full update: recreate port indicators (for child list changes). */
|
|
765
766
|
#E() {
|
|
766
767
|
this.#h || (this.#h = !0, this.#r = requestAnimationFrame(() => {
|
|
767
|
-
this.#h = !1, this.#
|
|
768
|
+
this.#h = !1, this.#p(), this.showPorts && !this.#l && this.#S();
|
|
768
769
|
}));
|
|
769
770
|
}
|
|
770
771
|
// ── Port indicators (edit mode) ──
|
|
@@ -811,14 +812,14 @@ class We {
|
|
|
811
812
|
}, e.setAttribute("data-noodle-dragging", "");
|
|
812
813
|
for (const o of this.#u) {
|
|
813
814
|
if (o === e) continue;
|
|
814
|
-
const r = o.getAttribute("data-noodle-target"),
|
|
815
|
-
r === i &&
|
|
815
|
+
const r = o.getAttribute("data-noodle-target"), c = o.getAttribute("data-noodle-side");
|
|
816
|
+
r === i && c === s || o.setAttribute("data-noodle-droppable", "");
|
|
816
817
|
}
|
|
817
|
-
this.#o = !0, this.#i = document.createElementNS(
|
|
818
|
+
this.#o = !0, this.#i = document.createElementNS(L, "path"), this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.setAttribute("stroke-width", String(this.strokeWidth)), this.#i.setAttribute("fill", "none"), this.#i.setAttribute("stroke-dasharray", "6 4"), this.#i.setAttribute("stroke-linecap", "round"), this.#i.style.opacity = "0.7", this.#a?.appendChild(this.#i), this.host.dispatchEvent(new CustomEvent("aui:noodle-drag", {
|
|
818
819
|
bubbles: !0,
|
|
819
820
|
composed: !0,
|
|
820
821
|
detail: { from: i, fromPort: s, x: t.clientX, y: t.clientY }
|
|
821
|
-
})), document.addEventListener("pointermove", this.#P), document.addEventListener("pointerup", this.#$), document.addEventListener("pointercancel", this.#
|
|
822
|
+
})), document.addEventListener("pointermove", this.#P), document.addEventListener("pointerup", this.#$), document.addEventListener("pointercancel", this.#M);
|
|
822
823
|
}
|
|
823
824
|
};
|
|
824
825
|
#P = (t) => {
|
|
@@ -826,8 +827,8 @@ class We {
|
|
|
826
827
|
if (!e || !this.#i) return;
|
|
827
828
|
const i = this.#c(e.fromId, e.fromPort);
|
|
828
829
|
if (!i) return;
|
|
829
|
-
const { x: s, y: a } = this.#A(t.clientX, t.clientY), o = Math.max(Math.abs(s - i.x), Math.abs(a - i.y)), r = Math.max(50, o * this.tension), [
|
|
830
|
-
this.#i.setAttribute("d",
|
|
830
|
+
const { x: s, y: a } = this.#A(t.clientX, t.clientY), o = Math.max(Math.abs(s - i.x), Math.abs(a - i.y)), r = Math.max(50, o * this.tension), [c, u] = this.#g(i.x, i.y, e.fromPort, r), m = `M ${i.x} ${i.y} C ${c} ${u}, ${s} ${a}, ${s} ${a}`;
|
|
831
|
+
this.#i.setAttribute("d", m), this.#Y(t.clientX, t.clientY);
|
|
831
832
|
};
|
|
832
833
|
#$ = (t) => {
|
|
833
834
|
const e = this.#l;
|
|
@@ -837,15 +838,15 @@ class We {
|
|
|
837
838
|
const s = i.getAttribute("data-noodle-target"), a = i.getAttribute("data-noodle-side");
|
|
838
839
|
(s !== e.fromId || a !== e.fromPort) && this.connect(e.fromId, s, e.fromPort, a);
|
|
839
840
|
}
|
|
840
|
-
this.#
|
|
841
|
+
this.#L();
|
|
841
842
|
};
|
|
842
|
-
#
|
|
843
|
-
this.#
|
|
843
|
+
#M = () => {
|
|
844
|
+
this.#L();
|
|
844
845
|
};
|
|
845
|
-
#
|
|
846
|
+
#L() {
|
|
846
847
|
for (const t of this.#u)
|
|
847
848
|
t.removeAttribute("data-noodle-dragging"), t.removeAttribute("data-noodle-droppable"), t.removeAttribute("data-noodle-drop-ready");
|
|
848
|
-
this.#i?.remove(), this.#i = null, this.#l = null, document.removeEventListener("pointermove", this.#P), document.removeEventListener("pointerup", this.#$), document.removeEventListener("pointercancel", this.#
|
|
849
|
+
this.#i?.remove(), this.#i = null, this.#l = null, document.removeEventListener("pointermove", this.#P), document.removeEventListener("pointerup", this.#$), document.removeEventListener("pointercancel", this.#M), this.#o = !1;
|
|
849
850
|
}
|
|
850
851
|
// ── Proximity helpers ──
|
|
851
852
|
/** Find the nearest droppable port within DROP_SNAP_RADIUS of a screen point. */
|
|
@@ -853,8 +854,8 @@ class We {
|
|
|
853
854
|
let i = null, s = Oe;
|
|
854
855
|
for (const a of this.#u) {
|
|
855
856
|
if (!a.hasAttribute("data-noodle-droppable")) continue;
|
|
856
|
-
const o = a.getBoundingClientRect(), r = o.left + o.width / 2,
|
|
857
|
-
|
|
857
|
+
const o = a.getBoundingClientRect(), r = o.left + o.width / 2, c = o.top + o.height / 2, u = Math.hypot(t - r, e - c);
|
|
858
|
+
u < s && (s = u, i = a);
|
|
858
859
|
}
|
|
859
860
|
return i;
|
|
860
861
|
}
|
|
@@ -867,8 +868,8 @@ class We {
|
|
|
867
868
|
this.#i.setAttribute("stroke", this.color), this.#i.style.opacity = "1", this.#i.removeAttribute("stroke-dasharray");
|
|
868
869
|
const s = i.getAttribute("data-noodle-target"), a = i.getAttribute("data-noodle-side"), o = this.#c(s, a), r = this.#c(this.#l.fromId, this.#l.fromPort);
|
|
869
870
|
if (r && o) {
|
|
870
|
-
const
|
|
871
|
-
this.#i.setAttribute("d", `M ${r.x} ${r.y} C ${
|
|
871
|
+
const c = Math.max(Math.abs(o.x - r.x), Math.abs(o.y - r.y)), u = Math.max(50, c * this.tension), [m, h] = this.#g(r.x, r.y, this.#l.fromPort, u), [d, v] = this.#g(o.x, o.y, a, u);
|
|
872
|
+
this.#i.setAttribute("d", `M ${r.x} ${r.y} C ${m} ${h}, ${d} ${v}, ${o.x} ${o.y}`);
|
|
872
873
|
}
|
|
873
874
|
} else this.#i && (this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.style.opacity = "0.7", this.#i.setAttribute("stroke-dasharray", "6 4"));
|
|
874
875
|
}
|
|
@@ -885,54 +886,54 @@ class We {
|
|
|
885
886
|
this.#o = !1;
|
|
886
887
|
return;
|
|
887
888
|
}
|
|
888
|
-
const { x: r, y:
|
|
889
|
+
const { x: r, y: c } = this.#A(t.clientX, t.clientY), u = Math.hypot(r - a.x, c - a.y), m = Math.hypot(r - o.x, c - o.y), h = u < m ? s.to : s.from, d = u < m ? s.toPort : s.fromPort;
|
|
889
890
|
this.disconnect(i);
|
|
890
891
|
const v = this.#u.find(
|
|
891
|
-
(
|
|
892
|
+
(g) => g.getAttribute("data-noodle-target") === h && g.getAttribute("data-noodle-side") === d
|
|
892
893
|
);
|
|
893
894
|
if (!v) {
|
|
894
895
|
this.#o = !1;
|
|
895
896
|
return;
|
|
896
897
|
}
|
|
897
|
-
const
|
|
898
|
-
if (!
|
|
898
|
+
const l = this.host.querySelector(`#${CSS.escape(h)}`);
|
|
899
|
+
if (!l) {
|
|
899
900
|
this.#o = !1;
|
|
900
901
|
return;
|
|
901
902
|
}
|
|
902
903
|
this.#l = {
|
|
903
|
-
fromElement:
|
|
904
|
-
fromPort:
|
|
905
|
-
fromId:
|
|
904
|
+
fromElement: l,
|
|
905
|
+
fromPort: d,
|
|
906
|
+
fromId: h,
|
|
906
907
|
pointerId: t.pointerId,
|
|
907
908
|
sourceDot: v,
|
|
908
909
|
reconnectId: i
|
|
909
910
|
}, v.setAttribute("data-noodle-dragging", "");
|
|
910
|
-
for (const
|
|
911
|
-
if (
|
|
912
|
-
const y =
|
|
913
|
-
y ===
|
|
911
|
+
for (const g of this.#u) {
|
|
912
|
+
if (g === v) continue;
|
|
913
|
+
const y = g.getAttribute("data-noodle-target"), P = g.getAttribute("data-noodle-side");
|
|
914
|
+
y === h && P === d || g.setAttribute("data-noodle-droppable", "");
|
|
914
915
|
}
|
|
915
|
-
this.#i = document.createElementNS(
|
|
916
|
-
const
|
|
917
|
-
if (
|
|
918
|
-
const
|
|
919
|
-
this.#i.setAttribute("d", `M ${
|
|
916
|
+
this.#i = document.createElementNS(L, "path"), this.#i.setAttribute("stroke", "var(--aui-ink-muted)"), this.#i.setAttribute("stroke-width", String(this.strokeWidth)), this.#i.setAttribute("fill", "none"), this.#i.setAttribute("stroke-dasharray", "6 4"), this.#i.setAttribute("stroke-linecap", "round"), this.#i.style.opacity = "0.7";
|
|
917
|
+
const p = this.#c(h, d), { x: b, y: x } = this.#A(t.clientX, t.clientY);
|
|
918
|
+
if (p) {
|
|
919
|
+
const g = Math.max(Math.abs(b - p.x), Math.abs(x - p.y)), y = Math.max(50, g * this.tension), [P, E] = this.#g(p.x, p.y, d, y);
|
|
920
|
+
this.#i.setAttribute("d", `M ${p.x} ${p.y} C ${P} ${E}, ${b} ${x}, ${b} ${x}`);
|
|
920
921
|
}
|
|
921
922
|
this.#a?.appendChild(this.#i), this.host.dispatchEvent(new CustomEvent("aui:noodle-drag", {
|
|
922
923
|
bubbles: !0,
|
|
923
924
|
composed: !0,
|
|
924
|
-
detail: { from:
|
|
925
|
-
})), document.addEventListener("pointermove", this.#P), document.addEventListener("pointerup", this.#$), document.addEventListener("pointercancel", this.#
|
|
925
|
+
detail: { from: h, fromPort: d, x: t.clientX, y: t.clientY, reconnect: !0 }
|
|
926
|
+
})), document.addEventListener("pointermove", this.#P), document.addEventListener("pointerup", this.#$), document.addEventListener("pointercancel", this.#M);
|
|
926
927
|
};
|
|
927
928
|
// ── Movement tracking ──
|
|
928
|
-
#
|
|
929
|
-
this.#
|
|
929
|
+
#C = () => {
|
|
930
|
+
this.#x();
|
|
930
931
|
};
|
|
931
932
|
#R() {
|
|
932
|
-
this.#m = new ResizeObserver(() => this.#
|
|
933
|
+
this.#m = new ResizeObserver(() => this.#x()), this.#m.observe(this.host), this.#f = new MutationObserver((t) => {
|
|
933
934
|
if (this.#o) return;
|
|
934
|
-
t.some((i) => i.type === "childList") ? this.#E() : this.#
|
|
935
|
-
}), this.#
|
|
935
|
+
t.some((i) => i.type === "childList") ? this.#E() : this.#x();
|
|
936
|
+
}), this.#f.observe(this.host, {
|
|
936
937
|
childList: !0,
|
|
937
938
|
subtree: !0,
|
|
938
939
|
attributes: !0,
|
|
@@ -940,10 +941,10 @@ class We {
|
|
|
940
941
|
});
|
|
941
942
|
}
|
|
942
943
|
#F() {
|
|
943
|
-
this.#m?.disconnect(), this.#m = null, this.#
|
|
944
|
+
this.#m?.disconnect(), this.#m = null, this.#f?.disconnect(), this.#f = null;
|
|
944
945
|
}
|
|
945
946
|
}
|
|
946
|
-
class
|
|
947
|
+
class _e extends T {
|
|
947
948
|
static attributes = {
|
|
948
949
|
editable: { type: "boolean", default: !1 },
|
|
949
950
|
color: { type: "string", default: "" },
|
|
@@ -983,7 +984,7 @@ class Xe extends T {
|
|
|
983
984
|
}
|
|
984
985
|
// ── Lifecycle ──
|
|
985
986
|
activate() {
|
|
986
|
-
this.#n = new
|
|
987
|
+
this.#n = new Xe(this, this.#t());
|
|
987
988
|
}
|
|
988
989
|
dispose() {
|
|
989
990
|
this.#n?.destroy(), this.#n = null;
|
|
@@ -1056,8 +1057,8 @@ class Xe extends T {
|
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
1058
1059
|
const Be = '<svg width="20" height="20" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M92.2671 346.112C88.1711 262.144 202.347 250.88 288.875 237.568C288.363 202.752 290.923 133.12 221.291 133.12C206.955 133.12 197.227 134.144 186.987 137.216L189.547 147.968C228.459 148.992 238.187 173.056 237.163 193.024C235.115 229.888 196.715 242.688 169.579 242.688C141.419 242.688 104.555 227.328 106.091 186.88C107.627 143.872 163.435 112.64 250.987 112.64C348.779 112.64 403.563 139.776 403.563 244.736V351.744C403.563 369.152 407.659 375.296 417.387 375.296C422.507 375.296 427.627 369.664 431.723 361.984L444.523 369.152C423.019 401.408 391.275 415.744 362.603 415.744C302.699 415.744 279.147 377.856 308.331 313.856L296.043 309.76C277.611 386.048 232.555 415.744 180.331 415.744C135.787 415.744 94.3151 391.68 92.2671 346.112ZM202.859 327.168C208.491 348.672 227.435 357.888 245.355 351.232C267.883 343.04 285.291 311.808 288.363 265.216L288.875 257.536C232.555 267.776 191.083 283.136 202.859 327.168Z" fill="currentColor"/></svg>';
|
|
1059
|
-
function k(
|
|
1060
|
-
return
|
|
1060
|
+
function k(f) {
|
|
1061
|
+
return f.split("-").map((t) => t[0].toUpperCase() + t.slice(1)).join(" ");
|
|
1061
1062
|
}
|
|
1062
1063
|
class Ke extends T {
|
|
1063
1064
|
static attributes = {
|
|
@@ -1073,7 +1074,7 @@ class Ke extends T {
|
|
|
1073
1074
|
this.#u();
|
|
1074
1075
|
}
|
|
1075
1076
|
dispose() {
|
|
1076
|
-
document.removeEventListener("keydown", this.#
|
|
1077
|
+
document.removeEventListener("keydown", this.#f);
|
|
1077
1078
|
}
|
|
1078
1079
|
async #u() {
|
|
1079
1080
|
let t;
|
|
@@ -1083,61 +1084,61 @@ class Ke extends T {
|
|
|
1083
1084
|
this.textContent = "Failed to load preview.json";
|
|
1084
1085
|
return;
|
|
1085
1086
|
}
|
|
1086
|
-
const { section: e, param: i, items: s, links: a } = t, r = new URL(this.src, window.location.href).href.replace(/preview\.json$/, ""),
|
|
1087
|
-
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
const v = "aui-preview-scheme",
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
const A = document.documentElement,
|
|
1099
|
-
A.dataset.theme = w, A.style.colorScheme = w, localStorage.setItem(v, w),
|
|
1087
|
+
const { section: e, param: i, items: s, links: a } = t, r = new URL(this.src, window.location.href).href.replace(/preview\.json$/, ""), u = new URLSearchParams(location.search).get(i), m = document.createElement("div");
|
|
1088
|
+
m.setAttribute("data-role", "navbar");
|
|
1089
|
+
const h = document.createElement("aui-select");
|
|
1090
|
+
h.setAttribute("mode", "bar"), h.setAttribute("width", "full");
|
|
1091
|
+
const d = document.createElement("aui-option");
|
|
1092
|
+
d.setAttribute("value", ""), d.setAttribute("overflow-pin", ""), d.setAttribute("data-preview-logo", ""), d.dataset.href = window.location.pathname, d.innerHTML = `${Be} AgentUI`, h.appendChild(d);
|
|
1093
|
+
const v = "aui-preview-scheme", l = localStorage.getItem(v);
|
|
1094
|
+
l && (document.documentElement.dataset.theme = l, document.documentElement.style.colorScheme = l);
|
|
1095
|
+
const p = document.createElement("aui-button");
|
|
1096
|
+
p.setAttribute("ghost", ""), p.setAttribute("size", "sm"), p.setAttribute("hide-label", ""), p.setAttribute("label", "Toggle color scheme");
|
|
1097
|
+
const b = document.createElement("aui-icon"), x = document.documentElement.dataset.theme === "dark";
|
|
1098
|
+
b.setAttribute("name", x ? "sun" : "moon"), p.appendChild(b), h.appendChild(p), p.addEventListener("click", () => {
|
|
1099
|
+
const A = document.documentElement, C = A.dataset.theme === "dark", w = C ? "light" : "dark";
|
|
1100
|
+
A.dataset.theme = w, A.style.colorScheme = w, localStorage.setItem(v, w), b.setAttribute("name", C ? "moon" : "sun");
|
|
1100
1101
|
});
|
|
1101
|
-
const
|
|
1102
|
-
if (
|
|
1102
|
+
const g = document.createElement("aui-select");
|
|
1103
|
+
if (g.setAttribute("placeholder", k(e)), g.setAttribute("outline", ""), g.setAttribute("data-role", "page-select"), a.length) {
|
|
1103
1104
|
const A = document.createElement("aui-optgroup");
|
|
1104
1105
|
A.setAttribute("label", "Sections");
|
|
1105
|
-
for (const
|
|
1106
|
+
for (const C of a) {
|
|
1106
1107
|
const w = document.createElement("aui-option");
|
|
1107
|
-
w.setAttribute("value", `go-${
|
|
1108
|
+
w.setAttribute("value", `go-${C.label.toLowerCase()}`), w.dataset.href = C.href, w.textContent = C.label, A.appendChild(w);
|
|
1108
1109
|
}
|
|
1109
|
-
|
|
1110
|
+
g.appendChild(A);
|
|
1110
1111
|
}
|
|
1111
1112
|
let y = null, P = "";
|
|
1112
1113
|
for (const A of s) {
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1114
|
+
const C = A.group || k(e);
|
|
1115
|
+
C !== P && (y = document.createElement("aui-optgroup"), y.setAttribute("label", C), g.appendChild(y), P = C);
|
|
1115
1116
|
const w = document.createElement("aui-option");
|
|
1116
|
-
w.setAttribute("value", A.slug), A.file && (w.dataset.file = A.file), A.slug ===
|
|
1117
|
+
w.setAttribute("value", A.slug), A.file && (w.dataset.file = A.file), A.slug === u && w.setAttribute("selected", ""), w.textContent = A.name || k(A.slug), y.appendChild(w);
|
|
1117
1118
|
}
|
|
1118
|
-
|
|
1119
|
+
u && g.setAttribute("value", u), h.appendChild(g), m.appendChild(h), this.appendChild(m);
|
|
1119
1120
|
const E = document.createElement("aui-editor");
|
|
1120
1121
|
E.setAttribute("data-role", "canvas"), E.setAttribute("background", "dots");
|
|
1121
1122
|
const D = document.createElement("aui-editor-layer");
|
|
1122
1123
|
D.setAttribute("name", "content");
|
|
1123
1124
|
const R = document.createElement("div");
|
|
1124
|
-
if (R.setAttribute("data-role", "content"), D.appendChild(R), E.appendChild(D), this.appendChild(E), this.#n = E, this.#t = R,
|
|
1125
|
+
if (R.setAttribute("data-role", "content"), D.appendChild(R), E.appendChild(D), this.appendChild(E), this.#n = E, this.#t = R, h.addEventListener("click", (A) => {
|
|
1125
1126
|
const w = A.target.closest("aui-option")?.dataset?.href;
|
|
1126
1127
|
w && (window.location.href = w);
|
|
1127
|
-
}),
|
|
1128
|
-
const
|
|
1128
|
+
}), g.addEventListener("change", (A) => {
|
|
1129
|
+
const C = A.target.value, G = g.querySelector(`aui-option[value="${C}"]`)?.dataset?.href;
|
|
1129
1130
|
if (G) {
|
|
1130
1131
|
window.location.href = G;
|
|
1131
1132
|
return;
|
|
1132
1133
|
}
|
|
1133
1134
|
const U = new URL(window.location.href);
|
|
1134
|
-
U.searchParams.set(i,
|
|
1135
|
-
}),
|
|
1136
|
-
const
|
|
1137
|
-
document.title = `${k(
|
|
1135
|
+
U.searchParams.set(i, C), window.location.href = U.toString();
|
|
1136
|
+
}), u) {
|
|
1137
|
+
const C = s.find((w) => w.slug === u)?.file || `${u}/${u}.html`;
|
|
1138
|
+
document.title = `${k(u)} — AgentUI ${k(e)}`, await this.#h(C, r);
|
|
1138
1139
|
} else
|
|
1139
1140
|
document.title = `AgentUI — ${k(e)}`, await this.#o(s, r);
|
|
1140
|
-
this.#e = t, this.#a =
|
|
1141
|
+
this.#e = t, this.#a = u, this.#l(t, i), document.addEventListener("keydown", this.#f), requestAnimationFrame(() => this.#d());
|
|
1141
1142
|
}
|
|
1142
1143
|
// ── Command palette ──
|
|
1143
1144
|
#l(t, e) {
|
|
@@ -1149,32 +1150,32 @@ class Ke extends T {
|
|
|
1149
1150
|
a.setAttribute("placeholder", `Go to ${k(t.section)}…`), s.appendChild(a);
|
|
1150
1151
|
const o = document.createElement("aui-command-list");
|
|
1151
1152
|
if (t.links.length) {
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1154
|
-
for (const
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1153
|
+
const m = document.createElement("aui-command-group");
|
|
1154
|
+
m.setAttribute("label", "Sections");
|
|
1155
|
+
for (const h of t.links) {
|
|
1156
|
+
const d = document.createElement("aui-command-item");
|
|
1157
|
+
d.setAttribute("value", `section:${h.label}`), d.dataset.href = h.href, d.textContent = h.label, m.appendChild(d);
|
|
1157
1158
|
}
|
|
1158
|
-
o.appendChild(
|
|
1159
|
+
o.appendChild(m);
|
|
1159
1160
|
}
|
|
1160
|
-
let r = null,
|
|
1161
|
-
for (const
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1161
|
+
let r = null, c = "";
|
|
1162
|
+
for (const m of t.items) {
|
|
1163
|
+
const h = m.group || k(t.section);
|
|
1164
|
+
h !== c && (r = document.createElement("aui-command-group"), r.setAttribute("label", h), o.appendChild(r), c = h);
|
|
1165
|
+
const d = document.createElement("aui-command-item");
|
|
1166
|
+
d.setAttribute("value", m.slug), m.summary && d.setAttribute("keywords", m.summary), d.textContent = m.name || k(m.slug), r.appendChild(d);
|
|
1166
1167
|
}
|
|
1167
1168
|
s.appendChild(o);
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
const { value:
|
|
1169
|
+
const u = document.createElement("aui-command-empty");
|
|
1170
|
+
u.textContent = "No results.", s.appendChild(u), s.addEventListener("select", (m) => {
|
|
1171
|
+
const { value: h } = m.detail, v = s.querySelector(`aui-command-item[value="${CSS.escape(h)}"]`)?.dataset?.href;
|
|
1171
1172
|
if (v) {
|
|
1172
1173
|
window.location.href = v;
|
|
1173
1174
|
return;
|
|
1174
1175
|
}
|
|
1175
|
-
if (
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1176
|
+
if (h.startsWith("section:")) return;
|
|
1177
|
+
const l = new URL(window.location.href);
|
|
1178
|
+
l.searchParams.set(e, h), window.location.href = l.toString();
|
|
1178
1179
|
}), s.addEventListener("dismiss", () => this.#m()), i.addEventListener("close", () => {
|
|
1179
1180
|
this.#s?.removeAttribute("open");
|
|
1180
1181
|
}), i.appendChild(s), this.appendChild(i), this.#s = i;
|
|
@@ -1190,7 +1191,7 @@ class Ke extends T {
|
|
|
1190
1191
|
this.#s?.removeAttribute("open");
|
|
1191
1192
|
}
|
|
1192
1193
|
// ── Keyboard navigation ──
|
|
1193
|
-
#
|
|
1194
|
+
#f = (t) => {
|
|
1194
1195
|
if ((t.metaKey || t.ctrlKey) && t.key === "k") {
|
|
1195
1196
|
t.preventDefault(), this.#s?.hasAttribute("open") ? this.#m() : this.#i();
|
|
1196
1197
|
return;
|
|
@@ -1206,7 +1207,7 @@ class Ke extends T {
|
|
|
1206
1207
|
if (!this.#e) return;
|
|
1207
1208
|
const { items: e, param: i } = this.#e;
|
|
1208
1209
|
if (!e.length) return;
|
|
1209
|
-
let a = (this.#a ? e.findIndex((
|
|
1210
|
+
let a = (this.#a ? e.findIndex((c) => c.slug === this.#a) : -1) + t;
|
|
1210
1211
|
a >= e.length && (a = 0), a < 0 && (a = e.length - 1);
|
|
1211
1212
|
const o = e[a];
|
|
1212
1213
|
if (!o) return;
|
|
@@ -1214,26 +1215,34 @@ class Ke extends T {
|
|
|
1214
1215
|
r.searchParams.set(i, o.slug), window.location.href = r.toString();
|
|
1215
1216
|
}
|
|
1216
1217
|
async #h(t, e) {
|
|
1217
|
-
const i =
|
|
1218
|
+
const i = `${e}${t}`, s = t.replace(/\.html$/, ""), a = `${e}${s}.css`, o = `${e}${s}.ts`;
|
|
1218
1219
|
try {
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1220
|
+
const l = await fetch(i);
|
|
1221
|
+
l.ok && (this.#t.innerHTML = await l.text());
|
|
1221
1222
|
} catch {
|
|
1222
1223
|
}
|
|
1223
|
-
await new Promise((
|
|
1224
|
+
await new Promise((l) => requestAnimationFrame(() => requestAnimationFrame(l))), await new Promise((l) => requestAnimationFrame(() => requestAnimationFrame(l)));
|
|
1224
1225
|
const r = Array.from(this.#t.children).filter(
|
|
1225
|
-
(
|
|
1226
|
-
),
|
|
1227
|
-
el:
|
|
1228
|
-
height:
|
|
1229
|
-
width:
|
|
1226
|
+
(l) => l.nodeType === 1 && l.tagName !== "SCRIPT"
|
|
1227
|
+
), c = 96, u = 200, m = r.map((l) => ({
|
|
1228
|
+
el: l,
|
|
1229
|
+
height: l.offsetHeight,
|
|
1230
|
+
width: l.offsetWidth
|
|
1230
1231
|
}));
|
|
1231
|
-
let
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1232
|
+
let h = u, d = 0;
|
|
1233
|
+
const v = [];
|
|
1234
|
+
for (const { el: l, height: p, width: b } of m)
|
|
1235
|
+
v.push({ el: l, y: h, width: b }), b > d && (d = b), h += p + c;
|
|
1236
|
+
for (const { el: l, y: p, width: b } of v)
|
|
1237
|
+
l.style.position = "absolute", l.style.left = `${(d - b) / 2}px`, l.style.top = `${p}px`, l.tagName === "AUI-GRAPH-UI" || l.tagName === "AUI-EDITOR" || (z(l, "drag", { config: { mode: "free", modifier: "alt" } }), z(l, "resize", { config: { modifier: "alt" } }));
|
|
1238
|
+
this.#t.style.width = `${d}px`, this.#t.style.height = `${h}px`;
|
|
1239
|
+
try {
|
|
1240
|
+
if ((await fetch(a, { method: "HEAD" })).ok) {
|
|
1241
|
+
const p = document.createElement("link");
|
|
1242
|
+
p.rel = "stylesheet", p.href = a, document.head.appendChild(p);
|
|
1243
|
+
}
|
|
1244
|
+
} catch {
|
|
1245
|
+
}
|
|
1237
1246
|
try {
|
|
1238
1247
|
await import(
|
|
1239
1248
|
/* @vite-ignore */
|
|
@@ -1241,50 +1250,54 @@ class Ke extends T {
|
|
|
1241
1250
|
);
|
|
1242
1251
|
} catch {
|
|
1243
1252
|
}
|
|
1244
|
-
for (const
|
|
1245
|
-
const
|
|
1246
|
-
for (const
|
|
1247
|
-
|
|
1253
|
+
for (const l of Array.from(this.#t.querySelectorAll("script"))) {
|
|
1254
|
+
const p = document.createElement("script");
|
|
1255
|
+
for (const b of l.attributes) p.setAttribute(b.name, b.value);
|
|
1256
|
+
p.textContent = l.textContent, l.replaceWith(p);
|
|
1248
1257
|
}
|
|
1249
1258
|
requestAnimationFrame(() => this.#d());
|
|
1250
1259
|
}
|
|
1251
1260
|
async #o(t, e) {
|
|
1252
1261
|
const a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
1253
|
-
let r = 200,
|
|
1254
|
-
for (const
|
|
1255
|
-
const
|
|
1262
|
+
let r = 200, c = 0;
|
|
1263
|
+
for (const u of t) {
|
|
1264
|
+
const m = u.file || `${u.slug}/${u.slug}.html`, h = m.replace(/\.html$/, ""), d = `${e}${m}`, v = `${e}${h}.css`, l = `${e}${h}.ts`;
|
|
1256
1265
|
if (!a.has(v)) {
|
|
1257
1266
|
a.add(v);
|
|
1258
1267
|
const y = document.createElement("link");
|
|
1259
1268
|
y.rel = "stylesheet", y.href = v, document.head.appendChild(y);
|
|
1260
1269
|
}
|
|
1261
|
-
if (!o.has(
|
|
1262
|
-
o.add(
|
|
1270
|
+
if (!o.has(l)) {
|
|
1271
|
+
o.add(l);
|
|
1263
1272
|
try {
|
|
1264
1273
|
await import(
|
|
1265
1274
|
/* @vite-ignore */
|
|
1266
|
-
|
|
1275
|
+
l
|
|
1267
1276
|
);
|
|
1268
1277
|
} catch {
|
|
1269
1278
|
}
|
|
1270
1279
|
}
|
|
1271
|
-
let
|
|
1280
|
+
let p = "";
|
|
1272
1281
|
try {
|
|
1273
|
-
const y = await fetch(
|
|
1274
|
-
y.ok && (
|
|
1282
|
+
const y = await fetch(d);
|
|
1283
|
+
y.ok && (p = await y.text());
|
|
1275
1284
|
} catch {
|
|
1276
1285
|
continue;
|
|
1277
1286
|
}
|
|
1278
|
-
if (!
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1287
|
+
if (!p.trim()) continue;
|
|
1288
|
+
const b = document.createElement("div");
|
|
1289
|
+
b.setAttribute("data-role", "gallery-item"), b.innerHTML = `<h3 style="margin:0 0 1rem;font-family:var(--aui-font-family);font-size:var(--aui-font-lg);font-weight:var(--aui-font-weight-semibold);color:var(--aui-ink-muted);">${u.name || k(u.slug)}</h3>${p}`, this.#t.appendChild(b), await new Promise((y) => requestAnimationFrame(y));
|
|
1290
|
+
const x = b.offsetHeight, g = b.offsetWidth;
|
|
1291
|
+
b.style.position = "absolute", b.style.top = `${r}px`, b.__measuredWidth = g, g > c && (c = g), r += x + 96;
|
|
1292
|
+
}
|
|
1293
|
+
for (const u of Array.from(this.#t.children)) {
|
|
1294
|
+
const m = u.__measuredWidth ?? u.offsetWidth;
|
|
1295
|
+
u.style.left = `${(c - m) / 2}px`;
|
|
1283
1296
|
}
|
|
1284
|
-
this.#t.style.width = `${
|
|
1297
|
+
this.#t.style.width = `${c}px`, this.#t.style.height = `${r}px`, requestAnimationFrame(() => this.#d());
|
|
1285
1298
|
}
|
|
1286
1299
|
#d() {
|
|
1287
|
-
const t = this.#n, e = this.#n.clientWidth, i = this.#t.offsetWidth, s = (e - i) / 2;
|
|
1300
|
+
const t = this.#n, e = this.#n.clientWidth, i = this.#t.offsetWidth, s = Math.max(16, (e - i) / 2);
|
|
1288
1301
|
t.panTo?.(s, 0);
|
|
1289
1302
|
}
|
|
1290
1303
|
}
|
|
@@ -1294,23 +1307,23 @@ n("aui-input", dt);
|
|
|
1294
1307
|
n("aui-checkbox", ct);
|
|
1295
1308
|
n("aui-switch", ht);
|
|
1296
1309
|
n("aui-radio", mt);
|
|
1297
|
-
n("aui-radio-group",
|
|
1298
|
-
n("aui-textarea",
|
|
1310
|
+
n("aui-radio-group", ft);
|
|
1311
|
+
n("aui-textarea", pt);
|
|
1299
1312
|
n("aui-container", bt);
|
|
1300
1313
|
n("aui-dialog", gt);
|
|
1301
1314
|
n("aui-drawer", vt);
|
|
1302
1315
|
n("aui-icon", At);
|
|
1303
1316
|
n("aui-tooltip", yt);
|
|
1304
1317
|
n("aui-range", wt);
|
|
1305
|
-
n("aui-input-otp",
|
|
1306
|
-
n("aui-gripper",
|
|
1318
|
+
n("aui-input-otp", Ct);
|
|
1319
|
+
n("aui-gripper", xt);
|
|
1307
1320
|
n("aui-option", Et);
|
|
1308
1321
|
n("aui-optgroup", kt);
|
|
1309
1322
|
n("aui-select", St);
|
|
1310
1323
|
n("aui-toast", Pt);
|
|
1311
1324
|
n("aui-tabs", $t);
|
|
1312
|
-
n("aui-tab",
|
|
1313
|
-
n("aui-tab-panel",
|
|
1325
|
+
n("aui-tab", Mt);
|
|
1326
|
+
n("aui-tab-panel", Lt);
|
|
1314
1327
|
n("aui-accordion", Dt);
|
|
1315
1328
|
n("aui-accordion-item", Tt);
|
|
1316
1329
|
n("aui-breadcrumb", It);
|
|
@@ -1323,29 +1336,29 @@ n("aui-command-input", zt);
|
|
|
1323
1336
|
n("aui-command-list", Gt);
|
|
1324
1337
|
n("aui-command-item", Ut);
|
|
1325
1338
|
n("aui-command-group", Ht);
|
|
1326
|
-
n("aui-command-empty",
|
|
1327
|
-
n("aui-panes",
|
|
1339
|
+
n("aui-command-empty", Wt);
|
|
1340
|
+
n("aui-panes", Ot);
|
|
1328
1341
|
n("aui-pane", Xt);
|
|
1329
|
-
n("aui-table",
|
|
1330
|
-
n("aui-table-head",
|
|
1331
|
-
n("aui-table-body",
|
|
1332
|
-
n("aui-table-row",
|
|
1342
|
+
n("aui-table", _t);
|
|
1343
|
+
n("aui-table-head", Bt);
|
|
1344
|
+
n("aui-table-body", Kt);
|
|
1345
|
+
n("aui-table-row", jt);
|
|
1333
1346
|
n("aui-table-header", Jt);
|
|
1334
1347
|
n("aui-table-cell", Vt);
|
|
1335
|
-
n("aui-table-column",
|
|
1348
|
+
n("aui-table-column", Fe);
|
|
1336
1349
|
n("aui-tree", Zt);
|
|
1337
1350
|
n("aui-tree-item", Qt);
|
|
1338
1351
|
n("aui-feed", te);
|
|
1339
1352
|
n("aui-root", ee);
|
|
1340
|
-
n("aui-canvas",
|
|
1341
|
-
n("aui-calendar",
|
|
1353
|
+
n("aui-canvas", ze);
|
|
1354
|
+
n("aui-calendar", He);
|
|
1342
1355
|
n("aui-calendar-picker", ie);
|
|
1343
1356
|
n("aui-calendar-range-picker", se);
|
|
1344
|
-
n("aui-noodles",
|
|
1345
|
-
n("aui-agent-feed",
|
|
1346
|
-
n("aui-agent-thread",
|
|
1347
|
-
n("aui-agent-message",
|
|
1348
|
-
n("aui-agent-text",
|
|
1357
|
+
n("aui-noodles", _e);
|
|
1358
|
+
n("aui-agent-feed", _);
|
|
1359
|
+
n("aui-agent-thread", B);
|
|
1360
|
+
n("aui-agent-message", K);
|
|
1361
|
+
n("aui-agent-text", j);
|
|
1349
1362
|
n("aui-agent-activity", J);
|
|
1350
1363
|
n("aui-agent-seeds", V);
|
|
1351
1364
|
n("aui-agent-panel", Z);
|
|
@@ -1369,51 +1382,52 @@ n("aui-graph-noodle", rt);
|
|
|
1369
1382
|
n("aui-graph-port", ut);
|
|
1370
1383
|
n("aui-progress", he);
|
|
1371
1384
|
n("aui-code-block", me);
|
|
1372
|
-
n("aui-sparkline",
|
|
1373
|
-
n("aui-chip",
|
|
1385
|
+
n("aui-sparkline", fe);
|
|
1386
|
+
n("aui-chip", pe);
|
|
1374
1387
|
n("aui-disclosure", be);
|
|
1375
1388
|
n("aui-avatar-group", ge);
|
|
1376
1389
|
n("aui-progress-circle", ve);
|
|
1377
1390
|
n("aui-disclosure-group", Ae);
|
|
1378
1391
|
n("aui-tag-group", ye);
|
|
1379
1392
|
n("aui-color-area", we);
|
|
1380
|
-
n("aui-color-slider",
|
|
1381
|
-
n("aui-color-field",
|
|
1393
|
+
n("aui-color-slider", Ce);
|
|
1394
|
+
n("aui-color-field", xe);
|
|
1382
1395
|
n("aui-time-field", Ee);
|
|
1383
1396
|
n("aui-date-field", ke);
|
|
1384
1397
|
n("aui-context-menu", Se);
|
|
1385
1398
|
n("aui-dropdown-menu", Pe);
|
|
1386
1399
|
n("aui-hover-card", $e);
|
|
1387
|
-
n("aui-color-picker",
|
|
1388
|
-
n("aui-file-upload",
|
|
1400
|
+
n("aui-color-picker", Me);
|
|
1401
|
+
n("aui-file-upload", Le);
|
|
1389
1402
|
n("aui-copy-button", De);
|
|
1390
1403
|
n("aui-stat", Te);
|
|
1391
1404
|
n("aui-image", Ie);
|
|
1392
1405
|
n("aui-carousel", Ne);
|
|
1393
1406
|
n("aui-notification-center", Ye);
|
|
1394
1407
|
n("aui-empty-state", qe);
|
|
1408
|
+
n("aui-meter", Re);
|
|
1395
1409
|
const q = /* @__PURE__ */ new WeakMap();
|
|
1396
|
-
function Y(
|
|
1397
|
-
if (
|
|
1398
|
-
const t =
|
|
1410
|
+
function Y(f) {
|
|
1411
|
+
if (f instanceof T || q.has(f)) return;
|
|
1412
|
+
const t = f.getAttribute("traits");
|
|
1399
1413
|
if (!t) return;
|
|
1400
|
-
const e =
|
|
1414
|
+
const e = O(t), i = X(e, f.localName), s = [];
|
|
1401
1415
|
for (const { entry: a } of i) {
|
|
1402
|
-
const o = z(
|
|
1416
|
+
const o = z(f, a.name, {
|
|
1403
1417
|
config: a.config
|
|
1404
1418
|
});
|
|
1405
1419
|
s.push(o);
|
|
1406
1420
|
}
|
|
1407
|
-
q.set(
|
|
1421
|
+
q.set(f, s);
|
|
1408
1422
|
}
|
|
1409
|
-
function F(
|
|
1410
|
-
const t = q.get(
|
|
1423
|
+
function F(f) {
|
|
1424
|
+
const t = q.get(f);
|
|
1411
1425
|
if (t) {
|
|
1412
1426
|
for (const e of t) e();
|
|
1413
|
-
q.delete(
|
|
1427
|
+
q.delete(f);
|
|
1414
1428
|
}
|
|
1415
1429
|
}
|
|
1416
|
-
function
|
|
1430
|
+
function W() {
|
|
1417
1431
|
for (const t of document.querySelectorAll("[traits]"))
|
|
1418
1432
|
Y(t);
|
|
1419
1433
|
new MutationObserver((t) => {
|
|
@@ -1446,9 +1460,9 @@ function O() {
|
|
|
1446
1460
|
attributeFilter: ["traits"]
|
|
1447
1461
|
});
|
|
1448
1462
|
}
|
|
1449
|
-
document.body ?
|
|
1450
|
-
document.addEventListener("click", (
|
|
1451
|
-
const t =
|
|
1463
|
+
document.body ? W() : document.addEventListener("DOMContentLoaded", W, { once: !0 });
|
|
1464
|
+
document.addEventListener("click", (f) => {
|
|
1465
|
+
const t = f.target?.closest?.("[popover-trigger]");
|
|
1452
1466
|
if (!t) return;
|
|
1453
1467
|
const e = t.getAttribute("popover-trigger");
|
|
1454
1468
|
if (!e) return;
|
|
@@ -1461,8 +1475,8 @@ document.addEventListener("click", (m) => {
|
|
|
1461
1475
|
} catch {
|
|
1462
1476
|
}
|
|
1463
1477
|
});
|
|
1464
|
-
for (const
|
|
1465
|
-
document.addEventListener(
|
|
1478
|
+
for (const f of ["pointermove", "pointerdown", "pointerup", "mouseover", "mouseenter", "mouseleave"])
|
|
1479
|
+
document.addEventListener(f, (t) => {
|
|
1466
1480
|
t.target?.closest?.("[popover], dialog") && t.stopPropagation();
|
|
1467
1481
|
}, !0);
|
|
1468
1482
|
//# sourceMappingURL=register.js.map
|