mnfst 0.5.192 → 0.5.193
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/README.md +21 -3
- package/lib/manifest.accordion.css +0 -3
- package/lib/manifest.appwrite.auth.js +22 -55
- package/lib/manifest.appwrite.data.js +8 -31
- package/lib/manifest.button.css +7 -5
- package/lib/manifest.chart.css +2 -2
- package/lib/manifest.checkbox.css +2 -3
- package/lib/manifest.code.css +38 -39
- package/lib/manifest.code.min.css +1 -1
- package/lib/manifest.combobox.css +1 -1
- package/lib/manifest.css +304 -422
- package/lib/manifest.d.ts +3 -3
- package/lib/manifest.data.js +79 -219
- package/lib/manifest.datepicker.css +7 -5
- package/lib/manifest.dialog.css +12 -5
- package/lib/manifest.dropdown.css +60 -41
- package/lib/manifest.form.css +3 -3
- package/lib/manifest.input.css +1 -3
- package/lib/manifest.integrity.json +5 -5
- package/lib/manifest.js +8 -26
- package/lib/manifest.min.css +1 -1
- package/lib/manifest.radio.css +2 -0
- package/lib/manifest.range.css +3 -3
- package/lib/manifest.resize.css +131 -133
- package/lib/manifest.sidebar.css +10 -3
- package/lib/manifest.slides.css +10 -11
- package/lib/manifest.switch.css +1 -1
- package/lib/manifest.theme.css +4 -0
- package/lib/manifest.toast.css +1 -1
- package/lib/manifest.tooltip.css +40 -21
- package/lib/manifest.typography.css +0 -2
- package/lib/manifest.utilities.css +0 -1
- package/lib/manifest.utilities.js +2 -7
- package/package.json +1 -1
|
@@ -355,11 +355,13 @@
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
&::before {
|
|
358
|
-
content: "
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
358
|
+
content: "";
|
|
359
|
+
width: 1rem;
|
|
360
|
+
height: 1rem;
|
|
361
|
+
background-color: currentColor;
|
|
362
|
+
mask-repeat: no-repeat;
|
|
363
|
+
mask-size: 100% 100%;
|
|
364
|
+
mask-image: var(--icon-chevron-down, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E"))
|
|
363
365
|
}
|
|
364
366
|
}
|
|
365
367
|
}
|
package/lib/manifest.dialog.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Popover base — single source; the build prepends this to standalone
|
|
2
|
+
popover-dependent stylesheets. The bundle gets it via the reset. */
|
|
2
3
|
|
|
3
4
|
@layer base, components, utilities;
|
|
4
5
|
|
|
@@ -10,20 +11,26 @@
|
|
|
10
11
|
|
|
11
12
|
@keyframes mnfst-popover-in {
|
|
12
13
|
from {
|
|
13
|
-
transform: scale(.9)
|
|
14
|
+
transform: scale(.9)
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
to {
|
|
17
|
-
transform: none
|
|
18
|
+
transform: none
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
:where([popover]):not(.unstyle):popover-open {
|
|
22
23
|
display: flex;
|
|
23
|
-
animation: mnfst-popover-in .15s ease-in both
|
|
24
|
+
animation: mnfst-popover-in .15s ease-in both
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
/* Manifest Dialogs */
|
|
29
|
+
|
|
30
|
+
@layer base, components, utilities;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
27
34
|
@layer components {
|
|
28
35
|
|
|
29
36
|
:where(dialog[popover], .dialog):not(.unstyle) {
|
|
@@ -40,7 +47,7 @@
|
|
|
40
47
|
background-color: var(--color-popover-surface, oklch(98.5% 0 0));
|
|
41
48
|
border: 0 none;
|
|
42
49
|
border-radius: calc(var(--radius, 0.5rem) * 2);
|
|
43
|
-
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
50
|
+
box-shadow: var(--shadow-lg, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1));
|
|
44
51
|
|
|
45
52
|
&::backdrop {
|
|
46
53
|
background-color: rgba(0, 0, 0, 0.2);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Popover base — single source; the build prepends this to standalone
|
|
2
|
+
popover-dependent stylesheets. The bundle gets it via the reset. */
|
|
2
3
|
|
|
3
4
|
@layer base, components, utilities;
|
|
4
5
|
|
|
@@ -8,7 +9,7 @@
|
|
|
8
9
|
|
|
9
10
|
@layer base {
|
|
10
11
|
|
|
11
|
-
@keyframes popover-in {
|
|
12
|
+
@keyframes mnfst-popover-in {
|
|
12
13
|
from {
|
|
13
14
|
transform: scale(.9)
|
|
14
15
|
}
|
|
@@ -20,10 +21,16 @@
|
|
|
20
21
|
|
|
21
22
|
:where([popover]):not(.unstyle):popover-open {
|
|
22
23
|
display: flex;
|
|
23
|
-
animation: popover-in .15s ease-in both
|
|
24
|
+
animation: mnfst-popover-in .15s ease-in both
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
/* Manifest Dropdowns */
|
|
29
|
+
|
|
30
|
+
@layer base, components, utilities;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
27
34
|
@layer components {
|
|
28
35
|
|
|
29
36
|
:where(menu[popover], .dropdown-menu):where(:not(.unstyle)) {
|
|
@@ -164,124 +171,136 @@
|
|
|
164
171
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
165
172
|
}
|
|
166
173
|
|
|
167
|
-
/* Center alignment */
|
|
174
|
+
/* Center alignment (dropdown-only; tooltips have no .center) */
|
|
168
175
|
:where(menu.center) {
|
|
169
176
|
position-area: center
|
|
170
177
|
}
|
|
178
|
+
}
|
|
171
179
|
|
|
172
|
-
|
|
180
|
+
/* Directional alignment lives in styles/snippets/manifest.alignment.css */
|
|
181
|
+
|
|
182
|
+
@layer utilities {
|
|
183
|
+
|
|
184
|
+
/* Touchscreen version — outranks the shared alignment table on specificity */
|
|
185
|
+
@media (pointer: coarse) {
|
|
186
|
+
menu[popover]:not(.unstyle) {
|
|
187
|
+
position: fixed;
|
|
188
|
+
position-area: none;
|
|
189
|
+
top: auto;
|
|
190
|
+
left: 1rem;
|
|
191
|
+
bottom: 1rem;
|
|
192
|
+
width: calc(100% - 2rem);
|
|
193
|
+
margin: 0;
|
|
173
194
|
|
|
174
|
-
|
|
195
|
+
/* Leading icons */
|
|
196
|
+
& :where(li, a, button, label) [x-icon]:first-child:not(:only-child) {
|
|
197
|
+
margin-inline-end: 0.8125rem
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/* Anchored popover alignment — single source shared by dropdowns and tooltips.
|
|
203
|
+
The build appends this to standalone copies and adds it once to the bundle.
|
|
204
|
+
Zero specificity throughout, so the coarse-pointer sheet and author rules
|
|
205
|
+
still win. Dropdown-only variants (.center) stay in manifest.dropdown.css. */
|
|
206
|
+
|
|
207
|
+
@layer base, components, utilities;
|
|
208
|
+
|
|
209
|
+
@layer utilities {
|
|
210
|
+
|
|
211
|
+
/* Top alignment */
|
|
212
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top) {
|
|
175
213
|
position-area: top;
|
|
176
214
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
177
215
|
}
|
|
178
216
|
|
|
179
217
|
/* Bottom alignment */
|
|
180
|
-
:where(menu.bottom) {
|
|
218
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom) {
|
|
181
219
|
position-area: bottom;
|
|
182
220
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
183
221
|
}
|
|
184
222
|
|
|
185
223
|
/* Start alignment */
|
|
186
|
-
:where(menu.start) {
|
|
224
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start) {
|
|
187
225
|
position-area: center start;
|
|
188
226
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
189
227
|
}
|
|
190
228
|
|
|
191
229
|
/* End alignment */
|
|
192
|
-
:where(menu.end) {
|
|
230
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end) {
|
|
193
231
|
position-area: center end;
|
|
194
232
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
195
233
|
}
|
|
196
234
|
|
|
197
235
|
/* Top start alignment */
|
|
198
|
-
:where(menu.top-start) {
|
|
236
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top-start) {
|
|
199
237
|
position-area: start span-end;
|
|
200
238
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
201
239
|
}
|
|
202
240
|
|
|
203
241
|
/* Top end alignment */
|
|
204
|
-
:where(menu.top-end) {
|
|
242
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top-end) {
|
|
205
243
|
position-area: start span-start;
|
|
206
244
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
207
245
|
}
|
|
208
246
|
|
|
209
247
|
/* Bottom start alignment */
|
|
210
|
-
:where(menu.bottom-start) {
|
|
248
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom-start) {
|
|
211
249
|
position-area: end span-end;
|
|
212
250
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
213
251
|
}
|
|
214
252
|
|
|
215
253
|
/* Bottom end alignment */
|
|
216
|
-
:where(menu.bottom-end) {
|
|
254
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom-end) {
|
|
217
255
|
position-area: end span-start;
|
|
218
256
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
219
257
|
}
|
|
220
258
|
|
|
221
259
|
/* Start top alignment */
|
|
222
|
-
:where(menu.start-top) {
|
|
260
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start-top) {
|
|
223
261
|
position-area: span-end start;
|
|
224
262
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
225
263
|
}
|
|
226
264
|
|
|
227
265
|
/* Start bottom alignment */
|
|
228
|
-
:where(menu.start-bottom) {
|
|
266
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start-bottom) {
|
|
229
267
|
position-area: span-start start;
|
|
230
268
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
231
269
|
}
|
|
232
270
|
|
|
233
|
-
|
|
234
271
|
/* End top alignment */
|
|
235
|
-
:where(menu.end-top) {
|
|
272
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end-top) {
|
|
236
273
|
position-area: span-end end;
|
|
237
274
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
238
275
|
}
|
|
239
276
|
|
|
240
277
|
/* End bottom alignment */
|
|
241
|
-
:where(menu.end-bottom) {
|
|
278
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end-bottom) {
|
|
242
279
|
position-area: span-start end;
|
|
243
280
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
244
281
|
}
|
|
245
282
|
|
|
246
283
|
/* Top start corner alignment */
|
|
247
|
-
:where(menu.top-start-corner,
|
|
284
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.top-start-corner, .start-top-corner)) {
|
|
248
285
|
position-area: start start;
|
|
249
286
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
250
287
|
}
|
|
251
288
|
|
|
252
289
|
/* Top end corner alignment */
|
|
253
|
-
:where(menu.top-end-corner,
|
|
290
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.top-end-corner, .end-top-corner)) {
|
|
254
291
|
position-area: start end;
|
|
255
292
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
256
293
|
}
|
|
257
294
|
|
|
258
295
|
/* Bottom start corner alignment */
|
|
259
|
-
:where(menu.bottom-start-corner,
|
|
296
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.bottom-start-corner, .start-bottom-corner)) {
|
|
260
297
|
position-area: end start;
|
|
261
298
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
262
299
|
}
|
|
263
300
|
|
|
264
301
|
/* Bottom end corner alignment */
|
|
265
|
-
:where(menu.bottom-end-corner,
|
|
302
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.bottom-end-corner, .end-bottom-corner)) {
|
|
266
303
|
position-area: end end;
|
|
267
304
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
268
305
|
}
|
|
269
|
-
|
|
270
|
-
/* Touchscreen version */
|
|
271
|
-
@media (pointer: coarse) {
|
|
272
|
-
menu[popover]:not(.unstyle) {
|
|
273
|
-
position: fixed;
|
|
274
|
-
position-area: none;
|
|
275
|
-
top: auto;
|
|
276
|
-
left: 1rem;
|
|
277
|
-
bottom: 1rem;
|
|
278
|
-
width: calc(100% - 2rem);
|
|
279
|
-
margin: 0;
|
|
280
|
-
|
|
281
|
-
/* Leading icons */
|
|
282
|
-
& :where(li, a, button, label) [x-icon]:first-child:not(:only-child) {
|
|
283
|
-
margin-inline-end: 0.8125rem
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
306
|
+
}
|
package/lib/manifest.form.css
CHANGED
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
&>:is(.selected, [aria-selected=true], [aria-current]) {
|
|
87
87
|
color: var(--color-field-inverse, oklch(20.5% 0 0));
|
|
88
88
|
background-color: var(--color-field-surface, oklch(87% 0 0));
|
|
89
|
-
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)
|
|
89
|
+
box-shadow: var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1))
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/* Background slider for selected tab) */
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
height: anchor-size(height);
|
|
112
112
|
background-color: var(--color-page, oklch(98.5% 0 0));
|
|
113
113
|
border-radius: max(calc(var(--radius, 0.5rem) - var(--spacing, 0.25rem) / 2), 0px);
|
|
114
|
-
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
114
|
+
box-shadow: var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1));
|
|
115
115
|
transition: var(--tab-slide-transition, all 0.15s ease-in-out)
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
height: calc(var(--spacing-field-height, 2.5rem) / 2);
|
|
267
267
|
padding: 0;
|
|
268
268
|
border-radius: var(--spacing-field-height, 2.5rem);
|
|
269
|
-
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
269
|
+
box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
|
|
270
270
|
opacity: 0;
|
|
271
271
|
transition: var(--transition);
|
|
272
272
|
|
package/lib/manifest.input.css
CHANGED
|
@@ -216,9 +216,7 @@
|
|
|
216
216
|
/* Hide search input cancel button */
|
|
217
217
|
:where(input[type=search]):not(.unstyle)::-webkit-search-cancel-button {
|
|
218
218
|
appearance: none;
|
|
219
|
-
-webkit-appearance: none
|
|
220
|
-
-moz-appearance: none;
|
|
221
|
-
appearance: none
|
|
219
|
+
-webkit-appearance: none
|
|
222
220
|
}
|
|
223
221
|
|
|
224
222
|
/* Textarea-specific styles */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"manifest.appwrite.auth.js": "sha384-
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
2
|
+
"manifest.appwrite.auth.js": "sha384-lWvffK6C2Zs9dOiMh/0OQTnU2ycZq1USOeJDlPUgJsbtrdA9+3zq4VHcIdS40qR0",
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-cfiPqikpRrY3hJkSUIKese6/jJAW67EMm/RX4w3332onpNUyZn6zkWcxJm/wquUf",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-JyVDWFT69b7Svq8J8p9tNWe2v9PZNQBY5UyhtOl1vnuHFAX0CRQ3MA9SiKq5wzNh",
|
|
5
5
|
"manifest.charts.js": "sha384-qQrjhWkIDi4oU5uQrpy8DdlMjY+gfiivBuX6mssNiFdkawgkVBvKneGgp+nd3PYJ",
|
|
6
6
|
"manifest.chat.js": "sha384-nuBOsWFOlVYfCl1K1SvuAb8mFFOCeUeSZXOZpCry97JjR8N7B8bxA30meRLn61sK",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"manifest.colorpicker.js": "sha384-ULdxH2/83Ly3E9DOX53TQqyy4WjSbfqLIBGVLEEFpYhwMP/cFrWujz83sWVzzsyt",
|
|
10
10
|
"manifest.combobox.js": "sha384-rCSqpwzVLwr6alHPmAgW5sEVJylfK3XReyG475O1N9dkyMy/XA8hBCYILc+4qblU",
|
|
11
11
|
"manifest.components.js": "sha384-HEyeJtV20k7po8WH0LEj800MlsqgDH0vE5GTAl62SgdEhn1aJ7VfryQcA6yIi18U",
|
|
12
|
-
"manifest.data.js": "sha384-
|
|
12
|
+
"manifest.data.js": "sha384-R9ksZFTOKVo+S7rs5yBos+05AXyGuP6qYuHX7aZg6bjQLDjVtqdmIqI7udg5sk+6",
|
|
13
13
|
"manifest.datepicker.js": "sha384-52BBZdlLN+EATiUorwTEQOWGJZiSNu0voy9q+WQxxWpUeYsGGkuS0QPPXGx2akxG",
|
|
14
14
|
"manifest.dropdowns.js": "sha384-qCuHCZBSOqkbomxfeUdkdMuAOhL6lFGrBx6yLB9HcHO/Bhj/a3Hzxd8IRM+/ftR6",
|
|
15
15
|
"manifest.export.js": "sha384-HCy3n6ifrcAGIyzTRgZ5JIRvSX9q9/8ykMKRSbt1QTnhXz6PgYlV0AE2N2Yi2re+",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"manifest.toasts.js": "sha384-/OV32LLMJl0Iw8NoNQJ+5lgntLxjIJq/YNj5JAKS/+nUhVx4MMB9h1FOqP7zuj2M",
|
|
29
29
|
"manifest.tooltips.js": "sha384-uXVVQADl6pY2Pj9i/UaSclZN7dzbKhLkmevv7Ad0+wXR8LgqodALNFrc5jZJjlwm",
|
|
30
30
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
31
|
-
"manifest.utilities.js": "sha384-
|
|
31
|
+
"manifest.utilities.js": "sha384-YcGKTEviTv9FLkw890CTociA7Rjp6xuhLyfpn3Gk4mT0fexDFqpW7VSuohcpGfsw",
|
|
32
32
|
"manifest.virtual.js": "sha384-OPHiW1zQxunoL+yJrCxFU3AzTfTlZQfUf6X3XSRrSyNDPlr3BvsYe6vZa0DlOjoY",
|
|
33
|
-
"manifest.js": "sha384-
|
|
33
|
+
"manifest.js": "sha384-iXParMKFG68GY2HK9KsN+WvpD9yKJvjmLTt2kTS110lhmNGEbxpsr1Ed/1vbcJ4I"
|
|
34
34
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -10,18 +10,10 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
|
-
* Hydration contract runtime
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* of each element needing hydration. Runs once BEFORE any plugin or Alpine
|
|
18
|
-
* so every downstream plugin sees the authored DOM, as in a live SPA — no
|
|
19
|
-
* plugin needs a "prerender mode" branch.
|
|
20
|
-
*
|
|
21
|
-
* - Attributes are set via a temp-div HTML parse, not setAttribute, which
|
|
22
|
-
* throws on Alpine special names like `@click`; the parser accepts them.
|
|
23
|
-
* - The contract is a compact diff: `attrs` maps name -> source value, or
|
|
24
|
-
* null to remove; only values that drifted during prerender appear.
|
|
13
|
+
* Hydration contract runtime: prerendered MPA pages carry a `#__manifest_hydrate__`
|
|
14
|
+
* diff of source-authored attributes (and data-hydrate innerHTML). Applied once
|
|
15
|
+
* BEFORE any plugin or Alpine so downstream code sees the authored DOM, as in a
|
|
16
|
+
* live SPA. Attributes go through an HTML parse — setAttribute throws on `@click`.
|
|
25
17
|
*/
|
|
26
18
|
function hydratePrerenderedPage() {
|
|
27
19
|
if (typeof document === 'undefined' || !document.querySelector) return;
|
|
@@ -128,20 +120,10 @@
|
|
|
128
120
|
}
|
|
129
121
|
|
|
130
122
|
/*
|
|
131
|
-
* Reconcile baked x-for/x-if clones
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* baked element so Alpine treats the condition as already-rendered and
|
|
136
|
-
* leaves it in place — avoids tearing down heavy content (e.g. an
|
|
137
|
-
* x-markdown article) only to re-render identical output. A real
|
|
138
|
-
* route/condition change later still re-renders normally.
|
|
139
|
-
* - x-for clones are REMOVED: lists are light and re-render from the live
|
|
140
|
-
* template, so the baked copies are dropped to avoid a duplicate.
|
|
141
|
-
*
|
|
142
|
-
* Runs on `alpine:init` (after Alpine's script, before it walks the DOM),
|
|
143
|
-
* not in hydratePrerenderedPage: if Alpine never arrives the page keeps its
|
|
144
|
-
* complete baked content.
|
|
123
|
+
* Reconcile baked x-for/x-if clones kept for crawlers — their <template> is still
|
|
124
|
+
* live, so Alpine would render duplicates. x-if clones are adopted via
|
|
125
|
+
* `_x_currentIfEl` (avoids re-rendering heavy content); x-for clones are removed.
|
|
126
|
+
* Runs on alpine:init so a page without Alpine keeps its baked content.
|
|
145
127
|
*/
|
|
146
128
|
function reconcilePrerenderClones() {
|
|
147
129
|
if (typeof document === 'undefined' || !document.querySelectorAll) return;
|