@hirobius/design-system 0.21.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.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +969 -0
- package/CONSUMING.md +23 -9
- package/MIGRATIONS.md +603 -0
- package/README.md +2 -0
- package/UPGRADING.md +222 -0
- package/codemods/hds-prefix.mjs +28 -13
- package/codemods/jsx-fold.mjs +28 -13
- package/codemods/lib/atomic-write.mjs +28 -0
- package/codemods/lib/installed-version.mjs +354 -0
- package/codemods/lib/project.mjs +395 -0
- package/codemods/lib/record.mjs +110 -0
- package/codemods/lib/scan.mjs +323 -0
- package/codemods/lib/semver.mjs +57 -0
- package/codemods/not-found-pattern.mjs +3 -3
- package/codemods/patterns-subpath.mjs +28 -12
- package/codemods/registry.mjs +67 -0
- package/codemods/tile-grid.mjs +3 -3
- package/codemods/upgrade.mjs +909 -0
- package/dist/hirobius-ui.js +1 -1
- package/dist/manifest.js +3 -3
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -1
- package/dist/types/src/app/components/alert-dialog.d.ts +1 -1
- package/dist/types/src/app/components/alert.d.ts +1 -1
- package/dist/types/src/app/components/asset-img.d.ts +1 -1
- package/dist/types/src/app/components/avatar-group.d.ts +1 -1
- package/dist/types/src/app/components/avatar.d.ts +1 -1
- package/dist/types/src/app/components/badge.d.ts +1 -1
- package/dist/types/src/app/components/blockquote.d.ts +1 -1
- package/dist/types/src/app/components/breadcrumb.d.ts +1 -1
- package/dist/types/src/app/components/button.d.ts +1 -1
- package/dist/types/src/app/components/callout.d.ts +1 -1
- package/dist/types/src/app/components/card.d.ts +1 -1
- package/dist/types/src/app/components/checkbox.d.ts +1 -1
- package/dist/types/src/app/components/code-block.d.ts +1 -1
- package/dist/types/src/app/components/combobox.d.ts +1 -1
- package/dist/types/src/app/components/data-table-section.d.ts +1 -1
- package/dist/types/src/app/components/destructive-section.d.ts +1 -1
- package/dist/types/src/app/components/dialog.d.ts +1 -1
- package/dist/types/src/app/components/disclosure.d.ts +1 -1
- package/dist/types/src/app/components/divider.d.ts +1 -1
- package/dist/types/src/app/components/empty-state.d.ts +1 -1
- package/dist/types/src/app/components/field.d.ts +1 -1
- package/dist/types/src/app/components/form-actions.d.ts +1 -1
- package/dist/types/src/app/components/form.d.ts +1 -1
- package/dist/types/src/app/components/hds-tooltip.d.ts +1 -1
- package/dist/types/src/app/components/icon.d.ts +1 -1
- package/dist/types/src/app/components/inline-link.d.ts +1 -1
- package/dist/types/src/app/components/input.d.ts +1 -1
- package/dist/types/src/app/components/kbd.d.ts +1 -1
- package/dist/types/src/app/components/menu.d.ts +1 -1
- package/dist/types/src/app/components/metadata-list.d.ts +1 -1
- package/dist/types/src/app/components/metric-tiles.d.ts +1 -1
- package/dist/types/src/app/components/pagination.d.ts +1 -1
- package/dist/types/src/app/components/popover.d.ts +1 -1
- package/dist/types/src/app/components/progress.d.ts +1 -1
- package/dist/types/src/app/components/radio.d.ts +1 -1
- package/dist/types/src/app/components/select.d.ts +1 -1
- package/dist/types/src/app/components/skeleton.d.ts +1 -1
- package/dist/types/src/app/components/slider.d.ts +1 -1
- package/dist/types/src/app/components/spinner.d.ts +1 -1
- package/dist/types/src/app/components/stat.d.ts +1 -1
- package/dist/types/src/app/components/status-list-item.d.ts +1 -1
- package/dist/types/src/app/components/status-tile.d.ts +1 -1
- package/dist/types/src/app/components/table.d.ts +1 -1
- package/dist/types/src/app/components/tabs.d.ts +1 -1
- package/dist/types/src/app/components/tag.d.ts +1 -1
- package/dist/types/src/app/components/text.d.ts +1 -1
- package/dist/types/src/app/components/textarea.d.ts +1 -1
- package/dist/types/src/app/components/timestamp.d.ts +1 -1
- package/dist/types/src/app/components/toast.d.ts +1 -1
- package/dist/types/src/app/components/toggle.d.ts +1 -1
- package/dist/types/src/index.d.ts +79 -32
- package/hirobius.tokens.json +86 -39
- package/mcp/catalog.mjs +10 -7
- package/mcp/core-set.mjs +66 -0
- package/mcp/guide.mjs +9 -52
- package/package.json +23 -7
- package/public/hds-manifest.json +109 -109
- package/src/app/data/component-api.json +54 -54
- package/upgrade/index.json +208 -0
- package/upgrade/releases/0.17.0.json +962 -0
- package/upgrade/releases/0.18.0.json +8 -0
- package/upgrade/releases/0.19.0.json +233 -0
- package/upgrade/releases/0.19.1.json +8 -0
- package/upgrade/releases/0.20.0.json +5108 -0
- package/upgrade/releases/0.21.0.json +538 -0
- package/upgrade/releases/0.22.0.json +94 -0
- package/upgrade/schema.json +989 -0
|
@@ -726,14 +726,20 @@ export declare const tokens: {
|
|
|
726
726
|
$description: string;
|
|
727
727
|
};
|
|
728
728
|
elastic: {
|
|
729
|
-
$
|
|
730
|
-
$value: {
|
|
731
|
-
type: string;
|
|
732
|
-
stiffness: number;
|
|
733
|
-
damping: number;
|
|
734
|
-
mass: number;
|
|
735
|
-
};
|
|
729
|
+
$value: number[];
|
|
736
730
|
$description: string;
|
|
731
|
+
$extensions: {
|
|
732
|
+
"com.hirobius.hds": {
|
|
733
|
+
$type: string;
|
|
734
|
+
$value: {
|
|
735
|
+
type: string;
|
|
736
|
+
stiffness: number;
|
|
737
|
+
damping: number;
|
|
738
|
+
mass: number;
|
|
739
|
+
};
|
|
740
|
+
bezierSource: string;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
737
743
|
};
|
|
738
744
|
};
|
|
739
745
|
shadow: {
|
|
@@ -1014,31 +1020,52 @@ export declare const tokens: {
|
|
|
1014
1020
|
semantic: {
|
|
1015
1021
|
motion: {
|
|
1016
1022
|
$type: string;
|
|
1023
|
+
$extensions: {
|
|
1024
|
+
"com.hirobius.hds": {
|
|
1025
|
+
$type: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1017
1028
|
productive: {
|
|
1018
1029
|
$value: {
|
|
1019
1030
|
duration: string;
|
|
1020
|
-
|
|
1031
|
+
delay: {
|
|
1032
|
+
value: number;
|
|
1033
|
+
unit: string;
|
|
1034
|
+
};
|
|
1035
|
+
timingFunction: string;
|
|
1021
1036
|
};
|
|
1022
1037
|
$description: string;
|
|
1023
1038
|
};
|
|
1024
1039
|
expressive: {
|
|
1025
1040
|
$value: {
|
|
1026
1041
|
duration: string;
|
|
1027
|
-
|
|
1042
|
+
delay: {
|
|
1043
|
+
value: number;
|
|
1044
|
+
unit: string;
|
|
1045
|
+
};
|
|
1046
|
+
timingFunction: string;
|
|
1028
1047
|
};
|
|
1029
1048
|
$description: string;
|
|
1030
1049
|
};
|
|
1031
1050
|
spatial: {
|
|
1032
1051
|
$value: {
|
|
1033
1052
|
duration: string;
|
|
1034
|
-
|
|
1053
|
+
delay: {
|
|
1054
|
+
value: number;
|
|
1055
|
+
unit: string;
|
|
1056
|
+
};
|
|
1057
|
+
timingFunction: string;
|
|
1035
1058
|
};
|
|
1036
1059
|
$description: string;
|
|
1037
1060
|
};
|
|
1038
1061
|
exit: {
|
|
1039
1062
|
$value: {
|
|
1040
1063
|
duration: string;
|
|
1041
|
-
|
|
1064
|
+
delay: {
|
|
1065
|
+
value: number;
|
|
1066
|
+
unit: string;
|
|
1067
|
+
};
|
|
1068
|
+
timingFunction: string;
|
|
1042
1069
|
};
|
|
1043
1070
|
$description: string;
|
|
1044
1071
|
};
|
|
@@ -2015,38 +2042,58 @@ export declare const tokens: {
|
|
|
2015
2042
|
};
|
|
2016
2043
|
};
|
|
2017
2044
|
elevation: {
|
|
2018
|
-
$
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
surface: string;
|
|
2022
|
-
shadow: null;
|
|
2023
|
-
border: string;
|
|
2045
|
+
$extensions: {
|
|
2046
|
+
"com.hirobius.hds": {
|
|
2047
|
+
$type: string;
|
|
2024
2048
|
};
|
|
2049
|
+
};
|
|
2050
|
+
flat: {
|
|
2025
2051
|
$description: string;
|
|
2052
|
+
$extensions: {
|
|
2053
|
+
"com.hirobius.hds": {
|
|
2054
|
+
$value: {
|
|
2055
|
+
surface: string;
|
|
2056
|
+
shadow: null;
|
|
2057
|
+
border: string;
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2026
2061
|
};
|
|
2027
2062
|
raised: {
|
|
2028
|
-
$value: {
|
|
2029
|
-
surface: string;
|
|
2030
|
-
shadow: string;
|
|
2031
|
-
border: null;
|
|
2032
|
-
};
|
|
2033
2063
|
$description: string;
|
|
2064
|
+
$extensions: {
|
|
2065
|
+
"com.hirobius.hds": {
|
|
2066
|
+
$value: {
|
|
2067
|
+
surface: string;
|
|
2068
|
+
shadow: string;
|
|
2069
|
+
border: null;
|
|
2070
|
+
};
|
|
2071
|
+
};
|
|
2072
|
+
};
|
|
2034
2073
|
};
|
|
2035
2074
|
floating: {
|
|
2036
|
-
$value: {
|
|
2037
|
-
surface: string;
|
|
2038
|
-
shadow: string;
|
|
2039
|
-
border: null;
|
|
2040
|
-
};
|
|
2041
2075
|
$description: string;
|
|
2076
|
+
$extensions: {
|
|
2077
|
+
"com.hirobius.hds": {
|
|
2078
|
+
$value: {
|
|
2079
|
+
surface: string;
|
|
2080
|
+
shadow: string;
|
|
2081
|
+
border: null;
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
};
|
|
2042
2085
|
};
|
|
2043
2086
|
overlay: {
|
|
2044
|
-
$value: {
|
|
2045
|
-
surface: string;
|
|
2046
|
-
shadow: string;
|
|
2047
|
-
border: null;
|
|
2048
|
-
};
|
|
2049
2087
|
$description: string;
|
|
2088
|
+
$extensions: {
|
|
2089
|
+
"com.hirobius.hds": {
|
|
2090
|
+
$value: {
|
|
2091
|
+
surface: string;
|
|
2092
|
+
shadow: string;
|
|
2093
|
+
border: null;
|
|
2094
|
+
};
|
|
2095
|
+
};
|
|
2096
|
+
};
|
|
2050
2097
|
};
|
|
2051
2098
|
};
|
|
2052
2099
|
size: {
|
package/hirobius.tokens.json
CHANGED
|
@@ -685,14 +685,20 @@
|
|
|
685
685
|
"$description": "Cubic bezier with restrained initial gain and steep terminal velocity."
|
|
686
686
|
},
|
|
687
687
|
"elastic": {
|
|
688
|
-
"$
|
|
689
|
-
"$
|
|
690
|
-
|
|
691
|
-
"
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
688
|
+
"$value": [0.34, 1.56, 0.64, 1],
|
|
689
|
+
"$description": "Spring response defined by stiffness, damping, and mass parameters.",
|
|
690
|
+
"$extensions": {
|
|
691
|
+
"com.hirobius.hds": {
|
|
692
|
+
"$type": "spring",
|
|
693
|
+
"$value": {
|
|
694
|
+
"type": "spring",
|
|
695
|
+
"stiffness": 300,
|
|
696
|
+
"damping": 20,
|
|
697
|
+
"mass": 1
|
|
698
|
+
},
|
|
699
|
+
"bezierSource": "The cubicBezier is easeOutBack (easings.net), chosen as a stand-in for the spring, not fitted to it: both overshoot once, the curve by about 10% and spring(300, 20, 1) by about 11%."
|
|
700
|
+
}
|
|
701
|
+
}
|
|
696
702
|
}
|
|
697
703
|
},
|
|
698
704
|
"shadow": {
|
|
@@ -972,32 +978,53 @@
|
|
|
972
978
|
},
|
|
973
979
|
"semantic": {
|
|
974
980
|
"motion": {
|
|
975
|
-
"$type": "
|
|
981
|
+
"$type": "transition",
|
|
982
|
+
"$extensions": {
|
|
983
|
+
"com.hirobius.hds": {
|
|
984
|
+
"$type": "motion"
|
|
985
|
+
}
|
|
986
|
+
},
|
|
976
987
|
"productive": {
|
|
977
988
|
"$value": {
|
|
978
989
|
"duration": "{primitive.duration.short}",
|
|
979
|
-
"
|
|
990
|
+
"delay": {
|
|
991
|
+
"value": 0,
|
|
992
|
+
"unit": "ms"
|
|
993
|
+
},
|
|
994
|
+
"timingFunction": "{primitive.easing.decelerate}"
|
|
980
995
|
},
|
|
981
996
|
"$description": "For micro-interactions and status changes. No deformation."
|
|
982
997
|
},
|
|
983
998
|
"expressive": {
|
|
984
999
|
"$value": {
|
|
985
1000
|
"duration": "{primitive.duration.medium}",
|
|
986
|
-
"
|
|
1001
|
+
"delay": {
|
|
1002
|
+
"value": 0,
|
|
1003
|
+
"unit": "ms"
|
|
1004
|
+
},
|
|
1005
|
+
"timingFunction": "{primitive.easing.elastic}"
|
|
987
1006
|
},
|
|
988
1007
|
"$description": "For teaching moments and significant UI entries. Includes physics-based squish."
|
|
989
1008
|
},
|
|
990
1009
|
"spatial": {
|
|
991
1010
|
"$value": {
|
|
992
1011
|
"duration": "{primitive.duration.long}",
|
|
993
|
-
"
|
|
1012
|
+
"delay": {
|
|
1013
|
+
"value": 0,
|
|
1014
|
+
"unit": "ms"
|
|
1015
|
+
},
|
|
1016
|
+
"timingFunction": "{primitive.easing.emphasized}"
|
|
994
1017
|
},
|
|
995
1018
|
"$description": "For elements traveling long distances across the viewport."
|
|
996
1019
|
},
|
|
997
1020
|
"exit": {
|
|
998
1021
|
"$value": {
|
|
999
1022
|
"duration": "{primitive.duration.instant}",
|
|
1000
|
-
"
|
|
1023
|
+
"delay": {
|
|
1024
|
+
"value": 0,
|
|
1025
|
+
"unit": "ms"
|
|
1026
|
+
},
|
|
1027
|
+
"timingFunction": "{primitive.easing.accelerate}"
|
|
1001
1028
|
},
|
|
1002
1029
|
"$description": "For elements being removed from the DOM."
|
|
1003
1030
|
},
|
|
@@ -1974,38 +2001,58 @@
|
|
|
1974
2001
|
}
|
|
1975
2002
|
},
|
|
1976
2003
|
"elevation": {
|
|
1977
|
-
"$
|
|
2004
|
+
"$extensions": {
|
|
2005
|
+
"com.hirobius.hds": {
|
|
2006
|
+
"$type": "elevation"
|
|
2007
|
+
}
|
|
2008
|
+
},
|
|
1978
2009
|
"flat": {
|
|
1979
|
-
"$
|
|
1980
|
-
|
|
1981
|
-
"
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2010
|
+
"$description": "Flat surface (no shadow, hairline border) for embedded panels.",
|
|
2011
|
+
"$extensions": {
|
|
2012
|
+
"com.hirobius.hds": {
|
|
2013
|
+
"$value": {
|
|
2014
|
+
"surface": "{semantic.color.surface.page}",
|
|
2015
|
+
"shadow": null,
|
|
2016
|
+
"border": "{semantic.color.border.subtle}"
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
1985
2020
|
},
|
|
1986
2021
|
"raised": {
|
|
1987
|
-
"$
|
|
1988
|
-
|
|
1989
|
-
"
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2022
|
+
"$description": "Resting card / panel elevation.",
|
|
2023
|
+
"$extensions": {
|
|
2024
|
+
"com.hirobius.hds": {
|
|
2025
|
+
"$value": {
|
|
2026
|
+
"surface": "{semantic.color.surface.raised}",
|
|
2027
|
+
"shadow": "{semantic.shadow.subtle}",
|
|
2028
|
+
"border": null
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
1993
2032
|
},
|
|
1994
2033
|
"floating": {
|
|
1995
|
-
"$
|
|
1996
|
-
|
|
1997
|
-
"
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2034
|
+
"$description": "Hover, menu, and popover elevation.",
|
|
2035
|
+
"$extensions": {
|
|
2036
|
+
"com.hirobius.hds": {
|
|
2037
|
+
"$value": {
|
|
2038
|
+
"surface": "{semantic.color.surface.raised}",
|
|
2039
|
+
"shadow": "{semantic.shadow.floating}",
|
|
2040
|
+
"border": null
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2001
2044
|
},
|
|
2002
2045
|
"overlay": {
|
|
2003
|
-
"$
|
|
2004
|
-
|
|
2005
|
-
"
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2046
|
+
"$description": "Modal, dialog, and drawer elevation.",
|
|
2047
|
+
"$extensions": {
|
|
2048
|
+
"com.hirobius.hds": {
|
|
2049
|
+
"$value": {
|
|
2050
|
+
"surface": "{semantic.color.surface.overlay}",
|
|
2051
|
+
"shadow": "{semantic.shadow.overlay}",
|
|
2052
|
+
"border": null
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2009
2056
|
}
|
|
2010
2057
|
},
|
|
2011
2058
|
"size": {
|
|
@@ -2149,7 +2196,7 @@
|
|
|
2149
2196
|
"$description": "Tag label weight."
|
|
2150
2197
|
},
|
|
2151
2198
|
"lineHeight": {
|
|
2152
|
-
"$type": "
|
|
2199
|
+
"$type": "number",
|
|
2153
2200
|
"$value": "{primitive.typography.lineHeight.normal}",
|
|
2154
2201
|
"$description": "Readable label rhythm for tags."
|
|
2155
2202
|
},
|
package/mcp/catalog.mjs
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { readFileSync } from 'node:fs';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
|
-
import {
|
|
19
|
+
import { CORE_COMPONENTS } from './core-set.mjs';
|
|
20
|
+
import { HOOKS, INTENTS, recommendedComponents } from './guide.mjs';
|
|
20
21
|
|
|
21
22
|
export const RESULT_BUDGET = 1900;
|
|
22
23
|
|
|
@@ -75,7 +76,7 @@ export function loadCatalog(root) {
|
|
|
75
76
|
|
|
76
77
|
/**
|
|
77
78
|
* The flags both search_components and get_component put on a component:
|
|
78
|
-
* `core`
|
|
79
|
+
* `core` for the ratified core set, `recommended` for the rest of what the guide prefers, `insteadFor` for each need it is the
|
|
79
80
|
* wrong answer to (the guide names `use` instead).
|
|
80
81
|
*/
|
|
81
82
|
const steer = (name) => {
|
|
@@ -84,11 +85,12 @@ export function loadCatalog(root) {
|
|
|
84
85
|
use: i.use[0],
|
|
85
86
|
}));
|
|
86
87
|
return {
|
|
87
|
-
...(
|
|
88
|
+
...(ratified.has(name) ? { core: true } : recommended.has(name) ? { recommended: true } : {}),
|
|
88
89
|
...(insteadFor.length ? { insteadFor } : {}),
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
|
-
const
|
|
92
|
+
const ratified = new Set(CORE_COMPONENTS);
|
|
93
|
+
const recommended = new Set(recommendedComponents());
|
|
92
94
|
const components = Object.keys(api)
|
|
93
95
|
.filter((name) => !api[name].hidden)
|
|
94
96
|
.sort();
|
|
@@ -126,14 +128,14 @@ export function loadCatalog(root) {
|
|
|
126
128
|
for (const name of components) {
|
|
127
129
|
const lower = name.toLowerCase();
|
|
128
130
|
if (lower === compact) add(name, 100);
|
|
129
|
-
else if (partAliases.has(name) && !
|
|
131
|
+
else if (partAliases.has(name) && !recommended.has(name)) continue;
|
|
130
132
|
else if (qWords.some((w) => w.length > 2 && (lower.includes(w) || w.includes(lower))))
|
|
131
133
|
add(name, 20);
|
|
132
134
|
const entry = api[name];
|
|
133
135
|
const text = words(`${entry.description} ${entry.usage?.when ?? ''}`);
|
|
134
136
|
add(name, 2 * qWords.filter((w) => text.includes(w)).length);
|
|
135
137
|
if (scores.get(name) > 0) {
|
|
136
|
-
if (
|
|
138
|
+
if (recommended.has(name)) add(name, 1);
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
const ranked = components
|
|
@@ -289,11 +291,12 @@ export function loadCatalog(root) {
|
|
|
289
291
|
|
|
290
292
|
// ── list_core ───────────────────────────────────────────────────────────
|
|
291
293
|
function listCore() {
|
|
292
|
-
const names = [...
|
|
294
|
+
const names = [...recommended].filter((n) => api[n]);
|
|
293
295
|
// `id → use`: short enough that every need fits; search_components takes the id.
|
|
294
296
|
const needs = INTENTS.map((i) => `${i.id} → ${i.use.join(', ')}`);
|
|
295
297
|
// Needs are ordered most common first; what does not fit is one search_components away.
|
|
296
298
|
return fitList(needs, (shown, dropped) => ({
|
|
299
|
+
set: 'recommended: the ratified core plus what the needs name',
|
|
297
300
|
root: names.filter((n) => !patternNames.has(n)),
|
|
298
301
|
patterns: names.filter((n) => patternNames.has(n)),
|
|
299
302
|
hooks: Object.keys(HOOKS),
|
package/mcp/core-set.mjs
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `core` rows of the hds#254 right-sizing table in
|
|
3
|
+
* docs/hds-architecture-2026-09-18.html (ratified 2026-09-26, #297), with the
|
|
4
|
+
* hds#315 renames applied: HdsCheckbox → Checkbox, HdsRadio → Radio,
|
|
5
|
+
* HdsSelect → Select, HdsSlider → Slider, HdsToggle → Toggle. The table has 42
|
|
6
|
+
* rows; ButtonGroup, ContextMenu and HoverCard were removed from the package in
|
|
7
|
+
* 0.20.0 (hds#394), which leaves 39. hds#393 adds Menu, Popover, Tooltip and
|
|
8
|
+
* HdsRouterProvider, each with a usage contract (and Menu, Popover and Tooltip
|
|
9
|
+
* a keyboard contract), which makes 43.
|
|
10
|
+
*
|
|
11
|
+
* THE ONLY FILE THAT LISTS THE CORE SET. It lives in mcp/ because mcp/ ships in
|
|
12
|
+
* the package and scripts/ does not; scripts/lib/core-components.mjs re-exports it,
|
|
13
|
+
* mcp/guide.mjs builds the recommended set on it, and the manifest `core` flag,
|
|
14
|
+
* llms.txt, SKILL.md and the README are generated from it
|
|
15
|
+
* (scripts/__tests__/core-set-sources.test.mjs fails on any disagreement).
|
|
16
|
+
*
|
|
17
|
+
* This is not the manifest `tier` field: 5 core components are `tier: pattern`
|
|
18
|
+
* and most `tier: primitive` components are not core. Read by
|
|
19
|
+
* scripts/check-contract-coverage.mjs.
|
|
20
|
+
*/
|
|
21
|
+
export const CORE_COMPONENTS = [
|
|
22
|
+
'Combobox',
|
|
23
|
+
'Checkbox',
|
|
24
|
+
'Radio',
|
|
25
|
+
'Select',
|
|
26
|
+
'Slider',
|
|
27
|
+
'Toggle',
|
|
28
|
+
'Input',
|
|
29
|
+
'SegmentedControl',
|
|
30
|
+
'Tag',
|
|
31
|
+
'Textarea',
|
|
32
|
+
'Box',
|
|
33
|
+
'Container',
|
|
34
|
+
'Disclosure',
|
|
35
|
+
'Divider',
|
|
36
|
+
'Grid',
|
|
37
|
+
'Stack',
|
|
38
|
+
'Surface',
|
|
39
|
+
'Avatar',
|
|
40
|
+
'Card',
|
|
41
|
+
'EmptyState',
|
|
42
|
+
'Field',
|
|
43
|
+
'Icon',
|
|
44
|
+
'Kbd',
|
|
45
|
+
'Table',
|
|
46
|
+
'Breadcrumb',
|
|
47
|
+
'InlineLink',
|
|
48
|
+
'Pagination',
|
|
49
|
+
'Tabs',
|
|
50
|
+
'Alert',
|
|
51
|
+
'Badge',
|
|
52
|
+
'Progress',
|
|
53
|
+
'Skeleton',
|
|
54
|
+
'Spinner',
|
|
55
|
+
'ToastProvider',
|
|
56
|
+
'Button',
|
|
57
|
+
'Dialog',
|
|
58
|
+
'Text',
|
|
59
|
+
'HdsThemeProvider',
|
|
60
|
+
'VisuallyHidden',
|
|
61
|
+
// hds#393 step 7
|
|
62
|
+
'Menu',
|
|
63
|
+
'Popover',
|
|
64
|
+
'Tooltip',
|
|
65
|
+
'HdsRouterProvider',
|
|
66
|
+
];
|
package/mcp/guide.mjs
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* scripts/__tests__/generate-agents-md.test.mjs enforces it.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { CORE_COMPONENTS } from './core-set.mjs';
|
|
17
|
+
|
|
16
18
|
/** Hooks are not components, so component-api.json has no entry for them. */
|
|
17
19
|
export const HOOKS = {
|
|
18
20
|
useToast: {
|
|
@@ -257,59 +259,14 @@ export const INTENTS = [
|
|
|
257
259
|
];
|
|
258
260
|
|
|
259
261
|
/**
|
|
260
|
-
* The ratified core
|
|
261
|
-
*
|
|
262
|
-
*
|
|
262
|
+
* The recommended set: the ratified core (mcp/core-set.mjs, hds#254) plus every
|
|
263
|
+
* component a need above names, hooks excluded. This is a different set from the
|
|
264
|
+
* ratified core: it adds the patterns and layout parts the guide steers agents to
|
|
265
|
+
* (Page, MetricTiles, ...). list_core and AGENTS.md show this one and say so; the
|
|
266
|
+
* manifest `core` flag, llms.txt and SKILL.md show the ratified core.
|
|
263
267
|
*/
|
|
264
|
-
export
|
|
265
|
-
|
|
266
|
-
'Avatar',
|
|
267
|
-
'Badge',
|
|
268
|
-
'Box',
|
|
269
|
-
'Breadcrumb',
|
|
270
|
-
'Button',
|
|
271
|
-
'Card',
|
|
272
|
-
'Checkbox',
|
|
273
|
-
'Combobox',
|
|
274
|
-
'Container',
|
|
275
|
-
'Dialog',
|
|
276
|
-
'Disclosure',
|
|
277
|
-
'Divider',
|
|
278
|
-
'EmptyState',
|
|
279
|
-
'Field',
|
|
280
|
-
'Grid',
|
|
281
|
-
'HdsRouterProvider',
|
|
282
|
-
'HdsThemeProvider',
|
|
283
|
-
'Icon',
|
|
284
|
-
'InlineLink',
|
|
285
|
-
'Input',
|
|
286
|
-
'Kbd',
|
|
287
|
-
'Menu',
|
|
288
|
-
'Pagination',
|
|
289
|
-
'Popover',
|
|
290
|
-
'Progress',
|
|
291
|
-
'Radio',
|
|
292
|
-
'SegmentedControl',
|
|
293
|
-
'Select',
|
|
294
|
-
'Skeleton',
|
|
295
|
-
'Slider',
|
|
296
|
-
'Spinner',
|
|
297
|
-
'Stack',
|
|
298
|
-
'Surface',
|
|
299
|
-
'Table',
|
|
300
|
-
'Tabs',
|
|
301
|
-
'Tag',
|
|
302
|
-
'Text',
|
|
303
|
-
'Textarea',
|
|
304
|
-
'ToastProvider',
|
|
305
|
-
'Toggle',
|
|
306
|
-
'Tooltip',
|
|
307
|
-
'VisuallyHidden',
|
|
308
|
-
];
|
|
309
|
-
|
|
310
|
-
/** The core set agents should prefer: the ratified core plus every `use` above, hooks excluded. */
|
|
311
|
-
export function coreComponents() {
|
|
312
|
-
const names = new Set(RATIFIED_CORE);
|
|
268
|
+
export function recommendedComponents() {
|
|
269
|
+
const names = new Set(CORE_COMPONENTS);
|
|
313
270
|
for (const intent of INTENTS) for (const name of intent.use) if (!HOOKS[name]) names.add(name);
|
|
314
271
|
return [...names].sort();
|
|
315
272
|
}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "Adrian Milsap",
|
|
21
21
|
"license": "SEE LICENSE IN NOTICE.md",
|
|
22
22
|
"private": false,
|
|
23
|
-
"version": "0.
|
|
23
|
+
"version": "0.22.0",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20",
|
|
26
26
|
"pnpm": ">=8"
|
|
@@ -110,6 +110,12 @@
|
|
|
110
110
|
"DESIGN.md",
|
|
111
111
|
"CONSUMING.md",
|
|
112
112
|
"docs/CONSUMING.md",
|
|
113
|
+
"UPGRADING.md",
|
|
114
|
+
"MIGRATIONS.md",
|
|
115
|
+
"CHANGELOG.md",
|
|
116
|
+
"upgrade/schema.json",
|
|
117
|
+
"upgrade/index.json",
|
|
118
|
+
"upgrade/releases/",
|
|
113
119
|
"src/app/data/component-api.json",
|
|
114
120
|
"codemods/patterns-subpath.mjs",
|
|
115
121
|
"codemods/patterns-subpath.names.json",
|
|
@@ -119,6 +125,14 @@
|
|
|
119
125
|
"codemods/jsx-fold.mjs",
|
|
120
126
|
"codemods/not-found-pattern.mjs",
|
|
121
127
|
"codemods/tile-grid.mjs",
|
|
128
|
+
"codemods/upgrade.mjs",
|
|
129
|
+
"codemods/registry.mjs",
|
|
130
|
+
"codemods/lib/atomic-write.mjs",
|
|
131
|
+
"codemods/lib/installed-version.mjs",
|
|
132
|
+
"codemods/lib/project.mjs",
|
|
133
|
+
"codemods/lib/record.mjs",
|
|
134
|
+
"codemods/lib/scan.mjs",
|
|
135
|
+
"codemods/lib/semver.mjs",
|
|
122
136
|
"AGENTS.md",
|
|
123
137
|
"mcp/",
|
|
124
138
|
"scripts/eslint-plugin-hds/index.mjs",
|
|
@@ -254,7 +268,9 @@
|
|
|
254
268
|
"hds-prefix": "codemods/hds-prefix.mjs",
|
|
255
269
|
"hds-not-found-pattern": "codemods/not-found-pattern.mjs",
|
|
256
270
|
"hds-tile-grid": "codemods/tile-grid.mjs",
|
|
257
|
-
"hds-mcp": "mcp/hds-mcp.mjs"
|
|
271
|
+
"hds-mcp": "mcp/hds-mcp.mjs",
|
|
272
|
+
"design-system": "codemods/upgrade.mjs",
|
|
273
|
+
"hds-upgrade": "codemods/upgrade.mjs"
|
|
258
274
|
},
|
|
259
275
|
"scripts": {
|
|
260
276
|
"_comment:a11y-high-value": "The following check:* validators are high-value accessibility checks that catch real violations (check:focus found 1 missing focus class). Kept dormant/manual-only to avoid pre-commit performance regression. Candidates to wire into pretest after CI stability review.",
|
|
@@ -276,7 +292,7 @@
|
|
|
276
292
|
"changelog:generate": "node scripts/generate-changelog.mjs",
|
|
277
293
|
"changeset": "changeset",
|
|
278
294
|
"changeset:add": "changeset",
|
|
279
|
-
"changeset:version": "changeset version && node scripts/audit-component-integrity.mjs --api --update-baseline",
|
|
295
|
+
"changeset:version": "changeset version && node scripts/upgrade/compile.mjs --release && node scripts/audit-component-integrity.mjs --api --update-baseline",
|
|
280
296
|
"check": "pnpm check:full",
|
|
281
297
|
"check:a11y": "pnpm lint --rule '{\"jsx-a11y/alt-text\":\"error\",\"jsx-a11y/img-redundant-alt\":\"error\"}'",
|
|
282
298
|
"check:attributions": "node scripts/check-attributions.mjs",
|
|
@@ -297,7 +313,7 @@
|
|
|
297
313
|
"check:figma-coverage": "node scripts/check-figma-coverage.mjs",
|
|
298
314
|
"check:figma-drift": "node scripts/check-figma-drift.mjs",
|
|
299
315
|
"check:figma-mapping": "node scripts/check-figma-mapping.mjs",
|
|
300
|
-
"check:figma-
|
|
316
|
+
"check:figma-retired-keys": "node scripts/check-figma-retired-keys.mjs",
|
|
301
317
|
"check:focus": "node scripts/check-focus-states.mjs",
|
|
302
318
|
"check:font-files": "node scripts/check-typography-discipline.mjs --font-files-only",
|
|
303
319
|
"check:fonts": "node scripts/check-typography-discipline.mjs --fonts-only",
|
|
@@ -374,7 +390,6 @@
|
|
|
374
390
|
"figma:native-import": "node scripts/build-figma-native-import.mjs",
|
|
375
391
|
"figma:push": "node scripts/figma-push.mjs",
|
|
376
392
|
"figma:snapshot": "node scripts/figma-snapshot.mjs",
|
|
377
|
-
"figma:staging-inventory": "node scripts/generate-staging-inventory.mjs",
|
|
378
393
|
"guardrail:sweep": "node scripts/guardrail-sweep.mjs",
|
|
379
394
|
"harvest:design-md": "node scripts/harvest-design-md.mjs",
|
|
380
395
|
"hds:new": "node scripts/scaffold-component.mjs",
|
|
@@ -393,7 +408,7 @@
|
|
|
393
408
|
"prebuild-storybook": "node scripts/generate-component-api.mjs",
|
|
394
409
|
"prebuild:lib": "node scripts/generate-component-api.mjs",
|
|
395
410
|
"prestorybook": "node scripts/generate-component-api.mjs",
|
|
396
|
-
"pretest": "node scripts/validate-manifest.mjs && node scripts/check-manifest-drift.mjs && node scripts/check-manifest-schema-semver.mjs && node scripts/audit-component-integrity.mjs --completeness && node scripts/audit-component-integrity.mjs --api && node scripts/check-source-canon.mjs && node scripts/check-binding-drift.mjs && node scripts/check-registry.mjs && node scripts/check-tenant-tokens.mjs && node scripts/check-props-exports.mjs && knip --no-exit-code && node scripts/check-dark-alias-flip.mjs && node scripts/check-focus-states.mjs && node scripts/generate-
|
|
411
|
+
"pretest": "node scripts/validate-manifest.mjs && node scripts/check-manifest-drift.mjs && node scripts/check-manifest-schema-semver.mjs && node scripts/audit-component-integrity.mjs --completeness && node scripts/audit-component-integrity.mjs --api && node scripts/check-source-canon.mjs && node scripts/check-binding-drift.mjs && node scripts/check-registry.mjs && node scripts/check-tenant-tokens.mjs && node scripts/check-props-exports.mjs && knip --no-exit-code && node scripts/check-dark-alias-flip.mjs && node scripts/check-focus-states.mjs && node scripts/generate-consumer-skill.mjs --check && node scripts/generate-agents-md.mjs --check && node scripts/check-deprecations.mjs && node scripts/upgrade/schema.mjs --check && node scripts/upgrade/compile.mjs --check && node scripts/check-docs.mjs && node --test scripts/check-docs.selftest.mjs && node scripts/check-upgrade-ledger.mjs",
|
|
397
412
|
"pretypecheck": "node scripts/audit-tokens.mjs --report-only",
|
|
398
413
|
"preview:build": "vite build --config preview/vite.config.mjs",
|
|
399
414
|
"promote": "node scripts/promote.mjs",
|
|
@@ -432,6 +447,7 @@
|
|
|
432
447
|
"upgrade:consumers": "node scripts/upgrade/consumers.mjs",
|
|
433
448
|
"codemod:names": "node scripts/build-codemod-pattern-names.mjs",
|
|
434
449
|
"agents:generate": "node scripts/generate-agents-md.mjs",
|
|
435
|
-
"check:agents-md": "node scripts/generate-agents-md.mjs --check"
|
|
450
|
+
"check:agents-md": "node scripts/generate-agents-md.mjs --check",
|
|
451
|
+
"upgrade:note": "node scripts/upgrade/note.mjs"
|
|
436
452
|
}
|
|
437
453
|
}
|