@vue-jsx-vapor/macros 2.1.6 → 2.1.7

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/volar.cjs CHANGED
@@ -118,15 +118,16 @@ function transformJsxMacros(rootMap, options) {
118
118
  )]);
119
119
  if (asyncModifier && map.defineComponent)
120
120
  _tsmacro.replaceRange.call(void 0, codes, asyncModifier.pos, asyncModifier.end);
121
- const result = `({}) as __VLS_PickNotAny<Awaited<ReturnType<typeof ${_common.HELPER_PREFIX}setup>>['render'], {}> & { __ctx: Awaited<ReturnType<typeof ${_common.HELPER_PREFIX}setup>> }`;
121
+ const result = `({}) as __VLS_PickNotAny<typeof ${_common.HELPER_PREFIX}ctx.render, {}> & { __ctx: typeof ${_common.HELPER_PREFIX}ctx }`;
122
122
  const propsType = _optionalChain([root, 'access', _8 => _8.parameters, 'access', _9 => _9[0], 'optionalAccess', _10 => _10.type]) ? String(root.parameters[0].type.getText(ast)) : "{}";
123
123
  _tsmacro.replaceRange.call(void 0,
124
124
  codes,
125
125
  root.parameters.pos,
126
126
  root.parameters.pos,
127
127
  ts.isArrowFunction(root) && root.parameters.pos === root.pos ? "(" : "",
128
- `${_common.HELPER_PREFIX}props: Awaited<ReturnType<typeof ${_common.HELPER_PREFIX}setup>>['props'] & ${propsType}, `,
128
+ `${_common.HELPER_PREFIX}props: typeof ${_common.HELPER_PREFIX}ctx.props & ${propsType}, `,
129
129
  `${_common.HELPER_PREFIX}placeholder?: {}, `,
130
+ `${_common.HELPER_PREFIX}ctx = {} as Awaited<ReturnType<typeof ${_common.HELPER_PREFIX}setup>>, `,
130
131
  `${_common.HELPER_PREFIX}setup = (${asyncModifier ? "async" : ""}(`
131
132
  );
132
133
  if (ts.isArrowFunction(root)) {
package/dist/volar.js CHANGED
@@ -118,15 +118,16 @@ function transformJsxMacros(rootMap, options) {
118
118
  );
119
119
  if (asyncModifier && map.defineComponent)
120
120
  replaceRange3(codes, asyncModifier.pos, asyncModifier.end);
121
- const result = `({}) as __VLS_PickNotAny<Awaited<ReturnType<typeof ${HELPER_PREFIX2}setup>>['render'], {}> & { __ctx: Awaited<ReturnType<typeof ${HELPER_PREFIX2}setup>> }`;
121
+ const result = `({}) as __VLS_PickNotAny<typeof ${HELPER_PREFIX2}ctx.render, {}> & { __ctx: typeof ${HELPER_PREFIX2}ctx }`;
122
122
  const propsType = root.parameters[0]?.type ? String(root.parameters[0].type.getText(ast)) : "{}";
123
123
  replaceRange3(
124
124
  codes,
125
125
  root.parameters.pos,
126
126
  root.parameters.pos,
127
127
  ts.isArrowFunction(root) && root.parameters.pos === root.pos ? "(" : "",
128
- `${HELPER_PREFIX2}props: Awaited<ReturnType<typeof ${HELPER_PREFIX2}setup>>['props'] & ${propsType}, `,
128
+ `${HELPER_PREFIX2}props: typeof ${HELPER_PREFIX2}ctx.props & ${propsType}, `,
129
129
  `${HELPER_PREFIX2}placeholder?: {}, `,
130
+ `${HELPER_PREFIX2}ctx = {} as Awaited<ReturnType<typeof ${HELPER_PREFIX2}setup>>, `,
130
131
  `${HELPER_PREFIX2}setup = (${asyncModifier ? "async" : ""}(`
131
132
  );
132
133
  if (ts.isArrowFunction(root)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-jsx-vapor/macros",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "Macros for Vue JSX Vapor",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -167,8 +167,8 @@
167
167
  }
168
168
  },
169
169
  "dependencies": {
170
- "@vue-macros/common": "^3.0.0-beta.6",
171
- "@vue/compiler-sfc": "https://pkg.pr.new/@vue/compiler-sfc@3e7464f",
170
+ "@vue-macros/common": "^3.0.0-beta.7",
171
+ "@vue/compiler-sfc": "https://pkg.pr.new/@vue/compiler-sfc@b43f4f5",
172
172
  "@vue/language-core": "^2.2.8",
173
173
  "hash-sum": "^2.0.0",
174
174
  "ts-macro": "^0.1.25",
@@ -179,8 +179,8 @@
179
179
  "@nuxt/kit": "^3.16.0",
180
180
  "@nuxt/schema": "^3.16.0",
181
181
  "@types/hash-sum": "^1.0.2",
182
- "@vue-macros/test-utils": "^3.0.0-beta.6",
183
- "vue": "https://pkg.pr.new/vue@3e7464f"
182
+ "@vue-macros/test-utils": "^3.0.0-beta.7",
183
+ "vue": "https://pkg.pr.new/vue@b43f4f5"
184
184
  },
185
185
  "scripts": {
186
186
  "build": "tsup",