@xmachines/play-tanstack-solid-router 1.0.0-beta.6 → 1.0.0-beta.8

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
@@ -6,7 +6,7 @@ Signals-native integration with TanStack Solid Router enabling logic-driven navi
6
6
 
7
7
  ## Overview
8
8
 
9
- `@xmachines/play-tanstack-solid-router` provides seamless integration between TanStack Solid Router and XMachines state machines. Built on Solid's reactive primitives (`createEffect`), it implements the RouterBridge protocol for bidirectional synchronization.
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
11
  Per [RFC Play v1](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md), this package implements:
12
12
 
@@ -17,26 +17,26 @@ Per [RFC Play v1](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md),
17
17
  **Key Benefits:**
18
18
 
19
19
  - **Signals-native:** Zero adaptation layer between Solid signals and TC39 Signals
20
- - **RouterBridge pattern:** ~220 lines, 2 flags (consistent with Vue/Solid Router adapters)
21
- - **Automatic tracking:** `createEffect` handles dependency tracking (no manual Watcher)
20
+ - **Bridge-first:** Extends shared `RouterBridgeBase` policy used by other adapters
21
+ - **Automatic tracking:** `createEffect` handles dependency tracking (no manual Watcher setup needed for the bridge)
22
22
  - **Logic-driven navigation:** Business logic in state machines, not components
23
23
  - **Type-safe parameters:** Route params flow through state machine context
24
24
 
25
25
  **Framework Compatibility:**
26
26
 
27
- - TanStack Solid Router 1.0.0+
27
+ - TanStack Solid Router 1.100.0+
28
28
  - SolidJS 1.8.0+
29
29
  - TC39 Signals polyfill integration
30
30
 
31
31
  ## Installation
32
32
 
33
33
  ```bash
34
- npm install @tanstack/solid-router@^1.0.0 solid-js@^1.8.0 @xmachines/play-tanstack-solid-router @xmachines/play-solid
34
+ npm install @tanstack/solid-router@^1.167.0 solid-js@^1.8.0 @xmachines/play-tanstack-solid-router @xmachines/play-solid
35
35
  ```
36
36
 
37
37
  **Peer dependencies:**
38
38
 
39
- - `@tanstack/solid-router` ^1.0.0 - TanStack Solid Router library
39
+ - `@tanstack/solid-router` ^1.167.0 - TanStack Solid Router library
40
40
  - `solid-js` ^1.8.0 - SolidJS runtime
41
41
  - `@xmachines/play-solid` - Solid renderer (`PlayRenderer`)
42
42
  - `@xmachines/play-actor` - Actor base
@@ -45,99 +45,110 @@ npm install @tanstack/solid-router@^1.0.0 solid-js@^1.8.0 @xmachines/play-tansta
45
45
 
46
46
  ## Quick Start
47
47
 
48
- ```typescript
49
- import { createRouter } from '@tanstack/solid-router';
50
- import { onCleanup } from 'solid-js';
51
- import { PlayRenderer } from '@xmachines/play-solid';
52
- import { definePlayer } from '@xmachines/play-xstate';
53
- import { extractMachineRoutes } from '@xmachines/play-router';
54
- import { SolidRouterBridge, createRouteMapFromTree } from '@xmachines/play-tanstack-solid-router';
48
+ ```tsx
49
+ import { Router, createRouter } from "@tanstack/solid-router";
50
+ import { PlayTanStackRouterProvider } from "@xmachines/play-tanstack-solid-router";
51
+ import { PlayRenderer } from "@xmachines/play-solid";
52
+ import { definePlayer } from "@xmachines/play-xstate";
53
+ import { extractMachineRoutes } from "@xmachines/play-router";
54
+ import { routeTree as routerRouteTree } from "./routeTree.gen"; // from TanStack
55
55
 
