@c1m-public/channel-client 0.28.0 → 0.29.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.
- package/README.md +29 -0
- package/dist/{chunk-CPQT34K2.js → chunk-EDG3ZGPF.js} +2 -1
- package/dist/dash-next.d.ts +1 -0
- package/dist/dash-next.js +1 -1
- package/dist/dash.d.ts +1 -0
- package/dist/index.d.ts +3 -1332
- package/dist/next.d.ts +2 -1
- package/dist/next.js +1 -1
- package/dist/site.d.ts +107 -0
- package/dist/site.js +109 -0
- package/dist/types-DrmlZASd.d.ts +1360 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@ transport core.
|
|
|
17
17
|
- `@c1m-public/channel-client/dash` and `/dash/next` — the dash-scoped surface
|
|
18
18
|
(profile, directory, plans, leads, lead portal) with the same neutral/Next
|
|
19
19
|
split; see [The `/next` kits](#the-next-kits).
|
|
20
|
+
- `@c1m-public/channel-client/site` — what a public site serves, decided from
|
|
21
|
+
the `signals` block every bootstrap carries, plus the site-mode settings
|
|
22
|
+
helpers owner and operator screens share; see [`./site`](#site). Pure, no
|
|
23
|
+
transport, safe in a proxy or a client component.
|
|
20
24
|
- `@c1m-public/channel-client/moving-lead-model` — the moving-quote domain
|
|
21
25
|
model shared by dash sites and SaaSDash; no transport, optional `zod` peer.
|
|
22
26
|
|
|
@@ -273,6 +277,31 @@ methods and subscriptions. `pnpm contract:check` compares both client
|
|
|
273
277
|
inventories with the canonical server OpenAPI document when the repositories
|
|
274
278
|
are checked out together.
|
|
275
279
|
|
|
280
|
+
## `./site`
|
|
281
|
+
|
|
282
|
+
Every bootstrap (`dash.init`, `init.get`, `init.light`) carries the same
|
|
283
|
+
`signals` block: the public `site`, the server-decided `gate` (waitlist,
|
|
284
|
+
maintenance or private), the owner's `lifecycle`, `visibility` and
|
|
285
|
+
`site_enabled`. Decide a request from it and never recompute availability:
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
import { normalizeSignals, siteDecision } from "@c1m-public/channel-client/site";
|
|
289
|
+
|
|
290
|
+
const decision = siteDecision(normalizeSignals(init), pathname, { exempt: ["/account"] });
|
|
291
|
+
// serve | no-site | inactive | private | gate-page | redirect | rewrite
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
The order is the server's: no public site, then an inactive owner, then the
|
|
295
|
+
gate. `GATE_EXEMPT_PATHS` (legal, framework and crawler paths) are always
|
|
296
|
+
served. `private` means the public may not see the site; a site with member
|
|
297
|
+
sessions checks membership before showing its private page. A backend that
|
|
298
|
+
predates `signals` is read from its top-level `gate` as an active, public
|
|
299
|
+
site.
|
|
300
|
+
|
|
301
|
+
`SITE_MODE_CHOICES`, `siteModeChoice`, `withSiteModeChoice`,
|
|
302
|
+
`describeLiveGate`, `toDateTimeLocal` and `fromDateTimeLocal` are the shared
|
|
303
|
+
pieces of a site-mode settings form.
|
|
304
|
+
|
|
276
305
|
## `./moving-lead-model`
|
|
277
306
|
|
|
278
307
|
A subpath carrying the moving-quote domain model: lead payload schemas, the
|
|
@@ -331,7 +331,8 @@ function createNextChannelClient(options) {
|
|
|
331
331
|
const method = (request.method ?? "GET").toUpperCase();
|
|
332
332
|
const pathname = pathnameOf(input);
|
|
333
333
|
const scoped = isRequestScoped(new Headers(request.headers), pathname);
|
|
334
|
-
|
|
334
|
+
const explicitNoStore = request.cache === "no-store";
|
|
335
|
+
if (method === "GET" && !scoped && !explicitNoStore && cache !== "no-store") {
|
|
335
336
|
delete request.cache;
|
|
336
337
|
const classify = cache.tagsFor ?? defaultChannelCacheTags;
|
|
337
338
|
const tags = Array.from(/* @__PURE__ */ new Set([...cache.tags ?? [], ...classify(pathname)]));
|
package/dist/dash-next.d.ts
CHANGED
package/dist/dash-next.js
CHANGED