@owlmeans/web-client 0.1.11 → 0.1.14
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/agent-meta/instructions/web-client.instructions.md +3 -3
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-client/SKILL.md +4 -4
- package/build/components/dispatcher/component.d.ts.map +1 -1
- package/build/components/dispatcher/component.js +1 -2
- package/build/components/dispatcher/component.js.map +1 -1
- package/build/components/dispatcher/parametrise.d.ts +1 -1
- package/build/components/dispatcher/parametrise.d.ts.map +1 -1
- package/build/main.d.ts.map +1 -1
- package/build/main.js +1 -2
- package/build/main.js.map +1 -1
- package/build/router.d.ts +8 -1
- package/build/router.d.ts.map +1 -1
- package/build/router.js +8 -4
- package/build/router.js.map +1 -1
- package/package.json +21 -23
- package/src/components/dispatcher/component.tsx +1 -2
- package/src/main.tsx +1 -2
- package/src/router.ts +8 -5
|
@@ -7,13 +7,13 @@ applyTo: "**/index.tsx, **/modules.ts, **/modules.tsx, **/*.ts, **/*.tsx"
|
|
|
7
7
|
# @owlmeans/web-client
|
|
8
8
|
|
|
9
9
|
**Layer:** Web (React)
|
|
10
|
-
**Install:** `"@owlmeans/web-client": "^0.1.
|
|
10
|
+
**Install:** `"@owlmeans/web-client": "^0.1.14"` in `dependencies`
|
|
11
11
|
|
|
12
12
|
## Key Exports
|
|
13
13
|
|
|
14
14
|
| Export | Description |
|
|
15
15
|
|--------|-------------|
|
|
16
|
-
| `renderApp<C, T>(context)` | Mount React app
|
|
16
|
+
| `renderApp<C, T>(context)` | Mount React app (routing via the active router plugin — OwlMeans by default) |
|
|
17
17
|
| `elevate(modules, alias, handler)` | Attach a React component to an entrypoint |
|
|
18
18
|
| `handler(Component)` | Wrap a React component as an entrypoint handler |
|
|
19
19
|
| `context.registerEntrypoints(modules)` | Register entrypoints on the context |
|
|
@@ -39,4 +39,4 @@ modules.push(entrypoint(route(HOME, '/', frontend({ default: true })), handler(H
|
|
|
39
39
|
|
|
40
40
|
## Depends On
|
|
41
41
|
|
|
42
|
-
- `@owlmeans/client`, `@owlmeans/web-router
|
|
42
|
+
- `@owlmeans/client`, `@owlmeans/web-router` (default OwlMeans browser routing), `@owlmeans/web-panel`, `@owlmeans/client-i18n`, `@owlmeans/entrypoint`, `@owlmeans/route`, `react`, `react-dom`. No longer depends on `react-router` (opt in via `@owlmeans/web-router-react-router`). The former `provide` export is a deprecated `undefined`.
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@owlmeans/web-client",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.14",
|
|
5
|
+
"generatedAt": "2026-08-05T16:56:53.380Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,13 +8,13 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-client
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React)
|
|
11
|
-
**Install:** `"@owlmeans/web-client": "^0.1.
|
|
11
|
+
**Install:** `"@owlmeans/web-client": "^0.1.14"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
## Key Exports
|
|
14
14
|
|
|
15
15
|
| Export | Description |
|
|
16
16
|
|--------|-------------|
|
|
17
|
-
| `renderApp<C, T>(context)` | Mount the React app
|
|
17
|
+
| `renderApp<C, T>(context)` | Mount the React app (routing via the active router plugin — OwlMeans by default) |
|
|
18
18
|
| `elevate(modules, alias, handler)` | Attach a React component (or `handler(Component)`) to an entrypoint |
|
|
19
19
|
| `handler(Component)` | Wrap a React component as an entrypoint handler |
|
|
20
20
|
| `context.registerEntrypoints(modules)` | Register the full entrypoint list on the context |
|
|
@@ -54,6 +54,6 @@ modules.push(
|
|
|
54
54
|
|
|
55
55
|
## Depends On
|
|
56
56
|
|
|
57
|
-
- `@owlmeans/client`, `@owlmeans/web-router
|
|
57
|
+
- `@owlmeans/client`, `@owlmeans/web-router` (default OwlMeans browser routing), `@owlmeans/web-panel` (typically), `@owlmeans/client-i18n`
|
|
58
58
|
- `@owlmeans/entrypoint`, `@owlmeans/route`
|
|
59
|
-
- `react`, `react-dom
|
|
59
|
+
- `react`, `react-dom` (peer). No longer depends on `react-router` — opt into it with `@owlmeans/web-router-react-router` (`appendReactRouter`). The former `provide` export is a deprecated `undefined`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/dispatcher/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/dispatcher/component.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,6FAmCrB,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DispatcherHOC } from '@owlmeans/client-auth';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
|
-
import { useSearchParams } from 'react-router';
|
|
5
4
|
import { useI18nLib } from '@owlmeans/client-i18n';
|
|
6
5
|
import { AUTH_QUERY } from '@owlmeans/auth';
|
|
7
6
|
import { useContext } from '../../context.js';
|
|
8
7
|
export const Dispatcher = DispatcherHOC(({ provideToken }) => {
|
|
9
|
-
const [query] = useSearchParams();
|
|
10
8
|
const context = useContext();
|
|
9
|
+
const [query] = context.router().useSearchParams();
|
|
11
10
|
const t = useI18nLib('auth', 'dispatcher');
|
|
12
11
|
useEffect(() => {
|
|
13
12
|
const token = query.get(AUTH_QUERY);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/dispatcher/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/dispatcher/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IAC3D,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE,CAAA;IAElD,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IAE1C,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QACnC,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,MAAM,MAAM,GAA2B,EAAE,CAAA;YACzC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBAC3B,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;oBACvB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;gBACrB,CAAC;YACH,CAAC,CAAC,CAAA;YAEF,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,EAAE,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAC/C,IAAI,UAAU,IAAI,IAAI,EAAE,CAAC;oBACvB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;gBACxC,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE;YACzC,KAAK,EAAE,MAAM,EAAE,sCAAsC;YACrD,OAAO,EAAE,MAAM,EAAE,yBAAyB;YAC1C,cAAc,EAAE,QAAQ,EAAE,+BAA+B;YACzD,UAAU,EAAE,QAAQ,EAAE,yCAAyC;YAC/D,SAAS,EAAE,QAAQ,EAAE,8BAA8B;YACnD,UAAU,EAAE,MAAM,EAAE,6BAA6B;YACjD,aAAa,EAAE,MAAM,EAAE,6BAA6B;SACrD,YAAG,CAAC,CAAC,SAAS,CAAC,GAAO,CAAC,CAAC,CAAC,SAAS,CAAA;AACrC,CAAC,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RoutedComponent } from "@owlmeans/client";
|
|
2
2
|
import type { DispatcherProps } from "@owlmeans/client-auth";
|
|
3
3
|
import { ParametrisedProps } from "./types.js";
|
|
4
|
-
export declare const parametriseDispatcher: (def: Partial<ParametrisedProps>, Com?: RoutedComponent<DispatcherProps>) => (props: ParametrisedProps) => import("react
|
|
4
|
+
export declare const parametriseDispatcher: (def: Partial<ParametrisedProps>, Com?: RoutedComponent<DispatcherProps>) => (props: ParametrisedProps) => import("react").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=parametrise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametrise.d.ts","sourceRoot":"","sources":["../../../src/components/dispatcher/parametrise.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,qBAAqB,GAAI,KAAK,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,eAAe,CAAC,eAAe,CAAC,MAEnG,OAAO,iBAAiB,
|
|
1
|
+
{"version":3,"file":"parametrise.d.ts","sourceRoot":"","sources":["../../../src/components/dispatcher/parametrise.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAI5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,qBAAqB,GAAI,KAAK,OAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,eAAe,CAAC,eAAe,CAAC,MAEnG,OAAO,iBAAiB,gCAiBjC,CAAA"}
|
package/build/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAGtE,eAAO,MAAM,MAAM,GAAI,MAAM,SAAS,EAAE,OAAO,aAAa,SAkB3D,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,OAAO,aAAa,SAC5D,CAAA"}
|
package/build/main.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createRoot, hydrateRoot } from 'react-dom/client';
|
|
3
3
|
import { DEFAULT_ROOT } from './consts.js';
|
|
4
4
|
import { WebApp } from './components/index.js';
|
|
5
|
-
import { provide } from './router.js';
|
|
6
5
|
export const render = (node, opts) => {
|
|
7
6
|
const _callback = () => {
|
|
8
7
|
const key = opts?.domId ?? DEFAULT_ROOT;
|
|
@@ -22,5 +21,5 @@ export const render = (node, opts) => {
|
|
|
22
21
|
};
|
|
23
22
|
opts?.onReady ?? true ? window.addEventListener('DOMContentLoaded', _callback) : _callback();
|
|
24
23
|
};
|
|
25
|
-
export const renderApp = (context, opts) => render(_jsx(WebApp, { context: context
|
|
24
|
+
export const renderApp = (context, opts) => render(_jsx(WebApp, { context: context }), opts);
|
|
26
25
|
//# sourceMappingURL=main.js.map
|
package/build/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAe,EAAE,IAAoB,EAAE,EAAE;IAC9D,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,MAAM,GAAG,GAAG,IAAI,EAAE,KAAK,IAAI,YAAY,CAAA;QACvC,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;QACzC,IAAI,IAAI,EAAE,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,EAAE,CAAC,CAAA;QAC7C,CAAC;QACD,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,mCAAmC,GAAG,EAAE,CAAC,CAAA;QAC3D,CAAC;QACD,IAAI,IAAI,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;YAC3B,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACzB,CAAC;aAAM,CAAC;YACN,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC,CAAA;IAED,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAA;AAC9F,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAA+C,OAAU,EAAE,IAAoB,EAAE,EAAE,CAC1G,MAAM,CAAC,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,GAAI,EAAE,IAAI,CAAC,CAAA"}
|
package/build/router.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { RouterProvider } from '@owlmeans/client';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Routing no longer needs an explicit provider. OwlMeans routing now
|
|
4
|
+
* resolves the route compiler from the active router plugin
|
|
5
|
+
* (`context.router().compile`) whenever `provide` is omitted. This export is kept
|
|
6
|
+
* as `undefined` for source compatibility with apps that still pass it through
|
|
7
|
+
* (e.g. `<PanelApp provide={provide} />`); passing `undefined` selects the default.
|
|
8
|
+
*/
|
|
9
|
+
export declare const provide: RouterProvider | undefined;
|
|
3
10
|
//# sourceMappingURL=router.d.ts.map
|
package/build/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,cAAc,GAAG,SAAqB,CAAA"}
|
package/build/router.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Routing no longer needs an explicit provider. OwlMeans routing now
|
|
3
|
+
* resolves the route compiler from the active router plugin
|
|
4
|
+
* (`context.router().compile`) whenever `provide` is omitted. This export is kept
|
|
5
|
+
* as `undefined` for source compatibility with apps that still pass it through
|
|
6
|
+
* (e.g. `<PanelApp provide={provide} />`); passing `undefined` selects the default.
|
|
7
|
+
*/
|
|
8
|
+
export const provide = undefined;
|
|
5
9
|
//# sourceMappingURL=router.js.map
|
package/build/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAA+B,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,36 +21,34 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/auth": "^0.1.
|
|
25
|
-
"@owlmeans/auth-common": "^0.1.
|
|
26
|
-
"@owlmeans/client": "^0.1.
|
|
27
|
-
"@owlmeans/client-auth": "^0.1.
|
|
28
|
-
"@owlmeans/client-context": "^0.1.
|
|
29
|
-
"@owlmeans/client-i18n": "^0.1.
|
|
30
|
-
"@owlmeans/client-entrypoint": "^0.1.
|
|
31
|
-
"@owlmeans/client-resource": "^0.1.
|
|
32
|
-
"@owlmeans/client-route": "^0.1.
|
|
33
|
-
"@owlmeans/config": "^0.1.
|
|
34
|
-
"@owlmeans/context": "^0.1.
|
|
35
|
-
"@owlmeans/error": "^0.1.
|
|
36
|
-
"@owlmeans/i18n": "^0.1.
|
|
37
|
-
"@owlmeans/route": "^0.1.
|
|
38
|
-
"@owlmeans/web-db": "^0.1.
|
|
39
|
-
"@owlmeans/web-router": "^0.1.
|
|
24
|
+
"@owlmeans/auth": "^0.1.14",
|
|
25
|
+
"@owlmeans/auth-common": "^0.1.14",
|
|
26
|
+
"@owlmeans/client": "^0.1.14",
|
|
27
|
+
"@owlmeans/client-auth": "^0.1.14",
|
|
28
|
+
"@owlmeans/client-context": "^0.1.14",
|
|
29
|
+
"@owlmeans/client-i18n": "^0.1.14",
|
|
30
|
+
"@owlmeans/client-entrypoint": "^0.1.14",
|
|
31
|
+
"@owlmeans/client-resource": "^0.1.14",
|
|
32
|
+
"@owlmeans/client-route": "^0.1.14",
|
|
33
|
+
"@owlmeans/config": "^0.1.14",
|
|
34
|
+
"@owlmeans/context": "^0.1.14",
|
|
35
|
+
"@owlmeans/error": "^0.1.14",
|
|
36
|
+
"@owlmeans/i18n": "^0.1.14",
|
|
37
|
+
"@owlmeans/route": "^0.1.14",
|
|
38
|
+
"@owlmeans/web-db": "^0.1.14",
|
|
39
|
+
"@owlmeans/web-router": "^0.1.14",
|
|
40
40
|
"react-dropzone": "^14.3.5"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "*",
|
|
44
|
-
"react-dom": "*"
|
|
45
|
-
"react-router": "^7.*"
|
|
44
|
+
"react-dom": "*"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@owlmeans/dep-config": "workspace:*",
|
|
49
|
-
"@types/react": "^19.2.
|
|
48
|
+
"@types/react": "^19.2.17",
|
|
50
49
|
"@types/react-dom": "^19.2.3",
|
|
51
|
-
"nodemon": "^3.1.
|
|
52
|
-
"
|
|
53
|
-
"typescript": "^6.0.2"
|
|
50
|
+
"nodemon": "^3.1.14",
|
|
51
|
+
"typescript": "^6.0.3"
|
|
54
52
|
},
|
|
55
53
|
"publishConfig": {
|
|
56
54
|
"access": "public"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { DispatcherHOC } from '@owlmeans/client-auth'
|
|
2
2
|
import { useEffect } from 'react'
|
|
3
|
-
import { useSearchParams } from 'react-router'
|
|
4
3
|
import { useI18nLib } from '@owlmeans/client-i18n'
|
|
5
4
|
import { AUTH_QUERY } from '@owlmeans/auth'
|
|
6
5
|
import { useContext } from '../../context.js'
|
|
7
6
|
|
|
8
7
|
export const Dispatcher = DispatcherHOC(({ provideToken }) => {
|
|
9
|
-
const [query] = useSearchParams()
|
|
10
8
|
const context = useContext()
|
|
9
|
+
const [query] = context.router().useSearchParams()
|
|
11
10
|
|
|
12
11
|
const t = useI18nLib('auth', 'dispatcher')
|
|
13
12
|
|
package/src/main.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import { createRoot, hydrateRoot } from 'react-dom/client'
|
|
|
4
4
|
import { DEFAULT_ROOT } from './consts.js'
|
|
5
5
|
import type { AppConfig, AppContext, RenderOptions } from './types.js'
|
|
6
6
|
import { WebApp } from './components/index.js'
|
|
7
|
-
import { provide } from './router.js'
|
|
8
7
|
|
|
9
8
|
export const render = (node: ReactNode, opts?: RenderOptions) => {
|
|
10
9
|
const _callback = () => {
|
|
@@ -27,4 +26,4 @@ export const render = (node: ReactNode, opts?: RenderOptions) => {
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export const renderApp = <C extends AppConfig, T extends AppContext<C>>(context: T, opts?: RenderOptions) =>
|
|
30
|
-
render(<WebApp context={context}
|
|
29
|
+
render(<WebApp context={context} />, opts)
|
package/src/router.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import type { RouterProvider } from '@owlmeans/client'
|
|
3
|
-
import type { RouteObject } from 'react-router'
|
|
4
|
-
import { createBrowserRouter } from 'react-router'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Routing no longer needs an explicit provider. OwlMeans routing now
|
|
6
|
+
* resolves the route compiler from the active router plugin
|
|
7
|
+
* (`context.router().compile`) whenever `provide` is omitted. This export is kept
|
|
8
|
+
* as `undefined` for source compatibility with apps that still pass it through
|
|
9
|
+
* (e.g. `<PanelApp provide={provide} />`); passing `undefined` selects the default.
|
|
10
|
+
*/
|
|
11
|
+
export const provide: RouterProvider | undefined = undefined
|