@rs-x/react-components 1.0.1 → 1.0.2
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 +46 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -19391,7 +19391,12 @@ const $ = rxjs;
|
|
|
19391
19391
|
`;
|
|
19392
19392
|
}
|
|
19393
19393
|
} else {
|
|
19394
|
-
const
|
|
19394
|
+
const destructuredMembers = /* @__PURE__ */ new Set();
|
|
19395
|
+
normalized = normalized.replace(/^\s*(?:const|let|var)\s+\{([^}]+)\}\s*=\s*api\.rxjs\s*;?\s*$/gm, (_full, members) => {
|
|
19396
|
+
members.split(",").map((m) => m.trim()).filter(Boolean).forEach((m) => destructuredMembers.add(m));
|
|
19397
|
+
return "";
|
|
19398
|
+
});
|
|
19399
|
+
const directMembers = new Set(destructuredMembers);
|
|
19395
19400
|
normalized = normalized.replace(/api\.rxjs\.([A-Za-z_$][\w$]*)/g, (_full, member) => {
|
|
19396
19401
|
directMembers.add(member);
|
|
19397
19402
|
return member;
|
|
@@ -19506,7 +19511,7 @@ function toTsConfig() {
|
|
|
19506
19511
|
target: "ES2022",
|
|
19507
19512
|
module: "NodeNext",
|
|
19508
19513
|
moduleResolution: "NodeNext",
|
|
19509
|
-
|
|
19514
|
+
noImplicitAny: false,
|
|
19510
19515
|
outDir: "dist",
|
|
19511
19516
|
skipLibCheck: true
|
|
19512
19517
|
},
|
|
@@ -19519,15 +19524,52 @@ __name(toTsConfig, "toTsConfig");
|
|
|
19519
19524
|
function toReadme() {
|
|
19520
19525
|
return `# rs-x Playground Export
|
|
19521
19526
|
|
|
19522
|
-
|
|
19527
|
+
This project was exported from the [rs-x playground](https://rsxjs.com/docs/playground).
|
|
19528
|
+
It contains a self-contained TypeScript demo that you can run locally with Node.js.
|
|
19529
|
+
|
|
19530
|
+
## Prerequisites
|
|
19523
19531
|
|
|
19524
|
-
|
|
19532
|
+
- [Node.js](https://nodejs.org/) v18 or later
|
|
19533
|
+
- [pnpm](https://pnpm.io/) \u2014 install with \`npm install -g pnpm\`
|
|
19534
|
+
|
|
19535
|
+
## Getting started
|
|
19536
|
+
|
|
19537
|
+
**1. Install dependencies**
|
|
19525
19538
|
|
|
19526
19539
|
\`\`\`bash
|
|
19527
19540
|
pnpm install
|
|
19541
|
+
\`\`\`
|
|
19542
|
+
|
|
19543
|
+
**2. Build the project**
|
|
19544
|
+
|
|
19545
|
+
Compiles \`src/main.ts\` to JavaScript in the \`dist/\` folder.
|
|
19546
|
+
|
|
19547
|
+
\`\`\`bash
|
|
19528
19548
|
pnpm build
|
|
19549
|
+
\`\`\`
|
|
19550
|
+
|
|
19551
|
+
**3. Run the demo**
|
|
19552
|
+
|
|
19553
|
+
Executes the compiled output and prints the expression's initial value and any
|
|
19554
|
+
subsequent changes to the console.
|
|
19555
|
+
|
|
19556
|
+
\`\`\`bash
|
|
19529
19557
|
pnpm start
|
|
19530
19558
|
\`\`\`
|
|
19559
|
+
|
|
19560
|
+
## Project structure
|
|
19561
|
+
|
|
19562
|
+
\`\`\`
|
|
19563
|
+
src/
|
|
19564
|
+
main.ts # Expression definition and entry point
|
|
19565
|
+
package.json # Dependencies and scripts
|
|
19566
|
+
tsconfig.json # TypeScript compiler settings
|
|
19567
|
+
\`\`\`
|
|
19568
|
+
|
|
19569
|
+
## Learn more
|
|
19570
|
+
|
|
19571
|
+
- [rs-x documentation](https://rsxjs.com/docs)
|
|
19572
|
+
- [Expression parser API](https://rsxjs.com/docs/core-api/module/expression-parser)
|
|
19531
19573
|
`;
|
|
19532
19574
|
}
|
|
19533
19575
|
__name(toReadme, "toReadme");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rs-x/react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "React extension for the RS-X framework with hooks to bind RS-X expressions to React components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"monaco-editor": "^0.55.1",
|
|
37
|
-
"@rs-x/
|
|
38
|
-
"@rs-x/expression-parser": "1.0.
|
|
39
|
-
"@rs-x/
|
|
37
|
+
"@rs-x/state-manager": "1.0.2",
|
|
38
|
+
"@rs-x/expression-parser": "1.0.2",
|
|
39
|
+
"@rs-x/core": "1.0.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@testing-library/react": "^16.3.2",
|