|
|
@ -90,15 +90,16 @@ export function stringify(value) {
|
|
|
|
* @param {import('../../index.js').ComponentType<import('../../index.js').SvelteComponent<Props, Events>>} component
|
|
|
|
* @param {import('../../index.js').ComponentType<import('../../index.js').SvelteComponent<Props, Events>>} component
|
|
|
|
* @param {{
|
|
|
|
* @param {{
|
|
|
|
* target: Document | Element | ShadowRoot;
|
|
|
|
* target: Document | Element | ShadowRoot;
|
|
|
|
|
|
|
|
* anchor?: Node;
|
|
|
|
* props?: Props;
|
|
|
|
* props?: Props;
|
|
|
|
* events?: { [Property in keyof Events]: (e: Events[Property]) => any };
|
|
|
|
* events?: { [Property in keyof Events]: (e: Events[Property]) => any };
|
|
|
|
* context?: Map<any, any>;
|
|
|
|
* context?: Map<any, any>;
|
|
|
|
* intro?: boolean;
|
|
|
|
* intro?: boolean;
|
|
|
|
* }} options
|
|
|
|
* }} options
|
|
|
|
* @returns {Exports}
|
|
|
|
* @returns {Exports}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
export function mount(component, options) {
|
|
|
|
export function mount(component, options) {
|
|
|
|
const anchor = options.target.appendChild(empty());
|
|
|
|
const anchor = options.anchor ?? options.target.appendChild(empty());
|
|
|
|
// Don't flush previous effects to ensure order of outer effects stays consistent
|
|
|
|
// Don't flush previous effects to ensure order of outer effects stays consistent
|
|
|
|
return flush_sync(() => _mount(component, { ...options, anchor }), false);
|
|
|
|
return flush_sync(() => _mount(component, { ...options, anchor }), false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -187,7 +188,7 @@ export function hydrate(component, options) {
|
|
|
|
* anchor: Node;
|
|
|
|
* anchor: Node;
|
|
|
|
* props?: Props;
|
|
|
|
* props?: Props;
|
|
|
|
* events?: { [Property in keyof Events]: (e: Events[Property]) => any };
|
|
|
|
* events?: { [Property in keyof Events]: (e: Events[Property]) => any };
|
|
|
|
* context?: Map<any, any>;
|
|
|
|
* context?: Map<any, any>;
|
|
|
|
* intro?: boolean;
|
|
|
|
* intro?: boolean;
|
|
|
|
* }} options
|
|
|
|
* }} options
|
|
|
|
* @returns {Exports}
|
|
|
|
* @returns {Exports}
|
|
|
|