@astryxdesign/cli 0.7.15 → 0.7.16-canary.g22213fd

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 (222) hide show
  1. package/README.md +6 -4
  2. package/api/build/_adapter.d.mts +10 -0
  3. package/api/build/_adapter.mjs +24 -0
  4. package/api/build/blocks/blocks.d.mts +1 -0
  5. package/api/build/blocks/blocks.mjs +18 -1
  6. package/api/build/kit/shell.weights.json +1 -0
  7. package/api/build/kit/shellcall.d.mts +26 -0
  8. package/api/build/kit/shellcall.mjs +87 -0
  9. package/api/build/kit/start.mjs +67 -4
  10. package/api/build/kit/weights.d.mts +15 -0
  11. package/api/build/kit/weights.mjs +27 -0
  12. package/api/component/__fixtures__/resolutions/modules.txt +1 -1
  13. package/api/component/_adapter.d.mts +1 -1
  14. package/api/component/_adapter.mjs +28 -1
  15. package/api/doctor/_adapter.d.mts +38 -2
  16. package/api/doctor/_adapter.mjs +76 -1
  17. package/api/doctor/built-checks.mjs +1 -1
  18. package/api/doctor/doctor.d.mts +26 -0
  19. package/api/doctor/doctor.doc.mjs +1 -1
  20. package/api/doctor/doctor.mjs +156 -11
  21. package/api/doctor/theme-checks.mjs +163 -18
  22. package/api/icon/_adapter.d.mts +7 -3
  23. package/api/icon/_adapter.mjs +12 -3
  24. package/api/icon/icon.type.d.mts +15 -0
  25. package/api/icon/icon.type.mjs +10 -3
  26. package/api/icon/iconUse.doc.mjs +19 -5
  27. package/api/icon/list/list.mjs +7 -1
  28. package/api/icon/use/use.d.mts +8 -5
  29. package/api/icon/use/use.mjs +95 -13
  30. package/api/init/run/run.mjs +1 -0
  31. package/api/integration/add-contribution.mjs +3 -3
  32. package/api/integration/pack-check.mjs +14 -8
  33. package/api/integration/validate-integration.mjs +1 -1
  34. package/api/search/_adapter.mjs +15 -16
  35. package/api/search/_entries.d.mts +2 -1
  36. package/api/search/_entries.mjs +28 -1
  37. package/api/swizzle/_moduleGraph.mjs +1 -1
  38. package/api/template/template.type.d.mts +6 -2
  39. package/api/template/template.type.mjs +2 -1
  40. package/api/theme/_adapter.d.mts +5 -2
  41. package/api/theme/_adapter.mjs +59 -14
  42. package/api/theme/_fork.mjs +1 -1
  43. package/api/theme/build/build.d.mts +120 -32
  44. package/api/theme/build/build.mjs +471 -111
  45. package/api/theme/eject/eject.mjs +22 -1
  46. package/api/theme/generateTonalPalette.doc.mjs +2 -2
  47. package/api/theme/palette/generate/generator.mjs +141 -2
  48. package/api/theme/template/template.d.mts +19 -0
  49. package/api/theme/template/template.mjs +102 -25
  50. package/api/theme/theme.type.d.mts +44 -1
  51. package/api/theme/theme.type.mjs +23 -1
  52. package/api/theme/themeBuild.doc.mjs +4 -4
  53. package/api/theme/themeEject.doc.mjs +1 -1
  54. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  55. package/api/theme/themeTemplate.doc.mjs +9 -3
  56. package/api/theme-edit/_adapter.d.mts +33 -2
  57. package/api/theme-edit/_adapter.mjs +276 -41
  58. package/api/theme-edit/_check.d.mts +93 -4
  59. package/api/theme-edit/_check.mjs +1712 -223
  60. package/api/theme-edit/_color.d.mts +2 -8
  61. package/api/theme-edit/_color.mjs +292 -219
  62. package/api/theme-edit/_compiler.d.mts +1 -0
  63. package/api/theme-edit/_compiler.mjs +20 -1
  64. package/api/theme-edit/_context.d.mts +31 -1
  65. package/api/theme-edit/_context.mjs +445 -41
  66. package/api/theme-edit/_css.d.mts +60 -1
  67. package/api/theme-edit/_css.mjs +404 -28
  68. package/api/theme-edit/_edit.d.mts +25 -0
  69. package/api/theme-edit/_edit.mjs +1620 -154
  70. package/api/theme-edit/_how-commands.d.mts +11 -26
  71. package/api/theme-edit/_how-commands.mjs +30 -2
  72. package/api/theme-edit/_how-question.d.mts +15 -0
  73. package/api/theme-edit/_how-question.mjs +1469 -194
  74. package/api/theme-edit/_how.mjs +144 -30
  75. package/api/theme-edit/_marks.d.mts +13 -0
  76. package/api/theme-edit/_marks.mjs +15 -0
  77. package/api/theme-edit/_overview.mjs +2 -0
  78. package/api/theme-edit/_palette.d.mts +38 -0
  79. package/api/theme-edit/_palette.mjs +306 -73
  80. package/api/theme-edit/_parts.d.mts +33 -0
  81. package/api/theme-edit/_parts.mjs +138 -9
  82. package/api/theme-edit/_png.d.mts +18 -0
  83. package/api/theme-edit/_png.mjs +95 -14
  84. package/api/theme-edit/_preview-app.d.mts +55 -1
  85. package/api/theme-edit/_preview-app.mjs +1552 -101
  86. package/api/theme-edit/_preview.d.mts +71 -3
  87. package/api/theme-edit/_preview.mjs +565 -35
  88. package/api/theme-edit/_project.d.mts +15 -0
  89. package/api/theme-edit/_project.mjs +68 -13
  90. package/api/theme-edit/_settings.d.mts +299 -5
  91. package/api/theme-edit/_settings.mjs +2806 -158
  92. package/api/theme-edit/_tables.d.mts +24 -0
  93. package/api/theme-edit/_tables.mjs +212 -150
  94. package/api/theme-edit/_vet.d.mts +42 -0
  95. package/api/theme-edit/_vet.mjs +144 -0
  96. package/api/theme-edit/theme-edit.type.d.mts +31 -2
  97. package/api/theme-edit/theme-edit.type.mjs +10 -2
  98. package/api/theme-edit/themeEditNew.doc.mjs +1 -1
  99. package/api/theme-edit/themeEditPreviewApp.doc.mjs +1 -1
  100. package/api/theme-edit/themeEditShow.doc.mjs +11 -3
  101. package/api/upgrade/registry/registry.mjs +6 -1
  102. package/assets/codemods/parse.mjs +2 -2
  103. package/assets/docs/author-a-theme.doc.mjs +1 -1
  104. package/assets/docs/theme.doc.dense.mjs +1 -1
  105. package/assets/docs/theme.doc.mjs +1 -1
  106. package/assets/docs/theme.doc.zh.mjs +4 -3
  107. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  108. package/assets/docs/tree/icon-sets.doc.mjs +63 -8
  109. package/assets/docs/tree/single-component.doc.mjs +11 -2
  110. package/assets/docs/tree/tokens-and-setup.doc.mjs +39 -3
  111. package/assets/docs.generated.json +2 -2
  112. package/assets/preview-app/next.config.mjs +7 -1
  113. package/assets/preview-app/package.json +1 -0
  114. package/assets/preview-app/src/app/globals.css +1 -0
  115. package/assets/self-audit.generated.json +1 -1
  116. package/assets/templates/blocks/components/Outline/useOutlineFromDOMHookUsage.doc.mjs +21 -0
  117. package/assets/templates/blocks/components/Outline/useOutlineFromDOMHookUsage.tsx +62 -0
  118. package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.doc.mjs +14 -0
  119. package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.tsx +53 -0
  120. package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.doc.mjs +14 -0
  121. package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.tsx +33 -0
  122. package/assets/templates/components.generated.json +1 -1
  123. package/assets/templates/pages/ai-chat/page.tsx +20 -2
  124. package/assets/templates/pages/dashboard/page.tsx +1 -1
  125. package/assets/templates/themes/neutral/neutralPalettes.generated.receipt.json +2 -0
  126. package/authoring/config/config.doc.mjs +8 -0
  127. package/authoring/config/parse.d.mts +1 -0
  128. package/authoring/config/parse.mjs +12 -0
  129. package/authoring/config/type.ts +8 -0
  130. package/authoring/doctypes/_schema.d.mts +52 -5
  131. package/authoring/doctypes/_schema.mjs +62 -7
  132. package/authoring/doctypes/base/type.ts +10 -0
  133. package/authoring/doctypes/component/component.doc.mjs +1 -1
  134. package/authoring/doctypes/function/function.doc.mjs +6 -0
  135. package/authoring/doctypes/function/type.ts +3 -0
  136. package/authoring/doctypes/icon-set/icon-set-data.doc.mjs +3 -3
  137. package/authoring/doctypes/legacy.mjs +5 -1
  138. package/authoring/index.d.ts +1 -0
  139. package/authoring/shadcn/source-variants.d.mts +1 -1
  140. package/authoring/shadcn/source-variants.mjs +32 -10
  141. package/clients/cli/build-id.generated.json +1 -1
  142. package/clients/cli/commands/doctor.doc.mjs +2 -2
  143. package/clients/cli/commands/experimental/icon.mjs +61 -6
  144. package/clients/cli/commands/experimental/theme.mjs +244 -45
  145. package/clients/cli/commands/experimental-icon-use.doc.mjs +12 -5
  146. package/clients/cli/commands/experimental-theme-compile.doc.mjs +2 -2
  147. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +2 -2
  148. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +2 -2
  149. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +3 -3
  150. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
  151. package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
  152. package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -1
  153. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -1
  154. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
  155. package/clients/cli/commands/experimental-theme-template.doc.mjs +2 -2
  156. package/clients/cli/commands/theme-build.doc.mjs +2 -2
  157. package/clients/cli/commands/theme-eject.doc.mjs +1 -1
  158. package/clients/cli/commands/theme-template.doc.mjs +3 -1
  159. package/clients/cli/commands/theme.doc.mjs +7 -2
  160. package/clients/cli/commands/theme.mjs +222 -55
  161. package/clients/cli/commands.generated.json +1 -1
  162. package/clients/cli/formatters/index.mjs +7 -4
  163. package/clients/cli/index.mjs +25 -5
  164. package/clients/cli/lib/cli-error.mjs +9 -3
  165. package/clients/cli/lib/component-format.mjs +27 -9
  166. package/clients/cli/lib/json-shim.mjs +72 -2
  167. package/clients/cli/manifest.generated.json +1 -1
  168. package/clients/cli/run.mjs +49 -0
  169. package/foundation/agent-docs/agent-docs-target.d.mts +2 -6
  170. package/foundation/agent-docs/agent-docs-target.mjs +9 -17
  171. package/foundation/agent-docs/agent-docs.mjs +4 -3
  172. package/foundation/config/config-writer.d.mts +23 -0
  173. package/foundation/config/config-writer.mjs +152 -58
  174. package/foundation/config/project.mjs +103 -16
  175. package/foundation/discovery/component-discovery.mjs +11 -22
  176. package/foundation/discovery/icon-set-checks.mjs +164 -48
  177. package/foundation/discovery/icon-set-discovery.d.mts +38 -5
  178. package/foundation/discovery/icon-set-discovery.mjs +50 -6
  179. package/foundation/discovery/icon-set-theme-maps.d.mts +59 -0
  180. package/foundation/discovery/icon-set-theme-maps.mjs +95 -0
  181. package/foundation/discovery/icon-set-writer.d.mts +2 -3
  182. package/foundation/discovery/icon-set-writer.mjs +58 -17
  183. package/foundation/discovery/module-exports.mjs +1 -15
  184. package/foundation/discovery/template-adapter.mjs +44 -19
  185. package/foundation/discovery/template-icons.d.mts +27 -10
  186. package/foundation/discovery/template-icons.mjs +142 -26
  187. package/foundation/discovery/template-source-tree.mjs +3 -16
  188. package/foundation/discovery/theme-discovery.d.mts +30 -1
  189. package/foundation/discovery/theme-discovery.mjs +109 -50
  190. package/foundation/fs/exact-codec.d.mts +35 -0
  191. package/foundation/fs/exact-codec.mjs +148 -0
  192. package/foundation/fs/gather-cache.d.mts +15 -5
  193. package/foundation/fs/gather-cache.mjs +129 -31
  194. package/foundation/fs/paths.d.mts +39 -0
  195. package/foundation/fs/paths.mjs +44 -11
  196. package/foundation/fs/read-record.mjs +11 -1
  197. package/foundation/integrations/autolink.d.mts +4 -2
  198. package/foundation/integrations/autolink.mjs +4 -2
  199. package/foundation/integrations/cli-requirement.d.mts +16 -5
  200. package/foundation/integrations/cli-requirement.mjs +27 -6
  201. package/foundation/integrations/contribution-fixes.mjs +1 -16
  202. package/foundation/integrations/may-have-integrations.mjs +7 -3
  203. package/foundation/integrations/missing-dependency.d.mts +9 -0
  204. package/foundation/integrations/missing-dependency.mjs +100 -0
  205. package/foundation/integrations/public-imports.mjs +1 -1
  206. package/foundation/render/embedded-imports.mjs +1 -1
  207. package/foundation/render/host-exit.d.mts +8 -0
  208. package/foundation/render/host-exit.mjs +11 -0
  209. package/foundation/render/page-host.mjs +56 -10
  210. package/foundation/render/page-worker.mjs +14 -0
  211. package/foundation/render/render-page.mjs +37 -2
  212. package/foundation/response/error-codes.d.mts +2 -1
  213. package/foundation/response/error-codes.d.ts +1 -0
  214. package/foundation/response/error-codes.doc.mjs +5 -0
  215. package/foundation/response/error-codes.mjs +3 -0
  216. package/foundation/response/json.d.mts +15 -0
  217. package/foundation/response/json.mjs +52 -1
  218. package/foundation/response/response-types.doc.mjs +1 -1
  219. package/foundation/runtime/lazy-dependencies.d.mts +14 -0
  220. package/foundation/runtime/lazy-dependencies.mjs +82 -0
  221. package/foundation/xle/browser.d.mts +2 -2
  222. package/package.json +7 -6
