ripple
Version:
Ripple is an elegant TypeScript UI framework
79 lines (75 loc) • 2.99 kB
JavaScript
export var ROOT_BLOCK = 1 << 1;
export var RENDER_BLOCK = 1 << 2;
export var EFFECT_BLOCK = 1 << 3;
export var BRANCH_BLOCK = 1 << 4;
export var FOR_BLOCK = 1 << 5;
export var TRY_BLOCK = 1 << 6;
export var IF_BLOCK = 1 << 7;
export var SWITCH_BLOCK = 1 << 8;
export var COMPOSITE_BLOCK = 1 << 9;
export var ASYNC_BLOCK = 1 << 10;
export var HEAD_BLOCK = 1 << 11;
export var PRE_EFFECT_BLOCK = 1 << 12;
export var DIRECT_CHILD_BLOCK = 1 << 13;
// Content rendered outside the parent's DOM range (`<head>`, a portal target).
export var DETACHED_BLOCK = 1 << 14;
export var CONTAINS_TEARDOWN = 1 << 15;
export var BLOCK_HAS_RUN = 1 << 16;
export var TRACKED = 1 << 17;
export var DERIVED = 1 << 18;
export var DEFERRED = 1 << 19;
export var PAUSED = 1 << 20;
export var DESTROYED = 1 << 21;
// Marks a block that is queued for the next flush.
export var SCHEDULED = 1 << 22;
// A per-key match value created by a selector; its map entry is dropped once
// the last subscriber unlinks.
export var SELECTOR = 1 << 23;
// A selector key whose last subscriber left; kept for reuse until a sweep.
export var RELEASED = 1 << 24;
/** A block whose latest run created deriveds that are recorded for release (see `release_deriveds`). */
export var CREATES_DERIVEDS = 1 << 25;
/**
* A list item block that carries its body's render block itself (see the
* runtime's `item`): a branch block for its DOM range, and a reaction that
* re-runs the body's update function.
*/
export var ITEM_BLOCK = 1 << 26;
/**
* The namespace a block was created in, so a rerun outside the `with_ns()`
* call that established it (a scheduled flush) creates its DOM in the same
* namespace. Neither bit set means HTML.
*/
export var SVG_BLOCK = 1 << 27;
export var MATHML_BLOCK = 1 << 28;
export var NAMESPACE_BLOCK = SVG_BLOCK | MATHML_BLOCK;
export var CONTROL_FLOW_BLOCK = FOR_BLOCK | IF_BLOCK | SWITCH_BLOCK | TRY_BLOCK | COMPOSITE_BLOCK;
/** @type {unique symbol} */
export const UNINITIALIZED = Symbol();
/** @type {unique symbol} */
export const TRACKED_ARRAY = Symbol();
/** @type {unique symbol} */
export const TRACKED_OBJECT = Symbol();
export var COMPUTED_PROPERTY = Symbol();
/** @type {unique symbol} */
export const HMR = Symbol();
export var REF_PROP = 'ref';
/** @type {unique symbol} */
export const ARRAY_SET_INDEX_AT = Symbol();
export const MAX_ARRAY_LENGTH = 2 ** 32 - 1;
export const DEFAULT_NAMESPACE = 'html';
export const NAMESPACE_URI = {
html: 'http://www.w3.org/1999/xhtml',
svg: 'http://www.w3.org/2000/svg',
mathml: 'http://www.w3.org/1998/Math/MathML',
};
/** @type {unique symbol} */
export const TRACKED_UPDATED = Symbol();
/** @type {unique symbol} */
export const SUSPENSE_PENDING = Symbol();
/** @type {unique symbol} */
export const SUSPENSE_REJECTED = Symbol();
/** @type {unique symbol} */
export const ASYNC_DERIVED_READ_THROWN = Symbol();
/** The hoisted render function a module-level component carries (see `render_component`). */
export const RENDER_ENTRY = Symbol();