@rs-x/vue 2.0.0-next.4 → 2.0.0-next.40

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/dist/index.js +7 -4
  2. package/package.json +23 -17
package/dist/index.js CHANGED
@@ -33,15 +33,18 @@ __name(getExpressionManager, "getExpressionManager");
33
33
 
34
34
  // src/hooks/use-rsx-expression.ts
35
35
  import { getCurrentScope, onScopeDispose, shallowRef } from "vue";
36
- import { AbstractExpression } from "@rs-x/expression-parser";
36
+ import { AbstractExpression, CompiledExpression } from "@rs-x/expression-parser";
37
37
  function useRsxExpression(expression) {
38
- if (!(expression instanceof AbstractExpression)) {
38
+ if (!(expression instanceof AbstractExpression) && !(expression instanceof CompiledExpression)) {
39
39
  throw new Error("useRsxExpression: expression must be an IExpression");
40
40
  }
41
41
  const expressionTree = expression;
42
- const value = shallowRef(expressionTree.value ?? null);
42
+ const getCurrentValue = /* @__PURE__ */ __name(() => {
43
+ return expressionTree.value ?? null;
44
+ }, "getCurrentValue");
45
+ const value = shallowRef(getCurrentValue());
43
46
  const subscription = expressionTree.changed.subscribe(() => {
44
- value.value = expressionTree.value ?? null;
47
+ value.value = getCurrentValue();
45
48
  });
46
49
  if (getCurrentScope()) {
47
50
  onScopeDispose(() => {
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "@rs-x/vue",
3
- "version": "2.0.0-next.4",
3
+ "version": "2.0.0-next.40",
4
4
  "description": "Vue extension for the RS-X framework with composables to bind RS-X expressions to Vue components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
7
  "types": "./dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
10
  "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
13
- }
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./testing": {
15
+ "types": "./dist/testing/index.d.ts",
16
+ "import": "./dist/testing/index.js",
17
+ "default": "./dist/testing/index.js"
18
+ },
19
+ "./package.json": "./package.json"
14
20
  },
15
21
  "sideEffects": false,
16
22
  "files": [
@@ -32,24 +38,24 @@
32
38
  "vue": ">=3.3.0"
33
39
  },
34
40
  "dependencies": {
35
- "@rs-x/core": "2.0.0-next.4",
36
- "@rs-x/expression-parser": "2.0.0-next.4",
37
- "@rs-x/state-manager": "2.0.0-next.4"
41
+ "@rs-x/core": "2.0.0-next.40",
42
+ "@rs-x/expression-parser": "2.0.0-next.40",
43
+ "@rs-x/state-manager": "2.0.0-next.40"
38
44
  },
39
45
  "devDependencies": {
40
- "@vitejs/plugin-vue": "^6.0.1",
41
- "eslint": "^10.0.1",
42
- "eslint-plugin-vue": "^10.5.1",
43
- "globals": "^17.3.0",
46
+ "@vitejs/plugin-vue": "^6.0.5",
47
+ "eslint": "^10.2.0",
48
+ "eslint-plugin-vue": "^10.8.0",
49
+ "globals": "^17.4.0",
44
50
  "prettier": "^3.8.1",
45
51
  "rimraf": "^6.1.3",
46
52
  "tsup": "^8.5.1",
47
- "typescript": "^5.9.3",
48
- "vite": "^7.3.1",
53
+ "typescript": "^6.0.2",
54
+ "vite": "^8.0.7",
49
55
  "vite-tsconfig-paths": "^6.1.1",
50
- "vue-eslint-parser": "^10.2.0",
51
- "vitest": "^4.0.18",
52
- "vue": "^3.5.0"
56
+ "vitest": "^4.1.3",
57
+ "vue": "^3.5.32",
58
+ "vue-eslint-parser": "^10.4.0"
53
59
  },
54
60
  "engines": {
55
61
  "node": ">=24"
@@ -63,7 +69,7 @@
63
69
  "composable"
64
70
  ],
65
71
  "scripts": {
66
- "build": "tsup src/index.ts --format esm --dts --external vue --tsconfig ../tsconfig.build.json",
72
+ "build": "tsup src/index.ts --format esm --dts --external vue",
67
73
  "test": "vitest run",
68
74
  "clean": "rimraf dist"
69
75
  }