@astryxdesign/cli 0.7.14 → 0.7.15-canary.g06b7e61

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 (203) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +63 -63
  3. package/api/build/_adapter.d.mts +4 -0
  4. package/api/build/_adapter.mjs +28 -2
  5. package/api/build/blocks/blocks.d.mts +10 -1
  6. package/api/build/blocks/blocks.mjs +84 -7
  7. package/api/build/build.mjs +6 -1
  8. package/api/build/tree.d.mts +4 -0
  9. package/api/build/tree.mjs +9 -2
  10. package/api/doctor/_adapter.d.mts +3 -1
  11. package/api/doctor/_adapter.mjs +14 -1
  12. package/api/doctor/_authoring-audit.d.mts +42 -0
  13. package/api/doctor/_authoring-audit.mjs +106 -0
  14. package/api/doctor/doctor.d.mts +7 -0
  15. package/api/doctor/doctor.mjs +24 -39
  16. package/api/doctor/theme-checks.mjs +56 -21
  17. package/api/integration/add-helpers.mjs +5 -0
  18. package/api/integration/add-theme.mjs +15 -110
  19. package/api/integration/validate-integration.mjs +17 -3
  20. package/api/integration/validateIntegration.doc.mjs +1 -1
  21. package/api/search/_adapter.mjs +124 -3
  22. package/api/search/_candidate-score.mjs +63 -9
  23. package/api/search/_entries.d.mts +10 -0
  24. package/api/search/_entries.mjs +68 -1
  25. package/api/search/_gather-templates.d.mts +11 -0
  26. package/api/search/_gather-templates.mjs +22 -2
  27. package/api/search/_words.mjs +26 -6
  28. package/api/swizzle/copy/copy.mjs +1 -1
  29. package/api/theme/_adapter.d.mts +37 -5
  30. package/api/theme/_adapter.mjs +381 -57
  31. package/api/theme/_fork.d.mts +90 -0
  32. package/api/theme/_fork.mjs +246 -0
  33. package/api/theme/build/build.d.mts +40 -2
  34. package/api/theme/build/build.mjs +477 -66
  35. package/api/theme/eject/eject.mjs +36 -15
  36. package/api/theme/list/list.mjs +3 -6
  37. package/api/theme/palette/generate/generator.d.mts +13 -0
  38. package/api/theme/palette/generate/generator.mjs +32 -2
  39. package/api/theme/targets/targets.d.mts +8 -0
  40. package/api/theme/targets/targets.mjs +24 -4
  41. package/api/theme/template/template.mjs +48 -2
  42. package/api/theme/theme.type.d.mts +8 -0
  43. package/api/theme/theme.type.mjs +5 -1
  44. package/api/theme/themeBuild.doc.mjs +7 -4
  45. package/api/theme/themeEject.doc.mjs +3 -3
  46. package/api/theme/themeRemove.doc.mjs +5 -2
  47. package/api/theme/themeTargets.doc.mjs +1 -1
  48. package/api/theme/themeTemplate.doc.mjs +2 -2
  49. package/api/theme/themeUse.doc.mjs +8 -2
  50. package/api/theme-edit/_adapter.d.mts +46 -3
  51. package/api/theme-edit/_adapter.mjs +496 -112
  52. package/api/theme-edit/_catalog.d.mts +1 -6
  53. package/api/theme-edit/_catalog.mjs +5 -268
  54. package/api/theme-edit/_check.d.mts +9 -4
  55. package/api/theme-edit/_check.mjs +1232 -229
  56. package/api/theme-edit/_color.d.mts +19 -0
  57. package/api/theme-edit/_color.mjs +280 -34
  58. package/api/theme-edit/_compiler.d.mts +3 -1
  59. package/api/theme-edit/_compiler.mjs +52 -13
  60. package/api/theme-edit/_context.d.mts +4 -1
  61. package/api/theme-edit/_context.mjs +126 -13
  62. package/api/theme-edit/_css.d.mts +84 -0
  63. package/api/theme-edit/_css.mjs +700 -0
  64. package/api/theme-edit/_edit.d.mts +9 -3
  65. package/api/theme-edit/_edit.mjs +806 -103
  66. package/api/theme-edit/_how-commands.d.mts +38 -7
  67. package/api/theme-edit/_how-commands.mjs +64 -45
  68. package/api/theme-edit/_how-question.d.mts +33 -0
  69. package/api/theme-edit/_how-question.mjs +2553 -381
  70. package/api/theme-edit/_how.mjs +402 -31
  71. package/api/theme-edit/_overview.mjs +2 -7
  72. package/api/theme-edit/_palette.d.mts +60 -13
  73. package/api/theme-edit/_palette.mjs +826 -295
  74. package/api/theme-edit/_parts.d.mts +42 -10
  75. package/api/theme-edit/_parts.mjs +280 -69
  76. package/api/theme-edit/_png.d.mts +4 -4
  77. package/api/theme-edit/_png.mjs +4 -2
  78. package/api/theme-edit/_preview-app.d.mts +14 -0
  79. package/api/theme-edit/_preview-app.mjs +1675 -235
  80. package/api/theme-edit/_preview.d.mts +7 -16
  81. package/api/theme-edit/_preview.mjs +79 -86
  82. package/api/theme-edit/_project.d.mts +32 -2
  83. package/api/theme-edit/_project.mjs +80 -19
  84. package/api/theme-edit/_settings.d.mts +199 -52
  85. package/api/theme-edit/_settings.mjs +1422 -217
  86. package/api/theme-edit/_tables.d.mts +19 -6
  87. package/api/theme-edit/_tables.mjs +150 -92
  88. package/api/theme-edit/theme-edit.type.d.mts +20 -1
  89. package/api/theme-edit/theme-edit.type.mjs +6 -3
  90. package/api/theme-edit/themeEditHow.doc.mjs +6 -0
  91. package/api/theme-edit/themeEditNew.doc.mjs +1 -1
  92. package/api/theme-edit/themeEditPreviewAdd.doc.mjs +1 -1
  93. package/api/theme-edit/themeEditPreviewApp.doc.mjs +1 -1
  94. package/api/theme-edit/themeEditPreviewList.doc.mjs +2 -2
  95. package/api/theme-edit/themeEditPreviewRemove.doc.mjs +5 -1
  96. package/api/theme-edit/themeEditSet.doc.mjs +1 -1
  97. package/api/theme-edit/themeEditUndo.doc.mjs +1 -1
  98. package/api/upgrade/_adapter.d.mts +1 -0
  99. package/assets/codemods/run-codemod.mjs +61 -0
  100. package/assets/codemods/runner.mjs +5 -4
  101. package/assets/codemods/transforms/v0.0.14/rename-status-variants.mjs +3 -0
  102. package/assets/codemods/transforms/v0.1.8/rename-avatar-size-scale.mjs +5 -1
  103. package/assets/codemods/transforms/v0.6.4/migrate-native-picker-to-presentation.mjs +3 -0
  104. package/assets/codemods/transforms/v0.7.0/migrate-deprecated-theme-surface.mjs +4 -0
  105. package/assets/codemods/transforms/v0.7.0/rename-empty-search-results-text.mjs +17 -12
  106. package/assets/codemods/transforms/v0.7.2/migrate-list-edge-compensation-to-edge.mjs +3 -0
  107. package/assets/codemods/transforms/v0.7.5/migrate-codeblock-tokenizer-to-language.mjs +3 -0
  108. package/assets/codemods/transforms/v0.7.8/promote-tokenizer-presentation.mjs +3 -0
  109. package/assets/docs/tree/calendars.doc.mjs +1 -3
  110. package/assets/docs/tree/checks.doc.mjs +22 -1
  111. package/assets/docs/tree/publishing.doc.mjs +1 -0
  112. package/assets/docs/tree/tokens-and-setup.doc.mjs +39 -3
  113. package/assets/docs.generated.json +2 -1
  114. package/assets/preview-app/next.config.mjs +7 -1
  115. package/assets/self-audit.generated.json +1 -0
  116. package/assets/templates/blocks/components/Theme/useThemeNameHookUsage.doc.mjs +14 -0
  117. package/assets/templates/blocks/components/Theme/useThemeNameHookUsage.tsx +31 -0
  118. package/assets/templates/components.generated.json +1 -1
  119. package/authoring/integration/integration.doc.mjs +8 -0
  120. package/authoring/integration/schema.d.mts +8 -0
  121. package/authoring/integration/schema.mjs +1 -0
  122. package/authoring/integration/type.ts +9 -0
  123. package/clients/cli/bin/astryx.mjs +19 -15
  124. package/clients/cli/build-id.generated.json +1 -0
  125. package/clients/cli/commands/ensure-core-built.mjs +12 -5
  126. package/clients/cli/commands/experimental/index.mjs +10 -10
  127. package/clients/cli/commands/experimental/theme.mjs +200 -81
  128. package/clients/cli/commands/experimental-theme-compile.doc.mjs +3 -3
  129. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +1 -1
  130. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +3 -3
  131. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -2
  132. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
  133. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
  134. package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
  135. package/clients/cli/commands/experimental-theme-eject.doc.mjs +3 -3
  136. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -1
  137. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
  138. package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +1 -1
  139. package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +1 -1
  140. package/clients/cli/commands/experimental-theme-remove.doc.mjs +1 -1
  141. package/clients/cli/commands/experimental-theme-template.doc.mjs +4 -3
  142. package/clients/cli/commands/integration.mjs +8 -0
  143. package/clients/cli/commands/manifest.mjs +5 -2
  144. package/clients/cli/commands/theme-build.doc.mjs +2 -2
  145. package/clients/cli/commands/theme-list.doc.mjs +1 -1
  146. package/clients/cli/commands/theme-template.doc.mjs +1 -1
  147. package/clients/cli/commands/theme.mjs +439 -66
  148. package/clients/cli/index.mjs +27 -6
  149. package/clients/cli/lib/cli-error.mjs +118 -3
  150. package/clients/cli/lib/manifest.mjs +37 -0
  151. package/clients/cli/lib/resolve-theme.mjs +2 -1
  152. package/clients/cli/manifest.generated.json +1 -0
  153. package/foundation/config/project.mjs +34 -8
  154. package/foundation/config/theme-state.d.mts +16 -0
  155. package/foundation/config/theme-state.mjs +84 -13
  156. package/foundation/discovery/module-exports.mjs +16 -2
  157. package/foundation/discovery/stored-self-audit.d.mts +31 -0
  158. package/foundation/discovery/stored-self-audit.mjs +119 -0
  159. package/foundation/discovery/template-adapter.d.mts +48 -2
  160. package/foundation/discovery/template-adapter.mjs +51 -19
  161. package/foundation/discovery/template-needs.d.mts +19 -0
  162. package/foundation/discovery/template-needs.mjs +50 -16
  163. package/foundation/discovery/template-source-tree.d.mts +7 -0
  164. package/foundation/discovery/template-source-tree.mjs +15 -0
  165. package/foundation/discovery/theme-discovery.d.mts +2 -1
  166. package/foundation/discovery/theme-discovery.mjs +16 -10
  167. package/foundation/discovery/theme-imports.d.mts +16 -0
  168. package/foundation/discovery/theme-imports.mjs +30 -2
  169. package/foundation/discovery/theme-module-extensions.d.mts +18 -0
  170. package/foundation/discovery/theme-module-extensions.mjs +30 -0
  171. package/foundation/doc-compiler/import.mjs +22 -15
  172. package/foundation/doc-compiler/stored-docs.d.mts +18 -12
  173. package/foundation/doc-compiler/stored-docs.mjs +52 -19
  174. package/foundation/env/private-dir.d.mts +17 -0
  175. package/foundation/env/private-dir.mjs +42 -0
  176. package/foundation/fs/gather-cache.d.mts +108 -0
  177. package/foundation/fs/gather-cache.mjs +783 -0
  178. package/foundation/fs/jiti-cache.d.mts +21 -0
  179. package/foundation/fs/jiti-cache.mjs +66 -0
  180. package/foundation/fs/module-loader.mjs +14 -3
  181. package/foundation/fs/read-record.d.mts +31 -1
  182. package/foundation/fs/read-record.mjs +100 -7
  183. package/foundation/integrations/autolink.d.mts +1 -24
  184. package/foundation/integrations/autolink.mjs +7 -60
  185. package/foundation/integrations/declared-dependencies.d.mts +27 -0
  186. package/foundation/integrations/declared-dependencies.mjs +73 -0
  187. package/foundation/integrations/integrations.d.mts +8 -0
  188. package/foundation/integrations/integrations.mjs +4 -0
  189. package/foundation/integrations/may-have-integrations.d.mts +8 -0
  190. package/foundation/integrations/may-have-integrations.mjs +47 -0
  191. package/foundation/integrations/validate-contributions.d.mts +62 -1
  192. package/foundation/integrations/validate-contributions.mjs +476 -40
  193. package/foundation/release/cache.d.mts +32 -4
  194. package/foundation/release/cache.mjs +105 -16
  195. package/foundation/release/folder-lock.d.mts +28 -0
  196. package/foundation/release/folder-lock.mjs +205 -0
  197. package/foundation/release/lock-lease.d.mts +2 -1
  198. package/foundation/release/lock-lease.mjs +7 -2
  199. package/foundation/response/error-codes.doc.mjs +1 -1
  200. package/foundation/response/response-types.doc.mjs +5 -5
  201. package/package.json +8 -6
  202. package/api/theme-edit/_css-properties.d.mts +0 -10
  203. package/api/theme-edit/_css-properties.mjs +0 -556
