@ouispec/cli 0.1.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -0
  3. package/dist/analyze.d.ts +282 -0
  4. package/dist/analyze.d.ts.map +1 -0
  5. package/dist/analyze.js +1421 -0
  6. package/dist/analyze.js.map +1 -0
  7. package/dist/assemble.d.ts +50 -0
  8. package/dist/assemble.d.ts.map +1 -0
  9. package/dist/assemble.js +555 -0
  10. package/dist/assemble.js.map +1 -0
  11. package/dist/cli.d.ts +12 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +54 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/config.d.ts +54 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +126 -0
  18. package/dist/config.js.map +1 -0
  19. package/dist/contract.d.ts +10 -0
  20. package/dist/contract.d.ts.map +1 -0
  21. package/dist/contract.js +15 -0
  22. package/dist/contract.js.map +1 -0
  23. package/dist/generate.d.ts +49 -0
  24. package/dist/generate.d.ts.map +1 -0
  25. package/dist/generate.js +178 -0
  26. package/dist/generate.js.map +1 -0
  27. package/dist/index.d.ts +9 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +8 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/inputs.d.ts +134 -0
  32. package/dist/inputs.d.ts.map +1 -0
  33. package/dist/inputs.js +705 -0
  34. package/dist/inputs.js.map +1 -0
  35. package/dist/knowledge.d.ts +19 -0
  36. package/dist/knowledge.d.ts.map +1 -0
  37. package/dist/knowledge.js +366 -0
  38. package/dist/knowledge.js.map +1 -0
  39. package/dist/program.d.ts +60 -0
  40. package/dist/program.d.ts.map +1 -0
  41. package/dist/program.js +302 -0
  42. package/dist/program.js.map +1 -0
  43. package/dist/recipes.d.ts +17 -0
  44. package/dist/recipes.d.ts.map +1 -0
  45. package/dist/recipes.js +48 -0
  46. package/dist/recipes.js.map +1 -0
  47. package/dist/tier2.d.ts +74 -0
  48. package/dist/tier2.d.ts.map +1 -0
  49. package/dist/tier2.js +303 -0
  50. package/dist/tier2.js.map +1 -0
  51. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Closure Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # @ouispec/cli
