@owlmeans/wled 0.1.18-rc.10 → 0.1.18-rc.12

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 CHANGED
@@ -13,7 +13,7 @@ Whitelabel ("wled") core — shared types, models, and entrypoint declarations f
13
13
  ## Installation
14
14
 
15
15
  ```bash
16
- bun add @owlmeans/wled
16
+ bun add @owlmeans/wled@^0.1.18-rc.10
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -72,7 +72,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
72
72
  your project's skill store (`.agents/skills/`):
73
73
 
74
74
  ```sh
75
- npx @owlmeans/agent-skills
75
+ npx @owlmeans/agent-skills@^0.1.18-rc.13
76
76
  ```
77
77
 
78
78
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/wled",
4
- "version": "0.1.18-rc.10",
5
- "generatedAt": "2026-09-01T17:39:40.765Z",
4
+ "version": "0.1.18-rc.12",
5
+ "generatedAt": "2026-09-10T18:54:42.500Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wled
3
- description: How to use @owlmeans/wled — whitelist/allowlist ("white-label") entity types, model, and shared module declarations. Auto-invoked when importing wled types or building white-label features.
3
+ description: How to use @owlmeans/wled — the shared white-label contract — company info, custom styles, brand media and DNS shapes, their AJV schemas, the wl type constants and the single WL_PROVIDE entrypoint both sides elevate. Auto-invoked when importing white-label types or schemas, or when adding a white-label provider.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,29 +8,77 @@ user-invocable: false
8
8
  # @owlmeans/wled
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/wled": "^0.1.18-rc.10"` in `dependencies`
11
+ **Install:** `"@owlmeans/wled": "^0.1.18-rc.12"` in `dependencies`
12
+
13
+ The contract only. It owns no service and reaches no store: it declares the white-label record
14
+ shapes, their schemas, and one entrypoint that the server side answers and the browser side calls.
15
+ Everything that produces a white-label record lives downstream.
12
16
 
13
17
  ## Key Exports
14
18
 
15
19
  | Export | Description |
16
20
  |--------|-------------|
17
- | `Wled`, `Entity` types | Whitelist entry / entity shapes |
18
- | `WL_BUCKET` and constants | Shared aliases (e.g. storage bucket name) |
19
- | Modules | Shared whitelist module declarations |
20
- | `model` submodule | Validation/model helpers |
21
+ | `entrypoints` | The single `WL_PROVIDE` declaration — a backend `GET /wl/provide/:entity`, filtered by `params(ProvideParamsSchema)` and guarded by nothing. Elevate it, never redeclare it |
22
+ | `WL_PROVIDE` | That entrypoint's alias. Both `@owlmeans/server-wl` and `@owlmeans/web-wl` elevate this exact alias |
23
+ | `WL_PROVIDE_PATH` | `'/wl/provide/:entity'` |
24
+ | `WL_TYPE_COMPANY_INFO`, `WL_TYPE_STYLES`, `WL_TYPE_MEDIA`, `WL_TYPE_DNS` | The `type` a provider stamps on the record it returns — `'company-info'`, `'styles'`, `'media'`, `'dns'` |
25
+ | `ProvidedWL<T>` | What one provider answers: `T & { type: string; exists: boolean \| null }` |
26
+ | `CompanyInfo` | `{ resource?, entityId, fullName, shortName, slug, description }` |
27
+ | `CustomStyles` | `{ resource?, entityId, font, colors }` — a whole theme record, not just the palette |
28
+ | `CustomFont`, `CustomColors` | `{ fontFamily, basicSize? }` (`basicSize` minimum 8), and a required `primaryColor` plus optional secondary/alert/success colours and their backgrounds |
29
+ | `CustomMedia`, `CustomBrand` | `{ brand: { squareLogo?, wideLogo? } }` — both are URLs |
30
+ | `CustomUrls` | `{ adminUrl, userUrl }` |
31
+ | `ProvideParams` | `{ entity: string }` — the one path param |
32
+ | `CompanyInfoSchema`, `CustomStylesSchema`, `CustomFontSchema`, `CustomColorsSchema`, `ColorSchema`, `ProvideParamsSchema` | The AJV schemas for the shapes above. `ajv` is a peer dependency |
33
+
34
+ ## The provide contract
21
35
 