@@ -34,14 +34,9 @@ export function pageSource({ items, imports, theme, layout, title }: {
34
34
  layout: "catalog" | "sheet" | "page";
35
35
  title?: string | undefined;
36
36
  }): string;
37
- /** Components without playground defaults, set up by hand. @type {Array<[string, Array<[string, Tree]>]>} */
38
- export const EXTRA: Array<[string, Array<[string, Tree]>]>;
39
- /** Overlays rendered open, so their surfaces, borders and shadows show. */
40
- export const OPEN_OVERLAYS: Array<[string, Array<[string, Tree]>]>;
37
+ export function h(name: string, props?: Record<string, unknown>, ...children: unknown[]): Tree;
41
38
  /** The sample app page every preview shows. */
42
39
  export const SAMPLE_PAGE: Tree;
43
- /** Components left off the contact sheet: they cover the page, or only lay out others. */
44
- export const SHEET_SKIP: Set<string>;
45
40
  /** Components first on the contact sheet, in this order. */
46
41
  export const SHEET_ORDER: string[];
47
42
  /** The light and dark switches, and the contact sheet grid. */
@@ -20,257 +20,12 @@
20
20
  */
21
21
 
22
22
  /** @param {string} name @param {Record<string, unknown>} [props] @param {...unknown} children @returns {Tree} */
