🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

svelte

Package Overview
Dependencies
Maintainers
3
Versions
1083
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte - npm Package Compare versions

Comparing version
5.55.10
to
5.56.0
+58
src/compiler/phases/2-analyze/visitors/DeclarationTag.js
/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import * as b from '#compiler/builders';
import * as e from '../../../errors.js';
import { validate_opening_tag } from './shared/utils.js';
/**
* @param {AST.DeclarationTag} node
* @param {Context} context
*/
export function DeclarationTag(node, context) {
validate_opening_tag(node, context.state, node.declaration.kind[0]);
if (!context.state.analysis.runes && !context.state.analysis.maybe_runes) {
e.declaration_tag_no_legacy_mode(node);
}
context.visit(node.declaration, {
...context.state,
in_declaration_tag: true,
expression: node.metadata.expression
});
mark_async_declaration(context, node.metadata, node.declaration.declarations);
}
/**
* @param {Context} context
* @param {AST.ConstTag['metadata'] | AST.DeclarationTag['metadata']} metadata
* @param {import('estree').VariableDeclarator[]} declarations
*/
export function mark_async_declaration(context, metadata, declarations) {
const has_await = metadata.expression.has_await;
const blockers = [...metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== context.state.async_consts?.id);
if (has_await || context.state.async_consts || blockers.length > 0) {
const run = (context.state.async_consts ??= {
id: context.state.analysis.root.unique('promises'),
declaration_count: 0
});
metadata.promises_id = run.id;
const bindings = declarations.flatMap((declaration) =>
context.state.scope.get_bindings(declaration)
);
// keep the counter in sync with the number of thunks pushed in transform
// TODO 6.0 once non-async and non-runes mode is gone investigate making this more robust
// via something like the approach in https://github.com/sveltejs/svelte/pull/18032
const length = run.declaration_count + (blockers.length > 0 ? 1 : 0);
run.declaration_count += blockers.length > 0 ? 2 : 1;
const blocker = b.member(run.id, b.literal(length), true);
for (const binding of bindings) {
binding.blocker = blocker;
}
}
}
/** @import { Expression, Identifier, Pattern, Statement, ExpressionStatement, VariableDeclaration } from 'estree' */
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types' */
import { extract_identifiers, has_await_expression } from '../../../../utils/ast.js';
import * as b from '#compiler/builders';
import { add_state_transformers } from './shared/declarations.js';
/**
* @param {AST.DeclarationTag} node
* @param {ComponentContext} context
*/
export function DeclarationTag(node, context) {
const declaration = /** @type {Statement | undefined} */ (context.visit(node.declaration));
add_state_transformers(context);
if (
node.metadata.promises_id &&
node.declaration.type === 'VariableDeclaration' &&
declaration?.type === 'VariableDeclaration'
) {
const { ids, assignments } = build_async_declaration_parts(declaration);
add_async_declaration(context, node.metadata, ids, assignments, declaration.kind);
} else {
context.state.consts.push(declaration ?? node.declaration);
}
}
/**
* @param {VariableDeclaration} declaration
*/
export function build_async_declaration_parts(declaration) {
const ids = new Map();
for (const declarator of declaration.declarations) {
for (const id of extract_identifiers(declarator.id)) {
ids.set(id.name, id);
}
}
const assignments = declaration.declarations
.filter((declarator) => declarator.init !== null)
.map((declarator) =>
b.stmt(
b.assignment(
'=',
/** @type {Pattern} */ (declarator.id),
/** @type {Expression} */ (declarator.init)
)
)
);
return { ids: [...ids.values()], assignments };
}
/**
* @param {ComponentContext} context
* @param {AST.ConstTag['metadata'] | AST.DeclarationTag['metadata']} metadata
* @param {Identifier[]} ids
* @param {ExpressionStatement[]} assignments
* @param {VariableDeclaration['kind']} [kind]
*/
export function add_async_declaration(context, metadata, ids, assignments, kind = 'let') {
const run = (context.state.async_consts ??= {
id: /** @type {Identifier} */ (metadata.promises_id),
thunks: []
});
for (const id of ids) {
context.state.consts.push(kind === 'var' ? b.var(id.name) : b.let(id.name));
}
const blockers = [...metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== context.state.async_consts?.id);
if (blockers.length === 1) {
run.thunks.push(b.thunk(b.member(/** @type {Expression} */ (blockers[0]), 'promise')));
} else if (blockers.length > 0) {
run.thunks.push(b.thunk(b.call('$.wait', b.array(blockers))));
}
// keep the number of thunks pushed in sync with analysis phase
const has_await =
metadata.expression.has_await ||
assignments.some((assignment) => has_await_expression(assignment));
const body = assignments.length === 1 ? assignments[0].expression : b.block(assignments);
run.thunks.push(b.thunk(body, has_await));
}
/** @import { Expression, Identifier, Pattern, Statement, ExpressionStatement, VariableDeclaration } from 'estree' */
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types.js' */
import { extract_identifiers, has_await_expression } from '../../../../utils/ast.js';
import * as b from '#compiler/builders';
/**
* @param {AST.DeclarationTag} node
* @param {ComponentContext} context
*/
export function DeclarationTag(node, context) {
const declaration = /** @type {Statement} */ (context.visit(node.declaration));
if (
node.metadata.promises_id &&
node.declaration.type === 'VariableDeclaration' &&
declaration.type === 'VariableDeclaration'
) {
const { ids, assignments } = build_async_declaration_parts(declaration);
add_async_declaration(context, node.metadata, ids, assignments, declaration.kind);
} else {
context.state.init.push(declaration);
}
}
/**
* @param {VariableDeclaration} declaration
*/
export function build_async_declaration_parts(declaration) {
const ids = new Map();
for (const declarator of declaration.declarations) {
for (const id of extract_identifiers(declarator.id)) {
ids.set(id.name, id);
}
}
const assignments = declaration.declarations
.filter((declarator) => declarator.init !== null)
.map((declarator) =>
b.stmt(
b.assignment(
'=',
/** @type {Pattern} */ (declarator.id),
/** @type {Expression} */ (declarator.init)
)
)
);
return { ids: [...ids.values()], assignments };
}
/**
* @param {ComponentContext} context
* @param {AST.ConstTag['metadata'] | AST.DeclarationTag['metadata']} metadata
* @param {Identifier[]} ids
* @param {ExpressionStatement[]} assignments
* @param {VariableDeclaration['kind']} [kind]
*/
export function add_async_declaration(context, metadata, ids, assignments, kind = 'let') {
const run = (context.state.async_consts ??= {
id: /** @type {Identifier} */ (metadata.promises_id),
thunks: []
});
for (const id of ids) {
context.state.init.push(kind === 'var' ? b.var(id.name) : b.let(id.name));
}
const blockers = [...metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== context.state.async_consts?.id);
if (blockers.length === 1) {
run.thunks.push(b.thunk(/** @type {Expression} */ (blockers[0])));
} else if (blockers.length > 0) {
run.thunks.push(b.thunk(b.call('Promise.all', b.array(blockers))));
}
// keep the number of thunks pushed in sync with analysis phase
const has_await =
metadata.expression.has_await ||
assignments.some((assignment) => has_await_expression(assignment));
const body = assignments.length === 1 ? assignments[0].expression : b.block(assignments);
run.thunks.push(b.thunk(body, has_await));
}
+7
-4

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "5.55.10",
"version": "5.56.0",
"type": "module",

