|
|
@ -10,7 +10,6 @@ import {
|
|
|
|
import * as b from '#compiler/builders';
|
|
|
|
import * as b from '#compiler/builders';
|
|
|
|
import { is_element_node } from '../../../../nodes.js';
|
|
|
|
import { is_element_node } from '../../../../nodes.js';
|
|
|
|
import { dev } from '../../../../../state.js';
|
|
|
|
import { dev } from '../../../../../state.js';
|
|
|
|
import { get_attribute_chunks } from '../../../../../utils/ast.js';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param {AST.Component | AST.SvelteComponent | AST.SvelteSelf} node
|
|
|
|
* @param {AST.Component | AST.SvelteComponent | AST.SvelteSelf} node
|
|
|
@ -242,14 +241,7 @@ export function build_inline_component(node, expression, context) {
|
|
|
|
params.push(pattern);
|
|
|
|
params.push(pattern);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const slot_fn = b.arrow(
|
|
|
|
const slot_fn = b.arrow(params, b.block(block.body));
|
|
|
|
params,
|
|
|
|
|
|
|
|
// TODO: This will always produce correct results because it will always produce async functions
|
|
|
|
|
|
|
|
// if the current component is an async component, but it may produce async functions where they're
|
|
|
|
|
|
|
|
// not necessary -- eg. when the component is asynchronous but the child content is not.
|
|
|
|
|
|
|
|
// May or may not be worth optimizing.
|
|
|
|
|
|
|
|
b.block([call_child_payload(b.block(block.body), node.fragment.metadata.is_async)])
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (slot_name === 'default' && !has_children_prop) {
|
|
|
|
if (slot_name === 'default' && !has_children_prop) {
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|