56
56
  function App() {
57
- // 1. Create actor
58
- const actor = definePlayer({ machine, catalog })();
59
-
60
- // 2. Create router
61
- const router = createRouter({
62
- routes: /* ... TanStack route config ... */
63
- });
64
-
65
- // 3. Extract routes from machine and create RouteMap
66
- const routeTree = extractMachineRoutes(machine);
67
- const routeMap = createRouteMapFromTree(routeTree);
68
-
69
- // 4. Create and connect bridge (inside component with Solid ownership context)
70
- const bridge = new SolidRouterBridge(router, actor, routeMap);
71
- bridge.connect();
72
-
73
- onCleanup(() => bridge.disconnect());
74
-
75
- return (
76
- <Router>
77
- <PlayRenderer actor={actor} components={components} />
78
- </Router>
79
- );
57
+ // 1. Create player with state machine
58
+ const createPlayer = definePlayer({
59
+ machine: authMachine,
60
+ catalog: componentCatalog,
61
+ });
62
+ const actor = createPlayer();
63
+ actor.start();
64
+
65
+ // 2. Create TanStack router instance
66
+ const router = createRouter({ routeTree: routerRouteTree });
67
+
68
+ // 3. Create route mapping from machine routes
69
+ const machineRouteTree = extractMachineRoutes(authMachine);
70
+ const routeMap = createRouteMapFromTree(machineRouteTree);
71
+
72
+ return (
73
+ // 4. Wrap with provider to sync actor and router
74
+ <PlayTanStackRouterProvider
75
+ actor={actor}
76
+ router={router}
77
+ routeMap={routeMap}
78
+ renderer={(currentActor, currentRouter) => (
79
+ <Router router={currentRouter}>
80
+ <PlayRenderer actor={currentActor} components={components} />
81
+ </Router>
82
+ )}
83
+ />
84
+ );
80
85
  }
81
86
  ```
82
87
 
83
- **Important:** The bridge must be created inside a component where Solid hooks (`createEffect`, `onCleanup`) are available. TanStack Solid Router requires Solid's ownership context for reactivity to work correctly.
84
-
85
88
  ## API Reference
86
89
 
87
90
  ### `SolidRouterBridge`
88
91
 
89
92
  Router adapter implementing the `RouterBridge` protocol for TanStack Solid Router.
90
93
 
91
- **Constructor:**
94
+ **Type Signature:**
92
95
 
93
96
  ```typescript
94
- new SolidRouterBridge(
95
- router: Router,
96
- actor: AbstractActor<any>,
97
- routeMap: RouteMap
98
- )
97
+ class SolidRouterBridge {
98
+ constructor(router: Router, actor: AbstractActor<any>, routeMap: RouteMap);
99
+ dispose(): void;
100
+ }
99
101
  ```
100
102
 
101
- **Parameters:**
103
+ **Constructor Parameters:**
102
104
 
103
- - `router`: TanStack Solid Router instance (from `createRouter()`)
104
- - `actor`: XMachines player actor implementing signal protocol
105
- - `routeMap`: Bidirectional state ID ↔ path mapping
105
+ - `router` - TanStack Solid Router instance
106
+ - `actor` - XMachines actor instance
107
+ - `routeMap` - Bidirectional state ID ↔ path mapping
106
108
 
107
109
  **Methods:**
108
110
 
109
- - `connect(): void` - Start bidirectional synchronization (actor ↔ router)
110
- - `disconnect(): void` - Stop synchronization and cleanup subscriptions
111
+ - `connect()` - Start bidirectional synchronization.
112
+ - `disconnect()` - Stop synchronization and cleanup bridge resources.
113
+ - `dispose()` - Alias of `disconnect()`.
111
114
 
112
- **Important:** Must be created inside component where Solid hooks (`createEffect`, `onCleanup`) are available. Creating outside ownership context will cause reactivity to fail.
115
+ **Internal Behavior:**
113
116
 
114
- ### `RouteMap`
117
+ - Uses `RouterBridgeBase` TC39 watcher lifecycle for actor→router synchronization
118
+ - Updates TanStack Router via `router.navigate({ to: path })` when actor state changes
119
+ - Uses `router.subscribe` to watch history navigation events
120
+ - Sends `play.route` events to actor when user navigates
115
121
 
116
- Bidirectional mapping between XMachines state IDs and URL paths with pattern matching support.
122
+ ### `PlayTanStackRouterProvider`
117
123
 
118
- **Constructor:**
124
+ A Solid component that automatically sets up, connects, and tears down the `SolidRouterBridge` using Solid's lifecycle.
119
125
 
120
- ```typescript
121
- new RouteMap(routes: RouteMapping[])
126
+ ```tsx
127
+ interface PlayTanStackRouterProviderProps {
128
+ actor: AbstractActor<any>;
129
+ router: Router;
130
+ routeMap: RouteMap;
131
+ renderer: (actor: AbstractActor<any>, router: Router) => JSX.Element;
132
+ }
122
133
  ```
123
134
 
