svelte 5.48.4 → 5.49.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.
- package/compiler/index.js +1 -1
- package/elements.d.ts +1 -1
- package/package.json +1 -1
- package/src/compiler/errors.js +4 -4
- package/src/compiler/phases/1-parse/read/options.js +6 -4
- package/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js +4 -0
- package/src/compiler/phases/3-transform/client/transform-client.js +11 -2
- package/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js +4 -1
- package/src/compiler/phases/scope.js +8 -0
- package/src/internal/client/dev/assign.js +2 -1
- package/src/internal/client/dom/blocks/boundary.js +12 -16
- package/src/internal/client/dom/blocks/each.js +18 -6
- package/src/internal/client/dom/elements/custom-element.js +13 -8
- package/src/internal/client/dom/elements/transitions.js +4 -5
- package/src/internal/client/reactivity/batch.js +31 -0
- package/src/internal/client/runtime.js +15 -3
- package/src/internal/server/context.js +11 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +22 -1
- package/types/index.d.ts.map +1 -1
package/elements.d.ts
CHANGED
package/package.json
CHANGED
package/src/compiler/errors.js
CHANGED
|
@@ -1550,12 +1550,12 @@ export function svelte_options_invalid_attribute_value(node, list) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
1552
1552
|
/**
|
|
1553
|
-
* "customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none"
|
|
1553
|
+
* "customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }
|
|
1554
1554
|
* @param {null | number | NodeLike} node
|
|
1555
1555
|
* @returns {never}
|
|
1556
1556
|
*/
|
|
1557
1557
|
export function svelte_options_invalid_customelement(node) {
|
|
1558
|
-
e(node, 'svelte_options_invalid_customelement', `"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none"
|
|
1558
|
+
e(node, 'svelte_options_invalid_customelement', `"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | \`ShadowRootInit\`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }\nhttps://svelte.dev/e/svelte_options_invalid_customelement`);
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
1561
1561
|
/**
|
|
@@ -1568,12 +1568,12 @@ export function svelte_options_invalid_customelement_props(node) {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
1570
|
/**
|
|
1571
|
-
* "shadow" must be either "open"
|
|
1571
|
+
* "shadow" must be either "open", "none" or `ShadowRootInit` object.
|
|
1572
1572
|
* @param {null | number | NodeLike} node
|
|
1573
1573
|
* @returns {never}
|
|
1574
1574
|
*/
|
|
1575
1575
|
export function svelte_options_invalid_customelement_shadow(node) {
|
|
1576
|
-
e(node, 'svelte_options_invalid_customelement_shadow', `"shadow" must be either "open"
|
|
1576
|
+
e(node, 'svelte_options_invalid_customelement_shadow', `"shadow" must be either "open", "none" or \`ShadowRootInit\` object.\nhttps://svelte.dev/e/svelte_options_invalid_customelement_shadow`);
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
1579
|
/**
|
|
@@ -133,11 +133,13 @@ export default function read_options(node) {
|
|
|
133
133
|
|
|
134
134
|
const shadow = properties.find(([name]) => name === 'shadow')?.[1];
|
|
135
135
|
if (shadow) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
if (shadow.type === 'Literal' && (shadow.value === 'open' || shadow.value === 'none')) {
|
|
137
|
+
ce.shadow = shadow.value;
|
|
138
|
+
} else if (shadow.type === 'ObjectExpression') {
|
|
139
|
+
ce.shadow = shadow;
|
|
140
|
+
} else {
|
|
141
|
+
e.svelte_options_invalid_customelement_shadow(attribute);
|
|
139
142
|
}
|
|
140
|
-
ce.shadow = shadowdom;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
const extend = properties.find(([name]) => name === 'extend')?.[1];
|
|
@@ -824,6 +824,10 @@ function has_content(element) {
|
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
if (node.type === 'RegularElement' || node.type === 'SvelteElement') {
|
|
827
|
+
if (node.attributes.some((a) => a.type === 'Attribute' && a.name === 'popover')) {
|
|
828
|
+
continue;
|
|
829
|
+
}
|
|
830
|
+
|
|
827
831
|
if (
|
|
828
832
|
node.name === 'img' &&
|
|
829
833
|
node.attributes.some((node) => node.type === 'Attribute' && node.name === 'alt')
|
|
@@ -638,7 +638,16 @@ export function client_component(analysis, options) {
|
|
|
638
638
|
const accessors_str = b.array(
|
|
639
639
|
analysis.exports.map(({ name, alias }) => b.literal(alias ?? name))
|
|
640
640
|
);
|
|
641
|
-
|
|
641
|
+
|
|
642
|
+
/** @type {ESTree.ObjectExpression | undefined} */
|
|
643
|
+
let shadow_root_init;
|
|
644
|
+
if (typeof ce === 'boolean' || ce.shadow === 'open' || ce.shadow === undefined) {
|
|
645
|
+
shadow_root_init = b.object([b.init('mode', b.literal('open'))]);
|
|
646
|
+
} else if (ce.shadow === 'none') {
|
|
647
|
+
shadow_root_init = undefined;
|
|
648
|
+
} else {
|
|
649
|
+
shadow_root_init = ce.shadow;
|
|
650
|
+
}
|
|
642
651
|
|
|
643
652
|
const create_ce = b.call(
|
|
644
653
|
'$.create_custom_element',
|
|
@@ -646,7 +655,7 @@ export function client_component(analysis, options) {
|
|
|
646
655
|
b.object(props_str),
|
|
647
656
|
slots_str,
|
|
648
657
|
accessors_str,
|
|
649
|
-
|
|
658
|
+
shadow_root_init,
|
|
650
659
|
/** @type {any} */ (typeof ce !== 'boolean' ? ce.extend : undefined)
|
|
651
660
|
);
|
|
652
661
|
|
|
@@ -162,7 +162,10 @@ function build_assignment(operator, left, right, context) {
|
|
|
162
162
|
// will be pushed to. we do this by transforming it to something like
|
|
163
163
|
// `$.assign_nullish(object, 'items', [])`
|
|
164
164
|
let should_transform =
|
|
165
|
-
dev &&
|
|
165
|
+
dev &&
|
|
166
|
+
path.at(-1) !== 'ExpressionStatement' &&
|
|
167
|
+
is_non_coercive_operator(operator) &&
|
|
168
|
+
!context.state.scope.evaluate(right).is_primitive;
|
|
166
169
|
|
|
167
170
|
// special case — ignore `onclick={() => (...)}`
|
|
168
171
|
if (
|
|
@@ -228,6 +228,13 @@ class Evaluation {
|
|
|
228
228
|
*/
|
|
229
229
|
is_number = true;
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* True if the value is known to be a primitive
|
|
233
|
+
* @readonly
|
|
234
|
+
* @type {boolean}
|
|
235
|
+
*/
|
|
236
|
+
is_primitive = true;
|
|
237
|
+
|
|
231
238
|
/**
|
|
232
239
|
* True if the value is known to be a function
|
|
233
240
|
* @readonly
|
|
@@ -577,6 +584,7 @@ class Evaluation {
|
|
|
577
584
|
|
|
578
585
|
if (value === UNKNOWN) {
|
|
579
586
|
this.has_unknown = true;
|
|
587
|
+
this.is_primitive = false;
|
|
580
588
|
}
|
|
581
589
|
}
|
|
582
590
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { STATE_SYMBOL } from '#client/constants';
|
|
1
2
|
import { sanitize_location } from '../../../utils.js';
|
|
2
3
|
import { untrack } from '../runtime.js';
|
|
3
4
|
import * as w from '../warnings.js';
|
|
@@ -10,7 +11,7 @@ import * as w from '../warnings.js';
|
|
|
10
11
|
* @param {string} location
|
|
11
12
|
*/
|
|
12
13
|
function compare(a, b, property, location) {
|
|
13
|
-
if (a !== b) {
|
|
14
|
+
if (a !== b && typeof b === 'object' && STATE_SYMBOL in b) {
|
|
14
15
|
w.assignment_value_stale(property, /** @type {string} */ (sanitize_location(location)));
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
2
2
|
import {
|
|
3
|
+
BLOCK_EFFECT,
|
|
3
4
|
BOUNDARY_EFFECT,
|
|
4
5
|
COMMENT_NODE,
|
|
5
6
|
DIRTY,
|
|
@@ -449,21 +450,16 @@ export class Boundary {
|
|
|
449
450
|
}
|
|
450
451
|
};
|
|
451
452
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
invoke_error_boundary(error, this.#effect && this.#effect.parent);
|
|
461
|
-
} finally {
|
|
462
|
-
set_active_reaction(previous_reaction);
|
|
463
|
-
}
|
|
453
|
+
queue_micro_task(() => {
|
|
454
|
+
try {
|
|
455
|
+
calling_on_error = true;
|
|
456
|
+
onerror?.(error, reset);
|
|
457
|
+
calling_on_error = false;
|
|
458
|
+
} catch (error) {
|
|
459
|
+
invoke_error_boundary(error, this.#effect && this.#effect.parent);
|
|
460
|
+
}
|
|
464
461
|
|
|
465
|
-
|
|
466
|
-
queue_micro_task(() => {
|
|
462
|
+
if (failed) {
|
|
467
463
|
this.#failed_effect = this.#run(() => {
|
|
468
464
|
Batch.ensure();
|
|
469
465
|
this.#is_creating_fallback = true;
|
|
@@ -483,8 +479,8 @@ export class Boundary {
|
|
|
483
479
|
this.#is_creating_fallback = false;
|
|
484
480
|
}
|
|
485
481
|
});
|
|
486
|
-
}
|
|
487
|
-
}
|
|
482
|
+
}
|
|
483
|
+
});
|
|
488
484
|
}
|
|
489
485
|
}
|
|
490
486
|
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from '../../reactivity/effects.js';
|
|
35
35
|
import { source, mutable_source, internal_set } from '../../reactivity/sources.js';
|
|
36
36
|
import { array_from, is_array } from '../../../shared/utils.js';
|
|
37
|
-
import { COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';
|
|
37
|
+
import { BRANCH_EFFECT, COMMENT_NODE, EFFECT_OFFSCREEN, INERT } from '#client/constants';
|
|
38
38
|
import { queue_micro_task } from '../task.js';
|
|
39
39
|
import { get } from '../../runtime.js';
|
|
40
40
|
import { DEV } from 'esm-env';
|
|
@@ -336,6 +336,18 @@ export function each(node, flags, get_collection, get_key, render_fn, fallback_f
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
/**
|
|
340
|
+
* Skip past any non-branch effects (which could be created with `createSubscriber`, for example) to find the next branch effect
|
|
341
|
+
* @param {Effect | null} effect
|
|
342
|
+
* @returns {Effect | null}
|
|
343
|
+
*/
|
|
344
|
+
function skip_to_branch(effect) {
|
|
345
|
+
while (effect !== null && (effect.f & BRANCH_EFFECT) === 0) {
|
|
346
|
+
effect = effect.next;
|
|
347
|
+
}
|
|
348
|
+
return effect;
|
|
349
|
+
}
|
|
350
|
+
|
|
339
351
|
/**
|
|
340
352
|
* Add, remove, or reorder items output by an each block as its input changes
|
|
341
353
|
* @template V
|
|
@@ -351,7 +363,7 @@ function reconcile(state, array, anchor, flags, get_key) {
|
|
|
351
363
|
|
|
352
364
|
var length = array.length;
|
|
353
365
|
var items = state.items;
|
|
354
|
-
var current = state.effect.first;
|
|
366
|
+
var current = skip_to_branch(state.effect.first);
|
|
355
367
|
|
|
356
368
|
/** @type {undefined | Set<Effect>} */
|
|
357
369
|
var seen;
|
|
@@ -431,7 +443,7 @@ function reconcile(state, array, anchor, flags, get_key) {
|
|
|
431
443
|
matched = [];
|
|
432
444
|
stashed = [];
|
|
433
445
|
|
|
434
|
-
current = prev.next;
|
|
446
|
+
current = skip_to_branch(prev.next);
|
|
435
447
|
continue;
|
|
436
448
|
}
|
|
437
449
|
}
|
|
@@ -495,7 +507,7 @@ function reconcile(state, array, anchor, flags, get_key) {
|
|
|
495
507
|
while (current !== null && current !== effect) {
|
|
496
508
|
(seen ??= new Set()).add(current);
|
|
497
509
|
stashed.push(current);
|
|
498
|
-
current = current.next;
|
|
510
|
+
current = skip_to_branch(current.next);
|
|
499
511
|
}
|
|
500
512
|
|
|
501
513
|
if (current === null) {
|
|
@@ -508,7 +520,7 @@ function reconcile(state, array, anchor, flags, get_key) {
|
|
|
508
520
|
}
|
|
509
521
|
|
|
510
522
|
prev = effect;
|
|
511
|
-
current = effect.next;
|
|
523
|
+
current = skip_to_branch(effect.next);
|
|
512
524
|
}
|
|
513
525
|
|
|
514
526
|
if (state.outrogroups !== null) {
|
|
@@ -542,7 +554,7 @@ function reconcile(state, array, anchor, flags, get_key) {
|
|
|
542
554
|
to_destroy.push(current);
|
|
543
555
|
}
|
|
544
556
|
|
|
545
|
-
current = current.next;
|
|
557
|
+
current = skip_to_branch(current.next);
|
|
546
558
|
}
|
|
547
559
|
|
|
548
560
|
var destroy_length = to_destroy.length;
|
|
@@ -35,18 +35,23 @@ if (typeof HTMLElement === 'function') {
|
|
|
35
35
|
$$l_u = new Map();
|
|
36
36
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
37
37
|
$$me;
|
|
38
|
+
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
39
|
+
$$shadowRoot = null;
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* @param {*} $$componentCtor
|
|
41
43
|
* @param {*} $$slots
|
|
42
|
-
* @param {
|
|
44
|
+
* @param {ShadowRootInit | undefined} shadow_root_init
|
|
43
45
|
*/
|
|
44
|
-
constructor($$componentCtor, $$slots,
|
|
46
|
+
constructor($$componentCtor, $$slots, shadow_root_init) {
|
|
45
47
|
super();
|
|
46
48
|
this.$$ctor = $$componentCtor;
|
|
47
49
|
this.$$s = $$slots;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
|
|
51
|
+
if (shadow_root_init) {
|
|
52
|
+
// We need to store the reference to shadow root, because `closed` shadow root cannot be
|
|
53
|
+
// accessed with `this.shadowRoot`.
|
|
54
|
+
this.$$shadowRoot = this.attachShadow(shadow_root_init);
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
|
|
@@ -136,7 +141,7 @@ if (typeof HTMLElement === 'function') {
|
|
|
136
141
|
}
|
|
137
142
|
this.$$c = createClassComponent({
|
|
138
143
|
component: this.$$ctor,
|
|
139
|
-
target: this
|
|
144
|
+
target: this.$$shadowRoot || this,
|
|
140
145
|
props: {
|
|
141
146
|
...this.$$d,
|
|
142
147
|
$$slots,
|
|
@@ -277,7 +282,7 @@ function get_custom_elements_slots(element) {
|
|
|
277
282
|
* @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe
|
|
278
283
|
* @param {string[]} slots The slots to create
|
|
279
284
|
* @param {string[]} exports Explicitly exported values, other than props
|
|
280
|
-
* @param {
|
|
285
|
+
* @param {ShadowRootInit | undefined} shadow_root_init Options passed to shadow DOM constructor
|
|
281
286
|
* @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]
|
|
282
287
|
*/
|
|
283
288
|
export function create_custom_element(
|
|
@@ -285,12 +290,12 @@ export function create_custom_element(
|
|
|
285
290
|
props_definition,
|
|
286
291
|
slots,
|
|
287
292
|
exports,
|
|
288
|
-
|
|
293
|
+
shadow_root_init,
|
|
289
294
|
extend
|
|
290
295
|
) {
|
|
291
296
|
let Class = class extends SvelteElement {
|
|
292
297
|
constructor() {
|
|
293
|
-
super(Component, slots,
|
|
298
|
+
super(Component, slots, shadow_root_init);
|
|
294
299
|
this.$$p_d = props_definition;
|
|
295
300
|
}
|
|
296
301
|
static get observedAttributes() {
|
|
@@ -239,8 +239,6 @@ export function transition(flags, element, get_fn, get_params) {
|
|
|
239
239
|
intro?.abort();
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
dispatch_event(element, 'introstart');
|
|
243
|
-
|
|
244
242
|
intro = animate(element, get_options(), outro, 1, () => {
|
|
245
243
|
dispatch_event(element, 'introend');
|
|
246
244
|
|
|
@@ -260,8 +258,6 @@ export function transition(flags, element, get_fn, get_params) {
|
|
|
260
258
|
|
|
261
259
|
element.inert = true;
|
|
262
260
|
|
|
263
|
-
dispatch_event(element, 'outrostart');
|
|
264
|
-
|
|
265
261
|
outro = animate(element, get_options(), intro, 0, () => {
|
|
266
262
|
dispatch_event(element, 'outroend');
|
|
267
263
|
fn?.();
|
|
@@ -345,7 +341,8 @@ function animate(element, options, counterpart, t2, on_finish) {
|
|
|
345
341
|
|
|
346
342
|
counterpart?.deactivate();
|
|
347
343
|
|
|
348
|
-
if (!options?.duration) {
|
|
344
|
+
if (!options?.duration && !options?.delay) {
|
|
345
|
+
dispatch_event(element, is_intro ? 'introstart' : 'outrostart');
|
|
349
346
|
on_finish();
|
|
350
347
|
|
|
351
348
|
return {
|
|
@@ -385,6 +382,8 @@ function animate(element, options, counterpart, t2, on_finish) {
|
|
|
385
382
|
// remove dummy animation from the stack to prevent conflict with main animation
|
|
386
383
|
animation.cancel();
|
|
387
384
|
|
|
385
|
+
dispatch_event(element, is_intro ? 'introstart' : 'outrostart');
|
|
386
|
+
|
|
388
387
|
// for bidirectional transitions, we start from the current position,
|
|
389
388
|
// rather than doing a full intro/outro
|
|
390
389
|
var t1 = counterpart?.t() ?? 1 - t2;
|
|
@@ -171,6 +171,10 @@ export class Batch {
|
|
|
171
171
|
if (this.is_deferred()) {
|
|
172
172
|
this.#defer_effects(render_effects);
|
|
173
173
|
this.#defer_effects(effects);
|
|
174
|
+
|
|
175
|
+
for (const e of this.skipped_effects) {
|
|
176
|
+
reset_branch(e);
|
|
177
|
+
}
|
|
174
178
|
} else {
|
|
175
179
|
// append/remove branches
|
|
176
180
|
for (const fn of this.#commit_callbacks) fn();
|
|
@@ -881,6 +885,26 @@ export function eager(fn) {
|
|
|
881
885
|
return value;
|
|
882
886
|
}
|
|
883
887
|
|
|
888
|
+
/**
|
|
889
|
+
* Mark all the effects inside a skipped branch CLEAN, so that
|
|
890
|
+
* they can be correctly rescheduled later
|
|
891
|
+
* @param {Effect} effect
|
|
892
|
+
*/
|
|
893
|
+
function reset_branch(effect) {
|
|
894
|
+
// clean branch = nothing dirty inside, no need to traverse further
|
|
895
|
+
if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
set_signal_status(effect, CLEAN);
|
|
900
|
+
|
|
901
|
+
var e = effect.first;
|
|
902
|
+
while (e !== null) {
|
|
903
|
+
reset_branch(e);
|
|
904
|
+
e = e.next;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
884
908
|
/**
|
|
885
909
|
* Creates a 'fork', in which state changes are evaluated but not applied to the DOM.
|
|
886
910
|
* This is useful for speculatively loading data (for example) when you suspect that
|
|
@@ -972,6 +996,13 @@ export function fork(fn) {
|
|
|
972
996
|
await settled;
|
|
973
997
|
},
|
|
974
998
|
discard: () => {
|
|
999
|
+
// cause any MAYBE_DIRTY deriveds to update
|
|
1000
|
+
// if they depend on things thath changed
|
|
1001
|
+
// inside the discarded fork
|
|
1002
|
+
for (var source of batch.current.keys()) {
|
|
1003
|
+
source.wv = increment_write_version();
|
|
1004
|
+
}
|
|
1005
|
+
|
|
975
1006
|
if (!committed && batches.has(batch)) {
|
|
976
1007
|
batches.delete(batch);
|
|
977
1008
|
batch.discard();
|
|
@@ -43,7 +43,13 @@ import {
|
|
|
43
43
|
set_dev_current_component_function,
|
|
44
44
|
set_dev_stack
|
|
45
45
|
} from './context.js';
|
|
46
|
-
import {
|
|
46
|
+
import {
|
|
47
|
+
Batch,
|
|
48
|
+
batch_values,
|
|
49
|
+
current_batch,
|
|
50
|
+
flushSync,
|
|
51
|
+
schedule_effect
|
|
52
|
+
} from './reactivity/batch.js';
|
|
47
53
|
import { handle_error } from './error-handling.js';
|
|
48
54
|
import { UNINITIALIZED } from '../../constants.js';
|
|
49
55
|
import { captured_signals } from './legacy.js';
|
|
@@ -249,10 +255,16 @@ export function update_reaction(reaction) {
|
|
|
249
255
|
var result = fn();
|
|
250
256
|
var deps = reaction.deps;
|
|
251
257
|
|
|
258
|
+
// Don't remove reactions during fork;
|
|
259
|
+
// they must remain for when fork is discarded
|
|
260
|
+
var is_fork = current_batch?.is_fork;
|
|
261
|
+
|
|
252
262
|
if (new_deps !== null) {
|
|
253
263
|
var i;
|
|
254
264
|
|
|
255
|
-
|
|
265
|
+
if (!is_fork) {
|
|
266
|
+
remove_reactions(reaction, skipped_deps);
|
|
267
|
+
}
|
|
256
268
|
|
|
257
269
|
if (deps !== null && skipped_deps > 0) {
|
|
258
270
|
deps.length = skipped_deps + new_deps.length;
|
|
@@ -268,7 +280,7 @@ export function update_reaction(reaction) {
|
|
|
268
280
|
(deps[i].reactions ??= []).push(reaction);
|
|
269
281
|
}
|
|
270
282
|
}
|
|
271
|
-
} else if (deps !== null && skipped_deps < deps.length) {
|
|
283
|
+
} else if (!is_fork && deps !== null && skipped_deps < deps.length) {
|
|
272
284
|
remove_reactions(reaction, skipped_deps);
|
|
273
285
|
deps.length = skipped_deps;
|
|
274
286
|
}
|
|
@@ -17,7 +17,17 @@ export function set_ssr_context(v) {
|
|
|
17
17
|
*/
|
|
18
18
|
export function createContext() {
|
|
19
19
|
const key = {};
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
return [
|
|
22
|
+
() => {
|
|
23
|
+
if (!hasContext(key)) {
|
|
24
|
+
e.missing_context();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return getContext(key);
|
|
28
|
+
},
|
|
29
|
+
(context) => setContext(key, context)
|
|
30
|
+
];
|
|
21
31
|
}
|
|
22
32
|
|
|
23
33
|
/**
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1234,7 +1234,7 @@ declare module 'svelte/compiler' {
|
|
|
1234
1234
|
css?: 'injected';
|
|
1235
1235
|
customElement?: {
|
|
1236
1236
|
tag?: string;
|
|
1237
|
-
shadow?: 'open' | 'none';
|
|
1237
|
+
shadow?: 'open' | 'none' | ObjectExpression | undefined;
|
|
1238
1238
|
props?: Record<
|
|
1239
1239
|
string,
|
|
1240
1240
|
{
|
|
@@ -3345,6 +3345,9 @@ declare namespace $state {
|
|
|
3345
3345
|
export const prototype: never;
|
|
3346
3346
|
/** @deprecated */
|
|
3347
3347
|
export const toString: never;
|
|
3348
|
+
|
|
3349
|
+
// needed to keep private stuff private
|
|
3350
|
+
export {};
|
|
3348
3351
|
}
|
|
3349
3352
|
|
|
3350
3353
|
/**
|
|
@@ -3402,6 +3405,9 @@ declare namespace $derived {
|
|
|
3402
3405
|
export const prototype: never;
|
|
3403
3406
|
/** @deprecated */
|
|
3404
3407
|
export const toString: never;
|
|
3408
|
+
|
|
3409
|
+
// needed to keep private stuff private
|
|
3410
|
+
export {};
|
|
3405
3411
|
}
|
|
3406
3412
|
|
|
3407
3413
|
/**
|
|
@@ -3518,6 +3524,9 @@ declare namespace $effect {
|
|
|
3518
3524
|
export const prototype: never;
|
|
3519
3525
|
/** @deprecated */
|
|
3520
3526
|
export const toString: never;
|
|
3527
|
+
|
|
3528
|
+
// needed to keep private stuff private
|
|
3529
|
+
export {};
|
|
3521
3530
|
}
|
|
3522
3531
|
|
|
3523
3532
|
/**
|
|
@@ -3561,6 +3570,9 @@ declare namespace $props {
|
|
|
3561
3570
|
export const prototype: never;
|
|
3562
3571
|
/** @deprecated */
|
|
3563
3572
|
export const toString: never;
|
|
3573
|
+
|
|
3574
|
+
// needed to keep private stuff private
|
|
3575
|
+
export {};
|
|
3564
3576
|
}
|
|
3565
3577
|
|
|
3566
3578
|
/**
|
|
@@ -3595,6 +3607,9 @@ declare namespace $bindable {
|
|
|
3595
3607
|
export const prototype: never;
|
|
3596
3608
|
/** @deprecated */
|
|
3597
3609
|
export const toString: never;
|
|
3610
|
+
|
|
3611
|
+
// needed to keep private stuff private
|
|
3612
|
+
export {};
|
|
3598
3613
|
}
|
|
3599
3614
|
|
|
3600
3615
|
/**
|
|
@@ -3657,6 +3672,9 @@ declare namespace $inspect {
|
|
|
3657
3672
|
export const prototype: never;
|
|
3658
3673
|
/** @deprecated */
|
|
3659
3674
|
export const toString: never;
|
|
3675
|
+
|
|
3676
|
+
// needed to keep private stuff private
|
|
3677
|
+
export {};
|
|
3660
3678
|
}
|
|
3661
3679
|
|
|
3662
3680
|
/**
|
|
@@ -3701,6 +3719,9 @@ declare namespace $host {
|
|
|
3701
3719
|
export const prototype: never;
|
|
3702
3720
|
/** @deprecated */
|
|
3703
3721
|
export const toString: never;
|
|
3722
|
+
|
|
3723
|
+
// needed to keep private stuff private
|
|
3724
|
+
export {};
|
|
3704
3725
|
}
|
|
3705
3726
|
|
|
3706
3727
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -275,6 +275,6 @@
|
|
|
275
275
|
null,
|
|
276
276
|
null
|
|
277
277
|
],
|
|
278
|
-
"mappings": ";;;;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkC/BC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwEhBC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;kBAwBbC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCbC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;aAwBrBC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCfC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BdC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;kBAuBRC,OAAOA;;;;;;;;;;;;;;;;kBAgBPC,eAAeA;;;;;;;;;;;;;;;;aAgBpBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0CPC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCnSLC,cAAcA;;;;;;;;;;;;iBAsBdC,OAAOA;;;;;;;;iBAwBPC,SAASA;;;;;;;;;;;;;;;;;;;;;;iBA0CTC,qBAAqBA;;;;;;;;;;iBA2CrBC,YAAYA;;;;;;;;;;iBAuBZC,WAAWA;iBClNXC,UAAUA;;;;iBC4DVC,gBAAgBA;;;;;MCvEpBC,WAAWA;;;;;
|
|
278
|
+
"mappings": ";;;;;;;;;kBAUiBA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