elements-kit 0.18.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +14 -0
  2. package/dist/await.d.mts +53 -0
  3. package/dist/await.mjs +70 -0
  4. package/dist/custom-elements.d.mts +1 -1
  5. package/dist/{element-xQwq4ulc.mjs → element-D3om9yA6.mjs} +71 -4
  6. package/dist/for.d.mts +20 -26
  7. package/dist/for.mjs +29 -4
  8. package/dist/fragment-ROPRBJQd.mjs +61 -0
  9. package/dist/hydrate/index.d.mts +41 -0
  10. package/dist/hydrate/index.mjs +2 -0
  11. package/dist/hydrate-6Qx4n4Su.mjs +380 -0
  12. package/dist/integrations/astro-client.d.mts +17 -0
  13. package/dist/integrations/astro-client.mjs +23 -0
  14. package/dist/integrations/astro-server.d.mts +15 -0
  15. package/dist/integrations/astro-server.mjs +39 -0
  16. package/dist/integrations/astro-slots.d.mts +12 -0
  17. package/dist/integrations/astro-slots.mjs +30 -0
  18. package/dist/integrations/astro.d.mts +46 -0
  19. package/dist/integrations/astro.mjs +64 -0
  20. package/dist/integrations/react.d.mts +1 -1
  21. package/dist/integrations/react.mjs +2 -2
  22. package/dist/jsx-runtime/index.d.mts +1 -1
  23. package/dist/jsx-runtime/index.mjs +2 -20
  24. package/dist/{lib-Dkc7cV5F.mjs → lib-DYypKhxk.mjs} +63 -5
  25. package/dist/render.mjs +1 -1
  26. package/dist/{scope-CnEvL9Nd.mjs → scope-zbEG299F.mjs} +1 -1
  27. package/dist/server/index.d.mts +43 -0
  28. package/dist/server/index.mjs +2 -0
  29. package/dist/server-iFSng50i.mjs +385 -0
  30. package/dist/signals/index.d.mts +2 -2
  31. package/dist/signals/index.mjs +5 -3
  32. package/dist/{slot-B8y0aEoz.d.mts → slot-BFWXeFRl.d.mts} +6 -0
  33. package/dist/{slot-Cne__au7.mjs → slot-Dvf30O0B.mjs} +12 -1
  34. package/dist/slot.d.mts +1 -1
  35. package/dist/slot.mjs +1 -1
  36. package/dist/{infer-B7T5hi_D.d.mts → types-ncUK9rki.d.mts} +140 -141
  37. package/dist/ui/overlay/index.css +70 -0
  38. package/dist/ui/overlay/index.d.mts +209 -0
  39. package/dist/ui/overlay/index.mjs +1001 -0
  40. package/dist/ui/overlay/overlay.css +332 -0
  41. package/dist/utilities/_observe.mjs +1 -1
  42. package/dist/utilities/active-element.d.mts +1 -1
  43. package/dist/utilities/active-element.mjs +1 -1
  44. package/dist/utilities/async.d.mts +19 -2
  45. package/dist/utilities/async.mjs +49 -2
  46. package/dist/utilities/context.mjs +1 -1
  47. package/dist/utilities/debounced.d.mts +1 -1
  48. package/dist/utilities/debounced.mjs +1 -1
  49. package/dist/utilities/dom-lifecycle.bench.mjs +3255 -1
  50. package/dist/utilities/dom-lifecycle.mjs +1 -1
  51. package/dist/utilities/element-rect.d.mts +1 -1
  52. package/dist/utilities/element-rect.mjs +1 -1
  53. package/dist/utilities/element-scroll.d.mts +1 -1
  54. package/dist/utilities/event-driven.d.mts +1 -1
  55. package/dist/utilities/event-driven.mjs +1 -1
  56. package/dist/utilities/event-listener.d.mts +1 -1
  57. package/dist/utilities/event-listener.mjs +1 -1
  58. package/dist/utilities/focus-within.d.mts +1 -1
  59. package/dist/utilities/focus-within.mjs +1 -1
  60. package/dist/utilities/form-object.d.mts +96 -0
  61. package/dist/utilities/form-object.mjs +285 -0
  62. package/dist/utilities/hover.d.mts +1 -1
  63. package/dist/utilities/hover.mjs +1 -1
  64. package/dist/utilities/interval.d.mts +1 -1
  65. package/dist/utilities/interval.mjs +1 -1
  66. package/dist/utilities/location.d.mts +1 -1
  67. package/dist/utilities/location.mjs +1 -1
  68. package/dist/utilities/media-devices.d.mts +1 -1
  69. package/dist/utilities/media-devices.mjs +1 -1
  70. package/dist/utilities/media-player.d.mts +1 -1
  71. package/dist/utilities/media-query.d.mts +1 -1
  72. package/dist/utilities/media-query.mjs +1 -1
  73. package/dist/utilities/network.d.mts +1 -1
  74. package/dist/utilities/network.mjs +1 -1
  75. package/dist/utilities/orientation.d.mts +1 -1
  76. package/dist/utilities/orientation.mjs +1 -1
  77. package/dist/utilities/previous.d.mts +1 -1
  78. package/dist/utilities/previous.mjs +1 -1
  79. package/dist/utilities/promise.d.mts +19 -2
  80. package/dist/utilities/promise.mjs +33 -3
  81. package/dist/utilities/retry.mjs +1 -1
  82. package/dist/utilities/routing.d.mts +1 -1
  83. package/dist/utilities/routing.mjs +1 -1
  84. package/dist/utilities/search-params.d.mts +1 -1
  85. package/dist/utilities/storage.d.mts +1 -1
  86. package/dist/utilities/throttled.d.mts +1 -1
  87. package/dist/utilities/throttled.mjs +1 -1
  88. package/dist/utilities/timeout.d.mts +1 -1
  89. package/dist/utilities/timeout.mjs +1 -1
  90. package/dist/utilities/window-focus.d.mts +1 -1
  91. package/dist/utilities/window-focus.mjs +1 -1
  92. package/dist/utilities/window-size.d.mts +1 -1
  93. package/dist/utilities/window-size.mjs +1 -1
  94. package/package.json +20 -5
  95. package/dist/benchmark.CX_oY03V-CSLAXL5f.mjs +0 -5145
  96. package/dist/magic-string.es-CXefOmkB.mjs +0 -1011
  97. package/dist/test.BmQO5GaM-Ddz9cDxc.mjs +0 -8266
  98. package/dist/utilities/active-element.test.d.mts +0 -1
  99. package/dist/utilities/active-element.test.mjs +0 -25
  100. package/dist/utilities/async.test.d.mts +0 -1
  101. package/dist/utilities/async.test.mjs +0 -275
  102. package/dist/utilities/context.test.d.mts +0 -1
  103. package/dist/utilities/context.test.mjs +0 -171
  104. package/dist/utilities/debounced.test.d.mts +0 -1
  105. package/dist/utilities/debounced.test.mjs +0 -68
  106. package/dist/utilities/dom-lifecycle.test.d.mts +0 -1
  107. package/dist/utilities/dom-lifecycle.test.mjs +0 -228
  108. package/dist/utilities/element-rect.test.d.mts +0 -1
  109. package/dist/utilities/element-rect.test.mjs +0 -101
  110. package/dist/utilities/element-scroll.test.d.mts +0 -1
  111. package/dist/utilities/element-scroll.test.mjs +0 -27
  112. package/dist/utilities/event-listener.test.d.mts +0 -1
  113. package/dist/utilities/event-listener.test.mjs +0 -60
  114. package/dist/utilities/focus-within.test.d.mts +0 -1
  115. package/dist/utilities/focus-within.test.mjs +0 -51
  116. package/dist/utilities/hover.test.d.mts +0 -1
  117. package/dist/utilities/hover.test.mjs +0 -54
  118. package/dist/utilities/intersection-observer.test.d.mts +0 -1
  119. package/dist/utilities/intersection-observer.test.mjs +0 -46
  120. package/dist/utilities/interval.test.d.mts +0 -1
  121. package/dist/utilities/interval.test.mjs +0 -115
  122. package/dist/utilities/location.test.d.mts +0 -1
  123. package/dist/utilities/location.test.mjs +0 -61
  124. package/dist/utilities/long-press.test.d.mts +0 -1
  125. package/dist/utilities/long-press.test.mjs +0 -54
  126. package/dist/utilities/media-devices.test.d.mts +0 -1
  127. package/dist/utilities/media-devices.test.mjs +0 -44
  128. package/dist/utilities/media-player.test.d.mts +0 -1
  129. package/dist/utilities/media-player.test.mjs +0 -102
  130. package/dist/utilities/mutation-observer.test.d.mts +0 -1
  131. package/dist/utilities/mutation-observer.test.mjs +0 -48
  132. package/dist/utilities/network.test.d.mts +0 -1
  133. package/dist/utilities/network.test.mjs +0 -30
  134. package/dist/utilities/on-click-outside.test.d.mts +0 -1
  135. package/dist/utilities/on-click-outside.test.mjs +0 -45
  136. package/dist/utilities/previous.test.d.mts +0 -1
  137. package/dist/utilities/previous.test.mjs +0 -90
  138. package/dist/utilities/promise.test.d.mts +0 -1
  139. package/dist/utilities/promise.test.mjs +0 -158
  140. package/dist/utilities/retry.test.d.mts +0 -1
  141. package/dist/utilities/retry.test.mjs +0 -85
  142. package/dist/utilities/routing.test.d.mts +0 -1
  143. package/dist/utilities/routing.test.mjs +0 -129
  144. package/dist/utilities/search-params.test.d.mts +0 -1
  145. package/dist/utilities/search-params.test.mjs +0 -37
  146. package/dist/utilities/ssr.test.d.mts +0 -1
  147. package/dist/utilities/ssr.test.mjs +0 -65
  148. package/dist/utilities/storage.test.d.mts +0 -1
  149. package/dist/utilities/storage.test.mjs +0 -139
  150. package/dist/utilities/throttled.test.d.mts +0 -1
  151. package/dist/utilities/throttled.test.mjs +0 -58
  152. package/dist/utilities/timeout.test.d.mts +0 -1
  153. package/dist/utilities/timeout.test.mjs +0 -121
  154. package/dist/utilities/window-size.test.d.mts +0 -1
  155. package/dist/utilities/window-size.test.mjs +0 -43
  156. /package/dist/{custom-elements-D5CgfNKc.d.mts → custom-elements-DK5VUcWA.d.mts} +0 -0