124
- **Interface:**
135
+ **Props:**
125
136
 
126
- ```typescript
127
- interface RouteMapping {
128
- stateId: string; // XMachines state ID (e.g., '#home', '#profile')
129
- path: string; // URL path pattern (e.g., '/', '/profile/:userId')
130
- }
131
- ```
137
+ - `actor` - The XMachines player actor
138
+ - `router` - The TanStack Solid Router instance
139
+ - `routeMap` - Mapping between paths and state IDs
140
+ - `renderer` - A render prop function that receives the active actor and router
132
141
 
133
- **Methods:**
142
+ **Behavior:**
134
143
 
135
- - `getStateIdByPath(path: string): string | null` - Lookup state ID by path (with URLPattern matching)
136
- - `getPathByStateId(stateId: string): string | null` - Lookup path by state ID
144
+ 1. Instantiates `SolidRouterBridge` on mount
145
+ 2. Calls `bridge.connect()`
146
+ 3. Renders the content returned by the `renderer` function
147
+ 4. Calls `bridge.disconnect()` when the component unmounts via `onCleanup`
137
148
 
138
149
  ### `createRouteMapFromTree()`
139
150
 
140
- Helper to create RouteMap from RouteTree extracted from state machine.
151
+ Helper to automatically build a `RouteMap` instance from a generated machine route tree.
141
152
 
142
153
  **Signature:**
143
154
 
@@ -155,274 +166,115 @@ const routeTree = extractMachineRoutes(machine);
155
166
  const routeMap = createRouteMapFromTree(routeTree);
156
167
  ```
157
168
 
158
- This helper traverses the route tree and creates RouteMapping entries for all routable states.
159
-
160
169
  ## Usage Patterns
161
170
 
162
- ### Creating RouteMap from Machine
163
-
164
- **Recommended:** Extract routes from state machine automatically:
165
-
166
- ```typescript
167
- import { extractMachineRoutes } from "@xmachines/play-router";
168
- import { createRouteMapFromTree } from "@xmachines/play-tanstack-solid-router";
169
-
170
- const routeTree = extractMachineRoutes(machine);
171
- const routeMap = createRouteMapFromTree(routeTree);
172
- ```
173
-
174
- **Manual:** Define routes explicitly:
175
-
176
- ```typescript
177
- const routeMap = new RouteMap([
178
- { stateId: "#home", path: "/" },
179
- { stateId: "#profile", path: "/profile/:userId" },
180
- ]);
181
- ```
182
-
183
171
  ### Dynamic Routes with Parameters
184
172
 
185
- **Path parameters:**
173
+ TanStack Router and URLPattern (used internally) support dynamic route matching syntax:
186
174
 
187
175
  ```typescript
188
- const routeMap = new RouteMap([
189
- { stateId: "#home", path: "/" },
190
- { stateId: "#settings", path: "/settings/:section?" }, // Optional param
191
- { stateId: "#profile", path: "/profile/:userId" }, // Required param
192
- ]);
193
- ```
194
-
195
- **Pattern matching examples:**
176
+ // Machine configuration
177
+ const machineConfig = {
178
+ states: {
179
+ profile: {
180
+ meta: {
181
+ route: "/profile/:userId",
182
+ view: { component: "Profile" },
183
+ },
184
+ },
185
+ },
186
+ };
196
187
 
197
- ```typescript
188
+ // Route mapping will natively support URLPattern parameters
198
189
  routeMap.getStateIdByPath("/profile/123"); // → '#profile'
199
- routeMap.getStateIdByPath("/settings"); // → '#settings'
200
- routeMap.getStateIdByPath("/settings/privacy"); // → '#settings'
201
190
  ```
202
191
 
203
- ### Cleanup on Component Unmount
192
+ ### Protected Routes and Guards
204
193
 
205
- **Always cleanup when component unmounts:**
194
+ With XMachines, auth guards are handled entirely inside the state machine, preventing flashes of unauthorized content.
206
195
 
207
196
  ```typescript
