@hirobius/design-system 0.20.0 → 0.22.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 (130) hide show
  1. package/AGENTS.md +125 -0
  2. package/CHANGELOG.md +969 -0
  3. package/CONSUMING.md +27 -11
  4. package/DESIGN.md +28 -17
  5. package/MIGRATIONS.md +603 -0
  6. package/NOTICE.md +1 -1
  7. package/README.md +39 -5
  8. package/UPGRADING.md +222 -0
  9. package/codemods/hds-prefix.mjs +28 -13
  10. package/codemods/jsx-fold.mjs +28 -13
  11. package/codemods/lib/atomic-write.mjs +28 -0
  12. package/codemods/lib/installed-version.mjs +354 -0
  13. package/codemods/lib/project.mjs +395 -0
  14. package/codemods/lib/record.mjs +110 -0
  15. package/codemods/lib/scan.mjs +323 -0
  16. package/codemods/lib/semver.mjs +57 -0
  17. package/codemods/not-found-pattern.mjs +3 -3
  18. package/codemods/patterns-subpath.mjs +28 -12
  19. package/codemods/registry.mjs +67 -0
  20. package/codemods/tile-grid.mjs +3 -3
  21. package/codemods/upgrade.mjs +909 -0
  22. package/dist/chunks/empty-state-DNoThgfV.js +1227 -0
  23. package/dist/chunks/form-By82qZcC.js +66 -0
  24. package/dist/fonts/geist-mono-400.woff2 +0 -0
  25. package/dist/fonts/satoshi-400.woff2 +0 -0
  26. package/dist/fonts/satoshi-500.woff2 +0 -0
  27. package/dist/fonts/satoshi-700.woff2 +0 -0
  28. package/dist/fonts.css +53 -0
  29. package/dist/form.js +1 -1
  30. package/dist/hirobius-ui.js +876 -877
  31. package/dist/manifest.js +3 -3
  32. package/dist/patterns.js +189 -170
  33. package/dist/styles.css +2 -2
  34. package/dist/tokens.css +1 -1
  35. package/dist/tokens.js +136 -57
  36. package/dist/types/src/app/components/alert-dialog.d.ts +5 -0
  37. package/dist/types/src/app/components/alert.d.ts +1 -1
  38. package/dist/types/src/app/components/asset-img.d.ts +1 -0
  39. package/dist/types/src/app/components/avatar-group.d.ts +1 -0
  40. package/dist/types/src/app/components/avatar.d.ts +1 -1
  41. package/dist/types/src/app/components/badge.d.ts +2 -2
  42. package/dist/types/src/app/components/blockquote.d.ts +1 -0
  43. package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
  44. package/dist/types/src/app/components/button.d.ts +3 -1
  45. package/dist/types/src/app/components/callout.d.ts +1 -1
  46. package/dist/types/src/app/components/card.d.ts +4 -3
  47. package/dist/types/src/app/components/checkbox.d.ts +1 -1
  48. package/dist/types/src/app/components/code-block.d.ts +1 -1
  49. package/dist/types/src/app/components/combobox.d.ts +1 -1
  50. package/dist/types/src/app/components/data-table-section.d.ts +1 -0
  51. package/dist/types/src/app/components/destructive-section.d.ts +1 -0
  52. package/dist/types/src/app/components/dialog.d.ts +2 -1
  53. package/dist/types/src/app/components/disclosure.d.ts +1 -1
  54. package/dist/types/src/app/components/divider.d.ts +1 -1
  55. package/dist/types/src/app/components/empty-state.d.ts +1 -1
  56. package/dist/types/src/app/components/error-pattern.d.ts +6 -1
  57. package/dist/types/src/app/components/field.d.ts +1 -1
  58. package/dist/types/src/app/components/form-actions.d.ts +1 -0
  59. package/dist/types/src/app/components/form-control.d.ts +10 -0
  60. package/dist/types/src/app/components/form.d.ts +1 -1
  61. package/dist/types/src/app/components/grid.d.ts +5 -0
  62. package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
  63. package/dist/types/src/app/components/icon.d.ts +1 -0
  64. package/dist/types/src/app/components/inline-link.d.ts +1 -1
  65. package/dist/types/src/app/components/input.d.ts +1 -1
  66. package/dist/types/src/app/components/kbd.d.ts +1 -0
  67. package/dist/types/src/app/components/menu.d.ts +1 -1
  68. package/dist/types/src/app/components/metadata-list.d.ts +1 -0
  69. package/dist/types/src/app/components/metric-tiles.d.ts +1 -0
  70. package/dist/types/src/app/components/pagination.d.ts +1 -1
  71. package/dist/types/src/app/components/popover.d.ts +1 -1
  72. package/dist/types/src/app/components/progress.d.ts +2 -2
  73. package/dist/types/src/app/components/radio.d.ts +1 -1
  74. package/dist/types/src/app/components/select.d.ts +1 -1
  75. package/dist/types/src/app/components/skeleton.d.ts +2 -2
  76. package/dist/types/src/app/components/slider.d.ts +1 -1
  77. package/dist/types/src/app/components/spinner.d.ts +1 -1
  78. package/dist/types/src/app/components/stat.d.ts +5 -4
  79. package/dist/types/src/app/components/status-list-item.d.ts +1 -1
  80. package/dist/types/src/app/components/status-tile.d.ts +4 -3
  81. package/dist/types/src/app/components/table.d.ts +6 -1
  82. package/dist/types/src/app/components/tabs.d.ts +1 -1
  83. package/dist/types/src/app/components/tag.d.ts +1 -1
  84. package/dist/types/src/app/components/text.d.ts +53 -6
  85. package/dist/types/src/app/components/textarea.d.ts +1 -1
  86. package/dist/types/src/app/components/timestamp.d.ts +1 -0
  87. package/dist/types/src/app/components/toast.d.ts +1 -1
  88. package/dist/types/src/app/components/toggle.d.ts +1 -1
  89. package/dist/types/src/app/data/manifest-types.d.ts +4 -0
  90. package/dist/types/src/app/design-system/generated-token-refs.d.ts +37 -28
  91. package/dist/types/src/app/design-system/generated-token-values.d.ts +3 -0
  92. package/dist/types/src/app/design-system/tokens.d.ts +117 -15
  93. package/dist/types/src/index.d.ts +122 -72
  94. package/dist/variables.css +41 -33
  95. package/docs/CONSUMING.md +63 -39
  96. package/hirobius.tokens.json +163 -112
  97. package/llms.txt +158 -50
  98. package/mcp/catalog.mjs +369 -0
  99. package/mcp/core-set.mjs +66 -0
  100. package/mcp/guide.mjs +272 -0
  101. package/mcp/hds-mcp.mjs +49 -0
  102. package/mcp/server.mjs +94 -0
  103. package/package.json +53 -11
  104. package/public/hds-manifest.json +430 -336
  105. package/public/llms/components.txt +4 -3
  106. package/public/llms/layout.txt +1 -1
  107. package/public/llms-full.txt +190 -70
  108. package/public/llms.txt +158 -50
  109. package/scripts/eslint-plugin-hds/index.d.mts +29 -0
  110. package/scripts/eslint-plugin-hds/index.mjs +55 -0
  111. package/scripts/eslint-plugin-hds/package.json +30 -0
  112. package/scripts/eslint-plugin-hds/rules/no-raw-controls.mjs +47 -0
  113. package/scripts/eslint-plugin-hds/rules/no-raw-hex.mjs +70 -0
  114. package/scripts/eslint-plugin-hds/rules/no-raw-px-spacing.mjs +125 -0
  115. package/scripts/eslint-plugin-hds/rules/prefer-hds-layout-primitive.mjs +54 -0
  116. package/scripts/eslint-plugin-hds/rules/sx-token-first.mjs +111 -0
  117. package/scripts/eslint-plugin-hds/rules/utils.mjs +66 -0
  118. package/src/app/data/component-api.json +154 -93
  119. package/upgrade/index.json +208 -0
  120. package/upgrade/releases/0.17.0.json +962 -0
  121. package/upgrade/releases/0.18.0.json +8 -0
  122. package/upgrade/releases/0.19.0.json +233 -0
  123. package/upgrade/releases/0.19.1.json +8 -0
  124. package/upgrade/releases/0.20.0.json +5108 -0
  125. package/upgrade/releases/0.21.0.json +538 -0
  126. package/upgrade/releases/0.22.0.json +94 -0
  127. package/upgrade/schema.json +989 -0
  128. package/dist/chunks/empty-state-BBqhCx0S.js +0 -1217
  129. package/dist/chunks/form-COP3vK9_.js +0 -66
  130. package/dist/types/src/app/components/status-dot.d.ts +0 -39
