mnfst 0.5.192 → 0.5.194
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.colorpicker.css +25 -0
- package/lib/manifest.combobox.css +1 -1
- package/lib/manifest.css +317 -424
- package/lib/manifest.d.ts +3 -3
- package/lib/manifest.data.js +79 -219
- package/lib/manifest.datepicker.css +32 -5
- package/lib/manifest.dialog.css +9 -4
- package/lib/manifest.dropdown.css +57 -40
- 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 +7 -2
- 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 +30 -38
- package/lib/manifest.typography.css +0 -2
- package/lib/manifest.utilities.css +0 -1
- package/lib/manifest.utilities.js +2 -7
- package/package.json +6 -4
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
@layer base, components, utilities;
|
|
4
4
|
|
|
5
|
+
/* mnfst:popover-base:start — self-contained so this stylesheet works on
|
|
6
|
+
its own; the build strips it from manifest.css. Edit styles/snippets/manifest.popover.css. */
|
|
7
|
+
[popover]:not(.unstyle):not(:popover-open) {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@layer base {
|
|
12
|
+
|
|
13
|
+
@keyframes mnfst-popover-in {
|
|
14
|
+
from {
|
|
15
|
+
transform: scale(.9)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
to {
|
|
19
|
+
transform: none
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([popover]):not(.unstyle):popover-open {
|
|
24
|
+
display: flex;
|
|
25
|
+
animation: mnfst-popover-in .15s ease-in both
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/* mnfst:popover-base:end */
|
|
29
|
+
|
|
5
30
|
@layer utilities {
|
|
6
31
|
|
|
7
32
|
/* Picker container only (not trigger input/button) */
|
|
@@ -355,11 +380,13 @@
|
|
|
355
380
|
}
|
|
356
381
|
|
|
357
382
|
&::before {
|
|
358
|
-
content: "
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
383
|
+
content: "";
|
|
384
|
+
width: 1rem;
|
|
385
|
+
height: 1rem;
|
|
386
|
+
background-color: currentColor;
|
|
387
|
+
mask-repeat: no-repeat;
|
|
388
|
+
mask-size: 100% 100%;
|
|
389
|
+
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
390
|
}
|
|
364
391
|
}
|
|
365
392
|
}
|
package/lib/manifest.dialog.css
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
@layer base, components, utilities;
|
|
4
4
|
|
|
5
|
+
/* mnfst:popover-base:start — self-contained so this stylesheet works on
|
|
6
|
+
its own; the build strips it from manifest.css. Edit styles/snippets/manifest.popover.css. */
|
|
5
7
|
[popover]:not(.unstyle):not(:popover-open) {
|
|
6
8
|
display: none;
|
|
7
9
|
}
|
|
@@ -10,19 +12,22 @@
|
|
|
10
12
|
|
|
11
13
|
@keyframes mnfst-popover-in {
|
|
12
14
|
from {
|
|
13
|
-
transform: scale(.9)
|
|
15
|
+
transform: scale(.9)
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
to {
|
|
17
|
-
transform: none
|
|
19
|
+
transform: none
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
:where([popover]):not(.unstyle):popover-open {
|
|
22
24
|
display: flex;
|
|
23
|
-
animation: mnfst-popover-in .15s ease-in both
|
|
25
|
+
animation: mnfst-popover-in .15s ease-in both
|
|
24
26
|
}
|
|
25
27
|
}
|
|
28
|
+
/* mnfst:popover-base:end */
|
|
29
|
+
|
|
30
|
+
|
|
26
31
|
|
|
27
32
|
@layer components {
|
|
28
33
|
|
|
@@ -40,7 +45,7 @@
|
|
|
40
45
|
background-color: var(--color-popover-surface, oklch(98.5% 0 0));
|
|
41
46
|
border: 0 none;
|
|
42
47
|
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);
|
|
48
|
+
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
49
|
|
|
45
50
|
&::backdrop {
|
|
46
51
|
background-color: rgba(0, 0, 0, 0.2);
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
@layer base, components, utilities;
|
|
4
4
|
|
|
5
|
+
/* mnfst:popover-base:start — self-contained so this stylesheet works on
|
|
6
|
+
its own; the build strips it from manifest.css. Edit styles/snippets/manifest.popover.css. */
|
|
5
7
|
[popover]:not(.unstyle):not(:popover-open) {
|
|
6
8
|
display: none;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
@layer base {
|
|
10
12
|
|
|
11
|
-
@keyframes popover-in {
|
|
13
|
+
@keyframes mnfst-popover-in {
|
|
12
14
|
from {
|
|
13
15
|
transform: scale(.9)
|
|
14
16
|
}
|
|
@@ -20,9 +22,12 @@
|
|
|
20
22
|
|
|
21
23
|
:where([popover]):not(.unstyle):popover-open {
|
|
22
24
|
display: flex;
|
|
23
|
-
animation: popover-in .15s ease-in both
|
|
25
|
+
animation: mnfst-popover-in .15s ease-in both
|
|
24
26
|
}
|
|
25
27
|
}
|
|
28
|
+
/* mnfst:popover-base:end */
|
|
29
|
+
|
|
30
|
+
|
|
26
31
|
|
|
27
32
|
@layer components {
|
|
28
33
|
|
|
@@ -164,124 +169,136 @@
|
|
|
164
169
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
165
170
|
}
|
|
166
171
|
|
|
167
|
-
/* Center alignment */
|
|
172
|
+
/* Center alignment (dropdown-only; tooltips have no .center) */
|
|
168
173
|
:where(menu.center) {
|
|
169
174
|
position-area: center
|
|
170
175
|
}
|
|
176
|
+
}
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
/* Directional alignment lives in styles/snippets/manifest.alignment.css */
|
|
179
|
+
|
|
180
|
+
@layer utilities {
|
|
181
|
+
|
|
182
|
+
/* Touchscreen version — outranks the shared alignment table on specificity */
|
|
183
|
+
@media (pointer: coarse) {
|
|
184
|
+
menu[popover]:not(.unstyle) {
|
|
185
|
+
position: fixed;
|
|
186
|
+
position-area: none;
|
|
187
|
+
top: auto;
|
|
188
|
+
left: 1rem;
|
|
189
|
+
bottom: 1rem;
|
|
190
|
+
width: calc(100% - 2rem);
|
|
191
|
+
margin: 0;
|
|
192
|
+
|
|
193
|
+
/* Leading icons */
|
|
194
|
+
& :where(li, a, button, label) [x-icon]:first-child:not(:only-child) {
|
|
195
|
+
margin-inline-end: 0.8125rem
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/* Anchored popover alignment — single source shared by dropdowns and tooltips.
|
|
201
|
+
The build appends this to standalone copies and adds it once to the bundle.
|
|
202
|
+
Zero specificity throughout, so the coarse-pointer sheet and author rules
|
|
203
|
+
still win. Dropdown-only variants (.center) stay in manifest.dropdown.css. */
|
|
173
204
|
|
|
174
|
-
|
|
205
|
+
@layer base, components, utilities;
|
|
206
|
+
|
|
207
|
+
@layer utilities {
|
|
208
|
+
|
|
209
|
+
/* Top alignment */
|
|
210
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top) {
|
|
175
211
|
position-area: top;
|
|
176
212
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
177
213
|
}
|
|
178
214
|
|
|
179
215
|
/* Bottom alignment */
|
|
180
|
-
:where(menu.bottom) {
|
|
216
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom) {
|
|
181
217
|
position-area: bottom;
|
|
182
218
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
183
219
|
}
|
|
184
220
|
|
|
185
221
|
/* Start alignment */
|
|
186
|
-
:where(menu.start) {
|
|
222
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start) {
|
|
187
223
|
position-area: center start;
|
|
188
224
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
189
225
|
}
|
|
190
226
|
|
|
191
227
|
/* End alignment */
|
|
192
|
-
:where(menu.end) {
|
|
228
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end) {
|
|
193
229
|
position-area: center end;
|
|
194
230
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
195
231
|
}
|
|
196
232
|
|
|
197
233
|
/* Top start alignment */
|
|
198
|
-
:where(menu.top-start) {
|
|
234
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top-start) {
|
|
199
235
|
position-area: start span-end;
|
|
200
236
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
201
237
|
}
|
|
202
238
|
|
|
203
239
|
/* Top end alignment */
|
|
204
|
-
:where(menu.top-end) {
|
|
240
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).top-end) {
|
|
205
241
|
position-area: start span-start;
|
|
206
242
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
207
243
|
}
|
|
208
244
|
|
|
209
245
|
/* Bottom start alignment */
|
|
210
|
-
:where(menu.bottom-start) {
|
|
246
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom-start) {
|
|
211
247
|
position-area: end span-end;
|
|
212
248
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
213
249
|
}
|
|
214
250
|
|
|
215
251
|
/* Bottom end alignment */
|
|
216
|
-
:where(menu.bottom-end) {
|
|
252
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).bottom-end) {
|
|
217
253
|
position-area: end span-start;
|
|
218
254
|
margin: var(--spacing-popover-offset, 0.5rem) 0
|
|
219
255
|
}
|
|
220
256
|
|
|
221
257
|
/* Start top alignment */
|
|
222
|
-
:where(menu.start-top) {
|
|
258
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start-top) {
|
|
223
259
|
position-area: span-end start;
|
|
224
260
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
225
261
|
}
|
|
226
262
|
|
|
227
263
|
/* Start bottom alignment */
|
|
228
|
-
:where(menu.start-bottom) {
|
|
264
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).start-bottom) {
|
|
229
265
|
position-area: span-start start;
|
|
230
266
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
231
267
|
}
|
|
232
268
|
|
|
233
|
-
|
|
234
269
|
/* End top alignment */
|
|
235
|
-
:where(menu.end-top) {
|
|
270
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end-top) {
|
|
236
271
|
position-area: span-end end;
|
|
237
272
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
238
273
|
}
|
|
239
274
|
|
|
240
275
|
/* End bottom alignment */
|
|
241
|
-
:where(menu.end-bottom) {
|
|
276
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip).end-bottom) {
|
|
242
277
|
position-area: span-start end;
|
|
243
278
|
margin: 0 var(--spacing-popover-offset, 0.5rem)
|
|
244
279
|
}
|
|
245
280
|
|
|
246
281
|
/* Top start corner alignment */
|
|
247
|
-
:where(menu.top-start-corner,
|
|
282
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.top-start-corner, .start-top-corner)) {
|
|
248
283
|
position-area: start start;
|
|
249
284
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
250
285
|
}
|
|
251
286
|
|
|
252
287
|
/* Top end corner alignment */
|
|
253
|
-
:where(menu.top-end-corner,
|
|
288
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.top-end-corner, .end-top-corner)) {
|
|
254
289
|
position-area: start end;
|
|
255
290
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
256
291
|
}
|
|
257
292
|
|
|
258
293
|
/* Bottom start corner alignment */
|
|
259
|
-
:where(menu.bottom-start-corner,
|
|
294
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.bottom-start-corner, .start-bottom-corner)) {
|
|
260
295
|
position-area: end start;
|
|
261
296
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
262
297
|
}
|
|
263
298
|
|
|
264
299
|
/* Bottom end corner alignment */
|
|
265
|
-
:where(menu.bottom-end-corner,
|
|
300
|
+
:where(:is(menu[popover], .dropdown-menu, .tooltip):is(.bottom-end-corner, .end-bottom-corner)) {
|
|
266
301
|
position-area: end end;
|
|
267
302
|
margin: var(--spacing-popover-offset, 0.5rem)
|
|
268
303
|
}
|
|
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
|
-
}
|
|
304
|
+
}
|
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;
|