@tsrx/vue 0.1.25 → 0.1.27

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 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.25",
6
+ "version": "0.1.27",
7
7
  "type": "module",
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -23,8 +23,7 @@
23
23
  "default": "./src/error-boundary.js"
24
24
  },
25
25
  "./dynamic": {
26
- "types": "./types/dynamic.d.ts",
27
- "default": "./src/dynamic.js"
26
+ "types": "./types/dynamic.d.ts"
28
27
  },
29
28
  "./interop": {
30
29
  "types": "./types/interop.d.ts",
@@ -39,7 +38,7 @@
39
38
  "esrap": "^2.2.8",
40
39
  "is-reference": "^3.0.3",
41
40
  "zimmerframe": "^1.1.2",
42
- "@tsrx/core": "0.1.25"
41
+ "@tsrx/core": "0.1.27"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "vue": ">=3.5",
package/src/index.js CHANGED
@@ -5,7 +5,6 @@ import { createVolarMappingsResult, dedupeMappings, parseModule } from '@tsrx/co
5
5
  import { transform } from './transform.js';
6
6
 
7
7
  export { isRefProp } from './ref.js';
8
- export { Dynamic } from './dynamic.js';
9
8
 
10
9
  /**
11
10
  * Parse tsrx-vue source code to an ESTree AST.
package/src/transform.js CHANGED
@@ -34,6 +34,11 @@ const vue_platform = {
34
34
  imports: {
35
35
  suspense: 'vue',
36
36
  dynamic: '@tsrx/vue/dynamic',
37
+ // Production output aliases dynamic tags to a scoped component const
38
+ // inside an expression-child IIFE — vue-jsx-vapor's own render block
39
+ // keeps the tag reactive, so no runtime import is needed; the type-only
40
+ // transform keeps the `Dynamic` component shape.
41
+ dynamicFactory: { renderBlock: true },
37
42
  errorBoundary: '@tsrx/vue/error-boundary',
38
43
  mergeRefs: '@tsrx/vue/ref',
39
44
  refProp: '@tsrx/vue/ref',
package/src/dynamic.js DELETED
@@ -1,16 +0,0 @@
1
- import { exclude_prop_from_object } from '@tsrx/core/runtime/language-helpers';
2
- import { createNodes, h } from 'vue-jsx-vapor';
3
-
4
- /**
5
- * @param {{ is?: any, [key: string]: any }} props
6
- * @param {{ slots?: any }} [context]
7
- * @returns {any}
8
- */
9
- export function Dynamic(props, context) {
10
- return createNodes(() => {
11
- const component = props?.is;
12
- return component
13
- ? h(component, exclude_prop_from_object(props, 'is'), context?.slots ?? props?.children)
14
- : null;
15
- });
16
- }