@starci/grammar 0.4.12 → 0.5.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/LICENSE +21 -21
- package/README.md +269 -47
- package/dist/.build-stamp.json +9 -0
- package/dist/common/components-forms.css +435 -0
- package/dist/common/components-navigation.css +1163 -0
- package/dist/common/components-overlays.css +939 -0
- package/dist/common/registry.d.ts +60 -1
- package/dist/common/registry.d.ts.map +1 -1
- package/dist/common/registry.js +6 -0
- package/dist/common/registry.js.map +1 -1
- package/dist/common/renderers-forms.d.ts +44 -0
- package/dist/common/renderers-forms.d.ts.map +1 -0
- package/dist/common/renderers-forms.js +49 -0
- package/dist/common/renderers-forms.js.map +1 -0
- package/dist/common/renderers-navigation.d.ts +42 -0
- package/dist/common/renderers-navigation.d.ts.map +1 -0
- package/dist/common/renderers-navigation.js +46 -0
- package/dist/common/renderers-navigation.js.map +1 -0
- package/dist/common/renderers-overlays.d.ts +32 -0
- package/dist/common/renderers-overlays.d.ts.map +1 -0
- package/dist/common/renderers-overlays.js +36 -0
- package/dist/common/renderers-overlays.js.map +1 -0
- package/dist/common/renderers.d.ts +5 -2
- package/dist/common/renderers.d.ts.map +1 -1
- package/dist/common/renderers.js +3 -0
- package/dist/common/renderers.js.map +1 -1
- package/dist/common/styles.css +282 -1
- package/dist/core/LeadingNumber.d.ts.map +1 -1
- package/dist/core/LeadingNumber.js +1 -1
- package/dist/core/LeadingNumber.js.map +1 -1
- package/dist/core/OtpInput.d.ts +17 -1
- package/dist/core/OtpInput.d.ts.map +1 -1
- package/dist/core/OtpInput.js +17 -5
- package/dist/core/OtpInput.js.map +1 -1
- package/dist/core/StateMark.d.ts +6 -1
- package/dist/core/StateMark.d.ts.map +1 -1
- package/dist/core/StateMark.js +7 -2
- package/dist/core/StateMark.js.map +1 -1
- package/dist/core/branch/Accordion/index.d.ts +28 -0
- package/dist/core/branch/Accordion/index.d.ts.map +1 -0
- package/dist/core/branch/Accordion/index.js +30 -0
- package/dist/core/branch/Accordion/index.js.map +1 -0
- package/dist/core/branch/AlertDialog/index.d.ts +40 -0
- package/dist/core/branch/AlertDialog/index.d.ts.map +1 -0
- package/dist/core/branch/AlertDialog/index.js +59 -0
- package/dist/core/branch/AlertDialog/index.js.map +1 -0
- package/dist/core/branch/Calendar/index.d.ts +26 -0
- package/dist/core/branch/Calendar/index.d.ts.map +1 -0
- package/dist/core/branch/Calendar/index.js +17 -0
- package/dist/core/branch/Calendar/index.js.map +1 -0
- package/dist/core/branch/ComboBox/index.d.ts +32 -0
- package/dist/core/branch/ComboBox/index.d.ts.map +1 -0
- package/dist/core/branch/ComboBox/index.js +28 -0
- package/dist/core/branch/ComboBox/index.js.map +1 -0
- package/dist/core/branch/DataTable/index.d.ts +52 -0
- package/dist/core/branch/DataTable/index.d.ts.map +1 -0
- package/dist/core/branch/DataTable/index.js +46 -0
- package/dist/core/branch/DataTable/index.js.map +1 -0
- package/dist/core/branch/DatePicker/index.d.ts +23 -0
- package/dist/core/branch/DatePicker/index.d.ts.map +1 -0
- package/dist/core/branch/DatePicker/index.js +29 -0
- package/dist/core/branch/DatePicker/index.js.map +1 -0
- package/dist/core/branch/DateRangePicker/index.d.ts +21 -0
- package/dist/core/branch/DateRangePicker/index.d.ts.map +1 -0
- package/dist/core/branch/DateRangePicker/index.js +22 -0
- package/dist/core/branch/DateRangePicker/index.js.map +1 -0
- package/dist/core/branch/Dialog/index.d.ts +36 -0
- package/dist/core/branch/Dialog/index.d.ts.map +1 -0
- package/dist/core/branch/Dialog/index.js +20 -0
- package/dist/core/branch/Dialog/index.js.map +1 -0
- package/dist/core/branch/Disclosure/index.d.ts +22 -0
- package/dist/core/branch/Disclosure/index.d.ts.map +1 -0
- package/dist/core/branch/Disclosure/index.js +26 -0
- package/dist/core/branch/Disclosure/index.js.map +1 -0
- package/dist/core/branch/Drawer/index.d.ts +35 -0
- package/dist/core/branch/Drawer/index.d.ts.map +1 -0
- package/dist/core/branch/Drawer/index.js +20 -0
- package/dist/core/branch/Drawer/index.js.map +1 -0
- package/dist/core/branch/DropdownMenu/index.d.ts +61 -0
- package/dist/core/branch/DropdownMenu/index.d.ts.map +1 -0
- package/dist/core/branch/DropdownMenu/index.js +59 -0
- package/dist/core/branch/DropdownMenu/index.js.map +1 -0
- package/dist/core/branch/ListBox/index.d.ts +30 -0
- package/dist/core/branch/ListBox/index.d.ts.map +1 -0
- package/dist/core/branch/ListBox/index.js +14 -0
- package/dist/core/branch/ListBox/index.js.map +1 -0
- package/dist/core/branch/MarkdownArticle/index.d.ts +8 -0
- package/dist/core/branch/MarkdownArticle/index.d.ts.map +1 -1
- package/dist/core/branch/MarkdownArticle/index.js +7 -2
- package/dist/core/branch/MarkdownArticle/index.js.map +1 -1
- package/dist/core/branch/Popover/index.d.ts +33 -0
- package/dist/core/branch/Popover/index.d.ts.map +1 -0
- package/dist/core/branch/Popover/index.js +16 -0
- package/dist/core/branch/Popover/index.js.map +1 -0
- package/dist/core/branch/Rail/index.d.ts +2 -0
- package/dist/core/branch/Rail/index.d.ts.map +1 -1
- package/dist/core/branch/Rail/index.js +10 -3
- package/dist/core/branch/Rail/index.js.map +1 -1
- package/dist/core/branch/Select/index.d.ts +31 -0
- package/dist/core/branch/Select/index.d.ts.map +1 -0
- package/dist/core/branch/Select/index.js +41 -0
- package/dist/core/branch/Select/index.js.map +1 -0
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts +6 -0
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.js +6 -6
- package/dist/core/branch/SurfaceAccordionCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.d.ts +7 -2
- package/dist/core/branch/SurfaceCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.js +7 -2
- package/dist/core/branch/SurfaceCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceCard/index.d.ts +6 -0
- package/dist/core/branch/SurfaceCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/index.js +4 -4
- package/dist/core/branch/SurfaceCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.d.ts +17 -1
- package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.js +10 -4
- package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
- package/dist/core/branch/Tabs/index.js +1 -1
- package/dist/core/branch/Tabs/index.js.map +1 -1
- package/dist/core/branch/Toast/index.d.ts +75 -0
- package/dist/core/branch/Toast/index.d.ts.map +1 -0
- package/dist/core/branch/Toast/index.js +145 -0
- package/dist/core/branch/Toast/index.js.map +1 -0
- package/dist/core/composite/Alert/index.d.ts +40 -0
- package/dist/core/composite/Alert/index.d.ts.map +1 -0
- package/dist/core/composite/Alert/index.js +27 -0
- package/dist/core/composite/Alert/index.js.map +1 -0
- package/dist/core/composite/AvatarGroup/index.d.ts +23 -0
- package/dist/core/composite/AvatarGroup/index.d.ts.map +1 -0
- package/dist/core/composite/AvatarGroup/index.js +15 -0
- package/dist/core/composite/AvatarGroup/index.js.map +1 -0
- package/dist/core/composite/Breadcrumbs/index.d.ts +27 -0
- package/dist/core/composite/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/core/composite/Breadcrumbs/index.js +16 -0
- package/dist/core/composite/Breadcrumbs/index.js.map +1 -0
- package/dist/core/composite/ButtonGroup/index.d.ts +14 -0
- package/dist/core/composite/ButtonGroup/index.d.ts.map +1 -0
- package/dist/core/composite/ButtonGroup/index.js +17 -0
- package/dist/core/composite/ButtonGroup/index.js.map +1 -0
- package/dist/core/composite/CheckboxGroup/index.d.ts +23 -0
- package/dist/core/composite/CheckboxGroup/index.d.ts.map +1 -0
- package/dist/core/composite/CheckboxGroup/index.js +21 -0
- package/dist/core/composite/CheckboxGroup/index.js.map +1 -0
- package/dist/core/composite/DescriptionList/index.d.ts +23 -0
- package/dist/core/composite/DescriptionList/index.d.ts.map +1 -0
- package/dist/core/composite/DescriptionList/index.js +8 -0
- package/dist/core/composite/DescriptionList/index.js.map +1 -0
- package/dist/core/composite/Fieldset/index.d.ts +17 -0
- package/dist/core/composite/Fieldset/index.d.ts.map +1 -0
- package/dist/core/composite/Fieldset/index.js +14 -0
- package/dist/core/composite/Fieldset/index.js.map +1 -0
- package/dist/core/composite/Form/index.d.ts +32 -0
- package/dist/core/composite/Form/index.d.ts.map +1 -0
- package/dist/core/composite/Form/index.js +25 -0
- package/dist/core/composite/Form/index.js.map +1 -0
- package/dist/core/composite/HorizontalScrollRegion/index.d.ts +5 -0
- package/dist/core/composite/HorizontalScrollRegion/index.d.ts.map +1 -1
- package/dist/core/composite/HorizontalScrollRegion/index.js +3 -2
- package/dist/core/composite/HorizontalScrollRegion/index.js.map +1 -1
- package/dist/core/composite/Pagination/index.d.ts +31 -0
- package/dist/core/composite/Pagination/index.d.ts.map +1 -0
- package/dist/core/composite/Pagination/index.js +42 -0
- package/dist/core/composite/Pagination/index.js.map +1 -0
- package/dist/core/composite/RadioGroup/index.d.ts +15 -0
- package/dist/core/composite/RadioGroup/index.d.ts.map +1 -0
- package/dist/core/composite/RadioGroup/index.js +20 -0
- package/dist/core/composite/RadioGroup/index.js.map +1 -0
- package/dist/core/composite/SegmentedControl/index.d.ts +24 -0
- package/dist/core/composite/SegmentedControl/index.d.ts.map +1 -0
- package/dist/core/composite/SegmentedControl/index.js +33 -0
- package/dist/core/composite/SegmentedControl/index.js.map +1 -0
- package/dist/core/composite/StaticStateRow/index.d.ts +6 -1
- package/dist/core/composite/StaticStateRow/index.d.ts.map +1 -1
- package/dist/core/composite/StaticStateRow/index.js +6 -1
- package/dist/core/composite/StaticStateRow/index.js.map +1 -1
- package/dist/core/composite/Stepper/index.d.ts +34 -0
- package/dist/core/composite/Stepper/index.d.ts.map +1 -0
- package/dist/core/composite/Stepper/index.js +27 -0
- package/dist/core/composite/Stepper/index.js.map +1 -0
- package/dist/core/composite/TagGroup/index.d.ts +41 -0
- package/dist/core/composite/TagGroup/index.d.ts.map +1 -0
- package/dist/core/composite/TagGroup/index.js +17 -0
- package/dist/core/composite/TagGroup/index.js.map +1 -0
- package/dist/core/composite/Timeline/index.d.ts +28 -0
- package/dist/core/composite/Timeline/index.d.ts.map +1 -0
- package/dist/core/composite/Timeline/index.js +14 -0
- package/dist/core/composite/Timeline/index.js.map +1 -0
- package/dist/core/composite/VerticalScrollRegion/index.d.ts +31 -1
- package/dist/core/composite/VerticalScrollRegion/index.d.ts.map +1 -1
- package/dist/core/composite/VerticalScrollRegion/index.js +16 -3
- package/dist/core/composite/VerticalScrollRegion/index.js.map +1 -1
- package/dist/core/composition/BottomNav/index.d.ts +33 -0
- package/dist/core/composition/BottomNav/index.d.ts.map +1 -0
- package/dist/core/composition/BottomNav/index.js +22 -0
- package/dist/core/composition/BottomNav/index.js.map +1 -0
- package/dist/core/composition/Footer/index.d.ts +35 -0
- package/dist/core/composition/Footer/index.d.ts.map +1 -0
- package/dist/core/composition/Footer/index.js +19 -0
- package/dist/core/composition/Footer/index.js.map +1 -0
- package/dist/core/composition/NavigationFeatureNav/index.d.ts +3 -0
- package/dist/core/composition/NavigationFeatureNav/index.d.ts.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/index.js +3 -0
- package/dist/core/composition/NavigationFeatureNav/index.js.map +1 -1
- package/dist/core/composition/TopBar/index.d.ts +34 -0
- package/dist/core/composition/TopBar/index.d.ts.map +1 -0
- package/dist/core/composition/TopBar/index.js +15 -0
- package/dist/core/composition/TopBar/index.js.map +1 -0
- package/dist/core/composition/WorkspaceShell/index.d.ts +18 -1
- package/dist/core/composition/WorkspaceShell/index.d.ts.map +1 -1
- package/dist/core/composition/WorkspaceShell/index.js +10 -1
- package/dist/core/composition/WorkspaceShell/index.js.map +1 -1
- package/dist/core/dna.d.ts +26 -8
- package/dist/core/dna.d.ts.map +1 -1
- package/dist/core/dna.js +22 -4
- package/dist/core/dna.js.map +1 -1
- package/dist/core/index.d.ts +60 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/navigationClassNames.d.ts +3 -0
- package/dist/core/navigationClassNames.d.ts.map +1 -0
- package/dist/core/navigationClassNames.js +4 -0
- package/dist/core/navigationClassNames.js.map +1 -0
- package/dist/core/navigationKeys.d.ts +11 -0
- package/dist/core/navigationKeys.d.ts.map +1 -0
- package/dist/core/navigationKeys.js +44 -0
- package/dist/core/navigationKeys.js.map +1 -0
- package/dist/core/overlayScope.d.ts +42 -0
- package/dist/core/overlayScope.d.ts.map +1 -0
- package/dist/core/overlayScope.js +54 -0
- package/dist/core/overlayScope.js.map +1 -0
- package/dist/core/primitive/Avatar/index.d.ts +34 -0
- package/dist/core/primitive/Avatar/index.d.ts.map +1 -0
- package/dist/core/primitive/Avatar/index.js +24 -0
- package/dist/core/primitive/Avatar/index.js.map +1 -0
- package/dist/core/primitive/Badge/index.d.ts +6 -1
- package/dist/core/primitive/Badge/index.d.ts.map +1 -1
- package/dist/core/primitive/Badge/index.js +7 -2
- package/dist/core/primitive/Badge/index.js.map +1 -1
- package/dist/core/primitive/Checkbox/index.d.ts +25 -0
- package/dist/core/primitive/Checkbox/index.d.ts.map +1 -0
- package/dist/core/primitive/Checkbox/index.js +17 -0
- package/dist/core/primitive/Checkbox/index.js.map +1 -0
- package/dist/core/primitive/CloseButton/index.d.ts +17 -0
- package/dist/core/primitive/CloseButton/index.d.ts.map +1 -0
- package/dist/core/primitive/CloseButton/index.js +11 -0
- package/dist/core/primitive/CloseButton/index.js.map +1 -0
- package/dist/core/primitive/DateField/index.d.ts +33 -0
- package/dist/core/primitive/DateField/index.d.ts.map +1 -0
- package/dist/core/primitive/DateField/index.js +33 -0
- package/dist/core/primitive/DateField/index.js.map +1 -0
- package/dist/core/primitive/Field/index.d.ts +127 -0
- package/dist/core/primitive/Field/index.d.ts.map +1 -0
- package/dist/core/primitive/Field/index.js +100 -0
- package/dist/core/primitive/Field/index.js.map +1 -0
- package/dist/core/primitive/FileDropzone/index.d.ts +25 -0
- package/dist/core/primitive/FileDropzone/index.d.ts.map +1 -0
- package/dist/core/primitive/FileDropzone/index.js +35 -0
- package/dist/core/primitive/FileDropzone/index.js.map +1 -0
- package/dist/core/primitive/GrammarRoot/index.d.ts +6 -1
- package/dist/core/primitive/GrammarRoot/index.d.ts.map +1 -1
- package/dist/core/primitive/GrammarRoot/index.js +7 -2
- package/dist/core/primitive/GrammarRoot/index.js.map +1 -1
- package/dist/core/primitive/Icon/index.d.ts +7 -1
- package/dist/core/primitive/Icon/index.d.ts.map +1 -1
- package/dist/core/primitive/Icon/index.js +7 -2
- package/dist/core/primitive/Icon/index.js.map +1 -1
- package/dist/core/primitive/IconButton/index.d.ts +1 -1
- package/dist/core/primitive/IconButton/index.d.ts.map +1 -1
- package/dist/core/primitive/IconButton/index.js +2 -2
- package/dist/core/primitive/IconButton/index.js.map +1 -1
- package/dist/core/primitive/Image/index.d.ts +30 -0
- package/dist/core/primitive/Image/index.d.ts.map +1 -0
- package/dist/core/primitive/Image/index.js +29 -0
- package/dist/core/primitive/Image/index.js.map +1 -0
- package/dist/core/primitive/IncludedMark/index.d.ts +2 -1
- package/dist/core/primitive/IncludedMark/index.d.ts.map +1 -1
- package/dist/core/primitive/IncludedMark/index.js +3 -2
- package/dist/core/primitive/IncludedMark/index.js.map +1 -1
- package/dist/core/primitive/Kbd/index.d.ts +13 -0
- package/dist/core/primitive/Kbd/index.d.ts.map +1 -0
- package/dist/core/primitive/Kbd/index.js +14 -0
- package/dist/core/primitive/Kbd/index.js.map +1 -0
- package/dist/core/primitive/Label/index.d.ts +18 -4
- package/dist/core/primitive/Label/index.d.ts.map +1 -1
- package/dist/core/primitive/Label/index.js +4 -2
- package/dist/core/primitive/Label/index.js.map +1 -1
- package/dist/core/primitive/Link/index.d.ts +30 -0
- package/dist/core/primitive/Link/index.d.ts.map +1 -0
- package/dist/core/primitive/Link/index.js +17 -0
- package/dist/core/primitive/Link/index.js.map +1 -0
- package/dist/core/primitive/Meter/index.d.ts +16 -0
- package/dist/core/primitive/Meter/index.d.ts.map +1 -0
- package/dist/core/primitive/Meter/index.js +20 -0
- package/dist/core/primitive/Meter/index.js.map +1 -0
- package/dist/core/primitive/NumberField/index.d.ts +21 -0
- package/dist/core/primitive/NumberField/index.d.ts.map +1 -0
- package/dist/core/primitive/NumberField/index.js +15 -0
- package/dist/core/primitive/NumberField/index.js.map +1 -0
- package/dist/core/primitive/ProgressCircle/index.d.ts +13 -0
- package/dist/core/primitive/ProgressCircle/index.d.ts.map +1 -0
- package/dist/core/primitive/ProgressCircle/index.js +5 -0
- package/dist/core/primitive/ProgressCircle/index.js.map +1 -0
- package/dist/core/primitive/RankArtwork/index.d.ts +2 -1
- package/dist/core/primitive/RankArtwork/index.d.ts.map +1 -1
- package/dist/core/primitive/RankArtwork/index.js +3 -2
- package/dist/core/primitive/RankArtwork/index.js.map +1 -1
- package/dist/core/primitive/Rating/index.d.ts +26 -0
- package/dist/core/primitive/Rating/index.d.ts.map +1 -0
- package/dist/core/primitive/Rating/index.js +37 -0
- package/dist/core/primitive/Rating/index.js.map +1 -0
- package/dist/core/primitive/SearchField/index.d.ts +22 -0
- package/dist/core/primitive/SearchField/index.d.ts.map +1 -0
- package/dist/core/primitive/SearchField/index.js +15 -0
- package/dist/core/primitive/SearchField/index.js.map +1 -0
- package/dist/core/primitive/SectionHeader/index.d.ts +9 -2
- package/dist/core/primitive/SectionHeader/index.d.ts.map +1 -1
- package/dist/core/primitive/SectionHeader/index.js +8 -2
- package/dist/core/primitive/SectionHeader/index.js.map +1 -1
- package/dist/core/primitive/Skeleton/index.d.ts +21 -0
- package/dist/core/primitive/Skeleton/index.d.ts.map +1 -0
- package/dist/core/primitive/Skeleton/index.js +18 -0
- package/dist/core/primitive/Skeleton/index.js.map +1 -0
- package/dist/core/primitive/Slider/index.d.ts +26 -0
- package/dist/core/primitive/Slider/index.d.ts.map +1 -0
- package/dist/core/primitive/Slider/index.js +37 -0
- package/dist/core/primitive/Slider/index.js.map +1 -0
- package/dist/core/primitive/Spinner/index.d.ts +18 -0
- package/dist/core/primitive/Spinner/index.d.ts.map +1 -0
- package/dist/core/primitive/Spinner/index.js +11 -0
- package/dist/core/primitive/Spinner/index.js.map +1 -0
- package/dist/core/primitive/Switch/index.d.ts +13 -0
- package/dist/core/primitive/Switch/index.d.ts.map +1 -0
- package/dist/core/primitive/Switch/index.js +15 -0
- package/dist/core/primitive/Switch/index.js.map +1 -0
- package/dist/core/primitive/Textarea/index.d.ts +16 -0
- package/dist/core/primitive/Textarea/index.d.ts.map +1 -0
- package/dist/core/primitive/Textarea/index.js +20 -0
- package/dist/core/primitive/Textarea/index.js.map +1 -0
- package/dist/core/primitive/TimeField/index.d.ts +15 -0
- package/dist/core/primitive/TimeField/index.d.ts.map +1 -0
- package/dist/core/primitive/TimeField/index.js +13 -0
- package/dist/core/primitive/TimeField/index.js.map +1 -0
- package/dist/core/styles.css +32 -6
- package/dist/heritage/styles.css +21 -6
- package/dist/offset-pop/components-forms.css +405 -0
- package/dist/offset-pop/components-navigation.css +394 -0
- package/dist/offset-pop/components-overlays.css +253 -0
- package/dist/offset-pop/conformance.d.ts +64 -0
- package/dist/offset-pop/conformance.d.ts.map +1 -0
- package/dist/offset-pop/conformance.js +63 -0
- package/dist/offset-pop/conformance.js.map +1 -0
- package/dist/offset-pop/dna.d.ts +282 -0
- package/dist/offset-pop/dna.d.ts.map +1 -0
- package/dist/offset-pop/dna.js +276 -0
- package/dist/offset-pop/dna.js.map +1 -0
- package/dist/offset-pop/index.d.ts +4 -8
- package/dist/offset-pop/index.d.ts.map +1 -1
- package/dist/offset-pop/index.js +7 -18
- package/dist/offset-pop/index.js.map +1 -1
- package/dist/offset-pop/styles.css +203 -62
- package/package.json +33 -9
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 StarCi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StarCi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,79 +1,301 @@
|
|
|
1
1
|
# `@starci/grammar`
|
|
2
2
|
|
|
3
|
-
`@starci/grammar`
|
|
4
|
-
Common owns typed props, semantics, renderer anatomy, universal
|
|
5
|
-
registry. Core, Heritage
|
|
6
|
-
|
|
3
|
+
`@starci/grammar` splits a UI kit into one shared contract and several visual families. The
|
|
4
|
+
contract has no business logic. Common owns the typed props, semantics, renderer anatomy, universal
|
|
5
|
+
states and scales, and the family registry. Core, Heritage and Offset Pop are sibling families.
|
|
6
|
+
Each one implements the same contract with its own scoped visual DNA. The package contains no
|
|
7
|
+
routes, domain entities, product decisions or feature-named shells.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Common ships **95 renderers**. Every family renders all of them. A family changes presentation
|
|
10
|
+
only: props, DOM, ARIA and keyboard behaviour stay the same.
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
- `@starci/grammar/core` — the StarCi Core family, its scoped root, DNA, and compatibility aliases.
|
|
12
|
-
- `@starci/grammar/heritage` and `@starci/grammar/offset-pop` — sibling family roots,
|
|
13
|
-
conformance receipts, and scoped visual overlays.
|
|
14
|
-
- `@starci/grammar/common/styles.css`, `@starci/grammar/core/styles.css`,
|
|
15
|
-
`@starci/grammar/heritage/styles.css`, and
|
|
16
|
-
`@starci/grammar/offset-pop/styles.css` — package stylesheets. Short `.css` export aliases are
|
|
17
|
-
also available.
|
|
18
|
-
|
|
19
|
-
Install the workspace package while developing locally:
|
|
12
|
+
## Install
|
|
20
13
|
|
|
21
14
|
```sh
|
|
22
|
-
npm install
|
|
15
|
+
npm install @starci/grammar @heroui/react react react-dom
|
|
16
|
+
# while developing inside this repository:
|
|
17
|
+
npm install ./.claude/packages/grammar
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The package needs Node.js 20 or newer. Its peer dependencies are React 18+ and `@heroui/react`
|
|
21
|
+
3.2+. Load the HeroUI stylesheet once in the app, as HeroUI's own setup describes. Then import
|
|
22
|
+
exactly one Grammar family stylesheet. Each family sheet already imports Common anatomy first.
|
|
23
|
+
|
|
24
|
+
| Entry point | Root component | Stylesheet |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `@starci/grammar/common` | `GrammarRoot` (neutral) | `@starci/grammar/common/styles.css` (`common.css`) |
|
|
27
|
+
| `@starci/grammar/core` | `CoreGrammarRoot` | `@starci/grammar/core/styles.css` (`core.css`) |
|
|
28
|
+
| `@starci/grammar/heritage` | `HeritageGrammarRoot` | `@starci/grammar/heritage/styles.css` (`heritage.css`) |
|
|
29
|
+
| `@starci/grammar/offset-pop` | `OffsetPopGrammarRoot` | `@starci/grammar/offset-pop/styles.css` (`offset-pop.css`) |
|
|
30
|
+
|
|
31
|
+
The Core and Offset Pop entry points re-export all of Common, so an app imports its components and
|
|
32
|
+
its root from one place. Heritage does not re-export Common. It exports `heritageGrammar`,
|
|
33
|
+
`HeritageGrammarRoot`, its `Brand` extension (`HeritageBrand`), the `HeritageButton` and
|
|
34
|
+
`HeritageHeading` aliases and its conformance, so import the other renderers from
|
|
35
|
+
`@starci/grammar/common`.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### Common (neutral structure only)
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { Button, GrammarRoot, PageContainer, SurfaceCard } from "@starci/grammar/common"
|
|
43
|
+
import "@starci/grammar/common/styles.css"
|
|
44
|
+
|
|
45
|
+
export const App = () => (
|
|
46
|
+
<GrammarRoot theme="system">
|
|
47
|
+
<PageContainer>
|
|
48
|
+
<SurfaceCard label="Welcome"><Button>Start</Button></SurfaceCard>
|
|
49
|
+
</PageContainer>
|
|
50
|
+
</GrammarRoot>
|
|
51
|
+
)
|
|
23
52
|
```
|
|
24
53
|
|
|
25
|
-
|
|
54
|
+
### Core
|
|
26
55
|
|
|
27
56
|
```tsx
|
|
28
|
-
import {
|
|
29
|
-
PageContainer,
|
|
30
|
-
PrimaryRailLayout,
|
|
31
|
-
SurfaceCard,
|
|
32
|
-
} from "@starci/grammar/common"
|
|
33
|
-
import { CoreGrammarRoot } from "@starci/grammar/core"
|
|
57
|
+
import { CoreGrammarRoot, PageContainer, PrimaryRailLayout, SurfaceCard } from "@starci/grammar/core"
|
|
34
58
|
import "@starci/grammar/core/styles.css"
|
|
35
59
|
|
|
36
60
|
export const ProductSurface = () => (
|
|
37
|
-
<CoreGrammarRoot>
|
|
61
|
+
<CoreGrammarRoot theme="system">
|
|
38
62
|
<PageContainer>
|
|
39
63
|
<PrimaryRailLayout
|
|
40
|
-
primary={<SurfaceCard ariaLabel="Main"
|
|
41
|
-
rail={<SurfaceCard ariaLabel="Progress"
|
|
64
|
+
primary={<SurfaceCard ariaLabel="Main">…</SurfaceCard>}
|
|
65
|
+
rail={<SurfaceCard ariaLabel="Progress">…</SurfaceCard>}
|
|
42
66
|
/>
|
|
43
67
|
</PageContainer>
|
|
44
68
|
</CoreGrammarRoot>
|
|
45
69
|
)
|
|
46
70
|
```
|
|
47
71
|
|
|
48
|
-
`
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
`STARCI_CORE_DNA` exposes the immutable design values. `STARCI_CORE_SPACING_SCALE` exposes the
|
|
73
|
+
4px spacing steps. `STARCI_CORE_TOKEN_NAMES` lists the CSS variables, and
|
|
74
|
+
`STARCI_CORE_TOKEN_DEFAULTS` / `STARCI_CORE_DARK_TOKEN_DEFAULTS` hold their exact packaged values.
|
|
75
|
+
|
|
76
|
+
### Heritage
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
import { TopBar } from "@starci/grammar/common"
|
|
80
|
+
import { HeritageBrand, HeritageGrammarRoot } from "@starci/grammar/heritage"
|
|
81
|
+
import "@starci/grammar/heritage/styles.css"
|
|
82
|
+
|
|
83
|
+
export const Masthead = () => (
|
|
84
|
+
<HeritageGrammarRoot>
|
|
85
|
+
<TopBar brand={<a href="/"><HeritageBrand name="…" descriptor="…" logo={{ src: "/logo.svg", width: 40, height: 40 }} /></a>} />
|
|
86
|
+
</HeritageGrammarRoot>
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Heritage replaces only the root. It adds one extension, `Brand`, which is non-interactive brand
|
|
91
|
+
content for a destination the consumer owns.
|
|
92
|
+
|
|
93
|
+
### Offset Pop
|
|
54
94
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
95
|
+
```tsx
|
|
96
|
+
import { Button, OffsetPopGrammarRoot, SurfaceCard, Toaster } from "@starci/grammar/offset-pop"
|
|
97
|
+
import "@starci/grammar/offset-pop/styles.css"
|
|
58
98
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
99
|
+
export const App = () => (
|
|
100
|
+
<OffsetPopGrammarRoot theme="system">
|
|
101
|
+
<SurfaceCard label="Today"><Button variant="primary">Play</Button></SurfaceCard>
|
|
102
|
+
<Toaster label="Notifications" dismissLabel="Dismiss" />
|
|
103
|
+
</OffsetPopGrammarRoot>
|
|
104
|
+
)
|
|
105
|
+
```
|
|
63
106
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`
|
|
67
|
-
|
|
68
|
-
|
|
107
|
+
Offset Pop is a playful family and stays product-neutral. Its signature is an ink outline, a hard
|
|
108
|
+
offset shadow and a pink decision accent. Text that uses the accent is drawn in a text-safe accent
|
|
109
|
+
(`--offset-pop-accent-text`). Reduced motion removes every transform. The DNA is
|
|
110
|
+
`OFFSET_POP_DNA`, which has the same keys as Core's plus two groups: `offset` (`x`, `y`,
|
|
111
|
+
`outlineWidth`, `ink`, `shadowInk`) and `palette` (`pink`, `blush`, `yellow`, `mint`,
|
|
112
|
+
`critical`). It also exports `OFFSET_POP_SPACING_SCALE`, `OFFSET_POP_TOKEN_NAMES`,
|
|
113
|
+
`OFFSET_POP_TOKEN_DEFAULTS`, `OFFSET_POP_DARK_TOKEN_DEFAULTS`, `OFFSET_POP_BAND_TOKEN_NAMES`,
|
|
114
|
+
`offsetPopGrammar` and `offsetPopRuleConformance`.
|
|
115
|
+
|
|
116
|
+
## Family scope and the overlay portal rule
|
|
117
|
+
|
|
118
|
+
A family paints only inside its root. Each family stylesheet is scoped to
|
|
119
|
+
`.grammar-common-root[data-grammar-family="<id>"]` inside its own cascade layer:
|
|
120
|
+
`starci-grammar-common` comes first, then `-core`, `-heritage` and `-offset-pop`. No family sheet
|
|
121
|
+
imports a sibling family's sheet. So two families can share a page, each inside its own root, and
|
|
122
|
+
nested roots resolve to the innermost one.
|
|
123
|
+
|
|
124
|
+
Overlays follow the same rule. `Dialog`, `AlertDialog`, `Drawer`, `Popover`, `DropdownMenu`, and
|
|
125
|
+
the list and calendar popovers of `Select`, `ComboBox`, `DatePicker` and `DateRangePicker` portal
|
|
126
|
+
into the **nearest** `.grammar-common-root`, not into `document.body`
|
|
127
|
+
(`resolveOverlayContainer`, `GRAMMAR_ROOT_SELECTOR`). Because of this, family selectors, tokens,
|
|
128
|
+
`data-grammar-theme` and the forced-colours mapping still reach the overlay surface. Two things
|
|
129
|
+
follow for apps:
|
|
130
|
+
|
|
131
|
+
- Render overlay triggers inside the family root. An overlay opened from outside every root falls
|
|
132
|
+
back to `document.body` and loses the family styling.
|
|
133
|
+
- Mount one `<Toaster>` **inside** the family root, usually as the root's last child. Push toasts
|
|
134
|
+
with `toastQueue.add({ title, tone, action, timeout })`, or give the Toaster its own
|
|
135
|
+
`createToastQueue()`. A Toaster outside the root renders unstyled.
|
|
136
|
+
|
|
137
|
+
## Components
|
|
138
|
+
|
|
139
|
+
Each group below matches a Storybook group. Run `npm run storybook`: every story renders inside
|
|
140
|
+
the family and theme chosen in the toolbar. It shows the default, disabled, invalid, pending and
|
|
141
|
+
selected/current states where they apply. Overlay stories open by default.
|
|
142
|
+
|
|
143
|
+
**Primitives (25).** Avatar, Badge, Button, CloseButton, Divider, GrammarRoot, Heading, Icon,
|
|
144
|
+
IconButton, IconTile, Image, IncludedMark, Kbd, Label, LeadingNumber, Link, Meter, Progress,
|
|
145
|
+
ProgressCircle, RankArtwork, Skeleton, Spinner, StateMark, Text, TextAction.
|
|
146
|
+
|
|
147
|
+
**Forms (24).** ButtonGroup, Checkbox, CheckboxGroup, ComboBox, DateField, DatePicker,
|
|
148
|
+
DateRangePicker, Field, Fieldset, FileDropzone, Form, Input, NumberField, OtpInput,
|
|
149
|
+
PressableField, RadioGroup, Rating, SearchField, SegmentedControl, Select, Slider, Switch,
|
|
150
|
+
Textarea, TimeField. Every Field-contract control takes `label`, `description`, `errorMessage`,
|
|
151
|
+
`isRequired`, `isDisabled`, `isReadOnly` and `isInvalid`. `Select`, `ComboBox`, `SearchField` and
|
|
152
|
+
`Form` also take `isPending`. `OtpInput` has no label prop, so name it with a `<label for>`.
|
|
153
|
+
|
|
154
|
+
**Overlays (9).** Alert, AlertDialog, Dialog, Drawer, DropdownMenu, Popover, Toast, Toaster,
|
|
155
|
+
Tooltip. Dialog, AlertDialog, Drawer, Popover and DropdownMenu are controlled through
|
|
156
|
+
`isOpen`, `defaultOpen` and `onOpenChange`.
|
|
157
|
+
|
|
158
|
+
**Navigation & Data (14).** Accordion, AvatarGroup, Breadcrumbs, Calendar, DataTable,
|
|
159
|
+
DescriptionList, Disclosure, ListBox, Pagination, Stepper, Subnav, Tabs, TagGroup, Timeline.
|
|
160
|
+
|
|
161
|
+
**Surfaces (14).** EmptyNotice, FencedCodeBlock, HorizontalScrollRegion, MarkdownArticle,
|
|
162
|
+
MarkdownTableFrame, MediaFrame, Rail, SectionHeader, StaticStateRow, SurfaceAccordionCard,
|
|
163
|
+
SurfaceCard, SurfaceCopyGroup, SurfaceListCard, VerticalScrollRegion.
|
|
164
|
+
|
|
165
|
+
**Compositions (9).** BottomNav, ChatWorkspace, Footer, NavigationFeatureNav, PageContainer,
|
|
166
|
+
PrimaryRailLayout, Sidebar, TopBar, WorkspaceShell. Storybook also pins three page recipes to
|
|
167
|
+
each family: a settings form, a data list with a filter drawer and pagination, and a mobile home
|
|
168
|
+
with TopBar, BottomNav and a Toast.
|
|
169
|
+
|
|
170
|
+
`COMMON_GRAMMAR_COMPONENTS` is the frozen registry of all 95 renderers.
|
|
171
|
+
`COMMON_FORMS_COMPONENTS`, `COMMON_OVERLAYS_COMPONENTS` and `COMMON_NAVIGATION_COMPONENTS` are the
|
|
172
|
+
0.5.0 groups. `defineGrammarFamily` builds a new family over the registry. It may replace
|
|
173
|
+
renderers with prop-compatible versions and add extensions whose names don't collide with Common's.
|
|
174
|
+
|
|
175
|
+
## Theming
|
|
176
|
+
|
|
177
|
+
- **Tokens.** Each family writes its DNA as CSS custom properties on its root: `--starci-core-*`,
|
|
178
|
+
`--heritage-*` or `--offset-pop-*`. It feeds those into the Common semantic variables that
|
|
179
|
+
renderers read: `--accent`, `--accent-foreground`, `--focus`, `--background`, `--surface`,
|
|
180
|
+
`--surface-secondary`, `--foreground`, `--muted`, `--border`, `--separator`, the status
|
|
181
|
+
colours and their foregrounds, radii and shadow. To adjust a family, override its tokens on the
|
|
182
|
+
root, for example `<CoreGrammarRoot style={{ "--starci-core-accent": "#2f6bff" }}>`. The
|
|
183
|
+
`*_TOKEN_NAMES` / `*_TOKEN_DEFAULTS` exports are the supported list. Values are validated by the
|
|
184
|
+
family specs, not at runtime.
|
|
185
|
+
- **Spacing.** Every family uses the Common 4px scale (`COMMON_SPACING_SCALE`,
|
|
186
|
+
`COMMON_SPACING_TOKENS`), and Common's `--grammar-*-gap` / `--grammar-page-inset` variables.
|
|
187
|
+
- **Dark.** `theme` on any root takes `"light"`, `"dark"` or `"system"` (the default), which sets
|
|
188
|
+
`data-grammar-theme`. `system` follows `prefers-color-scheme`. The dark palette is scoped to the
|
|
189
|
+
root, so a dark island can sit inside a light page.
|
|
190
|
+
- **Forced colours.** Under `forced-colors: active` each family maps its surfaces, outlines,
|
|
191
|
+
selection and focus onto system colours. Current and selected decisions remain visible through
|
|
192
|
+
an edge or outline, not a fill.
|
|
193
|
+
- **Motion.** Under `prefers-reduced-motion: reduce`, Common's component anatomy drops its
|
|
194
|
+
animations, and Offset Pop also removes its press travel and every other transform.
|
|
195
|
+
- **Structure.** One banner per page, owned by the app bar: `TopBar` / `NavigationFeatureNav`
|
|
196
|
+
in `WorkspaceShell`'s `header` slot makes the shell's wrapper a plain `div`
|
|
197
|
+
(`headerLandmark="slot"`, automatic for those two; pass it for an app-owned `<header>`), and
|
|
198
|
+
`SectionHeader` is never a `<header>`. Surface names (`SurfaceCard`, `SurfaceListCard`,
|
|
199
|
+
`SurfaceAccordionCard`) default to `h3`; pass `headingLevel` (2-6) so the outline never skips a
|
|
200
|
+
level. `SurfaceListCard`'s collection is the list (`<ul>`, or `role="list"` when scrolling), so
|
|
201
|
+
its rows are `<li>`; use `empty` for an empty-state notice. Every scroll owner that holds
|
|
202
|
+
non-focusable content (scroll regions, the Rail body, code and table frames) is a named
|
|
203
|
+
`tabIndex=0` region. A fixed `BottomNav` publishes `--starci-core-bottom-nav-offset`, which the
|
|
204
|
+
outermost page container (or the Footer) and a bottom Toaster read.
|
|
205
|
+
- **States.** `PRESENTATION_STATES` (`neutral`, `informative`, `affirmative`, `cautionary`,
|
|
206
|
+
`negative`, `pending`, `unavailable`) is the render-neutral state vocabulary. Components stamp
|
|
207
|
+
it as `data-grammar-*` hooks for family CSS.
|
|
69
208
|
|
|
70
209
|
## Package checks
|
|
71
210
|
|
|
72
211
|
```sh
|
|
73
212
|
npm run typecheck
|
|
74
|
-
npm test
|
|
213
|
+
npm test # build + node --test + vitest spec list
|
|
214
|
+
npm run build-storybook # static Storybook (all 95 renderers + family pages)
|
|
215
|
+
npx vitest run --project storybook # stories in Chromium with axe (a11y `todo` mode)
|
|
75
216
|
npm pack --dry-run
|
|
76
217
|
```
|
|
77
218
|
|
|
78
|
-
|
|
79
|
-
|
|
219
|
+
## Contributing
|
|
220
|
+
|
|
221
|
+
`dist/` is build output and is not tracked in git. Every consumer inside this repository reads it:
|
|
222
|
+
the `file:` apps link this directory, the brand check reads the exported CSS, and the grammar guard
|
|
223
|
+
probe executes the built modules. A merge that changes `src/` does not change `dist/`, so a checkout
|
|
224
|
+
can hold an old build that still looks valid.
|
|
225
|
+
|
|
226
|
+
**Build stamp.** `npm run build` ends with `scripts/build-stamp.mjs`, which writes
|
|
227
|
+
`dist/.build-stamp.json`: the package version, a digest of the source (everything under `src/`
|
|
228
|
+
except stories, test helpers, specs and tests, plus `tsconfig.build.json`, `scripts/copy-css.mjs`
|
|
229
|
+
and the `exports` and `files` fields of `package.json`), a digest of the built files, and the build
|
|
230
|
+
time. The stamp ships in the tarball.
|
|
231
|
+
|
|
232
|
+
**Freshness check.** The root `npm run check` runs `scripts/checks/grammar-dist.mjs`. It fails when
|
|
233
|
+
`dist/` is missing, has no stamp, was built from other source or another version, or was edited
|
|
234
|
+
after the build. It also compares every `--*` custom property in each family's dist CSS with the
|
|
235
|
+
source CSS, so a hand-edited token fails too. The brand check (`scripts/checks/brand.mjs`) and the
|
|
236
|
+
grammar guard probe (`scripts/checks/code-patterns/grammar-guards.mjs`) run the same test before
|
|
237
|
+
they read a grammar dist, and refuse a dist that fails it. Every refusal ends with the same fix:
|
|
238
|
+
`run npm run build in packages/grammar`. A registry install carries no `src/`, so it cannot be
|
|
239
|
+
compared. It is reported as `unverifiable` and allowed, but if it carries a stamp, the version and
|
|
240
|
+
built-file digest must still match.
|
|
241
|
+
|
|
242
|
+
**Why there is no `prepare` script.** npm 11.6.2 installs a `file:` dependency as a symlink
|
|
243
|
+
(a junction on Windows) to this directory. On every consumer `npm install` or `npm ci` it runs this
|
|
244
|
+
package's `prepare` in place, but it does not install this package's devDependencies there. A
|
|
245
|
+
`prepare: npm run build` would therefore fail the consumer's install (`tsc` not found) wherever
|
|
246
|
+
`packages/grammar/node_modules` is absent. Where it is present, the script would wipe and rebuild
|
|
247
|
+
the shared `dist/` on every consumer install. Git dependencies are not a way in either: npm parses
|
|
248
|
+
the `#…::path:packages/grammar` suffix, but pacote ignores it, so a git dependency cannot select
|
|
249
|
+
this subdirectory. A linking consumer builds on purpose, as `starci-academy-fe`'s own `prepare` does
|
|
250
|
+
with `npm run grammar:build`. After pulling a grammar change, run `npm run build` here. Publishing is
|
|
251
|
+
unaffected: `prepack` runs `typecheck` and `test`, and `test` builds first, so a tarball always
|
|
252
|
+
carries a fresh stamp.
|
|
253
|
+
|
|
254
|
+
**Why `dist/` stays untracked.** Every consumer that reads it can build it, from this directory or
|
|
255
|
+
through a script that calls this one. A tracked `dist/` would need a rebuild in every source commit,
|
|
256
|
+
would conflict in every merge that touches `src/`, and would make a stale build look authoritative
|
|
257
|
+
in git history. The stamp and the check catch what tracking would have hidden.
|
|
258
|
+
|
|
259
|
+
## Changelog: 0.5.0
|
|
260
|
+
|
|
261
|
+
A minor release. Common grows from 42 to 95 renderers, and Offset Pop reaches parity with Core.
|
|
262
|
+
|
|
263
|
+
- **53 new Common renderers.** Core, Heritage and Offset Pop all receive them. They are built on
|
|
264
|
+
HeroUI v3 / React Aria, and each ships Common anatomy CSS and a spec that renders it under bare
|
|
265
|
+
Common, Core and Offset Pop.
|
|
266
|
+
- Forms (20): Field, Fieldset, Form, Textarea, Select, ComboBox, SearchField, NumberField,
|
|
267
|
+
Checkbox, CheckboxGroup, RadioGroup, Switch, Slider, SegmentedControl, DateField, DatePicker,
|
|
268
|
+
DateRangePicker, TimeField, FileDropzone, ButtonGroup. They share one Field contract and one
|
|
269
|
+
44px touch floor.
|
|
270
|
+
- Overlays and feedback (14): Dialog, AlertDialog, Drawer (side, and bottom sheet with a handle),
|
|
271
|
+
Popover, DropdownMenu (sections, submenus, checkable items, shortcuts), Toast and Toaster
|
|
272
|
+
(queue, tones, action, pause on hover and focus, persistent live regions), Alert, Spinner,
|
|
273
|
+
Skeleton, ProgressCircle, Meter, CloseButton, Kbd.
|
|
274
|
+
- Navigation, chrome and data (19): Link, Breadcrumbs, Pagination, Stepper, TopBar, BottomNav,
|
|
275
|
+
Footer, Avatar, AvatarGroup, TagGroup, DataTable, DescriptionList, ListBox, Disclosure,
|
|
276
|
+
Accordion, Image, Rating, Timeline, Calendar.
|
|
277
|
+
- **Scoped overlay portals.** Overlays portal into the nearest Grammar root, so family styling
|
|
278
|
+
applies to open surfaces (see the portal rule above).
|
|
279
|
+
- **Offset Pop at Core parity.**
|
|
280
|
+
- `src/offset-pop/dna.ts` mirrors Core's DNA key for key, plus the `offset` and `palette` groups.
|
|
281
|
+
- A full light, dark, system-dark and forced-colours token set feeds every Common semantic
|
|
282
|
+
variable.
|
|
283
|
+
- Accent text is text-safe: `accentText` is `#b8005f` light and `#ff7ab8` dark. Accent, danger
|
|
284
|
+
and state foregrounds use ink so they pass WCAG AA.
|
|
285
|
+
- Error text mixes the critical colour with ink, reaching at least 5.05:1.
|
|
286
|
+
- **Offset Pop component treatment.**
|
|
287
|
+
- `offset-pop/components-{forms,overlays,navigation}.css` adds the ink outline, hard offset
|
|
288
|
+
shadow, pink selection and reduced-motion and forced-colours fallbacks.
|
|
289
|
+
- Interactive rows (ListBox, Select and ComboBox options, selectable DataTable rows) get a
|
|
290
|
+
yellow hover wash, a 2px pink focus ring and a soft-pink selected fill with a pink leading
|
|
291
|
+
edge.
|
|
292
|
+
- Rows are separated by a single seam. Dark-mode selected and current states are fixed.
|
|
293
|
+
- **Conformance.** `offsetPopRuleConformance` audits the family's own rules against their CSS
|
|
294
|
+
mechanisms and inherits the rest. The package boundary checks the per-family dist modules,
|
|
295
|
+
checks that no family imports another, and checks that the component CSS is in `dist`.
|
|
296
|
+
- **Core.** Subnav's menu toggle meets a 44px touch floor on coarse pointers and narrow viewports.
|
|
297
|
+
- **Build.** `scripts/copy-css.mjs` copies every `*.css` file in each entry directory.
|
|
298
|
+
`@internationalized/date` is a dev dependency, used for date values in specs and stories.
|
|
299
|
+
- **Storybook.** The toolbar switches the family (Common, Core, Heritage, Offset Pop) and the
|
|
300
|
+
theme (light, dark, system). There are stories for all 95 renderers and three page recipes per
|
|
301
|
+
family. The starter boilerplate is removed.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "starci/grammar-build-stamp@1",
|
|
3
|
+
"package": "@starci/grammar",
|
|
4
|
+
"version": "0.5.0",
|
|
5
|
+
"algorithm": "starci/grammar-source-digest@1",
|
|
6
|
+
"sourceDigest": "sha256:dd67694d6a3b231ea7c5971a22292f3d62d0b52a66c5db80510839dc55ae83e2",
|
|
7
|
+
"distDigest": "sha256:fa225df6d3507698243e394c0a98c0b718d1d32477bdceeffedc1d3e2358b040",
|
|
8
|
+
"builtAt": "2026-09-23T10:53:49.020Z"
|
|
9
|
+
}
|