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
/// 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";
/// 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 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 names and CSS property conversion.
pub const CHAR_HYPHEN: char = '-';
/// The hyphen string used for replacing underscores in kebab-case conversion.
pub const STR_HYPHEN: &str = "-";
/// The underscore character, part of Rust identifiers.
pub const CHAR_UNDERSCORE: char = '_';
/// The underscore string used for replacing hyphens in Rust identifier conversion.
pub const STR_UNDERSCORE: &str = "_";
/// 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 = ';';
/// 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";