@lotics/app-sdk 0.57.0 → 0.58.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.
@@ -1,4 +1,4 @@
1
- import { type RouteObject } from "react-router-dom";
1
+ import { type RouteObject } from "react-router";
2
2
  export declare function AppRouter({ routes }: {
3
3
  routes: RouteObject[];
4
4
  }): import("react").JSX.Element;
@@ -37,7 +37,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
37
37
  * }
38
38
  */
39
39
  import { useEffect } from "react";
40
- import { BrowserRouter, useLocation, useRoutes, } from "react-router-dom";
40
+ import { BrowserRouter, useLocation, useRoutes, } from "react-router";
41
41
  import { isEmbedded, setUrlParams } from "./rpc.js";
42
42
  /** Host query key carrying the app's current screen, so it's shareable and the
43
43
  * host can restore it on refresh. */
@@ -60,9 +60,10 @@ routes, and splats all work. Inside the tree, use react-router normally:
60
60
 
61
61
  - **Separate entry, optional peer.** `AppRouter` ships from
62
62
  `@lotics/app-sdk/router` (signature: `dist/src/router.d.ts`) so apps that
63
- don't route never pull react-router into their bundle. `react-router-dom`
64
- (`^7`) is an **optional peer dependency** an app that imports the router
65
- entry must install it itself; nothing else in the SDK needs it.
63
+ don't route never pull react-router into their bundle. `react-router`
64
+ (`^7 || ^8` the canonical package; the `react-router-dom` shim's tree also
65
+ satisfies it) is an **optional peer dependency** an app that imports the
66
+ router entry must install it itself; nothing else in the SDK needs it.
66
67
  - **Limitation: element routing only.** `AppRouter` mounts a plain browser
67
68
  router, not a react-router *data* router — route `loader`/`action` fields
68
69
  are ignored, and `useLoaderData` **throws** ("must be used within a data
package/docs/runtime.md CHANGED
@@ -503,6 +503,8 @@ is a transport that wasn't wired.
503
503
  SDK stays off the React-Native-Web dependency tree. Apps import `@lotics/ui`
504
504
  directly.
505
505
  - **Keep the dependency set minimal.** Runtime deps are `posthog-js` and `swr`;
506
- `react`/`react-dom` are peers. `react-router-dom` is an **optional** peer
506
+ `react`/`react-dom` are peers. `react-router` is an **optional** peer
507
507
  pulled in only by the `@lotics/app-sdk/router` subpath export — the root entry
508
- must never import it.
508
+ must never import it. (`react-router` is the canonical package; the
509
+ `react-router-dom` shim also satisfies the peer, since it carries
510
+ `react-router` in its own tree.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Runtime SDK for Lotics custom-code apps — typed hooks, postMessage bridge, mount entry point",
5
5
  "type": "module",
6
6
  "exports": {
@@ -33,19 +33,19 @@
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.0",
35
35
  "react-dom": "^19.2.0",
36
- "react-router-dom": "^7.0.0"
36
+ "react-router": "^7.0.0 || ^8.0.0"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
- "react-router-dom": {
39
+ "react-router": {
40
40
  "optional": true
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^19.2.17",
45
45
  "@types/react-dom": "^19.0.0",
46
- "react": "^19.2.0",
47
- "react-dom": "^19.2.0",
48
- "react-router-dom": "^7.18.1"
46
+ "react": "19.2.3",
47
+ "react-dom": "19.2.3",
48
+ "react-router": "7.18.1"
49
49
  },
50
50
  "keywords": [
51
51
  "lotics",