@once-ui-system/core 1.8.5 → 2.0.0-alpha.1
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 +1 -1
- package/ai/catalog.json +166 -78
- package/ai/components/Accordion.json +1 -1
- package/ai/components/BarChart.json +34 -3
- package/ai/components/Book.json +128 -0
- package/ai/components/Button.json +1 -1
- package/ai/components/Card.json +1 -0
- package/ai/components/Carousel.json +1 -1
- package/ai/components/ChartHeader.json +2 -1
- package/ai/components/ChartStatus.json +2 -1
- package/ai/components/Checkbox.json +2 -2
- package/ai/components/CodeBlock.json +23 -2
- package/ai/components/ColorInput.json +1 -1
- package/ai/components/DataTooltip.json +3 -2
- package/ai/components/DatePicker.json +2 -2
- package/ai/components/Dialog.json +1 -1
- package/ai/components/DropdownWrapper.json +6 -4
- package/ai/components/Effect.json +133 -0
- package/ai/components/Fade.json +1 -1
- package/ai/components/Feedback.json +1 -1
- package/ai/components/IconButton.json +1 -1
- package/ai/components/InfoTip.json +125 -0
- package/ai/components/Input.json +5 -4
- package/ai/components/Legend.json +2 -1
- package/ai/components/LineBarChart.json +34 -3
- package/ai/components/LineChart.json +39 -3
- package/ai/components/LinearGauge.json +3 -2
- package/ai/components/LinearGradient.json +2 -1
- package/ai/components/Logo.json +2 -2
- package/ai/components/Media.json +1 -1
- package/ai/components/MediaUpload.json +21 -2
- package/ai/components/Modal.json +1 -1
- package/ai/components/NavGroup.json +130 -0
- package/ai/components/NavIcon.json +1 -1
- package/ai/components/NavItem.json +14 -0
- package/ai/components/Option.json +2 -2
- package/ai/components/Particle.json +1 -1
- package/ai/components/PieChart.json +32 -3
- package/ai/components/ProgressBar.json +1 -1
- package/ai/components/Pulse.json +1 -1
- package/ai/components/RadialGauge.json +4 -3
- package/ai/components/RadialGradient.json +2 -1
- package/ai/components/RadioButton.json +1 -1
- package/ai/components/RevealFx.json +1 -1
- package/ai/components/Scrubber.json +136 -0
- package/ai/components/SegmentedControl.json +3 -3
- package/ai/components/Setting.json +128 -0
- package/ai/components/SettingAxes.json +127 -0
- package/ai/components/SettingGroup.json +129 -0
- package/ai/components/ShineFx.json +1 -1
- package/ai/components/Skeleton.json +2 -3
- package/ai/components/SplitView.json +2 -0
- package/ai/components/StylePanel.json +4 -2
- package/ai/components/Swatch.json +11 -0
- package/ai/components/Swiper.json +1 -1
- package/ai/components/Switch.json +1 -1
- package/ai/components/Tag.json +1 -1
- package/ai/components/Textarea.json +6 -5
- package/ai/components/ThemeSwitcher.json +3 -0
- package/ai/components/Toast.json +1 -1
- package/ai/components/ToggleButton.json +2 -1
- package/ai/eval-tasks.md +10 -1
- package/ai/examples/app-shell.tsx +111 -0
- package/ai/examples/auth.tsx +2 -3
- package/ai/examples/blocks/Dashboard1.tsx +25 -36
- package/ai/examples/blocks/Feed3.tsx +8 -8
- package/ai/examples/blocks/Footer1.tsx +5 -3
- package/ai/examples/blocks/Footer2.tsx +3 -3
- package/ai/examples/blocks/Footer3.tsx +1 -1
- package/ai/examples/blocks/Footer4.tsx +6 -5
- package/ai/examples/blocks/Header1.tsx +7 -6
- package/ai/examples/blocks/Header2.tsx +1 -1
- package/ai/examples/blocks/Header3.tsx +7 -7
- package/ai/examples/blocks/Header4.tsx +6 -7
- package/ai/examples/blocks/Productivity1.tsx +1 -1
- package/ai/examples/blocks/Roadmap1.tsx +3 -3
- package/ai/examples/blocks/Sidebar1.tsx +1 -1
- package/ai/examples/blocks/Sidebar2.tsx +1 -1
- package/ai/examples/blocks/Sidebar4.tsx +1 -1
- package/ai/examples/blocks/Streaming1.tsx +4 -4
- package/ai/examples/blocks/Table1.tsx +9 -9
- package/ai/examples/blocks/Waitlist1.tsx +5 -5
- package/ai/examples/blocks/content/resources.ts +3 -1
- package/ai/examples/dashboard.tsx +13 -14
- package/ai/examples/marketing-hero.tsx +4 -4
- package/ai/examples/pricing.tsx +7 -8
- package/ai/examples/settings.tsx +7 -7
- package/ai/gotchas.json +99 -25
- package/ai/layouts.md +154 -0
- package/ai/manifest.json +3 -2
- package/ai/recipes.md +50 -5
- package/ai/rules.compact.md +26 -5
- package/ai/rules.md +84 -14
- package/ai/spec.json +634 -176
- package/ai/tasks/settings.json +1 -1
- package/dist/AGENTS.md +1 -1
- package/dist/ai/catalog.json +166 -78
- package/dist/ai/components/Accordion.json +1 -1
- package/dist/ai/components/BarChart.json +34 -3
- package/dist/ai/components/Book.json +128 -0
- package/dist/ai/components/Button.json +1 -1
- package/dist/ai/components/Card.json +1 -0
- package/dist/ai/components/Carousel.json +1 -1
- package/dist/ai/components/ChartHeader.json +2 -1
- package/dist/ai/components/ChartStatus.json +2 -1
- package/dist/ai/components/Checkbox.json +2 -2
- package/dist/ai/components/CodeBlock.json +23 -2
- package/dist/ai/components/ColorInput.json +1 -1
- package/dist/ai/components/DataTooltip.json +3 -2
- package/dist/ai/components/DatePicker.json +2 -2
- package/dist/ai/components/Dialog.json +1 -1
- package/dist/ai/components/DropdownWrapper.json +6 -4
- package/dist/ai/components/Effect.json +133 -0
- package/dist/ai/components/Fade.json +1 -1
- package/dist/ai/components/Feedback.json +1 -1
- package/dist/ai/components/IconButton.json +1 -1
- package/dist/ai/components/InfoTip.json +125 -0
- package/dist/ai/components/Input.json +5 -4
- package/dist/ai/components/Legend.json +2 -1
- package/dist/ai/components/LineBarChart.json +34 -3
- package/dist/ai/components/LineChart.json +39 -3
- package/dist/ai/components/LinearGauge.json +3 -2
- package/dist/ai/components/LinearGradient.json +2 -1
- package/dist/ai/components/Logo.json +2 -2
- package/dist/ai/components/Media.json +1 -1
- package/dist/ai/components/MediaUpload.json +21 -2
- package/dist/ai/components/Modal.json +1 -1
- package/dist/ai/components/NavGroup.json +130 -0
- package/dist/ai/components/NavIcon.json +1 -1
- package/dist/ai/components/NavItem.json +14 -0
- package/dist/ai/components/Option.json +2 -2
- package/dist/ai/components/Particle.json +1 -1
- package/dist/ai/components/PieChart.json +32 -3
- package/dist/ai/components/ProgressBar.json +1 -1
- package/dist/ai/components/Pulse.json +1 -1
- package/dist/ai/components/RadialGauge.json +4 -3
- package/dist/ai/components/RadialGradient.json +2 -1
- package/dist/ai/components/RadioButton.json +1 -1
- package/dist/ai/components/RevealFx.json +1 -1
- package/dist/ai/components/Scrubber.json +136 -0
- package/dist/ai/components/SegmentedControl.json +3 -3
- package/dist/ai/components/Setting.json +128 -0
- package/dist/ai/components/SettingAxes.json +127 -0
- package/dist/ai/components/SettingGroup.json +129 -0
- package/dist/ai/components/ShineFx.json +1 -1
- package/dist/ai/components/Skeleton.json +2 -3
- package/dist/ai/components/SplitView.json +2 -0
- package/dist/ai/components/StylePanel.json +4 -2
- package/dist/ai/components/Swatch.json +11 -0
- package/dist/ai/components/Swiper.json +1 -1
- package/dist/ai/components/Switch.json +1 -1
- package/dist/ai/components/Tag.json +1 -1
- package/dist/ai/components/Textarea.json +6 -5
- package/dist/ai/components/ThemeSwitcher.json +3 -0
- package/dist/ai/components/Toast.json +1 -1
- package/dist/ai/components/ToggleButton.json +2 -1
- package/dist/ai/eval-tasks.md +10 -1
- package/dist/ai/gotchas.json +99 -25
- package/dist/ai/layouts.md +154 -0
- package/dist/ai/manifest.json +3 -2
- package/dist/ai/recipes.md +50 -5
- package/dist/ai/rules.compact.md +26 -5
- package/dist/ai/rules.md +84 -14
- package/dist/ai/spec.json +634 -176
- package/dist/ai/tasks/settings.json +1 -1
- package/dist/components/Accordion.d.ts +2 -1
- package/dist/components/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion.js.map +1 -1
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Background.d.ts +6 -6
- package/dist/components/Background.d.ts.map +1 -1
- package/dist/components/Book.d.ts +28 -0
- package/dist/components/Book.d.ts.map +1 -0
- package/dist/components/Book.js +24 -0
- package/dist/components/Book.js.map +1 -0
- package/dist/components/Book.module.scss +45 -0
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +4 -4
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.d.ts +8 -0
- package/dist/components/Card.d.ts.map +1 -1
- package/dist/components/Card.js +10 -2
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Card.module.scss +11 -1
- package/dist/components/Carousel.d.ts +7 -1
- package/dist/components/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel.js +7 -7
- package/dist/components/Carousel.js.map +1 -1
- package/dist/components/Carousel.module.scss +1 -8
- package/dist/components/Checkbox.d.ts +3 -3
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +5 -5
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/ClientFlex.d.ts.map +1 -1
- package/dist/components/ClientFlex.js +5 -10
- package/dist/components/ClientFlex.js.map +1 -1
- package/dist/components/ClientGrid.d.ts.map +1 -1
- package/dist/components/ClientGrid.js +2 -7
- package/dist/components/ClientGrid.js.map +1 -1
- package/dist/components/ColorInput.d.ts +1 -1
- package/dist/components/ColorInput.d.ts.map +1 -1
- package/dist/components/ColorInput.js +7 -13
- package/dist/components/ColorInput.js.map +1 -1
- package/dist/components/CompareImage.d.ts.map +1 -1
- package/dist/components/CompareImage.js +2 -2
- package/dist/components/CompareImage.js.map +1 -1
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +10 -1
- package/dist/components/DateInput.js.map +1 -1
- package/dist/components/DatePicker.d.ts +2 -2
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +21 -14
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/DateRangeInput.js +3 -3
- package/dist/components/DateRangeInput.js.map +1 -1
- package/dist/components/Dialog.d.ts +1 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +14 -14
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/DropdownWrapper.d.ts +8 -3
- package/dist/components/DropdownWrapper.d.ts.map +1 -1
- package/dist/components/DropdownWrapper.js +17 -6
- package/dist/components/DropdownWrapper.js.map +1 -1
- package/dist/components/Effect.d.ts +41 -0
- package/dist/components/Effect.d.ts.map +1 -0
- package/dist/components/Effect.js +30 -0
- package/dist/components/Effect.js.map +1 -0
- package/dist/components/ElementType.d.ts +2 -1
- package/dist/components/ElementType.d.ts.map +1 -1
- package/dist/components/ElementType.js +4 -2
- package/dist/components/ElementType.js.map +1 -1
- package/dist/components/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker.js +1 -1
- package/dist/components/EmojiPicker.js.map +1 -1
- package/dist/components/Feedback.d.ts +1 -1
- package/dist/components/Feedback.d.ts.map +1 -1
- package/dist/components/Feedback.js +2 -2
- package/dist/components/Feedback.js.map +1 -1
- package/dist/components/Flex.d.ts.map +1 -1
- package/dist/components/Flex.js +46 -5
- package/dist/components/Flex.js.map +1 -1
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconButton.d.ts +1 -1
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +4 -4
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/InfoTip.d.ts +17 -0
- package/dist/components/InfoTip.d.ts.map +1 -0
- package/dist/components/InfoTip.js +12 -0
- package/dist/components/InfoTip.js.map +1 -0
- package/dist/components/Input.d.ts +11 -5
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +32 -16
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Input.module.scss +313 -1
- package/dist/components/InteractiveDetails.d.ts.map +1 -1
- package/dist/components/InteractiveDetails.js +1 -1
- package/dist/components/InteractiveDetails.js.map +1 -1
- package/dist/components/Kbd.d.ts.map +1 -1
- package/dist/components/Kbd.js +4 -1
- package/dist/components/Kbd.js.map +1 -1
- package/dist/components/Logo.d.ts +16 -4
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Logo.js +32 -14
- package/dist/components/Logo.js.map +1 -1
- package/dist/components/Media.d.ts +9 -2
- package/dist/components/Media.d.ts.map +1 -1
- package/dist/components/Media.js +25 -16
- package/dist/components/Media.js.map +1 -1
- package/dist/components/MediaAudioPlayer.d.ts +29 -0
- package/dist/components/MediaAudioPlayer.d.ts.map +1 -0
- package/dist/components/MediaAudioPlayer.js +115 -0
- package/dist/components/MediaAudioPlayer.js.map +1 -0
- package/dist/components/MediaAudioPlayer.module.scss +38 -0
- package/dist/components/Modal.d.ts +1 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +10 -10
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/NavGroup.d.ts +33 -0
- package/dist/components/NavGroup.d.ts.map +1 -0
- package/dist/components/NavGroup.js +27 -0
- package/dist/components/NavGroup.js.map +1 -0
- package/dist/components/NavIcon.d.ts +1 -1
- package/dist/components/NavIcon.d.ts.map +1 -1
- package/dist/components/NavIcon.js +2 -2
- package/dist/components/NavIcon.js.map +1 -1
- package/dist/components/NavItem.d.ts +24 -0
- package/dist/components/NavItem.d.ts.map +1 -0
- package/dist/components/NavItem.js +18 -0
- package/dist/components/NavItem.js.map +1 -0
- package/dist/components/NumberInput.js +1 -1
- package/dist/components/NumberInput.js.map +1 -1
- package/dist/components/OgCard.d.ts.map +1 -1
- package/dist/components/OgCard.js +7 -4
- package/dist/components/OgCard.js.map +1 -1
- package/dist/components/Option.d.ts +3 -3
- package/dist/components/Option.d.ts.map +1 -1
- package/dist/components/Option.js +2 -2
- package/dist/components/Option.js.map +1 -1
- package/dist/components/Particle.d.ts +2 -2
- package/dist/components/Particle.d.ts.map +1 -1
- package/dist/components/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput.js +2 -2
- package/dist/components/PasswordInput.js.map +1 -1
- package/dist/components/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar.js +2 -2
- package/dist/components/ProgressBar.js.map +1 -1
- package/dist/components/Pulse.d.ts +1 -1
- package/dist/components/Pulse.d.ts.map +1 -1
- package/dist/components/Pulse.js +2 -2
- package/dist/components/Pulse.js.map +1 -1
- package/dist/components/RadioButton.d.ts +2 -2
- package/dist/components/RadioButton.d.ts.map +1 -1
- package/dist/components/RadioButton.js +1 -1
- package/dist/components/RadioButton.js.map +1 -1
- package/dist/components/RevealFx.d.ts +2 -1
- package/dist/components/RevealFx.d.ts.map +1 -1
- package/dist/components/RevealFx.js +8 -8
- package/dist/components/RevealFx.js.map +1 -1
- package/dist/components/ScrollContainer.d.ts.map +1 -1
- package/dist/components/ScrollContainer.js +1 -1
- package/dist/components/ScrollContainer.js.map +1 -1
- package/dist/components/Scrubber.d.ts +70 -0
- package/dist/components/Scrubber.d.ts.map +1 -0
- package/dist/components/Scrubber.js +161 -0
- package/dist/components/Scrubber.js.map +1 -0
- package/dist/components/SegmentedControl.d.ts +4 -4
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +11 -11
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +48 -15
- package/dist/components/Select.js.map +1 -1
- package/dist/components/ServerFlex.d.ts +0 -1
- package/dist/components/ServerFlex.d.ts.map +1 -1
- package/dist/components/ServerFlex.js +99 -52
- package/dist/components/ServerFlex.js.map +1 -1
- package/dist/components/ServerGrid.d.ts +0 -1
- package/dist/components/ServerGrid.d.ts.map +1 -1
- package/dist/components/ServerGrid.js +11 -9
- package/dist/components/ServerGrid.js.map +1 -1
- package/dist/components/Setting.d.ts +50 -0
- package/dist/components/Setting.d.ts.map +1 -0
- package/dist/components/Setting.js +43 -0
- package/dist/components/Setting.js.map +1 -0
- package/dist/components/ShineFx.d.ts +1 -0
- package/dist/components/ShineFx.d.ts.map +1 -1
- package/dist/components/ShineFx.js +2 -2
- package/dist/components/ShineFx.js.map +1 -1
- package/dist/components/Skeleton.d.ts +16 -3
- package/dist/components/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton.js +2 -2
- package/dist/components/Skeleton.js.map +1 -1
- package/dist/components/Skeleton.module.scss +14 -51
- package/dist/components/SplitView.d.ts +23 -3
- package/dist/components/SplitView.d.ts.map +1 -1
- package/dist/components/SplitView.js +90 -58
- package/dist/components/SplitView.js.map +1 -1
- package/dist/components/StyleOverlay.d.ts.map +1 -1
- package/dist/components/StyleOverlay.js +1 -1
- package/dist/components/StyleOverlay.js.map +1 -1
- package/dist/components/StylePanel.d.ts +47 -6
- package/dist/components/StylePanel.d.ts.map +1 -1
- package/dist/components/StylePanel.js +16 -189
- package/dist/components/StylePanel.js.map +1 -1
- package/dist/components/StylePanel.module.scss +6 -1
- package/dist/components/StylePanelSections.d.ts +117 -0
- package/dist/components/StylePanelSections.d.ts.map +1 -0
- package/dist/components/StylePanelSections.js +175 -0
- package/dist/components/StylePanelSections.js.map +1 -0
- package/dist/components/Swiper.d.ts +7 -1
- package/dist/components/Swiper.d.ts.map +1 -1
- package/dist/components/Swiper.js +7 -7
- package/dist/components/Swiper.js.map +1 -1
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +4 -4
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Table.d.ts.map +1 -1
- package/dist/components/Table.js +4 -4
- package/dist/components/Table.js.map +1 -1
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/Tag.d.ts.map +1 -1
- package/dist/components/Tag.js +2 -2
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/Textarea.d.ts +15 -5
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +31 -17
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/ThemeSwitcher.d.ts +14 -1
- package/dist/components/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/ThemeSwitcher.js +19 -9
- package/dist/components/ThemeSwitcher.js.map +1 -1
- package/dist/components/ThemeSwitcher.module.scss +54 -0
- package/dist/components/Toast.d.ts +1 -1
- package/dist/components/Toast.d.ts.map +1 -1
- package/dist/components/Toast.js +2 -2
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/ToggleButton.d.ts +9 -2
- package/dist/components/ToggleButton.d.ts.map +1 -1
- package/dist/components/ToggleButton.js +5 -5
- package/dist/components/ToggleButton.js.map +1 -1
- package/dist/components/User.js +1 -1
- package/dist/components/User.js.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -1
- package/dist/contexts/AdapterProvider.d.ts +50 -0
- package/dist/contexts/AdapterProvider.d.ts.map +1 -0
- package/dist/contexts/AdapterProvider.js +91 -0
- package/dist/contexts/AdapterProvider.js.map +1 -0
- package/dist/contexts/IconProvider.d.ts +2 -2
- package/dist/contexts/IconProvider.d.ts.map +1 -1
- package/dist/contexts/IconProvider.js +2 -2
- package/dist/contexts/IconProvider.js.map +1 -1
- package/dist/contexts/LayoutProvider.d.ts +0 -2
- package/dist/contexts/LayoutProvider.d.ts.map +1 -1
- package/dist/contexts/LayoutProvider.js +15 -10
- package/dist/contexts/LayoutProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider.d.ts +29 -1
- package/dist/contexts/ThemeProvider.d.ts.map +1 -1
- package/dist/contexts/ThemeProvider.js +42 -15
- package/dist/contexts/ThemeProvider.js.map +1 -1
- package/dist/contexts/index.d.ts +3 -2
- package/dist/contexts/index.d.ts.map +1 -1
- package/dist/contexts/index.js +3 -2
- package/dist/contexts/index.js.map +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/data/emoji-data.json +8 -10
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/icons/ATTRIBUTION.md +19 -0
- package/dist/icons/data.d.ts +1919 -0
- package/dist/icons/data.d.ts.map +1 -0
- package/dist/icons/data.js +102 -0
- package/dist/icons/data.js.map +1 -0
- package/dist/icons/renderIcon.d.ts +26 -0
- package/dist/icons/renderIcon.d.ts.map +1 -0
- package/dist/icons/renderIcon.js +22 -0
- package/dist/icons/renderIcon.js.map +1 -0
- package/dist/icons.d.ts +35 -4
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +13 -60
- package/dist/icons.js.map +1 -1
- package/dist/modules/code/CodeBlock.impl.d.ts +2 -1
- package/dist/modules/code/CodeBlock.impl.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.impl.js +7 -2
- package/dist/modules/code/CodeBlock.impl.js.map +1 -1
- package/dist/modules/data/ChartHeader.d.ts.map +1 -1
- package/dist/modules/data/ChartHeader.js +1 -1
- package/dist/modules/data/ChartHeader.js.map +1 -1
- package/dist/modules/data/DataTooltip.d.ts +1 -1
- package/dist/modules/data/DataTooltip.d.ts.map +1 -1
- package/dist/modules/data/DataTooltip.js +2 -2
- package/dist/modules/data/DataTooltip.js.map +1 -1
- package/dist/modules/data/LinearGauge.d.ts +3 -2
- package/dist/modules/data/LinearGauge.d.ts.map +1 -1
- package/dist/modules/data/LinearGauge.js +1 -1
- package/dist/modules/data/LinearGauge.js.map +1 -1
- package/dist/modules/data/PieChart.impl.d.ts +1 -1
- package/dist/modules/data/PieChart.impl.d.ts.map +1 -1
- package/dist/modules/data/PieChart.impl.js +4 -1
- package/dist/modules/data/PieChart.impl.js.map +1 -1
- package/dist/modules/data/RadialGauge.d.ts +3 -2
- package/dist/modules/data/RadialGauge.d.ts.map +1 -1
- package/dist/modules/data/RadialGauge.js +1 -1
- package/dist/modules/data/RadialGauge.js.map +1 -1
- package/dist/modules/data/interfaces.d.ts +12 -3
- package/dist/modules/data/interfaces.d.ts.map +1 -1
- package/dist/modules/index.d.ts +1 -4
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +9 -3
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/media/MediaUpload.impl.d.ts +1 -1
- package/dist/modules/media/MediaUpload.impl.d.ts.map +1 -1
- package/dist/modules/media/MediaUpload.impl.js +1 -1
- package/dist/modules/media/MediaUpload.impl.js.map +1 -1
- package/dist/modules/navigation/Kbar.d.ts +5 -4
- package/dist/modules/navigation/Kbar.d.ts.map +1 -1
- package/dist/modules/navigation/Kbar.js +32 -35
- package/dist/modules/navigation/Kbar.js.map +1 -1
- package/dist/modules/navigation/MegaMenu.d.ts +5 -3
- package/dist/modules/navigation/MegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MegaMenu.js +24 -12
- package/dist/modules/navigation/MegaMenu.js.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.d.ts +3 -2
- package/dist/modules/navigation/MobileMegaMenu.d.ts.map +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js +1 -1
- package/dist/modules/navigation/MobileMegaMenu.js.map +1 -1
- package/dist/modules/seo/Meta.d.ts +40 -2
- package/dist/modules/seo/Meta.d.ts.map +1 -1
- package/dist/modules/seo/Meta.js.map +1 -1
- package/dist/modules/seo/Schema.d.ts.map +1 -1
- package/dist/modules/seo/Schema.js +1 -2
- package/dist/modules/seo/Schema.js.map +1 -1
- package/dist/next/index.d.ts +35 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +56 -0
- package/dist/next/index.js.map +1 -0
- package/dist/package.json +52 -7
- package/dist/scripts/init-agent.js +156 -0
- package/dist/scripts/validate-ai-code.js +431 -0
- package/dist/server/og-utils.d.ts +9 -3
- package/dist/server/og-utils.d.ts.map +1 -1
- package/dist/server/og-utils.js +15 -9
- package/dist/server/og-utils.js.map +1 -1
- package/dist/styles/breakpoints.scss +16 -5
- package/dist/test/setup.js +21 -0
- package/dist/test/setup.js.map +1 -1
- package/dist/types.d.ts +13 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/colorScheme.d.ts +35 -0
- package/dist/utils/colorScheme.d.ts.map +1 -0
- package/dist/utils/colorScheme.js +140 -0
- package/dist/utils/colorScheme.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/navMatch.d.ts +21 -0
- package/dist/utils/navMatch.d.ts.map +1 -0
- package/dist/utils/navMatch.js +26 -0
- package/dist/utils/navMatch.js.map +1 -0
- package/package.json +66 -11
- package/scripts/validate-ai-code.js +309 -27
- package/dist/css/styles.css.map +0 -1
- package/dist/css/tokens.css.map +0 -1
- package/dist/hooks/useResponsiveClasses.d.ts +0 -9
- package/dist/hooks/useResponsiveClasses.d.ts.map +0 -1
- package/dist/hooks/useResponsiveClasses.js +0 -293
- package/dist/hooks/useResponsiveClasses.js.map +0 -1
- package/dist/styles/background.scss +0 -423
- package/dist/styles/border.scss +0 -546
- package/dist/styles/color.scss +0 -183
- package/dist/styles/display.scss +0 -391
- package/dist/styles/flex.scss +0 -518
- package/dist/styles/global.scss +0 -36
- package/dist/styles/grid.scss +0 -293
- package/dist/styles/index.scss +0 -14
- package/dist/styles/position.scss +0 -1549
- package/dist/styles/shadow.scss +0 -19
- package/dist/styles/size.scss +0 -53
- package/dist/styles/spacing.scss +0 -1505
- package/dist/styles/typography.scss +0 -223
- package/dist/styles/utilities.scss +0 -23
- package/dist/tokens/border.scss +0 -95
- package/dist/tokens/data.scss +0 -107
- package/dist/tokens/function.scss +0 -742
- package/dist/tokens/index.scss +0 -8
- package/dist/tokens/layout.scss +0 -275
- package/dist/tokens/scheme.scss +0 -352
- package/dist/tokens/shadow.scss +0 -7
- package/dist/tokens/theme.scss +0 -657
- package/dist/tokens/typography.scss +0 -118
- package/next-env.d.ts +0 -5
- package/scripts/copy-files.js +0 -103
- package/scripts/generate-ai-spec.js +0 -464
- package/scripts/generate-emoji-data.js +0 -128
- package/scss.d.ts +0 -4
- package/tsconfig.vitest.json +0 -20
- package/vitest.config.ts +0 -19
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type StaticSpacingToken = "0" | "1" | "2" | "4" | "8" | "12" | "16" | "20" | "24" | "32" | "40" | "48" | "56" | "64" | "80" | "104" | "128" | "160";
|
|
1
|
+
export type StaticSpacingToken = "0" | "1" | "2" | "4" | "8" | "12" | "16" | "20" | "24" | "32" | "40" | "48" | "56" | "64" | "72" | "80" | "104" | "128" | "160";
|
|
2
2
|
export declare const schemes: string[];
|
|
3
3
|
export type Schemes = "blue" | "indigo" | "violet" | "magenta" | "pink" | "red" | "orange" | "yellow" | "moss" | "green" | "emerald" | "aqua" | "cyan";
|
|
4
4
|
export type CondensedTShirtSizes = "s" | "m" | "l";
|
|
@@ -12,6 +12,18 @@ export type ColorScheme = "neutral" | "brand" | "accent" | "info" | "danger" | "
|
|
|
12
12
|
export type ColorCategory = "on-solid" | "on-background";
|
|
13
13
|
export type ColorWeight = "weak" | "medium" | "strong";
|
|
14
14
|
export type Colors = `${ColorScheme}-${ColorWeight}` | `${ColorScheme}-alpha-${ColorWeight}`;
|
|
15
|
+
/**
|
|
16
|
+
* A design token, or any CSS colour.
|
|
17
|
+
*
|
|
18
|
+
* The `(string & {})` arm is what keeps token autocomplete alive: a bare
|
|
19
|
+
* `Colors | string` collapses to `string` and the editor stops suggesting
|
|
20
|
+
* anything, whereas this keeps the literal union suggestible while still
|
|
21
|
+
* accepting `#fff`, `rgb(...)` or `var(...)`.
|
|
22
|
+
*
|
|
23
|
+
* Used where a value is painted into SVG or canvas rather than through a class,
|
|
24
|
+
* so a raw CSS colour is a legitimate escape hatch rather than a mistake.
|
|
25
|
+
*/
|
|
26
|
+
export type ColorValue = Colors | (string & {});
|
|
15
27
|
export type RadiusSize = TShirtSizes | "full" | "none";
|
|
16
28
|
export type RadiusNest = "4" | "8";
|
|
17
29
|
export type TextType = "body" | "heading" | "display" | "label" | "code";
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM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AAQ,GACR,GAAG,GACH,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,OAAO,GACP,UAAU,GACV,MAAM,GACN,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,eAAe,GACf,OAAO,GACP,WAAW,GACX,QAAQ,GACR,KAAK,GACL,UAAU,GACV,eAAe,GACf,KAAK,GACL,QAAQ,GACR,YAAY,GACZ,KAAK,GACL,KAAK,GACL,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,eAAe,GACf,OAAO,GACP,SAAS,GACT,OAAO,GACP,eAAe,GACf,OAAO,GACP,KAAK,GACL,KAAK,GACL,SAAS,GACT,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,SAAS,GACT,KAAK,GACL,GAAG,GACH,MAAM,GACN,OAAO,GACP,UAAU,GACV,SAAS,GACT,MAAM,GACN,KAAK,GACL,cAAc,GACd,YAAY,GACZ,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,CAAC;AAEV,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,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ACV,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,eAAe,GACf,OAAO,GACP,WAAW,GACX,QAAQ,GACR,KAAK,GACL,UAAU,GACV,eAAe,GACf,KAAK,GACL,QAAQ,GACR,YAAY,GACZ,KAAK,GACL,KAAK,GACL,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,eAAe,GACf,OAAO,GACP,SAAS,GACT,OAAO,GACP,eAAe,GACf,OAAO,GACP,KAAK,GACL,KAAK,GACL,SAAS,GACT,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,SAAS,GACT,KAAK,GACL,GAAG,GACH,MAAM,GACN,OAAO,GACP,UAAU,GACV,SAAS,GACT,MAAM,GACN,KAAK,GACL,cAAc,GACd,YAAY,GACZ,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,CAAC;AAEV,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,MAAM;CACP,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a 12-step Once UI colour ramp from one seed colour.
|
|
3
|
+
*
|
|
4
|
+
* Steps are anchored to a contrast ratio against black rather than to fixed
|
|
5
|
+
* lightness values, so a generated ramp keeps the same contrast relationships
|
|
6
|
+
* as the built-in schemes no matter which hue it is built from.
|
|
7
|
+
*
|
|
8
|
+
* Hue and chroma are taken from the seed and held constant; only lightness
|
|
9
|
+
* moves. That was measured against the 19 hand-tuned schemes rather than
|
|
10
|
+
* assumed: their hue drift averages to nothing across the set (each scheme
|
|
11
|
+
* drifts its own way, so there is no house curve to copy), and reproducing
|
|
12
|
+
* their chroma arc made the match worse, not better.
|
|
13
|
+
*
|
|
14
|
+
* What does matter is staying inside the gamut. A chroma that exists at the
|
|
15
|
+
* seed's lightness usually does not exist at 0.98, and clamping the red,
|
|
16
|
+
* green and blue channels separately — which is what converting an
|
|
17
|
+
* out-of-range colour to hex does — shifts the hue as it clips. Reducing
|
|
18
|
+
* chroma until the colour fits instead cuts the worst error across the
|
|
19
|
+
* built-in schemes from 0.168 to 0.110 in OKLab ΔE, and roughly five-fold on
|
|
20
|
+
* the lightest steps, where clipping is worst.
|
|
21
|
+
*/
|
|
22
|
+
export type SchemeRampWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 1200;
|
|
23
|
+
export type SchemeRamp = Record<SchemeRampWeight, string>;
|
|
24
|
+
/** Contrast against black for each step, matching the built-in schemes. */
|
|
25
|
+
export declare const defaultContrastRatios: [SchemeRampWeight, number][];
|
|
26
|
+
/**
|
|
27
|
+
* Build a scheme from a seed colour. Accepts hex, `rgb()`/`rgba()` or
|
|
28
|
+
* `oklch()` — which covers what `ColorInput` produces with and without
|
|
29
|
+
* `supportAlpha`. Returns `null` if the seed cannot be parsed, so a caller
|
|
30
|
+
* can leave the current scheme in place rather than apply something wrong.
|
|
31
|
+
*/
|
|
32
|
+
export declare function generateColorScheme(seed: string, ratios?: [SchemeRampWeight, number][]): SchemeRamp | null;
|
|
33
|
+
/** The three translucent variants of step 600 that the token set expects. */
|
|
34
|
+
export declare function schemeAlphaVariants(scheme: SchemeRamp): Record<string, string>;
|
|
35
|
+
//# sourceMappingURL=colorScheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorScheme.d.ts","sourceRoot":"","sources":["../../src/utils/colorScheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,MAAM,gBAAgB,GACxB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GACjC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAE1D,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,EAAE,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAG7D,CAAC;AAsGF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,CAAC,gBAAgB,EAAE,MAAM,CAAC,EAA0B,GAC3D,UAAU,GAAG,IAAI,CAUnB;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQ9E"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a 12-step Once UI colour ramp from one seed colour.
|
|
3
|
+
*
|
|
4
|
+
* Steps are anchored to a contrast ratio against black rather than to fixed
|
|
5
|
+
* lightness values, so a generated ramp keeps the same contrast relationships
|
|
6
|
+
* as the built-in schemes no matter which hue it is built from.
|
|
7
|
+
*
|
|
8
|
+
* Hue and chroma are taken from the seed and held constant; only lightness
|
|
9
|
+
* moves. That was measured against the 19 hand-tuned schemes rather than
|
|
10
|
+
* assumed: their hue drift averages to nothing across the set (each scheme
|
|
11
|
+
* drifts its own way, so there is no house curve to copy), and reproducing
|
|
12
|
+
* their chroma arc made the match worse, not better.
|
|
13
|
+
*
|
|
14
|
+
* What does matter is staying inside the gamut. A chroma that exists at the
|
|
15
|
+
* seed's lightness usually does not exist at 0.98, and clamping the red,
|
|
16
|
+
* green and blue channels separately — which is what converting an
|
|
17
|
+
* out-of-range colour to hex does — shifts the hue as it clips. Reducing
|
|
18
|
+
* chroma until the colour fits instead cuts the worst error across the
|
|
19
|
+
* built-in schemes from 0.168 to 0.110 in OKLab ΔE, and roughly five-fold on
|
|
20
|
+
* the lightest steps, where clipping is worst.
|
|
21
|
+
*/
|
|
22
|
+
/** Contrast against black for each step, matching the built-in schemes. */
|
|
23
|
+
export const defaultContrastRatios = [
|
|
24
|
+
[100, 1.05], [200, 1.15], [300, 2], [400, 3], [500, 4.5], [600, 7],
|
|
25
|
+
[700, 10], [800, 14], [900, 16], [1000, 18], [1100, 19], [1200, 20],
|
|
26
|
+
];
|
|
27
|
+
const clamp01 = (n) => Math.min(1, Math.max(0, n));
|
|
28
|
+
function parseSeed(input) {
|
|
29
|
+
const value = input.trim();
|
|
30
|
+
const oklch = value.match(/^oklch\(\s*([\d.]+%?)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*[\d.]+%?)?\s*\)$/i);
|
|
31
|
+
if (oklch) {
|
|
32
|
+
const l = oklch[1].endsWith("%") ? parseFloat(oklch[1]) / 100 : parseFloat(oklch[1]);
|
|
33
|
+
return { l, c: parseFloat(oklch[2]), h: parseFloat(oklch[3]) };
|
|
34
|
+
}
|
|
35
|
+
const rgb = value.match(/^rgba?\(([^)]+)\)$/i);
|
|
36
|
+
if (rgb) {
|
|
37
|
+
const parts = rgb[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);
|
|
38
|
+
if (parts.length >= 3)
|
|
39
|
+
return srgbToOklch(parts[0] / 255, parts[1] / 255, parts[2] / 255);
|
|
40
|
+
}
|
|
41
|
+
let hex = value.replace(/^#/, "");
|
|
42
|
+
if (hex.length === 3 || hex.length === 4)
|
|
43
|
+
hex = hex.split("").map((d) => d + d).join("");
|
|
44
|
+
if (hex.length === 6 || hex.length === 8) {
|
|
45
|
+
const n = Number.parseInt(hex.slice(0, 6), 16);
|
|
46
|
+
if (!Number.isNaN(n)) {
|
|
47
|
+
return srgbToOklch(((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const toLinear = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
|
|
53
|
+
function srgbToOklch(r, g, b) {
|
|
54
|
+
const [lr, lg, lb] = [toLinear(r), toLinear(g), toLinear(b)];
|
|
55
|
+
const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
|
|
56
|
+
const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
|
|
57
|
+
const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
|
|
58
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
59
|
+
const a = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
60
|
+
const bb = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
61
|
+
return { l: L, c: Math.hypot(a, bb), h: ((Math.atan2(bb, a) * 180) / Math.PI + 360) % 360 };
|
|
62
|
+
}
|
|
63
|
+
/** Linear sRGB, which may fall outside 0–1 when the colour is out of gamut. */
|
|
64
|
+
function oklchToLinearSrgb({ l: L, c, h }) {
|
|
65
|
+
const a = c * Math.cos((h * Math.PI) / 180);
|
|
66
|
+
const b = c * Math.sin((h * Math.PI) / 180);
|
|
67
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
68
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
69
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
70
|
+
return [
|
|
71
|
+
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
|
72
|
+
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
|
73
|
+
-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
const inGamut = (lch) => oklchToLinearSrgb(lch).every((channel) => channel >= -1e-4 && channel <= 1 + 1e-4);
|
|
77
|
+
/** The most chroma this hue and lightness can carry inside sRGB. */
|
|
78
|
+
function fitChroma(lch) {
|
|
79
|
+
if (inGamut(lch))
|
|
80
|
+
return lch;
|
|
81
|
+
let low = 0;
|
|
82
|
+
let high = lch.c;
|
|
83
|
+
for (let i = 0; i < 24; i++) {
|
|
84
|
+
const mid = (low + high) / 2;
|
|
85
|
+
if (inGamut({ ...lch, c: mid }))
|
|
86
|
+
low = mid;
|
|
87
|
+
else
|
|
88
|
+
high = mid;
|
|
89
|
+
}
|
|
90
|
+
return { ...lch, c: low };
|
|
91
|
+
}
|
|
92
|
+
/** WCAG relative luminance, which is what a contrast ratio is built from. */
|
|
93
|
+
function luminance(lch) {
|
|
94
|
+
const [r, g, b] = oklchToLinearSrgb(lch).map(clamp01);
|
|
95
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
96
|
+
}
|
|
97
|
+
const contrastAgainstBlack = (lch) => (luminance(lch) + 0.05) / 0.05;
|
|
98
|
+
/** The lightness whose contrast against black is closest to `ratio`. */
|
|
99
|
+
function lightnessForContrast(ratio, c, h) {
|
|
100
|
+
let low = 0;
|
|
101
|
+
let high = 1;
|
|
102
|
+
for (let i = 0; i < 24; i++) {
|
|
103
|
+
const mid = (low + high) / 2;
|
|
104
|
+
if (contrastAgainstBlack(fitChroma({ l: mid, c, h })) < ratio)
|
|
105
|
+
low = mid;
|
|
106
|
+
else
|
|
107
|
+
high = mid;
|
|
108
|
+
}
|
|
109
|
+
return (low + high) / 2;
|
|
110
|
+
}
|
|
111
|
+
const format = ({ l, c, h }, alpha) => `oklch(${l.toFixed(4)} ${c.toFixed(4)} ${c < 0.0005 ? 0 : h.toFixed(2)}${alpha === undefined ? "" : ` / ${alpha}`})`;
|
|
112
|
+
/**
|
|
113
|
+
* Build a scheme from a seed colour. Accepts hex, `rgb()`/`rgba()` or
|
|
114
|
+
* `oklch()` — which covers what `ColorInput` produces with and without
|
|
115
|
+
* `supportAlpha`. Returns `null` if the seed cannot be parsed, so a caller
|
|
116
|
+
* can leave the current scheme in place rather than apply something wrong.
|
|
117
|
+
*/
|
|
118
|
+
export function generateColorScheme(seed, ratios = defaultContrastRatios) {
|
|
119
|
+
const base = parseSeed(seed);
|
|
120
|
+
if (!base)
|
|
121
|
+
return null;
|
|
122
|
+
const scheme = {};
|
|
123
|
+
for (const [weight, ratio] of ratios) {
|
|
124
|
+
const l = lightnessForContrast(ratio, base.c, base.h);
|
|
125
|
+
scheme[weight] = format(fitChroma({ l, c: base.c, h: base.h }));
|
|
126
|
+
}
|
|
127
|
+
return scheme;
|
|
128
|
+
}
|
|
129
|
+
/** The three translucent variants of step 600 that the token set expects. */
|
|
130
|
+
export function schemeAlphaVariants(scheme) {
|
|
131
|
+
const base = parseSeed(scheme[600]);
|
|
132
|
+
if (!base)
|
|
133
|
+
return {};
|
|
134
|
+
return {
|
|
135
|
+
"600-15": format(base, 0.15),
|
|
136
|
+
"600-30": format(base, 0.3),
|
|
137
|
+
"600-50": format(base, 0.5),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=colorScheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorScheme.js","sourceRoot":"","sources":["../../src/utils/colorScheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAQH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAA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CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,mBAAmB,CAAC,MAAkB;IACpD,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;QAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC;KAC5B,CAAC;AACJ,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
package/dist/utils/index.js
CHANGED
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of a set of hrefs a pathname is currently on.
|
|
3
|
+
*
|
|
4
|
+
* A sidebar cannot decide this with `pathname === href`, because a nested
|
|
5
|
+
* route (`/settings/billing/invoices`) is on none of its links, and it cannot
|
|
6
|
+
* use `startsWith` either, because `/settings` is a prefix of every one of its
|
|
7
|
+
* children and would light up alongside them. The answer is the *longest*
|
|
8
|
+
* href that matches, which is the one lower in the tree.
|
|
9
|
+
*
|
|
10
|
+
* Lifted out of a product sidebar where it had been written once and copied
|
|
11
|
+
* nowhere — every other sidebar in the fleet got the highlight subtly wrong.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const hrefs = items.map((i) => i.href);
|
|
15
|
+
* const current = selectNavHref(pathname, hrefs);
|
|
16
|
+
* // then: selected={item.href === current}
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function selectNavHref(pathname: string, hrefs: string[]): string | null;
|
|
20
|
+
export { selectNavHref };
|
|
21
|
+
//# sourceMappingURL=navMatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navMatch.d.ts","sourceRoot":"","sources":["../../src/utils/navMatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of a set of hrefs a pathname is currently on.
|
|
3
|
+
*
|
|
4
|
+
* A sidebar cannot decide this with `pathname === href`, because a nested
|
|
5
|
+
* route (`/settings/billing/invoices`) is on none of its links, and it cannot
|
|
6
|
+
* use `startsWith` either, because `/settings` is a prefix of every one of its
|
|
7
|
+
* children and would light up alongside them. The answer is the *longest*
|
|
8
|
+
* href that matches, which is the one lower in the tree.
|
|
9
|
+
*
|
|
10
|
+
* Lifted out of a product sidebar where it had been written once and copied
|
|
11
|
+
* nowhere — every other sidebar in the fleet got the highlight subtly wrong.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const hrefs = items.map((i) => i.href);
|
|
15
|
+
* const current = selectNavHref(pathname, hrefs);
|
|
16
|
+
* // then: selected={item.href === current}
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
function selectNavHref(pathname, hrefs) {
|
|
20
|
+
const matches = hrefs.filter((href) => pathname === href || pathname.startsWith(`${href}/`));
|
|
21
|
+
if (matches.length === 0)
|
|
22
|
+
return null;
|
|
23
|
+
return matches.reduce((a, b) => (a.length >= b.length ? a : b));
|
|
24
|
+
}
|
|
25
|
+
export { selectNavHref };
|
|
26
|
+
//# sourceMappingURL=navMatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navMatch.js","sourceRoot":"","sources":["../../src/utils/navMatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,aAAa,CAAC,QAAgB,EAAE,KAAe;IACtD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;IAC7F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@once-ui-system/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"tag": "alpha"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"ai",
|
|
11
|
+
"agent",
|
|
12
|
+
"AGENTS.md",
|
|
13
|
+
"scripts/init-agent.js",
|
|
14
|
+
"scripts/validate-ai-code.js"
|
|
15
|
+
],
|
|
4
16
|
"description": "Once UI for Next.js NPM package",
|
|
5
17
|
"keywords": [
|
|
6
18
|
"once-ui",
|
|
@@ -99,6 +111,11 @@
|
|
|
99
111
|
"import": "./dist/server/index.js",
|
|
100
112
|
"require": "./dist/server/index.js"
|
|
101
113
|
},
|
|
114
|
+
"./next": {
|
|
115
|
+
"types": "./dist/next/index.d.ts",
|
|
116
|
+
"import": "./dist/next/index.js",
|
|
117
|
+
"require": "./dist/next/index.js"
|
|
118
|
+
},
|
|
102
119
|
"./ai/manifest.json": "./ai/manifest.json",
|
|
103
120
|
"./ai/spec.json": "./ai/spec.json",
|
|
104
121
|
"./ai/catalog.json": "./ai/catalog.json",
|
|
@@ -106,15 +123,33 @@
|
|
|
106
123
|
"./ai/rules.compact.md": "./ai/rules.compact.md",
|
|
107
124
|
"./ai/rules.md": "./ai/rules.md",
|
|
108
125
|
"./ai/recipes.md": "./ai/recipes.md",
|
|
126
|
+
"./ai/layouts.md": "./ai/layouts.md",
|
|
109
127
|
"./ai/tasks/*": "./ai/tasks/*",
|
|
110
128
|
"./ai/components/*": "./ai/components/*",
|
|
111
129
|
"./ai/examples/*": "./ai/examples/*",
|
|
112
130
|
"./ai/examples/blocks/*": "./ai/examples/blocks/*",
|
|
113
|
-
"./AGENTS.md": "./AGENTS.md"
|
|
131
|
+
"./AGENTS.md": "./AGENTS.md",
|
|
132
|
+
"./data": {
|
|
133
|
+
"types": "./dist/modules/data/index.d.ts",
|
|
134
|
+
"import": "./dist/modules/data/index.js",
|
|
135
|
+
"require": "./dist/modules/data/index.js"
|
|
136
|
+
},
|
|
137
|
+
"./code": {
|
|
138
|
+
"types": "./dist/modules/code/index.d.ts",
|
|
139
|
+
"import": "./dist/modules/code/index.js",
|
|
140
|
+
"require": "./dist/modules/code/index.js"
|
|
141
|
+
},
|
|
142
|
+
"./media": {
|
|
143
|
+
"types": "./dist/modules/media/index.d.ts",
|
|
144
|
+
"import": "./dist/modules/media/index.js",
|
|
145
|
+
"require": "./dist/modules/media/index.js"
|
|
146
|
+
},
|
|
147
|
+
"./package.json": "./package.json"
|
|
114
148
|
},
|
|
115
149
|
"scripts": {
|
|
116
|
-
"build": "pnpm clean && pnpm generate-emoji-data && pnpm generate-ai-spec && tsc --project tsconfig.build.json && pnpm copy-files && pnpm build:css",
|
|
117
|
-
"
|
|
150
|
+
"build": "pnpm clean && pnpm sync-foundations && pnpm generate-emoji-data && pnpm generate-ai-spec && tsc --project tsconfig.build.json && pnpm copy-files && pnpm build:css",
|
|
151
|
+
"sync-foundations": "node scripts/sync-foundations.js scss",
|
|
152
|
+
"build:css": "node scripts/sync-foundations.js css",
|
|
118
153
|
"copy-files": "node scripts/copy-files.js",
|
|
119
154
|
"clean": "rimraf dist",
|
|
120
155
|
"prepare": "pnpm build",
|
|
@@ -122,6 +157,7 @@
|
|
|
122
157
|
"format": "biome format --write .",
|
|
123
158
|
"format:check": "biome format .",
|
|
124
159
|
"test": "vitest run",
|
|
160
|
+
"check:package": "publint && attw --pack .",
|
|
125
161
|
"test:watch": "vitest",
|
|
126
162
|
"typecheck": "tsc --noEmit",
|
|
127
163
|
"dev": "tsc --watch --preserveWatchOutput",
|
|
@@ -129,31 +165,48 @@
|
|
|
129
165
|
"generate-emoji-data": "node scripts/generate-emoji-data.js",
|
|
130
166
|
"generate-ai-spec": "node scripts/generate-ai-spec.js",
|
|
131
167
|
"init-agent": "node scripts/init-agent.js",
|
|
132
|
-
"validate-ai-code": "node scripts/validate-ai-code.js"
|
|
168
|
+
"validate-ai-code": "node scripts/validate-ai-code.js",
|
|
169
|
+
"generate-icons": "node scripts/generate-icons.mjs"
|
|
133
170
|
},
|
|
134
171
|
"dependencies": {
|
|
135
172
|
"@floating-ui/react-dom": "^2.1.9",
|
|
136
173
|
"clsx": "^2.1.1",
|
|
137
|
-
"
|
|
138
|
-
"date-fns": "^4.4.0",
|
|
139
|
-
"prismjs": "^1.30.0",
|
|
140
|
-
"react-icons": "^5.7.0",
|
|
141
|
-
"recharts": "^3.10.1"
|
|
174
|
+
"date-fns": "^4.4.0"
|
|
142
175
|
},
|
|
143
176
|
"peerDependencies": {
|
|
144
177
|
"next": ">=15.5",
|
|
145
178
|
"react": ">=18",
|
|
146
179
|
"react-dom": ">=18",
|
|
147
180
|
"sass": "^1.77.6",
|
|
148
|
-
"sharp": "^0.33.4 || ^0.34 || ^0.35"
|
|
181
|
+
"sharp": "^0.33.4 || ^0.34 || ^0.35",
|
|
182
|
+
"recharts": "^3.10.1",
|
|
183
|
+
"prismjs": "^1.30.0",
|
|
184
|
+
"compressorjs": "^1.3.0"
|
|
149
185
|
},
|
|
150
186
|
"peerDependenciesMeta": {
|
|
187
|
+
"next": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
190
|
+
"sass": {
|
|
191
|
+
"optional": true
|
|
192
|
+
},
|
|
151
193
|
"sharp": {
|
|
152
194
|
"optional": true
|
|
195
|
+
},
|
|
196
|
+
"recharts": {
|
|
197
|
+
"optional": true
|
|
198
|
+
},
|
|
199
|
+
"prismjs": {
|
|
200
|
+
"optional": true
|
|
201
|
+
},
|
|
202
|
+
"compressorjs": {
|
|
203
|
+
"optional": true
|
|
153
204
|
}
|
|
154
205
|
},
|
|
155
206
|
"devDependencies": {
|
|
207
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
156
208
|
"@biomejs/biome": "2.5.6",
|
|
209
|
+
"@once-ui-system/foundations": "workspace:*",
|
|
157
210
|
"@testing-library/jest-dom": "^7.0.0",
|
|
158
211
|
"@testing-library/react": "^16.3.2",
|
|
159
212
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -162,6 +215,8 @@
|
|
|
162
215
|
"@types/react-dom": "19.2.3",
|
|
163
216
|
"@vitest/ui": "^4.1.10",
|
|
164
217
|
"jsdom": "^30.0.0",
|
|
218
|
+
"publint": "^0.3.23",
|
|
219
|
+
"react-icons": "^5.7.0",
|
|
165
220
|
"rimraf": "^6.1.3",
|
|
166
221
|
"typescript": "6.0.3",
|
|
167
222
|
"vitest": "^4.1.10"
|