@xmachines/play-solid-router 1.0.0-beta.9 → 1.1.0

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@xmachines/play-solid-router",
3
- "version": "1.0.0-beta.9",
3
+ "version": "1.1.0",
4
4
  "description": "SolidJS Router adapter for XMachines Universal Player Architecture",
5
5
  "license": "MIT",
6
6
  "author": "XMachines Contributors",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git@gitlab.com:xmachin-es/xmachines-js.git",
9
+ "url": "git+ssh://git@gitlab.com/xmachin-es/xmachines-js.git",
10
10
  "directory": "packages/play-solid-router"
11
11
  },
12
12
  "files": [
@@ -15,6 +15,7 @@
15
15
  "LICENSE"
16
16
  ],
17
17
  "type": "module",
18
+ "sideEffects": false,
18
19
  "main": "./dist/index.js",
19
20
  "types": "./dist/index.d.ts",
20
21
  "exports": {
@@ -28,29 +29,39 @@
28
29
  },
29
30
  "scripts": {
30
31
  "build": "tsc --build",
32
+ "lint": "oxlint .",
33
+ "format": "oxfmt .",
31
34
  "test": "vitest",
32
35
  "test:watch": "vitest",
33
- "typecheck": "tsc --noEmit",
34
- "clean": "rm -rf dist *.tsbuildinfo node_modules/.vite node_modules/.vite-temp",
35
- "prepublishOnly": "npm run build"
36
+ "clean": "rm -rf dist *.tsbuildinfo coverage node_modules/.svelte2tsx-* node_modules/.vite*"
36
37
  },
37
38
  "dependencies": {
38
- "@xmachines/play": "1.0.0-beta.9",
39
- "@xmachines/play-actor": "1.0.0-beta.9",
40
- "@xmachines/play-router": "1.0.0-beta.9",
41
- "@xmachines/play-signals": "1.0.0-beta.9"
39
+ "@xmachines/play": "1.1.0",
40
+ "@xmachines/play-actor": "1.1.0",
41
+ "@xmachines/play-router": "1.1.0",
42
+ "@xmachines/play-signals": "1.1.0"
42
43
  },
43
44
  "devDependencies": {
44
- "@solidjs/router": "^0.13.0",
45
+ "@solidjs/router": "^0.16.1",
45
46
  "@solidjs/testing-library": "^0.8.10",
46
- "@xmachines/shared": "1.0.0-beta.9",
47
- "solid-js": "^1.9.11",
47
+ "@testing-library/jest-dom": "^6.9.1",
48
+ "@types/node": "^26.2.0",
49
+ "@vitest/browser-playwright": "^4.1.10",
50
+ "@xmachines/play-xstate": "1.1.0",
51
+ "jsdom": "^29.1.0",
52
+ "oxfmt": "^0.64.0",
53
+ "oxlint": "^1.79.0",
54
+ "solid-js": "^1.9.12",
48
55
  "vite-plugin-solid": "^2.11.11",
49
- "vitest": "^4.1.0",
50
- "xstate": "^5.28.0"
56
+ "vitest": "^4.1.11",
57
+ "xstate": "^5.31.0"
51
58
  },
52
59
  "peerDependencies": {
53
- "@solidjs/router": "^0.13.0",
54
- "solid-js": "^1.8.0"
60
+ "@solidjs/router": "^0.16.1",
61
+ "solid-js": "^1.8.0",
62
+ "xstate": "^5.31.0"
63
+ },
64
+ "engines": {
65
+ "node": ">=22.0.0"
55
66
  }
56
67
  }
