pub(crate) const TAG_VIEW: &str = "view";
pub(crate) const TAG_ROW: &str = "row";
pub(crate) const TAG_COLUMN: &str = "column";
pub(crate) const TAG_COL: &str = "col";
pub(crate) const TAG_GRID: &str = "grid";
pub(crate) const TAG_SCROLL: &str = "scroll";
pub(crate) const TAG_PORTAL: &str = "portal";
pub(crate) const TAG_FRAGMENT: &str = "fragment";
pub(crate) const TAG_TEXT: &str = "text";
pub(crate) const TAG_INPUT: &str = "input";
pub(crate) const TAG_IMAGE: &str = "image";
pub(crate) const TAG_CANVAS: &str = "canvas";
pub(crate) const TAG_SLOT: &str = "slot";
pub(crate) const TAG_PAGE_SLOT: &str = "page_slot";
pub(crate) const PROP_STYLE: &str = "style";
pub(crate) const PROP_BIND_STYLE: &str = "bind_style";
pub(crate) const PROP_BIND_CHILDREN: &str = "bind_children";
pub(crate) const PROP_NODE_REF: &str = "node_ref";
pub(crate) const PROP_DISPLAY: &str = "display";
pub(crate) const PROP_POSITION: &str = "position";
pub(crate) const PROP_INSET: &str = "inset";
pub(crate) const PROP_WIDTH: &str = "width";
pub(crate) const PROP_HEIGHT: &str = "height";
pub(crate) const PROP_MIN_WIDTH: &str = "min_width";
pub(crate) const PROP_MIN_HEIGHT: &str = "min_height";
pub(crate) const PROP_MAX_WIDTH: &str = "max_width";
pub(crate) const PROP_MAX_HEIGHT: &str = "max_height";
pub(crate) const PROP_ASPECT_RATIO: &str = "aspect_ratio";
pub(crate) const PROP_PADDING: &str = "padding";
pub(crate) const PROP_MARGIN: &str = "margin";
pub(crate) const PROP_GAP: &str = "gap";
pub(crate) const PROP_BACKGROUND: &str = "background";
pub(crate) const PROP_GRADIENT: &str = "gradient";
pub(crate) const PROP_SHADOW: &str = "shadow";
pub(crate) const PROP_FOCUS_RING: &str = "focus_ring";
pub(crate) const PROP_CURSOR: &str = "cursor";
pub(crate) const PROP_POINTER_EVENTS: &str = "pointer_events";
pub(crate) const PROP_STOP_SCROLL_PROPAGATION: &str = "stop_scroll_propagation";
pub(crate) const PROP_STOP_EVENT_PROPAGATION: &str = "stop_event_propagation";
pub(crate) const PROP_FOCUSABLE: &str = "focusable";
pub(crate) const PROP_COLOR: &str = "color";
pub(crate) const PROP_RADIUS: &str = "radius";
pub(crate) const PROP_BORDER: &str = "border";
pub(crate) const PROP_ALIGN: &str = "align";
pub(crate) const PROP_JUSTIFY: &str = "justify";
pub(crate) const PROP_FLEX_GROW: &str = "flex_grow";
pub(crate) const PROP_FLEX_SHRINK: &str = "flex_shrink";
pub(crate) const PROP_FLEX_WRAP: &str = "flex_wrap";
pub(crate) const PROP_OVERFLOW: &str = "overflow";
pub(crate) const PROP_FONT_SIZE: &str = "font_size";
pub(crate) const PROP_FONT_WEIGHT: &str = "font_weight";
pub(crate) const PROP_FONT_FAMILY: &str = "font_family";
pub(crate) const PROP_ITALIC: &str = "italic";
pub(crate) const PROP_TEXT_ALIGN: &str = "text_align";
pub(crate) const PROP_TEXT_OVERFLOW: &str = "text_overflow";
pub(crate) const PROP_Z_INDEX: &str = "z_index";
pub(crate) const PROP_OPACITY: &str = "opacity";
pub(crate) const PROP_COLUMNS: &str = "columns";
pub(crate) const PROP_ON_CLICK: &str = "on_click";
pub(crate) const PROP_ON_CHANGE: &str = "on_change";
pub(crate) const PROP_ON_SCROLL: &str = "on_scroll";
pub(crate) const PROP_ON_POINTER_DOWN: &str = "on_pointer_down";
pub(crate) const PROP_ON_POINTER_MOVE: &str = "on_pointer_move";
pub(crate) const PROP_ON_POINTER_UP: &str = "on_pointer_up";
pub(crate) const PROP_ON_POINTER_ENTER: &str = "on_pointer_enter";
pub(crate) const PROP_ON_POINTER_LEAVE: &str = "on_pointer_leave";
pub(crate) const PROP_ON_HOVER: &str = "on_hover";
pub(crate) const PROP_ON_KEY: &str = "on_key";
pub(crate) const PROP_ON_FOCUS: &str = "on_focus";
pub(crate) const PROP_ON_BLUR: &str = "on_blur";
pub(crate) const PROP_VALUE: &str = "value";
pub(crate) const PROP_PLACEHOLDER: &str = "placeholder";
pub(crate) const PROP_PASSWORD: &str = "password";
pub(crate) const PROP_MULTILINE: &str = "multiline";
pub(crate) const PROP_DISABLED: &str = "disabled";
pub(crate) const PROP_CARET: &str = "caret";
pub(crate) const PROP_SOURCE: &str = "source";
pub(crate) const PROP_PAINTER: &str = "painter";
pub(crate) const PROP_A11Y: &str = "a11y";
pub(crate) const PROP_ROLE: &str = "role";
pub(crate) const PROP_A11Y_LABEL: &str = "a11y_label";
pub(crate) const PROP_A11Y_HINT: &str = "a11y_hint";
pub(crate) const PROP_A11Y_VALUE: &str = "a11y_value";
pub(crate) const PROP_A11Y_DISABLED: &str = "a11y_disabled";
pub(crate) const PROP_A11Y_CHECKED: &str = "a11y_checked";
pub(crate) const PROP_ID: &str = "id";
pub(crate) const PROP_ROUTE: &str = "route";
pub(crate) const PROP_HUB: &str = "hub";
pub(crate) const PROP_FALLBACK: &str = "fallback";
pub(crate) const COMP_EUV_PAGE: &str = "EuvPage";
pub(crate) const COMP_EUV_FORM: &str = "EuvForm";
pub(crate) const COMP_EUV_NAVBAR: &str = "EuvNavbar";
pub(crate) const COMP_EUV_STAT_GRID: &str = "EuvStatGrid";
pub(crate) const METHOD_SECTION: &str = "section";
pub(crate) const METHOD_FIELD: &str = "field";
pub(crate) const METHOD_ACTION: &str = "action";
pub(crate) const METHOD_CARD: &str = "card";
pub(crate) const METHOD_CHILD: &str = "child";
pub(crate) const KNOWN_VIEW_PROPS: &[&str] = &[
PROP_STYLE,
PROP_BIND_STYLE,
PROP_BIND_CHILDREN,
PROP_NODE_REF,
PROP_DISPLAY,
PROP_POSITION,
PROP_INSET,
PROP_WIDTH,
PROP_HEIGHT,
PROP_MIN_WIDTH,
PROP_MIN_HEIGHT,
PROP_MAX_WIDTH,
PROP_MAX_HEIGHT,
PROP_ASPECT_RATIO,
PROP_PADDING,
PROP_MARGIN,
PROP_GAP,
PROP_BACKGROUND,
PROP_GRADIENT,
PROP_SHADOW,
PROP_FOCUS_RING,
PROP_CURSOR,
PROP_POINTER_EVENTS,
PROP_STOP_SCROLL_PROPAGATION,
PROP_STOP_EVENT_PROPAGATION,
PROP_FOCUSABLE,
PROP_COLOR,
PROP_RADIUS,
PROP_BORDER,
PROP_ALIGN,
PROP_JUSTIFY,
PROP_FLEX_GROW,
PROP_FLEX_SHRINK,
PROP_FLEX_WRAP,
PROP_OVERFLOW,
PROP_FONT_SIZE,
PROP_FONT_WEIGHT,
PROP_FONT_FAMILY,
PROP_ITALIC,
PROP_TEXT_ALIGN,
PROP_TEXT_OVERFLOW,
PROP_Z_INDEX,
PROP_OPACITY,
PROP_COLUMNS,
PROP_ON_CLICK,
PROP_ON_CHANGE,
PROP_ON_SCROLL,
PROP_ON_POINTER_DOWN,
PROP_ON_POINTER_MOVE,
PROP_ON_POINTER_UP,
PROP_ON_POINTER_ENTER,
PROP_ON_POINTER_LEAVE,
PROP_ON_HOVER,
PROP_ON_KEY,
PROP_ON_FOCUS,
PROP_ON_BLUR,
PROP_VALUE,
PROP_PLACEHOLDER,
PROP_PASSWORD,
PROP_MULTILINE,
PROP_DISABLED,
PROP_CARET,
PROP_SOURCE,
PROP_PAINTER,
PROP_A11Y,
PROP_ROLE,
PROP_A11Y_LABEL,
PROP_A11Y_HINT,
PROP_A11Y_VALUE,
PROP_A11Y_DISABLED,
PROP_A11Y_CHECKED,
PROP_ID,
PROP_ROUTE,
PROP_HUB,
PROP_FALLBACK,
];
pub(crate) const ERR_LEGACY_VIEW_CTX: &str = "view! manages Context automatically; remove explicit `ctx` / `in ctx,` and wrap external scenes in `with_context(ctx, || view! { ... })`";
pub(crate) const ERR_IMAGE_MISSING_SOURCE: &str =
"image element requires a `source:` ImageBuffer expression";
pub(crate) const ERR_CANVAS_MISSING_PAINTER: &str =
"canvas element requires a `painter:` closure `|bounds: Rect, dl: &mut DisplayList| { ... }`";
pub(crate) const ERR_SLOT_MISSING_ID: &str =
"`slot` element requires an `id:` string identifying the dynamic component slot";
pub(crate) const ERR_PAGE_SLOT_MISSING_ROUTE: &str =
"`page_slot` element requires a `route:` string identifying the dynamic page route";
pub(crate) const ERR_ID_ONLY_ON_SLOT: &str =
"`id:` is only valid on `slot { id: \"...\" }` dynamic component slots";
pub(crate) const ERR_ROUTE_ONLY_ON_PAGE_SLOT: &str =
"`route:` is only valid on `page_slot { route: \"/...\" }` dynamic page slots";
pub(crate) const ERR_HUB_ONLY_ON_DYNAMIC_SLOT: &str =
"`hub:` and `fallback:` are only valid on `slot` or `page_slot` dynamic elements";
pub(crate) const ERR_SOURCE_ONLY_ON_IMAGE: &str =
"`source:` is only valid on `image { source: ... }` elements";
pub(crate) const ERR_PAINTER_ONLY_ON_CANVAS: &str =
"`painter:` is only valid on `canvas { painter: ... }` elements";
pub(crate) const ERR_INPUT_PROP_ONLY_ON_INPUT: &str = "`value:`, `placeholder:`, `password:`, `multiline:`, `disabled:`, and `caret:` are only valid on `input { ... }` elements";
pub(crate) const ERR_LEAF_CHILDREN_FORBIDDEN: &str =
"leaf elements (`input`, `image`, `canvas`) cannot contain child nodes";
pub(crate) const ERR_BIND_CHILDREN_CONFLICT: &str = "`bind_children:` cannot be combined with inline static children because reactive updates replace all children";
pub(crate) const ERR_A11Y_CONFLICT: &str =
"`a11y:` cannot be combined with individual `role:` or `a11y_*` properties on the same element";
pub(crate) const ERR_TEXT_CHILD_INVALID: &str =
"`text` element accepts at most one string literal or `{ expr }` text expression";
pub(crate) const ERR_SPREAD_IN_EXPR_CONTEXT: &str =
"`..spread` can only appear inside a container, `fragment`, or component children block";
pub(crate) const ERR_DUPLICATE_PROP_PREFIX: &str = "duplicate property";
pub(crate) const IDENT_ROOT: &str = "__euv_root";
pub(crate) const IDENT_FRAG: &str = "__euv_frag";
pub(crate) const IDENT_COMP: &str = "__euv_comp";
pub(crate) const IDENT_NODE: &str = "__euv_node";
pub(crate) const IDENT_FB_ROOT: &str = "__euv_fb_root";
pub(crate) const ERR_EXPECTED_BODY_OR_ARGS: &str =
"expected `{ ... }` body or `(args...)` after element tag";
pub(crate) const HTML_CONTAINER_TAGS: &[&str] = &[
"div", "section", "main", "header", "footer", "nav", "article", "aside", "ul", "ol", "li",
"form",
];
pub(crate) const HTML_TEXT_TAGS: &[&str] = &[
"span", "p", "h1", "h2", "h3", "h4", "h5", "h6", "label", "strong", "code",
];
pub(crate) const HTML_BUTTON_TAGS: &[&str] = &["button", "a"];
pub(crate) const HTML_IMAGE_TAGS: &[&str] = &["img"];
pub(crate) const HTML_REPLACE_CONTAINER: &str = "`column`, `row`, `view`, or `grid`";
pub(crate) const HTML_REPLACE_TEXT: &str = "`text`";
pub(crate) const HTML_REPLACE_BUTTON: &str = "`EuvButton(...)` or `view { on_click: ... }`";
pub(crate) const HTML_REPLACE_IMAGE: &str = "`image { source: ... }`";