@@ -0,0 +1,989 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@hirobius/design-system upgrade ledger",
4
+ "description": "Generated from scripts/upgrade/schema.mjs; do not edit. The root validates a release ledger (upgrade/releases/<version>.json); $defs.index validates upgrade/index.json, $defs.snapshot a release snapshot (docs/api/releases/<version>.json), $defs.pendingNote a changeset's upgrade note (upgrade/pending/<changeset>.json) and $defs.upgradeReport what the upgrade command prints with --json.",
5
+ "$ref": "#/$defs/release",
6
+ "$defs": {
7
+ "auto": {
8
+ "type": "object",
9
+ "properties": {
10
+ "codemod": {
11
+ "type": "string",
12
+ "pattern": "^[a-z][a-z0-9-]*$",
13
+ "description": "The name of a bin this package ships (package.json#bin), such as hds-patterns-subpath."
14
+ },
15
+ "args": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ },
20
+ "description": "Extra arguments. The upgrade command passes --root, --dry-run and --check itself."
21
+ }
22
+ },
23
+ "required": [
24
+ "codemod",
25
+ "args"
26
+ ],
27
+ "additionalProperties": false,
28
+ "description": "The codemod that applies this step for the consumer."
29
+ },
30
+ "detect": {
31
+ "type": "object",
32
+ "properties": {
33
+ "imports": {
34
+ "description": "Named imports (and re-exports) that use the changed thing.",
35
+ "minItems": 1,
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "properties": {
40
+ "from": {
41
+ "type": "string",
42
+ "minLength": 1,
43
+ "description": "The module specifier as written in the import: @hirobius/design-system or one of its subpaths."
44
+ },
45
+ "names": {
46
+ "minItems": 1,
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string",
50
+ "minLength": 1
51
+ },
52
+ "description": "Export names. A named import of any of them from `from` is a use."
53
+ }
54
+ },
55
+ "required": [
56
+ "from",
57
+ "names"
58
+ ],
59
+ "additionalProperties": false
60
+ }
61
+ },
62
+ "jsx": {
63
+ "minItems": 1,
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "description": "JSX tag names, as exported (Card, Card.Header). The tool resolves a local alias."
70
+ },
71
+ "cssVars": {
72
+ "description": "Custom properties read with var(--name), in CSS or in code.",
73
+ "minItems": 1,
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string",
77
+ "pattern": "^--[\\w-]+$"
78
+ }
79
+ },
80
+ "cssVarWrites": {
81
+ "description": "Custom properties the consumer sets (--name: value), overriding HDS.",
82
+ "minItems": 1,
83
+ "type": "array",
84
+ "items": {
85
+ "type": "string",
86
+ "pattern": "^--[\\w-]+$"
87
+ }
88
+ },
89
+ "classes": {
90
+ "description": "Class names, in className strings or CSS selectors.",
91
+ "minItems": 1,
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string",
95
+ "pattern": "^\\S+$"
96
+ }
97
+ },
98
+ "bareImports": {
99
+ "description": "Package specifiers the consumer imports or requires directly, such as a dependency HDS stopped installing.",
100
+ "minItems": 1,
101
+ "type": "array",
102
+ "items": {
103
+ "type": "string",
104
+ "pattern": "^(?:@[^\\s/]+\\/)?[^\\s/@][^\\s]*$"
105
+ }
106
+ },
107
+ "regex": {
108
+ "description": "JavaScript regular expression sources, each tested against a whole file.",
109
+ "minItems": 1,
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string",
113
+ "minLength": 1
114
+ }
115
+ }
116
+ },
117
+ "additionalProperties": false,
118
+ "minProperties": 1,
119
+ "description": "How to find a use of the changed thing in consumer code. Any match is a use."
120
+ },
121
+ "index": {
122
+ "type": "object",
123
+ "properties": {
124
+ "package": {
125
+ "type": "string",
126
+ "const": "@hirobius/design-system"
127
+ },
128
+ "latest": {
129
+ "type": "string",
130
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
131
+ "description": "The newest release with a ledger."
132
+ },
133
+ "floor": {
134
+ "type": "string",
135
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
136
+ "description": "The oldest version the upgrade command can upgrade from. Below it, the command stops and changes nothing."
137
+ },
138
+ "versions": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "properties": {
143
+ "version": {
144
+ "type": "string",
145
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
146
+ "description": "A semver version, such as 0.20.0."
147
+ },
148
+ "date": {
149
+ "type": "string",
150
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
151
+ "description": "The release day, YYYY-MM-DD: the day `pnpm changeset:version` cut it (its Version PR, which publishes when it merges, as last regenerated), or, for a release recorded after it shipped, the day npm published it."
152
+ },
153
+ "bump": {
154
+ "type": "string",
155
+ "enum": [
156
+ "patch",
157
+ "minor",
158
+ "major"
159
+ ]
160
+ },
161
+ "breaking": {
162
+ "type": "integer",
163
+ "minimum": 0,
164
+ "maximum": 9007199254740991,
165
+ "description": "How many of its steps have impact breaking."
166
+ },
167
+ "summary": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 140
171
+ }
172
+ },
173
+ "required": [
174
+ "version",
175
+ "date",
176
+ "bump",
177
+ "breaking",
178
+ "summary"
179
+ ],
180
+ "additionalProperties": false
181
+ },
182
+ "description": "Every release with a ledger."
183
+ },
184
+ "deprecated": {
185
+ "type": "array",
186
+ "items": {
187
+ "type": "object",
188
+ "properties": {
189
+ "name": {
190
+ "type": "string",
191
+ "minLength": 1,
192
+ "description": "The deprecated export or class or, for a deprecation that lists neither (a token path, a prop, a prop value), the subject of its step: a label to show, not a name to search code for. To find its uses, read the detect of the step `step` names."
193
+ },
194
+ "entry": {
195
+ "description": "The package.json#exports key that exports it, such as `.`.",
196
+ "type": "string"
197
+ },
198
+ "removeIn": {
199
+ "type": "string",
200
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
201
+ "description": "A semver version, such as 0.20.0."
202
+ },
203
+ "useInstead": {
204
+ "type": "string",
205
+ "minLength": 1
206
+ },
207
+ "step": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "description": "The id of the deprecated step that announced it."
211
+ }
212
+ },
213
+ "required": [
214
+ "name",
215
+ "removeIn",
216
+ "step"
217
+ ],
218
+ "additionalProperties": false
219
+ },
220
+ "description": "Names deprecated today, with the release that removes them (Coming next)."
221
+ }
222
+ },
223
+ "required": [
224
+ "package",
225
+ "latest",
226
+ "floor",
227
+ "versions",
228
+ "deprecated"
229
+ ],
230
+ "additionalProperties": false,
231
+ "description": "upgrade/index.json: the releases the upgrade command knows, and its floor."
232
+ },
233
+ "pendingNote": {
234
+ "type": "object",
235
+ "properties": {
236
+ "impact": {
237
+ "type": "string",
238
+ "enum": [
239
+ "none",
240
+ "additive",
241
+ "look",
242
+ "behavior",
243
+ "breaking"
244
+ ],
245
+ "description": "The most severe impact of this change on a consumer that does nothing. A change with none says so: impact none, stated, never left out."
246
+ },
247
+ "plain": {
248
+ "description": "The change in one sentence a non-expert can act on, ending in a full stop. Required unless impact is none.",
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "maxLength": 300,
252
+ "pattern": "^[^\\n]+[.]$"
253
+ },
254
+ "steps": {
255
+ "description": "The ledger steps this change adds. A fact the snapshot diff finds (a removed export, a dropped dependency) needs a step that lists it in facts.",
256
+ "minItems": 1,
257
+ "type": "array",
258
+ "items": {
259
+ "$ref": "#/$defs/pendingStep"
260
+ }
261
+ }
262
+ },
263
+ "required": [
264
+ "impact"
265
+ ],
266
+ "additionalProperties": false,
267
+ "description": "upgrade/pending/<changeset>.json: the upgrade note a changeset carries until its release (hds#448)."
268
+ },
269
+ "pendingStep": {
270
+ "type": "object",
271
+ "properties": {
272
+ "id": {
273
+ "type": "string",
274
+ "pattern": "^(?:removed|moved|renamed|folded|deprecated|value-changed|look|behavior|dependency|peer|engines|exports|tenant|manual)\\/\\S+$",
275
+ "description": "<kind>/<subject>, a release step id without its version: the compiler (hds#451) prefixes the version when it merges the note into upgrade/releases/<version>.json."
276
+ },
277
+ "kind": {
278
+ "type": "string",
279
+ "enum": [
280
+ "removed",
281
+ "moved",
282
+ "renamed",
283
+ "folded",
284
+ "deprecated",
285
+ "value-changed",
286
+ "look",
287
+ "behavior",
288
+ "dependency",
289
+ "peer",
290
+ "engines",
291
+ "exports",
292
+ "tenant",
293
+ "manual"
294
+ ],
295
+ "description": "What changed."
296
+ },
297
+ "impact": {
298
+ "type": "string",
299
+ "enum": [
300
+ "none",
301
+ "additive",
302
+ "look",
303
+ "behavior",
304
+ "breaking"
305
+ ],
306
+ "description": "What happens to a consumer that does nothing: none, additive (new, opt-in), look, behavior, or breaking (it stops compiling or running)."
307
+ },
308
+ "plain": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 300,
312
+ "pattern": "^[^\\n]+[.]$",
313
+ "description": "One sentence a non-expert can act on, ending in a full stop."
314
+ },
315
+ "auto": {
316
+ "$ref": "#/$defs/auto"
317
+ },
318
+ "detect": {
319
+ "$ref": "#/$defs/detect"
320
+ },
321
+ "done": {
322
+ "description": "How to tell the consumer has already made this change, in the detect shape: when any of it matches, the step is done even where detect matches too. For a step that asks the consumer to add something, such as an import.",
323
+ "$ref": "#/$defs/detect"
324
+ },
325
+ "removeIn": {
326
+ "description": "For a deprecation: the version that removes it.",
327
+ "type": "string",
328
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
329
+ },
330
+ "range": {
331
+ "description": "For a dependency or peer step: the range this package declared before the release, so a consumer that still imports it can add it back.",
332
+ "type": "string",
333
+ "minLength": 1
334
+ },
335
+ "facts": {
336
+ "description": "The ids of the snapshot-diff facts this step accounts for (scripts/upgrade/diff.mjs), such as removed:.:IconButton.",
337
+ "minItems": 1,
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string",
341
+ "minLength": 1
342
+ }
343
+ },
344
+ "source": {
345
+ "description": "Where the step comes from. When absent, the compiler (hds#451) fills it in.",
346
+ "type": "string",
347
+ "minLength": 1
348
+ }
349
+ },
350
+ "required": [
351
+ "id",
352
+ "kind",
353
+ "impact",
354
+ "plain"
355
+ ],
356
+ "additionalProperties": false,
357
+ "description": "One step of a pending note: a release step whose id leaves out the version."
358
+ },
359
+ "release": {
360
+ "type": "object",
361
+ "properties": {
362
+ "version": {
363
+ "type": "string",
364
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
365
+ "description": "A semver version, such as 0.20.0."
366
+ },
367
+ "date": {
368
+ "type": "string",
369
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
370
+ "description": "The release day, YYYY-MM-DD: the day `pnpm changeset:version` cut it (its Version PR, which publishes when it merges, as last regenerated), or, for a release recorded after it shipped, the day npm published it."
371
+ },
372
+ "bump": {
373
+ "type": "string",
374
+ "enum": [
375
+ "patch",
376
+ "minor",
377
+ "major"
378
+ ],
379
+ "description": "The semver bump from the previous release."
380
+ },
381
+ "summary": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "maxLength": 140,
385
+ "description": "The release in one line, 140 characters at most."
386
+ },
387
+ "backfilled": {
388
+ "type": "boolean",
389
+ "description": "True when this ledger was written after the release shipped, from its tarball and CHANGELOG."
390
+ },
391
+ "steps": {
392
+ "type": "array",
393
+ "items": {
394
+ "$ref": "#/$defs/step"
395
+ }
396
+ }
397
+ },
398
+ "required": [
399
+ "version",
400
+ "date",
401
+ "bump",
402
+ "summary",
403
+ "backfilled",
404
+ "steps"
405
+ ],
406
+ "additionalProperties": false,
407
+ "description": "A release ledger, upgrade/releases/<version>.json: every step a consumer crosses with this release."
408
+ },
409
+ "snapshot": {
410
+ "type": "object",
411
+ "properties": {
412
+ "format": {
413
+ "type": "number",
414
+ "const": 1
415
+ },
416
+ "name": {
417
+ "type": "string",
418
+ "minLength": 1
419
+ },
420
+ "version": {
421
+ "type": "string",
422
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
423
+ "description": "A semver version, such as 0.20.0."
424
+ },
425
+ "entries": {
426
+ "type": "object",
427
+ "propertyNames": {
428
+ "type": "string"
429
+ },
430
+ "additionalProperties": {
431
+ "type": "object",
432
+ "propertyNames": {
433
+ "type": "string"
434
+ },
435
+ "additionalProperties": {
436
+ "type": "string"
437
+ }
438
+ },
439
+ "description": "Every JS entry in package.json#exports: its export names, each with the module that declares it (relative to dist/types, no extension)."
440
+ },
441
+ "exportsKeys": {
442
+ "type": "array",
443
+ "items": {
444
+ "type": "string"
445
+ },
446
+ "description": "Every package.json#exports key."
447
+ },
448
+ "dependencies": {
449
+ "type": "object",
450
+ "propertyNames": {
451
+ "type": "string"
452
+ },
453
+ "additionalProperties": {
454
+ "type": "string"
455
+ }
456
+ },
457
+ "peerDependencies": {
458
+ "type": "object",
459
+ "propertyNames": {
460
+ "type": "string"
461
+ },
462
+ "additionalProperties": {
463
+ "type": "object",
464
+ "properties": {
465
+ "range": {
466
+ "type": "string"
467
+ },
468
+ "optional": {
469
+ "type": "boolean"
470
+ }
471
+ },
472
+ "required": [
473
+ "range",
474
+ "optional"
475
+ ],
476
+ "additionalProperties": false
477
+ }
478
+ },
479
+ "engines": {
480
+ "type": "object",
481
+ "propertyNames": {
482
+ "type": "string"
483
+ },
484
+ "additionalProperties": {
485
+ "type": "string"
486
+ }
487
+ },
488
+ "bin": {
489
+ "type": "object",
490
+ "propertyNames": {
491
+ "type": "string"
492
+ },
493
+ "additionalProperties": {
494
+ "type": "string"
495
+ }
496
+ },
497
+ "files": {
498
+ "type": "array",
499
+ "items": {
500
+ "type": "string"
501
+ },
502
+ "description": "package.json#files."
503
+ }
504
+ },
505
+ "required": [
506
+ "format",
507
+ "name",
508
+ "version",
509
+ "entries",
510
+ "exportsKeys",
511
+ "dependencies",
512
+ "peerDependencies",
513
+ "engines",
514
+ "bin",
515
+ "files"
516
+ ],
517
+ "additionalProperties": false,
518
+ "description": "docs/api/releases/<version>.json: the public surface of one published release (scripts/upgrade/snapshot.mjs)."
519
+ },
520
+ "step": {
521
+ "type": "object",
522
+ "properties": {
523
+ "id": {
524
+ "type": "string",
525
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?\\/(?:removed|moved|renamed|folded|deprecated|value-changed|look|behavior|dependency|peer|engines|exports|tenant|manual)\\/\\S+$",
526
+ "description": "Stable id, <version>/<kind>/<subject>: the subject is the export, package, component or variable the step is about."
527
+ },
528
+ "kind": {
529
+ "type": "string",
530
+ "enum": [
531
+ "removed",
532
+ "moved",
533
+ "renamed",
534
+ "folded",
535
+ "deprecated",
536
+ "value-changed",
537
+ "look",
538
+ "behavior",
539
+ "dependency",
540
+ "peer",
541
+ "engines",
542
+ "exports",
543
+ "tenant",
544
+ "manual"
545
+ ],
546
+ "description": "What changed."
547
+ },
548
+ "impact": {
549
+ "type": "string",
550
+ "enum": [
551
+ "none",
552
+ "additive",
553
+ "look",
554
+ "behavior",
555
+ "breaking"
556
+ ],
557
+ "description": "What happens to a consumer that does nothing: none, additive (new, opt-in), look, behavior, or breaking (it stops compiling or running)."
558
+ },
559
+ "plain": {
560
+ "type": "string",
561
+ "minLength": 1,
562
+ "maxLength": 300,
563
+ "pattern": "^[^\\n]+[.]$",
564
+ "description": "One sentence a non-expert can act on, ending in a full stop."
565
+ },
566
+ "auto": {
567
+ "$ref": "#/$defs/auto"
568
+ },
569
+ "detect": {
570
+ "$ref": "#/$defs/detect"
571
+ },
572
+ "done": {
573
+ "description": "How to tell the consumer has already made this change, in the detect shape: when any of it matches, the step is done even where detect matches too. For a step that asks the consumer to add something, such as an import.",
574
+ "$ref": "#/$defs/detect"
575
+ },
576
+ "removeIn": {
577
+ "description": "For a deprecation: the version that removes it.",
578
+ "type": "string",
579
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
580
+ },
581
+ "range": {
582
+ "description": "For a dependency or peer step: the range this package declared before the release, so a consumer that still imports it can add it back.",
583
+ "type": "string",
584
+ "minLength": 1
585
+ },
586
+ "facts": {
587
+ "description": "The ids of the snapshot-diff facts this step accounts for (scripts/upgrade/diff.mjs), such as removed:.:IconButton.",
588
+ "minItems": 1,
589
+ "type": "array",
590
+ "items": {
591
+ "type": "string",
592
+ "minLength": 1
593
+ }
594
+ },
595
+ "backfilled": {
596
+ "description": "True when the step was written from CHANGELOG prose after the release shipped.",
597
+ "type": "boolean"
598
+ },
599
+ "source": {
600
+ "type": "string",
601
+ "minLength": 1,
602
+ "description": "Where the step comes from: CHANGELOG.md:<line> (as of the release), a codemod data file, or the snapshot diff."
603
+ }
604
+ },
605
+ "required": [
606
+ "id",
607
+ "kind",
608
+ "impact",
609
+ "plain",
610
+ "source"
611
+ ],
612
+ "additionalProperties": false,
613
+ "description": "One thing a consumer may have to do, or should know, when crossing this release."
614
+ },
615
+ "upgradeReport": {
616
+ "type": "object",
617
+ "properties": {
618
+ "package": {
619
+ "type": "string",
620
+ "const": "@hirobius/design-system"
621
+ },
622
+ "tool": {
623
+ "type": "string",
624
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
625
+ "description": "The version of the package the command ran from."
626
+ },
627
+ "mode": {
628
+ "type": "string",
629
+ "enum": [
630
+ "apply",
631
+ "dry-run",
632
+ "check"
633
+ ],
634
+ "description": "apply writes; dry-run and --check write nothing."
635
+ },
636
+ "target": {
637
+ "type": "string",
638
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
639
+ "description": "The version upgraded to."
640
+ },
641
+ "floor": {
642
+ "type": "string",
643
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
644
+ "description": "The oldest version the command upgrades from."
645
+ },
646
+ "packageManager": {
647
+ "anyOf": [
648
+ {
649
+ "type": "string",
650
+ "enum": [
651
+ "pnpm",
652
+ "npm",
653
+ "yarn",
654
+ "bun"
655
+ ]
656
+ },
657
+ {
658
+ "type": "null"
659
+ }
660
+ ]
661
+ },
662
+ "lockfile": {
663
+ "anyOf": [
664
+ {
665
+ "type": "string"
666
+ },
667
+ {
668
+ "type": "null"
669
+ }
670
+ ],
671
+ "description": "The lockfile read, by name, or null."
672
+ },
673
+ "importers": {
674
+ "type": "array",
675
+ "items": {
676
+ "type": "object",
677
+ "properties": {
678
+ "dir": {
679
+ "type": "string",
680
+ "minLength": 1,
681
+ "description": ". for the root, else the workspace directory."
682
+ },
683
+ "from": {
684
+ "anyOf": [
685
+ {
686
+ "type": "string",
687
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$",
688
+ "description": "A semver version, such as 0.20.0."
689
+ },
690
+ {
691
+ "type": "null"
692
+ }
693
+ ],
694
+ "description": "The installed version, or null when unknown."
695
+ },
696
+ "source": {
697
+ "type": "string",
698
+ "enum": [
699
+ "lockfile",
700
+ "node_modules",
701
+ "flag",
702
+ "git-head",
703
+ "git-merge-base",
704
+ "git-log",
705
+ "unknown"
706
+ ],
707
+ "description": "Where the installed version was read."
708
+ },
709
+ "range": {
710
+ "type": "string",
711
+ "description": "The range package.json declared."
712
+ },
713
+ "newRange": {
714
+ "anyOf": [
715
+ {
716
+ "type": "string"
717
+ },
718
+ {
719
+ "type": "null"
720
+ }
721
+ ],
722
+ "description": "The range at the target, or null when it cannot be rewritten."
723
+ }
724
+ },
725
+ "required": [
726
+ "dir",
727
+ "from",
728
+ "source",
729
+ "range",
730
+ "newRange"
731
+ ],
732
+ "additionalProperties": false
733
+ },
734
+ "description": "Every importer that declares the package."
735
+ },
736
+ "split": {
737
+ "type": "boolean",
738
+ "description": "True when the importers start from different versions."
739
+ },
740
+ "fixedForYou": {
741
+ "type": "array",
742
+ "items": {
743
+ "type": "object",
744
+ "properties": {
745
+ "id": {
746
+ "type": "string",
747
+ "minLength": 1,
748
+ "description": "The ledger step id (0.21.0/removed/StatusDot), or a tool item: range, tool/two-copies, tool/no-history, tool/range, tool/install, tool/typecheck, tool/not-read, or <codemod>/manual."
749
+ },
750
+ "plain": {
751
+ "type": "string",
752
+ "minLength": 1,
753
+ "description": "What happened or what to do, in one sentence."
754
+ },
755
+ "importers": {
756
+ "type": "array",
757
+ "items": {
758
+ "type": "string"
759
+ },
760
+ "description": "The importers (. or a workspace directory) it applies to."
761
+ },
762
+ "files": {
763
+ "type": "array",
764
+ "items": {
765
+ "type": "string"
766
+ },
767
+ "description": "Where it was found or changed, relative to the project root."
768
+ },
769
+ "removeIn": {
770
+ "description": "For Coming next: the version that removes it.",
771
+ "type": "string",
772
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
773
+ },
774
+ "blocking": {
775
+ "description": "For Do by hand: true while the code still needs an edit (exit 1); false for a behavior change to check, which never blocks.",
776
+ "type": "boolean"
777
+ }
778
+ },
779
+ "required": [
780
+ "id",
781
+ "plain",
782
+ "importers",
783
+ "files"
784
+ ],
785
+ "additionalProperties": false
786
+ }
787
+ },
788
+ "looksDifferent": {
789
+ "type": "array",
790
+ "items": {
791
+ "type": "object",
792
+ "properties": {
793
+ "id": {
794
+ "type": "string",
795
+ "minLength": 1,
796
+ "description": "The ledger step id (0.21.0/removed/StatusDot), or a tool item: range, tool/two-copies, tool/no-history, tool/range, tool/install, tool/typecheck, tool/not-read, or <codemod>/manual."
797
+ },
798
+ "plain": {
799
+ "type": "string",
800
+ "minLength": 1,
801
+ "description": "What happened or what to do, in one sentence."
802
+ },
803
+ "importers": {
804
+ "type": "array",
805
+ "items": {
806
+ "type": "string"
807
+ },
808
+ "description": "The importers (. or a workspace directory) it applies to."
809
+ },
810
+ "files": {
811
+ "type": "array",
812
+ "items": {
813
+ "type": "string"
814
+ },
815
+ "description": "Where it was found or changed, relative to the project root."
816
+ },
817
+ "removeIn": {
818
+ "description": "For Coming next: the version that removes it.",
819
+ "type": "string",
820
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
821
+ },
822
+ "blocking": {
823
+ "description": "For Do by hand: true while the code still needs an edit (exit 1); false for a behavior change to check, which never blocks.",
824
+ "type": "boolean"
825
+ }
826
+ },
827
+ "required": [
828
+ "id",
829
+ "plain",
830
+ "importers",
831
+ "files"
832
+ ],
833
+ "additionalProperties": false
834
+ }
835
+ },
836
+ "comingNext": {
837
+ "type": "array",
838
+ "items": {
839
+ "type": "object",
840
+ "properties": {
841
+ "id": {
842
+ "type": "string",
843
+ "minLength": 1,
844
+ "description": "The ledger step id (0.21.0/removed/StatusDot), or a tool item: range, tool/two-copies, tool/no-history, tool/range, tool/install, tool/typecheck, tool/not-read, or <codemod>/manual."
845
+ },
846
+ "plain": {
847
+ "type": "string",
848
+ "minLength": 1,
849
+ "description": "What happened or what to do, in one sentence."
850
+ },
851
+ "importers": {
852
+ "type": "array",
853
+ "items": {
854
+ "type": "string"
855
+ },
856
+ "description": "The importers (. or a workspace directory) it applies to."
857
+ },
858
+ "files": {
859
+ "type": "array",
860
+ "items": {
861
+ "type": "string"
862
+ },
863
+ "description": "Where it was found or changed, relative to the project root."
864
+ },
865
+ "removeIn": {
866
+ "description": "For Coming next: the version that removes it.",
867
+ "type": "string",
868
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
869
+ },
870
+ "blocking": {
871
+ "description": "For Do by hand: true while the code still needs an edit (exit 1); false for a behavior change to check, which never blocks.",
872
+ "type": "boolean"
873
+ }
874
+ },
875
+ "required": [
876
+ "id",
877
+ "plain",
878
+ "importers",
879
+ "files"
880
+ ],
881
+ "additionalProperties": false
882
+ }
883
+ },
884
+ "doByHand": {
885
+ "type": "array",
886
+ "items": {
887
+ "type": "object",
888
+ "properties": {
889
+ "id": {
890
+ "type": "string",
891
+ "minLength": 1,
892
+ "description": "The ledger step id (0.21.0/removed/StatusDot), or a tool item: range, tool/two-copies, tool/no-history, tool/range, tool/install, tool/typecheck, tool/not-read, or <codemod>/manual."
893
+ },
894
+ "plain": {
895
+ "type": "string",
896
+ "minLength": 1,
897
+ "description": "What happened or what to do, in one sentence."
898
+ },
899
+ "importers": {
900
+ "type": "array",
901
+ "items": {
902
+ "type": "string"
903
+ },
904
+ "description": "The importers (. or a workspace directory) it applies to."
905
+ },
906
+ "files": {
907
+ "type": "array",
908
+ "items": {
909
+ "type": "string"
910
+ },
911
+ "description": "Where it was found or changed, relative to the project root."
912
+ },
913
+ "removeIn": {
914
+ "description": "For Coming next: the version that removes it.",
915
+ "type": "string",
916
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$"
917
+ },
918
+ "blocking": {
919
+ "description": "For Do by hand: true while the code still needs an edit (exit 1); false for a behavior change to check, which never blocks.",
920
+ "type": "boolean"
921
+ }
922
+ },
923
+ "required": [
924
+ "id",
925
+ "plain",
926
+ "importers",
927
+ "files"
928
+ ],
929
+ "additionalProperties": false
930
+ }
931
+ },
932
+ "changedFiles": {
933
+ "type": "array",
934
+ "items": {
935
+ "type": "string"
936
+ },
937
+ "description": "Files written, relative to the project root."
938
+ },
939
+ "refused": {
940
+ "anyOf": [
941
+ {
942
+ "type": "string"
943
+ },
944
+ {
945
+ "type": "null"
946
+ }
947
+ ],
948
+ "description": "Why the command refused (exit 2), having changed nothing; null otherwise."
949
+ },
950
+ "exitCode": {
951
+ "anyOf": [
952
+ {
953
+ "type": "number",
954
+ "const": 0
955
+ },
956
+ {
957
+ "type": "number",
958
+ "const": 1
959
+ },
960
+ {
961
+ "type": "number",
962
+ "const": 2
963
+ }
964
+ ]
965
+ }
966
+ },
967
+ "required": [
968
+ "package",
969
+ "tool",
970
+ "mode",
971
+ "target",
972
+ "floor",
973
+ "packageManager",
974
+ "lockfile",
975
+ "importers",
976
+ "split",
977
+ "fixedForYou",
978
+ "looksDifferent",
979
+ "comingNext",
980
+ "doByHand",
981
+ "changedFiles",
982
+ "refused",
983
+ "exitCode"
984
+ ],
985
+ "additionalProperties": false,
986
+ "description": "What `npx @hirobius/design-system upgrade --json` prints (hds#452): the four lists, per importer versions, and the exit code."
987
+ }
988
+ }
989
+ }