@@ -49,6 +49,14 @@ export function coreUnavailableMessage(cwd: string, importError: any): string;
49
49
  * @returns {string}
50
50
  */
51
51
  export function normalizeThemeBuildForCompare(content: string): string;
52
+ /**
53
+ * Whether `error` is a build's refusal of a theme that sets a private var
54
+ * (which `doctor` reports in its own check, not as a stale output).
55
+ * CLI-internal.
56
+ * @param {unknown} error
57
+ * @returns {boolean}
58
+ */
59
+ export function isPrivateVarRefusal(error: unknown): boolean;
52
60
  /**
53
61
  * The files a theme source is made of: the source and every local file it
54
62
  * imports, directly or through other local files, read from their import
@@ -68,6 +76,40 @@ export function themeSourceFiles(filePath: string): string[];
68
76
  * @returns {string[]} at most three paths
69
77
  */
70
78
  export function themeSourceGuesses(file: string, cwd: string): string[];
79
+ /**
80
+ * Hand the theme editor warnings of the builds in this process to
81
+ * `listener` instead of the logger. CLI-internal: the watch child's
82
+ * hand-off to its parent.
83
+ * @param {((warning: string) => void) | null} listener
84
+ */
85
+ export function setEditorFolderListener(listener: ((warning: string) => void) | null): void;
86
+ /**
87
+ * A build's mode flags: what it does (`--check` compares, never writes) and
88
+ * where (`--out`), carried into every build command a refusal suggests.
89
+ * @typedef {{check?: boolean, out?: string, iconsSpecifier?: string}} BuildMode
90
+ */
91
+ /**
92
+ * How a suggested build writes its source: `glob` leaves a pattern as typed
93
+ * (unquoted, so the shell expands it); `family` makes it a --family run,
94
+ * and `familyKey` names its key (a family run never takes --out).
95
+ * @typedef {{glob?: boolean, family?: boolean, familyKey?: string}} SuggestionShape
96
+ */
97
+ /**
98
+ * The `theme build` command for `source` with the caller's mode flags, so a
99
+ * suggestion never turns a check into a write or moves the outputs.
100
+ * @param {string | string[]} source as the user types it, from cwd; several
101
+ * for a family (with `shape.familyKey`)
102
+ * @param {BuildMode} mode
103
+ * @param {string} cwd
104
+ * @param {{group: string, build: string}} [words] the command's own words
105
+ * (`experimental theme compile`), else `theme build`
106
+ * @param {SuggestionShape} [shape]
107
+ * @returns {string}
108
+ */
109
+ export function buildSuggestion(source: string | string[], mode: BuildMode, cwd: string, words?: {
110
+ group: string;
111
+ build: string;
112
+ }, shape?: SuggestionShape): string;
71
113
  /**
72
114
  * Publish the outputs a batch deferred, one theme at a time, in build order.
73
115
  * @param {Array<Array<{dest: string, content: string}>>} deferred
@@ -77,11 +119,12 @@ export function writeDeferredBuildOutputs(deferred: Array<Array<{
77
119
  content: string;
78
120
  }>>): void;
79
121
  /**
80
- * Import specifier for install/scaffold instructions. Drops a leading `src/`
81
- * from the cwd-relative dir (most consumers import from a file under src/) but
82
- * keeps the rest of the path (e.g. `themes/gothic`). Callers note the path is
83
- * relative to the consumer's file.
84
- * @param {string} relDir
122
+ * Import specifier for install/scaffold instructions, from a file directly
123
+ * in the project's src/ (the file the printed snippet says it is relative
124
+ * to; callers pass the output folder from the outputs' project root): an output
125
+ * under src/ is `./themes/gothic/gothic`, one beside src/ is
126
+ * `../themes/gothic/gothic`.
127
+ * @param {string} relDir the output folder, relative to the outputs' project root
85
128
  * @param {string} base
86
129
  * @returns {string}
87
130
  */