@@ -143,3 +143,3 @@ "types": "./types/index.d.ts",

"@jridgewell/trace-mapping": "^0.3.25",
"@playwright/test": "^1.58.0",
"@playwright/test": "^1.60.0",
"@rollup/plugin-commonjs": "^28.0.1",

@@ -151,2 +151,3 @@ "@rollup/plugin-node-resolve": "^15.3.0",

"@types/node": "^20.11.5",
"baseline-browser-mapping": "^2.10.32",
"dts-buddy": "^0.5.5",

@@ -158,3 +159,4 @@ "esbuild": "^0.25.10",

"typescript": "^5.5.4",
"vitest": "^2.1.9"
"vitest": "^2.1.9",
"web-features": "^3.29.0"
},

@@ -185,7 +187,8 @@ "dependencies": {

"check:watch": "tsc --watch",
"generate": "node scripts/process-messages && node ./scripts/generate-types.js",
"generate": "node scripts/process-messages && node ./scripts/generate-types.js && pnpm generate:browser-support",
"generate:version": "node ./scripts/generate-version.js",
"generate:types": "node ./scripts/generate-types.js && tsc -p tsconfig.generated.json",
"generate:browser-support": "node ./scripts/generate-browser-support.ts",
"knip": "pnpm dlx knip"
}
}

@@ -265,2 +265,6 @@ /** @import { Expression } from 'estree' */

