@tsrx/vue 0.1.47 → 0.1.49
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/package.json +2 -2
- package/src/transform.js +13 -7
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Vue compiler built on @tsrx/core",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.49",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"esrap": "^2.3.0",
|
|
39
39
|
"is-reference": "^3.0.3",
|
|
40
40
|
"zimmerframe": "^1.1.2",
|
|
41
|
-
"@tsrx/core": "0.1.
|
|
41
|
+
"@tsrx/core": "0.1.49"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"vue": ">=3.5",
|
package/src/transform.js
CHANGED
|
@@ -157,7 +157,7 @@ export const transform = createJsxTransform(vue_platform);
|
|
|
157
157
|
/**
|
|
158
158
|
* @param {ESTreeJSX.JSXRenderNode} try_content
|
|
159
159
|
* @param {ESTreeJSX.JSXRenderNode} fallback_content
|
|
160
|
-
* @returns {
|
|
160
|
+
* @returns {AST.TSRXJSXElement}
|
|
161
161
|
*/
|
|
162
162
|
function create_vapor_pending_boundary(try_content, fallback_content) {
|
|
163
163
|
return create_vapor_pending_boundary_from_default_slot(
|
|
@@ -169,7 +169,7 @@ function create_vapor_pending_boundary(try_content, fallback_content) {
|
|
|
169
169
|
/**
|
|
170
170
|
* @param {AST.ArrowFunctionExpression} default_slot
|
|
171
171
|
* @param {ESTreeJSX.JSXRenderNode} fallback_content
|
|
172
|
-
* @returns {
|
|
172
|
+
* @returns {AST.TSRXJSXElement}
|
|
173
173
|
*/
|
|
174
174
|
function create_vapor_pending_boundary_from_default_slot(default_slot, fallback_content) {
|
|
175
175
|
const fallback_expression = jsx_child_to_expression(fallback_content);
|
|
@@ -205,9 +205,15 @@ function create_module_scoped_error_fallback_component(catch_body_nodes, catch_p
|
|
|
205
205
|
const saved_module_scoped = ctx.module_scoped_hook_components;
|
|
206
206
|
ctx.module_scoped_hook_components = true;
|
|
207
207
|
try {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
const source = node.handler ?? node;
|
|
209
|
+
return createHookSafeHelper(
|
|
210
|
+
catch_body_nodes,
|
|
211
|
+
undefined,
|
|
212
|
+
has_location(source) ? source : undefined,
|
|
213
|
+
ctx,
|
|
214
|
+
undefined,
|
|
215
|
+
{ transientBindings: get_pattern_names(catch_params) },
|
|
216
|
+
);
|
|
211
217
|
} finally {
|
|
212
218
|
ctx.module_scoped_hook_components = saved_module_scoped;
|
|
213
219
|
}
|
|
@@ -274,7 +280,7 @@ function create_fallback_component_renderer(fallback_component, fallback_fn) {
|
|
|
274
280
|
* @param {JsxHelperComponent} fallback_component
|
|
275
281
|
* @param {AST.ArrowFunctionExpression} fallback_fn
|
|
276
282
|
* @param {AST.Expression[]} [replacement_args]
|
|
277
|
-
* @returns {
|
|
283
|
+
* @returns {AST.TSRXJSXElement}
|
|
278
284
|
*/
|
|
279
285
|
function create_fallback_component_element(fallback_component, fallback_fn, replacement_args = []) {
|
|
280
286
|
const element = clone_ast_node(fallback_component.component_element, false);
|
|
@@ -325,7 +331,7 @@ function jsx_child_to_expression(child) {
|
|
|
325
331
|
/**
|
|
326
332
|
* @param {ESTreeJSX.JSXRenderNode} content
|
|
327
333
|
* @param {AST.ArrowFunctionExpression} fallback_fn
|
|
328
|
-
* @returns {
|
|
334
|
+
* @returns {AST.TSRXJSXElement}
|
|
329
335
|
*/
|
|
330
336
|
function create_vapor_error_boundary(content, fallback_fn) {
|
|
331
337
|
return b.jsx_element_fresh(
|