consterror=newError(`${"bind_invalid_checkbox_value"}\n${"Using `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead"}`);
consterror=newError(`bind_invalid_checkbox_value\nUsing \`bind:value\` together with a checkbox input is not allowed. Use \`bind:checked\` instead`);
error.name='Svelte error';
throwerror;
@ -27,7 +27,7 @@ export function bind_invalid_checkbox_value() {
consterror=newError(`${"bind_invalid_export"}\n${`Component ${component} has an export named \`${key}\` that a consumer component is trying to access using \`bind:${key}\`, which is disallowed. Instead, use \`bind:this\` (e.g. \`<${name} bind:this={component} />\`) and then access the property on the bound component instance (e.g. \`component.${key}\`)`}`);
consterror=newError(`bind_invalid_export\nComponent ${component} has an export named \`${key}\` that a consumer component is trying to access using \`bind:${key}\`, which is disallowed. Instead, use \`bind:this\` (e.g. \`<${name} bind:this={component} />\`) and then access the property on the bound component instance (e.g. \`component.${key}\`)`);
error.name='Svelte error';
throwerror;
@ -46,7 +46,7 @@ export function bind_invalid_export(component, key, name) {
consterror=newError(`${"bind_not_bindable"}\n${`A component is attempting to bind to a non-bindable property \`${key}\` belonging to ${component} (i.e. \`<${name} bind:${key}={...}>\`). To mark a property as bindable: \`let { ${key} = $bindable() } = $props()\``}`);
consterror=newError(`bind_not_bindable\nA component is attempting to bind to a non-bindable property \`${key}\` belonging to ${component} (i.e. \`<${name} bind:${key}={...}>\`). To mark a property as bindable: \`let { ${key} = $bindable() } = $props()\``);
error.name='Svelte error';
throwerror;
@ -65,7 +65,7 @@ export function bind_not_bindable(key, component, name) {
consterror=newError(`${"component_api_changed"}\n${`${parent} called \`${method}\` on an instance of ${component}, which is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information`}`);
consterror=newError(`component_api_changed\n${parent} called \`${method}\` on an instance of ${component}, which is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information`);
error.name='Svelte error';
throwerror;
@ -83,7 +83,7 @@ export function component_api_changed(parent, method, component) {
consterror=newError(`${"component_api_invalid_new"}\n${`Attempted to instantiate ${component} with \`new ${name}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`legacy.componentApi\` compiler option to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information`}`);
consterror=newError(`component_api_invalid_new\nAttempted to instantiate ${component} with \`new ${name}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`legacy.componentApi\` compiler option to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information`);
error.name='Svelte error';
throwerror;
@ -102,7 +102,7 @@ export function component_api_invalid_new(component, name) {
*/
exportfunctioneach_key_duplicate(a,b,value){
if(DEV){
consterror=newError(`${"each_key_duplicate"}\n${value?`Keyed each block has duplicate key \`${value}\` at indexes ${a} and ${b}`:`Keyed each block has duplicate key at indexes ${a} and ${b}`}`);
consterror=newError(`each_key_duplicate\n${value?`Keyed each block has duplicate key \`${value}\` at indexes ${a} and ${b}`:`Keyed each block has duplicate key at indexes ${a} and ${b}`}`);
error.name='Svelte error';
throwerror;
@ -119,7 +119,7 @@ export function each_key_duplicate(a, b, value) {
*/
exportfunctioneffect_in_teardown(rune){
if(DEV){
consterror=newError(`${"effect_in_teardown"}\n${`\`${rune}\` cannot be used inside an effect cleanup function`}`);
consterror=newError(`effect_in_teardown\n\`${rune}\` cannot be used inside an effect cleanup function`);
error.name='Svelte error';
throwerror;
@ -135,7 +135,7 @@ export function effect_in_teardown(rune) {
*/
exportfunctioneffect_in_unowned_derived(){
if(DEV){
consterror=newError(`${"effect_in_unowned_derived"}\n${"Effect cannot be created inside a `$derived` value that was not itself created inside an effect"}`);
consterror=newError(`effect_in_unowned_derived\nEffect cannot be created inside a \`$derived\` value that was not itself created inside an effect`);
error.name='Svelte error';
throwerror;
@ -152,7 +152,7 @@ export function effect_in_unowned_derived() {
*/
exportfunctioneffect_orphan(rune){
if(DEV){
consterror=newError(`${"effect_orphan"}\n${`\`${rune}\` can only be used inside an effect (e.g. during component initialisation)`}`);
consterror=newError(`effect_orphan\n\`${rune}\` can only be used inside an effect (e.g. during component initialisation)`);
error.name='Svelte error';
throwerror;
@ -168,7 +168,7 @@ export function effect_orphan(rune) {
*/
exportfunctioneffect_update_depth_exceeded(){
if(DEV){
consterror=newError(`${"effect_update_depth_exceeded"}\n${"Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops"}`);
consterror=newError(`effect_update_depth_exceeded\nMaximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops`);
error.name='Svelte error';
throwerror;
@ -184,7 +184,7 @@ export function effect_update_depth_exceeded() {
*/
exportfunctionhydration_failed(){
if(DEV){
consterror=newError(`${"hydration_failed"}\n${"Failed to hydrate the application"}`);
consterror=newError(`hydration_failed\nFailed to hydrate the application`);
error.name='Svelte error';
throwerror;
@ -201,7 +201,7 @@ export function hydration_failed() {
*/
exportfunctionlifecycle_legacy_only(name){
if(DEV){
consterror=newError(`${"lifecycle_legacy_only"}\n${`\`${name}(...)\` cannot be used in runes mode`}`);
consterror=newError(`lifecycle_legacy_only\n\`${name}(...)\` cannot be used in runes mode`);
error.name='Svelte error';
throwerror;
@ -218,7 +218,7 @@ export function lifecycle_legacy_only(name) {
*/
exportfunctionprops_invalid_value(key){
if(DEV){
consterror=newError(`${"props_invalid_value"}\n${`Cannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value`}`);
consterror=newError(`props_invalid_value\nCannot do \`bind:${key}={undefined}\` when \`${key}\` has a fallback value`);
error.name='Svelte error';
throwerror;
@ -235,7 +235,7 @@ export function props_invalid_value(key) {
*/
exportfunctionprops_rest_readonly(property){
if(DEV){
consterror=newError(`${"props_rest_readonly"}\n${`Rest element properties of \`$props()\` such as \`${property}\` are readonly`}`);
consterror=newError(`props_rest_readonly\nRest element properties of \`$props()\` such as \`${property}\` are readonly`);
error.name='Svelte error';
throwerror;
@ -252,7 +252,7 @@ export function props_rest_readonly(property) {
*/
exportfunctionrune_outside_svelte(rune){
if(DEV){
consterror=newError(`${"rune_outside_svelte"}\n${`The \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files`}`);
consterror=newError(`rune_outside_svelte\nThe \`${rune}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files`);
error.name='Svelte error';
throwerror;
@ -268,7 +268,7 @@ export function rune_outside_svelte(rune) {
*/
exportfunctionstate_prototype_fixed(){
if(DEV){
consterror=newError(`${"state_prototype_fixed"}\n${"Cannot set prototype of `$state` object"}`);
consterror=newError(`state_prototype_fixed\nCannot set prototype of \`$state\` object`);
error.name='Svelte error';
throwerror;
@ -284,7 +284,7 @@ export function state_prototype_fixed() {
*/
exportfunctionstate_unsafe_mutation(){
if(DEV){
consterror=newError(`${"state_unsafe_mutation"}\n${"Updating state inside a derived is forbidden. If the value should not be reactive, declare it without `$state`"}`);
consterror=newError(`state_unsafe_mutation\nUpdating state inside a derived is forbidden. If the value should not be reactive, declare it without \`$state\``);
error.name='Svelte error';
throwerror;
@ -300,7 +300,7 @@ export function state_unsafe_mutation() {
consterror=newError(`${"svelte_component_invalid_this_value"}\n${"The `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined"}`);
consterror=newError(`svelte_component_invalid_this_value\nThe \`this={...}\` property of a \`<svelte:component>\` must be a Svelte component, if defined`);
console.warn(`%c[svelte] ${"hydration_attribute_changed"}\n%c${`The \`${attribute}\` attribute on \`${html}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value`}`,bold,normal);
console.warn(`%c[svelte] hydration_attribute_changed\n%cThe \`${attribute}\` attribute on \`${html}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value`,bold,normal);
}else{
// TODO print a link to the documentation
console.warn("hydration_attribute_changed");
@ -26,7 +26,7 @@ export function hydration_attribute_changed(attribute, html, value) {
*/
exportfunctionhydration_mismatch(location){
if(DEV){
console.warn(`%c[svelte] ${"hydration_mismatch"}\n%c${location?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}`:"Hydration failed because the initial UI does not match what was rendered on the server"}`,bold,normal);
console.warn(`%c[svelte] hydration_mismatch\n%c${location?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${location}`:"Hydration failed because the initial UI does not match what was rendered on the server"}`,bold,normal);
}else{
// TODO print a link to the documentation
console.warn("hydration_mismatch");
@ -38,7 +38,7 @@ export function hydration_mismatch(location) {
*/
exportfunctionlifecycle_double_unmount(){
if(DEV){
console.warn(`%c[svelte] ${"lifecycle_double_unmount"}\n%c${"Tried to unmount a component that was not mounted"}`,bold,normal);
console.warn(`%c[svelte] lifecycle_double_unmount\n%cTried to unmount a component that was not mounted`,bold,normal);
}else{
// TODO print a link to the documentation
console.warn("lifecycle_double_unmount");
@ -53,7 +53,7 @@ export function lifecycle_double_unmount() {
console.warn(`%c[svelte] ${"ownership_invalid_binding"}\n%c${`${parent} passed a value to ${child} with \`bind:\`, but the value is owned by ${owner}. Consider creating a binding between ${owner} and ${parent}`}`,bold,normal);
console.warn(`%c[svelte] ownership_invalid_binding\n%c${parent} passed a value to ${child} with \`bind:\`, but the value is owned by ${owner}. Consider creating a binding between ${owner} and ${parent}`,bold,normal);
}else{
// TODO print a link to the documentation
console.warn("ownership_invalid_binding");
@ -67,7 +67,7 @@ export function ownership_invalid_binding(parent, child, owner) {
console.warn(`%c[svelte] ${"ownership_invalid_mutation"}\n%c${component?`${component} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}`,bold,normal);
console.warn(`%c[svelte] ownership_invalid_mutation\n%c${component?`${component} mutated a value owned by ${owner}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead`:"Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}`,bold,normal);
}else{
// TODO print a link to the documentation
console.warn("ownership_invalid_mutation");
@ -80,7 +80,7 @@ export function ownership_invalid_mutation(component, owner) {
console.warn(`%c[svelte] ${"state_proxy_equality_mismatch"}\n%c${`Reactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results. Consider using \`$state.is(a, b)\` instead`}`,bold,normal);
console.warn(`%c[svelte] state_proxy_equality_mismatch\n%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${operator}\` will produce unexpected results. Consider using \`$state.is(a, b)\` instead`,bold,normal);
consterror=newError(`${"lifecycle_outside_component"}\n${`\`${name}(...)\` can only be used during component initialisation`}`);
consterror=newError(`lifecycle_outside_component\n\`${name}(...)\` can only be used during component initialisation`);
error.name='Svelte error';
throwerror;
@ -25,7 +25,7 @@ export function lifecycle_outside_component(name) {
*/
exportfunctionrender_tag_invalid_argument(){
if(DEV){
consterror=newError(`${"render_tag_invalid_argument"}\n${"The argument to `{@render ...}` must be a snippet function, not a component or some other kind of function. If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`"}`);
consterror=newError(`render_tag_invalid_argument\nThe argument to \`{@render ...}\` must be a snippet function, not a component or some other kind of function. If you want to dynamically render one snippet or another, use \`$derived\` and pass its result to \`{@render ...}\``);
error.name='Svelte error';
throwerror;
@ -41,7 +41,7 @@ export function render_tag_invalid_argument() {
*/
exportfunctionsnippet_used_as_component(){
if(DEV){
consterror=newError(`${"snippet_used_as_component"}\n${"A snippet must be rendered with `{@render ...}`"}`);
consterror=newError(`snippet_used_as_component\nA snippet must be rendered with \`{@render ...}\``);
error.name='Svelte error';
throwerror;
@ -58,7 +58,7 @@ export function snippet_used_as_component() {
*/
exportfunctionstore_invalid_shape(name){
if(DEV){
consterror=newError(`${"store_invalid_shape"}\n${`\`${name}\` is not a store with a \`subscribe\` method`}`);
consterror=newError(`store_invalid_shape\n\`${name}\` is not a store with a \`subscribe\` method`);
error.name='Svelte error';
throwerror;
@ -74,7 +74,7 @@ export function store_invalid_shape(name) {
@ -11,7 +11,7 @@ var normal = 'font-weight: normal';
*/
exportfunctiondynamic_void_element_content(tag){
if(DEV){
console.warn(`%c[svelte] ${"dynamic_void_element_content"}\n%c${`\`<svelte:element this="${tag}">\` is a void element — it cannot have content`}`,bold,normal);
console.warn(`%c[svelte] dynamic_void_element_content\n%c\`<svelte:element this="${tag}">\` is a void element — it cannot have content`,bold,normal);