Comparing version 5.0.0-next.192 to 5.0.0-next.193
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.0.0-next.192", | ||
"version": "5.0.0-next.193", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "types": "./types/index.d.ts", |
@@ -167,2 +167,3 @@ export { FILENAME, ORIGINAL } from '../../constants.js'; | ||
export { | ||
invalid_default_snippet, | ||
validate_component, | ||
@@ -169,0 +170,0 @@ validate_dynamic_element_tag, |
@@ -122,2 +122,3 @@ import { DEV } from 'esm-env'; | ||
const was_hydrating = hydrating; | ||
const previous_hydrate_node = hydrate_node; | ||
@@ -179,2 +180,3 @@ try { | ||
set_hydrating(was_hydrating); | ||
set_hydrate_node(previous_hydrate_node); | ||
reset_head_anchor(); | ||
@@ -181,0 +183,0 @@ } |
@@ -559,2 +559,3 @@ /** @import { Component, Payload, RenderOutput } from '#server' */ | ||
add_snippet_symbol, | ||
invalid_default_snippet, | ||
validate_component, | ||
@@ -561,0 +562,0 @@ validate_dynamic_element_tag, |
@@ -6,2 +6,18 @@ /* This file is generated by scripts/process-messages/index.js. Do not edit! */ | ||
/** | ||
* Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead | ||
* @returns {never} | ||
*/ | ||
export function invalid_default_snippet() { | ||
if (DEV) { | ||
const error = new Error(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead`); | ||
error.name = 'Svelte error'; | ||
throw error; | ||
} else { | ||
// TODO print a link to the documentation | ||
throw new Error("invalid_default_snippet"); | ||
} | ||
} | ||
/** | ||
* `%name%(...)` can only be used during component initialisation | ||
@@ -8,0 +24,0 @@ * @param {string} name |
@@ -9,2 +9,4 @@ /** @import { TemplateNode } from '#client' */ | ||
export const invalid_default_snippet = add_snippet_symbol(e.invalid_default_snippet); | ||
/** | ||
@@ -14,2 +16,3 @@ * @param {any} fn | ||
*/ | ||
/*@__NO_SIDE_EFFECTS__*/ | ||
export function add_snippet_symbol(fn) { | ||
@@ -23,9 +26,5 @@ fn[snippet_symbol] = true; | ||
* @param {any} snippet_fn | ||
* @param {Record<string, any> | undefined} $$props Only passed if render tag receives arguments and is for the children prop | ||
*/ | ||
export function validate_snippet(snippet_fn, $$props) { | ||
if ( | ||
($$props?.$$slots?.default && typeof $$props.$$slots.default !== 'boolean') || | ||
(snippet_fn && snippet_fn[snippet_symbol] !== true) | ||
) { | ||
export function validate_snippet(snippet_fn) { | ||
if (snippet_fn && snippet_fn[snippet_symbol] !== true) { | ||
e.render_tag_invalid_argument(); | ||
@@ -32,0 +31,0 @@ } |
@@ -9,3 +9,3 @@ // generated during release, do not modify | ||
*/ | ||
export const VERSION = '5.0.0-next.192'; | ||
export const VERSION = '5.0.0-next.193'; | ||
export const PUBLIC_VERSION = '5'; |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2161207
47549