153 lines
10 KiB
JavaScript
153 lines
10 KiB
JavaScript
import "./esm-env-D8Yi5ac9.js";
|
|
// node_modules/svelte/src/internal/client/warnings.js
|
|
var bold = "font-weight: bold";
|
|
var normal = "font-weight: normal";
|
|
/**
|
|
* Assignment to `%property%` property (%location%) will evaluate to the right-hand side, not the value of `%property%` following the assignment. This may result in unexpected behaviour.
|
|
* @param {string} property
|
|
* @param {string} location
|
|
*/
|
|
function assignment_value_stale(property, location) {
|
|
console.warn(`%c[svelte] assignment_value_stale\n%cAssignment to \`${property}\` property (${location}) will evaluate to the right-hand side, not the value of \`${property}\` following the assignment. This may result in unexpected behaviour.\nhttps://svelte.dev/e/assignment_value_stale`, bold, normal);
|
|
}
|
|
/**
|
|
* Detected reactivity loss when reading `%name%`. This happens when state is read in an async function after an earlier `await`
|
|
* @param {string} name
|
|
*/
|
|
function await_reactivity_loss(name) {
|
|
console.warn(`%c[svelte] await_reactivity_loss\n%cDetected reactivity loss when reading \`${name}\`. This happens when state is read in an async function after an earlier \`await\`\nhttps://svelte.dev/e/await_reactivity_loss`, bold, normal);
|
|
}
|
|
/**
|
|
* An async derived, `%name%` (%location%) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
* @param {string} name
|
|
* @param {string} location
|
|
*/
|
|
function await_waterfall(name, location) {
|
|
console.warn(`%c[svelte] await_waterfall\n%cAn async derived, \`${name}\` (${location}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app\nhttps://svelte.dev/e/await_waterfall`, bold, normal);
|
|
}
|
|
/**
|
|
* `%binding%` (%location%) is binding to a non-reactive property
|
|
* @param {string} binding
|
|
* @param {string | undefined | null} [location]
|
|
*/
|
|
function binding_property_non_reactive(binding, location) {
|
|
console.warn(`%c[svelte] binding_property_non_reactive\n%c${location ? `\`${binding}\` (${location}) is binding to a non-reactive property` : `\`${binding}\` is binding to a non-reactive property`}\nhttps://svelte.dev/e/binding_property_non_reactive`, bold, normal);
|
|
}
|
|
/**
|
|
* Your `console.%method%` contained `$state` proxies. Consider using `$inspect(...)` or `$state.snapshot(...)` instead
|
|
* @param {string} method
|
|
*/
|
|
function console_log_state(method) {
|
|
console.warn(`%c[svelte] console_log_state\n%cYour \`console.${method}\` contained \`$state\` proxies. Consider using \`$inspect(...)\` or \`$state.snapshot(...)\` instead\nhttps://svelte.dev/e/console_log_state`, bold, normal);
|
|
}
|
|
/**
|
|
* Reading a derived belonging to a now-destroyed effect may result in stale values
|
|
*/
|
|
function derived_inert() {
|
|
console.warn(`%c[svelte] derived_inert\n%cReading a derived belonging to a now-destroyed effect may result in stale values\nhttps://svelte.dev/e/derived_inert`, bold, normal);
|
|
}
|
|
/**
|
|
* %handler% should be a function. Did you mean to %suggestion%?
|
|
* @param {string} handler
|
|
* @param {string} suggestion
|
|
*/
|
|
function event_handler_invalid(handler, suggestion) {
|
|
console.warn(`%c[svelte] event_handler_invalid\n%c${handler} should be a function. Did you mean to ${suggestion}?\nhttps://svelte.dev/e/event_handler_invalid`, bold, normal);
|
|
}
|
|
/**
|
|
* Expected to find a hydratable with key `%key%` during hydration, but did not.
|
|
* @param {string} key
|
|
*/
|
|
function hydratable_missing_but_expected(key) {
|
|
console.warn(`%c[svelte] hydratable_missing_but_expected\n%cExpected to find a hydratable with key \`${key}\` during hydration, but did not.\nhttps://svelte.dev/e/hydratable_missing_but_expected`, bold, normal);
|
|
}
|
|
/**
|
|
* 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
|
|
* @param {string} attribute
|
|
* @param {string} html
|
|
* @param {string} value
|
|
*/
|
|
function hydration_attribute_changed(attribute, html, value) {
|
|
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\nhttps://svelte.dev/e/hydration_attribute_changed`, bold, normal);
|
|
}
|
|
/**
|
|
* The value of an `{@html ...}` block %location% changed between server and client renders. The client value will be ignored in favour of the server value
|
|
* @param {string | undefined | null} [location]
|
|
*/
|
|
function hydration_html_changed(location) {
|
|
console.warn(`%c[svelte] hydration_html_changed\n%c${location ? `The value of an \`{@html ...}\` block ${location} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}\nhttps://svelte.dev/e/hydration_html_changed`, bold, normal);
|
|
}
|
|
/**
|
|
* Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near %location%
|
|
* @param {string | undefined | null} [location]
|
|
*/
|
|
function hydration_mismatch(location) {
|
|
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"}\nhttps://svelte.dev/e/hydration_mismatch`, bold, normal);
|
|
}
|
|
/**
|
|
* The `render` function passed to `createRawSnippet` should return HTML for a single element
|
|
*/
|
|
function invalid_raw_snippet_render() {
|
|
console.warn(`%c[svelte] invalid_raw_snippet_render\n%cThe \`render\` function passed to \`createRawSnippet\` should return HTML for a single element\nhttps://svelte.dev/e/invalid_raw_snippet_render`, bold, normal);
|
|
}
|
|
/**
|
|
* Detected a migrated `$:` reactive block in `%filename%` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an `$effect`.
|
|
* @param {string} filename
|
|
*/
|
|
function legacy_recursive_reactive_block(filename) {
|
|
console.warn(`%c[svelte] legacy_recursive_reactive_block\n%cDetected a migrated \`$:\` reactive block in \`${filename}\` that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \`$effect\`.\nhttps://svelte.dev/e/legacy_recursive_reactive_block`, bold, normal);
|
|
}
|
|
/**
|
|
* Tried to unmount a component that was not mounted
|
|
*/
|
|
function lifecycle_double_unmount() {
|
|
console.warn(`%c[svelte] lifecycle_double_unmount\n%cTried to unmount a component that was not mounted\nhttps://svelte.dev/e/lifecycle_double_unmount`, bold, normal);
|
|
}
|
|
/**
|
|
* %parent% passed property `%prop%` to %child% with `bind:`, but its parent component %owner% did not declare `%prop%` as a binding. Consider creating a binding between %owner% and %parent% (e.g. `bind:%prop%={...}` instead of `%prop%={...}`)
|
|
* @param {string} parent
|
|
* @param {string} prop
|
|
* @param {string} child
|
|
* @param {string} owner
|
|
*/
|
|
function ownership_invalid_binding(parent, prop, child, owner) {
|
|
console.warn(`%c[svelte] ownership_invalid_binding\n%c${parent} passed property \`${prop}\` to ${child} with \`bind:\`, but its parent component ${owner} did not declare \`${prop}\` as a binding. Consider creating a binding between ${owner} and ${parent} (e.g. \`bind:${prop}={...}\` instead of \`${prop}={...}\`)\nhttps://svelte.dev/e/ownership_invalid_binding`, bold, normal);
|
|
}
|
|
/**
|
|
* Mutating unbound props (`%name%`, at %location%) is strongly discouraged. Consider using `bind:%prop%={...}` in %parent% (or using a callback) instead
|
|
* @param {string} name
|
|
* @param {string} location
|
|
* @param {string} prop
|
|
* @param {string} parent
|
|
*/
|
|
function ownership_invalid_mutation(name, location, prop, parent) {
|
|
console.warn(`%c[svelte] ownership_invalid_mutation\n%cMutating unbound props (\`${name}\`, at ${location}) is strongly discouraged. Consider using \`bind:${prop}={...}\` in ${parent} (or using a callback) instead\nhttps://svelte.dev/e/ownership_invalid_mutation`, bold, normal);
|
|
}
|
|
/**
|
|
* The `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.
|
|
*/
|
|
function select_multiple_invalid_value() {
|
|
console.warn(`%c[svelte] select_multiple_invalid_value\n%cThe \`value\` property of a \`<select multiple>\` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value`, bold, normal);
|
|
}
|
|
/**
|
|
* Reactive `$state(...)` proxies and the values they proxy have different identities. Because of this, comparisons with `%operator%` will produce unexpected results
|
|
* @param {string} operator
|
|
*/
|
|
function state_proxy_equality_mismatch(operator) {
|
|
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\nhttps://svelte.dev/e/state_proxy_equality_mismatch`, bold, normal);
|
|
}
|
|
/**
|
|
* A `<svelte:boundary>` `reset` function only resets the boundary the first time it is called
|
|
*/
|
|
function svelte_boundary_reset_noop() {
|
|
console.warn(`%c[svelte] svelte_boundary_reset_noop\n%cA \`<svelte:boundary>\` \`reset\` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal);
|
|
}
|
|
/**
|
|
* The `slide` transition does not work correctly for elements with `display: %value%`
|
|
* @param {string} value
|
|
*/
|
|
function transition_slide_display(value) {
|
|
console.warn(`%c[svelte] transition_slide_display\n%cThe \`slide\` transition does not work correctly for elements with \`display: ${value}\`\nhttps://svelte.dev/e/transition_slide_display`, bold, normal);
|
|
}
|
|
export { select_multiple_invalid_value as _, console_log_state as a, transition_slide_display as b, hydratable_missing_but_expected as c, hydration_mismatch as d, invalid_raw_snippet_render as f, ownership_invalid_mutation as g, ownership_invalid_binding as h, binding_property_non_reactive as i, hydration_attribute_changed as l, lifecycle_double_unmount as m, await_reactivity_loss as n, derived_inert as o, legacy_recursive_reactive_block as p, await_waterfall as r, event_handler_invalid as s, assignment_value_stale as t, hydration_html_changed as u, state_proxy_equality_mismatch as v, svelte_boundary_reset_noop as y };
|