@nonoun/native-ui 0.2.8 → 0.2.10
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/components-lean.css +119 -6
- package/dist/components.css +119 -6
- package/dist/{ui-icon-element.js → components.js} +1387 -465
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +1 -1
- package/dist/core/trait-runtime.d.ts.map +1 -1
- package/dist/{register-all2.js → core.js} +79 -35
- package/dist/custom-elements.json +2747 -2747
- package/dist/foundation.css +1 -15
- package/dist/inspector/build-inspector.d.ts +8 -0
- package/dist/inspector/build-inspector.d.ts.map +1 -0
- package/dist/inspector/index.d.ts +10 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-color-swatch-element.d.ts → inspector/native-tokens-color-swatch-element.d.ts} +3 -3
- package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-color-swatch.d.ts +3 -0
- package/dist/inspector/native-tokens-color-swatch.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-colors-element.d.ts → inspector/native-tokens-colors-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-colors-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-colors.d.ts +4 -0
- package/dist/inspector/native-tokens-colors.d.ts.map +1 -0
- package/dist/inspector/native-tokens-inspector-element.d.ts +15 -0
- package/dist/inspector/native-tokens-inspector-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-inspector.d.ts +3 -0
- package/dist/inspector/native-tokens-inspector.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-themes-element.d.ts → inspector/native-tokens-themes-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-themes-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-themes.d.ts +4 -0
- package/dist/inspector/native-tokens-themes.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-variable-element.d.ts → inspector/native-tokens-variable-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-variable-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-variable.d.ts +4 -0
- package/dist/inspector/native-tokens-variable.d.ts.map +1 -0
- package/dist/inspector.css +31 -31
- package/dist/inspector.d.ts +11 -6
- package/dist/inspector.d.ts.map +1 -1
- package/dist/inspector.js +123 -105
- package/dist/kernel.js +77 -77
- package/dist/native-ui-lean.css +120 -21
- package/dist/native-ui.css +120 -21
- package/dist/native-ui.js +4 -49
- package/dist/register-all.js +4 -3
- package/dist/traits/adapters/draggable-adapter.d.ts.map +1 -1
- package/dist/traits/drag-controller.d.ts +3 -0
- package/dist/traits/drag-controller.d.ts.map +1 -1
- package/dist/traits.js +3 -6
- package/dist/ui-icon.js +56 -0
- package/package.json +1 -1
- package/dist/define.js +0 -62
- package/dist/dialog-controller.js +0 -703
- package/dist/nav/inspector/build-inspector.d.ts +0 -8
- package/dist/nav/inspector/build-inspector.d.ts.map +0 -1
- package/dist/nav/inspector/ds-color-swatch-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-color-swatch.d.ts +0 -3
- package/dist/nav/inspector/ds-color-swatch.d.ts.map +0 -1
- package/dist/nav/inspector/ds-colors-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-colors.d.ts +0 -4
- package/dist/nav/inspector/ds-colors.d.ts.map +0 -1
- package/dist/nav/inspector/ds-themes-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-themes.d.ts +0 -4
- package/dist/nav/inspector/ds-themes.d.ts.map +0 -1
- package/dist/nav/inspector/ds-variable-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-variable.d.ts +0 -4
- package/dist/nav/inspector/ds-variable.d.ts.map +0 -1
- package/dist/nav/inspector/index.d.ts +0 -9
- package/dist/nav/inspector/index.d.ts.map +0 -1
- package/dist/ui-element.js +0 -133
- package/dist/uid.js +0 -87
package/dist/native-ui.css
CHANGED
|
@@ -1374,21 +1374,6 @@
|
|
|
1374
1374
|
|
|
1375
1375
|
|
|
1376
1376
|
|
|
1377
|
-
/* ── Popover Anchor Positioning ──
|
|
1378
|
-
Shared anchor-to-trigger positioning for dropdown popovers.
|
|
1379
|
-
Coordinators (select, combobox) use this for their popover listbox. */
|
|
1380
|
-
|
|
1381
|
-
:where(ui-select) > :where(ui-listbox[popover]),
|
|
1382
|
-
:where(ui-combobox) > :where(ui-listbox[popover]) {
|
|
1383
|
-
position: fixed;
|
|
1384
|
-
position-area: block-end span-inline-end;
|
|
1385
|
-
position-try-fallbacks: flip-block;
|
|
1386
|
-
margin: var(--ui-popover-gap) 0 0;
|
|
1387
|
-
min-width: anchor-size(inline);
|
|
1388
|
-
max-height: var(--ui-popover-max-height);
|
|
1389
|
-
overflow-y: auto;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
1377
|
/* ── Container-Level Disabled ──
|
|
1393
1378
|
Containers that disable all children use aria-disabled="true".
|
|
1394
1379
|
Disabled colors propagate via inheritance — children inherit the muted text.
|
|
@@ -1510,6 +1495,7 @@
|
|
|
1510
1495
|
/* Popover (select / combobox / command) */
|
|
1511
1496
|
--ui-popover-max-height: calc(100dvh - 2rem);
|
|
1512
1497
|
--ui-popover-gap: 0.25rem;
|
|
1498
|
+
--ui-popover-viewport-margin: 0.5rem;
|
|
1513
1499
|
|
|
1514
1500
|
/* Drawer */
|
|
1515
1501
|
--ui-drawer-width: 24rem;
|
|
@@ -3236,6 +3222,23 @@
|
|
|
3236
3222
|
cursor: text;
|
|
3237
3223
|
}
|
|
3238
3224
|
|
|
3225
|
+
/* ── Popover Listbox Positioning ──
|
|
3226
|
+
WHY: Must come after ui-listbox.css base rule (which sets min-width: 0
|
|
3227
|
+
for flex-child shrinking) so min-width: anchor-size(inline) wins by
|
|
3228
|
+
source order — both are zero-specificity via :where(). */
|
|
3229
|
+
|
|
3230
|
+
:where(ui-combobox) > :where(ui-listbox[popover]) {
|
|
3231
|
+
position: fixed;
|
|
3232
|
+
position-area: block-end span-inline-end;
|
|
3233
|
+
position-try-fallbacks: flip-block;
|
|
3234
|
+
margin-block: var(--ui-popover-viewport-margin);
|
|
3235
|
+
margin-inline: 0;
|
|
3236
|
+
margin-block-start: var(--ui-popover-gap);
|
|
3237
|
+
min-width: anchor-size(inline);
|
|
3238
|
+
max-height: var(--ui-popover-max-height);
|
|
3239
|
+
overflow-y: auto;
|
|
3240
|
+
}
|
|
3241
|
+
|
|
3239
3242
|
}
|
|
3240
3243
|
|
|
3241
3244
|
@layer ui {
|
|
@@ -3902,6 +3905,39 @@
|
|
|
3902
3905
|
display: none;
|
|
3903
3906
|
}
|
|
3904
3907
|
|
|
3908
|
+
/* ── Popover Animation ──
|
|
3909
|
+
WHY: Shared entry/exit transition for all popover listboxes.
|
|
3910
|
+
Context CSS overrides --_popover-origin and --_popover-from
|
|
3911
|
+
to match the popover's anchor direction (e.g. sidebar flyouts
|
|
3912
|
+
open to the right → rotateY instead of rotateX). */
|
|
3913
|
+
|
|
3914
|
+
:where(ui-listbox[popover]) {
|
|
3915
|
+
--_popover-origin: top center;
|
|
3916
|
+
--_popover-from: perspective(800px) scale(0.96) rotateX(-20deg);
|
|
3917
|
+
|
|
3918
|
+
transform-origin: var(--_popover-origin);
|
|
3919
|
+
opacity: 0;
|
|
3920
|
+
transform: var(--_popover-from);
|
|
3921
|
+
|
|
3922
|
+
transition:
|
|
3923
|
+
opacity var(--_duration) var(--_easing),
|
|
3924
|
+
transform var(--_duration) var(--_easing),
|
|
3925
|
+
display var(--_duration) var(--_easing) allow-discrete,
|
|
3926
|
+
overlay var(--_duration) var(--_easing) allow-discrete;
|
|
3927
|
+
}
|
|
3928
|
+
|
|
3929
|
+
:where(ui-listbox[popover]):popover-open {
|
|
3930
|
+
opacity: 1;
|
|
3931
|
+
transform: none;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
@starting-style {
|
|
3935
|
+
:where(ui-listbox[popover]):popover-open {
|
|
3936
|
+
opacity: 0;
|
|
3937
|
+
transform: var(--_popover-from);
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3905
3941
|
/* ── Option / Command Item Base ── */
|
|
3906
3942
|
|
|
3907
3943
|
:where(ui-option, ui-command-item, [role="option"]) {
|
|
@@ -4290,10 +4326,14 @@
|
|
|
4290
4326
|
instead of expanding the <details>. Same pattern as sidebar-trigger menus. */
|
|
4291
4327
|
|
|
4292
4328
|
:where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
|
|
4329
|
+
--_popover-origin: left center;
|
|
4330
|
+
--_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
|
|
4331
|
+
|
|
4293
4332
|
position: fixed;
|
|
4294
4333
|
position-area: inline-end span-block-end;
|
|
4295
4334
|
position-try-fallbacks: --nav-flyout-flip-up;
|
|
4296
|
-
margin:
|
|
4335
|
+
margin-block: var(--ui-popover-viewport-margin);
|
|
4336
|
+
margin-inline: 0;
|
|
4297
4337
|
margin-inline-start: var(--ui-popover-gap);
|
|
4298
4338
|
min-width: 200px;
|
|
4299
4339
|
max-height: var(--ui-popover-max-height);
|
|
@@ -4304,6 +4344,10 @@
|
|
|
4304
4344
|
position-area: inline-end span-block-start;
|
|
4305
4345
|
}
|
|
4306
4346
|
|
|
4347
|
+
@position-try --nav-flyout-flip-down {
|
|
4348
|
+
position-area: inline-end span-block-end;
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4307
4351
|
/* ── Container Query: Collapsed Sidebar ── */
|
|
4308
4352
|
/* WHY: Nav components own their own collapsed behavior via @container.
|
|
4309
4353
|
The sidebar aside declares container-name: sidebar. When it shrinks
|
|
@@ -4347,6 +4391,14 @@
|
|
|
4347
4391
|
font-size: var(--_font-size, 1rem);
|
|
4348
4392
|
}
|
|
4349
4393
|
|
|
4394
|
+
/* WHY: In collapsed mode the group is a small icon — centering
|
|
4395
|
+
the flyout vertically with the anchor is more natural than top-aligning.
|
|
4396
|
+
Fallbacks handle viewport clipping (top/bottom edge). */
|
|
4397
|
+
:where(ui-nav-group) > :where(ui-listbox.nav-group-flyout[popover]) {
|
|
4398
|
+
position-area: inline-end;
|
|
4399
|
+
position-try-fallbacks: --nav-flyout-flip-up, --nav-flyout-flip-down;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4350
4402
|
/* Collapse inter-group spacing in icon rail. */
|
|
4351
4403
|
:where(ui-nav-group) + :where(ui-nav-group) {
|
|
4352
4404
|
margin-block-start: 0;
|
|
@@ -4586,6 +4638,8 @@
|
|
|
4586
4638
|
min-width: 0;
|
|
4587
4639
|
align-items: center;
|
|
4588
4640
|
position: relative;
|
|
4641
|
+
/* WHY: Isolate internal z-index (thumb z-index: 1) from parent stacking context */
|
|
4642
|
+
isolation: isolate;
|
|
4589
4643
|
|
|
4590
4644
|
min-height: var(--_track-height);
|
|
4591
4645
|
|
|
@@ -4876,6 +4930,23 @@
|
|
|
4876
4930
|
display: contents;
|
|
4877
4931
|
}
|
|
4878
4932
|
|
|
4933
|
+
/* ── Popover Listbox Positioning ──
|
|
4934
|
+
WHY: Must come after ui-listbox.css base rule (which sets min-width: 0
|
|
4935
|
+
for flex-child shrinking) so min-width: anchor-size(inline) wins by
|
|
4936
|
+
source order — both are zero-specificity via :where(). */
|
|
4937
|
+
|
|
4938
|
+
:where(ui-select) > :where(ui-listbox[popover]) {
|
|
4939
|
+
position: fixed;
|
|
4940
|
+
position-area: block-end span-inline-end;
|
|
4941
|
+
position-try-fallbacks: flip-block;
|
|
4942
|
+
margin-block: var(--ui-popover-viewport-margin);
|
|
4943
|
+
margin-inline: 0;
|
|
4944
|
+
margin-block-start: var(--ui-popover-gap);
|
|
4945
|
+
min-width: anchor-size(inline);
|
|
4946
|
+
max-height: var(--ui-popover-max-height);
|
|
4947
|
+
overflow-y: auto;
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4879
4950
|
}
|
|
4880
4951
|
|
|
4881
4952
|
@layer ui {
|
|
@@ -6028,7 +6099,7 @@
|
|
|
6028
6099
|
/* Default placement: above the anchor */
|
|
6029
6100
|
position-area: block-start;
|
|
6030
6101
|
position-try-fallbacks: flip-block, flip-inline;
|
|
6031
|
-
margin:
|
|
6102
|
+
margin: var(--ui-popover-viewport-margin);
|
|
6032
6103
|
|
|
6033
6104
|
max-width: var(--ui-tooltip-max-width);
|
|
6034
6105
|
padding-block: calc(var(--_space) * 1.5);
|
|
@@ -6050,8 +6121,12 @@
|
|
|
6050
6121
|
inset: unset;
|
|
6051
6122
|
overflow: visible;
|
|
6052
6123
|
|
|
6124
|
+
--_popover-origin: bottom center;
|
|
6125
|
+
--_popover-from: perspective(800px) scale(0.96) rotateX(10deg);
|
|
6126
|
+
|
|
6127
|
+
transform-origin: var(--_popover-origin);
|
|
6053
6128
|
opacity: 0;
|
|
6054
|
-
transform:
|
|
6129
|
+
transform: var(--_popover-from);
|
|
6055
6130
|
transition:
|
|
6056
6131
|
opacity var(--_duration) var(--_easing),
|
|
6057
6132
|
transform var(--_duration) var(--_easing),
|
|
@@ -6063,35 +6138,43 @@
|
|
|
6063
6138
|
|
|
6064
6139
|
:where(ui-tooltip[popover]):popover-open {
|
|
6065
6140
|
opacity: 1;
|
|
6066
|
-
transform:
|
|
6141
|
+
transform: none;
|
|
6067
6142
|
}
|
|
6068
6143
|
|
|
6069
6144
|
/* Starting style for entry animation */
|
|
6070
6145
|
@starting-style {
|
|
6071
6146
|
:where(ui-tooltip[popover]):popover-open {
|
|
6072
6147
|
opacity: 0;
|
|
6073
|
-
transform:
|
|
6148
|
+
transform: var(--_popover-from);
|
|
6074
6149
|
}
|
|
6075
6150
|
}
|
|
6076
6151
|
|
|
6077
6152
|
/* ── Placement Variants ── */
|
|
6078
6153
|
|
|
6079
6154
|
:where(ui-tooltip[placement="top"]) {
|
|
6155
|
+
--_popover-origin: bottom center;
|
|
6156
|
+
--_popover-from: perspective(800px) scale(0.96) rotateX(10deg);
|
|
6080
6157
|
position-area: block-start;
|
|
6081
6158
|
margin-block-end: calc(var(--_space) * 2);
|
|
6082
6159
|
}
|
|
6083
6160
|
|
|
6084
6161
|
:where(ui-tooltip[placement="bottom"]) {
|
|
6162
|
+
--_popover-origin: top center;
|
|
6163
|
+
--_popover-from: perspective(800px) scale(0.96) rotateX(-10deg);
|
|
6085
6164
|
position-area: block-end;
|
|
6086
6165
|
margin-block-start: calc(var(--_space) * 2);
|
|
6087
6166
|
}
|
|
6088
6167
|
|
|
6089
6168
|
:where(ui-tooltip[placement="left"]) {
|
|
6169
|
+
--_popover-origin: right center;
|
|
6170
|
+
--_popover-from: perspective(800px) scale(0.96) rotateY(-10deg);
|
|
6090
6171
|
position-area: inline-start;
|
|
6091
6172
|
margin-inline-end: calc(var(--_space) * 2);
|
|
6092
6173
|
}
|
|
6093
6174
|
|
|
6094
6175
|
:where(ui-tooltip[placement="right"]) {
|
|
6176
|
+
--_popover-origin: left center;
|
|
6177
|
+
--_popover-from: perspective(800px) scale(0.96) rotateY(10deg);
|
|
6095
6178
|
position-area: inline-end;
|
|
6096
6179
|
margin-inline-start: calc(var(--_space) * 2);
|
|
6097
6180
|
}
|
|
@@ -7086,10 +7169,14 @@
|
|
|
7086
7169
|
Flip: bottom-aligned, grows upward (span-block-start). */
|
|
7087
7170
|
|
|
7088
7171
|
:where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
|
|
7172
|
+
--_popover-origin: left center;
|
|
7173
|
+
--_popover-from: perspective(800px) scale(0.96) rotateY(20deg);
|
|
7174
|
+
|
|
7089
7175
|
position: fixed;
|
|
7090
7176
|
position-area: inline-end span-block-end;
|
|
7091
7177
|
position-try-fallbacks: --sidebar-item-flip-up;
|
|
7092
|
-
margin:
|
|
7178
|
+
margin-block: var(--ui-popover-viewport-margin);
|
|
7179
|
+
margin-inline: 0;
|
|
7093
7180
|
margin-inline-start: var(--ui-popover-gap);
|
|
7094
7181
|
min-width: 200px;
|
|
7095
7182
|
max-height: var(--ui-popover-max-height);
|
|
@@ -7100,6 +7187,10 @@
|
|
|
7100
7187
|
position-area: inline-end span-block-start;
|
|
7101
7188
|
}
|
|
7102
7189
|
|
|
7190
|
+
@position-try --sidebar-item-flip-down {
|
|
7191
|
+
position-area: inline-end span-block-end;
|
|
7192
|
+
}
|
|
7193
|
+
|
|
7103
7194
|
/* ── Container Query: Collapsed Sidebar ── */
|
|
7104
7195
|
/* WHY: Each component owns its own collapsed behavior via @container.
|
|
7105
7196
|
The aside is the container (container-name: sidebar). When it shrinks
|
|
@@ -7140,6 +7231,14 @@
|
|
|
7140
7231
|
:where(ui-layout-sidebar-item) > :where(:not([slot="icon"]):not(ui-listbox[popover]):not(.nav-group-flyout)) {
|
|
7141
7232
|
display: none;
|
|
7142
7233
|
}
|
|
7234
|
+
|
|
7235
|
+
/* WHY: In collapsed mode the sidebar item is a small icon — centering
|
|
7236
|
+
the popover vertically with the anchor is more natural than top-aligning.
|
|
7237
|
+
Fallbacks handle viewport clipping (top/bottom edge). */
|
|
7238
|
+
:where(ui-layout-sidebar-item) > :where(ui-listbox[popover]) {
|
|
7239
|
+
position-area: inline-end;
|
|
7240
|
+
position-try-fallbacks: --sidebar-item-flip-up, --sidebar-item-flip-down;
|
|
7241
|
+
}
|
|
7143
7242
|
}
|
|
7144
7243
|
|
|
7145
7244
|
}
|
package/dist/native-ui.js
CHANGED
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { a as de, i as fe, n as pe, r as me, s as he, t as ge } from "./ui-element.js";
|
|
6
|
-
import { $ as _e, A as ve, B as ye, C as be, Ct as xe, D as Se, Dt as Ce, E as we, Et as Te, F as Ee, G as De, H as Oe, I as ke, J as Ae, K as je, L as Q, M as Me, N as Ne, O as Pe, P as Fe, Q as Ie, R as Le, S as Re, St as ze, T as Be, Tt as Ve, U as He, V as Ue, W as We, X as Ge, Y as Ke, Z as qe, _ as Je, _t as Ye, a as Xe, at as Ze, b as Qe, bt as $e, c as et, ct as tt, d as nt, dt as rt, et as it, f as at, ft as ot, g as st, gt as ct, h as lt, ht as ut, i as dt, it as ft, j as pt, k as mt, l as ht, lt as gt, m as _t, mt as vt, n as yt, nt as bt, o as xt, ot as St, p as Ct, pt as wt, q as Tt, r as Et, rt as Dt, s as Ot, st as kt, t as At, tt as jt, u as Mt, ut as Nt, v as Pt, vt as Ft, w as It, wt as Lt, x as Rt, xt as zt, y as Bt, yt as Vt, z as Ht } from "./ui-icon-element.js";
|
|
7
|
-
var $ = class extends Event {
|
|
8
|
-
context;
|
|
9
|
-
callback;
|
|
10
|
-
constructor(e, t) {
|
|
11
|
-
super("context-request", {
|
|
12
|
-
bubbles: !0,
|
|
13
|
-
composed: !0
|
|
14
|
-
}), this.context = e, this.callback = t;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
function Ut(e) {
|
|
18
|
-
return class extends e {
|
|
19
|
-
#e = /* @__PURE__ */ new Map();
|
|
20
|
-
provideContext(e, t) {
|
|
21
|
-
this.#e.set(e, t);
|
|
22
|
-
}
|
|
23
|
-
connectedCallback() {
|
|
24
|
-
super.connectedCallback?.(), this.addEventListener("context-request", this.#t);
|
|
25
|
-
}
|
|
26
|
-
disconnectedCallback() {
|
|
27
|
-
super.disconnectedCallback?.(), this.removeEventListener("context-request", this.#t);
|
|
28
|
-
}
|
|
29
|
-
#t = (e) => {
|
|
30
|
-
if (!(e instanceof $)) return;
|
|
31
|
-
let t = this.#e.get(e.context);
|
|
32
|
-
t !== void 0 && (e.stopPropagation(), e.callback(t));
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function Wt(e) {
|
|
37
|
-
return class extends e {
|
|
38
|
-
#e = /* @__PURE__ */ new Map();
|
|
39
|
-
requestContext(e, t) {
|
|
40
|
-
this.dispatchEvent(new $(e, (n) => {
|
|
41
|
-
this.#e.set(e, n), t?.(n);
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
getContext(e) {
|
|
45
|
-
return this.#e.get(e) ?? null;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export { Q as CalendarStore, x as ClipboardController, y as CollapsibleController, De as ColumnResizeController, Wt as ContextConsumer, Ut as ContextProvider, $ as ContextRequestEvent, E as CopyController, ze as DataListController, m as DialogController, s as DismissController, c as DismissStack, i as DragController, W as DropZoneController, C as EditController, D as FocusTrapController, Lt as FormAssociable, o as GestureRouter, O as HoverController, T as IntersectController, l as ListNavigateController, f as PopoverController, u as PressController, N as RangeSelectController, p as ResizeController, r as RovingFocusController, k as SearchController, Ee as SelectController, ue as SelectionController, g as SortController, w as SwipeController, je as TableStore, b as ToastController, h as ToastManager, it as UIAccordion, _e as UIAccordionItem, Pe as UIAvatar, Se as UIBadge, Be as UIBreadcrumb, It as UIBreadcrumbItem, Vt as UIButton, ke as UICalendar, nt as UICard, at as UIChatInput, kt as UICheckbox, Ne as UICombobox, wt as UICommand, tt as UICommandEmpty, gt as UICommandGroup, ot as UICommandInput, Nt as UICommandItem, rt as UICommandList, Ct as UIController, Ie as UIDialog, Re as UIDrawer, ge as UIElement, Me as UIField, At as UIIcon, Ft as UIInput, mt as UIInputOtp, we as UIKbd, xt as UILayoutChat, Xe as UILayoutInspector, et as UILayoutSidebar, Ot as UILayoutSidebarItem, Ye as UIListbox, Je as UINav, lt as UINavGroup, _t as UINavGroupHeader, st as UINavItem, ct as UIOption, vt as UIOptionGroup, ut as UIOptionGroupHeader, be as UIPagination, Ze as UIRadio, ft as UIRadioGroup, ve as UIRange, Mt as UISection, bt as UISegment, Dt as UISegmentedControl, Fe as UISelect, Pt as UISlide, Bt as UISlideshow, St as UISwitch, Ge as UITab, Ke as UITabPanel, Ae as UITabPanels, We as UITable, Oe as UITableBody, ye as UITableCell, He as UITableHead, Ht as UITableHeader, Ue as UITableRow, qe as UITabs, pt as UITextarea, ht as UIToolbar, jt as UITooltip, Rt as UITree, Qe as UITreeItem, G as ValidateController, _ as VirtualScrollController, ee as batch, U as clippableAdapter, F as collapsibleAdapter, pe as collectTraitOptions, te as computed, v as copyableAdapter, Le as createCalendarStore, xe as createDataList, Ce as createDisabledEffect, Tt as createTableStore, S as debugReactive, ne as define, z as dialogableAdapter, H as dismissableAdapter, ae as draggableAdapter, ce as droppableAdapter, J as editableAdapter, e as effect, $e as fetchDataOptions, oe as focusTrappableAdapter, yt as getIcon, fe as getRegisteredTraitNames, de as getTrait, a as getTraitRuntime, se as hoverableAdapter, A as intersectableAdapter, M as isComputed, P as isSignal, B as listNavigableAdapter, Et as onIconRegistered, zt as parseDataOptions, me as parseTraitAttribute, X as popoverableAdapter, j as pressableAdapter, Ve as prop, K as rangeSelectableAdapter, ie as registerAllTraits, dt as registerIcon, he as registerTrait, R as resizableAdapter, V as rovingFocusableAdapter, I as searchableAdapter, Y as selectableAdapter, n as signal, L as sortableAdapter, Z as swipeableAdapter, Te as syncProp, q as toastableAdapter, t as uid, d as untrack, le as validatableAdapter, re as virtualizableAdapter };
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, G as p, Gt as m, H as h, Ht as g, I as _, It as v, J as y, K as b, Kt as x, L as S, Lt as C, M as w, Mt as T, N as E, Nt as D, O, Ot as k, P as A, Pt as j, Q as M, R as N, Rt as P, S as F, St as I, T as L, Tt as R, U as z, Ut as B, V, Vt as H, W as U, Wt as W, X as G, Y as K, Z as q, _ as J, _t as Y, a as X, at as Z, b as Q, bt as $, c as ee, ct as te, d as ne, dt as re, et as ie, f as ae, ft as oe, g as se, gt as ce, h as le, ht as ue, i as de, it as fe, j as pe, jt as me, k as he, kt as ge, l as _e, lt as ve, m as ye, mt as be, n as xe, nt as Se, o as Ce, ot as we, p as Te, pt as Ee, q as De, qt as Oe, r as ke, rt as Ae, s as je, st as Me, t as Ne, tt as Pe, u as Fe, ut as Ie, v as Le, vt as Re, w as ze, wt as Be, x as Ve, xt as He, y as Ue, yt as We, z as Ge, zt as Ke } from "./components.js";
|
|
2
|
+
import { A as qe, B as Je, C as Ye, D as Xe, E as Ze, F as Qe, G as $e, H as et, I as tt, J as nt, K as rt, L as it, M as at, N as ot, O as st, P as ct, R as lt, S as ut, T as dt, U as ft, V as pt, W as mt, _ as ht, a as gt, b as _t, c as vt, d as yt, f as bt, g as xt, h as St, i as Ct, j as wt, k as Tt, l as Et, m as Dt, n as Ot, o as kt, p as At, q as jt, r as Mt, s as Nt, t as Pt, u as Ft, v as It, w as Lt, x as Rt, y as zt, z as Bt } from "./core.js";
|
|
3
|
+
import { i as Vt, n as Ht, r as Ut, t as Wt } from "./ui-icon.js";
|
|
4
|
+
export { E as CalendarStore, Qe as ClipboardController, Xe as CollapsibleController, V as ColumnResizeController, et as ContextConsumer, ft as ContextProvider, mt as ContextRequestEvent, ot as CopyController, u as DataListController, ce as DialogController, We as DismissController, k as DismissStack, o as DragController, wt as DropZoneController, tt as EditController, st as FocusTrapController, T as FormAssociable, me as GestureRouter, ct as HoverController, at as IntersectController, Y as ListNavigateController, Re as PopoverController, He as PressController, pt as RangeSelectController, I as ResizeController, $ as RovingFocusController, lt as SearchController, pe as SelectController, Bt as SelectionController, qe as SortController, it as SwipeController, h as TableStore, Ze as ToastController, ge as ToastManager, G as UIAccordion, K as UIAccordionItem, ze as UIAvatar, a as UIBadge, Ve as UIBreadcrumb, Q as UIBreadcrumbItem, ue as UIButton, w as UICalendar, je as UICard, ee as UIChatInput, Ae as UICheckbox, he as UICombobox, ve as UICommand, fe as UICommandEmpty, Z as UICommandGroup, te as UICommandInput, we as UICommandItem, Me as UICommandList, _e as UIController, y as UIDialog, Le as UIDrawer, C as UIElement, O as UIField, Wt as UIIcon, be as UIInput, L as UIInputOtp, F as UIKbd, xe as UILayoutChat, Ne as UILayoutInspector, de as UILayoutSidebar, ke as UILayoutSidebarItem, Ee as UIListbox, Te as UINav, ne as UINavGroup, Fe as UINavGroupHeader, ae as UINavItem, oe as UIOption, Ie as UIOptionGroup, re as UIOptionGroupHeader, Ue as UIPagination, Pe as UIRadio, ie as UIRadioGroup, l as UIRange, Ce as UISection, M as UISegment, e as UISegmentedControl, t as UISelect, ye as UISlide, le as UISlideshow, Se as UISwitch, b as UITab, p as UITabPanel, U as UITabPanels, r as UITable, N as UITableBody, _ as UITableCell, Ge as UITableHead, d as UITableHeader, S as UITableRow, De as UITabs, s as UITextarea, X as UIToolbar, q as UITooltip, J as UITree, se as UITreeItem, Tt as ValidateController, Je as VirtualScrollController, W as batch, Ct as clippableAdapter, ht as collapsibleAdapter, P as collectTraitOptions, x as computed, Ye as copyableAdapter, A as createCalendarStore, c as createDataList, f as createDisabledEffect, z as createTableStore, rt as debugReactive, $e as define, yt as dialogableAdapter, St as dismissableAdapter, Ft as draggableAdapter, Rt as droppableAdapter, Ot as editableAdapter, m as effect, Be as fetchDataOptions, It as focusTrappableAdapter, Ht as getIcon, i as getRegisteredTraitNames, H as getTrait, n as getTraitRuntime, Lt as hoverableAdapter, ut as intersectableAdapter, jt as isComputed, nt as isSignal, bt as listNavigableAdapter, Ut as onIconRegistered, R as parseDataOptions, Ke as parseTraitAttribute, At as popoverableAdapter, dt as pressableAdapter, D as prop, Et as rangeSelectableAdapter, Pt as registerAllTraits, Vt as registerIcon, g as registerTrait, vt as resizableAdapter, xt as rovingFocusableAdapter, gt as searchableAdapter, kt as selectableAdapter, Oe as signal, _t as sortableAdapter, Mt as swipeableAdapter, j as syncProp, Dt as toastableAdapter, v as uid, B as untrack, zt as validatableAdapter, Nt as virtualizableAdapter };
|
package/dist/register-all.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { $ as e, A as t, B as ee, C as n, D as r, E as i, F as a, G as o, I as s, J as c, K as l, L as u, M as d, O as f, Q as p, R as m, S as h, T as g, W as _, X as v, Y as y, Z as b, _ as x, a as S, at as C, b as w, c as T, ct as E, d as D, dt as O, et as te, f as k, ft as A, g as j, h as M, ht as N, i as P, it as F, k as I, l as L, lt as R, m as z, mt as B, n as V, nt as H, o as U, ot as W, p as G, pt as K, q, r as J, rt as Y, s as X, st as Z, tt as Q, u as ne, ut as re, v as ie, w as ae, x as oe, y as se, z as ce } from "./components.js";
|
|
2
|
+
import { G as $ } from "./core.js";
|
|
3
|
+
import { t as le } from "./ui-icon.js";
|
|
4
|
+
$("ui-button", N), $("ui-input", B), $("ui-listbox", K), $("ui-option", A), $("ui-option-group", re), $("ui-option-group-header", O), $("ui-select", t), $("ui-combobox", I), $("ui-command", R), $("ui-command-input", E), $("ui-command-list", Z), $("ui-command-group", C), $("ui-command-item", W), $("ui-command-empty", F), $("ui-checkbox", Y), $("ui-switch", H), $("ui-radio", Q), $("ui-radio-group", te), $("ui-segmented-control", e), $("ui-segment", p), $("ui-tooltip", b), $("ui-accordion", v), $("ui-accordion-item", y), $("ui-dialog", c), $("ui-tabs", q), $("ui-tab", l), $("ui-tab-panel", o), $("ui-tab-panels", _), $("ui-table", ee), $("ui-table-head", ce), $("ui-table-body", m), $("ui-table-row", u), $("ui-table-header", a), $("ui-table-cell", s), $("ui-calendar", d), $("ui-field", f), $("ui-textarea", r), $("ui-range", i), $("ui-input-otp", g), $("ui-avatar", ae), $("ui-badge", n), $("ui-kbd", h), $("ui-breadcrumb", oe), $("ui-breadcrumb-item", w), $("ui-pagination", se), $("ui-drawer", ie), $("ui-tree", x), $("ui-tree-item", j), $("ui-slideshow", M), $("ui-slide", z), $("ui-nav", G), $("ui-nav-group", D), $("ui-nav-group-header", ne), $("ui-nav-item", k), $("ui-chat-input", T), $("ui-controller", L), $("ui-card", X), $("ui-section", U), $("ui-toolbar", S), $("ui-layout-sidebar", P), $("ui-layout-sidebar-item", J), $("ui-layout-chat", V), $("ui-icon", le);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draggable-adapter.d.ts","sourceRoot":"","sources":["../../../src/traits/adapters/draggable-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"draggable-adapter.d.ts","sourceRoot":"","sources":["../../../src/traits/adapters/draggable-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAqBzD,CAAC"}
|
|
@@ -4,6 +4,8 @@ export interface DragOptions {
|
|
|
4
4
|
axis?: 'vertical' | 'horizontal' | 'both';
|
|
5
5
|
mode?: 'drop' | 'slot' | 'preview';
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
/** Enable view-transition animation for preview mode grid reordering (default: true). */
|
|
8
|
+
animate?: boolean;
|
|
7
9
|
}
|
|
8
10
|
/** Enables pointer-driven drag-and-drop with drop, slot, or preview reordering. */
|
|
9
11
|
export declare class DragController {
|
|
@@ -14,6 +16,7 @@ export declare class DragController {
|
|
|
14
16
|
axis: 'vertical' | 'horizontal' | 'both';
|
|
15
17
|
mode: 'drop' | 'slot' | 'preview';
|
|
16
18
|
disabled: boolean;
|
|
19
|
+
animate: boolean;
|
|
17
20
|
constructor(host: HTMLElement, options: DragOptions);
|
|
18
21
|
attach(): void;
|
|
19
22
|
detach(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-controller.d.ts","sourceRoot":"","sources":["../../src/traits/drag-controller.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"drag-controller.d.ts","sourceRoot":"","sources":["../../src/traits/drag-controller.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,mFAAmF;AACnF,qBAAa,cAAc;;IACzB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;IACzC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;gBAkBL,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW;IAWnD,MAAM,IAAI,IAAI;IAQd,MAAM,IAAI,IAAI;IASd,OAAO,IAAI,IAAI;CAkiBhB"}
|
package/dist/traits.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
|
|
4
|
-
import { A as v, B as y, C as b, D as x, E as S, F as C, H as w, I as T, L as E, M as D, N as O, O as k, P as A, R as j, S as M, T as N, U as P, V as F, W as I, _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, j as K, k as q, l as J, m as Y, n as X, o as Z, p as Q, r as $, s as ee, t as te, u as ne, v as re, w as ie, x as ae, y as oe, z as se } from "./register-all2.js";
|
|
5
|
-
import { a as ce, i as le, n as ue, r as de, s as fe, t as pe } from "./ui-element.js";
|
|
6
|
-
export { C as ClipboardController, x as CollapsibleController, O as CopyController, g as DialogController, l as DismissController, u as DismissStack, s as DragController, K as DropZoneController, T as EditController, k as FocusTrapController, A as HoverController, D as IntersectController, d as ListNavigateController, m as PopoverController, f as PressController, F as RangeSelectController, h as ResizeController, o as RovingFocusController, j as SearchController, se as SelectionController, v as SortController, E as SwipeController, S as ToastController, _ as ToastManager, pe as UIElement, q as ValidateController, y as VirtualScrollController, r as batch, G as clippableAdapter, L as collapsibleAdapter, ue as collectTraitOptions, i as computed, b as copyableAdapter, w as debugReactive, a as define, V as dialogableAdapter, W as dismissableAdapter, ne as draggableAdapter, ae as droppableAdapter, X as editableAdapter, e as effect, re as focusTrappableAdapter, le as getRegisteredTraitNames, ce as getTrait, c as getTraitRuntime, ie as hoverableAdapter, M as intersectableAdapter, P as isComputed, I as isSignal, H as listNavigableAdapter, de as parseTraitAttribute, Q as popoverableAdapter, N as pressableAdapter, J as rangeSelectableAdapter, te as registerAllTraits, fe as registerTrait, B as resizableAdapter, U as rovingFocusableAdapter, R as searchableAdapter, Z as selectableAdapter, n as signal, z as sortableAdapter, $ as swipeableAdapter, Y as toastableAdapter, t as uid, p as untrack, oe as validatableAdapter, ee as virtualizableAdapter };
|
|
1
|
+
import { At as e, Bt as t, Ct as n, Gt as r, Ht as i, It as a, Kt as o, Lt as s, Ot as c, Rt as l, St as u, Ut as d, Vt as f, Wt as p, _t as m, bt as h, gt as g, kt as _, qt as v, vt as y, xt as b, yt as x, zt as S } from "./components.js";
|
|
2
|
+
import { A as C, B as w, C as T, D as E, E as D, F as O, G as k, I as A, J as j, K as M, L as N, M as P, N as F, O as I, P as L, R, S as z, T as B, V, _ as H, a as U, b as W, c as G, d as K, f as q, g as J, h as Y, i as X, j as Z, k as Q, l as $, m as ee, n as te, o as ne, p as re, q as ie, r as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe, z as pe } from "./core.js";
|
|
3
|
+
export { O as ClipboardController, E as CollapsibleController, F as CopyController, g as DialogController, x as DismissController, c as DismissStack, n as DragController, Z as DropZoneController, A as EditController, I as FocusTrapController, L as HoverController, P as IntersectController, m as ListNavigateController, y as PopoverController, b as PressController, V as RangeSelectController, u as ResizeController, h as RovingFocusController, R as SearchController, pe as SelectionController, C as SortController, N as SwipeController, D as ToastController, _ as ToastManager, s as UIElement, Q as ValidateController, w as VirtualScrollController, p as batch, X as clippableAdapter, H as collapsibleAdapter, l as collectTraitOptions, o as computed, T as copyableAdapter, M as debugReactive, k as define, K as dialogableAdapter, Y as dismissableAdapter, ce as draggableAdapter, de as droppableAdapter, te as editableAdapter, r as effect, le as focusTrappableAdapter, t as getRegisteredTraitNames, f as getTrait, e as getTraitRuntime, ue as hoverableAdapter, z as intersectableAdapter, ie as isComputed, j as isSignal, q as listNavigableAdapter, S as parseTraitAttribute, re as popoverableAdapter, B as pressableAdapter, $ as rangeSelectableAdapter, se as registerAllTraits, i as registerTrait, G as resizableAdapter, J as rovingFocusableAdapter, U as searchableAdapter, ne as selectableAdapter, v as signal, W as sortableAdapter, ae as swipeableAdapter, ee as toastableAdapter, a as uid, d as untrack, fe as validatableAdapter, oe as virtualizableAdapter };
|
package/dist/ui-icon.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Lt as e } from "./components.js";
|
|
2
|
+
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
|
|
3
|
+
function r(e, r) {
|
|
4
|
+
t.set(e, r), n.forEach((t) => t(e));
|
|
5
|
+
}
|
|
6
|
+
function i(e) {
|
|
7
|
+
return t.get(e);
|
|
8
|
+
}
|
|
9
|
+
function a(e) {
|
|
10
|
+
return n.add(e), () => n.delete(e);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Icon component rendering SVG from the global icon registry.
|
|
14
|
+
* @attr {string} name - Icon name from the Phosphor icon set
|
|
15
|
+
* @attr {string} weight - Icon weight: "regular" (default) or "fill"
|
|
16
|
+
* @attr {string} size - Icon size override
|
|
17
|
+
* @attr {string} aria-label - Accessible label (sets role="img" when present)
|
|
18
|
+
*/
|
|
19
|
+
var o = class extends e {
|
|
20
|
+
static observedAttributes = [
|
|
21
|
+
"name",
|
|
22
|
+
"weight",
|
|
23
|
+
"size",
|
|
24
|
+
"aria-label"
|
|
25
|
+
];
|
|
26
|
+
#e = null;
|
|
27
|
+
setup() {
|
|
28
|
+
super.setup(), this.#t(), this.#r();
|
|
29
|
+
}
|
|
30
|
+
attributeChangedCallback(e, t, n) {
|
|
31
|
+
super.attributeChangedCallback(e, t, n), (e === "name" || e === "weight") && this.#r(), e === "aria-label" && this.#t();
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
super.disconnectedCallback(), this.#e?.(), this.#e = null;
|
|
35
|
+
}
|
|
36
|
+
#t() {
|
|
37
|
+
this.hasAttribute("aria-label") ? (this.setAttribute("role", "img"), this.removeAttribute("aria-hidden")) : (this.setAttribute("aria-hidden", "true"), this.removeAttribute("role"));
|
|
38
|
+
}
|
|
39
|
+
/** Compute the effective registry key from name + weight attributes. */
|
|
40
|
+
#n() {
|
|
41
|
+
let e = this.getAttribute("name");
|
|
42
|
+
return e ? this.getAttribute("weight") === "fill" && !e.endsWith("-fill") ? `${e}-fill` : e : null;
|
|
43
|
+
}
|
|
44
|
+
#r() {
|
|
45
|
+
let e = this.#n();
|
|
46
|
+
if (!e) {
|
|
47
|
+
this.innerHTML = "", this.#e?.(), this.#e = null;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
let t = i(e);
|
|
51
|
+
t ? (this.innerHTML = t, this.#e?.(), this.#e = null) : (this.innerHTML = "", this.#e ||= a((e) => {
|
|
52
|
+
e === this.#n() && this.#r();
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export { r as i, i as n, a as r, o as t };
|
package/package.json
CHANGED
package/dist/define.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, o as c, p as l, r as u, s as d, u as f } from "./uid.js";
|
|
2
|
-
var p = class {
|
|
3
|
-
[Symbol.toStringTag] = "Signal";
|
|
4
|
-
#e;
|
|
5
|
-
constructor(e) {
|
|
6
|
-
this.#e = e;
|
|
7
|
-
}
|
|
8
|
-
get value() {
|
|
9
|
-
return i(this.#e), this.#e._value;
|
|
10
|
-
}
|
|
11
|
-
set value(e) {
|
|
12
|
-
Object.is(this.#e._value, e) || (this.#e._value = e, l(this.#e));
|
|
13
|
-
}
|
|
14
|
-
peek() {
|
|
15
|
-
return this.#e._value;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
function m(e) {
|
|
19
|
-
let t = new a(e), n = new p(t);
|
|
20
|
-
return r.set(n, t), n;
|
|
21
|
-
}
|
|
22
|
-
var h = class {
|
|
23
|
-
[Symbol.toStringTag] = "Computed";
|
|
24
|
-
#e;
|
|
25
|
-
constructor(e) {
|
|
26
|
-
this.#e = e;
|
|
27
|
-
}
|
|
28
|
-
get value() {
|
|
29
|
-
return i(this.#e), this.#e._dirty && this.#t(), this.#e._value;
|
|
30
|
-
}
|
|
31
|
-
peek() {
|
|
32
|
-
return this.#e._dirty && this.#t(), this.#e._value;
|
|
33
|
-
}
|
|
34
|
-
#t() {
|
|
35
|
-
let t = this.#e;
|
|
36
|
-
if (c.has(t)) throw Error("Circular computed dependency detected.");
|
|
37
|
-
e(t), c.add(t);
|
|
38
|
-
let n = o();
|
|
39
|
-
s(t);
|
|
40
|
-
try {
|
|
41
|
-
t._value = t._fn();
|
|
42
|
-
} finally {
|
|
43
|
-
s(n), c.delete(t), t._dirty = !1;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
function g(e) {
|
|
48
|
-
let t = new u(e), n = new h(t);
|
|
49
|
-
return r.set(n, t), n;
|
|
50
|
-
}
|
|
51
|
-
function _(e) {
|
|
52
|
-
n();
|
|
53
|
-
try {
|
|
54
|
-
e();
|
|
55
|
-
} finally {
|
|
56
|
-
d(), f() === 0 && t();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function v(e, t) {
|
|
60
|
-
customElements.get(e) || customElements.define(e, t);
|
|
61
|
-
}
|
|
62
|
-
export { m as i, _ as n, g as r, v as t };
|