|
| 1 | +--- |
| 2 | +'@objectstack/spec': patch |
| 3 | +--- |
| 4 | + |
| 5 | +fix(spec): the four `z.unknown()` navigation doors in `ComponentPropsMap` list all seven `NavigationModeSchema` modes (#18459) |
| 6 | + |
| 7 | +Clause-②: no |
| 8 | + |
| 9 | +`object-grid`, `object-map`, `object-gantt` and `object-tree` declare `navigation` |
| 10 | +as `z.unknown()`, so the `.describe()` on each is the WHOLE published account of |
| 11 | +what a mode may be — nothing else in the protocol narrows those four doors, and |
| 12 | +the generated reference renders their type as `any` beside that sentence. Three |
| 13 | +of them listed six of the seven `NavigationModeSchema` values (no `new_window`) |
| 14 | +and `object-grid`, the precedent the other three copied, listed five (no |
| 15 | +`popover` either). An author reading the shipped reference was told a value the |
| 16 | +platform honours does not exist. |
| 17 | + |
| 18 | +**Re-measured at the current `.objectui-sha` pin `87af769e9a3e`, not at the pin |
| 19 | +the finding was taken at.** All four blocks hand `schema.navigation` straight |
| 20 | +into the shared `useNavigationOverlay` hook; that hook types its own mode union |
| 21 | +AS this package's `NavigationModeSchema` (its own docblock: *"the seven modes |
| 22 | +this hook switches on are exactly the seven the exported union publishes"*, |
| 23 | +held by a parity test on the objectui side); its click router carries a |
| 24 | +`new_window` branch that delegates to `onNavigate` and otherwise falls through |
| 25 | +to a `window.open`, and `object-gantt` additionally implements that action |
| 26 | +itself. `popover` is an overlay mode in the same router and every one of the |
| 27 | +four passes it an anchor. So all seven modes reach all four doors. |
| 28 | + |
| 29 | +**Why `object-grid` is in the same change.** It is the row the other three were |
| 30 | +copied from and it understates by two rather than one; correcting three while |
| 31 | +leaving the source of the pattern intact would leave the family in the state |
| 32 | +that produced the defect. All four now name the schema as well as the values, |
| 33 | +so the next member added to `NavigationModeSchema` has a named edge into these |
| 34 | +rows instead of four independently drifting lists. |
| 35 | + |
| 36 | +**Why `Clause-②: no`.** The doors stay `z.unknown()` — a `navigation` value is |
| 37 | +accepted before and after this change, whatever its `mode` reads. Nothing is |
| 38 | +added to, removed from or narrowed on any authorable surface: the diff is four |
| 39 | +description strings and the reference page regenerated from them, and |
| 40 | +`check:authorable-surface`, `check:api-surface` and `check:export-origins` all |
| 41 | +pass with no artifact to regenerate. What moves is what an author is TOLD, which |
| 42 | +is why this ships as a `patch` rather than as no changeset at all: the sentence |
| 43 | +is published bytes — `src/ui/component.zod.ts` ships verbatim under this |
| 44 | +package's `files[]` entry `src/**/*.zod.ts`, and the compiled string ships in |
| 45 | +`dist/ui/index.js` and `dist/ui/index.mjs`. |
0 commit comments