@nanobpm/urban 0.72.2 → 0.73.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.
@@ -0,0 +1,38 @@
1
+ // The page-node type registry the browser renderer draws — the schema's canonical
2
+ // set, extended locally with the node types this runtime ships ahead of the schema.
3
+ //
4
+ // The App page-node contract is owned by @nanobpm/nano-app-schema (ADR 0027): its
5
+ // `PAGE_NODE_TYPES` is the canonical registry the Console's Page Composer binds to.
6
+ // This runtime's browser renderer must draw exactly that set — a schema type with
7
+ // no renderer (or a renderer with no schema type) renders an accepted node as a
8
+ // blank <div>, the silent failure #416 fixed for `appView`.
9
+ //
10
+ // `appView` (ADR 0057 — an embedded App View iframe) ships in this runtime *before*
11
+ // it lands in the published schema. Rather than silently diverge, we bridge it here
12
+ // — the same "mirror locally until the canonical schema folds it in, then delete the
13
+ // bridge and re-export" pattern used for `network` / `terminalStatuses` in
14
+ // `manifest.ts` (No Drift Surfaces). This module is the single source of truth for
15
+ // the extended set: the browser renderer's `RENDERERS satisfies Record<PageNodeType,
16
+ // Renderer>` lock and the runtime drift test both consume `PAGE_NODE_TYPES` from
17
+ // here, so the renderer registry and the type union cannot drift.
18
+
19
+ import { PAGE_NODE_TYPES as SCHEMA_PAGE_NODE_TYPES } from "@nanobpm/nano-app-schema";
20
+
21
+ /**
22
+ * Page-node types this runtime renders that are NOT (yet) in the canonical schema.
23
+ *
24
+ * When a token here lands in `@nanobpm/nano-app-schema`'s `PAGE_NODE_TYPES` and this
25
+ * package's dep is bumped, drop it from this list (and, once the list is empty, delete
26
+ * this module and re-export `PAGE_NODE_TYPES`/`PageNodeType` straight from the schema).
27
+ */
28
+ export const LOCAL_PAGE_NODE_TYPES = [
29
+ // #416 / ADR 0057: an embedded App View — an <iframe> hosting a self-contained view
30
+ // document (e.g. the agent cockpit's embed.html) served alongside the page.
31
+ "appView",
32
+ ] as const;
33
+
34
+ /** The full set of page-node types the browser renderer draws: schema ∪ local bridge. */
35
+ export const PAGE_NODE_TYPES = [...SCHEMA_PAGE_NODE_TYPES, ...LOCAL_PAGE_NODE_TYPES] as const;
36
+
37
+ /** A node type the composed-page renderer can draw — one of {@link PAGE_NODE_TYPES}. */
38
+ export type PageNodeType = (typeof PAGE_NODE_TYPES)[number];