@rs-x/vue 2.0.0-next.5 → 2.0.0-next.50
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/index.js +9 -6
- package/package.json +23 -17
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { RsXExpressionParserInjectionTokens, RsXExpressionParserModule } from "@
|
|
|
7
7
|
var factoryInstance;
|
|
8
8
|
function getExpressionFactory() {
|
|
9
9
|
if (!factoryInstance) {
|
|
10
|
-
if (!InjectionContainer.isBound(RsXExpressionParserInjectionTokens.
|
|
10
|
+
if (!InjectionContainer.isBound(RsXExpressionParserInjectionTokens.IExpressionParser)) {
|
|
11
11
|
InjectionContainer.load(RsXExpressionParserModule);
|
|
12
12
|
}
|
|
13
13
|
factoryInstance = InjectionContainer.get(RsXExpressionParserInjectionTokens.IExpressionFactory);
|
|
@@ -22,7 +22,7 @@ import { RsXExpressionParserInjectionTokens as RsXExpressionParserInjectionToken
|
|
|
22
22
|
var expressionManager;
|
|
23
23
|
function getExpressionManager() {
|
|
24
24
|
if (!expressionManager) {
|
|
25
|
-
if (!InjectionContainer2.isBound(RsXExpressionParserInjectionTokens2.
|
|
25
|
+
if (!InjectionContainer2.isBound(RsXExpressionParserInjectionTokens2.IExpressionParser)) {
|
|
26
26
|
InjectionContainer2.load(RsXExpressionParserModule2);
|
|
27
27
|
}
|
|
28
28
|
expressionManager = InjectionContainer2.get(RsXExpressionParserInjectionTokens2.IExpressionManager);
|
|
@@ -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
|
|
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 =
|
|
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.
|
|
3
|
+
"version": "2.0.0-next.50",
|
|
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/
|
|
36
|
-
"@rs-x/
|
|
37
|
-
"@rs-x/
|
|
41
|
+
"@rs-x/expression-parser": "2.0.0-next.50",
|
|
42
|
+
"@rs-x/core": "2.0.0-next.50",
|
|
43
|
+
"@rs-x/state-manager": "2.0.0-next.50"
|
|
38
44
|
},
|
|
39
45
|
"devDependencies": {
|
|
40
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
41
|
-
"eslint": "^10.0
|
|
42
|
-
"eslint-plugin-vue": "^10.
|
|
43
|
-
"globals": "^17.
|
|
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": "^
|
|
48
|
-
"vite": "^
|
|
53
|
+
"typescript": "^6.0.2",
|
|
54
|
+
"vite": "^8.0.7",
|
|
49
55
|
"vite-tsconfig-paths": "^6.1.1",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"vue": "^
|
|
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
|
|
72
|
+
"build": "tsup src/index.ts --format esm --dts --external vue",
|
|
67
73
|
"test": "vitest run",
|
|
68
74
|
"clean": "rimraf dist"
|
|
69
75
|
}
|