@windmorph/react 0.0.0-stage → 0.1.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 -0
- package/NOTICE +23 -0
- package/README.md +149 -2
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +112 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/app-bar/AppBarItems.js +23 -0
- package/dist/components/app-bar/AppBarItems.js.map +1 -0
- package/dist/components/app-bar/TopAppBar.d.ts +89 -0
- package/dist/components/app-bar/TopAppBar.js +103 -0
- package/dist/components/app-bar/TopAppBar.js.map +1 -0
- package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
- package/dist/components/app-bar/app-bar-styles.js +142 -0
- package/dist/components/app-bar/app-bar-styles.js.map +1 -0
- package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
- package/dist/components/app-bar/app-bar-tokens.js +64 -0
- package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
- package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
- package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
- package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
- package/dist/components/autocomplete/Autocomplete.js +284 -0
- package/dist/components/autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +71 -0
- package/dist/components/badge/Badge.js +72 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/badge-styles.d.ts +100 -0
- package/dist/components/badge/badge-styles.js +43 -0
- package/dist/components/badge/badge-styles.js.map +1 -0
- package/dist/components/badge/badge-tokens.d.ts +7 -0
- package/dist/components/badge/badge-tokens.js +40 -0
- package/dist/components/badge/badge-tokens.js.map +1 -0
- package/dist/components/button/Button.d.ts +91 -0
- package/dist/components/button/Button.js +96 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/ButtonContext.d.ts +30 -0
- package/dist/components/button/ButtonContext.js +18 -0
- package/dist/components/button/ButtonContext.js.map +1 -0
- package/dist/components/button/DensityZeroButtons.js +25 -0
- package/dist/components/button/DensityZeroButtons.js.map +1 -0
- package/dist/components/button/button-pending.d.ts +10 -0
- package/dist/components/button/button-pending.js +166 -0
- package/dist/components/button/button-pending.js.map +1 -0
- package/dist/components/button/button-styles.d.ts +216 -0
- package/dist/components/button/button-styles.js +199 -0
- package/dist/components/button/button-styles.js.map +1 -0
- package/dist/components/button/button-tokens.d.ts +10 -0
- package/dist/components/button/button-tokens.js +257 -0
- package/dist/components/button/button-tokens.js.map +1 -0
- package/dist/components/button/connected-shapes.js +152 -0
- package/dist/components/button/connected-shapes.js.map +1 -0
- package/dist/components/card/Card.d.ts +60 -0
- package/dist/components/card/Card.js +69 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/card-styles.d.ts +42 -0
- package/dist/components/card/card-styles.js +64 -0
- package/dist/components/card/card-styles.js.map +1 -0
- package/dist/components/card/card-tokens.d.ts +7 -0
- package/dist/components/card/card-tokens.js +84 -0
- package/dist/components/card/card-tokens.js.map +1 -0
- package/dist/components/carousel/Carousel.d.ts +124 -0
- package/dist/components/carousel/Carousel.js +387 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/carousel-keylines.js +486 -0
- package/dist/components/carousel/carousel-keylines.js.map +1 -0
- package/dist/components/carousel/carousel-press-area.js +35 -0
- package/dist/components/carousel/carousel-press-area.js.map +1 -0
- package/dist/components/carousel/carousel-styles.d.ts +188 -0
- package/dist/components/carousel/carousel-styles.js +116 -0
- package/dist/components/carousel/carousel-styles.js.map +1 -0
- package/dist/components/carousel/carousel-tokens.d.ts +7 -0
- package/dist/components/carousel/carousel-tokens.js +18 -0
- package/dist/components/carousel/carousel-tokens.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +78 -0
- package/dist/components/checkbox/Checkbox.js +77 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox-box.js +34 -0
- package/dist/components/checkbox/checkbox-box.js.map +1 -0
- package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
- package/dist/components/checkbox/checkbox-styles.js +54 -0
- package/dist/components/checkbox/checkbox-styles.js.map +1 -0
- package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
- package/dist/components/checkbox/checkbox-tokens.js +41 -0
- package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
- package/dist/components/chip/Chip.d.ts +171 -0
- package/dist/components/chip/Chip.js +348 -0
- package/dist/components/chip/Chip.js.map +1 -0
- package/dist/components/chip/ChipSet.d.ts +70 -0
- package/dist/components/chip/ChipSet.js +198 -0
- package/dist/components/chip/ChipSet.js.map +1 -0
- package/dist/components/chip/chip-styles.d.ts +263 -0
- package/dist/components/chip/chip-styles.js +360 -0
- package/dist/components/chip/chip-styles.js.map +1 -0
- package/dist/components/chip/chip-tokens.d.ts +13 -0
- package/dist/components/chip/chip-tokens.js +185 -0
- package/dist/components/chip/chip-tokens.js.map +1 -0
- package/dist/components/date-picker/CalendarGrid.js +94 -0
- package/dist/components/date-picker/CalendarGrid.js.map +1 -0
- package/dist/components/date-picker/CompactDateDialog.js +63 -0
- package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
- package/dist/components/date-picker/DateField.d.ts +161 -0
- package/dist/components/date-picker/DateField.js +393 -0
- package/dist/components/date-picker/DateField.js.map +1 -0
- package/dist/components/date-picker/DateInput.d.ts +20 -0
- package/dist/components/date-picker/DateInput.js +99 -0
- package/dist/components/date-picker/DateInput.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +165 -0
- package/dist/components/date-picker/DatePicker.js +492 -0
- package/dist/components/date-picker/DatePicker.js.map +1 -0
- package/dist/components/date-picker/PickerDialog.d.ts +121 -0
- package/dist/components/date-picker/PickerDialog.js +161 -0
- package/dist/components/date-picker/PickerDialog.js.map +1 -0
- package/dist/components/date-picker/calendar-parts.js +141 -0
- package/dist/components/date-picker/calendar-parts.js.map +1 -0
- package/dist/components/date-picker/date-format.js +72 -0
- package/dist/components/date-picker/date-format.js.map +1 -0
- package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
- package/dist/components/date-picker/date-picker-styles.js +163 -0
- package/dist/components/date-picker/date-picker-styles.js.map +1 -0
- package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
- package/dist/components/date-picker/date-picker-tokens.js +104 -0
- package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-context.js +8 -0
- package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
- package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
- package/dist/components/date-picker/picker-dialog-styles.js +57 -0
- package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
- package/dist/components/date-picker/picker-icons.js +24 -0
- package/dist/components/date-picker/picker-icons.js.map +1 -0
- package/dist/components/date-picker/use-media-query.js +21 -0
- package/dist/components/date-picker/use-media-query.js.map +1 -0
- package/dist/components/date-picker/use-size-transform.js +62 -0
- package/dist/components/date-picker/use-size-transform.js.map +1 -0
- package/dist/components/date-picker/use-view-exit.js +68 -0
- package/dist/components/date-picker/use-view-exit.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +267 -0
- package/dist/components/dialog/Dialog.js +521 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/dialog-styles.d.ts +335 -0
- package/dist/components/dialog/dialog-styles.js +377 -0
- package/dist/components/dialog/dialog-styles.js.map +1 -0
- package/dist/components/dialog/dialog-tokens.d.ts +7 -0
- package/dist/components/dialog/dialog-tokens.js +57 -0
- package/dist/components/dialog/dialog-tokens.js.map +1 -0
- package/dist/components/divider/Divider.d.ts +59 -0
- package/dist/components/divider/Divider.js +53 -0
- package/dist/components/divider/Divider.js.map +1 -0
- package/dist/components/divider/divider-styles.d.ts +90 -0
- package/dist/components/divider/divider-styles.js +66 -0
- package/dist/components/divider/divider-styles.js.map +1 -0
- package/dist/components/divider/divider-tokens.d.ts +7 -0
- package/dist/components/divider/divider-tokens.js +16 -0
- package/dist/components/divider/divider-tokens.js.map +1 -0
- package/dist/components/fab/Fab.d.ts +130 -0
- package/dist/components/fab/Fab.js +137 -0
- package/dist/components/fab/Fab.js.map +1 -0
- package/dist/components/fab/FabTooltip.js +36 -0
- package/dist/components/fab/FabTooltip.js.map +1 -0
- package/dist/components/fab/fab-styles.d.ts +286 -0
- package/dist/components/fab/fab-styles.js +131 -0
- package/dist/components/fab/fab-styles.js.map +1 -0
- package/dist/components/fab/fab-tokens.d.ts +12 -0
- package/dist/components/fab/fab-tokens.js +105 -0
- package/dist/components/fab/fab-tokens.js.map +1 -0
- package/dist/components/fab-menu/FabMenu.d.ts +156 -0
- package/dist/components/fab-menu/FabMenu.js +291 -0
- package/dist/components/fab-menu/FabMenu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
- package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
- package/dist/components/fab-menu/fab-menu-styles.js +107 -0
- package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
- package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
- package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
- package/dist/components/icon-button/IconButton.d.ts +125 -0
- package/dist/components/icon-button/IconButton.js +112 -0
- package/dist/components/icon-button/IconButton.js.map +1 -0
- package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
- package/dist/components/icon-button/icon-button-styles.js +244 -0
- package/dist/components/icon-button/icon-button-styles.js.map +1 -0
- package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
- package/dist/components/icon-button/icon-button-tokens.js +215 -0
- package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
- package/dist/components/list/List.d.ts +265 -0
- package/dist/components/list/List.js +1386 -0
- package/dist/components/list/List.js.map +1 -0
- package/dist/components/list/ListMedia.d.ts +88 -0
- package/dist/components/list/ListMedia.js +132 -0
- package/dist/components/list/ListMedia.js.map +1 -0
- package/dist/components/list/list-styles.d.ts +375 -0
- package/dist/components/list/list-styles.js +220 -0
- package/dist/components/list/list-styles.js.map +1 -0
- package/dist/components/list/list-tokens.d.ts +7 -0
- package/dist/components/list/list-tokens.js +92 -0
- package/dist/components/list/list-tokens.js.map +1 -0
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
- package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
- package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
- package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
- package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
- package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
- package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
- package/dist/components/menu/Menu.d.ts +215 -0
- package/dist/components/menu/Menu.js +715 -0
- package/dist/components/menu/Menu.js.map +1 -0
- package/dist/components/menu/menu-styles.d.ts +354 -0
- package/dist/components/menu/menu-styles.js +219 -0
- package/dist/components/menu/menu-styles.js.map +1 -0
- package/dist/components/menu/menu-tokens.d.ts +7 -0
- package/dist/components/menu/menu-tokens.js +93 -0
- package/dist/components/menu/menu-tokens.js.map +1 -0
- package/dist/components/menu/menu-trigger.d.ts +51 -0
- package/dist/components/menu/menu-trigger.js +100 -0
- package/dist/components/menu/menu-trigger.js.map +1 -0
- package/dist/components/menu/use-reveal-entering.js +42 -0
- package/dist/components/menu/use-reveal-entering.js.map +1 -0
- package/dist/components/navigation/NavItem.d.ts +54 -0
- package/dist/components/navigation/NavItem.js +182 -0
- package/dist/components/navigation/NavItem.js.map +1 -0
- package/dist/components/navigation/NavigationBar.d.ts +64 -0
- package/dist/components/navigation/NavigationBar.js +121 -0
- package/dist/components/navigation/NavigationBar.js.map +1 -0
- package/dist/components/navigation/NavigationRail.d.ts +91 -0
- package/dist/components/navigation/NavigationRail.js +285 -0
- package/dist/components/navigation/NavigationRail.js.map +1 -0
- package/dist/components/navigation/nav-item-styles.d.ts +190 -0
- package/dist/components/navigation/nav-item-styles.js +123 -0
- package/dist/components/navigation/nav-item-styles.js.map +1 -0
- package/dist/components/navigation/navigation-styles.d.ts +239 -0
- package/dist/components/navigation/navigation-styles.js +134 -0
- package/dist/components/navigation/navigation-styles.js.map +1 -0
- package/dist/components/navigation/navigation-tokens.d.ts +9 -0
- package/dist/components/navigation/navigation-tokens.js +114 -0
- package/dist/components/navigation/navigation-tokens.js.map +1 -0
- package/dist/components/navigation/use-hide-on-scroll.js +115 -0
- package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
- package/dist/components/navigation/use-item-arrow-keys.js +37 -0
- package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
- package/dist/components/navigation/use-rail-item-morph.js +61 -0
- package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
- package/dist/components/progress/ProgressIndicator.d.ts +95 -0
- package/dist/components/progress/ProgressIndicator.js +426 -0
- package/dist/components/progress/ProgressIndicator.js.map +1 -0
- package/dist/components/progress/progress-geometry.js +285 -0
- package/dist/components/progress/progress-geometry.js.map +1 -0
- package/dist/components/progress/progress-styles.d.ts +81 -0
- package/dist/components/progress/progress-styles.js +43 -0
- package/dist/components/progress/progress-styles.js.map +1 -0
- package/dist/components/progress/progress-tokens.d.ts +7 -0
- package/dist/components/progress/progress-tokens.js +39 -0
- package/dist/components/progress/progress-tokens.js.map +1 -0
- package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
- package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
- package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
- package/dist/components/radio/RadioGroup.d.ts +121 -0
- package/dist/components/radio/RadioGroup.js +163 -0
- package/dist/components/radio/RadioGroup.js.map +1 -0
- package/dist/components/radio/radio-ring.js +21 -0
- package/dist/components/radio/radio-ring.js.map +1 -0
- package/dist/components/radio/radio-styles.d.ts +155 -0
- package/dist/components/radio/radio-styles.js +60 -0
- package/dist/components/radio/radio-styles.js.map +1 -0
- package/dist/components/radio/radio-tokens.d.ts +7 -0
- package/dist/components/radio/radio-tokens.js +31 -0
- package/dist/components/radio/radio-tokens.js.map +1 -0
- package/dist/components/search/SearchAppBar.d.ts +45 -0
- package/dist/components/search/SearchAppBar.js +61 -0
- package/dist/components/search/SearchAppBar.js.map +1 -0
- package/dist/components/search/SearchBar.d.ts +147 -0
- package/dist/components/search/SearchBar.js +412 -0
- package/dist/components/search/SearchBar.js.map +1 -0
- package/dist/components/search/search-styles.d.ts +243 -0
- package/dist/components/search/search-styles.js +143 -0
- package/dist/components/search/search-styles.js.map +1 -0
- package/dist/components/search/search-tokens.d.ts +9 -0
- package/dist/components/search/search-tokens.js +70 -0
- package/dist/components/search/search-tokens.js.map +1 -0
- package/dist/components/select/Select.d.ts +187 -0
- package/dist/components/select/Select.js +319 -0
- package/dist/components/select/Select.js.map +1 -0
- package/dist/components/select/field-shell.d.ts +29 -0
- package/dist/components/select/field-shell.js +135 -0
- package/dist/components/select/field-shell.js.map +1 -0
- package/dist/components/select/option-list.d.ts +81 -0
- package/dist/components/select/option-list.js +291 -0
- package/dist/components/select/option-list.js.map +1 -0
- package/dist/components/select/search-list.js +135 -0
- package/dist/components/select/search-list.js.map +1 -0
- package/dist/components/select/selection-cap.js +30 -0
- package/dist/components/select/selection-cap.js.map +1 -0
- package/dist/components/sheet/BottomSheet.d.ts +154 -0
- package/dist/components/sheet/BottomSheet.js +442 -0
- package/dist/components/sheet/BottomSheet.js.map +1 -0
- package/dist/components/sheet/SheetTrigger.d.ts +25 -0
- package/dist/components/sheet/SheetTrigger.js +46 -0
- package/dist/components/sheet/SheetTrigger.js.map +1 -0
- package/dist/components/sheet/SideSheet.d.ts +139 -0
- package/dist/components/sheet/SideSheet.js +289 -0
- package/dist/components/sheet/SideSheet.js.map +1 -0
- package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
- package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
- package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
- package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
- package/dist/components/sheet/sheet-gesture.js +48 -0
- package/dist/components/sheet/sheet-gesture.js.map +1 -0
- package/dist/components/sheet/sheet-icons.js +31 -0
- package/dist/components/sheet/sheet-icons.js.map +1 -0
- package/dist/components/sheet/sheet-settle.js +58 -0
- package/dist/components/sheet/sheet-settle.js.map +1 -0
- package/dist/components/sheet/sheet-styles.d.ts +312 -0
- package/dist/components/sheet/sheet-styles.js +229 -0
- package/dist/components/sheet/sheet-styles.js.map +1 -0
- package/dist/components/sheet/sheet-tokens.d.ts +12 -0
- package/dist/components/sheet/sheet-tokens.js +115 -0
- package/dist/components/sheet/sheet-tokens.js.map +1 -0
- package/dist/components/sheet/side-swipe-gesture.js +22 -0
- package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
- package/dist/components/sheet/use-peek-inert.js +32 -0
- package/dist/components/sheet/use-peek-inert.js.map +1 -0
- package/dist/components/sheet/use-side-swipe.js +174 -0
- package/dist/components/sheet/use-side-swipe.js.map +1 -0
- package/dist/components/slider/Slider.d.ts +129 -0
- package/dist/components/slider/Slider.js +295 -0
- package/dist/components/slider/Slider.js.map +1 -0
- package/dist/components/slider/slider-geometry.js +138 -0
- package/dist/components/slider/slider-geometry.js.map +1 -0
- package/dist/components/slider/slider-styles.d.ts +133 -0
- package/dist/components/slider/slider-styles.js +97 -0
- package/dist/components/slider/slider-styles.js.map +1 -0
- package/dist/components/slider/slider-tokens.d.ts +7 -0
- package/dist/components/slider/slider-tokens.js +66 -0
- package/dist/components/slider/slider-tokens.js.map +1 -0
- package/dist/components/slider/use-touch-track.js +138 -0
- package/dist/components/slider/use-touch-track.js.map +1 -0
- package/dist/components/snackbar/Snackbar.d.ts +96 -0
- package/dist/components/snackbar/Snackbar.js +253 -0
- package/dist/components/snackbar/Snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar-state.d.ts +58 -0
- package/dist/components/snackbar/snackbar-state.js +73 -0
- package/dist/components/snackbar/snackbar-state.js.map +1 -0
- package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
- package/dist/components/snackbar/snackbar-styles.js +67 -0
- package/dist/components/snackbar/snackbar-styles.js.map +1 -0
- package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
- package/dist/components/snackbar/snackbar-tokens.js +54 -0
- package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
- package/dist/components/split-button/SplitButton.d.ts +109 -0
- package/dist/components/split-button/SplitButton.js +195 -0
- package/dist/components/split-button/SplitButton.js.map +1 -0
- package/dist/components/split-button/split-button-styles.d.ts +214 -0
- package/dist/components/split-button/split-button-styles.js +164 -0
- package/dist/components/split-button/split-button-styles.js.map +1 -0
- package/dist/components/split-button/split-button-tokens.d.ts +7 -0
- package/dist/components/split-button/split-button-tokens.js +36 -0
- package/dist/components/split-button/split-button-tokens.js.map +1 -0
- package/dist/components/switch/Switch.d.ts +82 -0
- package/dist/components/switch/Switch.js +165 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/switch-styles.d.ts +96 -0
- package/dist/components/switch/switch-styles.js +68 -0
- package/dist/components/switch/switch-styles.js.map +1 -0
- package/dist/components/switch/switch-thumb.js +41 -0
- package/dist/components/switch/switch-thumb.js.map +1 -0
- package/dist/components/switch/switch-tokens.d.ts +7 -0
- package/dist/components/switch/switch-tokens.js +78 -0
- package/dist/components/switch/switch-tokens.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +120 -0
- package/dist/components/tabs/Tabs.js +346 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/tabs-styles.d.ts +198 -0
- package/dist/components/tabs/tabs-styles.js +99 -0
- package/dist/components/tabs/tabs-styles.js.map +1 -0
- package/dist/components/tabs/tabs-tokens.d.ts +7 -0
- package/dist/components/tabs/tabs-tokens.js +121 -0
- package/dist/components/tabs/tabs-tokens.js.map +1 -0
- package/dist/components/text-field/TextField.d.ts +175 -0
- package/dist/components/text-field/TextField.js +250 -0
- package/dist/components/text-field/TextField.js.map +1 -0
- package/dist/components/text-field/text-field-styles.d.ts +252 -0
- package/dist/components/text-field/text-field-styles.js +209 -0
- package/dist/components/text-field/text-field-styles.js.map +1 -0
- package/dist/components/text-field/text-field-tokens.d.ts +7 -0
- package/dist/components/text-field/text-field-tokens.js +177 -0
- package/dist/components/text-field/text-field-tokens.js.map +1 -0
- package/dist/components/time-picker/TimePicker.d.ts +142 -0
- package/dist/components/time-picker/TimePicker.js +700 -0
- package/dist/components/time-picker/TimePicker.js.map +1 -0
- package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
- package/dist/components/time-picker/time-picker-styles.js +112 -0
- package/dist/components/time-picker/time-picker-styles.js.map +1 -0
- package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
- package/dist/components/time-picker/time-picker-tokens.js +86 -0
- package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +209 -0
- package/dist/components/toolbar/Toolbar.js +282 -0
- package/dist/components/toolbar/Toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
- package/dist/components/toolbar/toolbar-styles.js +253 -0
- package/dist/components/toolbar/toolbar-styles.js.map +1 -0
- package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
- package/dist/components/toolbar/toolbar-tokens.js +117 -0
- package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
- package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +131 -0
- package/dist/components/tooltip/Tooltip.js +388 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -0
- package/dist/components/tooltip/lazy-tooltip.js +35 -0
- package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
- package/dist/components/tooltip/tooltip-placement.js +14 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
- package/dist/components/tooltip/tooltip-styles.js +81 -0
- package/dist/components/tooltip/tooltip-styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
- package/dist/components/tooltip/tooltip-tokens.js +72 -0
- package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
- package/dist/components/tooltip/tooltip-trigger.js +115 -0
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
- package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
- package/dist/composites/button-group/ButtonGroup.js +270 -0
- package/dist/composites/button-group/ButtonGroup.js.map +1 -0
- package/dist/composites/button-group/button-group-styles.d.ts +73 -0
- package/dist/composites/button-group/button-group-styles.js +87 -0
- package/dist/composites/button-group/button-group-styles.js.map +1 -0
- package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
- package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
- package/dist/composites/button-group/overflow-menu-list.js +26 -0
- package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
- package/dist/composites/button-group/use-overflow.js +75 -0
- package/dist/composites/button-group/use-overflow.js.map +1 -0
- package/dist/composites/button-group/use-press-expansion.js +155 -0
- package/dist/composites/button-group/use-press-expansion.js.map +1 -0
- package/dist/index.d.ts +142 -0
- package/dist/index.js +136 -0
- package/dist/motion/get-m3-spring.d.ts +6 -0
- package/dist/motion/get-m3-spring.js +10 -0
- package/dist/motion/get-m3-spring.js.map +1 -0
- package/dist/motion/reduced-motion.js +19 -0
- package/dist/motion/reduced-motion.js.map +1 -0
- package/dist/motion/use-m3-spring.d.ts +13 -0
- package/dist/motion/use-m3-spring.js +22 -0
- package/dist/motion/use-m3-spring.js.map +1 -0
- package/dist/next/NextRouterProvider.d.ts +13 -0
- package/dist/next/NextRouterProvider.js +26 -0
- package/dist/next/NextRouterProvider.js.map +1 -0
- package/dist/next/get-theme-from-cookies.d.ts +32 -0
- package/dist/next/get-theme-from-cookies.js +27 -0
- package/dist/next/get-theme-from-cookies.js.map +1 -0
- package/dist/next/navigation-guard.d.ts +30 -0
- package/dist/next/navigation-guard.js +68 -0
- package/dist/next/navigation-guard.js.map +1 -0
- package/dist/next.d.ts +5 -0
- package/dist/next.js +5 -0
- package/dist/primitives/ButtonBase.d.ts +115 -0
- package/dist/primitives/ButtonBase.js +231 -0
- package/dist/primitives/ButtonBase.js.map +1 -0
- package/dist/primitives/DomDirectionLocale.d.ts +18 -0
- package/dist/primitives/DomDirectionLocale.js +28 -0
- package/dist/primitives/DomDirectionLocale.js.map +1 -0
- package/dist/primitives/Field.d.ts +50 -0
- package/dist/primitives/Field.js +74 -0
- package/dist/primitives/Field.js.map +1 -0
- package/dist/primitives/IconFaces.js +23 -0
- package/dist/primitives/IconFaces.js.map +1 -0
- package/dist/primitives/Overlay.d.ts +39 -0
- package/dist/primitives/Overlay.js +86 -0
- package/dist/primitives/Overlay.js.map +1 -0
- package/dist/primitives/SelectionControl.d.ts +55 -0
- package/dist/primitives/SelectionControl.js +58 -0
- package/dist/primitives/SelectionControl.js.map +1 -0
- package/dist/primitives/Surface.d.ts +123 -0
- package/dist/primitives/Surface.js +68 -0
- package/dist/primitives/Surface.js.map +1 -0
- package/dist/primitives/ToolbarContext.js +12 -0
- package/dist/primitives/ToolbarContext.js.map +1 -0
- package/dist/primitives/TouchTarget.d.ts +14 -0
- package/dist/primitives/TouchTarget.js +20 -0
- package/dist/primitives/TouchTarget.js.map +1 -0
- package/dist/primitives/TriggerContext.d.ts +34 -0
- package/dist/primitives/TriggerContext.js +24 -0
- package/dist/primitives/TriggerContext.js.map +1 -0
- package/dist/primitives/hidden-input-focus.js +27 -0
- package/dist/primitives/hidden-input-focus.js.map +1 -0
- package/dist/primitives/icon-faces-styles.d.ts +9 -0
- package/dist/primitives/icon-faces-styles.js +45 -0
- package/dist/primitives/icon-faces-styles.js.map +1 -0
- package/dist/primitives/locale-with-direction.d.ts +9 -0
- package/dist/primitives/locale-with-direction.js +17 -0
- package/dist/primitives/locale-with-direction.js.map +1 -0
- package/dist/primitives/morph-path.d.ts +25 -0
- package/dist/primitives/morph-path.js +38 -0
- package/dist/primitives/morph-path.js.map +1 -0
- package/dist/primitives/selection-control-styles.d.ts +54 -0
- package/dist/primitives/selection-control-styles.js +44 -0
- package/dist/primitives/selection-control-styles.js.map +1 -0
- package/dist/primitives/use-m3-interaction.d.ts +51 -0
- package/dist/primitives/use-m3-interaction.js +149 -0
- package/dist/primitives/use-m3-interaction.js.map +1 -0
- package/dist/primitives/use-m3-morph.d.ts +18 -0
- package/dist/primitives/use-m3-morph.js +36 -0
- package/dist/primitives/use-m3-morph.js.map +1 -0
- package/dist/primitives/use-presence.d.ts +19 -0
- package/dist/primitives/use-presence.js +37 -0
- package/dist/primitives/use-presence.js.map +1 -0
- package/dist/primitives.d.ts +36 -0
- package/dist/primitives.js +34 -0
- package/dist/shapes/corner-rounding.d.ts +13 -0
- package/dist/shapes/corner-rounding.js +18 -0
- package/dist/shapes/corner-rounding.js.map +1 -0
- package/dist/shapes/cubic.d.ts +52 -0
- package/dist/shapes/cubic.js +189 -0
- package/dist/shapes/cubic.js.map +1 -0
- package/dist/shapes/feature-mapping.js +80 -0
- package/dist/shapes/feature-mapping.js.map +1 -0
- package/dist/shapes/features.d.ts +23 -0
- package/dist/shapes/features.js +82 -0
- package/dist/shapes/features.js.map +1 -0
- package/dist/shapes/float-mapping.js +65 -0
- package/dist/shapes/float-mapping.js.map +1 -0
- package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
- package/dist/shapes/generated/material-shape-path-record.js +48 -0
- package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
- package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
- package/dist/shapes/generated/material-shape-paths.js +218 -0
- package/dist/shapes/generated/material-shape-paths.js.map +1 -0
- package/dist/shapes/mask.d.ts +14 -0
- package/dist/shapes/mask.js +24 -0
- package/dist/shapes/mask.js.map +1 -0
- package/dist/shapes/material-shapes.d.ts +11 -0
- package/dist/shapes/material-shapes.js +250 -0
- package/dist/shapes/material-shapes.js.map +1 -0
- package/dist/shapes/morph.d.ts +25 -0
- package/dist/shapes/morph.js +97 -0
- package/dist/shapes/morph.js.map +1 -0
- package/dist/shapes/path.d.ts +33 -0
- package/dist/shapes/path.js +47 -0
- package/dist/shapes/path.js.map +1 -0
- package/dist/shapes/point.d.ts +28 -0
- package/dist/shapes/point.js +103 -0
- package/dist/shapes/point.js.map +1 -0
- package/dist/shapes/polygon-measure.js +140 -0
- package/dist/shapes/polygon-measure.js.map +1 -0
- package/dist/shapes/rounded-polygon.d.ts +44 -0
- package/dist/shapes/rounded-polygon.js +278 -0
- package/dist/shapes/rounded-polygon.js.map +1 -0
- package/dist/shapes/shape-path.d.ts +15 -0
- package/dist/shapes/shapes.d.ts +53 -0
- package/dist/shapes/shapes.js +171 -0
- package/dist/shapes/shapes.js.map +1 -0
- package/dist/styles/generated/components.css +710 -0
- package/dist/styles/generated/theme.css +247 -0
- package/dist/styles/generated/themes.css +3361 -0
- package/dist/styles/generated/tokens.css +284 -0
- package/dist/styles/styles.css +15 -0
- package/dist/styles/utilities.css +283 -0
- package/dist/styles.compiled.css +2 -0
- package/dist/theme/ThemeProvider.d.ts +72 -0
- package/dist/theme/ThemeProvider.js +144 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/ThemeScope.d.ts +32 -0
- package/dist/theme/ThemeScope.js +67 -0
- package/dist/theme/ThemeScope.js.map +1 -0
- package/dist/theme/ThemeScript.d.ts +26 -0
- package/dist/theme/ThemeScript.js +44 -0
- package/dist/theme/ThemeScript.js.map +1 -0
- package/dist/theme/context.d.ts +32 -0
- package/dist/theme/context.js +47 -0
- package/dist/theme/context.js.map +1 -0
- package/dist/theme/create-theme.d.ts +60 -0
- package/dist/theme/create-theme.js +47 -0
- package/dist/theme/create-theme.js.map +1 -0
- package/dist/theme/css.js +54 -0
- package/dist/theme/css.js.map +1 -0
- package/dist/theme/parse-palettes.js +40 -0
- package/dist/theme/parse-palettes.js.map +1 -0
- package/dist/theme/scheme.d.ts +6 -0
- package/dist/theme/scheme.js +118 -0
- package/dist/theme/scheme.js.map +1 -0
- package/dist/theme/state.d.ts +38 -0
- package/dist/theme/state.js +93 -0
- package/dist/theme/state.js.map +1 -0
- package/dist/theme/storage.js +21 -0
- package/dist/theme/storage.js.map +1 -0
- package/dist/tokens/breakpoints.d.ts +15 -0
- package/dist/tokens/breakpoints.js +16 -0
- package/dist/tokens/breakpoints.js.map +1 -0
- package/dist/tokens/color.d.ts +104 -0
- package/dist/tokens/color.js +147 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/component.d.ts +110 -0
- package/dist/tokens/component.js +67 -0
- package/dist/tokens/component.js.map +1 -0
- package/dist/tokens/density.d.ts +20 -0
- package/dist/tokens/density.js +27 -0
- package/dist/tokens/density.js.map +1 -0
- package/dist/tokens/elevation.d.ts +44 -0
- package/dist/tokens/elevation.js +45 -0
- package/dist/tokens/elevation.js.map +1 -0
- package/dist/tokens/motion.d.ts +79 -0
- package/dist/tokens/motion.js +126 -0
- package/dist/tokens/motion.js.map +1 -0
- package/dist/tokens/shape.d.ts +22 -0
- package/dist/tokens/shape.js +22 -0
- package/dist/tokens/shape.js.map +1 -0
- package/dist/tokens/spring-velocity.d.ts +19 -0
- package/dist/tokens/spring-velocity.js +44 -0
- package/dist/tokens/spring-velocity.js.map +1 -0
- package/dist/tokens/state.d.ts +18 -0
- package/dist/tokens/state.js +19 -0
- package/dist/tokens/state.js.map +1 -0
- package/dist/tokens/typography.d.ts +64 -0
- package/dist/tokens/typography.js +60 -0
- package/dist/tokens/typography.js.map +1 -0
- package/dist/tokens/z-index.d.ts +17 -0
- package/dist/tokens/z-index.js +18 -0
- package/dist/tokens/z-index.js.map +1 -0
- package/dist/utils/announce.js +51 -0
- package/dist/utils/announce.js.map +1 -0
- package/dist/utils/assert-collection-children.js +26 -0
- package/dist/utils/assert-collection-children.js.map +1 -0
- package/dist/utils/closed-by.d.ts +9 -0
- package/dist/utils/closed-by.js +12 -0
- package/dist/utils/closed-by.js.map +1 -0
- package/dist/utils/cn.d.ts +31 -0
- package/dist/utils/cn.js +37 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/composite-keys.js +32 -0
- package/dist/utils/composite-keys.js.map +1 -0
- package/dist/utils/focus-visible.js +14 -0
- package/dist/utils/focus-visible.js.map +1 -0
- package/dist/utils/focus.js +51 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/focusable-disabled.js +12 -0
- package/dist/utils/focusable-disabled.js.map +1 -0
- package/dist/utils/keep-pressed-in-place.d.ts +60 -0
- package/dist/utils/keep-pressed-in-place.js +127 -0
- package/dist/utils/keep-pressed-in-place.js.map +1 -0
- package/dist/utils/load-on-demand.js +111 -0
- package/dist/utils/load-on-demand.js.map +1 -0
- package/dist/utils/merge-data-tokens.d.ts +9 -0
- package/dist/utils/merge-data-tokens.js +15 -0
- package/dist/utils/merge-data-tokens.js.map +1 -0
- package/dist/utils/natural-size.js +53 -0
- package/dist/utils/natural-size.js.map +1 -0
- package/dist/utils/nearest-reveal.js +28 -0
- package/dist/utils/nearest-reveal.js.map +1 -0
- package/dist/utils/placement.js +14 -0
- package/dist/utils/placement.js.map +1 -0
- package/dist/utils/radio-group-keys.js +74 -0
- package/dist/utils/radio-group-keys.js.map +1 -0
- package/dist/utils/rendered-description.js +17 -0
- package/dist/utils/rendered-description.js.map +1 -0
- package/dist/utils/root-props.d.ts +103 -0
- package/dist/utils/root-props.js +51 -0
- package/dist/utils/root-props.js.map +1 -0
- package/dist/utils/search.d.ts +11 -0
- package/dist/utils/search.js +18 -0
- package/dist/utils/search.js.map +1 -0
- package/dist/utils/shortcut.js +20 -0
- package/dist/utils/shortcut.js.map +1 -0
- package/dist/utils/split-data-attributes.d.ts +12 -0
- package/dist/utils/split-data-attributes.js +20 -0
- package/dist/utils/split-data-attributes.js.map +1 -0
- package/dist/utils/toolbar-keys.js +28 -0
- package/dist/utils/toolbar-keys.js.map +1 -0
- package/dist/utils/tv.d.ts +7 -0
- package/dist/utils/tv.js +9 -0
- package/dist/utils/tv.js.map +1 -0
- package/dist/utils/typeahead.js +64 -0
- package/dist/utils/typeahead.js.map +1 -0
- package/dist/utils/warn-once.js +30 -0
- package/dist/utils/warn-once.js.map +1 -0
- package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
- package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
- package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
- package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
- package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
- package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
- package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
- package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
- package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
- package/dist/vendor/material-color-utilities/index.js +51 -0
- package/dist/vendor/material-color-utilities/index.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
- package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
- package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
- package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
- package/dist/vendor/material-color-utilities/score/score.js +115 -0
- package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
- package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
- package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
- package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
- package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
- package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
- package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hct_solver.js","names":["mathUtils.signum","mathUtils.matrixMultiply","colorUtils.argbFromLinrgb","colorUtils.argbFromLstar","mathUtils.sanitizeDegreesDouble","colorUtils.yFromLstar"],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/hct_solver.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport * as colorUtils from '../utils/color_utils.js';\nimport * as mathUtils from '../utils/math_utils.js';\nimport { Cam16 } from './cam16.js';\nimport { ViewingConditions } from './viewing_conditions.js';\n// material_color_utilities is designed to have a consistent API across\n// platforms and modular components that can be moved around easily. Using a\n// class as a namespace facilitates this.\n//\n// tslint:disable:class-as-namespace\n/**\n * A class that solves the HCT equation.\n */\nexport class HctSolver {\n /**\n * Sanitizes a small enough angle in radians.\n *\n * @param angle An angle in radians; must not deviate too much\n * from 0.\n * @return A coterminal angle between 0 and 2pi.\n */\n static sanitizeRadians(angle) {\n return (angle + Math.PI * 8) % (Math.PI * 2);\n }\n /**\n * Delinearizes an RGB component, returning a floating-point\n * number.\n *\n * @param rgbComponent 0.0 <= rgb_component <= 100.0, represents\n * linear R/G/B channel\n * @return 0.0 <= output <= 255.0, color channel converted to\n * regular RGB space\n */\n static trueDelinearized(rgbComponent) {\n const normalized = rgbComponent / 100.0;\n let delinearized = 0.0;\n if (normalized <= 0.0031308) {\n delinearized = normalized * 12.92;\n }\n else {\n delinearized = 1.055 * Math.pow(normalized, 1.0 / 2.4) - 0.055;\n }\n return delinearized * 255.0;\n }\n static chromaticAdaptation(component) {\n const af = Math.pow(Math.abs(component), 0.42);\n return mathUtils.signum(component) * 400.0 * af / (af + 27.13);\n }\n /**\n * Returns the hue of a linear RGB color in CAM16.\n *\n * @param linrgb The linear RGB coordinates of a color.\n * @return The hue of the color in CAM16, in radians.\n */\n static hueOf(linrgb) {\n const scaledDiscount = mathUtils.matrixMultiply(linrgb, HctSolver.SCALED_DISCOUNT_FROM_LINRGB);\n const rA = HctSolver.chromaticAdaptation(scaledDiscount[0]);\n const gA = HctSolver.chromaticAdaptation(scaledDiscount[1]);\n const bA = HctSolver.chromaticAdaptation(scaledDiscount[2]);\n // redness-greenness\n const a = (11.0 * rA + -12.0 * gA + bA) / 11.0;\n // yellowness-blueness\n const b = (rA + gA - 2.0 * bA) / 9.0;\n return Math.atan2(b, a);\n }\n static areInCyclicOrder(a, b, c) {\n const deltaAB = HctSolver.sanitizeRadians(b - a);\n const deltaAC = HctSolver.sanitizeRadians(c - a);\n return deltaAB < deltaAC;\n }\n /**\n * Solves the lerp equation.\n *\n * @param source The starting number.\n * @param mid The number in the middle.\n * @param target The ending number.\n * @return A number t such that lerp(source, target, t) = mid.\n */\n static intercept(source, mid, target) {\n return (mid - source) / (target - source);\n }\n static lerpPoint(source, t, target) {\n return [\n source[0] + (target[0] - source[0]) * t,\n source[1] + (target[1] - source[1]) * t,\n source[2] + (target[2] - source[2]) * t,\n ];\n }\n /**\n * Intersects a segment with a plane.\n *\n * @param source The coordinates of point A.\n * @param coordinate The R-, G-, or B-coordinate of the plane.\n * @param target The coordinates of point B.\n * @param axis The axis the plane is perpendicular with. (0: R, 1:\n * G, 2: B)\n * @return The intersection point of the segment AB with the plane\n * R=coordinate, G=coordinate, or B=coordinate\n */\n static setCoordinate(source, coordinate, target, axis) {\n const t = HctSolver.intercept(source[axis], coordinate, target[axis]);\n return HctSolver.lerpPoint(source, t, target);\n }\n static isBounded(x) {\n return 0.0 <= x && x <= 100.0;\n }\n /**\n * Returns the nth possible vertex of the polygonal intersection.\n *\n * @param y The Y value of the plane.\n * @param n The zero-based index of the point. 0 <= n <= 11.\n * @return The nth possible vertex of the polygonal intersection\n * of the y plane and the RGB cube, in linear RGB coordinates, if\n * it exists. If this possible vertex lies outside of the cube,\n * [-1.0, -1.0, -1.0] is returned.\n */\n static nthVertex(y, n) {\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const coordA = n % 4 <= 1 ? 0.0 : 100.0;\n const coordB = n % 2 === 0 ? 0.0 : 100.0;\n if (n < 4) {\n const g = coordA;\n const b = coordB;\n const r = (y - g * kG - b * kB) / kR;\n if (HctSolver.isBounded(r)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else if (n < 8) {\n const b = coordA;\n const r = coordB;\n const g = (y - r * kR - b * kB) / kG;\n if (HctSolver.isBounded(g)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n else {\n const r = coordA;\n const g = coordB;\n const b = (y - r * kR - g * kG) / kB;\n if (HctSolver.isBounded(b)) {\n return [r, g, b];\n }\n else {\n return [-1.0, -1.0, -1.0];\n }\n }\n }\n /**\n * Finds the segment containing the desired color.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return A list of two sets of linear RGB coordinates, each\n * corresponding to an endpoint of the segment containing the\n * desired color.\n */\n static bisectToSegment(y, targetHue) {\n let left = [-1.0, -1.0, -1.0];\n let right = left;\n let leftHue = 0.0;\n let rightHue = 0.0;\n let initialized = false;\n let uncut = true;\n for (let n = 0; n < 12; n++) {\n const mid = HctSolver.nthVertex(y, n);\n if (mid[0] < 0) {\n continue;\n }\n const midHue = HctSolver.hueOf(mid);\n if (!initialized) {\n left = mid;\n right = mid;\n leftHue = midHue;\n rightHue = midHue;\n initialized = true;\n continue;\n }\n if (uncut || HctSolver.areInCyclicOrder(leftHue, midHue, rightHue)) {\n uncut = false;\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rightHue = midHue;\n }\n else {\n left = mid;\n leftHue = midHue;\n }\n }\n }\n return [left, right];\n }\n static midpoint(a, b) {\n return [\n (a[0] + b[0]) / 2,\n (a[1] + b[1]) / 2,\n (a[2] + b[2]) / 2,\n ];\n }\n static criticalPlaneBelow(x) {\n return Math.floor(x - 0.5);\n }\n static criticalPlaneAbove(x) {\n return Math.ceil(x - 0.5);\n }\n /**\n * Finds a color with the given Y and hue on the boundary of the\n * cube.\n *\n * @param y The Y value of the color.\n * @param targetHue The hue of the color.\n * @return The desired color, in linear RGB coordinates.\n */\n static bisectToLimit(y, targetHue) {\n const segment = HctSolver.bisectToSegment(y, targetHue);\n let left = segment[0];\n let leftHue = HctSolver.hueOf(left);\n let right = segment[1];\n for (let axis = 0; axis < 3; axis++) {\n if (left[axis] !== right[axis]) {\n let lPlane = -1;\n let rPlane = 255;\n if (left[axis] < right[axis]) {\n lPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(right[axis]));\n }\n else {\n lPlane = HctSolver.criticalPlaneAbove(HctSolver.trueDelinearized(left[axis]));\n rPlane = HctSolver.criticalPlaneBelow(HctSolver.trueDelinearized(right[axis]));\n }\n for (let i = 0; i < 8; i++) {\n if (Math.abs(rPlane - lPlane) <= 1) {\n break;\n }\n else {\n const mPlane = Math.floor((lPlane + rPlane) / 2.0);\n const midPlaneCoordinate = HctSolver.CRITICAL_PLANES[mPlane];\n const mid = HctSolver.setCoordinate(left, midPlaneCoordinate, right, axis);\n const midHue = HctSolver.hueOf(mid);\n if (HctSolver.areInCyclicOrder(leftHue, targetHue, midHue)) {\n right = mid;\n rPlane = mPlane;\n }\n else {\n left = mid;\n leftHue = midHue;\n lPlane = mPlane;\n }\n }\n }\n }\n }\n return HctSolver.midpoint(left, right);\n }\n static inverseChromaticAdaptation(adapted) {\n const adaptedAbs = Math.abs(adapted);\n const base = Math.max(0, 27.13 * adaptedAbs / (400.0 - adaptedAbs));\n return mathUtils.signum(adapted) * Math.pow(base, 1.0 / 0.42);\n }\n /**\n * Finds a color with the given hue, chroma, and Y.\n *\n * @param hueRadians The desired hue in radians.\n * @param chroma The desired chroma.\n * @param y The desired Y.\n * @return The desired color as a hexadecimal integer, if found; 0\n * otherwise.\n */\n static findResultByJ(hueRadians, chroma, y) {\n // Initial estimate of j.\n let j = Math.sqrt(y) * 11.0;\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const viewingConditions = ViewingConditions.DEFAULT;\n const tInnerCoeff = 1 / Math.pow(1.64 - Math.pow(0.29, viewingConditions.n), 0.73);\n const eHue = 0.25 * (Math.cos(hueRadians + 2.0) + 3.8);\n const p1 = eHue * (50000.0 / 13.0) * viewingConditions.nc * viewingConditions.ncb;\n const hSin = Math.sin(hueRadians);\n const hCos = Math.cos(hueRadians);\n for (let iterationRound = 0; iterationRound < 5; iterationRound++) {\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n const jNormalized = j / 100.0;\n const alpha = chroma === 0.0 || j === 0.0 ? 0.0 : chroma / Math.sqrt(jNormalized);\n const t = Math.pow(alpha * tInnerCoeff, 1.0 / 0.9);\n const ac = viewingConditions.aw *\n Math.pow(jNormalized, 1.0 / viewingConditions.c / viewingConditions.z);\n const p2 = ac / viewingConditions.nbb;\n const gamma = 23.0 * (p2 + 0.305) * t /\n (23.0 * p1 + 11 * t * hCos + 108.0 * t * hSin);\n const a = gamma * hCos;\n const b = gamma * hSin;\n const rA = (460.0 * p2 + 451.0 * a + 288.0 * b) / 1403.0;\n const gA = (460.0 * p2 - 891.0 * a - 261.0 * b) / 1403.0;\n const bA = (460.0 * p2 - 220.0 * a - 6300.0 * b) / 1403.0;\n const rCScaled = HctSolver.inverseChromaticAdaptation(rA);\n const gCScaled = HctSolver.inverseChromaticAdaptation(gA);\n const bCScaled = HctSolver.inverseChromaticAdaptation(bA);\n const linrgb = mathUtils.matrixMultiply([rCScaled, gCScaled, bCScaled], HctSolver.LINRGB_FROM_SCALED_DISCOUNT);\n // ===========================================================\n // Operations inlined from Cam16 to avoid repeated calculation\n // ===========================================================\n if (linrgb[0] < 0 || linrgb[1] < 0 || linrgb[2] < 0) {\n return 0;\n }\n const kR = HctSolver.Y_FROM_LINRGB[0];\n const kG = HctSolver.Y_FROM_LINRGB[1];\n const kB = HctSolver.Y_FROM_LINRGB[2];\n const fnj = kR * linrgb[0] + kG * linrgb[1] + kB * linrgb[2];\n if (fnj <= 0) {\n return 0;\n }\n if (iterationRound === 4 || Math.abs(fnj - y) < 0.002) {\n if (linrgb[0] > 100.01 || linrgb[1] > 100.01 || linrgb[2] > 100.01) {\n return 0;\n }\n return colorUtils.argbFromLinrgb(linrgb);\n }\n // Iterates with Newton method,\n // Using 2 * fn(j) / j as the approximation of fn'(j)\n j = j - (fnj - y) * j / (2 * fnj);\n }\n return 0;\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return A hexadecimal representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToInt(hueDegrees, chroma, lstar) {\n if (chroma < 0.0001 || lstar < 0.0001 || lstar > 99.9999) {\n return colorUtils.argbFromLstar(lstar);\n }\n hueDegrees = mathUtils.sanitizeDegreesDouble(hueDegrees);\n const hueRadians = hueDegrees / 180 * Math.PI;\n const y = colorUtils.yFromLstar(lstar);\n const exactAnswer = HctSolver.findResultByJ(hueRadians, chroma, y);\n if (exactAnswer !== 0) {\n return exactAnswer;\n }\n const linrgb = HctSolver.bisectToLimit(y, hueRadians);\n return colorUtils.argbFromLinrgb(linrgb);\n }\n /**\n * Finds an sRGB color with the given hue, chroma, and L*, if\n * possible.\n *\n * @param hueDegrees The desired hue, in degrees.\n * @param chroma The desired chroma.\n * @param lstar The desired L*.\n * @return An CAM16 object representing the sRGB color. The color\n * has sufficiently close hue, chroma, and L* to the desired\n * values, if possible; otherwise, the hue and L* will be\n * sufficiently close, and chroma will be maximized.\n */\n static solveToCam(hueDegrees, chroma, lstar) {\n return Cam16.fromInt(HctSolver.solveToInt(hueDegrees, chroma, lstar));\n }\n}\nHctSolver.SCALED_DISCOUNT_FROM_LINRGB = [\n [\n 0.001200833568784504,\n 0.002389694492170889,\n 0.0002795742885861124,\n ],\n [\n 0.0005891086651375999,\n 0.0029785502573438758,\n 0.0003270666104008398,\n ],\n [\n 0.00010146692491640572,\n 0.0005364214359186694,\n 0.0032979401770712076,\n ],\n];\nHctSolver.LINRGB_FROM_SCALED_DISCOUNT = [\n [\n 1373.2198709594231,\n -1100.4251190754821,\n -7.278681089101213,\n ],\n [\n -271.815969077903,\n 559.6580465940733,\n -32.46047482791194,\n ],\n [\n 1.9622899599665666,\n -57.173814538844006,\n 308.7233197812385,\n ],\n];\nHctSolver.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722];\nHctSolver.CRITICAL_PLANES = [\n 0.015176349177441876, 0.045529047532325624, 0.07588174588720938,\n 0.10623444424209313, 0.13658714259697685, 0.16693984095186062,\n 0.19729253930674434, 0.2276452376616281, 0.2579979360165119,\n 0.28835063437139563, 0.3188300904430532, 0.350925934958123,\n 0.3848314933096426, 0.42057480301049466, 0.458183274052838,\n 0.4976837250274023, 0.5391024159806381, 0.5824650784040898,\n 0.6277969426914107, 0.6751227633498623, 0.7244668422128921,\n 0.775853049866786, 0.829304845476233, 0.8848452951698498,\n 0.942497089126609, 1.0022825574869039, 1.0642236851973577,\n 1.1283421258858297, 1.1946592148522128, 1.2631959812511864,\n 1.3339731595349034, 1.407011200216447, 1.4823302800086415,\n 1.5599503113873272, 1.6398909516233677, 1.7221716113234105,\n 1.8068114625156377, 1.8938294463134073, 1.9832442801866852,\n 2.075074464868551, 2.1693382909216234, 2.2660538449872063,\n 2.36523901573795, 2.4669114995532007, 2.5710888059345764,\n 2.6777882626779785, 2.7870270208169257, 2.898822059350997,\n 3.0131901897720907, 3.1301480604002863, 3.2497121605402226,\n 3.3718988244681087, 3.4967242352587946, 3.624204428461639,\n 3.754355295633311, 3.887192587735158, 4.022731918402185,\n 4.160988767090289, 4.301978482107941, 4.445716283538092,\n 4.592217266055746, 4.741496401646282, 4.893568542229298,\n 5.048448422192488, 5.20615066083972, 5.3666897647573375,\n 5.5300801301023865, 5.696336044816294, 5.865471690767354,\n 6.037501145825082, 6.212438385869475, 6.390297286737924,\n 6.571091626112461, 6.7548350853498045, 6.941541251256611,\n 7.131223617812143, 7.323895587840543, 7.5195704746346665,\n 7.7182615035334345, 7.919981813454504, 8.124744458384042,\n 8.332562408825165, 8.543448553206703, 8.757415699253682,\n 8.974476575321063, 9.194643831691977, 9.417930041841839,\n 9.644347703669503, 9.873909240696694, 10.106627003236781,\n 10.342513269534024, 10.58158024687427, 10.8238400726681,\n 11.069304815507364, 11.317986476196008, 11.569896988756009,\n 11.825048221409341, 12.083451977536606, 12.345119996613247,\n 12.610063955123938, 12.878295467455942, 13.149826086772048,\n 13.42466730586372, 13.702830557985108, 13.984327217668513,\n 14.269168601521828, 14.55736596900856, 14.848930523210871,\n 15.143873411576273, 15.44220572664832, 15.743938506781891,\n 16.04908273684337, 16.35764934889634, 16.66964922287304,\n 16.985093187232053, 17.30399201960269, 17.62635644741625,\n 17.95219714852476, 18.281524751807332, 18.614349837764564,\n 18.95068293910138, 19.290534541298456, 19.633915083172692,\n 19.98083495742689, 20.331304511189067, 20.685334046541502,\n 21.042933821039977, 21.404114048223256, 21.76888489811322,\n 22.137256497705877, 22.50923893145328, 22.884842241736916,\n 23.264076429332462, 23.6469514538663, 24.033477234264016,\n 24.42366364919083, 24.817520537484558, 25.21505769858089,\n 25.61628489293138, 26.021211842414342, 26.429848230738664,\n 26.842203703840827, 27.258287870275353, 27.678110301598522,\n 28.10168053274597, 28.529008062403893, 28.96010235337422,\n 29.39497283293396, 29.83362889318845, 30.276079891419332,\n 30.722335150426627, 31.172403958865512, 31.62629557157785,\n 32.08401920991837, 32.54558406207592, 33.010999283389665,\n 33.4802739966603, 33.953417292456834, 34.430438229418264,\n 34.911345834551085, 35.39614910352207, 35.88485700094671,\n 36.37747846067349, 36.87402238606382, 37.37449765026789,\n 37.87891309649659, 38.38727753828926, 38.89959975977785,\n 39.41588851594697, 39.93615253289054, 40.460400508064545,\n 40.98864111053629, 41.520882981230194, 42.05713473317016,\n 42.597404951718396, 43.141702194811224, 43.6900349931913,\n 44.24241185063697, 44.798841244188324, 45.35933162437017,\n 45.92389141541209, 46.49252901546552, 47.065252796817916,\n 47.64207110610409, 48.22299226451468, 48.808024568002054,\n 49.3971762874833, 49.9904556690408, 50.587870934119984,\n 51.189430279724725, 51.79514187861014, 52.40501387947288,\n 53.0190544071392, 53.637271562750364, 54.259673423945976,\n 54.88626804504493, 55.517063457223934, 56.15206766869424,\n 56.79128866487574, 57.43473440856916, 58.08241284012621,\n 58.734331877617365, 59.39049941699807, 60.05092333227251,\n 60.715611475655585, 61.38457167773311, 62.057811747619894,\n 62.7353394731159, 63.417162620860914, 64.10328893648692,\n 64.79372614476921, 65.48848194977529, 66.18756403501224,\n 66.89098006357258, 67.59873767827808, 68.31084450182222,\n 69.02730813691093, 69.74813616640164, 70.47333615344107,\n 71.20291564160104, 71.93688215501312, 72.67524319850172,\n 73.41800625771542, 74.16517879925733, 74.9167682708136,\n 75.67278210128072, 76.43322770089146, 77.1981124613393,\n 77.96744375590167, 78.74122893956174, 79.51947534912904,\n 80.30219030335869, 81.08938110306934, 81.88105503125999,\n 82.67721935322541, 83.4778813166706, 84.28304815182372,\n 85.09272707154808, 85.90692527145302, 86.72564993000343,\n 87.54890820862819, 88.3767072518277, 89.2090541872801,\n 90.04595612594655, 90.88742016217518, 91.73345337380438,\n 92.58406282226491, 93.43925555268066, 94.29903859396902,\n 95.16341895893969, 96.03240364439274, 96.9059996312159,\n 97.78421388448044, 98.6670533535366, 99.55452497210776,\n];\n//# sourceMappingURL=hct_solver.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,YAAb,MAAa,UAAU;;;;;;;;CAQnB,OAAO,gBAAgB,OAAO;EAC1B,QAAQ,QAAQ,KAAK,KAAK,MAAM,KAAK,KAAK;CAC9C;;;;;;;;;;CAUA,OAAO,iBAAiB,cAAc;EAClC,MAAM,aAAa,eAAe;EAClC,IAAI,eAAe;EACnB,IAAI,cAAc,UACd,eAAe,aAAa;OAG5B,eAAe,QAAQ,KAAK,IAAI,YAAY,IAAM,GAAG,IAAI;EAE7D,OAAO,eAAe;CAC1B;CACA,OAAO,oBAAoB,WAAW;EAClC,MAAM,KAAK,KAAK,IAAI,KAAK,IAAI,SAAS,GAAG,GAAI;EAC7C,OAAOA,OAAiB,SAAS,IAAI,MAAQ,MAAM,KAAK;CAC5D;;;;;;;CAOA,OAAO,MAAM,QAAQ;EACjB,MAAM,iBAAiBC,eAAyB,QAAQ,UAAU,2BAA2B;EAC7F,MAAM,KAAK,UAAU,oBAAoB,eAAe,EAAE;EAC1D,MAAM,KAAK,UAAU,oBAAoB,eAAe,EAAE;EAC1D,MAAM,KAAK,UAAU,oBAAoB,eAAe,EAAE;EAE1D,MAAM,KAAK,KAAO,KAAK,MAAQ,KAAK,MAAM;EAE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;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAkB;CAAkB;CACpC;CAAoB;CAAmB;CACvC;CAAkB;CAAoB;CACtC;CAAmB;CAAoB;CACvC;CAAmB;CAAmB;CACtC;CAAoB;CAAmB;CACvC;CAAoB;CAAmB;CACvC;CAAkB;CAAoB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAkB;CACrC;CAAmB;CAAmB;CACtC;CAAmB;CAAkB;CACrC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAmB;CACtC;CAAmB;CAAkB;AACzC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { lerp } from "../utils/math_utils.js";
|
|
2
|
+
import { whitePointD65, yFromLstar } from "../utils/color_utils.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/viewing_conditions.js
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2021 Google LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* In traditional color spaces, a color can be identified solely by the
|
|
22
|
+
* observer's measurement of the color. Color appearance models such as CAM16
|
|
23
|
+
* also use information about the environment where the color was
|
|
24
|
+
* observed, known as the viewing conditions.
|
|
25
|
+
*
|
|
26
|
+
* For example, white under the traditional assumption of a midday sun white
|
|
27
|
+
* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,
|
|
28
|
+
* hue 203, chroma 3, lightness 100)
|
|
29
|
+
*
|
|
30
|
+
* This class caches intermediate values of the CAM16 conversion process that
|
|
31
|
+
* depend only on viewing conditions, enabling speed ups.
|
|
32
|
+
*/
|
|
33
|
+
var ViewingConditions = class ViewingConditions {
|
|
34
|
+
/**
|
|
35
|
+
* Create ViewingConditions from a simple, physically relevant, set of
|
|
36
|
+
* parameters.
|
|
37
|
+
*
|
|
38
|
+
* @param whitePoint White point, measured in the XYZ color space.
|
|
39
|
+
* default = D65, or sunny day afternoon
|
|
40
|
+
* @param adaptingLuminance The luminance of the adapting field. Informally,
|
|
41
|
+
* how bright it is in the room where the color is viewed. Can be
|
|
42
|
+
* calculated from lux by multiplying lux by 0.0586. default = 11.72,
|
|
43
|
+
* or 200 lux.
|
|
44
|
+
* @param backgroundLstar The lightness of the area surrounding the color.
|
|
45
|
+
* measured by L* in L*a*b*. default = 50.0
|
|
46
|
+
* @param surround A general description of the lighting surrounding the
|
|
47
|
+
* color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a
|
|
48
|
+
* dimly light room, like watching TV at home at night. 2.0 means there
|
|
49
|
+
* is no difference between the lighting on the color and around it.
|
|
50
|
+
* default = 2.0
|
|
51
|
+
* @param discountingIlluminant Whether the eye accounts for the tint of the
|
|
52
|
+
* ambient lighting, such as knowing an apple is still red in green light.
|
|
53
|
+
* default = false, the eye does not perform this process on
|
|
54
|
+
* self-luminous objects like displays.
|
|
55
|
+
*/
|
|
56
|
+
static make(whitePoint = whitePointD65(), adaptingLuminance = 200 / Math.PI * yFromLstar(50) / 100, backgroundLstar = 50, surround = 2, discountingIlluminant = false) {
|
|
57
|
+
const xyz = whitePoint;
|
|
58
|
+
const rW = xyz[0] * .401288 + xyz[1] * .650173 + xyz[2] * -.051461;
|
|
59
|
+
const gW = xyz[0] * -.250268 + xyz[1] * 1.204414 + xyz[2] * .045854;
|
|
60
|
+
const bW = xyz[0] * -.002079 + xyz[1] * .048952 + xyz[2] * .953127;
|
|
61
|
+
const f = .8 + surround / 10;
|
|
62
|
+
const c = f >= .9 ? lerp(.59, .69, (f - .9) * 10) : lerp(.525, .59, (f - .8) * 10);
|
|
63
|
+
let d = discountingIlluminant ? 1 : f * (1 - 1 / 3.6 * Math.exp((-adaptingLuminance - 42) / 92));
|
|
64
|
+
d = d > 1 ? 1 : d < 0 ? 0 : d;
|
|
65
|
+
const nc = f;
|
|
66
|
+
const rgbD = [
|
|
67
|
+
d * (100 / rW) + 1 - d,
|
|
68
|
+
d * (100 / gW) + 1 - d,
|
|
69
|
+
d * (100 / bW) + 1 - d
|
|
70
|
+
];
|
|
71
|
+
const k = 1 / (5 * adaptingLuminance + 1);
|
|
72
|
+
const k4 = k * k * k * k;
|
|
73
|
+
const k4F = 1 - k4;
|
|
74
|
+
const fl = k4 * adaptingLuminance + .1 * k4F * k4F * Math.cbrt(5 * adaptingLuminance);
|
|
75
|
+
const n = yFromLstar(backgroundLstar) / whitePoint[1];
|
|
76
|
+
const z = 1.48 + Math.sqrt(n);
|
|
77
|
+
const nbb = .725 / Math.pow(n, .2);
|
|
78
|
+
const ncb = nbb;
|
|
79
|
+
const rgbAFactors = [
|
|
80
|
+
Math.pow(fl * rgbD[0] * rW / 100, .42),
|
|
81
|
+
Math.pow(fl * rgbD[1] * gW / 100, .42),
|
|
82
|
+
Math.pow(fl * rgbD[2] * bW / 100, .42)
|
|
83
|
+
];
|
|
84
|
+
const rgbA = [
|
|
85
|
+
400 * rgbAFactors[0] / (rgbAFactors[0] + 27.13),
|
|
86
|
+
400 * rgbAFactors[1] / (rgbAFactors[1] + 27.13),
|
|
87
|
+
400 * rgbAFactors[2] / (rgbAFactors[2] + 27.13)
|
|
88
|
+
];
|
|
89
|
+
const aw = (2 * rgbA[0] + rgbA[1] + .05 * rgbA[2]) * nbb;
|
|
90
|
+
return new ViewingConditions(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, .25), z);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Parameters are intermediate values of the CAM16 conversion process. Their
|
|
94
|
+
* names are shorthand for technical color science terminology, this class
|
|
95
|
+
* would not benefit from documenting them individually. A brief overview
|
|
96
|
+
* is available in the CAM16 specification, and a complete overview requires
|
|
97
|
+
* a color science textbook, such as Fairchild's Color Appearance Models.
|
|
98
|
+
*/
|
|
99
|
+
constructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {
|
|
100
|
+
this.n = n;
|
|
101
|
+
this.aw = aw;
|
|
102
|
+
this.nbb = nbb;
|
|
103
|
+
this.ncb = ncb;
|
|
104
|
+
this.c = c;
|
|
105
|
+
this.nc = nc;
|
|
106
|
+
this.rgbD = rgbD;
|
|
107
|
+
this.fl = fl;
|
|
108
|
+
this.fLRoot = fLRoot;
|
|
109
|
+
this.z = z;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
/** sRGB-like viewing conditions. */
|
|
113
|
+
ViewingConditions.DEFAULT = ViewingConditions.make();
|
|
114
|
+
//#endregion
|
|
115
|
+
export { ViewingConditions };
|
|
116
|
+
|
|
117
|
+
//# sourceMappingURL=viewing_conditions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewing_conditions.js","names":["utils.whitePointD65","utils.yFromLstar","math.lerp"],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/hct/viewing_conditions.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as utils from '../utils/color_utils.js';\nimport * as math from '../utils/math_utils.js';\n/**\n * In traditional color spaces, a color can be identified solely by the\n * observer's measurement of the color. Color appearance models such as CAM16\n * also use information about the environment where the color was\n * observed, known as the viewing conditions.\n *\n * For example, white under the traditional assumption of a midday sun white\n * point is accurately measured as a slightly chromatic blue by CAM16. (roughly,\n * hue 203, chroma 3, lightness 100)\n *\n * This class caches intermediate values of the CAM16 conversion process that\n * depend only on viewing conditions, enabling speed ups.\n */\nexport class ViewingConditions {\n /**\n * Create ViewingConditions from a simple, physically relevant, set of\n * parameters.\n *\n * @param whitePoint White point, measured in the XYZ color space.\n * default = D65, or sunny day afternoon\n * @param adaptingLuminance The luminance of the adapting field. Informally,\n * how bright it is in the room where the color is viewed. Can be\n * calculated from lux by multiplying lux by 0.0586. default = 11.72,\n * or 200 lux.\n * @param backgroundLstar The lightness of the area surrounding the color.\n * measured by L* in L*a*b*. default = 50.0\n * @param surround A general description of the lighting surrounding the\n * color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a\n * dimly light room, like watching TV at home at night. 2.0 means there\n * is no difference between the lighting on the color and around it.\n * default = 2.0\n * @param discountingIlluminant Whether the eye accounts for the tint of the\n * ambient lighting, such as knowing an apple is still red in green light.\n * default = false, the eye does not perform this process on\n * self-luminous objects like displays.\n */\n static make(whitePoint = utils.whitePointD65(), adaptingLuminance = (200.0 / Math.PI) * utils.yFromLstar(50.0) / 100.0, backgroundLstar = 50.0, surround = 2.0, discountingIlluminant = false) {\n const xyz = whitePoint;\n const rW = xyz[0] * 0.401288 + xyz[1] * 0.650173 + xyz[2] * -0.051461;\n const gW = xyz[0] * -0.250268 + xyz[1] * 1.204414 + xyz[2] * 0.045854;\n const bW = xyz[0] * -0.002079 + xyz[1] * 0.048952 + xyz[2] * 0.953127;\n const f = 0.8 + surround / 10.0;\n const c = f >= 0.9 ? math.lerp(0.59, 0.69, (f - 0.9) * 10.0) :\n math.lerp(0.525, 0.59, (f - 0.8) * 10.0);\n let d = discountingIlluminant ?\n 1.0 :\n f * (1.0 - (1.0 / 3.6) * Math.exp((-adaptingLuminance - 42.0) / 92.0));\n d = d > 1.0 ? 1.0 : d < 0.0 ? 0.0 : d;\n const nc = f;\n const rgbD = [\n d * (100.0 / rW) + 1.0 - d,\n d * (100.0 / gW) + 1.0 - d,\n d * (100.0 / bW) + 1.0 - d,\n ];\n const k = 1.0 / (5.0 * adaptingLuminance + 1.0);\n const k4 = k * k * k * k;\n const k4F = 1.0 - k4;\n const fl = k4 * adaptingLuminance +\n 0.1 * k4F * k4F * Math.cbrt(5.0 * adaptingLuminance);\n const n = utils.yFromLstar(backgroundLstar) / whitePoint[1];\n const z = 1.48 + Math.sqrt(n);\n const nbb = 0.725 / Math.pow(n, 0.2);\n const ncb = nbb;\n const rgbAFactors = [\n Math.pow((fl * rgbD[0] * rW) / 100.0, 0.42),\n Math.pow((fl * rgbD[1] * gW) / 100.0, 0.42),\n Math.pow((fl * rgbD[2] * bW) / 100.0, 0.42),\n ];\n const rgbA = [\n (400.0 * rgbAFactors[0]) / (rgbAFactors[0] + 27.13),\n (400.0 * rgbAFactors[1]) / (rgbAFactors[1] + 27.13),\n (400.0 * rgbAFactors[2]) / (rgbAFactors[2] + 27.13),\n ];\n const aw = (2.0 * rgbA[0] + rgbA[1] + 0.05 * rgbA[2]) * nbb;\n return new ViewingConditions(n, aw, nbb, ncb, c, nc, rgbD, fl, Math.pow(fl, 0.25), z);\n }\n /**\n * Parameters are intermediate values of the CAM16 conversion process. Their\n * names are shorthand for technical color science terminology, this class\n * would not benefit from documenting them individually. A brief overview\n * is available in the CAM16 specification, and a complete overview requires\n * a color science textbook, such as Fairchild's Color Appearance Models.\n */\n constructor(n, aw, nbb, ncb, c, nc, rgbD, fl, fLRoot, z) {\n this.n = n;\n this.aw = aw;\n this.nbb = nbb;\n this.ncb = ncb;\n this.c = c;\n this.nc = nc;\n this.rgbD = rgbD;\n this.fl = fl;\n this.fLRoot = fLRoot;\n this.z = z;\n }\n}\n/** sRGB-like viewing conditions. */\nViewingConditions.DEFAULT = ViewingConditions.make();\n//# sourceMappingURL=viewing_conditions.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAa,oBAAb,MAAa,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAuB3B,OAAO,KAAK,aAAaA,cAAoB,GAAG,oBAAqB,MAAQ,KAAK,KAAMC,WAAiB,EAAI,IAAI,KAAO,kBAAkB,IAAM,WAAW,GAAK,wBAAwB,OAAO;EAC3L,MAAM,MAAM;EACZ,MAAM,KAAK,IAAI,KAAK,UAAW,IAAI,KAAK,UAAW,IAAI,KAAK;EAC5D,MAAM,KAAK,IAAI,KAAK,WAAY,IAAI,KAAK,WAAW,IAAI,KAAK;EAC7D,MAAM,KAAK,IAAI,KAAK,WAAY,IAAI,KAAK,UAAW,IAAI,KAAK;EAC7D,MAAM,IAAI,KAAM,WAAW;EAC3B,MAAM,IAAI,KAAK,KAAMC,KAAU,KAAM,MAAO,IAAI,MAAO,EAAI,IACvDA,KAAU,MAAO,MAAO,IAAI,MAAO,EAAI;EAC3C,IAAI,IAAI,wBACJ,IACA,KAAK,IAAO,IAAM,MAAO,KAAK,KAAK,CAAC,oBAAoB,MAAQ,EAAI;EACxE,IAAI,IAAI,IAAM,IAAM,IAAI,IAAM,IAAM;EACpC,MAAM,KAAK;EACX,MAAM,OAAO;GACT,KAAK,MAAQ,MAAM,IAAM;GACzB,KAAK,MAAQ,MAAM,IAAM;GACzB,KAAK,MAAQ,MAAM,IAAM;EAC7B;EACA,MAAM,IAAI,KAAO,IAAM,oBAAoB;EAC3C,MAAM,KAAK,IAAI,IAAI,IAAI;EACvB,MAAM,MAAM,IAAM;EAClB,MAAM,KAAK,KAAK,oBACZ,KAAM,MAAM,MAAM,KAAK,KAAK,IAAM,iBAAiB;EACvD,MAAM,IAAID,WAAiB,eAAe,IAAI,WAAW;EACzD,MAAM,IAAI,OAAO,KAAK,KAAK,CAAC;EAC5B,MAAM,MAAM,OAAQ,KAAK,IAAI,GAAG,EAAG;EACnC,MAAM,MAAM;EACZ,MAAM,cAAc;GAChB,KAAK,IAAK,KAAK,KAAK,KAAK,KAAM,KAAO,GAAI;GAC1C,KAAK,IAAK,KAAK,KAAK,KAAK,KAAM,KAAO,GAAI;GAC1C,KAAK,IAAK,KAAK,KAAK,KAAK,KAAM,KAAO,GAAI;EAC9C;EACA,MAAM,OAAO;GACR,MAAQ,YAAY,MAAO,YAAY,KAAK;GAC5C,MAAQ,YAAY,MAAO,YAAY,KAAK;GAC5C,MAAQ,YAAY,MAAO,YAAY,KAAK;EACjD;EACA,MAAM,MAAM,IAAM,KAAK,KAAK,KAAK,KAAK,MAAO,KAAK,MAAM;EACxD,OAAO,IAAI,kBAAkB,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,MAAM,IAAI,KAAK,IAAI,IAAI,GAAI,GAAG,CAAC;CACxF;;;;;;;;CAQA,YAAY,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,MAAM,IAAI,QAAQ,GAAG;EACrD,KAAK,IAAI;EACT,KAAK,KAAK;EACV,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,IAAI;EACT,KAAK,KAAK;EACV,KAAK,OAAO;EACZ,KAAK,KAAK;EACV,KAAK,SAAS;EACd,KAAK,IAAI;CACb;AACJ;;AAEA,kBAAkB,UAAU,kBAAkB,KAAK"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { clampDouble, clampInt, differenceDegrees, lerp, matrixMultiply, rotationDirection, sanitizeDegreesDouble, sanitizeDegreesInt, signum } from "./utils/math_utils.js";
|
|
2
|
+
import { argbFromLinrgb, argbFromLstar, argbFromRgb, argbFromXyz, blueFromArgb, delinearized, greenFromArgb, labFromArgb, linearized, lstarFromArgb, lstarFromY, redFromArgb, whitePointD65, xyzFromArgb, yFromLstar } from "./utils/color_utils.js";
|
|
3
|
+
import { ViewingConditions } from "./hct/viewing_conditions.js";
|
|
4
|
+
import { Cam16 } from "./hct/cam16.js";
|
|
5
|
+
import { Hct } from "./hct/hct.js";
|
|
6
|
+
import { Blend } from "./blend/blend.js";
|
|
7
|
+
import { Contrast } from "./contrast/contrast.js";
|
|
8
|
+
import { DislikeAnalyzer } from "./dislike/dislike_analyzer.js";
|
|
9
|
+
import { DynamicColor, extendSpecVersion } from "./dynamiccolor/dynamic_color.js";
|
|
10
|
+
import { TonalPalette } from "./palettes/tonal_palette.js";
|
|
11
|
+
import { TemperatureCache } from "./temperature/temperature_cache.js";
|
|
12
|
+
import { Variant } from "./dynamiccolor/variant.js";
|
|
13
|
+
import { MaterialDynamicColors } from "./dynamiccolor/material_dynamic_colors.js";
|
|
14
|
+
import { DynamicScheme } from "./dynamiccolor/dynamic_scheme.js";
|
|
15
|
+
import "./palettes/core_palette.js";
|
|
16
|
+
import "./scheme/scheme.js";
|
|
17
|
+
import "./scheme/scheme_android.js";
|
|
18
|
+
import "./scheme/scheme_content.js";
|
|
19
|
+
import { SchemeExpressive } from "./scheme/scheme_expressive.js";
|
|
20
|
+
import "./scheme/scheme_fidelity.js";
|
|
21
|
+
import "./scheme/scheme_fruit_salad.js";
|
|
22
|
+
import "./scheme/scheme_monochrome.js";
|
|
23
|
+
import { SchemeNeutral } from "./scheme/scheme_neutral.js";
|
|
24
|
+
import "./scheme/scheme_rainbow.js";
|
|
25
|
+
import { SchemeTonalSpot } from "./scheme/scheme_tonal_spot.js";
|
|
26
|
+
import { SchemeVibrant } from "./scheme/scheme_vibrant.js";
|
|
27
|
+
import { Score } from "./score/score.js";
|
|
28
|
+
import { argbFromHex, hexFromArgb } from "./utils/string_utils.js";
|
|
29
|
+
import "./utils/image_utils.js";
|
|
30
|
+
import "./utils/theme_utils.js";
|
|
31
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/index.js
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
* Copyright 2021 Google LLC
|
|
35
|
+
*
|
|
36
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
37
|
+
* you may not use this file except in compliance with the License.
|
|
38
|
+
* You may obtain a copy of the License at
|
|
39
|
+
*
|
|
40
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
41
|
+
*
|
|
42
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
43
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
44
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
45
|
+
* See the License for the specific language governing permissions and
|
|
46
|
+
* limitations under the License.
|
|
47
|
+
*/
|
|
48
|
+
//#endregion
|
|
49
|
+
export { Blend, Cam16, Contrast, DislikeAnalyzer, DynamicColor, DynamicScheme, Hct, MaterialDynamicColors, SchemeExpressive, SchemeNeutral, SchemeTonalSpot, SchemeVibrant, Score, TemperatureCache, TonalPalette, Variant, ViewingConditions, argbFromHex, argbFromLinrgb, argbFromLstar, argbFromRgb, argbFromXyz, blueFromArgb, clampDouble, clampInt, delinearized, differenceDegrees, extendSpecVersion, greenFromArgb, hexFromArgb, labFromArgb, lerp, linearized, lstarFromArgb, lstarFromY, matrixMultiply, redFromArgb, rotationDirection, sanitizeDegreesDouble, sanitizeDegreesInt, signum, whitePointD65, xyzFromArgb, yFromLstar };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/index.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * from './blend/blend.js';\nexport * from './contrast/contrast.js';\nexport * from './dislike/dislike_analyzer.js';\nexport * from './dynamiccolor/dynamic_color.js';\nexport * from './dynamiccolor/dynamic_scheme.js';\nexport * from './dynamiccolor/material_dynamic_colors.js';\nexport * from './dynamiccolor/variant.js';\nexport * from './hct/cam16.js';\nexport * from './hct/hct.js';\nexport * from './hct/viewing_conditions.js';\nexport * from './palettes/core_palette.js';\nexport * from './palettes/tonal_palette.js';\nexport * from './quantize/quantizer_celebi.js';\nexport * from './quantize/quantizer_map.js';\nexport * from './quantize/quantizer_wsmeans.js';\nexport * from './quantize/quantizer_wu.js';\nexport * from './scheme/scheme.js';\nexport * from './scheme/scheme_android.js';\nexport * from './scheme/scheme_content.js';\nexport * from './scheme/scheme_expressive.js';\nexport * from './scheme/scheme_fidelity.js';\nexport * from './scheme/scheme_fruit_salad.js';\nexport * from './scheme/scheme_monochrome.js';\nexport * from './scheme/scheme_neutral.js';\nexport * from './scheme/scheme_rainbow.js';\nexport * from './scheme/scheme_tonal_spot.js';\nexport * from './scheme/scheme_vibrant.js';\nexport * from './score/score.js';\nexport * from './temperature/temperature_cache.js';\nexport * from './utils/color_utils.js';\nexport * from './utils/math_utils.js';\nexport * from './utils/string_utils.js';\nexport * from './utils/image_utils.js';\nexport * from './utils/theme_utils.js';\n//# sourceMappingURL=index.js.map"],"ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../hct/hct.js";
|
|
2
|
+
import "./tonal_palette.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/palettes/core_palette.js
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2021 Google LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
//#endregion
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=core_palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core_palette.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/palettes/core_palette.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\nimport { TonalPalette } from './tonal_palette.js';\n/**\n * An intermediate concept between the key color for a UI theme, and a full\n * color scheme. 5 sets of tones are generated, all except one use the same hue\n * as the key color, and all vary in chroma.\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\nexport class CorePalette {\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static of(argb) {\n return new CorePalette(argb, false);\n }\n /**\n * @param argb ARGB representation of a color\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentOf(argb) {\n return new CorePalette(argb, true);\n }\n /**\n * Create a [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static fromColors(colors) {\n return CorePalette.createPaletteFromColors(false, colors);\n }\n /**\n * Create a content [CorePalette] from a set of colors\n *\n * @deprecated Use {@link DynamicScheme} for color scheme generation.\n * Use {@link CorePalettes} for core palettes container class.\n */\n static contentFromColors(colors) {\n return CorePalette.createPaletteFromColors(true, colors);\n }\n static createPaletteFromColors(content, colors) {\n const palette = new CorePalette(colors.primary, content);\n if (colors.secondary) {\n const p = new CorePalette(colors.secondary, content);\n palette.a2 = p.a1;\n }\n if (colors.tertiary) {\n const p = new CorePalette(colors.tertiary, content);\n palette.a3 = p.a1;\n }\n if (colors.error) {\n const p = new CorePalette(colors.error, content);\n palette.error = p.a1;\n }\n if (colors.neutral) {\n const p = new CorePalette(colors.neutral, content);\n palette.n1 = p.n1;\n }\n if (colors.neutralVariant) {\n const p = new CorePalette(colors.neutralVariant, content);\n palette.n2 = p.n2;\n }\n return palette;\n }\n constructor(argb, isContent) {\n const hct = Hct.fromInt(argb);\n const hue = hct.hue;\n const chroma = hct.chroma;\n if (isContent) {\n this.a1 = TonalPalette.fromHueAndChroma(hue, chroma);\n this.a2 = TonalPalette.fromHueAndChroma(hue, chroma / 3);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, chroma / 2);\n this.n1 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 12, 4));\n this.n2 = TonalPalette.fromHueAndChroma(hue, Math.min(chroma / 6, 8));\n }\n else {\n this.a1 = TonalPalette.fromHueAndChroma(hue, Math.max(48, chroma));\n this.a2 = TonalPalette.fromHueAndChroma(hue, 16);\n this.a3 = TonalPalette.fromHueAndChroma(hue + 60, 24);\n this.n1 = TonalPalette.fromHueAndChroma(hue, 4);\n this.n2 = TonalPalette.fromHueAndChroma(hue, 8);\n }\n this.error = TonalPalette.fromHueAndChroma(25, 84);\n }\n}\n//# sourceMappingURL=core_palette.js.map"],"ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { Hct } from "../hct/hct.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/palettes/tonal_palette.js
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2021 Google LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* A convenience class for retrieving colors that are constant in hue and
|
|
21
|
+
* chroma, but vary in tone.
|
|
22
|
+
*/
|
|
23
|
+
var TonalPalette = class TonalPalette {
|
|
24
|
+
/**
|
|
25
|
+
* @param argb ARGB representation of a color
|
|
26
|
+
* @return Tones matching that color's hue and chroma.
|
|
27
|
+
*/
|
|
28
|
+
static fromInt(argb) {
|
|
29
|
+
const hct = Hct.fromInt(argb);
|
|
30
|
+
return TonalPalette.fromHct(hct);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @param hct Hct
|
|
34
|
+
* @return Tones matching that color's hue and chroma.
|
|
35
|
+
*/
|
|
36
|
+
static fromHct(hct) {
|
|
37
|
+
return new TonalPalette(hct.hue, hct.chroma, hct);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @param hue HCT hue
|
|
41
|
+
* @param chroma HCT chroma
|
|
42
|
+
* @return Tones matching hue and chroma.
|
|
43
|
+
*/
|
|
44
|
+
static fromHueAndChroma(hue, chroma) {
|
|
45
|
+
const keyColor = new KeyColor(hue, chroma).create();
|
|
46
|
+
return new TonalPalette(hue, chroma, keyColor);
|
|
47
|
+
}
|
|
48
|
+
constructor(hue, chroma, keyColor) {
|
|
49
|
+
this.hue = hue;
|
|
50
|
+
this.chroma = chroma;
|
|
51
|
+
this.keyColor = keyColor;
|
|
52
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param tone HCT tone, measured from 0 to 100.
|
|
56
|
+
* @return ARGB representation of a color with that tone.
|
|
57
|
+
*/
|
|
58
|
+
tone(tone) {
|
|
59
|
+
let argb = this.cache.get(tone);
|
|
60
|
+
if (argb === void 0) {
|
|
61
|
+
if (tone == 99 && Hct.isYellow(this.hue)) argb = this.averageArgb(this.tone(98), this.tone(100));
|
|
62
|
+
else argb = Hct.from(this.hue, this.chroma, tone).toInt();
|
|
63
|
+
this.cache.set(tone, argb);
|
|
64
|
+
}
|
|
65
|
+
return argb;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @param tone HCT tone.
|
|
69
|
+
* @return HCT representation of a color with that tone.
|
|
70
|
+
*/
|
|
71
|
+
getHct(tone) {
|
|
72
|
+
return Hct.fromInt(this.tone(tone));
|
|
73
|
+
}
|
|
74
|
+
averageArgb(argb1, argb2) {
|
|
75
|
+
const red1 = argb1 >>> 16 & 255;
|
|
76
|
+
const green1 = argb1 >>> 8 & 255;
|
|
77
|
+
const blue1 = argb1 & 255;
|
|
78
|
+
const red2 = argb2 >>> 16 & 255;
|
|
79
|
+
const green2 = argb2 >>> 8 & 255;
|
|
80
|
+
const blue2 = argb2 & 255;
|
|
81
|
+
const red = Math.round((red1 + red2) / 2);
|
|
82
|
+
const green = Math.round((green1 + green2) / 2);
|
|
83
|
+
const blue = Math.round((blue1 + blue2) / 2);
|
|
84
|
+
return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 | blue & 255) >>> 0;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Key color is a color that represents the hue and chroma of a tonal palette
|
|
89
|
+
*/
|
|
90
|
+
var KeyColor = class {
|
|
91
|
+
constructor(hue, requestedChroma) {
|
|
92
|
+
this.hue = hue;
|
|
93
|
+
this.requestedChroma = requestedChroma;
|
|
94
|
+
this.chromaCache = /* @__PURE__ */ new Map();
|
|
95
|
+
this.maxChromaValue = 200;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Creates a key color from a [hue] and a [chroma].
|
|
99
|
+
* The key color is the first tone, starting from T50, matching the given hue
|
|
100
|
+
* and chroma.
|
|
101
|
+
*
|
|
102
|
+
* @return Key color [Hct]
|
|
103
|
+
*/
|
|
104
|
+
create() {
|
|
105
|
+
const pivotTone = 50;
|
|
106
|
+
const toneStepSize = 1;
|
|
107
|
+
const epsilon = .01;
|
|
108
|
+
let lowerTone = 0;
|
|
109
|
+
let upperTone = 100;
|
|
110
|
+
while (lowerTone < upperTone) {
|
|
111
|
+
const midTone = Math.floor((lowerTone + upperTone) / 2);
|
|
112
|
+
const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);
|
|
113
|
+
if (this.maxChroma(midTone) >= this.requestedChroma - epsilon) {
|
|
114
|
+
if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) upperTone = midTone;
|
|
115
|
+
else {
|
|
116
|
+
if (lowerTone === midTone) return Hct.from(this.hue, this.requestedChroma, lowerTone);
|
|
117
|
+
lowerTone = midTone;
|
|
118
|
+
}
|
|
119
|
+
} else if (isAscending) lowerTone = midTone + toneStepSize;
|
|
120
|
+
else upperTone = midTone;
|
|
121
|
+
}
|
|
122
|
+
return Hct.from(this.hue, this.requestedChroma, lowerTone);
|
|
123
|
+
}
|
|
124
|
+
maxChroma(tone) {
|
|
125
|
+
if (this.chromaCache.has(tone)) return this.chromaCache.get(tone);
|
|
126
|
+
const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;
|
|
127
|
+
this.chromaCache.set(tone, chroma);
|
|
128
|
+
return chroma;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
//#endregion
|
|
132
|
+
export { TonalPalette };
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=tonal_palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tonal_palette.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/palettes/tonal_palette.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hct } from '../hct/hct.js';\n/**\n * A convenience class for retrieving colors that are constant in hue and\n * chroma, but vary in tone.\n */\nexport class TonalPalette {\n /**\n * @param argb ARGB representation of a color\n * @return Tones matching that color's hue and chroma.\n */\n static fromInt(argb) {\n const hct = Hct.fromInt(argb);\n return TonalPalette.fromHct(hct);\n }\n /**\n * @param hct Hct\n * @return Tones matching that color's hue and chroma.\n */\n static fromHct(hct) {\n return new TonalPalette(hct.hue, hct.chroma, hct);\n }\n /**\n * @param hue HCT hue\n * @param chroma HCT chroma\n * @return Tones matching hue and chroma.\n */\n static fromHueAndChroma(hue, chroma) {\n const keyColor = new KeyColor(hue, chroma).create();\n return new TonalPalette(hue, chroma, keyColor);\n }\n constructor(hue, chroma, keyColor) {\n this.hue = hue;\n this.chroma = chroma;\n this.keyColor = keyColor;\n this.cache = new Map();\n }\n /**\n * @param tone HCT tone, measured from 0 to 100.\n * @return ARGB representation of a color with that tone.\n */\n tone(tone) {\n let argb = this.cache.get(tone);\n if (argb === undefined) {\n if (tone == 99 && Hct.isYellow(this.hue)) {\n argb = this.averageArgb(this.tone(98), this.tone(100));\n }\n else {\n argb = Hct.from(this.hue, this.chroma, tone).toInt();\n }\n this.cache.set(tone, argb);\n }\n return argb;\n }\n /**\n * @param tone HCT tone.\n * @return HCT representation of a color with that tone.\n */\n getHct(tone) {\n return Hct.fromInt(this.tone(tone));\n }\n averageArgb(argb1, argb2) {\n const red1 = (argb1 >>> 16) & 0xff;\n const green1 = (argb1 >>> 8) & 0xff;\n const blue1 = argb1 & 0xff;\n const red2 = (argb2 >>> 16) & 0xff;\n const green2 = (argb2 >>> 8) & 0xff;\n const blue2 = argb2 & 0xff;\n const red = Math.round((red1 + red2) / 2);\n const green = Math.round((green1 + green2) / 2);\n const blue = Math.round((blue1 + blue2) / 2);\n return (255 << 24 | (red & 255) << 16 | (green & 255) << 8 |\n (blue & 255)) >>>\n 0;\n }\n}\n/**\n * Key color is a color that represents the hue and chroma of a tonal palette\n */\nclass KeyColor {\n constructor(hue, requestedChroma) {\n this.hue = hue;\n this.requestedChroma = requestedChroma;\n // Cache that maps tone to max chroma to avoid duplicated HCT calculation.\n this.chromaCache = new Map();\n this.maxChromaValue = 200.0;\n }\n /**\n * Creates a key color from a [hue] and a [chroma].\n * The key color is the first tone, starting from T50, matching the given hue\n * and chroma.\n *\n * @return Key color [Hct]\n */\n create() {\n // Pivot around T50 because T50 has the most chroma available, on\n // average. Thus it is most likely to have a direct answer.\n const pivotTone = 50;\n const toneStepSize = 1;\n // Epsilon to accept values slightly higher than the requested chroma.\n const epsilon = 0.01;\n // Binary search to find the tone that can provide a chroma that is closest\n // to the requested chroma.\n let lowerTone = 0;\n let upperTone = 100;\n while (lowerTone < upperTone) {\n const midTone = Math.floor((lowerTone + upperTone) / 2);\n const isAscending = this.maxChroma(midTone) < this.maxChroma(midTone + toneStepSize);\n const sufficientChroma = this.maxChroma(midTone) >= this.requestedChroma - epsilon;\n if (sufficientChroma) {\n // Either range [lowerTone, midTone] or [midTone, upperTone] has\n // the answer, so search in the range that is closer the pivot tone.\n if (Math.abs(lowerTone - pivotTone) < Math.abs(upperTone - pivotTone)) {\n upperTone = midTone;\n }\n else {\n if (lowerTone === midTone) {\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n lowerTone = midTone;\n }\n }\n else {\n // As there is no sufficient chroma in the midTone, follow the direction\n // to the chroma peak.\n if (isAscending) {\n lowerTone = midTone + toneStepSize;\n }\n else {\n // Keep midTone for potential chroma peak.\n upperTone = midTone;\n }\n }\n }\n return Hct.from(this.hue, this.requestedChroma, lowerTone);\n }\n // Find the maximum chroma for a given tone\n maxChroma(tone) {\n if (this.chromaCache.has(tone)) {\n return this.chromaCache.get(tone);\n }\n const chroma = Hct.from(this.hue, this.maxChromaValue, tone).chroma;\n this.chromaCache.set(tone, chroma);\n return chroma;\n }\n}\n//# sourceMappingURL=tonal_palette.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,eAAb,MAAa,aAAa;;;;;CAKtB,OAAO,QAAQ,MAAM;EACjB,MAAM,MAAM,IAAI,QAAQ,IAAI;EAC5B,OAAO,aAAa,QAAQ,GAAG;CACnC;;;;;CAKA,OAAO,QAAQ,KAAK;EAChB,OAAO,IAAI,aAAa,IAAI,KAAK,IAAI,QAAQ,GAAG;CACpD;;;;;;CAMA,OAAO,iBAAiB,KAAK,QAAQ;EACjC,MAAM,WAAW,IAAI,SAAS,KAAK,MAAM,CAAC,CAAC,OAAO;EAClD,OAAO,IAAI,aAAa,KAAK,QAAQ,Q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GhB,IAAI,YAAY;EAChB,IAAI,YAAY;EAChB,OAAO,YAAY,WAAW;GAC1B,MAAM,UAAU,KAAK,OAAO,YAAY,aAAa,CAAC;GACtD,MAAM,cAAc,KAAK,UAAU,OAAO,IAAI,KAAK,UAAU,UAAU,YAAY;GAEnF,IADyB,KAAK,UAAU,OAAO,KAAK,KAAK,kBAAkB,SACrD;IAGlB,IAAI,KAAK,IAAI,YAAY,SAAS,IAAI,KAAK,IAAI,YAAY,SAAS,GAChE,YAAY;SAEX;KACD,IAAI,cAAc,SACd,OAAO,IAAI,KAAK,KAAK,KAAK,KAAK,iBAAiB,SAAS;KAE7D,YAAY;IAChB;GACJ,OAII,IAAI,aACA,YAAY,UAAU;QAItB,YAAY;EAGxB;EACA,OAAO,IAAI,KAAK,KAAK,KAAK,KAAK,iBAAiB,SAAS;CAC7D;CAEA,UAAU,MAAM;EACZ,IAAI,KAAK,YAAY,IAAI,IAAI,GACzB,OAAO,KAAK,YAAY,IAAI,IAAI;EAEpC,MAAM,SAAS,IAAI,KAAK,KAAK,KAAK,KAAK,gBAAgB,IAAI,CAAC,CAAC;EAC7D,KAAK,YAAY,IAAI,MAAM,MAAM;EACjC,OAAO;CACX;AACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../palettes/core_palette.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme.js
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2021 Google LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
//#endregion
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=scheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This file is automatically generated. Do not modify it.\nimport { CorePalette } from '../palettes/core_palette.js';\n/**\n * DEPRECATED. The `Scheme` class is deprecated in favor of `DynamicScheme`.\n * Please see\n * https://github.com/material-foundation/material-color-utilities/blob/main/make_schemes.md\n * for migration guidance.\n *\n * Represents a Material color scheme, a mapping of color roles to colors.\n */\nexport class Scheme {\n get primary() {\n return this.props.primary;\n }\n get onPrimary() {\n return this.props.onPrimary;\n }\n get primaryContainer() {\n return this.props.primaryContainer;\n }\n get onPrimaryContainer() {\n return this.props.onPrimaryContainer;\n }\n get secondary() {\n return this.props.secondary;\n }\n get onSecondary() {\n return this.props.onSecondary;\n }\n get secondaryContainer() {\n return this.props.secondaryContainer;\n }\n get onSecondaryContainer() {\n return this.props.onSecondaryContainer;\n }\n get tertiary() {\n return this.props.tertiary;\n }\n get onTertiary() {\n return this.props.onTertiary;\n }\n get tertiaryContainer() {\n return this.props.tertiaryContainer;\n }\n get onTertiaryContainer() {\n return this.props.onTertiaryContainer;\n }\n get error() {\n return this.props.error;\n }\n get onError() {\n return this.props.onError;\n }\n get errorContainer() {\n return this.props.errorContainer;\n }\n get onErrorContainer() {\n return this.props.onErrorContainer;\n }\n get background() {\n return this.props.background;\n }\n get onBackground() {\n return this.props.onBackground;\n }\n get surface() {\n return this.props.surface;\n }\n get onSurface() {\n return this.props.onSurface;\n }\n get surfaceVariant() {\n return this.props.surfaceVariant;\n }\n get onSurfaceVariant() {\n return this.props.onSurfaceVariant;\n }\n get outline() {\n return this.props.outline;\n }\n get outlineVariant() {\n return this.props.outlineVariant;\n }\n get shadow() {\n return this.props.shadow;\n }\n get scrim() {\n return this.props.scrim;\n }\n get inverseSurface() {\n return this.props.inverseSurface;\n }\n get inverseOnSurface() {\n return this.props.inverseOnSurface;\n }\n get inversePrimary() {\n return this.props.inversePrimary;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material color scheme, based on the color's hue.\n */\n static light(argb) {\n return Scheme.lightFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material color scheme, based on the color's hue.\n */\n static dark(argb) {\n return Scheme.darkFromCorePalette(CorePalette.of(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material content color scheme, based on the color's hue.\n */\n static lightContent(argb) {\n return Scheme.lightFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material content color scheme, based on the color's hue.\n */\n static darkContent(argb) {\n return Scheme.darkFromCorePalette(CorePalette.contentOf(argb));\n }\n /**\n * Light scheme from core palette\n */\n static lightFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(40),\n onPrimary: core.a1.tone(100),\n primaryContainer: core.a1.tone(90),\n onPrimaryContainer: core.a1.tone(10),\n secondary: core.a2.tone(40),\n onSecondary: core.a2.tone(100),\n secondaryContainer: core.a2.tone(90),\n onSecondaryContainer: core.a2.tone(10),\n tertiary: core.a3.tone(40),\n onTertiary: core.a3.tone(100),\n tertiaryContainer: core.a3.tone(90),\n onTertiaryContainer: core.a3.tone(10),\n error: core.error.tone(40),\n onError: core.error.tone(100),\n errorContainer: core.error.tone(90),\n onErrorContainer: core.error.tone(10),\n background: core.n1.tone(99),\n onBackground: core.n1.tone(10),\n surface: core.n1.tone(99),\n onSurface: core.n1.tone(10),\n surfaceVariant: core.n2.tone(90),\n onSurfaceVariant: core.n2.tone(30),\n outline: core.n2.tone(50),\n outlineVariant: core.n2.tone(80),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(20),\n inverseOnSurface: core.n1.tone(95),\n inversePrimary: core.a1.tone(80)\n });\n }\n /**\n * Dark scheme from core palette\n */\n static darkFromCorePalette(core) {\n return new Scheme({\n primary: core.a1.tone(80),\n onPrimary: core.a1.tone(20),\n primaryContainer: core.a1.tone(30),\n onPrimaryContainer: core.a1.tone(90),\n secondary: core.a2.tone(80),\n onSecondary: core.a2.tone(20),\n secondaryContainer: core.a2.tone(30),\n onSecondaryContainer: core.a2.tone(90),\n tertiary: core.a3.tone(80),\n onTertiary: core.a3.tone(20),\n tertiaryContainer: core.a3.tone(30),\n onTertiaryContainer: core.a3.tone(90),\n error: core.error.tone(80),\n onError: core.error.tone(20),\n errorContainer: core.error.tone(30),\n onErrorContainer: core.error.tone(80),\n background: core.n1.tone(10),\n onBackground: core.n1.tone(90),\n surface: core.n1.tone(10),\n onSurface: core.n1.tone(90),\n surfaceVariant: core.n2.tone(30),\n onSurfaceVariant: core.n2.tone(80),\n outline: core.n2.tone(60),\n outlineVariant: core.n2.tone(30),\n shadow: core.n1.tone(0),\n scrim: core.n1.tone(0),\n inverseSurface: core.n1.tone(90),\n inverseOnSurface: core.n1.tone(20),\n inversePrimary: core.a1.tone(40)\n });\n }\n constructor(props) {\n this.props = props;\n }\n toJSON() {\n return {\n ...this.props\n };\n }\n}\n//# sourceMappingURL=scheme.js.map"],"ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../palettes/core_palette.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_android.js
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2021 Google LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
//#endregion
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=scheme_android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme_android.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_android.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CorePalette } from '../palettes/core_palette.js';\n/**\n * Represents an Android 12 color scheme, a mapping of color roles to colors.\n */\nexport class SchemeAndroid {\n get colorAccentPrimary() {\n return this.props.colorAccentPrimary;\n }\n get colorAccentPrimaryVariant() {\n return this.props.colorAccentPrimaryVariant;\n }\n get colorAccentSecondary() {\n return this.props.colorAccentSecondary;\n }\n get colorAccentSecondaryVariant() {\n return this.props.colorAccentSecondaryVariant;\n }\n get colorAccentTertiary() {\n return this.props.colorAccentTertiary;\n }\n get colorAccentTertiaryVariant() {\n return this.props.colorAccentTertiaryVariant;\n }\n get textColorPrimary() {\n return this.props.textColorPrimary;\n }\n get textColorSecondary() {\n return this.props.textColorSecondary;\n }\n get textColorTertiary() {\n return this.props.textColorTertiary;\n }\n get textColorPrimaryInverse() {\n return this.props.textColorPrimaryInverse;\n }\n get textColorSecondaryInverse() {\n return this.props.textColorSecondaryInverse;\n }\n get textColorTertiaryInverse() {\n return this.props.textColorTertiaryInverse;\n }\n get colorBackground() {\n return this.props.colorBackground;\n }\n get colorBackgroundFloating() {\n return this.props.colorBackgroundFloating;\n }\n get colorSurface() {\n return this.props.colorSurface;\n }\n get colorSurfaceVariant() {\n return this.props.colorSurfaceVariant;\n }\n get colorSurfaceHighlight() {\n return this.props.colorSurfaceHighlight;\n }\n get surfaceHeader() {\n return this.props.surfaceHeader;\n }\n get underSurface() {\n return this.props.underSurface;\n }\n get offState() {\n return this.props.offState;\n }\n get accentSurface() {\n return this.props.accentSurface;\n }\n get textPrimaryOnAccent() {\n return this.props.textPrimaryOnAccent;\n }\n get textSecondaryOnAccent() {\n return this.props.textSecondaryOnAccent;\n }\n get volumeBackground() {\n return this.props.volumeBackground;\n }\n get scrim() {\n return this.props.scrim;\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Material color scheme, based on the color's hue.\n */\n static light(argb) {\n const core = CorePalette.of(argb);\n return SchemeAndroid.lightFromCorePalette(core);\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Material color scheme, based on the color's hue.\n */\n static dark(argb) {\n const core = CorePalette.of(argb);\n return SchemeAndroid.darkFromCorePalette(core);\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Light Android color scheme, based on the color's hue.\n */\n static lightContent(argb) {\n const core = CorePalette.contentOf(argb);\n return SchemeAndroid.lightFromCorePalette(core);\n }\n /**\n * @param argb ARGB representation of a color.\n * @return Dark Android color scheme, based on the color's hue.\n */\n static darkContent(argb) {\n const core = CorePalette.contentOf(argb);\n return SchemeAndroid.darkFromCorePalette(core);\n }\n /**\n * Light scheme from core palette\n */\n static lightFromCorePalette(core) {\n return new SchemeAndroid({\n colorAccentPrimary: core.a1.tone(90),\n colorAccentPrimaryVariant: core.a1.tone(40),\n colorAccentSecondary: core.a2.tone(90),\n colorAccentSecondaryVariant: core.a2.tone(40),\n colorAccentTertiary: core.a3.tone(90),\n colorAccentTertiaryVariant: core.a3.tone(40),\n textColorPrimary: core.n1.tone(10),\n textColorSecondary: core.n2.tone(30),\n textColorTertiary: core.n2.tone(50),\n textColorPrimaryInverse: core.n1.tone(95),\n textColorSecondaryInverse: core.n1.tone(80),\n textColorTertiaryInverse: core.n1.tone(60),\n colorBackground: core.n1.tone(95),\n colorBackgroundFloating: core.n1.tone(98),\n colorSurface: core.n1.tone(98),\n colorSurfaceVariant: core.n1.tone(90),\n colorSurfaceHighlight: core.n1.tone(100),\n surfaceHeader: core.n1.tone(90),\n underSurface: core.n1.tone(0),\n offState: core.n1.tone(20),\n accentSurface: core.a2.tone(95),\n textPrimaryOnAccent: core.n1.tone(10),\n textSecondaryOnAccent: core.n2.tone(30),\n volumeBackground: core.n1.tone(25),\n scrim: core.n1.tone(80),\n });\n }\n /**\n * Dark scheme from core palette\n */\n static darkFromCorePalette(core) {\n return new SchemeAndroid({\n colorAccentPrimary: core.a1.tone(90),\n colorAccentPrimaryVariant: core.a1.tone(70),\n colorAccentSecondary: core.a2.tone(90),\n colorAccentSecondaryVariant: core.a2.tone(70),\n colorAccentTertiary: core.a3.tone(90),\n colorAccentTertiaryVariant: core.a3.tone(70),\n textColorPrimary: core.n1.tone(95),\n textColorSecondary: core.n2.tone(80),\n textColorTertiary: core.n2.tone(60),\n textColorPrimaryInverse: core.n1.tone(10),\n textColorSecondaryInverse: core.n1.tone(30),\n textColorTertiaryInverse: core.n1.tone(50),\n colorBackground: core.n1.tone(10),\n colorBackgroundFloating: core.n1.tone(10),\n colorSurface: core.n1.tone(20),\n colorSurfaceVariant: core.n1.tone(30),\n colorSurfaceHighlight: core.n1.tone(35),\n surfaceHeader: core.n1.tone(30),\n underSurface: core.n1.tone(0),\n offState: core.n1.tone(20),\n accentSurface: core.a2.tone(95),\n textPrimaryOnAccent: core.n1.tone(10),\n textSecondaryOnAccent: core.n2.tone(30),\n volumeBackground: core.n1.tone(25),\n scrim: core.n1.tone(80),\n });\n }\n constructor(props) {\n this.props = props;\n }\n toJSON() {\n return { ...this.props };\n }\n}\n//# sourceMappingURL=scheme_android.js.map"],"ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../dynamiccolor/variant.js";
|
|
2
|
+
import "../dynamiccolor/dynamic_scheme.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_content.js
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2023 Google LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
//#endregion
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=scheme_content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme_content.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_content.js"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DynamicScheme } from '../dynamiccolor/dynamic_scheme';\nimport { Variant } from '../dynamiccolor/variant.js';\n/**\n * A scheme that places the source color in `Scheme.primaryContainer`.\n *\n * Primary Container is the source color, adjusted for color relativity.\n * It maintains constant appearance in light mode and dark mode.\n * This adds ~5 tone in light mode, and subtracts ~5 tone in dark mode.\n * Tertiary Container is the complement to the source color, using\n * `TemperatureCache`. It also maintains constant appearance.\n */\nexport class SchemeContent extends DynamicScheme {\n constructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n super({\n sourceColorHct,\n variant: Variant.CONTENT,\n contrastLevel,\n isDark,\n platform,\n specVersion,\n });\n }\n}\n//# sourceMappingURL=scheme_content.js.map"],"ignoreList":[0],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Variant } from "../dynamiccolor/variant.js";
|
|
2
|
+
import { DynamicScheme } from "../dynamiccolor/dynamic_scheme.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_expressive.js
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2022 Google LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A Dynamic Color theme that is intentionally detached from the source color.
|
|
22
|
+
*/
|
|
23
|
+
var SchemeExpressive = class extends DynamicScheme {
|
|
24
|
+
constructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {
|
|
25
|
+
super({
|
|
26
|
+
sourceColorHct,
|
|
27
|
+
variant: Variant.EXPRESSIVE,
|
|
28
|
+
contrastLevel,
|
|
29
|
+
isDark,
|
|
30
|
+
platform,
|
|
31
|
+
specVersion
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { SchemeExpressive };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=scheme_expressive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme_expressive.js","names":[],"sources":["../../../../../../node_modules/.pnpm/@material+material-color-utilities@0.4.0/node_modules/@material/material-color-utilities/scheme/scheme_expressive.js"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DynamicScheme } from '../dynamiccolor/dynamic_scheme';\nimport { Variant } from '../dynamiccolor/variant.js';\n/**\n * A Dynamic Color theme that is intentionally detached from the source color.\n */\nexport class SchemeExpressive extends DynamicScheme {\n constructor(sourceColorHct, isDark, contrastLevel, specVersion = DynamicScheme.DEFAULT_SPEC_VERSION, platform = DynamicScheme.DEFAULT_PLATFORM) {\n super({\n sourceColorHct,\n variant: Variant.EXPRESSIVE,\n contrastLevel,\n isDark,\n platform,\n specVersion,\n });\n }\n}\n//# sourceMappingURL=scheme_expressive.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,mBAAb,cAAsC,cAAc;CAChD,YAAY,gBAAgB,QAAQ,eAAe,cAAc,cAAc,sBAAsB,WAAW,cAAc,kBAAkB;EAC5I,MAAM;GACF;GACA,SAAS,QAAQ;GACjB;GACA;GACA;GACA;EACJ,CAAC;CACL;AACJ"}
|