2
+
3
+ The assistant's surfaces and knowledge, generated from a React app's own code (ADR-0220, ADR-0226). A deterministic TypeScript pass (no LLM, no network, no clock) over the app's routes, its page component trees, its design system's bound controls, its room catalogs and its API's OpenAPI document.
4
+
5
+ ```sh
6
+ oui generate # writes <out>/oui-manifest.json and <out>/oui-knowledge.json
7
+ oui generate --check # CI: fails if either is stale, or any declaration is invalid
8
+ ```
9
+
10
+ `--config <path>` names the settings file (default `./oui.config.json`). The same command is installed as `closure-oui`.
11
+
12
+ ## `oui.config.json`
13
+
14
+ Required, and explicit: nothing an app depends on has a default, so a misconfigured app fails naming the setting instead of generating an assistant that can do nothing.
15
+
16
+ ```json
17
+ {
18
+ "tsconfig": "tsconfig.json",
19
+ "routes": "src/routes.tsx",
20
+ "routeWrappers": ["Suspense", "ErrorBoundary"],
21
+ "nav": ["src/nav.ts"],
22
+ "shell": [{ "module": "src/app/AppFrame.tsx", "export": "AppFrame" }],
23
+ "designSystem": ["@acme/ui"],
24
+ "mappings": ["oui/mantine-core.mapping.json"],
25
+ "apiSpec": "@acme/api-client/openapi.json",
26
+ "appCatalogs": [{ "module": "src/studio/catalog.ts", "export": "canvasCatalog", "hosts": ["Canvas"] }],
27
+ "unbound": [],
28
+ "out": "src/agent/generated"
29
+ }
30
+ ```
31
+
32
+ | Setting | Required | Meaning |
33
+ |---|---|---|
34
+ | `tsconfig` | yes | The tsconfig the app compiles with. |
35
+ | `routes` | yes | The file holding the routes: `<Route>` elements, or a data router. |
36
+ | `designSystem` | yes | Design-system packages whose controls carry bindings. `[]`: none. |
37
+ | `apiSpec` | yes | The API's OpenAPI 3 document, by module path as the installed API client ships it. `null`: the app has no API. |
38
+ | `out` | yes | Where the manifest and knowledge are written. |
39
+ | `routeWrappers` | no | Components a route's element is wrapped in that are never the page. |
40
+ | `nav` | no | Files whose `{ label, route, group }` object literals are the navigation. |
41
+ | `shell` | no | The app's frame: components mounted around the pages. Each becomes a `shell:` surface. |
42
+ | `mappings` | no | Tier 2 mappings of third-party design systems the app does not own (below). |
43
+ | `appCatalogs` | no | Room catalogs the app declares itself. Needs Vite (below). |
44
+ | `unbound` | no | Pages whose controls are not all bound yet. It may only shrink. |
45
+
46
+ `apiClient` was replaced by `apiSpec`.
47
+
48
+ ## Design systems
49
+
50
+ Each package in `designSystem` must resolve from the app and name its control table in its `package.json`:
51
+
52
+ ```json
53
+ { "oui": { "agentControls": "./dist/agent-controls.json" } }
54
+ ```
55
+
56
+ `closure.agentControls` is also read during the transition. A package declaring both is an error. A room package names its catalog the same way, under `oui.agentCatalog` (or `closure.agentCatalog`).
57
+
58
+ ## Third-party design systems (tier 2, ADR-0226 §2.3)
59
+
60
+ An app on MUI, Mantine or shadcn/Radix maps that design system's controls in a JSON file per package (`tier2-mapping.json` in `@ouispec/contract`: `kind`, `callbacks`, `valueFrom`, `controlled`, `options`, `titleProps`, and `parts` for a control under a namespace or made of parts). For each mapping `oui generate` writes `<out>/bound/<package>.ts` (`@mantine/core` → `mantine-core.ts`) and its control table beside it:
61
+
62
+ - one wrapper per mapped control, under the package's own export names, built from `@ouispec/bindings/react`: it accepts `agent`, registers the mapped kind with the app's own callback, returns that callback's result, reports `disabled`, and renders the component unchanged (props, ref, static members);
63
+ - a namespace (`Select`, `Tabs`) keeps every other member (`Select.Trigger`, `Tabs.List`);
64
+ - each export keeps the component's own type, and the module imports `@ouispec/bindings/jsx`, which adds `agent` to JSX.
65
+
66
+ The app imports mapped controls from the bound module. Each use is read as a tier 1 control's: its binding, title, options (from the prop the mapping names, or from the items a compound control renders) and schema. The program reads the module as this run emits it, so a page resolves it in `--check` and on the first run. A use that does not pass the prop that shows its value (`controlled`) is printed as a warning and returned in `result.tier2.uncontrolled`, beside every use in `result.tier2.uses`, for the conformance kit's `checkTier2`.
67
+
68
+ ## Routes
69
+
70
+ - JSX: `<Route path element>`, nested routes joined to their parent's path, `index` routes at their parent's path, pathless routes that group their children, `Component` and `lazy` props.
71
+ - Data routers: `createBrowserRouter([...])`, `createHashRouter`, `createMemoryRouter`, `createStaticRouter` and `useRoutes`, with `children` (literal or constant arrays), `index`, `element`, `Component` and `lazy: () => import('./route')` route modules (their `Component` export, else their default).
72
+ - `lazy(() => import(...))` and `React.lazy(...)`, a default export or `.then(m => ({ default: m.X }))`.
73
+ - A route whose element has child routes is a layout: it becomes the `shell:` frame of the pages under it, when it holds anything someone can use.
74
+ - Splats (`*`) and redirects (a `<Navigate>`, or a component that only renders one) are not pages.
75
+
76
+ ## What fails the build
77
+
78
+ - A missing or unknown setting in `oui.config.json`.
79
+ - A `designSystem` package that cannot be resolved, declares no control table, or declares both keys.
80
+ - On an enforced page: a control with no binding, a raw element someone can use (a `button`, an `input`, or anything with `onClick`, `onChange`, `onInput`, `onSubmit`, `onDoubleClick`, `onPointerDown`, `onMouseDown` or `onKeyDown`), and a component with no control table entry that takes a callback prop, whether from a third-party library or a design-system export the table leaves out. Each is fixed by a bound control, or by `data-non-agent="<reason>"` saying why the assistant never needs it.
81
+ - A route the generator cannot read (a path, children or `lazy` that is not known at build time).
82
+ - An `apiSpec` that cannot be read or is not OpenAPI 3; a `mutate` or `transaction` naming an `operationId` the document does not have; either in an app with `apiSpec: null`.
83
+ - An effect that is not one of the vocabulary's, or a `transaction` whose `approvalMinutes` is not 1–30.
84
+ - A control table entry of a kind the table does not register, or a registration that is not valid.
85
+ - A room recipe naming an entry the room does not have.
86
+ - On an enforced page, a mapped control imported straight from its package (§2.5 row 6): the error names the bound import.
87
+ - A mapping that does not match its schema, names a package the app cannot resolve, maps a package also in `designSystem`, maps a package another mapping maps, uses a kind no design system registers, or does not fit the package's types (an export it does not have, a prop its component does not take).
88
+ - A stale bound module or control table, or a file in `<out>/bound/` no mapping emits (`--check`; writing removes it).
89
+
90
+ ## Person-only components (ADR-0228)
91
+
92
+ Some components exist so that the person, and only the person, can do something. The approval card where someone approves an irreversible action is one. A package lists them in its `package.json`, each with the reason:
93
+
94
+ ```json
95
+ { "oui": { "personOnly": { "ApprovalCard": "Only the person approves an irreversible action" } } }
96
+ ```
97
+
98
+ On one of these components, the generator fails the build for:
99
+ - an `agent` prop, even `{ nonAgent }`;
100
+ - a spread of props, which could carry a binding the build cannot see.
101
+
102
+ What such a component renders is never bound, so its callbacks need no `data-non-agent`. `@ouispec/agent-react` declares `ApprovalCard` this way.
103
+
104
+ ## The contract's vocabulary (ADR-0226 §2.6)
105
+
106
+ - **Effects.** A binding, a room action and an API tool declare one `ActionEffect`: `view`, `selection`, `navigate`, `open`, `edit`, `file`, `mutate` (an API `operationId`), `job` (settles on its outcome) or `transaction` (irreversible: runs only on the person's approval of the exact call, ADR-0228). `destructive: true` marks a write that removes what the person made.
107
+ - **Control kinds.** The built-in kinds are closed. A design system adds an `x-` kind by registering it (`registerControlKind`) and listing the same registration under `$kinds` in its control table, with its schema derivation as data.
108
+ - **Rooms.** A field animates only when it declares `animation: { keyframeable: true }`. A room may declare its own `problems` kinds and `recipes`; recipes name the room's entries with `{action:<id>}`, `{command:<id>}`, `{field:<id>}`, `{keyframeable}` and `{room}`. The generator infers no recipe.
109
+
110
+ ## App room catalogs need Vite
111
+
112
+ A catalog in `appCatalogs` is code: its entries may be built by functions, and its imports resolve only as the app's build resolves them. The generator loads each one through the app's own Vite config (`vite` must be in the app's own `node_modules`) and keeps only its declarations. An app without Vite ships its catalog in a package under `oui.agentCatalog` instead, as plain data.
@@ -0,0 +1,282 @@
1
+ /**
2
+ * What a page offers, read from its component tree (ADR-0220 §2.4).
3
+ *
4
+ * From the route's page component, through the app's own components, every
5
+ * design-system control is recorded with its binding, the props its schema
6
+ * comes from, and the containers a person goes through to reach it: the tab
7
+ * that shows it, the dialog that holds it (and the controls that open that
8
+ * dialog), the menu it is an entry of. Rooms are recorded where a page
9
+ * registers one or renders one of its hosts.
10
+ */
11
+ import ts from 'typescript';
12
+ import { type AgentBinding, type AnyControlKind, type ReachStep, type SchemaProps } from '@ouispec/bindings';
13
+ import { type Controls, type LoadedCatalog } from './inputs.js';
14
+ import { type Source } from './program.js';
15
+ import type { LoadedMapping } from './tier2.js';
16
+ /** A dialog on the page, whose openers are found once the whole page is read. */
17
+ export interface DialogStep {
18
+ kind: 'dialog' | 'panel';
19
+ binding?: string;
20
+ title: string;
21
+ openedBy: string[];
22
+ /** Resolution inputs, dropped before output. */
23
+ owner?: ts.Node;
24
+ setters?: string[];
25
+ site?: string;
26
+ }
27
+ export interface FoundControl {
28
+ /** Where the binding is declared: file, position and slot or entry. */
29
+ site: string;
30
+ binding: AgentBinding;
31
+ kind: AnyControlKind;
32
+ title: string;
33
+ itemized: boolean;
34
+ schemaProps: SchemaProps;
35
+ reach: (ReachStep | DialogStep)[];
36
+ declaredIn: string;
37
+ line: number;
38
+ /** The component whose JSX declares it. */
39
+ component: string;
40
+ /** The navigate target its callback calls with a literal, when it declares no effect. */
41
+ inferredNavigate?: string;
42
+ /**
43
+ * What the field itself tells the person, when it is known at build time:
44
+ * its hint (under any control) and its placeholder (in a text field). The PA
45
+ * reads what the person reads.
46
+ */
47
+ hint?: string;
48
+ placeholder?: string;
49
+ /** Resolution inputs for dialog openers: each callback where it is written, and the component it is in. */
50
+ owner: ts.Node;
51
+ callbacks: {
52
+ expr: ts.Expression;
53
+ owner: ts.Node;
54
+ }[];
55
+ }
56
+ /** A display that shows facts (a clip's parameters): not a control, reported in the page state. */
57
+ export interface FoundDisplay {
58
+ site: string;
59
+ binding: AgentBinding;
60
+ title: string;
61
+ /** Its facts' labels, when they are known at build time. */
62
+ labels: string[];
63
+ reach: (ReachStep | DialogStep)[];
64
+ declaredIn: string;
65
+ line: number;
66
+ }
67
+ export interface Finding {
68
+ file: string;
69
+ line: number;
70
+ message: string;
71
+ }
72
+ /** One use of a mapped control's root (ADR-0226 §2.3), and whether it shows its value. */
73
+ export interface Tier2Found {
74
+ /** The mapped control's name in its mapping (`Select`). */
75
+ component: string;
76
+ /** The tag as written (`Select`, `Select.Root`). */
77
+ tag: string;
78
+ file: string;
79
+ line: number;
80
+ /** The props the use passes, as written. */
81
+ props: string[];
82
+ /** The prop that shows its value, when its mapping names one. */
83
+ controlled?: string;
84
+ /** It does not pass `controlled`. */
85
+ uncontrolled: boolean;
86
+ /** It passes props through a spread, which the build cannot read. */
87
+ spread: boolean;
88
+ }
89
+ export interface PageAnalysis {
90
+ controls: FoundControl[];
91
+ rooms: Set<LoadedCatalog>;
92
+ dialogs: DialogStep[];
93
+ /** The page's own PageHeader: its title and every description it can show. */
94
+ header: {
95
+ title: string | null;
96
+ subtitles: string[];
97
+ };
98
+ /** Displays of facts, each with its binding. */
99
+ displays: FoundDisplay[];
100
+ /** Interactive design-system controls with no binding. */
101
+ unbound: Finding[];
102
+ /** Declarations that are wrong wherever they are. */
103
+ errors: Finding[];
104
+ /** Every use of a mapped control's root. */
105
+ tier2Uses: Tier2Found[];
106
+ }
107
+ export declare class PageAnalyzer {
108
+ private readonly source;
109
+ private readonly catalogs;
110
+ /** A package's person-only components (`oui.personOnly`), by export name, with why. */
111
+ private readonly personOnly;
112
+ /** Entry objects made once per row, by a `map` or `flatMap`. */
113
+ private readonly rowEntries;
114
+ /** Every control the pages can use: the design systems' and the bound modules'. */
115
+ private readonly controls;
116
+ /** The design systems, and each bound module under its key. */
117
+ private readonly designSystem;
118
+ /** The packages whose tables were read, and each bound module. */
119
+ private readonly tablesRead;
120
+ /** Each bound module, by its file and by its key; each mapping, by the package it maps. */
121
+ private readonly boundByModule;
122
+ private readonly boundByKey;
123
+ private readonly mappedByPackage;
124
+ /** A bound control's descriptor → its mapping and part. */
125
+ private readonly tier2Of;
126
+ /** The files whose imports this page's analysis has checked. */
127
+ private importsChecked;
128
+ constructor(source: Source, controls: Controls, catalogs: readonly LoadedCatalog[], designSystem: readonly string[],
129
+ /** The design-system packages whose tables were read. */
130
+ tablesRead?: ReadonlySet<string>,
131
+ /** A package's person-only components (`oui.personOnly`), by export name, with why. */
132
+ personOnly?: (pkg: string) => ReadonlyMap<string, string>,
133
+ /** The app's tier 2 mappings, each with its bound module (ADR-0226 §2.3). */
134
+ mappings?: readonly LoadedMapping[]);
135
+ analyze(pageDecl: ts.Node): PageAnalysis;
136
+ private body;
137
+ private componentFunction;
138
+ private componentName;
139
+ /** The props a component destructures: local name → prop name. */
140
+ private destructuredProps;
141
+ private walk;
142
+ /**
143
+ * `useRoomRegistration(catalog, …)` in a body, or in an app hook it calls
144
+ * (`useVectorBoardSurface()`), followed hook by hook.
145
+ */
146
+ private findRegistrations;
147
+ /** The catalog an expression names: a package's, by import, or the app's own, by module and export. */
148
+ private catalogFor;
149
+ /**
150
+ * The package a JSX tag or identifier is imported from, when it is a bare
151
+ * package specifier; a bound module's key (`bound:<package>`) when it comes
152
+ * from a tier 2 bound module, however the app imports that module.
153
+ */
154
+ private importSource;
155
+ /** The bound module a tag or identifier comes from, through any alias or namespace import of it. */
156
+ private boundModuleOf;
157
+ /** A bound tag's export path in its package (`Select.Root`), through `as` renames and namespace imports. */
158
+ private boundExportPath;
159
+ /** The name a control is looked up by in its package's table: a bound tag's export path, or the imported name. */
160
+ private controlName;
161
+ /**
162
+ * On an enforced page, a mapped control is imported from its bound module,
163
+ * never straight from its package (ADR-0226 §2.3, §2.5 row 6): the
164
+ * package's own control carries no binding. Each import that does is
165
+ * unbound, naming the import to use instead.
166
+ */
167
+ private checkMappedImports;
168
+ /** A use of a mapped control's root: what it passes, and whether that includes the prop that shows its value. */
169
+ private recordTier2Use;
170
+ /**
171
+ * A mapped control's options: the items a compound control renders under
172
+ * it, or the entries of the prop its mapping names. Empty when any of them
173
+ * cannot be read at build time, so the schema is never narrower than the
174
+ * control.
175
+ */
176
+ private tier2Options;
177
+ /** The exported name a JSX tag imports from a package (through `as` renames). */
178
+ private importedName;
179
+ private element;
180
+ /** The app's own component a tag names, through `lazy` and `React.lazy`; null for anything else. */
181
+ private appComponent;
182
+ /**
183
+ * A component with no control table entry — a third-party library's, or a
184
+ * design-system export the table leaves out — cannot carry a binding, so a
185
+ * callback passed to it is something someone can use that the assistant
186
+ * never can. On an enforced page it must be bound, or say why the assistant
187
+ * never needs it with `data-non-agent="<reason>"`. `fix` says which.
188
+ */
189
+ private foreign;
190
+ /**
191
+ * A component only the person may use (ADR-0228 §2.2.3): it takes no `agent`
192
+ * binding, not even `nonAgent`, and no spread, which could carry one the
193
+ * build cannot read. What it renders is the package's own and never bound,
194
+ * so its callbacks are not something the assistant is missing.
195
+ */
196
+ private personOnlyElement;
197
+ /** Whether an attribute's value is a function: written as one, or typed as one. */
198
+ private takesFunction;
199
+ /** `data-non-agent="<reason>"`, when it gives a reason. */
200
+ private nonAgentReason;
201
+ /**
202
+ * A raw element someone can use — a `<button>`, an `<input>`, a clickable
203
+ * `<div>` — can carry no binding, so the assistant can never use it. On an
204
+ * enforced page it must be a design-system control instead, or say why the
205
+ * assistant never needs it with `data-non-agent="<reason>"`.
206
+ */
207
+ private intrinsic;
208
+ /** SimpleTabs-like containers bound in this component, by the expression their state prop reads. */
209
+ private boundTabs;
210
+ /** The containers between an element and its component's root, and whether it is rendered per row. */
211
+ private localReach;
212
+ /**
213
+ * `selectedId && <Panel/>` or `open ? <Panel/> : …`: a part of the page shown
214
+ * once some state is set. Its openers are the bound controls whose callback
215
+ * sets that state (found with the dialogs' openers).
216
+ */
217
+ private panelCondition;
218
+ /** `tab === 'x' ? <A/> : …` or `tab === 'x' && <A/>`, where `tab` is a bound tab set's state. */
219
+ private tabCondition;
220
+ private dialogStep;
221
+ /**
222
+ * An expression followed up through the props it was passed down as: a
223
+ * dialog's `open={open}` in a child is the parent's `open={createOpen}`,
224
+ * and a button's `onClick={onCreate}` is the parent's `onCreate={() => …}`.
225
+ * Returns the expression where it is written and the component it is in.
226
+ */
227
+ private throughProps;
228
+ /**
229
+ * The `agent` a control is given, followed through the props of the
230
+ * wrappers that forward it. `missing` is the wrapper element that forwards
231
+ * nothing because its own user gave it no binding.
232
+ */
233
+ private forwardedAgent;
234
+ private control;
235
+ private entry;
236
+ private checkRow;
237
+ private binding;
238
+ private title;
239
+ private options;
240
+ /**
241
+ * A control's `hint`, and a text field's `placeholder`, when each is a
242
+ * literal or a constant: the words the person reads beside the field. A
243
+ * value only known at run time (a count, a prop) is left out, so the output
244
+ * is the same on every build.
245
+ */
246
+ private fieldGuidance;
247
+ private schemaProps;
248
+ /**
249
+ * The object literals of an array prop: a literal, a constant, a
250
+ * `useMemo(() => [...])`, a `.map`/`.flatMap` per row, or an array built with
251
+ * `push` (in a loop, entries per row). What it cannot read — a prop passed
252
+ * from elsewhere, a call, a push of something unknown — goes in `blind`, so
253
+ * entries the PA would never see are reported rather than silently missing.
254
+ */
255
+ private arrayOf;
256
+ /** One element of an array literal, or of a `push`: an entry, or entries spread into it. */
257
+ private arrayElement;
258
+ /**
259
+ * The entries `push`ed onto an array declared in the same function: each
260
+ * call `name.push(...)` whose receiver is this declaration. A push inside a
261
+ * loop, or inside a callback such as `forEach`, makes entries per row.
262
+ */
263
+ private pushed;
264
+ /**
265
+ * Each dialog's openers: the bound controls whose callback — directly or
266
+ * through a function of the same component — calls the setter of the state
267
+ * the dialog's `open` reads, with something other than false or null; and
268
+ * any control whose binding declares `effect: { kind: 'open', container }`.
269
+ */
270
+ private resolveOpeners;
271
+ /**
272
+ * A destructive step runs only on the person's approval of that call
273
+ * (ADR-0228), so the control that only opens the dialog where it is
274
+ * confirmed must not be destructive too: the person would approve opening a
275
+ * dialog, then approve the step itself. A control that does something of
276
+ * its own before the dialog shows is approved for that, and is left alone.
277
+ */
278
+ private checkApprovedOnce;
279
+ }
280
+ /** Literal routes a callback navigates to: `navigate('/voices/create')`. */
281
+ export declare function navigateTargets(nodes: readonly ts.Node[]): string[];
282
+ //# sourceMappingURL=analyze.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../src/analyze.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAwB,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAaL,KAAK,MAAM,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,YAAY,CAAC;AAE/D,iFAAiF;AACjF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE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