@tsrx/core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js ADDED
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @tsrx/core - Core compiler infrastructure for tsrx-based frameworks
3
+ *
4
+ * Re-exports key modules for convenience.
5
+ */
6
+
7
+ // Parse
8
+ export {
9
+ createParser,
10
+ get_comment_handlers,
11
+ convert_from_jsx,
12
+ skipWhitespace,
13
+ isWhitespaceTextNode,
14
+ BINDING_TYPES,
15
+ DestructuringErrors,
16
+ acorn,
17
+ tsPlugin,
18
+ } from './parse/index.js';
19
+ export { parse_style } from './parse/style.js';
20
+
21
+ // Scope
22
+ export { create_scopes, ScopeRoot, Scope } from './scope.js';
23
+
24
+ // Errors
25
+ export { error } from './errors.js';
26
+
27
+ // Constants
28
+ export {
29
+ TEMPLATE_FRAGMENT,
30
+ TEMPLATE_USE_IMPORT_NODE,
31
+ IS_CONTROLLED,
32
+ IS_INDEXED,
33
+ TEMPLATE_SVG_NAMESPACE,
34
+ TEMPLATE_MATHML_NAMESPACE,
35
+ HYDRATION_START,
36
+ HYDRATION_END,
37
+ HYDRATION_ERROR,
38
+ BLOCK_OPEN,
39
+ BLOCK_CLOSE,
40
+ EMPTY_COMMENT,
41
+ ELEMENT_NODE,
42
+ TEXT_NODE,
43
+ COMMENT_NODE,
44
+ DOCUMENT_FRAGMENT_NODE,
45
+ DEFAULT_NAMESPACE,
46
+ } from './constants.js';
47
+
48
+ // Identifier utils
49
+ export {
50
+ IDENTIFIER_OBFUSCATION_PREFIX,
51
+ STYLE_IDENTIFIER,
52
+ SERVER_IDENTIFIER,
53
+ CSS_HASH_IDENTIFIER,
54
+ obfuscate_identifier,
55
+ is_identifier_obfuscated,
56
+ deobfuscate_identifier,
57
+ } from './identifier-utils.js';
58
+
59
+ // Comment utils
60
+ export {
61
+ is_ts_pragma,
62
+ is_triple_slash_directive,
63
+ is_jsdoc_ts_annotation,
64
+ should_preserve_comment,
65
+ format_comment,
66
+ } from './comment-utils.js';
67
+
68
+ // Generic utils
69
+ export {
70
+ hash,
71
+ is_void_element,
72
+ is_reserved,
73
+ is_boolean_attribute,
74
+ is_dom_property,
75
+ } from './utils.js';
76
+
77
+ // AST utils
78
+ export {
79
+ object,
80
+ unwrap_pattern,
81
+ extract_identifiers,
82
+ extract_paths,
83
+ build_fallback,
84
+ build_assignment_value,
85
+ } from './utils/ast.js';
86
+
87
+ // Builders (namespace re-export)
88
+ export * as builders from './utils/builders.js';
89
+
90
+ // Also export individual builder utilities used directly
91
+ export { set_location } from './utils/builders.js';
92
+
93
+ // Event utils
94
+ export {
95
+ is_non_delegated,
96
+ is_event_attribute,
97
+ is_capture_event,
98
+ get_original_event_name,
99
+ normalize_event_name,
100
+ event_name_from_capture,
101
+ get_attribute_event_name,
102
+ is_passive_event,
103
+ } from './utils/events.js';
104
+
105
+ // Hashing (also available via utils.hash)
106
+ // Already exported via ./utils.js
107
+
108
+ // Patterns
109
+ export {
110
+ regex_whitespace,
111
+ regex_whitespaces,
112
+ regex_starts_with_newline,
113
+ regex_starts_with_whitespace,
114
+ regex_starts_with_whitespaces,
115
+ regex_ends_with_whitespace,
116
+ regex_ends_with_whitespaces,
117
+ regex_not_whitespace,
118
+ regex_whitespaces_strict,
119
+ regex_only_whitespaces,
120
+ regex_newline_characters,
121
+ regex_not_newline_characters,
122
+ regex_is_valid_identifier,
123
+ regex_invalid_identifier_chars,
124
+ regex_starts_with_vowel,
125
+ regex_heading_tags,
126
+ regex_illegal_attribute_character,
127
+ } from './utils/patterns.js';
128
+
129
+ // Sanitize
130
+ export { sanitize_template_string } from './utils/sanitize_template_string.js';
131
+
132
+ // Escaping
133
+ export { escape } from './utils/escaping.js';
134
+
135
+ // Transform
136
+ export { render_stylesheets } from './transform/stylesheet.js';
137
+ export { convert_source_map_to_mappings } from './transform/segments.js';
138
+
139
+ // Analyze
140
+ export { analyze_css } from './analyze/css-analyze.js';
141
+ export { validate_nesting } from './analyze/validation.js';