@@ -1,25 +0,0 @@
1
- /**
2
- * Create RouteMap helper for SolidJS Router adapter
3
- *
4
- * Simplifies demo code by hiding route extraction complexity.
5
- * Internally calls extractMachineRoutes() and getRoutableRoutes(),
6
- * then constructs RouteMap with proper state ID ↔ path mappings.
7
- */
8
- import type { AnyStateMachine } from "xstate";
9
- import { RouteMap } from "./route-map.js";
10
- /**
11
- * Create a RouteMap from an XState machine
12
- *
13
- * @param machine - XState machine with route: {} config on states
14
- * @returns RouteMap for bidirectional state ID ↔ path resolution
15
- *
16
- * @example
17
- * ```typescript
18
- * import { createRouteMap } from '@xmachines/play-solid-router';
19
- * import { authMachine } from './machine.js';
20
- *
21
- * const routeMap = createRouteMap(authMachine);
22
- * ```
23
- */
24
- export declare function createRouteMap(machine: AnyStateMachine): RouteMap;
25
- //# sourceMappingURL=create-route-map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-route-map.d.ts","sourceRoot":"","sources":["../src/create-route-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAcjE"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Create RouteMap helper for SolidJS Router adapter
3
- *
4
- * Simplifies demo code by hiding route extraction complexity.
5
- * Internally calls extractMachineRoutes() and getRoutableRoutes(),
6
- * then constructs RouteMap with proper state ID ↔ path mappings.
7
- */
8
- import { extractMachineRoutes, getRoutableRoutes } from "@xmachines/play-router";
9
- import { RouteMap } from "./route-map.js";
10
- /**
11
- * Create a RouteMap from an XState machine
12
- *
13
- * @param machine - XState machine with route: {} config on states
14
- * @returns RouteMap for bidirectional state ID ↔ path resolution
15
- *
16
- * @example
17
- * ```typescript
18
- * import { createRouteMap } from '@xmachines/play-solid-router';
19
- * import { authMachine } from './machine.js';
20
- *
21
- * const routeMap = createRouteMap(authMachine);
22
- * ```
23
- */
24
- export function createRouteMap(machine) {
25
- // Extract route tree from machine
26
- const routeTree = extractMachineRoutes(machine);
27
- // Get only routable nodes (states with route: {} config)
28
- const routes = getRoutableRoutes(routeTree);
29
- // Map to RouteMapping format expected by RouteMap constructor
30
- const mappings = routes.map((node) => ({
31
- stateId: node.stateId,
32
- path: node.fullPath,
33
- }));
34
- return new RouteMap(mappings);
35
- }
36
- //# sourceMappingURL=create-route-map.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-route-map.js","sourceRoot":"","sources":["../src/create-route-map.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAAC,OAAwB;IACtD,kCAAkC;IAClC,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAEhD,yDAAyD;IACzD,MAAM,MAAM,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAE5C,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,QAAQ;KACnB,CAAC,CAAC,CAAC;IAEJ,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Bidirectional route mapper for SolidJS Router.
3
- *
4
- * Extends {@link BaseRouteMap} from `@xmachines/play-router` — all matching logic
5
- * lives there. This class exists to provide a SolidJS Router-specific type name
6
- * and to allow future adapter-specific extensions without breaking the shared base.
7
- *
8
- * **Inherited API:**
9
- * - `getStateIdByPath(path): string | null` — path → state ID
10
- * - `getPathByStateId(stateId): string | null` — state ID → path pattern
11
- *
12
- * @extends BaseRouteMap
13
- *
14
- * @example
15
- * ```typescript
16
- * import { createRouteMap } from "@xmachines/play-solid-router";
17
- *
18
- * const routeMap = createRouteMap(machine);
19
- *
20
- * routeMap.getStateIdByPath("/profile/123"); // "profile"
21
- * routeMap.getPathByStateId("#settings"); // "/settings/:section?"
22
- * ```
23
- */
24
- import { BaseRouteMap } from "@xmachines/play-router";
25
- export declare class RouteMap extends BaseRouteMap {
26
- }
27
- //# sourceMappingURL=route-map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route-map.d.ts","sourceRoot":"","sources":["../src/route-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,qBAAa,QAAS,SAAQ,YAAY;CAAG"}
package/dist/route-map.js DELETED
@@ -1,27 +0,0 @@
1
- /**
2
- * Bidirectional route mapper for SolidJS Router.
3
- *
4
- * Extends {@link BaseRouteMap} from `@xmachines/play-router` — all matching logic
5
- * lives there. This class exists to provide a SolidJS Router-specific type name
6
- * and to allow future adapter-specific extensions without breaking the shared base.
7
- *
8
- * **Inherited API:**
9
- * - `getStateIdByPath(path): string | null` — path → state ID
10
- * - `getPathByStateId(stateId): string | null` — state ID → path pattern
11
- *
12
- * @extends BaseRouteMap
13
- *
14
- * @example
15
- * ```typescript
16
- * import { createRouteMap } from "@xmachines/play-solid-router";
17
- *
18
- * const routeMap = createRouteMap(machine);
19
- *
20
- * routeMap.getStateIdByPath("/profile/123"); // "profile"
21
- * routeMap.getPathByStateId("#settings"); // "/settings/:section?"
22
- * ```
23
- */
24
- import { BaseRouteMap } from "@xmachines/play-router";
25
- export class RouteMap extends BaseRouteMap {
26
- }
27
- //# sourceMappingURL=route-map.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route-map.js","sourceRoot":"","sources":["../src/route-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG"}