svelte 5.45.2 → 5.45.4
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/package.json +2 -2
- package/src/compiler/phases/1-parse/index.js +32 -16
- package/src/compiler/phases/1-parse/read/context.js +3 -12
- package/src/compiler/phases/1-parse/state/element.js +79 -55
- package/src/compiler/phases/1-parse/state/tag.js +5 -16
- package/src/compiler/phases/2-analyze/index.js +7 -2
- package/src/compiler/phases/2-analyze/visitors/Identifier.js +2 -1
- package/src/compiler/phases/2-analyze/visitors/RegularElement.js +3 -2
- package/src/compiler/phases/3-transform/client/transform-template/index.js +1 -2
- package/src/compiler/phases/3-transform/client/visitors/BindDirective.js +27 -11
- package/src/compiler/phases/3-transform/client/visitors/CallExpression.js +2 -1
- package/src/compiler/phases/3-transform/client/visitors/Component.js +1 -2
- package/src/compiler/phases/3-transform/client/visitors/Fragment.js +1 -1
- package/src/compiler/phases/3-transform/client/visitors/RegularElement.js +1 -0
- package/src/compiler/phases/3-transform/client/visitors/SvelteComponent.js +2 -1
- package/src/compiler/phases/3-transform/client/visitors/SvelteHead.js +1 -1
- package/src/compiler/phases/3-transform/client/visitors/SvelteSelf.js +2 -1
- package/src/compiler/phases/3-transform/client/visitors/TitleElement.js +1 -1
- package/src/compiler/phases/3-transform/client/visitors/VariableDeclaration.js +2 -1
- package/src/compiler/phases/3-transform/client/visitors/shared/component.js +27 -25
- package/src/compiler/phases/3-transform/client/visitors/shared/events.js +8 -2
- package/src/compiler/phases/3-transform/client/visitors/shared/fragment.js +10 -4
- package/src/compiler/phases/3-transform/client/visitors/shared/utils.js +2 -2
- package/src/compiler/phases/3-transform/server/visitors/RegularElement.js +1 -1
- package/src/compiler/phases/3-transform/server/visitors/SvelteElement.js +1 -1
- package/src/compiler/phases/3-transform/server/visitors/shared/element.js +2 -2
- package/src/compiler/phases/nodes.js +4 -2
- package/src/compiler/state.js +12 -4
- package/src/compiler/utils/builders.js +6 -2
- package/src/internal/client/dev/debug.js +365 -7
- package/src/internal/client/dom/blocks/each.js +24 -44
- package/src/internal/client/dom/blocks/html.js +3 -3
- package/src/internal/client/dom/blocks/svelte-element.js +8 -11
- package/src/internal/client/dom/elements/transitions.js +15 -7
- package/src/internal/client/dom/template.js +12 -10
- package/src/internal/client/reactivity/async.js +1 -6
- package/src/internal/client/reactivity/batch.js +4 -1
- package/src/internal/client/reactivity/effects.js +20 -16
- package/src/internal/client/reactivity/sources.js +2 -0
- package/src/internal/client/render.js +2 -2
- package/src/internal/client/runtime.js +1 -1
- package/src/internal/server/hydratable.js +11 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +18 -11
- package/types/index.d.ts.map +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/** @import { AnimateFn, Animation, AnimationConfig, EachItem, Effect, TransitionFn, TransitionManager } from '#client' */
|
|
1
|
+
/** @import { AnimateFn, Animation, AnimationConfig, EachItem, Effect, EffectNodes, TransitionFn, TransitionManager } from '#client' */
|
|
2
2
|
import { noop, is_function } from '../../../shared/utils.js';
|
|
3
3
|
import { effect } from '../../reactivity/effects.js';
|
|
4
4
|
import { active_effect, untrack } from '../../runtime.js';
|
|
5
5
|
import { loop } from '../../loop.js';
|
|
6
6
|
import { should_intro } from '../../render.js';
|
|
7
|
-
import { current_each_item } from '../blocks/each.js';
|
|
8
7
|
import { TRANSITION_GLOBAL, TRANSITION_IN, TRANSITION_OUT } from '../../../../constants.js';
|
|
9
8
|
import { BLOCK_EFFECT, EFFECT_RAN, EFFECT_TRANSPARENT } from '#client/constants';
|
|
10
9
|
import { queue_micro_task } from '../task.js';
|
|
@@ -66,6 +65,14 @@ function css_to_keyframe(css) {
|
|
|
66
65
|
/** @param {number} t */
|
|
67
66
|
const linear = (t) => t;
|
|
68
67
|
|
|
68
|
+
/** @type {Effect | null} */
|
|
69
|
+
let animation_effect_override = null;
|
|
70
|
+
|
|
71
|
+
/** @param {Effect | null} v */
|
|
72
|
+
export function set_animation_effect_override(v) {
|
|
73
|
+
animation_effect_override = v;
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
/**
|
|
70
77
|
* Called inside keyed `{#each ...}` blocks (as `$.animation(...)`). This creates an animation manager
|
|
71
78
|
* and attaches it to the block, so that moves can be animated following reconciliation.
|
|
@@ -75,7 +82,8 @@ const linear = (t) => t;
|
|
|
75
82
|
* @param {(() => P) | null} get_params
|
|
76
83
|
*/
|
|
77
84
|
export function animation(element, get_fn, get_params) {
|
|
78
|
-
var
|
|
85
|
+
var effect = animation_effect_override ?? /** @type {Effect} */ (active_effect);
|
|
86
|
+
var nodes = /** @type {EffectNodes} */ (effect.nodes);
|
|
79
87
|
|
|
80
88
|
/** @type {DOMRect} */
|
|
81
89
|
var from;
|
|
@@ -89,7 +97,7 @@ export function animation(element, get_fn, get_params) {
|
|
|
89
97
|
/** @type {null | { position: string, width: string, height: string, transform: string }} */
|
|
90
98
|
var original_styles = null;
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
nodes.a ??= {
|
|
93
101
|
element,
|
|
94
102
|
measure() {
|
|
95
103
|
from = this.element.getBoundingClientRect();
|
|
@@ -161,7 +169,7 @@ export function animation(element, get_fn, get_params) {
|
|
|
161
169
|
// when an animation manager already exists, if the tag changes. in that case, we need to
|
|
162
170
|
// swap out the element rather than creating a new manager, in case it happened at the same
|
|
163
171
|
// moment as a reconciliation
|
|
164
|
-
|
|
172
|
+
nodes.a.element = element;
|
|
165
173
|
}
|
|
166
174
|
|
|
167
175
|
/**
|
|
@@ -265,9 +273,9 @@ export function transition(flags, element, get_fn, get_params) {
|
|
|
265
273
|
}
|
|
266
274
|
};
|
|
267
275
|
|
|
268
|
-
var e = /** @type {Effect} */ (active_effect);
|
|
276
|
+
var e = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);
|
|
269
277
|
|
|
270
|
-
(e.
|
|
278
|
+
(e.nodes.t ??= []).push(transition);
|
|
271
279
|
|
|
272
280
|
// if this is a local transition, we only want to run it if the parent (branch) effect's
|
|
273
281
|
// parent (block) effect is where the state change happened. we can determine that by
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @import { Effect, TemplateNode } from '#client' */
|
|
1
|
+
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
2
2
|
/** @import { TemplateStructure } from './types' */
|
|
3
3
|
import { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from './hydration.js';
|
|
4
4
|
import {
|
|
@@ -28,9 +28,8 @@ import { COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, EFFECT_RAN, TEXT_NODE } from '#cl
|
|
|
28
28
|
*/
|
|
29
29
|
export function assign_nodes(start, end) {
|
|
30
30
|
var effect = /** @type {Effect} */ (active_effect);
|
|
31
|
-
if (effect.
|
|
32
|
-
effect.
|
|
33
|
-
effect.nodes_end = end;
|
|
31
|
+
if (effect.nodes === null) {
|
|
32
|
+
effect.nodes = { start, end, a: null, t: null };
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -270,7 +269,8 @@ function run_scripts(node) {
|
|
|
270
269
|
/** @type {HTMLElement} */ (node).tagName === 'SCRIPT'
|
|
271
270
|
? [/** @type {HTMLScriptElement} */ (node)]
|
|
272
271
|
: node.querySelectorAll('script');
|
|
273
|
-
|
|
272
|
+
|
|
273
|
+
const effect = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);
|
|
274
274
|
|
|
275
275
|
for (const script of scripts) {
|
|
276
276
|
const clone = document.createElement('script');
|
|
@@ -282,10 +282,10 @@ function run_scripts(node) {
|
|
|
282
282
|
|
|
283
283
|
// The script has changed - if it's at the edges, the effect now points at dead nodes
|
|
284
284
|
if (is_fragment ? node.firstChild === script : node === script) {
|
|
285
|
-
effect.
|
|
285
|
+
effect.nodes.start = clone;
|
|
286
286
|
}
|
|
287
287
|
if (is_fragment ? node.lastChild === script : node === script) {
|
|
288
|
-
effect.
|
|
288
|
+
effect.nodes.end = clone;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
script.replaceWith(clone);
|
|
@@ -344,13 +344,15 @@ export function comment() {
|
|
|
344
344
|
*/
|
|
345
345
|
export function append(anchor, dom) {
|
|
346
346
|
if (hydrating) {
|
|
347
|
-
var effect = /** @type {Effect} */ (active_effect);
|
|
347
|
+
var effect = /** @type {Effect & { nodes: EffectNodes }} */ (active_effect);
|
|
348
|
+
|
|
348
349
|
// When hydrating and outer component and an inner component is async, i.e. blocked on a promise,
|
|
349
350
|
// then by the time the inner resolves we have already advanced to the end of the hydrated nodes
|
|
350
351
|
// of the parent component. Check for defined for that reason to avoid rewinding the parent's end marker.
|
|
351
|
-
if ((effect.f & EFFECT_RAN) === 0 || effect.
|
|
352
|
-
effect.
|
|
352
|
+
if ((effect.f & EFFECT_RAN) === 0 || effect.nodes.end === null) {
|
|
353
|
+
effect.nodes.end = hydrate_node;
|
|
353
354
|
}
|
|
355
|
+
|
|
354
356
|
hydrate_next();
|
|
355
357
|
return;
|
|
356
358
|
}
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
} from './deriveds.js';
|
|
27
27
|
import { aborted } from './effects.js';
|
|
28
28
|
import { hydrate_next, hydrating, set_hydrate_node, skip_nodes } from '../dom/hydration.js';
|
|
29
|
-
import { current_each_item, set_current_each_item } from '../dom/blocks/each.js';
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
31
|
* @param {Array<Promise<void>>} blockers
|
|
@@ -90,11 +89,7 @@ export function flatten(blockers, sync, async, fn) {
|
|
|
90
89
|
* @param {(values: Value[]) => any} fn
|
|
91
90
|
*/
|
|
92
91
|
export function run_after_blockers(blockers, fn) {
|
|
93
|
-
|
|
94
|
-
flatten(blockers, [], [], (v) => {
|
|
95
|
-
set_current_each_item(each_item);
|
|
96
|
-
fn(v);
|
|
97
|
-
});
|
|
92
|
+
flatten(blockers, [], [], fn);
|
|
98
93
|
}
|
|
99
94
|
|
|
100
95
|
/**
|
|
@@ -175,6 +175,9 @@ export class Batch {
|
|
|
175
175
|
this.#traverse_effect_tree(root, target);
|
|
176
176
|
// Note: #traverse_effect_tree runs block effects eagerly, which can schedule effects,
|
|
177
177
|
// which means queued_root_effects now may be filled again.
|
|
178
|
+
|
|
179
|
+
// Helpful for debugging reactivity loss that has to do with branches being skipped:
|
|
180
|
+
// log_inconsistent_branches(root);
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
if (!this.is_fork) {
|
|
@@ -705,7 +708,7 @@ function flush_queued_effects(effects) {
|
|
|
705
708
|
// don't know if we need to keep them until they are executed. Doing the check
|
|
706
709
|
// here (rather than in `update_effect`) allows us to skip the work for
|
|
707
710
|
// immediate effects.
|
|
708
|
-
if (effect.deps === null && effect.first === null && effect.
|
|
711
|
+
if (effect.deps === null && effect.first === null && effect.nodes === null) {
|
|
709
712
|
// if there's no teardown or abort controller we completely unlink
|
|
710
713
|
// the effect from the graph
|
|
711
714
|
if (effect.teardown === null && effect.ac === null) {
|
|
@@ -101,8 +101,7 @@ function create_effect(type, fn, sync) {
|
|
|
101
101
|
var effect = {
|
|
102
102
|
ctx: component_context,
|
|
103
103
|
deps: null,
|
|
104
|
-
|
|
105
|
-
nodes_end: null,
|
|
104
|
+
nodes: null,
|
|
106
105
|
f: type | DIRTY | CONNECTED,
|
|
107
106
|
first: null,
|
|
108
107
|
fn,
|
|
@@ -112,7 +111,6 @@ function create_effect(type, fn, sync) {
|
|
|
112
111
|
b: parent && parent.b,
|
|
113
112
|
prev: null,
|
|
114
113
|
teardown: null,
|
|
115
|
-
transitions: null,
|
|
116
114
|
wv: 0,
|
|
117
115
|
ac: null
|
|
118
116
|
};
|
|
@@ -143,7 +141,7 @@ function create_effect(type, fn, sync) {
|
|
|
143
141
|
sync &&
|
|
144
142
|
e.deps === null &&
|
|
145
143
|
e.teardown === null &&
|
|
146
|
-
e.
|
|
144
|
+
e.nodes === null &&
|
|
147
145
|
e.first === e.last && // either `null`, or a singular child
|
|
148
146
|
(e.f & EFFECT_PRESERVED) === 0
|
|
149
147
|
) {
|
|
@@ -497,10 +495,10 @@ export function destroy_effect(effect, remove_dom = true) {
|
|
|
497
495
|
|
|
498
496
|
if (
|
|
499
497
|
(remove_dom || (effect.f & HEAD_EFFECT) !== 0) &&
|
|
500
|
-
effect.
|
|
501
|
-
effect.
|
|
498
|
+
effect.nodes !== null &&
|
|
499
|
+
effect.nodes.end !== null
|
|
502
500
|
) {
|
|
503
|
-
remove_effect_dom(effect.
|
|
501
|
+
remove_effect_dom(effect.nodes.start, /** @type {TemplateNode} */ (effect.nodes.end));
|
|
504
502
|
removed = true;
|
|
505
503
|
}
|
|
506
504
|
|
|
@@ -508,7 +506,7 @@ export function destroy_effect(effect, remove_dom = true) {
|
|
|
508
506
|
remove_reactions(effect, 0);
|
|
509
507
|
set_signal_status(effect, DESTROYED);
|
|
510
508
|
|
|
511
|
-
var transitions = effect.
|
|
509
|
+
var transitions = effect.nodes && effect.nodes.t;
|
|
512
510
|
|
|
513
511
|
if (transitions !== null) {
|
|
514
512
|
for (const transition of transitions) {
|
|
@@ -537,8 +535,7 @@ export function destroy_effect(effect, remove_dom = true) {
|
|
|
537
535
|
effect.ctx =
|
|
538
536
|
effect.deps =
|
|
539
537
|
effect.fn =
|
|
540
|
-
effect.
|
|
541
|
-
effect.nodes_end =
|
|
538
|
+
effect.nodes =
|
|
542
539
|
effect.ac =
|
|
543
540
|
null;
|
|
544
541
|
}
|
|
@@ -624,8 +621,10 @@ export function pause_children(effect, transitions, local) {
|
|
|
624
621
|
if ((effect.f & INERT) !== 0) return;
|
|
625
622
|
effect.f ^= INERT;
|
|
626
623
|
|
|
627
|
-
|
|
628
|
-
|
|
624
|
+
var t = effect.nodes && effect.nodes.t;
|
|
625
|
+
|
|
626
|
+
if (t !== null) {
|
|
627
|
+
for (const transition of t) {
|
|
629
628
|
if (transition.is_global || local) {
|
|
630
629
|
transitions.push(transition);
|
|
631
630
|
}
|
|
@@ -688,8 +687,10 @@ function resume_children(effect, local) {
|
|
|
688
687
|
child = sibling;
|
|
689
688
|
}
|
|
690
689
|
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
var t = effect.nodes && effect.nodes.t;
|
|
691
|
+
|
|
692
|
+
if (t !== null) {
|
|
693
|
+
for (const transition of t) {
|
|
693
694
|
if (transition.is_global || local) {
|
|
694
695
|
transition.in();
|
|
695
696
|
}
|
|
@@ -706,8 +707,11 @@ export function aborted(effect = /** @type {Effect} */ (active_effect)) {
|
|
|
706
707
|
* @param {DocumentFragment} fragment
|
|
707
708
|
*/
|
|
708
709
|
export function move_effect(effect, fragment) {
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
if (!effect.nodes) return;
|
|
711
|
+
|
|
712
|
+
/** @type {TemplateNode | null} */
|
|
713
|
+
var node = effect.nodes.start;
|
|
714
|
+
var end = effect.nodes.end;
|
|
711
715
|
|
|
712
716
|
while (node !== null) {
|
|
713
717
|
/** @type {TemplateNode | null} */
|
|
@@ -228,6 +228,8 @@ export function internal_set(source, value) {
|
|
|
228
228
|
|
|
229
229
|
source.wv = increment_write_version();
|
|
230
230
|
|
|
231
|
+
// For debugging, in case you want to know which reactions are being scheduled:
|
|
232
|
+
// log_reactions(source);
|
|
231
233
|
mark_reactions(source, DIRTY);
|
|
232
234
|
|
|
233
235
|
// It's possible that the current reaction might not have up-to-date dependencies
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @import { ComponentContext, Effect, TemplateNode } from '#client' */
|
|
1
|
+
/** @import { ComponentContext, Effect, EffectNodes, TemplateNode } from '#client' */
|
|
2
2
|
/** @import { Component, ComponentType, SvelteComponent, MountOptions } from '../../index.js' */
|
|
3
3
|
import { DEV } from 'esm-env';
|
|
4
4
|
import {
|
|
@@ -228,7 +228,7 @@ function _mount(Component, { target, anchor, props = {}, events, context, intro
|
|
|
228
228
|
should_intro = true;
|
|
229
229
|
|
|
230
230
|
if (hydrating) {
|
|
231
|
-
/** @type {Effect} */ (active_effect).
|
|
231
|
+
/** @type {Effect & { nodes: EffectNodes }} */ (active_effect).nodes.end = hydrate_node;
|
|
232
232
|
|
|
233
233
|
if (
|
|
234
234
|
hydrate_node === null ||
|
|
@@ -278,7 +278,7 @@ export function update_reaction(reaction) {
|
|
|
278
278
|
reaction.deps = deps = new_deps;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
if (
|
|
281
|
+
if (effect_tracking() && (reaction.f & CONNECTED) !== 0) {
|
|
282
282
|
for (i = skipped_deps; i < deps.length; i++) {
|
|
283
283
|
(deps[i].reactions ??= []).push(reaction);
|
|
284
284
|
}
|
|
@@ -56,7 +56,7 @@ function encode(key, value, unresolved) {
|
|
|
56
56
|
let uid = 1;
|
|
57
57
|
|
|
58
58
|
entry.serialized = devalue.uneval(entry.value, (value, uneval) => {
|
|
59
|
-
if (value
|
|
59
|
+
if (is_promise(value)) {
|
|
60
60
|
const p = value
|
|
61
61
|
.then((v) => `r(${uneval(v)})`)
|
|
62
62
|
.catch((devalue_error) =>
|
|
@@ -90,6 +90,16 @@ function encode(key, value, unresolved) {
|
|
|
90
90
|
return entry;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* @param {any} value
|
|
95
|
+
* @returns {value is Promise<any>}
|
|
96
|
+
*/
|
|
97
|
+
function is_promise(value) {
|
|
98
|
+
// we use this check rather than `instanceof Promise`
|
|
99
|
+
// because it works cross-realm
|
|
100
|
+
return Object.prototype.toString.call(value) === '[object Promise]';
|
|
101
|
+
}
|
|
102
|
+
|
|
93
103
|
/**
|
|
94
104
|
* @param {string} key
|
|
95
105
|
* @param {HydratableLookupEntry} a
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="esrap" />
|
|
2
|
+
|
|
1
3
|
declare module 'svelte' {
|
|
2
4
|
/**
|
|
3
5
|
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
|
|
@@ -842,7 +844,7 @@ declare module 'svelte/attachments' {
|
|
|
842
844
|
|
|
843
845
|
declare module 'svelte/compiler' {
|
|
844
846
|
import type { SourceMap } from 'magic-string';
|
|
845
|
-
import type { ArrayExpression, ArrowFunctionExpression, VariableDeclaration, VariableDeclarator, Expression, Identifier, MemberExpression, Node, ObjectExpression, Pattern, Program, ChainExpression, SimpleCallExpression, SequenceExpression } from 'estree';
|
|
847
|
+
import type { ArrayExpression, ArrowFunctionExpression, VariableDeclaration, VariableDeclarator, Expression, Identifier, MemberExpression, Node, ObjectExpression, Pattern, Program, ChainExpression, SimpleCallExpression, SequenceExpression, SourceLocation } from 'estree';
|
|
846
848
|
import type { Location } from 'locate-character';
|
|
847
849
|
import type { default as ts } from 'esrap/languages/ts';
|
|
848
850
|
/**
|
|
@@ -1302,7 +1304,7 @@ declare module 'svelte/compiler' {
|
|
|
1302
1304
|
}
|
|
1303
1305
|
|
|
1304
1306
|
/** An `animate:` directive */
|
|
1305
|
-
export interface AnimateDirective extends
|
|
1307
|
+
export interface AnimateDirective extends BaseAttribute {
|
|
1306
1308
|
type: 'AnimateDirective';
|
|
1307
1309
|
/** The 'x' in `animate:x` */
|
|
1308
1310
|
name: string;
|
|
@@ -1311,7 +1313,7 @@ declare module 'svelte/compiler' {
|
|
|
1311
1313
|
}
|
|
1312
1314
|
|
|
1313
1315
|
/** A `bind:` directive */
|
|
1314
|
-
export interface BindDirective extends
|
|
1316
|
+
export interface BindDirective extends BaseAttribute {
|
|
1315
1317
|
type: 'BindDirective';
|
|
1316
1318
|
/** The 'x' in `bind:x` */
|
|
1317
1319
|
name: string;
|
|
@@ -1320,7 +1322,7 @@ declare module 'svelte/compiler' {
|
|
|
1320
1322
|
}
|
|
1321
1323
|
|
|
1322
1324
|
/** A `class:` directive */
|
|
1323
|
-
export interface ClassDirective extends
|
|
1325
|
+
export interface ClassDirective extends BaseAttribute {
|
|
1324
1326
|
type: 'ClassDirective';
|
|
1325
1327
|
/** The 'x' in `class:x` */
|
|
1326
1328
|
name: 'class';
|
|
@@ -1329,7 +1331,7 @@ declare module 'svelte/compiler' {
|
|
|
1329
1331
|
}
|
|
1330
1332
|
|
|
1331
1333
|
/** A `let:` directive */
|
|
1332
|
-
export interface LetDirective extends
|
|
1334
|
+
export interface LetDirective extends BaseAttribute {
|
|
1333
1335
|
type: 'LetDirective';
|
|
1334
1336
|
/** The 'x' in `let:x` */
|
|
1335
1337
|
name: string;
|
|
@@ -1338,7 +1340,7 @@ declare module 'svelte/compiler' {
|
|
|
1338
1340
|
}
|
|
1339
1341
|
|
|
1340
1342
|
/** An `on:` directive */
|
|
1341
|
-
export interface OnDirective extends
|
|
1343
|
+
export interface OnDirective extends BaseAttribute {
|
|
1342
1344
|
type: 'OnDirective';
|
|
1343
1345
|
/** The 'x' in `on:x` */
|
|
1344
1346
|
name: string;
|
|
@@ -1358,7 +1360,7 @@ declare module 'svelte/compiler' {
|
|
|
1358
1360
|
}
|
|
1359
1361
|
|
|
1360
1362
|
/** A `style:` directive */
|
|
1361
|
-
export interface StyleDirective extends
|
|
1363
|
+
export interface StyleDirective extends BaseAttribute {
|
|
1362
1364
|
type: 'StyleDirective';
|
|
1363
1365
|
/** The 'x' in `style:x` */
|
|
1364
1366
|
name: string;
|
|
@@ -1369,7 +1371,7 @@ declare module 'svelte/compiler' {
|
|
|
1369
1371
|
|
|
1370
1372
|
// TODO have separate in/out/transition directives
|
|
1371
1373
|
/** A `transition:`, `in:` or `out:` directive */
|
|
1372
|
-
export interface TransitionDirective extends
|
|
1374
|
+
export interface TransitionDirective extends BaseAttribute {
|
|
1373
1375
|
type: 'TransitionDirective';
|
|
1374
1376
|
/** The 'x' in `transition:x` */
|
|
1375
1377
|
name: string;
|
|
@@ -1383,7 +1385,7 @@ declare module 'svelte/compiler' {
|
|
|
1383
1385
|
}
|
|
1384
1386
|
|
|
1385
1387
|
/** A `use:` directive */
|
|
1386
|
-
export interface UseDirective extends
|
|
1388
|
+
export interface UseDirective extends BaseAttribute {
|
|
1387
1389
|
type: 'UseDirective';
|
|
1388
1390
|
/** The 'x' in `use:x` */
|
|
1389
1391
|
name: string;
|
|
@@ -1393,6 +1395,7 @@ declare module 'svelte/compiler' {
|
|
|
1393
1395
|
|
|
1394
1396
|
export interface BaseElement extends BaseNode {
|
|
1395
1397
|
name: string;
|
|
1398
|
+
name_loc: SourceLocation;
|
|
1396
1399
|
attributes: Array<Attribute | SpreadAttribute | Directive | AttachTag>;
|
|
1397
1400
|
fragment: Fragment;
|
|
1398
1401
|
}
|
|
@@ -1517,9 +1520,13 @@ declare module 'svelte/compiler' {
|
|
|
1517
1520
|
body: Fragment;
|
|
1518
1521
|
}
|
|
1519
1522
|
|
|
1520
|
-
export interface
|
|
1521
|
-
type: 'Attribute';
|
|
1523
|
+
export interface BaseAttribute extends BaseNode {
|
|
1522
1524
|
name: string;
|
|
1525
|
+
name_loc: SourceLocation | null;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
export interface Attribute extends BaseAttribute {
|
|
1529
|
+
type: 'Attribute';
|
|
1523
1530
|
/**
|
|
1524
1531
|
* Quoted/string values are represented by an array, even if they contain a single expression like `"{x}"`
|
|
1525
1532
|
*/
|
package/types/index.d.ts.map
CHANGED
|
@@ -272,6 +272,6 @@
|
|
|
272
272
|
null,
|
|
273
273
|
null
|
|
274
274
|
],
|
|
275
|
-
"mappings": "
|
|
275
|
+
"mappings": ";;;;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkC/BC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwEhBC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;kBAwBbC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCbC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;aAwBrBC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCfC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;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