@owlmeans/client 0.1.18-rc.14 → 0.1.18-rc.16
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/client/SKILL.md +153 -24
- package/build/components/modal.d.ts.map +1 -1
- package/build/components/modal.js.map +1 -1
- package/build/components/toggle.d.ts.map +1 -1
- package/build/context.d.ts.map +1 -1
- package/build/debug.d.ts.map +1 -1
- package/build/errors.d.ts.map +1 -1
- package/build/errors.js.map +1 -1
- package/build/helper.d.ts.map +1 -1
- package/build/services/debug.d.ts.map +1 -1
- package/build/services/debug.js.map +1 -1
- package/build/store.d.ts +3 -2
- package/build/store.d.ts.map +1 -1
- package/build/store.js +3 -2
- package/build/store.js.map +1 -1
- package/build/utils/router.d.ts.map +1 -1
- package/build/value.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/store.ts +3 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Core React client framework providing hooks, context, navigation, and state mana
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
bun add @owlmeans/client
|
|
17
|
+
bun add @owlmeans/client@^0.1.18-rc.15
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -120,7 +120,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
120
120
|
your project's skill store (`.agents/skills/`):
|
|
121
121
|
|
|
122
122
|
```sh
|
|
123
|
-
npx @owlmeans/agent-skills
|
|
123
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.12
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/client",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.16",
|
|
5
|
+
"generatedAt": "2026-09-04T22:43:25.442Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: client
|
|
3
|
-
description: How to use @owlmeans/client — platform-agnostic React client framework (
|
|
3
|
+
description: How to use @owlmeans/client — the platform-agnostic React client framework (web and native) — makeClientContext, App/Router, useNavigate/Navigator, useEntrypoint/RoutedComponent, useStoreModel/useStoreList, useValue, the modal and debug services. Auto-invoked when importing client framework primitives, navigating between screens, or reading client state from React.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,30 +8,50 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/client
|
|
9
9
|
|
|
10
10
|
**Layer:** Client
|
|
11
|
-
**Install:** `"@owlmeans/client": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/client": "^0.1.18-rc.16"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
The React substrate `@owlmeans/web-client` (browser) and the native equivalent are built on. A
|
|
14
|
+
cross-platform package imports from here; an application normally imports from the platform
|
|
15
|
+
package, which re-exports what it needs — **except the hooks below, which are only here**.
|
|
16
|
+
|
|
17
|
+
## What lives where
|
|
18
|
+
|
|
19
|
+
| Import from `@owlmeans/client` | Import from `@owlmeans/web-client` |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `useNavigate`, `useEntrypoint`, `useStoreModel`, `useStoreList`, `useValue`, `useToggle`, `useSetupModalNavigator` — none of these are re-exported | `renderApp`, `makeContext`, `useAuthenticated`, and the re-exported `handler` / `elevate` / `entrypoint` / `route` / `frontend` |
|
|
22
|
+
| `RoutedComponent`, `EntrypointContextParams`, `Navigator`, `NavRequest`, `ClientContext` | `AppConfig`, `AppContext` |
|
|
23
|
+
| `App`, `Router`, `makeClientContext` — the platform-agnostic mounts | `WebApp`, `renderApp` — the browser mounts that wrap them |
|
|
12
24
|
|
|
13
25
|
## Key Exports
|
|
14
26
|
|
|
15
27
|
| Export | Description |
|
|
16
28
|
|--------|-------------|
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
29
|
+
| `makeClientContext(cfg)` | The React client context: `@owlmeans/client-context` plus the state resource, both config resources, the modal and debug services, the rerender hook and `context.router()` |
|
|
30
|
+
| `ClientContext<C>` | That context's interface — adds `router()`, `registerRerenderer(fn)`, `rerender()`, `modal()`, `debug()` |
|
|
31
|
+
| `App` / `AppProps` | Mount: provides the context and, unless `noRouter`, the router. `children` render inside the provider and before the router |
|
|
32
|
+
| `Context` / `ClientContextContainer` / `useContext()` | The React context container and the hook that reads it |
|
|
33
|
+
| `Router` / `RouterProps` / `RouterProvider` / `makeRouterModel()` | Route rendering. `provide` is optional — omitted, the active router plugin's `compile` is used |
|
|
34
|
+
| `useNavigate()` | The `Navigator` — programmatic navigation by entrypoint alias |
|
|
35
|
+
| `Navigator` / `NavRequest` | `navigate` `go` `press` `back` `pressBack` `location`; a request adds `replace` and `silent` to an `AbstractRequest` |
|
|
19
36
|
| `useEntrypoint<T>()` | The `EntrypointContextParams` of the screen currently rendering — `{ alias, path, params, context }` |
|
|
20
|
-
| `RoutedComponent
|
|
21
|
-
| `handler(Component)` | Wrap a React component as an entrypoint handler |
|
|
22
|
-
| `useStoreModel` / `useStoreList` | React hooks over a `@owlmeans/state` resource — one record by id, or a live query
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
|
|
|
26
|
-
|
|
|
37
|
+
| `RoutedComponent<Extra>` | Type of a component elevated on a frontend entrypoint |
|
|
38
|
+
| `handler(Component, preprender?)` | Wrap a React component as an entrypoint handler |
|
|
39
|
+
| `useStoreModel` / `useStoreList` | React hooks over a `@owlmeans/state` resource — one record by id, or a live query |
|
|
40
|
+
| `useValue(loader, deps?, forceDefault?)` / `UseValueParams<T>` | Render an async result. The second argument is the **dependency list**, not a default — see Async values |
|
|
41
|
+
| `useToggle(opened?)` / `Toggleable` | An open/close/toggle handle, which is what a modal surface binds to |
|
|
42
|
+
| `appendModalService` / `createModalService` / `ModalService` / `ModalStackLayer` | The modal stack — `context.modal()`: `request` `response` `cancel` `error` `layer()` `link(toggle)` |
|
|
43
|
+
| `ModalBodyProps` / `useSetupModalNavigator()` | `{ modal?: ModalService }` — the props a modal body is rendered with; and the hook that lets a body navigate |
|
|
44
|
+
| `appendDebugService` / `createDebugService` / `appendStateDebug(ctx, alias)` / `DebugService` | The debug menu — `context.debug()` |
|
|
45
|
+
| `ClientError`, `ComponentError`, `ComponentPropError`, `ComponentPropUndefined` | The client error family, registered with `ResilientError` |
|
|
46
|
+
| `DEF_MODAL_ALIAS` (`modal`), `DEF_DEBUG_ALIAS` (`debug`), `DEBUGGER_FLAG` / `DEBUG_CONFIG_KEY` (`debugger`) | Constants |
|
|
27
47
|
|
|
28
48
|
## Subpath Exports
|
|
29
49
|
|
|
30
|
-
- `./utils` —
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
- `./utils` — `buildEntrypointTree`, `visitEntrypointTree`, `initializeRouter`, `createRouteRenderer`,
|
|
51
|
+
`EntrypointContext`. What the router is assembled from; a package building its own routing surface
|
|
52
|
+
uses these, an application does not.
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
## Navigation
|
|
35
55
|
|
|
36
56
|
Navigation addresses an ALIAS, never a URL — the path lives in the entrypoint declaration, so a
|
|
37
57
|
component never builds one. `useNavigate()` returns the `Navigator`, which asks the target
|
|
@@ -53,15 +73,27 @@ export const ProjectScreen: RoutedComponent = ({ params }) => {
|
|
|
53
73
|
}
|
|
54
74
|
```
|
|
55
75
|
|
|
56
|
-
A URL that belongs to another service
|
|
57
|
-
rather than pushing a history entry. `nav.navigate(entrypoint, request)` takes the
|
|
58
|
-
itself when you already hold it; `nav.back()` / `nav.pressBack()` go one entry back, and
|
|
76
|
+
A URL that comes back starting with `http` belongs to another service, and the navigator assigns
|
|
77
|
+
`location.href` rather than pushing a history entry. `nav.navigate(entrypoint, request)` takes the
|
|
78
|
+
entrypoint itself when you already hold it; `nav.back()` / `nav.pressBack()` go one entry back, and
|
|
59
79
|
`nav.location()` reads the current one.
|
|
60
80
|
|
|
61
81
|
An elevated screen receives `{ alias, path, params, context }` as props, and `useEntrypoint()`
|
|
62
82
|
reads the same values from anywhere below it — read path parameters from `params` and pass them
|
|
63
83
|
down; a nested component never resolves route parameters itself.
|
|
64
84
|
|
|
85
|
+
## Routing and guards
|
|
86
|
+
|
|
87
|
+
`App` mounts `Router`, which resolves the frontend entrypoints the context holds into a nested
|
|
88
|
+
route tree. Only entrypoints whose route is `AppType.Frontend` are mounted, and among those only
|
|
89
|
+
the ones that name no service at all, name this app's service, or are `sticky`. Each node
|
|
90
|
+
contributes **only its own segment** — its ancestors already carry theirs, so a declaration nests
|
|
91
|
+
by naming a `parent`.
|
|
92
|
+
|
|
93
|
+
A screen's guards are its own plus every ancestor's, taken from `getGuards()`. An empty list is an
|
|
94
|
+
open screen; when the list is non-empty and no guard matches, the renderer throws
|
|
95
|
+
`AuthorizationError('frontend-guard')`.
|
|
96
|
+
|
|
65
97
|
## Client state
|
|
66
98
|
|
|
67
99
|
State lives on the context as a `@owlmeans/state` resource; these hooks subscribe to it.
|
|
@@ -74,17 +106,114 @@ const open = useStoreList<Task>({ query: { status: 'open' }, resource: TASKS })
|
|
|
74
106
|
```
|
|
75
107
|
|
|
76
108
|
`useStoreModel` returns a `StateModel` — read `model.record`, write with `model.update({ ... })`.
|
|
77
|
-
|
|
109
|
+
Never assign into `model.record` — it is not a snapshot. On a model the store backs, it IS the
|
|
110
|
+
object the store holds: a field assignment mutates what every other holder of that key reads, and
|
|
111
|
+
the next `update()`/`commit()` carries the mutation through, while nothing notifies and nothing
|
|
78
112
|
re-renders. The hook never throws for missing data either — an id the store knows nothing about
|
|
79
113
|
yields a model whose `empty` is true, and nothing is written into the store on the way.
|
|
80
114
|
`useStoreList` takes `{ query?, sort?, resource? }` and matches everything when `query` is omitted.
|
|
81
115
|
Full contract: [[state]].
|
|
82
116
|
|
|
83
|
-
Both hooks
|
|
84
|
-
|
|
117
|
+
Both hooks go through `useSyncExternalStore`, and the live subscription React installs is torn down
|
|
118
|
+
with the component. The FIRST snapshot is taken during render, by subscribing and unsubscribing
|
|
119
|
+
again in one statement — a state resource seeds its listener synchronously, so no render runs
|
|
120
|
+
without a value and that momentary subscription never outlives the call. The value is then cached
|
|
121
|
+
and the same reference is returned until something actually changes, which is what keeps React from
|
|
122
|
+
re-rendering forever.
|
|
123
|
+
|
|
124
|
+
## Async values
|
|
125
|
+
|
|
126
|
+
`useValue(loader, deps?, forceDefault?)` runs an async loader in an effect and answers with the
|
|
127
|
+
default — `null` when there is none — until it resolves. Its second argument is overloaded, and
|
|
128
|
+
reading it as "a default" is the standard mistake:
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
useValue(async () => api.load(id), [id]) // a DependencyList — re-runs on id
|
|
132
|
+
useValue(async () => api.load(id), { default: EMPTY, deps: [id] }) // both, via UseValueParams
|
|
133
|
+
useValue(async () => api.load(id)) // no deps — the loader runs once
|
|
134
|
+
useValue(async () => api.count(), 0) // a bare non-array value IS the default
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The deps always come from the argument's SHAPE: an array is the dependency list itself, an object
|
|
138
|
+
with a `deps` key gives `deps ?? []`, and anything else gives `[]`. The default is read from the
|
|
139
|
+
same argument: `default` off a `UseValueParams` object, `null` when an array was passed, the value
|
|
140
|
+
itself otherwise. `forceDefault: true` changes only the second half — the argument is then taken as
|
|
141
|
+
the default whatever its shape, while still deciding the deps.
|
|
142
|
+
|
|
143
|
+
The loader is handed a `MutableRefObject<boolean>` cancel ref, which the effect's cleanup sets to
|
|
144
|
+
`true`, so a loader that awaits more than once checks `cancel.current` before it commits. A loader that resolves to a **function** is kept aside and returned as it is, rather than
|
|
145
|
+
being run as a state updater — which is what lets a component be an async value.
|
|
146
|
+
|
|
147
|
+
## Modals
|
|
148
|
+
|
|
149
|
+
`context.modal()` owns a STACK of body components and one surface. The surface is a component the
|
|
150
|
+
app mounts once: it links a toggle to the service, reads the top layer through `layer()`, and
|
|
151
|
+
renders it with the service as a prop.
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
import { useContext, useSetupModalNavigator, useToggle, useValue } from '@owlmeans/client'
|
|
155
|
+
import type { ModalBodyProps } from '@owlmeans/client'
|
|
156
|
+
import { useEffect } from 'react'
|
|
157
|
+
import type { FC } from 'react'
|
|
158
|
+
|
|
159
|
+
export const Modal: FC = () => {
|
|
160
|
+
useSetupModalNavigator() // lets a body navigate; call it once
|
|
161
|
+
const context = useContext()
|
|
162
|
+
const toggle = useToggle(false)
|
|
163
|
+
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
void context.waitForInitialized().then(() => context.modal().link(toggle))
|
|
166
|
+
}, [])
|
|
167
|
+
|
|
168
|
+
const Com = useValue<FC<ModalBodyProps> | undefined>(
|
|
169
|
+
async () => toggle.opened ? context.modal().layer()?.Com : undefined,
|
|
170
|
+
[toggle.opened]
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
return <Dialog open={toggle.opened} onOpenChange={toggle.set}>
|
|
174
|
+
{Com != null ? <Com modal={context.modal()} /> : undefined}
|
|
175
|
+
</Dialog>
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
A **body is an `FC<ModalBodyProps>`** — it receives the service as an optional `modal` prop, and
|
|
180
|
+
that prop is how it answers. Nothing else reaches it, so whatever a body needs travels in the
|
|
181
|
+
closure of the component that requested it.
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
const result = await context.modal().request<Answer>(ConfirmBody) // null when cancelled
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`request` pushes the body onto the stack, opens the linked toggle, and resolves when the body calls
|
|
188
|
+
`modal.response(value)`, `modal.cancel()` (which resolves `null`) or `modal.error(e)` (which
|
|
189
|
+
rejects). All three settle the promise first, then pop the layer and close the surface — and
|
|
190
|
+
`request` pops a SECOND time when its own `await` resumes. One completed request therefore removes
|
|
191
|
+
two layers.
|
|
192
|
+
|
|
193
|
+
**Keep the stack one deep.** A lone body ends on an empty stack and the second pop costs nothing.
|
|
194
|
+
A body requested from inside another body takes its parent down with it: closing the child pops the
|
|
195
|
+
child, sees a layer still there and schedules the surface to reopen 500 ms later, and then the
|
|
196
|
+
child's continuation pops the parent in the microtask before that timer fires. The surface reopens
|
|
197
|
+
with `layer()` answering `undefined` and nothing to render, and the parent's own `request` — whose
|
|
198
|
+
deferred no one is left to settle — never resolves. Chain from the caller instead: await the first
|
|
199
|
+
request, then issue the next.
|
|
200
|
+
|
|
201
|
+
## Debug menu
|
|
202
|
+
|
|
203
|
+
`appendDebugService` registers the menu only when `cfg.debug.all` or `cfg.debug.debugger` is set,
|
|
204
|
+
so `context.debug()` answers `undefined` in a normal build and a caller must handle that. A package
|
|
205
|
+
that owns a client resource calls `appendStateDebug(context, alias)` at wiring time to have it
|
|
206
|
+
listed under "Reset states"; "Reset app" erases the whole client DB.
|
|
85
207
|
|
|
86
208
|
## Depends On
|
|
87
209
|
|
|
88
|
-
- `@owlmeans/client-context`, `@owlmeans/client-entrypoint`, `@owlmeans/client-
|
|
89
|
-
- `@owlmeans/router`, `@owlmeans/
|
|
90
|
-
|
|
210
|
+
- `@owlmeans/client-context`, `@owlmeans/client-entrypoint`, `@owlmeans/client-resource`
|
|
211
|
+
- `@owlmeans/router` (the routing plugin surface), `@owlmeans/state`, `@owlmeans/entrypoint`,
|
|
212
|
+
`@owlmeans/resource`, `@owlmeans/config`, `@owlmeans/context`, `@owlmeans/auth`, `@owlmeans/error`
|
|
213
|
+
- `react` and `@remix-run/router` (peer)
|
|
214
|
+
|
|
215
|
+
## Related
|
|
216
|
+
|
|
217
|
+
- [[web-client]] — the browser layer built on this
|
|
218
|
+
- [[state]] — the store the two state hooks read
|
|
219
|
+
- [[router]] — the routing plugin `context.router()` resolves
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/components/modal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAmB,MAAM,YAAY,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAKhD,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/components/modal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAmB,MAAM,YAAY,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAKhD,eAAO,MAAM,kBAAkB,WAAW,MAAM,KAAqB,YAwDpE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAC9E,CAAC,UAAS,MAAM,KACpB,CAAC,GAAG,kBAUN,CAAA;AAED,eAAO,MAAM,sBAAsB,YAOlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/components/modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;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,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAE7B,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAEtC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE;IACzC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,SAAS,GAAG,WAAW,EAAE,CAAA;IAC/B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,CAAA;QAC7B,KAAK,CAAC,SAAS,GAAG,SAAS,CAAA;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/components/toggle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/components/toggle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,eAAO,MAAM,SAAS,YAAa,OAAO,KAAG,UAkB5C,CAAA"}
|
package/build/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAmB/C,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAmB/C,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,KAAG,CA4BjH,CAAA;AAED,eAAO,MAAM,sBAAsB,2CAA+C,CAAA;AAElF,eAAO,MAAM,OAAO,uDAAkC,CAAA;AAEtD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,QAE5E,CAAA"}
|
package/build/debug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAA;AAElE,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAA;AAElE,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,MAAM,SASzG,CAAA"}
|
package/build/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,WAAY,SAAQ,cAAc;IAC7C,OAAuB,QAAQ,EAAE,MAAM,CAAgB;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,WAAY,SAAQ,cAAc;IAC7C,OAAuB,QAAQ,EAAE,MAAM,CAAgB;IAEvD,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,qBAAa,cAAe,SAAQ,WAAW;IAC7C,OAAuB,QAAQ,EAAE,MAAM,CAAqC;IAE5E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAuB,QAAQ,EAAE,MAAM,CAAmC;IAE1E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,OAAuB,QAAQ,EAAE,MAAM,CAA4C;IAEnF,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF"}
|
package/build/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,OAAO,WAAY,SAAQ,cAAc;IACtC,MAAM,CAAU,QAAQ,GAAW,aAAa,CAAA;IAEvD,YAAY,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[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CAAC,sBAAsB,CAAC,CAAA;AACzD,cAAc,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAA"}
|
package/build/helper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAUlD,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAUlD,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,EAAE,aACvB,eAAe,CAAC,CAAC,CAAC,eAAe,OAAO,KAClD,sBAAsB,CAAC,CAAC,CAiC1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/services/debug.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,aAAa,CAAA;AAKnE,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/services/debug.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,aAAa,CAAA;AAKnE,eAAO,MAAM,kBAAkB,WAAW,MAAM,KAAqB,YA4EpE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,OAC9E,CAAC,UAAS,MAAM,KACpB,CAAC,GAAG,kBAYN,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/services/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAG5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/services/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACpE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAG5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,GAAW,eAAe,EAAgB,EAAE;IAClF,MAAM,QAAQ,GAAG,iBAAiB,KAAK,EAAE,CAAA;IAEzC,MAAM,OAAO,GAAiB,iBAAiB,CAAe,KAAK,EAAE;QACnE,KAAK,EAAE;YACL;gBACE,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE;aACxC;YACD;gBACE,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,WA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AAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;wBAClC,OAAO,CAAC,QAAQ,EAAE,CAAA;wBAClB,KAAK,CAAC,MAAM,EAAE,CAAA;wBAEd,OAAO,eAAe,CAAA;oBACxB,CAAC;oBACD,OAAO,oBAAoB,CAAA;gBAC7B,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,GAAM,EAAE,KAAK,GAAW,eAAe,EACf,EAAE;IAC1B,MAAM,IAAI,GAAG,GAA6B,CAAA;IAE1C,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,IAAI,CAAA;IACxF,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAA;QACzC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAC/B,CAAC;IAED,IAAI,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAe,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE7E,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|
package/build/store.d.ts
CHANGED
|
@@ -6,8 +6,9 @@ import type { UseStoreListOptions } from './types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* It never throws for missing data: an id the store knows nothing about yields a model whose
|
|
8
8
|
* `empty` is true — reading `record` gives the resource's configured default, and nothing is
|
|
9
|
-
* written into the store on the way.
|
|
10
|
-
*
|
|
9
|
+
* written into the store on the way. An ABSENT id is the same answer rather than an error, since
|
|
10
|
+
* a screen renders before the record that supplies the id has arrived; on a `single` resource an
|
|
11
|
+
* absent id addresses its sole record. Writing through an empty model with no id is refused.
|
|
11
12
|
*/
|
|
12
13
|
export declare const useStoreModel: <T extends ResourceRecord = ResourceRecord>(id?: string, alias?: string) => StateModel<T>;
|
|
13
14
|
/**
|
package/build/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAiCrD
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAiCrD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,cAAc,GAAG,cAAc,OAChE,MAAM,UAAU,MAAM,KAC1B,UAAU,CAAC,CAAC,CASd,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,cAAc,GAAG,cAAc,SAC7D,mBAAmB,CAAC,CAAC,CAAC,KAC5B,UAAU,CAAC,CAAC,CAAC,EAkBf,CAAA"}
|
package/build/store.js
CHANGED
|
@@ -32,8 +32,9 @@ const bind = (subscribe) => {
|
|
|
32
32
|
*
|
|
33
33
|
* It never throws for missing data: an id the store knows nothing about yields a model whose
|
|
34
34
|
* `empty` is true — reading `record` gives the resource's configured default, and nothing is
|
|
35
|
-
* written into the store on the way.
|
|
36
|
-
*
|
|
35
|
+
* written into the store on the way. An ABSENT id is the same answer rather than an error, since
|
|
36
|
+
* a screen renders before the record that supplies the id has arrived; on a `single` resource an
|
|
37
|
+
* absent id addresses its sole record. Writing through an empty model with no id is refused.
|
|
37
38
|
*/
|
|
38
39
|
export const useStoreModel = (id, alias) => {
|
|
39
40
|
const context = useContext();
|
package/build/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC;;;;;;;;GAQG;AACH,MAAM,IAAI,GAAG,CAAI,SAAuD,EAAE,EAAE;IAC1E,IAAI,OAAsB,CAAA;IAC1B,IAAI,MAAM,GAAG,KAAK,CAAA;IAElB,MAAM,OAAO,GAAG,CAAC,MAAmB,EAAE,EAAE,CAAC,CAAC,KAAQ,EAAE,EAAE;QACpD,OAAO,GAAG,KAAK,CAAA;QACf,MAAM,GAAG,IAAI,CAAA;QACb,MAAM,EAAE,EAAE,CAAA;IACZ,CAAC,CAAA;IAED,OAAO;QACL,SAAS,EAAE,CAAC,MAAkB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7D,QAAQ,EAAE,GAAM,EAAE;YAChB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,SAAS,CAAC,OAAO,EAAE,CAAC,EAAE,CAAA;YACxB,CAAC;YAED,OAAO,OAAY,CAAA;QACrB,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC;;;;;;;;GAQG;AACH,MAAM,IAAI,GAAG,CAAI,SAAuD,EAAE,EAAE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
|
|
|
1
|
-
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../src/value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAIhD;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../src/value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAIhD;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,UAChB,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,QACpD,CAAC,GAAG,cAAc,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,iBACpC,OAAO,KACrB,CAAC,GAAG,IAiDN,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/client",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
32
|
-
"@owlmeans/client-context": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/client-resource": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/error": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
39
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
40
|
-
"@owlmeans/router": "^0.1.18-rc.
|
|
41
|
-
"@owlmeans/state": "^0.1.18-rc.
|
|
31
|
+
"@owlmeans/auth": "^0.1.18-rc.9",
|
|
32
|
+
"@owlmeans/client-context": "^0.1.18-rc.13",
|
|
33
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.13",
|
|
34
|
+
"@owlmeans/client-resource": "^0.1.18-rc.13",
|
|
35
|
+
"@owlmeans/config": "^0.1.18-rc.12",
|
|
36
|
+
"@owlmeans/context": "^0.1.18-rc.8",
|
|
37
|
+
"@owlmeans/error": "^0.1.18-rc.8",
|
|
38
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.11",
|
|
39
|
+
"@owlmeans/resource": "^0.1.18-rc.9",
|
|
40
|
+
"@owlmeans/router": "^0.1.18-rc.8",
|
|
41
|
+
"@owlmeans/state": "^0.1.18-rc.10"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@remix-run/router": "*",
|
package/src/store.ts
CHANGED
|
@@ -40,8 +40,9 @@ const bind = <V>(subscribe: (listener: (value: V) => void) => () => void) => {
|
|
|
40
40
|
*
|
|
41
41
|
* It never throws for missing data: an id the store knows nothing about yields a model whose
|
|
42
42
|
* `empty` is true — reading `record` gives the resource's configured default, and nothing is
|
|
43
|
-
* written into the store on the way.
|
|
44
|
-
*
|
|
43
|
+
* written into the store on the way. An ABSENT id is the same answer rather than an error, since
|
|
44
|
+
* a screen renders before the record that supplies the id has arrived; on a `single` resource an
|
|
45
|
+
* absent id addresses its sole record. Writing through an empty model with no id is refused.
|
|
45
46
|
*/
|
|
46
47
|
export const useStoreModel = <T extends ResourceRecord = ResourceRecord>(
|
|
47
48
|
id?: string, alias?: string
|