// @ts-ignore
DeclarationTag(node) {
return node;
},
// @ts-ignore
KeyBlock(node, { visit }) {

@@ -267,0 +271,0 @@ remove_surrounding_whitespace_nodes(node.fragment.nodes);

@@ -1,2 +0,2 @@

/** @import { Comment, Program } from 'estree' */
/** @import { Comment, Program, Statement } from 'estree' */
/** @import { AST } from '#compiler' */

@@ -8,2 +8,3 @@ /** @import { Parser } from './index.js' */

import * as e from '../../errors.js';
import { find_matching_bracket } from './utils/bracket.js';

@@ -102,2 +103,44 @@ const JSParser = acorn.Parser;

/**
* @param {Parser} parser
* @param {string} source
* @param {number} index
* @returns {Statement}
*/
export function parse_statement_at(parser, source, index) {
const acorn = parser.ts ? TSParser : JSParser;
let end = find_matching_bracket(source, index, '{');
if (end === undefined) e.unexpected_eof(source.length);
while (source[end - 1] === ';') {
end -= 1;
}
const padded_source = `${' '.repeat(index)}${source.slice(index, end)}`;
const { onComment, add_comments } = get_comment_handlers(
padded_source,
parser.root.comments,
index
);
try {
const ast = acorn.parse(padded_source, {
onComment,
sourceType: 'module',
ecmaVersion: 16,
locations: true
});
add_comments(ast);
const statement = /** @type {Statement} */ (
/** @type {unknown} */ (/** @type {Program} */ (ast).body[0])
);
statement.end = Math.min(/** @type {number} */ (statement.end), end);
return statement;
} catch (e) {
handle_parse_error(e);
}
}
const regex_position_indicator = / \(\d+:\d+\)$/;

@@ -104,0 +147,0 @@

@@ -305,3 +305,6 @@ /** @import { AST } from '#compiler' */

pop() {
this.fragments.pop();
const fragment = this.fragments.pop();
if (fragment?.metadata.transparent && fragment.nodes.some((n) => n.type === 'DeclarationTag')) {
fragment.metadata.transparent = false;
}
return this.stack.pop();

@@ -308,0 +311,0 @@ }

@@ -1,2 +0,2 @@

/** @import { ArrowFunctionExpression, Expression, Identifier, Pattern } from 'estree' */
/** @import { ArrowFunctionExpression, Expression, Identifier, Pattern, VariableDeclaration } from 'estree' */
/** @import { AST } from '#compiler' */

@@ -7,9 +7,13 @@ /** @import { Parser } from '../index.js' */

import { ExpressionMetadata } from '../../nodes.js';
import { parse_expression_at } from '../acorn.js';
import { parse_expression_at, parse_statement_at } from '../acorn.js';
import read_pattern from '../read/context.js';
import read_expression, { get_loose_identifier } from '../read/expression.js';
import { create_fragment } from '../utils/create.js';
import { match_bracket } from '../utils/bracket.js';
import { find_matching_bracket, match_bracket } from '../utils/bracket.js';
const regex_whitespace_with_closing_curly_brace = /\s*}/y;
const regex_supported_declaration = /(?:let|const)\b/y;
// All except `type` are reserved keywords and cannot be used as variable names.
// For type we check if it's not something like `type .x` / `type ()` / `type % 2` / ...
const regex_unsupported_declaration = /(?:(?:var|interface|enum)\b)|(?:type\s+[^?.(`<[&|%^}])/y;

@@ -35,2 +39,16 @@ const pointy_bois = { '<': '>' };

const declaration = read_declaration(parser);
if (declaration) {
parser.append({
type: 'DeclarationTag',
start,
end: parser.index,
declaration: /** @type {VariableDeclaration} */ (declaration),
metadata: {
expression: new ExpressionMetadata()
}
});
return;
}
const expression = read_expression(parser);

@@ -52,2 +70,72 @@

/**
* @param {Parser} parser
* @returns {null | import('estree').VariableDeclaration}
*/
function read_declaration(parser) {
const start = parser.index;
const unsupported = parser.match_regex(regex_unsupported_declaration);
if (unsupported) {
e.declaration_tag_invalid_type({ start, end: start + unsupported.length });
}
if (!parser.match_regex(regex_supported_declaration)) {
return null;
}
/** @type {import('estree').Statement | import('estree').VariableDeclaration} */
let declaration;
try {
declaration = parse_statement_at(parser, parser.template, start);
} catch (error) {
if (!parser.loose) throw error;
const end = find_matching_bracket(parser.template, start, '{');
if (end === undefined) throw error;
parser.index = end;
const kind = parser.template.startsWith('const', start) ? 'const' : 'let';
declaration = {
type: 'VariableDeclaration',
kind,
declarations: [
{
type: 'VariableDeclarator',
id: {
type: 'Identifier',
name: '',
start: parser.index,
end: parser.index
},
init: null,
start: parser.index,
end: parser.index
}
],
start,
end
};
}
if (declaration.type !== 'VariableDeclaration') {
e.declaration_tag_invalid_type({
start: declaration.start ?? start,
end: declaration.end ?? parser.index
});
}
// TODO support using
if (declaration.kind !== 'let' && declaration.kind !== 'const') {
e.declaration_tag_invalid_type(declaration);
}
parser.index = /** @type {number} */ (declaration.end);
parser.allow_whitespace();
parser.eat('}', true);
return declaration;
}
/** @param {Parser} parser */

@@ -54,0 +142,0 @@ function open(parser) {

@@ -39,2 +39,3 @@ /** @import * as ESTree from 'estree' */

import { ConstTag } from './visitors/ConstTag.js';
import { DeclarationTag } from './visitors/DeclarationTag.js';
import { DebugTag } from './visitors/DebugTag.js';

@@ -161,2 +162,3 @@ import { EachBlock } from './visitors/EachBlock.js';

ConstTag,
DeclarationTag,
DebugTag,

@@ -317,2 +319,3 @@ EachBlock,

parent_element: null,
in_declaration_tag: false,
reactive_statement: null,

@@ -724,2 +727,3 @@ derived_function_depth: -1

parent_element: null,
in_declaration_tag: false,
has_props_rune: false,

@@ -792,2 +796,3 @@ component_slots: new Set(),

parent_element: null,
in_declaration_tag: false,
has_props_rune: false,

@@ -794,0 +799,0 @@ ast_type: ast === instance.ast ? 'instance' : ast === template.ast ? 'template' : 'module',

@@ -258,2 +258,5 @@ /** @import { ArrowFunctionExpression, CallExpression, Expression, FunctionDeclaration, FunctionExpression, Identifier, VariableDeclarator } from 'estree' */

}
// Tell surrounding declaration tag about metadata for correct calculation of blockers etc
if (context.state.in_declaration_tag) context.state.expression?.merge(expression);
} else if (rune === '$inspect') {

@@ -260,0 +263,0 @@ context.next({ ...context.state, function_depth: context.state.function_depth + 1 });

/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import * as b from '#compiler/builders';
import { validate_opening_tag } from './shared/utils.js';
import { mark_async_declaration } from './DeclarationTag.js';

@@ -47,26 +47,3 @@ /**

const has_await = node.metadata.expression.has_await;
const blockers = [...node.metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== context.state.async_consts?.id);
if (has_await || context.state.async_consts || blockers.length > 0) {
const run = (context.state.async_consts ??= {
id: context.state.analysis.root.unique('promises'),
declaration_count: 0
});
node.metadata.promises_id = run.id;
const bindings = context.state.scope.get_bindings(declaration);
// keep the counter in sync with the number of thunks pushed in ConstTag in transform
// TODO 6.0 once non-async and non-runes mode is gone investigate making this more robust
// via something like the approach in https://github.com/sveltejs/svelte/pull/18032
const length = run.declaration_count + (blockers.length > 0 ? 1 : 0);
run.declaration_count += blockers.length > 0 ? 2 : 1;
const blocker = b.member(run.id, b.literal(length), true);
for (const binding of bindings) {
binding.blocker = blocker;
}
}
mark_async_declaration(context, node.metadata, [declaration]);
}

@@ -165,3 +165,3 @@ /** @import { Expression, Identifier } from 'estree' */

// Find out if this references a {@const ...} declaration of an implicit children snippet
// Find out if this references a {@const ...}/{let/const ...} declaration of an implicit children snippet
// when it is itself inside a snippet block at the same level. If so, error.

@@ -168,0 +168,0 @@ for (let i = context.path.length - 1; i >= 0; i--) {

@@ -7,3 +7,3 @@ /** @import * as ESTree from 'estree' */

import * as b from '#compiler/builders';
import { build_getter, is_state_source } from './utils.js';
import { build_getter, get_transform } from './utils.js';
import { render_stylesheet } from '../css/index.js';

@@ -26,2 +26,3 @@ import { dev, filename } from '../../../state.js';

import { ConstTag } from './visitors/ConstTag.js';
import { DeclarationTag } from './visitors/DeclarationTag.js';
import { DebugTag } from './visitors/DebugTag.js';

@@ -71,16 +72,3 @@ import { EachBlock } from './visitors/EachBlock.js';

if (scope && scope !== state.scope) {
const transform = { ...state.transform };
for (const [name, binding] of scope.declarations) {
if (
binding.kind === 'normal' ||
// Reads of `$state(...)` declarations are not
// transformed if they are never reassigned
(binding.kind === 'state' && !is_state_source(binding, state.analysis))
) {
delete transform[name];
}
}
next({ ...state, transform, scope });
next({ ...state, transform: get_transform(scope, state), scope });
} else {

@@ -105,2 +93,3 @@ next();

ConstTag,
DeclarationTag,
DebugTag,

@@ -159,2 +148,3 @@ EachBlock,

hoisted: [b.import_all('$', 'svelte/internal/client'), ...analysis.instance_body.hoisted],
templates: new Map(),
node: /** @type {any} */ (null), // populated by the root node

@@ -161,0 +151,0 @@ legacy_reactive_imports: [],

@@ -0,1 +1,2 @@

/** @import { TemplateLiteral } from 'estree' */
/** @import { Namespace } from '#compiler' */

@@ -34,6 +35,7 @@ /** @import { ComponentClientTransformState } from '../types.js' */

* @param {ComponentClientTransformState} state
* @param {Namespace} namespace
* @param {string} name
* @param {number} [flags]
*/
export function transform_template(state, namespace, flags = 0) {
export function transform_template(state, name, flags = 0) {
const namespace = state.metadata.namespace;
const tree = state.options.fragments === 'tree';

@@ -43,2 +45,16 @@

const key =
tree || dev
? null
: get_template_key(
/** @type {TemplateLiteral} */ (expression),
state.metadata.namespace,
flags
);
if (key !== null) {
const existing = state.templates.get(key);
if (existing !== undefined) return existing;
}
if (tree) {

@@ -68,3 +84,24 @@ if (namespace === 'svg') flags |= TEMPLATE_USE_SVG;

return call;
const id = state.scope.root.unique(name);
state.hoisted.push(b.var(id, call));
if (key !== null) {
state.templates.set(key, id);
}
return id;
}
/**
* Returns a stable key for templates that are safe to deduplicate - plain
* `$.from_html`/`from_svg`/`from_mathml` factories with literal arguments - or `null`
* for anything else. Dev-mode templates are wrapped in `$.add_locations(...)`, which
* embeds per-call-site locations, so they never produce a key and are never shared.
* @param {TemplateLiteral} template
* @param {Namespace} namespace
* @param {number} flags
* @returns {string | null}
*/
function get_template_key(template, namespace, flags) {
return `${namespace} ${flags} ${template.quasis[0].value.raw}`;
}

@@ -182,1 +182,22 @@ /** @import { BlockStatement, Expression, Identifier } from 'estree' */

}
/**
* @param {Scope} scope
* @param {ClientTransformState} state
*/
export function get_transform(scope, state) {
const transform = { ...state.transform };
for (const [name, binding] of scope.declarations) {
if (
binding.kind === 'normal' ||
// Reads of `$state(...)` declarations are not
// transformed if they are never reassigned
(binding.kind === 'state' && !is_state_source(binding, state.analysis))
) {
delete transform[name];
}
}
return transform;
}

@@ -10,2 +10,3 @@ /** @import { Expression, Identifier, Pattern, Statement } from 'estree' */

import { build_expression } from './shared/utils.js';
import { add_async_declaration } from './DeclarationTag.js';

@@ -30,3 +31,3 @@ /**

add_const_declaration(context.state, declaration.id, expression, node.metadata);
add_const_declaration(context, declaration.id, expression, node.metadata);
} else {

@@ -68,3 +69,3 @@ const identifiers = extract_identifiers(declaration.id);

add_const_declaration(context.state, tmp, expression, node.metadata);
add_const_declaration(context, tmp, expression, node.metadata);

@@ -80,3 +81,3 @@ for (const node of identifiers) {

/**
* @param {ComponentContext['state']} state
* @param {ComponentContext} context
* @param {Identifier} id

@@ -86,3 +87,3 @@ * @param {Expression} expression

*/
function add_const_declaration(state, id, expression, metadata) {
function add_const_declaration(context, id, expression, metadata) {
// we need to eagerly evaluate the expression in order to hit any

@@ -92,24 +93,12 @@ // 'Cannot access x before initialization' errors

const blockers = [...metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== state.async_consts?.id);
if (metadata.promises_id) {
const run = (state.async_consts ??= {
id: metadata.promises_id,
thunks: []
});
state.consts.push(b.let(id));
if (blockers.length === 1) {
run.thunks.push(b.thunk(b.member(/** @type {Expression} */ (blockers[0]), 'promise')));
} else if (blockers.length > 0) {
run.thunks.push(b.thunk(b.call('$.wait', b.array(blockers))));
}
// keep the number of thunks pushed in sync with ConstTag in analysis phase
const assignment = b.assignment('=', id, expression);
run.thunks.push(b.thunk(assignment, metadata.expression.has_await));
add_async_declaration(
context,
metadata,
[id],
[b.stmt(b.assignment('=', id, expression))],
'let'
);
} else {
const { state } = context;
state.consts.push(b.const(id, expression));

@@ -116,0 +105,0 @@ state.consts.push(...after);

@@ -55,3 +55,2 @@ /** @import { Expression, Statement } from 'estree' */

/** @type {AST.IfBlock} */ (parent).metadata.flattened?.includes(trimmed[0])));
const template_name = context.state.scope.root.unique('root'); // TODO infer name from parent

@@ -100,4 +99,3 @@ /** @type {Statement[]} */

const template = transform_template(state, namespace, flags);
state.hoisted.push(b.var(template_name, template));
const template_name = transform_template(state, 'root', flags);

@@ -152,4 +150,3 @@ state.init.unshift(b.var(id, b.call(template_name)));

} else {
const template = transform_template(state, namespace, flags);
state.hoisted.push(b.var(template_name, template));
const template_name = transform_template(state, 'root', flags);

@@ -156,0 +153,0 @@ state.init.unshift(b.var(id, b.call(template_name)));

@@ -21,3 +21,3 @@ /** @import { ArrayExpression, Expression, ExpressionStatement, Identifier, MemberExpression, ObjectExpression } from 'estree' */

import { clean_nodes, determine_namespace_for_children } from '../../utils.js';
import { build_getter } from '../utils.js';
import { build_getter, get_transform } from '../utils.js';
import {

@@ -304,2 +304,4 @@ get_attribute_name,

const scope = /** @type {Scope} */ (context.state.scopes.get(node.fragment));
/** @type {ComponentClientTransformState} */

@@ -309,3 +311,4 @@ const state = {

metadata,
scope: /** @type {Scope} */ (context.state.scopes.get(node.fragment)),
scope,
transform: get_transform(scope, context.state),
preserve_whitespace: context.state.preserve_whitespace || name === 'pre' || name === 'textarea'

@@ -324,4 +327,15 @@ };

const has_declarations = !node.fragment.metadata.transparent;
/** @type {typeof state} */
const child_state = { ...state, init: [], update: [], after_update: [], snippets: [] };
const child_state = {
...state,
init: [],
update: [],
after_update: [],
snippets: [],
consts: has_declarations ? [] : state.consts,
async_consts: has_declarations ? undefined : state.async_consts,
memoizer: has_declarations ? new Memoizer() : state.memoizer
};

@@ -367,3 +381,2 @@ for (const node of hoisted) {

// Create a separate template for the rich content
const template_name = context.state.scope.root.unique(`${name}_content`);
const fragment_id = b.id(context.state.scope.generate('fragment'));

@@ -392,5 +405,4 @@ const anchor_id = b.id(context.state.scope.generate('anchor'));

// Transform the template to $.from_html(...) and hoist it
const template = transform_template(select_state, metadata.namespace, TEMPLATE_FRAGMENT);
context.state.hoisted.push(b.var(template_name, template));
// Transform the template to $.from_html(...) and hoist it (deduplicating identical templates)
const template_name = transform_template(select_state, `${name}_content`, TEMPLATE_FRAGMENT);

@@ -436,3 +448,12 @@ // Build the rich content function body

if (node.fragment.nodes.some((node) => node.type === 'SnippetBlock')) {
if (node.fragment.nodes.some((node) => node.type === 'SnippetBlock') || has_declarations) {
if (child_state.async_consts && child_state.async_consts.thunks.length > 0) {
child_state.consts.push(
b.var(
child_state.async_consts.id,
b.call('$.run', b.array(child_state.async_consts.thunks))
)
);
}
// Wrap children in `{...}` to avoid declaration conflicts

@@ -442,2 +463,3 @@ context.state.init.push(

...child_state.snippets,
...child_state.consts,
...child_state.init,

@@ -444,0 +466,0 @@ ...element_state.init,

@@ -43,2 +43,3 @@ /** @import { BlockStatement, Statement, Expression, VariableDeclaration } from 'estree' */

let has_const = false;
let has_declaration = false;

@@ -59,2 +60,6 @@ // const tags need to live inside the boundary, but might also be referenced in hoisted snippets.

}
if (child.type === 'DeclarationTag') {
has_declaration = true;
}
}

@@ -73,6 +78,6 @@

context.state.options.experimental.async &&
has_const &&
(has_const || has_declaration) &&
!['failed', 'pending'].includes(child.expression.name)
) {
// we can't hoist snippets as they may reference const tags, so we just keep them in the fragment
// we can't hoist snippets as they may reference const/declaration tags, so we just keep them in the fragment
nodes.push(child);

@@ -79,0 +84,0 @@ } else {

@@ -52,4 +52,9 @@ /** @import { CallExpression, Expression, Identifier, Literal, VariableDeclaration, VariableDeclarator } from 'estree' */

if (declarator.id.type === 'Identifier') {
const exclude_id = context.state.scope.root.unique('rest_excludes');
context.state.hoisted.push(
b.var(exclude_id, b.new('Set', b.array(seen.map((name) => b.literal(name)))))
);
/** @type {Expression[]} */
const args = [b.id('$$props'), b.array(seen.map((name) => b.literal(name)))];
const args = [b.id('$$props'), exclude_id];

@@ -99,4 +104,9 @@ if (dev) {

// RestElement
const exclude_id = context.state.scope.root.unique('rest_excludes');
context.state.hoisted.push(
b.var(exclude_id, b.new('Set', b.array(seen.map((name) => b.literal(name)))))
);
/** @type {Expression[]} */
const args = [b.id('$$props'), b.array(seen.map((name) => b.literal(name)))];
const args = [b.id('$$props'), exclude_id];

@@ -103,0 +113,0 @@ if (dev) {

@@ -18,2 +18,3 @@ /** @import * as ESTree from 'estree' */

import { ConstTag } from './visitors/ConstTag.js';
import { DeclarationTag } from './visitors/DeclarationTag.js';
import { DebugTag } from './visitors/DebugTag.js';

@@ -68,2 +69,3 @@ import { EachBlock } from './visitors/EachBlock.js';

ConstTag,
DeclarationTag,
DebugTag,

@@ -70,0 +72,0 @@ EachBlock,

@@ -1,2 +0,2 @@

/** @import { Expression, Pattern, Statement } from 'estree' */
/** @import { Expression, Pattern } from 'estree' */
/** @import { AST } from '#compiler' */

@@ -6,2 +6,3 @@ /** @import { ComponentContext } from '../types.js' */

import { extract_identifiers } from '../../../../utils/ast.js';
import { add_async_declaration } from './DeclarationTag.js';

@@ -16,27 +17,11 @@ /**

const init = /** @type {Expression} */ (context.visit(declaration.init));
const blockers = [...node.metadata.expression.dependencies]
.map((dep) => dep.blocker)
.filter((b) => b !== null && b.object !== context.state.async_consts?.id);
if (node.metadata.promises_id) {
const run = (context.state.async_consts ??= {
id: node.metadata.promises_id,
thunks: []
});
const identifiers = extract_identifiers(declaration.id);
for (const identifier of identifiers) {
context.state.init.push(b.let(identifier.name));
}
if (blockers.length === 1) {
run.thunks.push(b.thunk(/** @type {Expression} */ (blockers[0])));
} else if (blockers.length > 0) {
run.thunks.push(b.thunk(b.call('Promise.all', b.array(blockers))));
}
// keep the number of thunks pushed in sync with ConstTag in analysis phase
const assignment = b.assignment('=', id, init);
run.thunks.push(b.thunk(assignment, node.metadata.expression.has_await));
add_async_declaration(
context,
node.metadata,
extract_identifiers(id),
[b.stmt(b.assignment('=', id, init))],
'let'
);
} else {

@@ -43,0 +28,0 @@ context.state.init.push(b.const(id, init));

@@ -20,2 +20,3 @@ /** @import { Expression } from 'estree' */

const namespace = determine_namespace_for_children(node, context.state.namespace);
const has_child_declarations = !node.fragment.metadata.transparent;

@@ -26,8 +27,13 @@ /** @type {ComponentServerTransformState} */

namespace,
scope: /** @type {Scope} */ (context.state.scopes.get(node.fragment)),
preserve_whitespace:
context.state.preserve_whitespace || node.name === 'pre' || node.name === 'textarea',
init: [],
template: []
template: [],
async_consts: undefined
};
/** @type {ComponentServerTransformState} */
const attribute_state = { ...state, scope: context.state.scope };
const node_is_void = is_void(name);

@@ -55,3 +61,7 @@

state.template.push(b.literal(`<${name}`));
body = build_element_attributes(node, { ...context, state }, optimiser.transform);
body = build_element_attributes(
node,
{ ...context, state: attribute_state },
optimiser.transform
);
state.template.push(b.literal(node_is_void ? '/>' : '>')); // add `/>` for XHTML compliance

@@ -78,6 +88,3 @@ }

namespace,
{
...state,
scope: /** @type {Scope} */ (state.scopes.get(node.fragment))
},
state,
state.preserve_whitespace,

@@ -212,4 +219,14 @@ state.options.preserveComments

if (optimiser.is_async()) {
if (has_child_declarations && state.async_consts && state.async_consts.thunks.length > 0) {
state.init.push(
b.var(state.async_consts.id, b.call('$$renderer.run', b.array(state.async_consts.thunks)))
);
}
if (has_child_declarations) {
context.state.template.push(
...optimiser.render([b.block([...state.init, ...build_template(state.template)])])
);
} else if (optimiser.is_async()) {
context.state.template.push(
...optimiser.render([...state.init, ...build_template(state.template)])

@@ -216,0 +233,0 @@ );

@@ -155,2 +155,3 @@ /** @import { TransformState } from './types.js' */

node.type === 'ConstTag' ||
node.type === 'DeclarationTag' ||
node.type === 'DebugTag' ||

@@ -157,0 +158,0 @@ node.type === 'SvelteBody' ||

@@ -220,2 +220,3 @@ /** @import { Expression, PrivateIdentifier, SourceLocation } from 'estree' */

case 'ConstTag':
case 'DeclarationTag':
case 'Comment':

@@ -222,0 +223,0 @@ case 'ExpressionTag':

@@ -606,2 +606,44 @@ /** @import { AST } from '#compiler'; */

DeclarationTag(node, context) {
context.write('{');
// This is duplicated from esrap's handling of VariableDeclaration,
// which we need to do in order to omit the trailing semicolon that esrap would add.
const open = context.new();
const join = context.new();
const child_context = context.new();
context.append(child_context);
child_context.write(`${node.declaration.kind} `);
child_context.append(open);
const declarations = node.declaration.declarations;
let first = true;
for (const d of declarations) {
if (!first) child_context.append(join);
first = false;
child_context.visit(d);
}
const length = child_context.measure() + 2 * (declarations.length - 1);
const multiline = child_context.multiline || (declarations.length > 1 && length > 50);
if (multiline) {
context.multiline = true;
if (declarations.length > 1) open.indent();
join.write(',');
join.newline();
if (declarations.length > 1) context.dedent();
} else {
join.write(', ');
}
context.write('}');
},
DebugTag(node, context) {

@@ -608,0 +650,0 @@ context.write('{@debug ');

@@ -689,3 +689,4 @@ /** @import * as ESTree from 'estree' */

null_instance as null,
debugger_builder as debugger
debugger_builder as debugger,
new_builder as new
};

@@ -692,0 +693,0 @@

@@ -399,3 +399,3 @@ /** @import { Effect, Source, TemplateNode, } from '#client' */

current_batch.on_fork_commit(() => {
current_batch.oncommit(() => {
this.#handle_error(error);

@@ -402,0 +402,0 @@ });

@@ -236,2 +236,8 @@ /** @import { Effect, TemplateNode } from '#client' */

/**
* Branching here is intentional and load-bearing for perf. `createElement(tag)`
* hits a fast path in Blink that `createElementNS(NAMESPACE_HTML, tag)` doesn't,
* and passing an explicit `undefined` as the trailing options arg measurably
* slows both APIs. Funnelling every case through a single `createElementNS(ns,
* tag, options)` call would be smaller but slower on the HTML path.
*
* @template {keyof HTMLElementTagNameMap | string} T

@@ -244,5 +250,9 @@ * @param {T} tag

export function create_element(tag, namespace, is) {
let options = is ? { is } : undefined;
if (namespace == null || namespace === NAMESPACE_HTML) {
return /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */ (
is ? document.createElement(tag, { is }) : document.createElement(tag)
);
}
return /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */ (
document.createElementNS(namespace ?? NAMESPACE_HTML, tag, options)
is ? document.createElementNS(namespace, tag, { is }) : document.createElementNS(namespace, tag)
);

@@ -249,0 +259,0 @@ }

@@ -144,8 +144,2 @@ /** @import { Fork } from 'svelte' */

/**
* Callbacks that should run only when a fork is committed.
* @type {Set<(batch: Batch) => void>}
*/
#fork_commit_callbacks = new Set();
/**
* The number of async effects that are currently in flight

@@ -638,3 +632,2 @@ */

this.#discard_callbacks.clear();
this.#fork_commit_callbacks.clear();

@@ -845,12 +838,2 @@ this.#unlink();

/** @param {(batch: Batch) => void} fn */
on_fork_commit(fn) {
this.#fork_commit_callbacks.add(fn);
}
run_fork_commit_callbacks() {
for (const fn of this.#fork_commit_callbacks) fn(this);
this.#fork_commit_callbacks.clear();
}
settled() {

@@ -1416,6 +1399,2 @@ return (this.#deferred ??= deferred()).promise;

batch.activate();
batch.run_fork_commit_callbacks();
batch.deactivate();
// trigger any `$state.eager(...)` expressions with the new state.

@@ -1422,0 +1401,0 @@ // eager effects don't get scheduled like other effects, so we

@@ -52,7 +52,7 @@ /** @import { Derived, Effect, Source } from './types.js' */

* Is passed the full `$$props` object and excludes the named props.
* @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Array<string | symbol>, name?: string }>}}
* @type {ProxyHandler<{ props: Record<string | symbol, unknown>, exclude: Set<string | symbol>, name?: string }>}}
*/
const rest_props_handler = {
get(target, key) {
if (target.exclude.includes(key)) return;
if (target.exclude.has(key)) return;
return target.props[key];

@@ -69,3 +69,3 @@ },

getOwnPropertyDescriptor(target, key) {
if (target.exclude.includes(key)) return;
if (target.exclude.has(key)) return;
if (key in target.props) {

@@ -80,7 +80,7 @@ return {

has(target, key) {
if (target.exclude.includes(key)) return false;
if (target.exclude.has(key)) return false;
return key in target.props;
},
ownKeys(target) {
return Reflect.ownKeys(target.props).filter((key) => !target.exclude.includes(key));
return Reflect.ownKeys(target.props).filter((key) => !target.exclude.has(key));
}

@@ -91,3 +91,3 @@ };

* @param {Record<string, unknown>} props
* @param {string[]} exclude
* @param {Set<string>} exclude
* @param {string} [name]

@@ -94,0 +94,0 @@ * @returns {Record<string, unknown>}

@@ -35,3 +35,2 @@ /** @import { Derived, Effect, Source, Value } from '#client' */

import { legacy_mode_flag, tracing_mode_flag } from '../../flags/index.js';
import { includes } from '../../shared/utils.js';
import { tag_proxy } from '../dev/tracing.js';

@@ -162,3 +161,3 @@ import { get_error } from '../../shared/dev.js';

(active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 &&
(current_sources === null || !includes.call(current_sources, source))
(current_sources === null || !current_sources.has(source))
) {

@@ -165,0 +164,0 @@ e.state_unsafe_mutation();

@@ -93,3 +93,3 @@ /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */

* them within that reaction should not cause a re-run
* @type {null | Source[]}
* @type {null | Set<Source>}
*/

@@ -101,7 +101,3 @@ export let current_sources = null;

if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) {
if (current_sources === null) {
current_sources = [value];
} else {
current_sources.push(value);
}
(current_sources ??= new Set()).add(value);
}

@@ -207,3 +203,3 @@ }

if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) {
if (!async_mode_flag && current_sources !== null && current_sources.has(signal)) {
return;

@@ -546,3 +542,3 @@ }

if (!destroyed && (current_sources === null || !includes.call(current_sources, signal))) {
if (!destroyed && (current_sources === null || !current_sources.has(signal))) {
var deps = active_reaction.deps;

@@ -549,0 +545,0 @@

@@ -437,3 +437,3 @@ const regex_return_characters = /\r/g;

const RUNES = /** @type {const} */ ([
export const RUNES = /** @type {const} */ ([
...STATE_CREATION_RUNES,

@@ -440,0 +440,0 @@ '$state.eager',

@@ -7,3 +7,3 @@ // generated during release, do not modify

*/
export const VERSION = '5.55.10';
export const VERSION = '5.56.0';
export const PUBLIC_VERSION = '5';

@@ -276,4 +276,4 @@ {

],
"mappings": ";;;;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmC/BC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwEhBC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;kBAwBbC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoCbC,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;aAwBrBC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCfC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BdC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;kBAuBRC,OAAOA;;;;;;;;;;;;;;;;kBAgBPC,eAAeA;;;;;;;;;;;;;;;;aAgBpBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA+CPC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCzSLC,cAAcA;;;;;;;;;;;;iBAsBdC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aCRlBnH,cAAcA;;aAfdH,OAAOA;;;MAIZE,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAkJRE,oBAAoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MC9KzBC,SAASA",
"ignoreList": []
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display