@@ -0,0 +1,332 @@
1
+ .x-overlay {
2
+ color: var(--neutral-12);
3
+ }
4
+
5
+ .x-overlay:where([open])::backdrop {
6
+ background: var(--overlay-backdrop, var(--color-overlay));
7
+ }
8
+
9
+ .x-overlay > .x-card {
10
+ contain: none;
11
+ touch-action: pan-y;
12
+ position: static;
13
+ overflow-y: auto;
14
+ }
15
+
16
+ :where(.x-overlay:not([data-material-background], [data-material-background] .x-overlay)) {
17
+ --color-material: var(--color-material-solid);
18
+ --backdrop-filter-material: none;
19
+ }
20
+
21
+ .x-overlay:where([data-resize], [data-draggable]):before, .x-overlay:where([data-resize], [data-draggable]):after {
22
+ content: "";
23
+ z-index: 1;
24
+ pointer-events: none;
25
+ position: absolute;
26
+ }
27
+
28
+ .x-overlay:where([data-draggable]:not([data-resize^="end-"])):after {
29
+ width: var(--space-3);
30
+ height: var(--space-3);
31
+ border-radius: var(--overlay-grip-radius, var(--radius-5));
32
+ background-color: var(--neutral-a8);
33
+ inset-block-start: var(--space-2);
34
+ inset-inline-start: var(--space-2);
35
+ }
36
+
37
+ .x-overlay:where([data-draggable][data-resize="start-start"]):after {
38
+ inset-inline-start: auto;
39
+ inset-inline-end: var(--space-2);
40
+ }
41
+
42
+ .x-overlay:where([data-draggable][data-resize^="end-"]):after {
43
+ top: var(--space-2);
44
+ width: var(--space-8);
45
+ height: var(--space-1);
46
+ border-radius: max(var(--radius-1), var(--radius-pill));
47
+ background-color: var(--neutral-a8);
48
+ margin-inline: auto;
49
+ inset-inline: 0;
50
+ }
51
+
52
+ .x-overlay:where([data-resize^="block-"]):before {
53
+ width: var(--space-8);
54
+ height: var(--space-1);
55
+ border-radius: max(var(--radius-1), var(--radius-pill));
56
+ background-color: var(--neutral-a8);
57
+ margin-inline: auto;
58
+ inset-inline: 0;
59
+ }
60
+
61
+ .x-overlay:where([data-resize="block-start"]):before {
62
+ top: var(--space-2);
63
+ }
64
+
65
+ .x-overlay:where([data-resize="block-end"]):before {
66
+ bottom: var(--space-2);
67
+ }
68
+
69
+ .x-overlay:where([data-resize^="inline-"]):before {
70
+ width: var(--space-1);
71
+ height: var(--space-8);
72
+ border-radius: max(var(--radius-1), var(--radius-pill));
73
+ background-color: var(--neutral-a8);
74
+ margin-block: auto;
75
+ inset-block: 0;
76
+ }
77
+
78
+ .x-overlay:where([data-resize="inline-start"]):before {
79
+ inset-inline-start: var(--space-2);
80
+ }
81
+
82
+ .x-overlay:where([data-resize="inline-end"]):before {
83
+ inset-inline-end: var(--space-2);
84
+ }
85
+
86
+ .x-overlay:where([data-resize^="start-"], [data-resize^="end-"]):before {
87
+ --_grip-r: max(calc(var(--overlay-grip-radius, var(--radius-5)) - var(--space-1)),
88
+ 0px);
89
+ --_cap: min(var(--space-1), calc(var(--_grip-r) * 9999));
90
+ --_gx: 1;
91
+ --_gy: 1;
92
+ content: "";
93
+ z-index: 1;
94
+ pointer-events: none;
95
+ width: max(calc(var(--_grip-r) + var(--space-1)), calc(var(--space-1) * 3));
96
+ height: max(calc(var(--_grip-r) + var(--space-1)), calc(var(--space-1) * 3));
97
+ border: var(--space-1) solid var(--neutral-a8);
98
+ border-bottom-right-radius: var(--_grip-r);
99
+ transform: scale(var(--_gx), var(--_gy));
100
+ -webkit-mask: /* tails, cut flat at the cap centers (full length when capless) */
101
+ linear-gradient(#000, #000) right 0 top calc(var(--_cap) / 2) /
102
+ var(--space-1) calc(100% - var(--_cap) / 2) no-repeat,
103
+ linear-gradient(#000, #000) left calc(var(--_cap) / 2) bottom 0 /
104
+ calc(100% - var(--_cap) / 2) var(--space-1) no-repeat,
105
+ /* arc quadrant — the border's own curve shows through */
106
+ linear-gradient(#000, #000) 100% 100% / var(--_grip-r) var(--_grip-r)
107
+ no-repeat,
108
+ /* round caps, centered on the flat cuts over solid border ink */
109
+ radial-gradient(circle closest-side,
110
+ #000 calc(100% - .5px),
111
+ transparent)
112
+ right 0 top 0 / var(--_cap) var(--_cap) no-repeat,
113
+ radial-gradient(circle closest-side,
114
+ #000 calc(100% - .5px),
115
+ transparent)
116
+ left 0 bottom 0 / var(--_cap) var(--_cap) no-repeat;
117
+ mask: /* tails, cut flat at the cap centers (full length when capless) */
118
+ linear-gradient(#000, #000) right 0 top calc(var(--_cap) / 2) /
119
+ var(--space-1) calc(100% - var(--_cap) / 2) no-repeat,
120
+ linear-gradient(#000, #000) left calc(var(--_cap) / 2) bottom 0 /
121
+ calc(100% - var(--_cap) / 2) var(--space-1) no-repeat,
122
+ /* arc quadrant — the border's own curve shows through */
123
+ linear-gradient(#000, #000) 100% 100% / var(--_grip-r) var(--_grip-r)
124
+ no-repeat,
125
+ /* round caps, centered on the flat cuts over solid border ink */
126
+ radial-gradient(circle closest-side,
127
+ #000 calc(100% - .5px),
128
+ transparent)
129
+ right 0 top 0 / var(--_cap) var(--_cap) no-repeat,
130
+ radial-gradient(circle closest-side,
131
+ #000 calc(100% - .5px),
132
+ transparent)
133
+ left 0 bottom 0 / var(--_cap) var(--_cap) no-repeat;
134
+ position: absolute;
135
+ }
136
+
137
+ .x-overlay:where([data-resize="start-end"], [data-resize="end-end"]):before {
138
+ inset-inline-end: var(--space-1);
139
+ }
140
+
141
+ .x-overlay:where([data-resize="start-start"], [data-resize="end-start"]):before {
142
+ --_gx: -1;
143
+ inset-inline-start: var(--space-1);
144
+ }
145
+
146
+ .x-overlay:where([data-resize^="end-"]):before {
147
+ bottom: var(--space-1);
148
+ }
149
+
150
+ .x-overlay:where([data-resize^="start-"]):before {
151
+ top: var(--space-1);
152
+ --_gy: -1;
153
+ }
154
+
155
+ .x-overlay:where([data-resize="start-end"], [data-resize="end-end"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):before {
156
+ --_gx: -1;
157
+ }
158
+
159
+ .x-overlay:where([data-resize="start-start"], [data-resize="end-start"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):before {
160
+ --_gx: 1;
161
+ }
162
+
163
+ @supports (transition-behavior: allow-discrete) {
164
+ .x-overlay {
165
+ transition-property: top, left, translate, width, height, opacity, scale, display;
166
+ transition-duration: var(--overlay-duration);
167
+ transition-timing-function: var(--overlay-easing);
168
+ transition-behavior: allow-discrete;
169
+ }
170
+
171
+ .x-overlay:where(:not([data-resize]), [data-resize^="start-"], [data-resize^="end-"]) {
172
+ opacity: 0;
173
+ scale: .97;
174
+ }
175
+
176
+ .x-overlay:where(:not([data-resize]), [data-resize^="start-"], [data-resize^="end-"]):where([open], :popover-open) {
177
+ opacity: 1;
178
+ scale: 1;
179
+ }
180
+
181
+ @starting-style {
182
+ .x-overlay:where(:not([data-resize]), [data-resize^="start-"], [data-resize^="end-"]):where([open], :popover-open) {
183
+ opacity: 0;
184
+ scale: .97;
185
+ }
186
+ }
187
+
188
+ .x-overlay:where([data-resize="block-start"]) {
189
+ --_ey: 100%;
190
+ }
191
+
192
+ .x-overlay:where([data-resize="block-start"]):where([open], :popover-open) {
193
+ --_ey: 0%;
194
+ }
195
+
196
+ @starting-style {
197
+ .x-overlay:where([data-resize="block-start"]):where([open], :popover-open) {
198
+ --_ey: 100%;
199
+ }
200
+ }
201
+
202
+ .x-overlay:where([data-resize="block-end"]) {
203
+ --_ey: -100%;
204
+ }
205
+
206
+ .x-overlay:where([data-resize="block-end"]):where([open], :popover-open) {
207
+ --_ey: 0%;
208
+ }
209
+
210
+ @starting-style {
211
+ .x-overlay:where([data-resize="block-end"]):where([open], :popover-open) {
212
+ --_ey: -100%;
213
+ }
214
+ }
215
+
216
+ .x-overlay:where([data-resize="inline-start"]) {
217
+ --_ex: 100%;
218
+ }
219
+
220
+ .x-overlay:where([data-resize="inline-start"]):where([open], :popover-open) {
221
+ --_ex: 0%;
222
+ }
223
+
224
+ @starting-style {
225
+ .x-overlay:where([data-resize="inline-start"]):where([open], :popover-open) {
226
+ --_ex: 100%;
227
+ }
228
+ }
229
+
230
+ .x-overlay:where([data-resize="inline-start"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
231
+ --_ex: -100%;
232
+ }
233
+
234
+ .x-overlay:where([data-resize="inline-start"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):where([open], :popover-open) {
235
+ --_ex: 0%;
236
+ }
237
+
238
+ @starting-style {
239
+ .x-overlay:where([data-resize="inline-start"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):where([open], :popover-open) {
240
+ --_ex: -100%;
241
+ }
242
+ }
243
+
244
+ .x-overlay:where([data-resize="inline-end"]) {
245
+ --_ex: -100%;
246
+ }
247
+
248
+ .x-overlay:where([data-resize="inline-end"]):where([open], :popover-open) {
249
+ --_ex: 0%;
250
+ }
251
+
252
+ @starting-style {
253
+ .x-overlay:where([data-resize="inline-end"]):where([open], :popover-open) {
254
+ --_ex: -100%;
255
+ }
256
+ }
257
+
258
+ .x-overlay:where([data-resize="inline-end"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
259
+ --_ex: 100%;
260
+ }
261
+
262
+ .x-overlay:where([data-resize="inline-end"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):where([open], :popover-open) {
263
+ --_ex: 0%;
264
+ }
265
+
266
+ @starting-style {
267
+ .x-overlay:where([data-resize="inline-end"]):where(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))):where([open], :popover-open) {
268
+ --_ex: 100%;
269
+ }
270
+ }
271
+
272
+ .x-overlay::backdrop {
273
+ opacity: 0;
274
+ transition-property: opacity, display;
275
+ transition-duration: var(--overlay-duration);
276
+ transition-timing-function: var(--overlay-easing);
277
+ transition-behavior: allow-discrete;
278
+ }
279
+
280
+ .x-overlay:where([open])::backdrop {
281
+ opacity: 1;
282
+ }
283
+
284
+ @starting-style {
285
+ .x-overlay:where([open])::backdrop {
286
+ opacity: 0;
287
+ }
288
+ }
289
+
290
+ @supports (overlay: auto) {
291
+ .x-overlay {
292
+ transition-property: top, left, translate, width, height, opacity, scale, display, overlay;
293
+ }
294
+
295
+ .x-overlay::backdrop {
296
+ transition-property: opacity, display, overlay;
297
+ }
298
+ }
299
+ }
300
+
301
+ @supports selector(:has(*)) {
302
+ [data-overlay-deck] {
303
+ transform-origin: 50% 0;
304
+ transition-property: scale, translate, border-radius;
305
+ transition-duration: var(--overlay-duration, .3s);
306
+ transition-timing-function: var(--overlay-easing, cubic-bezier(.32, .72, 0, 1));
307
+ }
308
+
309
+ :root:has(.x-overlay[data-resize="block-start"][open]) [data-overlay-deck] {
310
+ scale: .96;
311
+ translate: 0 var(--space-2);
312
+ border-radius: var(--radius-4);
313
+ overflow: clip;
314
+ }
315
+ }
316
+
317
+ @media (prefers-reduced-motion: reduce) {
318
+ .x-overlay, .x-overlay::backdrop, [data-overlay-deck] {
319
+ transition: none;
320
+ }
321
+ }
322
+
323
+ @media (forced-colors: active) {
324
+ .x-overlay:where([data-resize]):before {
325
+ background-color: buttontext;
326
+ border-color: buttontext;
327
+ }
328
+
329
+ .x-overlay:where([data-draggable]):after {
330
+ background-color: buttontext;
331
+ }
332
+ }
@@ -1,4 +1,4 @@
1
- import { p as onCleanup } from "../lib-Dkc7cV5F.mjs";
1
+ import { _ as onCleanup } from "../lib-DYypKhxk.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/_observe.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-B7T5hi_D.mjs";
1
+ import { y as Computed } from "../types-ncUK9rki.mjs";
2
2
 
3
3
  //#region src/utilities/active-element.d.ts
4
4
  declare const activeElement: Computed<Element | null>;
@@ -1,4 +1,4 @@
1
- import { o as computed } from "../lib-Dkc7cV5F.mjs";
1
+ import { l as computed } from "../lib-DYypKhxk.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { fromEvent, sync } from "./event-driven.mjs";
4
4
  import { isBrowser } from "./environment.mjs";
@@ -1,7 +1,9 @@
1
- import { b as MaybeReactive } from "../infer-B7T5hi_D.mjs";
1
+ import { D as CLAIM, b as MaybeReactive, j as SEED } from "../types-ncUK9rki.mjs";
2
2
  import { ComputedPromise } from "./promise.mjs";
3
3
 
4
4
  //#region src/utilities/async.d.ts
5
+ /** @internal Hydrate cleanup: execute deferred runs no claim resolved. */
6
+ declare function flushDeferredAsyncRuns(): void;
5
7
  /** Shape of the async function driven by {@link Async} / {@link async}. */
6
8
  type Fn<TInput, TOutput> = (input: TInput) => Promise<TOutput>;
7
9
  /**
@@ -43,6 +45,19 @@ declare class Async<TInput = undefined, TOutput = unknown> {
43
45
  then<TResult1 = TOutput, TResult2 = never>(onfulfilled?: ((value: TOutput | undefined) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
44
46
  catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<TOutput | undefined | TResult>;
45
47
  finally(onfinally?: (() => void) | null): Promise<TOutput | undefined>;
48
+ /**
49
+ * @internal Hydration seeding — delegates to the current operation's
50
+ * `ReactivePromise`. See `ReactivePromise[SEED]`.
51
+ */
52
+ [SEED](value: unknown): void;
53
+ /**
54
+ * @internal Hydrate claim protocol. A server record seeds the state and
55
+ * discards any deferred run — the fetcher never executes. No record means
56
+ * the deferred run executes now.
57
+ */
58
+ [CLAIM](record: {
59
+ value: unknown;
60
+ } | undefined): void;
46
61
  constructor(fn: MaybeReactive<Fn<TInput, TOutput>>);
47
62
  /**
48
63
  * Runs the async function once with the given input, stopping any currently active
@@ -59,6 +74,8 @@ declare class Async<TInput = undefined, TOutput = unknown> {
59
74
  */
60
75
  start(...args: TInput extends undefined ? [] : [input: TInput]): this;
61
76
  }
77
+ /** @internal Cross-instance-safe `Async` detection. */
78
+ declare function isAsyncLike(value: unknown): value is Async<never, unknown>;
62
79
  /**
63
80
  * Create an {@link Async} that is also callable as a signal: invoking it
64
81
  * (with no args) reads the current `result`, so it drops into any reactive
@@ -78,4 +95,4 @@ declare class Async<TInput = undefined, TOutput = unknown> {
78
95
  */
79
96
  declare function async<TInput = any, TOutput = undefined>(fn: MaybeReactive<(input: TInput) => Promise<TOutput>>): Async<TInput, TOutput> & ((...args: any[]) => TOutput | undefined);
80
97
  //#endregion
81
- export { Async, Fn, async };
98
+ export { Async, Fn, async, flushDeferredAsyncRuns, isAsyncLike };
@@ -1,7 +1,14 @@
1
- import { g as untracked, m as signal, s as effect } from "../lib-Dkc7cV5F.mjs";
1
+ import { C as untracked, b as shouldDeferAsyncRuns, f as effectsInert, n as CLAIM, o as SEED, u as effect, x as signal } from "../lib-DYypKhxk.mjs";
2
2
  import { resolve } from "../signals/index.mjs";
3
3
  import { promise } from "./promise.mjs";
4
4
  //#region src/utilities/async.ts
5
+ const deferredRuns = /* @__PURE__ */ new Map();
6
+ /** @internal Hydrate cleanup: execute deferred runs no claim resolved. */
7
+ function flushDeferredAsyncRuns() {
8
+ const runs = [...deferredRuns.values()];
9
+ deferredRuns.clear();
10
+ for (const run of runs) run();
11
+ }
5
12
  /**
6
13
  * Reactive wrapper around an async function. Exposes the current run as
7
14
  * reactive signals (`state`, `value`, `reason`, `result`, `pending`) and
@@ -65,6 +72,28 @@ var Async = class {
65
72
  finally(onfinally) {
66
73
  return this.raw.finally(onfinally);
67
74
  }
75
+ /**
76
+ * @internal Hydration seeding — delegates to the current operation's
77
+ * `ReactivePromise`. See `ReactivePromise[SEED]`.
78
+ */
79
+ [SEED](value) {
80
+ const seed = this.raw[SEED];
81
+ seed?.(value);
82
+ }
83
+ /**
84
+ * @internal Hydrate claim protocol. A server record seeds the state and
85
+ * discards any deferred run — the fetcher never executes. No record means
86
+ * the deferred run executes now.
87
+ */
88
+ [CLAIM](record) {
89
+ const pendingRun = deferredRuns.get(this);
90
+ deferredRuns.delete(this);
91
+ if (record) {
92
+ if (untracked(() => this.state) === "pending") this[SEED](record.value);
93
+ return;
94
+ }
95
+ pendingRun?.();
96
+ }
68
97
  constructor(fn) {
69
98
  this.#fn(resolve(fn));
70
99
  }
@@ -79,6 +108,14 @@ var Async = class {
79
108
  * and register cleanup effects.
80
109
  */
81
110
  run(...args) {
111
+ if (shouldDeferAsyncRuns()) {
112
+ deferredRuns.set(this, () => this.run(...args));
113
+ return this;
114
+ }
115
+ if (effectsInert()) {
116
+ untracked(() => this.#execute(...args));
117
+ return this;
118
+ }
82
119
  this.stop();
83
120
  this.#cleanup = effect(() => {
84
121
  untracked(() => this.#execute(...args));
@@ -107,6 +144,13 @@ var Async = class {
107
144
  return this;
108
145
  }
109
146
  };
147
+ const ASYNC_BRAND = Symbol.for("elements-kit.async");
148
+ Object.defineProperty(Async.prototype, ASYNC_BRAND, { value: true });
149
+ /** @internal Cross-instance-safe `Async` detection. */
150
+ function isAsyncLike(value) {
151
+ if (value instanceof Async) return true;
152
+ return value != null && (typeof value === "object" || typeof value === "function") && value[ASYNC_BRAND] === true;
153
+ }
110
154
  const ASYNC_KEYS = new Set([
111
155
  "then",
112
156
  "catch",
@@ -121,6 +165,9 @@ const ASYNC_KEYS = new Set([
121
165
  "run",
122
166
  "fn",
123
167
  "raw",
168
+ SEED,
169
+ CLAIM,
170
+ ASYNC_BRAND,
124
171
  Symbol.dispose
125
172
  ]);
126
173
  /**
@@ -160,4 +207,4 @@ function async(fn) {
160
207
  });
161
208
  }
162
209
  //#endregion
163
- export { Async, async };
210
+ export { Async, async, flushDeferredAsyncRuns, isAsyncLike };
@@ -1,4 +1,4 @@
1
- import { m as signal, p as onCleanup } from "../lib-Dkc7cV5F.mjs";
1
+ import { _ as onCleanup, x as signal } from "../lib-DYypKhxk.mjs";
2
2
  import "../signals/index.mjs";
3
3
  //#region src/utilities/context.ts
4
4
  const registry = /* @__PURE__ */ new WeakMap();
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-B7T5hi_D.mjs";
1
+ import { y as Computed } from "../types-ncUK9rki.mjs";
2
2
 
3
3
  //#region src/utilities/debounced.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { m as signal, s as effect } from "../lib-Dkc7cV5F.mjs";
1
+ import { u as effect, x as signal } from "../lib-DYypKhxk.mjs";
2
2
  import "../signals/index.mjs";
3
3
  import { createTimeout } from "./timeout.mjs";
4
4
  //#region src/utilities/debounced.ts