@owlmeans/web-wl 0.1.18-rc.13 → 0.1.18-rc.15
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/web-wl/SKILL.md +54 -11
- package/build/service.d.ts.map +1 -1
- package/build/service.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Web whitelabel — service factory, entrypoint declarations, and React component
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/web-wl
|
|
15
|
+
bun add @owlmeans/web-wl@^0.1.18-rc.14
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -61,7 +61,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
61
61
|
your project's skill store (`.agents/skills/`):
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
|
-
npx @owlmeans/agent-skills
|
|
64
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.12
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
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/web-wl",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.15",
|
|
5
|
+
"generatedAt": "2026-09-04T22:43:25.450Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: web-wl
|
|
3
|
-
description: How to use @owlmeans/web-wl —
|
|
3
|
+
description: How to use @owlmeans/web-wl — the browser half of the white-label contract — the elevated WL_PROVIDE entrypoint, the caching WlWebService that loads an organization's white-label set, and the WlLogo component. Auto-invoked when reading white-label data in a web app or rendering a customer's branding.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,29 +8,72 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-wl
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React)
|
|
11
|
-
**Install:** `"@owlmeans/web-wl": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-wl": "^0.1.18-rc.15"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
Reads what `@owlmeans/server-wl` serves. One service call per organization entity, cached inside the
|
|
14
|
+
service, plus a component for the one piece of branding almost every app needs.
|
|
12
15
|
|
|
13
16
|
## Key Exports
|
|
14
17
|
|
|
15
18
|
| Export | Description |
|
|
16
19
|
|--------|-------------|
|
|
17
|
-
| `
|
|
18
|
-
| `makeWlService()` |
|
|
19
|
-
| `
|
|
20
|
-
|
|
|
20
|
+
| `entrypoints` | The `WL_PROVIDE` declaration elevated for the browser. Spread it into the app's entrypoint list or `call()` misses |
|
|
21
|
+
| `makeWlService(alias?)` | The service factory. Defaults to `DEFAULT_ALIAS` |
|
|
22
|
+
| `DEFAULT_ALIAS` | `'wl-web-serivce'` — spelled exactly that way. Always register and look the service up through this constant rather than a literal |
|
|
23
|
+
| `WlWebService` | `load<T>(entityId, resource?) => Promise<ProvidedWLSet<T>>` and `extract<T>(key, set) => ProvidedWL<T>`. The `resource` argument is accepted and ignored — the whole set always comes back |
|
|
24
|
+
| `ProvidedWLSet<T>` | The whole answer: `{ [providerAlias]: ProvidedWL<T> }` |
|
|
25
|
+
| `WlLogo` | `<WlLogo entityId={…} defImg={…} />` — both props optional. Renders the `wl-logo` section's `brand.wideLogo`, else `defImg`, else nothing; with no `entityId` it never loads and only `defImg` can show. It reads the section by the literal name `wl-logo`, so the backend must register its media provider under exactly that alias |
|
|
26
|
+
| `Config`, `Context` | This package's `AppConfig`/`AppContext` from `@owlmeans/web-client`, narrowed for its own service |
|
|
27
|
+
|
|
28
|
+
The component prop interfaces are **not** exported — the entry point re-exports the component only.
|
|
29
|
+
Type a wrapper with `ComponentProps<typeof WlLogo>` rather than importing a props name.
|
|
21
30
|
|
|
22
|
-
##
|
|
31
|
+
## Wiring
|
|
23
32
|
|
|
24
33
|
```typescript
|
|
25
|
-
import {
|
|
34
|
+
import { entrypoints as wlEntrypoints, makeWlService } from '@owlmeans/web-wl'
|
|
26
35
|
|
|
27
36
|
context.registerService(makeWlService())
|
|
28
|
-
const
|
|
37
|
+
const entrypoints = [...baseEntrypoints, ...wlEntrypoints, ...managerEntrypoints]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Reading a white-label set
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import { DEFAULT_ALIAS } from '@owlmeans/web-wl'
|
|
44
|
+
import type { WlWebService } from '@owlmeans/web-wl'
|
|
45
|
+
import type { CustomStyles } from '@owlmeans/wled'
|
|
46
|
+
|
|
47
|
+
const wl = context.service<WlWebService>(DEFAULT_ALIAS)
|
|
48
|
+
const set = await wl.load(entityId)
|
|
49
|
+
const styles = wl.extract<CustomStyles>('wl-styles', set)
|
|
50
|
+
if (styles.exists === true) {
|
|
51
|
+
applyTheme(styles.colors, styles.font)
|
|
52
|
+
}
|
|
29
53
|
```
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
The key is the **provider service alias the backend registered**, the same string that appears in
|
|
56
|
+
that server's `cfg.wlProviders`. It is not a `WL_TYPE_*` constant — those name the `type` field
|
|
57
|
+
inside a section, which is how a reader confirms the shape it got.
|
|
58
|
+
|
|
59
|
+
The value `load` sends as the `entity` param is the argument it was given, unchanged; what the server
|
|
60
|
+
accepts there is the server's rule, not this package's.
|
|
61
|
+
|
|
62
|
+
`load` memoises per `entityId` in a cache created inside `makeWlService`, so the memo lives exactly as
|
|
63
|
+
long as that service instance and two services made under different aliases keep independent caches.
|
|
64
|
+
The entry is written only after the call resolves and there is no in-flight promise memo, so
|
|
65
|
+
concurrent callers — two `WlLogo`s mounting in the same tick — each issue their own request; the
|
|
66
|
+
cache only dedups calls made after one has returned. Nothing invalidates it either, so a screen that
|
|
67
|
+
has just written new branding must reload the page (or read the write's own response) rather than
|
|
68
|
+
expecting `load` to see the change.
|
|
32
69
|
|
|
33
70
|
## Depends On
|
|
34
71
|
|
|
35
|
-
- `@owlmeans/wled`, `@owlmeans/client
|
|
72
|
+
- `@owlmeans/wled`, `@owlmeans/client`, `@owlmeans/client-entrypoint`, `@owlmeans/context`
|
|
73
|
+
- `@owlmeans/web-client` — supplies the `AppConfig`/`AppContext` this package's `Config`/`Context`
|
|
74
|
+
extend. It is imported by the published types but missing from the manifest, so a consumer has to
|
|
75
|
+
install it explicitly or the declarations do not resolve
|
|
36
76
|
- `react` (peer)
|
|
77
|
+
|
|
78
|
+
The server counterpart is `@owlmeans/server-wl`. Editing screens for white-label records live in
|
|
79
|
+
downstream manager packages, not here.
|
package/build/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkC,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9E,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkC,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9E,eAAO,MAAM,aAAa,WAAW,MAAM,KAAmB,YAqB7D,CAAA"}
|
package/build/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,aAAa,EAAE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"0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/client": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/wled": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/client": "^0.1.18-rc.16",
|
|
25
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.13",
|
|
26
|
+
"@owlmeans/context": "^0.1.18-rc.8",
|
|
27
|
+
"@owlmeans/wled": "^0.1.18-rc.11"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "*"
|