208
- function MyApp() {
209
- const bridge = new SolidRouterBridge(router, actor, routeMap);
210
- bridge.connect();
211
-
212
- onCleanup(() => {
213
- bridge.disconnect(); // Stop synchronization
214
- actor.stop(); // Stop actor if needed
215
- });
216
-
217
- return <Router>...</Router>;
197
+ // Machine side
198
+ dashboard: {
199
+ meta: { route: "/dashboard", view: { component: "Dashboard" } },
200
+ always: {
201
+ guard: ({ context }) => !context.isAuthenticated,
202
+ target: "login"
203
+ }
218
204
  }
219
205
  ```
220
206
 
221
- ## Circular Update Prevention
222
-
223
- SolidRouterBridge uses a **2-flag pattern** to prevent infinite loops:
224
-
225
- 1. **lastSyncedPath** - Skips redundant updates when path unchanged
226
- 2. **isProcessingNavigation** - Prevents actor → router → actor loops
227
-
228
- **How it works:**
229
-
230
- ```typescript
231
- // Actor state change → Router navigation
232
- private syncRouterFromActor(route: string | null): void {
233
- if (this.isProcessingNavigation) return; // Skip if processing router event
234
- if (route === this.lastSyncedPath) return; // Skip if path unchanged
235
-
236
- this.lastSyncedPath = route || '/';
237
- this.router.navigate({ to: this.lastSyncedPath });
238
- }
207
+ When a user navigates to `/dashboard`:
239
208
 
240
- // Router navigation → Actor event
241
- private syncActorFromRouter(location: RouterLocation): void {
242
- this.isProcessingNavigation = true; // Set flag
209
+ 1. TanStack Router updates location
210
+ 2. Bridge intercepts and sends `play.route`
211
+ 3. Actor evaluates guard -> denies target, transitions to `login` instead
212
+ 4. Bridge observes new actor state (`/login`)
213
+ 5. Bridge tells TanStack Router to redirect to `/login`
243
214
 
244
- // Send event to actor...
215
+ ## Circular Update Prevention
245
216
 
246
- queueMicrotask(() => {
247
- this.isProcessingNavigation = false; // Clear flag in microtask
248
- });
249
- }
250
- ```
217
+ The `RouterBridgeBase` architecture prevents infinite loops between router and actor using two mechanisms:
251
218
 
252
- **Microtask timing:** The `isProcessingNavigation` flag is cleared in a microtask (via `queueMicrotask()`) to ensure the actor has processed the event before allowing router-initiated syncs again.
219
+ 1. **`lastSyncedPath` tracking:** Stores the last synchronized path to prevent redundant navigations back to the identical location.
220
+ 2. **`isProcessingNavigation` flag:** Set during a router event, preventing the router from immediately reacting to the actor's synchronous state update.
253
221
 
254
222
  ## Comparison with @solidjs/router Adapter
255
223
 
256
- | Aspect | @solidjs/router | @tanstack/solid-router |
257
- | -------------- | ----------------- | ---------------------------- |
258
- | **Router API** | router.push() | router.navigate({ to }) |
259
- | **Location** | router.location | router.state.location |
260
- | **Guards** | router.beforeEach | No guards (use createEffect) |
261
- | **Reactivity** | createEffect | createEffect |
262
-
263
- **Key Differences:**
264
-
265
- - **TanStack Solid Router:** Uses `router.navigate({ to })` API (object-based navigation)
266
- - **SolidJS Router:** Uses `navigate(path)` function (string-based navigation)
267
- - **TanStack:** Router instance contains state, no separate hooks needed
268
- - **SolidJS:** Requires hooks (`useNavigate`, `useLocation`) for navigation primitives
269
-
270
- ## Limitations
271
-
272
- ### Solid Ownership Context Required
273
-
274
- The bridge must be created inside a component where Solid hooks are available:
275
-
276
- ```typescript
277
- // ✅ CORRECT: Inside component
278
- function App() {
279
- const bridge = new SolidRouterBridge(router, actor, routeMap);
280
- bridge.connect();
281
- onCleanup(() => bridge.disconnect());
282
- }
283
-
284
- // ❌ WRONG: Outside component (no ownership context)
285
- const bridge = new SolidRouterBridge(router, actor, routeMap);
286
- bridge.connect(); // Will fail - no owner for createEffect
287
- ```
288
-
289
- **Error message:**
290
-
291
- ```
292
- Error: createEffect can only be used within a component
293
- ```
294
-
295
- ### Router Creation
296
-
297
- Router must be created with TanStack's `createRouter()`:
298
-
299
- ```typescript
300
- import { createRouter } from "@tanstack/solid-router";
301
-
302
- const router = createRouter({
303
- routes: [
304
- /* route config */
305
- ],
306
- });
307
- ```
308
-
309
- ### Pattern Matching Requirements
310
-
311
- Route patterns with parameters require URLPattern support:
312
-
313
- - **Modern browsers:** Safari 17.4+, Chrome 95+, Firefox 106+
314
- - **Node.js:** Requires `urlpattern-polyfill` for tests
315
-
316
- **Polyfill setup:**
317
-
318
- ```typescript
319
- // Top of app entry point
320
- if (!globalThis.URLPattern) {
321
- await import("urlpattern-polyfill");
322
- }
323
- ```
224
+ | Aspect | @solidjs/router Adapter | @tanstack/solid-router Adapter |
225
+ | ----------------- | -------------------------------- | ------------------------------- |
226
+ | **Router API** | `navigate(path)` | `router.navigate({ to })` |
227
+ | **Setup Context** | Must be _inside_ Router context | Can wrap Router instance |
228
+ | **State Source** | Uses Solid hooks (`useLocation`) | Subscribes to `router` directly |
229
+ | **Reacting** | `createEffect` on location | `router.subscribe` callback |
324
230
 
325
231
  ## Architecture
326
232
 
327
- SolidRouterBridge follows XMachines Play architectural invariants:
233
+ This package implements standard Play invariants:
328
234
 
329
235
  ### INV-01: Actor Authority
330
236
 
331
- **Principle:** State machine has final authority over all transitions.
332
-
333
- **Implementation:** Router navigation triggers actor events, but actor guards decide validity:
334
-
335
- ```typescript
336
- // Router navigation → Actor event
337
- syncActorFromRouter(location: RouterLocation): void {
338
- const stateId = this.routeMap.getStateIdByPath(location.pathname);
339
- this.actor.send({
340
- type: 'play.route',
341
- to: stateId,
342
- params: extractParams(location)
343
- });
344
- // Actor guards validate - if rejected, URL reverts to actor's current route
345
- }
346
- ```
237
+ State machine has final authority over all transitions. TanStack Router navigation triggers actor events (`play.route`), but the actor's guards and transitions ultimately dictate if the view changes.
347
238
 
348
239
  ### INV-02: Passive Infrastructure
349
240
 
350
- **Principle:** Infrastructure reflects actor state, never decides navigation.
351
-
352
- **Implementation:** Router observes `actor.currentRoute` signal and updates URL:
353
-
354
- ```typescript
355
- // Actor state change → Router navigation
356
- const actorEffect = createEffect(
357
- on(
358
- () => this.actor.currentRoute.get(),
359
- (route) => this.syncRouterFromActor(route),
360
- ),
361
- );
362
- ```
363
-
364
- ### INV-05: Signal-Only Reactivity
365
-
366
- **Principle:** All reactivity through signals, never callbacks or promises.
241
+ Infrastructure reflects actor state. The router observes `actor.currentRoute` and updates the browser URL, never storing independent business state.
367
242
 
368
- **Implementation:** Solid's `createEffect` watches actor signals automatically:
243
+ ### Cleanup Contract
369
244
 
370
- ```typescript
371
- // Automatic dependency tracking
372
- createEffect(
373
- on(
374
- () => this.actor.currentRoute.get(), // Signal read
375
- (route) => {
376
- // Effect runs when signal changes
377
- },
378
- ),
379
- );
380
- ```
245
+ The bridge implements an explicit `dispose()`/`disconnect()` method. `PlayTanStackRouterProvider` wires this automatically to Solid's `onCleanup` hook to prevent memory leaks and duplicate bridge subscriptions in hot-reloading scenarios.
381
246
 
382
247
  ## Browser Support
383
248
 
384
- This package uses the [URLPattern API](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) for route pattern matching.
249
+ This package uses the [URLPattern API](https://developer.mozilla.org/en-US/docs/Web/API/URLPattern) for robust route pattern matching.
385
250
 
386
251
  **Native Support:**
387
252
 
388
- - Safari 17.4+ (Sept 2024)
389
- - Chrome 95+ (Oct 2021)
390
- - Firefox 106+ (Oct 2022)
391
- - **Baseline 2025** status (newly available)
253
+ - Safari 17.4+
254
+ - Chrome 95+
255
+ - Firefox 106+
392
256
 
393
- **Polyfill Required:**
394
-
395
- - Node.js (all versions) - required for tests
396
- - Safari < 17.4
397
- - Older browsers
398
-
399
- **Polyfill Installation:**
257
+ **Polyfill Required (Node.js/Tests/Old Browsers):**
400
258
 
401
259
  ```bash
402
260
  npm install urlpattern-polyfill
403
261
  ```
404
262
 
405
- **Usage:**
406
-
407
263
  ```typescript
408
- // Top of your app entry point (e.g., main.tsx)
409
264
  if (!globalThis.URLPattern) {
410
265
  await import("urlpattern-polyfill");
411
266
  }
412
267
  ```
413
268
 
414
- **Bundle Size:** ~4KB gzipped (zero impact if URLPattern is native)
415
-
416
- ## Examples
269
+ ## Related Packages
417
270
 
418
- See `examples/demo/` for the maintained integration example and tests.
271
+ - **[@xmachines/play-solid](../play-solid)** - SolidJS renderer
272
+ - **[@xmachines/play-router](../play-router)** - Core router primitives
273
+ - **[@xmachines/play-solid-router](../play-solid-router)** - Native SolidJS Router equivalent
419
274
 
420
275
  ## License
421
276
 
422
- MIT
423
-
424
- ---
277
+ Copyright (c) 2016 [Mikael Karon](mailto:mikael@karon.se). All rights reserved.
425
278
 
426
- **Package:** @xmachines/play-tanstack-solid-router
427
- **Pattern:** RouterBridge (~220 lines, 2 flags)
428
- **Framework:** TanStack Solid Router 1.0+ with SolidJS 1.8+
279
+ This work is licensed under the terms of the MIT license.
280
+ For a copy, see <https://opensource.org/licenses/MIT>.
@@ -11,5 +11,5 @@ export interface PlayRouterProviderProps {
11
11
  routeMap: RouteMap;
12
12
  renderer: (actor: RoutableActor, router: TanStackRouterInstance) => JSX.Element;
13
13
  }
14
- export declare function PlayRouterProvider(props: PlayRouterProviderProps): any;
14
+ export declare function PlayRouterProvider(props: PlayRouterProviderProps): JSX.Element;
15
15
  //# sourceMappingURL=play-router-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"play-router-provider.d.ts","sourceRoot":"","sources":["../src/play-router-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExF,MAAM,WAAW,uBAAuB;IACvC,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,sBAAsB,KAAK,GAAG,CAAC,OAAO,CAAC;CAChF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,OAShE"}
1
+ {"version":3,"file":"play-router-provider.d.ts","sourceRoot":"","sources":["../src/play-router-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAExF,MAAM,WAAW,uBAAuB;IACvC,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,sBAAsB,KAAK,GAAG,CAAC,OAAO,CAAC;CAChF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAShE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmachines/play-tanstack-solid-router",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "TanStack Solid Router adapter for XMachines Universal Player Architecture",
5
5
  "license": "MIT",
6
6
  "author": "XMachines Contributors",
@@ -28,24 +28,26 @@
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsc --build",
31
- "test": "vitest run",
31
+ "test": "vitest",
32
32
  "test:watch": "vitest",
33
33
  "typecheck": "tsc --noEmit",
34
- "clean": "rm -rf dist *.tsbuildinfo",
34
+ "clean": "rm -rf dist *.tsbuildinfo node_modules/.vite node_modules/.vite-temp",
35
35
  "prepublishOnly": "npm run build"
36
36
  },
37
37
  "dependencies": {
38
- "@xmachines/play": "1.0.0-beta.6",
39
- "@xmachines/play-actor": "1.0.0-beta.6",
40
- "@xmachines/play-router": "1.0.0-beta.6",
41
- "@xmachines/play-signals": "1.0.0-beta.6"
38
+ "@xmachines/play": "1.0.0-beta.8",
39
+ "@xmachines/play-actor": "1.0.0-beta.8",
40
+ "@xmachines/play-router": "1.0.0-beta.8",
41
+ "@xmachines/play-signals": "1.0.0-beta.8"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@solidjs/testing-library": "^0.8.10",
45
45
  "@tanstack/solid-router": "^1.167.5",
46
- "@xmachines/shared": "1.0.0-beta.6",
46
+ "@xmachines/shared": "1.0.0-beta.8",
47
47
  "solid-js": "^1.9.11",
48
- "vite-plugin-solid": "^2.11.11"
48
+ "vite-plugin-solid": "^2.11.11",
49
+ "vitest": "^4.1.0",
50
+ "xstate": "^5.28.0"
49
51
  },
50
52
  "peerDependencies": {
51
53
  "@tanstack/solid-router": "^1.166.7",