@tsrx/core 0.1.12 → 0.1.13

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.
Files changed (2) hide show
  1. package/package.json +2 -13
  2. package/src/plugin.js +16 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core compiler infrastructure for TSRX syntax",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.1.12",
6
+ "version": "0.1.13",
7
7
  "type": "module",
8
8
  "repository": {
9
9
  "type": "git",
@@ -70,22 +70,11 @@
70
70
  "zimmerframe": "^1.1.2"
71
71
  },
72
72
  "devDependencies": {
73
- "@solidjs/web": "2.0.0-beta.7",
74
73
  "@types/node": "^24.3.0",
75
74
  "@typescript-eslint/types": "^8.40.0",
76
75
  "@volar/language-core": "~2.4.28",
77
- "preact": "^10.27.0",
78
- "react": "^19.2.0",
79
- "react-dom": "^19.2.0",
80
- "solid-js": "2.0.0-beta.7",
81
76
  "typescript": "^5.9.3",
82
- "vscode-languageserver-types": "^3.17.5",
83
- "vue": "3.6.0-beta.12",
84
- "vue-jsx-vapor": "^3.2.14",
85
- "@tsrx/preact": "0.1.12",
86
- "@tsrx/react": "0.2.12",
87
- "@tsrx/solid": "0.1.12",
88
- "@tsrx/vue": "0.1.12"
77
+ "vscode-languageserver-types": "^3.17.5"
89
78
  },
90
79
  "files": [
91
80
  "src",
package/src/plugin.js CHANGED
@@ -826,7 +826,11 @@ export function TSRXPlugin(config) {
826
826
  }
827
827
 
828
828
  #isDoubleQuotedTextChildStart() {
829
- if (this.#path.findLast((n) => n.type === 'TsxCompat' || n.type === 'Tsx')) {
829
+ const current_template_node = this.#path.findLast(
830
+ (n) =>
831
+ n.type === 'Element' || n.type === 'Tsx' || n.type === 'Tsrx' || n.type === 'TsxCompat',
832
+ );
833
+ if (current_template_node?.type === 'TsxCompat' || current_template_node?.type === 'Tsx') {
830
834
  return false;
831
835
  }
832
836
 
@@ -2028,8 +2032,17 @@ export function TSRXPlugin(config) {
2028
2032
  );
2029
2033
 
2030
2034
  if (this.eat(tt.braceL)) {
2031
- const inside_tsx = this.#path.findLast((n) => n.type === 'TsxCompat' || n.type === 'Tsx');
2032
- if (inside_tsx) {
2035
+ const current_template_node = this.#path.findLast(
2036
+ (n) =>
2037
+ n.type === 'Element' ||
2038
+ n.type === 'Tsx' ||
2039
+ n.type === 'Tsrx' ||
2040
+ n.type === 'TsxCompat',
2041
+ );
2042
+ if (
2043
+ current_template_node?.type === 'Tsx' ||
2044
+ current_template_node?.type === 'TsxCompat'
2045
+ ) {
2033
2046
  if (this.type === tt.ellipsis) {
2034
2047
  this.expect(tt.ellipsis);
2035
2048
  /** @type {ESTreeJSX.JSXSpreadAttribute} */ (node).argument = this.parseMaybeAssign();