@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 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
- if (method === "GET" && !scoped && cache !== "no-store") {
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)]));
@@ -1,6 +1,7 @@
1
1
  import { DashChannelClient } from './dash.js';
2
2
  import { CreateNextChannelClientOptions } from './next.js';
3
3
  import './index.js';
4
+ import './types-DrmlZASd.js';
4
5
  import './webhooks.js';
5
6
 
6
7
  /**
package/dist/dash-next.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createNextChannelClient } from './chunk-CPQT34K2.js';
1
+ import { createNextChannelClient } from './chunk-EDG3ZGPF.js';
2
2
  import { narrow } from './chunk-KCYSLD37.js';
3
3
  import './chunk-LBOYLZ4J.js';
4
4
  import './chunk-XPO7C3DW.js';
package/dist/dash.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { createChannelClient, ChannelVisitor, CreateChannelClientOptions } from './index.js';
2
+ import './types-DrmlZASd.js';
2
3
  import './webhooks.js';
3
4
 
4
5
  /**