23
- const h = (name, props = {}, ...children) => ({
23
+ export const h = (name, props = {}, ...children) => ({
24
24
  __element: name,
25
25
  props,
26
26
  ...(children.length ? {children} : {}),
27
27
  });
28
28
 
29
- /** Components without playground defaults, set up by hand. @type {Array<[string, Array<[string, Tree]>]>} */
30
- export const EXTRA = [
31
- [
32
- 'Heading',
33
- [1, 2, 3, 4].map(level => [
34
- `level ${level}`,
35
- h('Heading', {level}, `Heading ${level}`),
36
- ]),
37
- ],
38
- [
39
- 'TextInput',
40
- [
41
- ['', h('TextInput', {label: 'Name', value: 'Jordan'})],
42
- [
43
- 'disabled',
44
- h('TextInput', {label: 'Disabled', value: '-', isDisabled: true}),
45
- ],
46
- ],
47
- ],
48
- [
49
- 'ButtonGroup',
50
- [
51
- [
52
- '',
53
- h(
54
- 'ButtonGroup',
55
- {label: 'Actions'},
56
- h('Button', {label: 'Copy', variant: 'secondary'}),
57
- h('Button', {label: 'Paste', variant: 'secondary'}),
58
- h('Button', {label: 'Delete', variant: 'secondary'}),
59
- ),
60
- ],
61
- ],
62
- ],
63
- ['TextArea', [['', h('TextArea', {label: 'Notes', value: 'Some notes'})]]],
64
- ['NumberInput', [['', h('NumberInput', {label: 'Count', value: 3})]]],
65
- [
66
- 'CheckboxInput',
67
- [
68
- ['on', h('CheckboxInput', {label: 'Checked', value: true})],
69
- ['off', h('CheckboxInput', {label: 'Unchecked', value: false})],
70
- ],
71
- ],
72
- [
73
- 'Switch',
74
- [
75
- ['on', h('Switch', {label: 'On', value: true})],
76
- ['off', h('Switch', {label: 'Off', value: false})],
77
- ],
78
- ],
79
- [
80
- 'ProgressBar',
81
- ['accent', 'success', 'warning', 'error'].map(v => [
82
- v,
83
- h('ProgressBar', {label: v, variant: v, value: 60}),
84
- ]),
85
- ],
86
- [
87
- 'TabList',
88
- [
89
- [
90
- '',
91
- h(
92
- 'TabList',
93
- {value: 'a'},
94
- h('Tab', {value: 'a', label: 'Selected'}),
95
- h('Tab', {value: 'b', label: 'Other'}),
96
- ),
97
- ],
98
- ],
99
- ],
100
- [
101
- 'SegmentedControl',
102
- [
103
- [
104
- '',
105
- h(
106
- 'SegmentedControl',
107
- {label: 'Range', value: 'a'},
108
- h('SegmentedControlItem', {value: 'a', label: 'Day'}),
109
- h('SegmentedControlItem', {value: 'b', label: 'Week'}),
110
- ),
111
- ],
112
- ],
113
- ],
114
- [
115
- 'TopNav',
116
- [
117
- [
118
- '',
119
- h(
120
- 'TopNav',
121
- {label: 'Top', heading: 'App'},
122
- h('TopNavItem', {label: 'Selected', href: '#', isSelected: true}),
123
- h('TopNavItem', {label: 'Other', href: '#'}),
124
- ),
125
- ],
126
- ],
127
- ],
128
- [
129
- 'SideNav',
130
- [
131
- [
132
- '',
133
- h(
134
- 'SideNav',
135
- {label: 'Side'},
136
- h('SideNavItem', {label: 'Selected', href: '#', isSelected: true}),
137
- h('SideNavItem', {label: 'Other', href: '#'}),
138
- ),
139
- ],
140
- ],
141
- ],
142
- [
143
- 'StatusDot',
144
- ['success', 'warning', 'error', 'accent', 'neutral'].map(v => [
145
- v,
146
- h('StatusDot', {variant: v, label: v}),
147
- ]),
148
- ],
149
- ];
150
-
151
- /** Overlays rendered open, so their surfaces, borders and shadows show. */
152
- export const OPEN_OVERLAYS =
153
- /** @type {Array<[string, Array<[string, Tree]>]>} */ ([
154
- [
155
- 'Dialog',
156
- [
157
- [
158
- 'open',
159
- {
160
- __element: 'Dialog',
161
- props: {isOpen: true, isInline: true, width: 360},
162
- children: [
163
- {
164
- __element: 'VStack',
165
- props: {gap: 2},
166
- children: [
167
- {
168
- __element: 'Heading',
169
- props: {level: 3},
170
- children: ['Dialog title'],
171
- },
172
- {
173
- __element: 'Text',
174
- props: {type: 'body'},
175
- children: ['Are you sure you want to proceed?'],
176
- },
177
- ],
178
- },
179
- ],
180
- },
181
- ],
182
- ],
183
- ],
184
- [
185
- 'AlertDialog',
186
- [
187
- [
188
- 'open',
189
- {
190
- __element: 'AlertDialog',
191
- props: {
192
- isOpen: true,
193
- isInline: true,
194
- title: 'Delete item?',
195
- description: 'This cannot be undone.',
196
- actionLabel: 'Delete',
197
- },
198
- },
199
- ],
200
- ],
201
- ],
202
- [
203
- 'Popover',
204
- [
205
- [
206
- 'open',
207
- {
208
- __element: 'Popover',
209
- props: {
210
- isOpen: true,
211
- label: 'Details',
212
- content: {
213
- __element: 'Text',
214
- props: {type: 'body'},
215
- children: ['Popover content'],
216
- },
217
- },
218
- children: [
219
- {
220
- __element: 'Button',
221
- props: {label: 'Anchor', variant: 'secondary'},
222
- },
223
- ],
224
- },
225
- ],
226
- ],
227
- ],
228
- [
229
- 'Tooltip',
230
- [
231
- [
232
- 'open',
233
- {
234
- __element: 'Tooltip',
235
- props: {isOpen: true, content: 'Tooltip text'},
236
- children: [
237
- {
238
- __element: 'Button',
239
- props: {label: 'Hover me', variant: 'secondary'},
240
- },
241
- ],
242
- },
243
- ],
244
- ],
245
- ],
246
- [
247
- 'HoverCard',
248
- [
249
- [
250
- 'open',
251
- {
252
- __element: 'HoverCard',
253
- props: {
254
- isOpen: true,
255
- content: {
256
- __element: 'Text',
257
- props: {type: 'body'},
258
- children: ['More details'],
259
- },
260
- },
261
- children: [
262
- {
263
- __element: 'Link',
264
- props: {href: '#'},
265
- children: ['Hover for details'],
266
- },
267
- ],
268
- },
269
- ],
270
- ],
271
- ],
272
- ]);
273
-
274
29
  const ROWS = [
275
30
  {id: 1, task: 'Review Q4 roadmap', owner: 'Alex', status: 'In progress'},
276
31
  {id: 2, task: 'Ship onboarding flow', owner: 'Sam', status: 'Done'},
@@ -396,27 +151,6 @@ export const SAMPLE_PAGE = h(
396
151
  ),
397
152
  );
398
153
 
399
- /** Components left off the contact sheet: they cover the page, or only lay out others. */
400
- export const SHEET_SKIP = new Set([
401
- 'Lightbox',
402
- 'CommandPalette',
403
- 'Drawer',
404
- 'BottomSheet',
405
- 'Overlay',
406
- 'Toast',
407
- 'Tooltip',
408
- 'HoverCard',
409
- 'Popover',
410
- 'Dialog',
411
- 'AlertDialog',
412
- 'AspectRatio',
413
- 'Center',
414
- 'Layout',
415
- 'ScrollableArea',
416
- 'Grid',
417
- 'Stack',
418
- ]);
419
-
420
154
  /** Components first on the contact sheet, in this order. */
421
155
  export const SHEET_ORDER = [
422
156
  'Heading',
@@ -502,11 +236,14 @@ export function pageSource({items, imports, theme, layout, title = ''}) {
502
236
  lines.push(
503
237
  'const HANDLERS = ["onChange", "onClick", "onDismiss", "onOpenChange", "onSelect", "onValueChange"];',
504
238
  );
239
+ lines.push(
240
+ 'const isEl = v => Boolean(v && typeof v === "object" && !Array.isArray(v) && v.__element);',
241
+ );
505
242
  lines.push(
506
243
  'function el(v) { if (Array.isArray(v)) return v.map(el); if (v && typeof v === "object" && v.__element) { const T = C[v.__element]; if (!T) return null; return React.createElement(T, fix(v.props ?? {}), ...[].concat(v.children ?? []).map(el)); } return v; }',
507
244
  );
508
245
  lines.push(
509
- 'function fix(p) { const o = {}; for (const [k, v] of Object.entries(p)) o[k] = v && typeof v === "object" && !Array.isArray(v) && v.__element ? el(v) : v; for (const k of HANDLERS) if (!(k in o)) o[k] = noop; return o; }',
246
+ 'function fix(p) { const o = {}; for (const [k, v] of Object.entries(p)) o[k] = isEl(v) || (Array.isArray(v) && v.some(isEl)) ? el(v) : v; for (const k of HANDLERS) if (!(k in o)) o[k] = noop; return o; }',
510
247
  );
511
248
  lines.push(`const ITEMS = ${JSON.stringify(items)};`);
512
249
  lines.push(
@@ -17,12 +17,13 @@
17
17
  * @param {string} slug
18
18
  * @param {import('./_settings.mjs').ThemeData} data
19
19
  * @param {string} [skip]
20
- * @returns {{setting: import('./_settings.mjs').Setting, why: string} | null}
20
+ * @returns {Array<{setting: import('./_settings.mjs').Setting, why: string, scope?: boolean}>} every saved setting the editor no longer accepts
21
21
  */
22
- export function storedTokenProblem(ctx: import("./_settings.mjs").Ctx, slug: string, data: import("./_settings.mjs").ThemeData, skip?: string): {
22
+ export function storedProblems(ctx: import("./_settings.mjs").Ctx, slug: string, data: import("./_settings.mjs").ThemeData, skip?: string): Array<{
23
23
  setting: import("./_settings.mjs").Setting;
24
24
  why: string;
25
- } | null;
25
+ scope?: boolean;
26
+ }>;
26
27
  /**
27
28
  * A value of a type to put in a suggestion, so a suggested command runs.
28
29
  * @param {string} type
@@ -30,7 +31,9 @@ export function storedTokenProblem(ctx: import("./_settings.mjs").Ctx, slug: str
30
31
  */
31
32
  export function exampleOf(type: string, name: string): string;
32
33
  /**
33
- * Check one setting and give it back ready to store, or refuse.
34
+ * Check one setting and give it back ready to store, or refuse. What it
35
+ * accepts, the settings loader takes too: the loader's own check runs last,
36
+ * so a saved setting never blocks the theme.
34
37
  * @param {import('./_settings.mjs').Ctx} ctx
35
38
  * @param {string} slug
36
39
  * @param {import('./_settings.mjs').ThemeData} data
@@ -41,6 +44,7 @@ export function exampleOf(type: string, name: string): string;
41
44
  * @returns {import('./_settings.mjs').Setting}
42
45
  */
43
46
  export function checkSetting(ctx: import("./_settings.mjs").Ctx, slug: string, data: import("./_settings.mjs").ThemeData, thing: string, value: string | undefined, flags: SetFlags, unset?: boolean): import("./_settings.mjs").Setting;
47
+ export { lengthPx };
44
48
  /** The aspects `how` answers at the whole-theme level. */
45
49
  export const ASPECTS: string[];
46
50
  export type SetFlags = {
@@ -50,3 +54,4 @@ export type SetFlags = {
50
54
  mode?: string | undefined;
51
55
  only?: boolean | undefined;
52
56
  };
57
+ import { lengthPx } from './_settings.mjs';