22
- ## Usage
36
+ `WL_PROVIDE` answers one object per organization entity, keyed by **provider service alias** — not by
37
+ white-label type:
23
38
 
24
39
  ```typescript
25
- import { WL_BUCKET } from '@owlmeans/wled'
40
+ import { WL_TYPE_MEDIA } from '@owlmeans/wled'
41
+ import type { CustomMedia, ProvidedWL } from '@owlmeans/wled'
26
42
 
27
- cfg.storageBuckets = {
28
- [WL_BUCKET]: { url: '/etc/app-config/s3-bucket-url', apiKey: '/etc/master-secret/s3-storage', basePrefix: WL_BUCKET_PREFIX }
43
+ // what a provider registered under the alias 'wl-logo' contributes
44
+ const media: ProvidedWL<CustomMedia> = {
45
+ type: WL_TYPE_MEDIA,
46
+ exists: true,
47
+ brand: { wideLogo: 'https://…/wide.png' }
29
48
  }
49
+ // → the response carries it as { 'wl-logo': media, 'wl-info': …, 'wl-styles': … }
30
50
  ```
31
51
 
32
- Server side wires the module declarations through `@owlmeans/server-wl`; web side through `@owlmeans/web-wl` / `@owlmeans/client-wl`.
52
+ So a reader picks a section by the alias it registered the provider under, and `type` tells it which
53
+ shape it is holding. `exists` is a tri-state: `true` a stored record, `false` a deliberate empty
54
+ default, `null` unknown.
55
+
56
+ ## Rules
57
+
58
+ - **The declaration carries no guard.** Whatever elevates `WL_PROVIDE` serves it anonymously unless
59
+ it adds one, so every section a deployment registers is readable by anyone who can name an
60
+ organization. Put nothing in a white-label record that is not meant to be public, or add a guard
61
+ where the entrypoint is elevated.
62
+ - `entityId`, `slug` and the `entity` param are declared with `EntityValueSchema` from
63
+ `@owlmeans/auth`, a plain `{ type: 'string', minLength: 3, maxLength: 256 }` — it bounds length and
64
+ nothing else, so a record id and a slug both pass (`CompanyInfo.slug` relaxes `minLength` to 0 on
65
+ top of it). `EntityValueSchema` is `@deprecated` in favour of `EntitySlugValueSchema`, the identical
66
+ schema it aliases; write new fields against the slug schema. What the `entity` param is expected to
67
+ hold is the serving side's rule, not this package's — see the `server-wl` skill.
68
+ - `ColorSchema` accepts `#` followed by 3–8 hex digits (length 4–9), so a named CSS colour or an
69
+ `rgb()` string fails it. That check runs only where `CustomColorsSchema` or `CustomStylesSchema` is
70
+ actually applied — this package's own entrypoint filter validates the path params alone, so a
71
+ package that stores styles must put the schema in its own filter or run it itself.
72
+ - `CustomStylesSchema` requires only `font` and `colors`, while the `CustomStyles` type also requires
73
+ `entityId`. Construct the record from the type — an object that satisfies the schema can still be
74
+ missing the id every provider keys on.
75
+ - Colours and fonts are all optional except `primaryColor` and `fontFamily` — a consumer must render
76
+ with whatever subset it gets rather than assuming a full palette.
33
77
 
34
78
  ## Depends On
35
79
 
36
- - `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/auth-common`
80
+ - `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/auth`
81
+ - `ajv` (peer)
82
+
83
+ Server side elevates the declaration through `@owlmeans/server-wl`; browser side through
84
+ `@owlmeans/web-wl`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/wled",
3
- "version": "0.1.18-rc.10",
3
+ "version": "0.1.18-rc.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  "ajv": "*"
25
25
  },
26
26
  "dependencies": {
27
- "@owlmeans/auth": "^0.1.18-rc.8",
28
- "@owlmeans/entrypoint": "^0.1.18-rc.10",
29
- "@owlmeans/route": "^0.1.18-rc.8"
27
+ "@owlmeans/auth": "^0.1.18-rc.10",
28
+ "@owlmeans/entrypoint": "^0.1.18-rc.12",
29
+ "@owlmeans/route": "^0.1.18-rc.10"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@owlmeans/dep-config": "workspace:*",