@@ -155,6 +198,7 @@ export function printCompactTrailer(trailers: ThemeBuildTrailer[], { hint }?: {
155
198
  * @param {{out?: string, check?: boolean, iconsSpecifier?: string}} [options]
156
199
  * @param {{cwd?: string}} [ctx]
157
200
  * @param {{compact?: boolean}} [report]
201
+ * @param {ThemeBuildHandOff} [handOff]
158
202
  * @returns {Promise<{receipt: import('../theme.type.mjs').ThemeBuildResponse | import('../theme.type.mjs').ThemeBuildCheckResponse | null, trailer: ThemeBuildTrailer | null}>}
159
203
  */
160
204
  export function themeBuildForReport(file: string, options?: {
@@ -165,7 +209,7 @@ export function themeBuildForReport(file: string, options?: {
165
209
  cwd?: string;
166
210
  }, { compact }?: {
167
211
  compact?: boolean;
168
- }): Promise<{
212
+ }, handOff?: ThemeBuildHandOff): Promise<{
169
213
  receipt: import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null;
170
214
  trailer: ThemeBuildTrailer | null;
171
215
  }>;
@@ -178,36 +222,37 @@ export function themeBuild(file: string, options?: {
178
222
  cwd?: string;
179
223
  projectCore?: boolean;
180
224
  }): Promise<import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null>;
181
- /** @param {string[]} files @param {{familyKey: string, check?: boolean, iconsSpecifier?: string, __onPrivateVarError?: () => void, __commandWords?: {group: string, build: string}}} options @param {{cwd?: string}} [ctx] */
225
+ /**
226
+ * {@link themeBuild} with the CLI's hand-off: the same build, outputs, and
227
+ * receipt, plus what only the CLI's batch and scratch builds pass.
228
+ * CLI-internal: not exported from the API entry.
229
+ * @param {string} file
230
+ * @param {{out?: string, check?: boolean, iconsSpecifier?: string}} options
231
+ * @param {{cwd?: string, projectCore?: boolean}} ctx
232
+ * @param {ThemeBuildHandOff} handOff
233
+ * @returns {Promise<import('../theme.type.mjs').ThemeBuildResponse | import('../theme.type.mjs').ThemeBuildCheckResponse | null>}
234
+ */
235
+ export function themeBuildWithHandOff(file: string, options: {
236
+ out?: string;
237
+ check?: boolean;
238
+ iconsSpecifier?: string;
239
+ }, ctx: {
240
+ cwd?: string;
241
+ projectCore?: boolean;
242
+ }, handOff: ThemeBuildHandOff): Promise<import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null>;
243
+ /** @param {string[]} files @param {{familyKey: string, check?: boolean, iconsSpecifier?: string}} options @param {{cwd?: string}} [ctx] @param {{commandWords?: {group: string, build: string}}} [handOff] - the CLI's words for the rebuild hint */
182
244
  export function themeBuildFamily(files: string[], options: {
183
245
  familyKey: string;
184
246
  check?: boolean;
185
247
  iconsSpecifier?: string;
186
- __onPrivateVarError?: () => void;
187
- __commandWords?: {
188
- group: string;
189
- build: string;
190
- };
191
248
  }, { cwd }?: {
192
249
  cwd?: string;
193
- }): Promise<{
194
- type: string;
195
- data: {
196
- name: any;
197
- upToDate: boolean;
198
- stale: {
199
- path: string;
200
- reason: "missing" | "outdated";
201
- }[];
202
- checked: string[];
203
- tokenCount?: undefined;
204
- componentCount?: undefined;
205
- sizeKB?: undefined;
206
- outputs?: undefined;
207
- warnings?: undefined;
208
- notices?: undefined;
250
+ }, handOff?: {
251
+ commandWords?: {
252
+ group: string;
253
+ build: string;
209
254
  };
210
- } | {
255
+ }): Promise<import("../theme.type.mjs").ThemeBuildCheckResponse | {
211
256
  type: string;
212
257
  data: {
213
258
  name: any;
@@ -222,11 +267,10 @@ export function themeBuildFamily(files: string[], options: {
222
267
  };
223
268
  warnings: any[];
224
269
  notices: string[];
225
- upToDate?: undefined;
226
- stale?: undefined;
227
- checked?: undefined;
228
270
  };
229
271
  }>;
272
+ /** The first words of every file a build writes. */
273
+ export const GENERATED_MARKER: "@generated by `astryx theme build`";
230
274
  /**
231
275
  * The bindings one Core provides: the namespaces interception spreads, the
232
276
  * functions the build calls, and why the import failed, if it did.
@@ -240,6 +284,25 @@ export type CoreBindings = {
240
284
  generateOnMediaCSS: any;
241
285
  generateAdaptationCSS: any;
242
286
  };
287
+ /**
288
+ * A build's mode flags: what it does (`--check` compares, never writes) and
289
+ * where (`--out`), carried into every build command a refusal suggests.
290
+ */
291
+ export type BuildMode = {
292
+ check?: boolean;
293
+ out?: string;
294
+ iconsSpecifier?: string;
295
+ };
296
+ /**
297
+ * How a suggested build writes its source: `glob` leaves a pattern as typed
298
+ * (unquoted, so the shell expands it); `family` makes it a --family run,
299
+ * and `familyKey` names its key (a family run never takes --out).
300
+ */
301
+ export type SuggestionShape = {
302
+ glob?: boolean;
303
+ family?: boolean;
304
+ familyKey?: string;
305
+ };
243
306
  /**
244
307
  * How one `prop:value` pair on a component target is classified — the single
245
308
  * vocabulary both the root and adaptation paths reason in.
@@ -287,3 +350,28 @@ export type ThemeBuildTrailer = {
287
350
  */
288
351
  fontNotices: string[];
289
352
  };
353
+ /**
354
+ * What the CLI hands a build beyond themeBuild's options. CLI-internal, never
355
+ * a themeBuild option: `claimedOutputs` records the outputs earlier builds in
356
+ * one run wrote, so a later theme cannot replace them; with `deferredWrites`
357
+ * the build adds its outputs to that list instead of writing them, for
358
+ * writeDeferredBuildOutputs; `writeRoot` replaces `cwd` as the directory every
359
+ * output must stay inside, for a scratch build; `commandWords` names the
360
+ * command in the rebuild hint; `prepareFamily`, `familyLoader`, and
361
+ * `familyInterception` make the build a family member's plan.
362
+ */
363
+ export type ThemeBuildHandOff = {
364
+ prepareFamily?: boolean;
365
+ familyLoader?: any;
366
+ familyInterception?: any;
367
+ writeRoot?: string;
368
+ claimedOutputs?: Map<string, string>;
369
+ deferredWrites?: Array<Array<{
370
+ dest: string;
371
+ content: string;
372
+ }>>;
373
+ commandWords?: {
374
+ group: string;
375
+ build: string;
376
+ };
377
+ };