@zeus-js/compiler-shared 0.1.0 → 0.1.1-beta.0
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/dist/compiler-shared.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compiler-shared v0.1.0
|
|
2
|
+
* compiler-shared v0.1.1-beta.0
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -38,6 +38,7 @@ function elementIR(input) {
|
|
|
38
38
|
tagName: input.tagName,
|
|
39
39
|
attrs: (_input$attrs = input.attrs) !== null && _input$attrs !== void 0 ? _input$attrs : [],
|
|
40
40
|
children: (_input$children = input.children) !== null && _input$children !== void 0 ? _input$children : [],
|
|
41
|
+
...input.span === void 0 ? {} : { span: input.span },
|
|
41
42
|
flags: {
|
|
42
43
|
isSVG: false,
|
|
43
44
|
isVoid: false,
|
|
@@ -114,7 +115,8 @@ function componentIR(input) {
|
|
|
114
115
|
kind: "Component",
|
|
115
116
|
ref: input.ref,
|
|
116
117
|
callee: input.callee,
|
|
117
|
-
props: input.props
|
|
118
|
+
props: input.props,
|
|
119
|
+
...input.span === void 0 ? {} : { span: input.span }
|
|
118
120
|
};
|
|
119
121
|
}
|
|
120
122
|
function showIR(input) {
|
|
@@ -175,6 +175,7 @@ export declare function elementIR(input: {
|
|
|
175
175
|
attrs?: ElementIR['attrs'];
|
|
176
176
|
children?: ZeusIRNode[];
|
|
177
177
|
flags?: Partial<ElementIR['flags']>;
|
|
178
|
+
span?: SourceSpan;
|
|
178
179
|
}): ElementIR;
|
|
179
180
|
export declare function textIR(value: string): TextIR;
|
|
180
181
|
export declare function dynamicTextIR(expr: ExpressionIR, nodeRef: IRRef, once?: boolean): DynamicTextIR;
|
|
@@ -188,6 +189,7 @@ export declare function componentIR(input: {
|
|
|
188
189
|
ref: IRRef;
|
|
189
190
|
callee: ExpressionIR;
|
|
190
191
|
props: ComponentIR['props'];
|
|
192
|
+
span?: SourceSpan;
|
|
191
193
|
}): ComponentIR;
|
|
192
194
|
export declare function showIR(input: {
|
|
193
195
|
ref: IRRef;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compiler-shared v0.1.0
|
|
2
|
+
* compiler-shared v0.1.1-beta.0
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -88,19 +88,18 @@ function identifierIR(name, span) {
|
|
|
88
88
|
}
|
|
89
89
|
function elementIR(input) {
|
|
90
90
|
var _input$attrs, _input$children;
|
|
91
|
-
return {
|
|
91
|
+
return _objectSpread2(_objectSpread2({
|
|
92
92
|
id: id(),
|
|
93
93
|
kind: "Element",
|
|
94
94
|
ref: input.ref,
|
|
95
95
|
tagName: input.tagName,
|
|
96
96
|
attrs: (_input$attrs = input.attrs) !== null && _input$attrs !== void 0 ? _input$attrs : [],
|
|
97
|
-
children: (_input$children = input.children) !== null && _input$children !== void 0 ? _input$children : []
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
97
|
+
children: (_input$children = input.children) !== null && _input$children !== void 0 ? _input$children : []
|
|
98
|
+
}, input.span === void 0 ? {} : { span: input.span }), {}, { flags: _objectSpread2({
|
|
99
|
+
isSVG: false,
|
|
100
|
+
isVoid: false,
|
|
101
|
+
isCustomElement: input.tagName.includes("-")
|
|
102
|
+
}, input.flags) });
|
|
104
103
|
}
|
|
105
104
|
function textIR(value) {
|
|
106
105
|
return {
|
|
@@ -165,13 +164,13 @@ function refBindingIR(expr) {
|
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
166
|
function componentIR(input) {
|
|
168
|
-
return {
|
|
167
|
+
return _objectSpread2({
|
|
169
168
|
id: id(),
|
|
170
169
|
kind: "Component",
|
|
171
170
|
ref: input.ref,
|
|
172
171
|
callee: input.callee,
|
|
173
172
|
props: input.props
|
|
174
|
-
};
|
|
173
|
+
}, input.span === void 0 ? {} : { span: input.span });
|
|
175
174
|
}
|
|
176
175
|
function showIR(input) {
|
|
177
176
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* compiler-shared v0.1.0
|
|
2
|
+
* compiler-shared v0.1.1-beta.0
|
|
3
3
|
* (c) 2026 baicie
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
**/
|
|
@@ -38,6 +38,7 @@ function elementIR(input) {
|
|
|
38
38
|
tagName: input.tagName,
|
|
39
39
|
attrs: (_input$attrs = input.attrs) !== null && _input$attrs !== void 0 ? _input$attrs : [],
|
|
40
40
|
children: (_input$children = input.children) !== null && _input$children !== void 0 ? _input$children : [],
|
|
41
|
+
...input.span === void 0 ? {} : { span: input.span },
|
|
41
42
|
flags: {
|
|
42
43
|
isSVG: false,
|
|
43
44
|
isVoid: false,
|
|
@@ -114,7 +115,8 @@ function componentIR(input) {
|
|
|
114
115
|
kind: "Component",
|
|
115
116
|
ref: input.ref,
|
|
116
117
|
callee: input.callee,
|
|
117
|
-
props: input.props
|
|
118
|
+
props: input.props,
|
|
119
|
+
...input.span === void 0 ? {} : { span: input.span }
|
|
118
120
|
};
|
|
119
121
|
}
|
|
120
122
|
function showIR(input) {
|