1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/// Environment variable name for the project manifest directory.
pub const CARGO_MANIFEST_DIR: &str = "CARGO_MANIFEST_DIR";
/// Source directory name within a Cargo project.
pub const SRC_DIR: &str = "src";
/// Rust source file extension.
pub const RUST_FILE_EXTENSION: &str = "rs";
/// Attribute name for marking component functions.
pub const COMPONENT_ATTR: &str = "component";
/// File name for the component registry cache stored in the target directory.
pub const REGISTRY_CACHE_FILE_NAME: &str = "euv_component_registry_cache";
/// Environment variable name for the Cargo output directory.
pub const ENV_OUT_DIR: &str = "OUT_DIR";
/// The semicolon character used as a fingerprint separator.
pub const CHAR_SEMICOLON: char = ';';
/// The newline character used as the fingerprint/data separator in the cache file.
pub const CHAR_NEWLINE: char = '\n';
/// Attribute key name for CSS class bindings.
pub const ATTR_KEY_CLASS: &str = "class";
/// Attribute key name for inline style bindings.
pub const ATTR_KEY_STYLE: &str = "style";
/// Attribute key name for the raw HTML fragment binding
/// (`html! { div { inner_html: "<svg/>" } }`). Triggers
/// `AttributeValue::InnerHtml(...)` instead of `Text` so the renderer
/// routes the value through `Element::set_inner_html` rather than
/// `set_attribute`, which is what makes `<script>` tags inside the
/// payload actually execute (matching React's
/// `dangerouslySetInnerHTML` semantics).
pub const ATTR_KEY_INNER_HTML: &str = "inner_html";
/// Attribute key name for children slot bindings.
pub const ATTR_KEY_CHILDREN: &str = "children";
/// Prefix for event handler attribute keys (e.g., `onclick`, `onchange`).
pub const EVENT_ATTR_PREFIX: &str = "on";
/// The Rust raw identifier prefix.
pub const RAW_IDENT_PREFIX: &str = "r#";
/// The hyphen character used in kebab-case tag names.
pub const CHAR_HYPHEN: char = '-';
/// The space character used in CSS string formatting.
pub const CHAR_SPACE: char = ' ';
/// The CSS declaration terminator character.
pub const CHAR_CSS_DECL_TERMINATOR: char = ';';
/// The double quote character used for string literal token detection.
pub const CHAR_DOUBLE_QUOTE: char = '"';
/// Error message when HTML root content is not a valid element or expression.
pub const ERR_EXPECTED_ELEMENT: &str =
"expected an element, string literal, if, match, for, or expression";
/// Error message when an unexpected token is encountered inside an HTML element.
pub const ERR_UNEXPECTED_TOKEN_IN_ELEMENT: &str = "unexpected token in HTML element";
/// Error message when an unexpected token is encountered in HTML children.
pub const ERR_UNEXPECTED_TOKEN_IN_HTML: &str = "unexpected token in HTML";
/// Error message when an unexpected token is encountered inside a dynamic component.
pub const ERR_UNEXPECTED_TOKEN_IN_DYNAMIC_COMPONENT: &str =
"unexpected token in dynamic component";
/// Type name for `VirtualNode`, used to determine the else default value in component props if-chains.
pub const TYPE_VIRTUAL_NODE: &str = "VirtualNode";
/// Type name identifier for `VirtualNode`, used to detect `VirtualNode<T>` parameter types.
pub const VIRTUAL_NODE_TYPE: &str = "VirtualNode";
/// Attribute key name for the `key` binding used for element identity in keyed updates.
pub const ATTR_KEY_KEY: &str = "key";
/// Empty string constant used as default placeholder for unset attribute values.
pub const STR_EMPTY: &str = "";
/// Cargo manifest file name.
pub const CARGO_TOML: &str = "Cargo.toml";
/// Workspace section header in Cargo.toml.
pub const WORKSPACE_SECTION: &str = "[workspace]";
/// Dependencies section key in Cargo.toml.
pub const DEPENDENCIES: &str = "dependencies";
/// Workspace dependencies section key in Cargo.toml.
pub const WORKSPACE_DEPENDENCIES: &str = "workspace.dependencies";
/// Path field key in dependency table.
pub const PATH_KEY: &str = "path";
/// Workspace field key in dependency table.
pub const WORKSPACE_KEY: &str = "workspace";
/// Environment variable holding the cargo home directory.
pub const CARGO_HOME_ENV: &str = "CARGO_HOME";
/// Environment variable holding the user home directory.
pub const HOME_ENV: &str = "HOME";
/// Cargo home directory name under the user home.
pub const CARGO_DIR: &str = ".cargo";
/// Registry directory name under the cargo home.
pub const REGISTRY_DIR: &str = "registry";
/// Extracted registry sources directory name under the registry directory.
pub const REGISTRY_SRC_DIR: &str = "src";
/// The pseudo-element tag name for a `portal { target: "..." }` element.
pub const TAG_NAME_PORTAL: &str = "portal";
/// The attribute key naming the portal mount target.
pub const ATTR_KEY_TARGET: &str = "target";
/// The compile error emitted when a `portal` element has no `target:` attribute.
pub const ERR_PORTAL_REQUIRES_TARGET: &str = "portal element requires a `target:` attribute";
/// The `Debug` variant name for `HtmlNode::Element`.
pub const DEBUG_VARIANT_ELEMENT: &str = "Element";
/// The `Debug` variant name for `HtmlNode::Expr`.
pub const DEBUG_VARIANT_EXPR: &str = "Expr";
/// The `Debug` variant name for `HtmlNode::Dynamic`.
pub const DEBUG_VARIANT_DYNAMIC: &str = "Dynamic";
/// The `Debug` variant name for `HtmlNode::Match`.
pub const DEBUG_VARIANT_MATCH: &str = "Match";
/// The `Debug` variant name for `HtmlNode::DynamicTag`.
pub const DEBUG_VARIANT_DYNAMIC_TAG: &str = "DynamicTag";