@xmachines/play-tanstack-solid-router 1.0.0-beta.17 → 1.0.0-beta.19
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/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Signals-native integration with TanStack Solid Router enabling logic-driven navi
|
|
|
8
8
|
|
|
9
9
|
`@xmachines/play-tanstack-solid-router` provides seamless integration between TanStack Solid Router and XMachines state machines. Built on Solid's reactive primitives, it implements the `RouterBridgeBase` pattern for bidirectional synchronization while remaining framework-swappable.
|
|
10
10
|
|
|
11
|
-
Per [
|
|
11
|
+
Per [Play RFC](../docs/rfc/play.md), this package implements:
|
|
12
12
|
|
|
13
13
|
- **Actor Authority (INV-01):** State machine controls navigation, router reflects decisions
|
|
14
14
|
- **Passive Infrastructure (INV-04):** Router observes `actor.currentRoute` signal
|
|
@@ -82,7 +82,8 @@ export declare class SolidRouterBridge extends RouterBridgeBase {
|
|
|
82
82
|
* Using router.history rather than router.subscribe("onBeforeLoad") ensures
|
|
83
83
|
* back/forward works regardless of whether <RouterProvider> is mounted.
|
|
84
84
|
*
|
|
85
|
-
*
|
|
85
|
+
* Consumers should call `onCleanup(() => bridge.disconnect())` in their Solid
|
|
86
|
+
* component to ensure the bridge disconnects on unmount.
|
|
86
87
|
*/
|
|
87
88
|
protected watchRouterChanges(): void;
|
|
88
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solid-router-bridge.d.ts","sourceRoot":"","sources":["../src/solid-router-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"solid-router-bridge.d.ts","sourceRoot":"","sources":["../src/solid-router-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,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/
|
|
21
|
-
import { onCleanup } from "solid-js";
|
|
22
21
|
import { RouterBridgeBase } from "@xmachines/play-router";
|
|
23
22
|
/**
|
|
24
23
|
* TanStack Solid Router integration bridge extending RouterBridgeBase
|
|
@@ -72,14 +71,13 @@ export class SolidRouterBridge extends RouterBridgeBase {
|
|
|
72
71
|
* Using router.history rather than router.subscribe("onBeforeLoad") ensures
|
|
73
72
|
* back/forward works regardless of whether <RouterProvider> is mounted.
|
|
74
73
|
*
|
|
75
|
-
*
|
|
74
|
+
* Consumers should call `onCleanup(() => bridge.disconnect())` in their Solid
|
|
75
|
+
* component to ensure the bridge disconnects on unmount.
|
|
76
76
|
*/
|
|
77
77
|
watchRouterChanges() {
|
|
78
78
|
this._unsubscribeRouter = this.router.history.subscribe(({ location }) => {
|
|
79
79
|
this.syncActorFromRouter(location.pathname, location.search ?? "");
|
|
80
80
|
});
|
|
81
|
-
// Solid's onCleanup — automatically disconnects when component unmounts
|
|
82
|
-
onCleanup(() => this.disconnect());
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
85
83
|
* Stop watching TanStack Router changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solid-router-bridge.js","sourceRoot":"","sources":["../src/solid-router-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"solid-router-bridge.js","sourceRoot":"","sources":["../src/solid-router-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAe1D;;;;;;GAMG;AACH,MAAM,OAAO,iBAAkB,SAAQ,gBAAgB;IAWpC;IAVV,kBAAkB,GAAwB,IAAI,CAAC;IAEvD;;;;;;OAMG;IACH,YACkB,MAA0B,EAC3C,KAA8C,EAC9C,QAAkB;QAElB,KAAK,CAAC,KAAK,EAAE;YACZ,gBAAgB,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,SAAS;YAChF,gBAAgB,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,IAAI,SAAS;SAC5E,CAAC,CAAC;QAPc,WAAM,GAAN,MAAM,CAAoB;IAQ5C,CAAC;IAED;;OAEG;IACO,cAAc,CAAC,IAAY;QACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACgB,oBAAoB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC;IACtD,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACO,kBAAkB;QAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CACtD,CAAC,EAAE,QAAQ,EAAuD,EAAE,EAAE;YACrE,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;QACpE,CAAC,CACD,CAAC;IACH,CAAC;IAED;;OAEG;IACO,oBAAoB;QAC7B,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,OAAO;QACN,IAAI,CAAC,UAAU,EAAE,CAAC;IACnB,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/play-tanstack-solid-router",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.19",
|
|
4
4
|
"description": "TanStack Solid Router adapter for XMachines Universal Player Architecture",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "XMachines Contributors",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
+
"source": "./src/index.ts",
|
|
22
23
|
"types": "./dist/index.d.ts",
|
|
23
24
|
"default": "./dist/index.js"
|
|
24
25
|
}
|
|
@@ -30,22 +31,20 @@
|
|
|
30
31
|
"build": "tsc --build",
|
|
31
32
|
"test": "vitest",
|
|
32
33
|
"test:watch": "vitest",
|
|
33
|
-
"
|
|
34
|
-
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
|
|
35
|
-
"clean": "rm -rf dist *.tsbuildinfo node_modules/.vite node_modules/.vite-temp",
|
|
34
|
+
"clean": "rm -rf dist *.tsbuildinfo coverage",
|
|
36
35
|
"prepublishOnly": "npm run build"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@xmachines/play": "1.0.0-beta.
|
|
40
|
-
"@xmachines/play-actor": "1.0.0-beta.
|
|
41
|
-
"@xmachines/play-router": "1.0.0-beta.
|
|
42
|
-
"@xmachines/play-signals": "1.0.0-beta.
|
|
38
|
+
"@xmachines/play": "1.0.0-beta.19",
|
|
39
|
+
"@xmachines/play-actor": "1.0.0-beta.19",
|
|
40
|
+
"@xmachines/play-router": "1.0.0-beta.19",
|
|
41
|
+
"@xmachines/play-signals": "1.0.0-beta.19"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@solidjs/testing-library": "^0.8.10",
|
|
46
45
|
"@tanstack/solid-router": "^1.168.7",
|
|
47
|
-
"@xmachines/play-xstate": "1.0.0-beta.
|
|
48
|
-
"@xmachines/shared": "1.0.0-beta.
|
|
46
|
+
"@xmachines/play-xstate": "1.0.0-beta.19",
|
|
47
|
+
"@xmachines/shared": "1.0.0-beta.19",
|
|
49
48
|
"solid-js": "^1.9.12",
|
|
50
49
|
"vite-plugin-solid": "^2.11.11",
|
|
51
50
|
"vitest": "^4.1.2",
|