Home / File/ constants.js — svelte Source File

constants.js — svelte Source File

Architecture documentation for constants.js, a javascript file in the svelte codebase. 0 imports, 41 dependents.

Entity Profile

Dependency Diagram

graph LR
  73865c3c_2786_c9ac_d34f_b51d28b3a29e["constants.js"]
  046e8489_7de3_c124_9983_4b051435f74f["index.js"]
  046e8489_7de3_c124_9983_4b051435f74f --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  09b07d2e_2631_ce6a_e899_0be23871c668["options.js"]
  09b07d2e_2631_ce6a_e899_0be23871c668 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  f7b5a3fc_d53e_8647_11c4_d826334aec0c["SvelteElement.js"]
  f7b5a3fc_d53e_8647_11c4_d826334aec0c --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  b14524b3_fb6c_95cc_463c_fff3e50c6bc6["index.js"]
  b14524b3_fb6c_95cc_463c_fff3e50c6bc6 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  c518b20b_2355_7b11_4ac2_2d9bb5dcfb43["utils.js"]
  c518b20b_2355_7b11_4ac2_2d9bb5dcfb43 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  f0f2f8c6_dafa_048c_81e7_9a2e89e2dd23["EachBlock.js"]
  f0f2f8c6_dafa_048c_81e7_9a2e89e2dd23 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  96f4a58f_3498_1ea2_7ff9_3d805414893b["Fragment.js"]
  96f4a58f_3498_1ea2_7ff9_3d805414893b --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  4610488f_3cf2_5f73_043e_da0aa9d026fe["RegularElement.js"]
  4610488f_3cf2_5f73_043e_da0aa9d026fe --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  42ba314e_c59a_5f97_37c4_16009ba66836["TransitionDirective.js"]
  42ba314e_c59a_5f97_37c4_16009ba66836 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  b25fbb61_695c_e699_cbac_73059624d603["element.js"]
  b25fbb61_695c_e699_cbac_73059624d603 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  d1869e84_a713_3c60_3aae_40e1a6b78424["extract_svelte_ignore.js"]
  d1869e84_a713_3c60_3aae_40e1a6b78424 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  48cf26f8_bf34_fd7a_3d52_cc963051e167["context.js"]
  48cf26f8_bf34_fd7a_3d52_cc963051e167 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  3ab252dc_d6ce_1bc4_5889_915271359ea9["elements.js"]
  3ab252dc_d6ce_1bc4_5889_915271359ea9 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  dd70ba52_70b9_64ef_66d0_34ac556ec3da["hmr.js"]
  dd70ba52_70b9_64ef_66d0_34ac556ec3da --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e
  style 73865c3c_2786_c9ac_d34f_b51d28b3a29e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

export const EACH_ITEM_REACTIVE = 1;
export const EACH_INDEX_REACTIVE = 1 << 1;
/** See EachBlock interface metadata.is_controlled for an explanation what this is */
export const EACH_IS_CONTROLLED = 1 << 2;
export const EACH_IS_ANIMATED = 1 << 3;
export const EACH_ITEM_IMMUTABLE = 1 << 4;

export const PROPS_IS_IMMUTABLE = 1;
export const PROPS_IS_RUNES = 1 << 1;
export const PROPS_IS_UPDATED = 1 << 2;
export const PROPS_IS_BINDABLE = 1 << 3;
export const PROPS_IS_LAZY_INITIAL = 1 << 4;

export const TRANSITION_IN = 1;
export const TRANSITION_OUT = 1 << 1;
export const TRANSITION_GLOBAL = 1 << 2;

export const TEMPLATE_FRAGMENT = 1;
export const TEMPLATE_USE_IMPORT_NODE = 1 << 1;
export const TEMPLATE_USE_SVG = 1 << 2;
export const TEMPLATE_USE_MATHML = 1 << 3;

export const HYDRATION_START = '[';
/** used to indicate that an `{:else}...` block was rendered */
export const HYDRATION_START_ELSE = '[!';
export const HYDRATION_END = ']';
export const HYDRATION_ERROR = {};

export const ELEMENT_IS_NAMESPACED = 1;
export const ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
export const ELEMENT_IS_INPUT = 1 << 2;

export const UNINITIALIZED = Symbol();

// Dev-time component properties
export const FILENAME = Symbol('filename');
export const HMR = Symbol('hmr');

export const NAMESPACE_HTML = 'http://www.w3.org/1999/xhtml';
export const NAMESPACE_SVG = 'http://www.w3.org/2000/svg';
export const NAMESPACE_MATHML = 'http://www.w3.org/1998/Math/MathML';

// we use a list of ignorable runtime warnings because not every runtime warning
// can be ignored and we want to keep the validation for svelte-ignore in place
export const IGNORABLE_RUNTIME_WARNINGS = /** @type {const} */ ([
	'await_waterfall',
	'await_reactivity_loss',
	'state_snapshot_uncloneable',
	'binding_property_non_reactive',
	'hydration_attribute_changed',
	'hydration_html_changed',
	'ownership_invalid_binding',
	'ownership_invalid_mutation'
]);

/**
 * Whitespace inside one of these elements will not result in
 * a whitespace node being created in any circumstances. (This
 * list is almost certainly very incomplete)
 * TODO this is currently unused
 */
export const ELEMENTS_WITHOUT_TEXT = ['audio', 'datalist', 'dl', 'optgroup', 'select', 'video'];

export const ATTACHMENT_KEY = '@attach';

Imported By

Frequently Asked Questions

What does constants.js do?
constants.js is a source file in the svelte codebase, written in javascript. It belongs to the SharedInternal domain.
What files import constants.js?
constants.js is imported by 41 file(s): EachBlock.js, Fragment.js, RegularElement.js, SvelteElement.js, TransitionDirective.js, attributes.js, await.js, batch.js, and 33 more.
Where is constants.js in the architecture?
constants.js is located at packages/svelte/src/constants.js (domain: SharedInternal, directory: packages/svelte/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free