@medway-ui/core 1.24.0 → 1.24.2
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/dist/assets/js/tokens.d.mts +695 -0
- package/dist/assets/js/tokens.d.mts.map +1 -0
- package/dist/assets/js/tokens.d.ts +695 -0
- package/dist/assets/js/tokens.d.ts.map +1 -0
- package/dist/assets/js/tokens.js +3 -0
- package/dist/assets/js/tokens.js.map +1 -0
- package/dist/assets/js/tokens.mjs +3 -0
- package/dist/assets/js/tokens.mjs.map +1 -0
- package/dist/assets/js/tokens.ts +1 -1
- package/dist/components/Alert.d.mts +28 -0
- package/dist/components/Alert.d.mts.map +1 -0
- package/dist/components/Alert.d.ts +28 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/Alert.js +4 -0
- package/dist/components/Alert.js.map +1 -0
- package/dist/components/Alert.mjs +4 -0
- package/dist/components/Alert.mjs.map +1 -0
- package/dist/components/AlertDialog.d.mts +38 -0
- package/dist/components/AlertDialog.d.mts.map +1 -0
- package/dist/components/AlertDialog.d.ts +38 -0
- package/dist/components/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog.js +4 -0
- package/dist/components/AlertDialog.js.map +1 -0
- package/dist/components/AlertDialog.mjs +4 -0
- package/dist/components/AlertDialog.mjs.map +1 -0
- package/dist/components/Autocomplete.d.mts +57 -0
- package/dist/components/Autocomplete.d.mts.map +1 -0
- package/dist/components/Autocomplete.d.ts +57 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete.js +4 -0
- package/dist/components/Autocomplete.js.map +1 -0
- package/dist/components/Autocomplete.mjs +4 -0
- package/dist/components/Autocomplete.mjs.map +1 -0
- package/dist/components/Avatar.d.mts +18 -0
- package/dist/components/Avatar.d.mts.map +1 -0
- package/dist/components/Avatar.d.ts +18 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +4 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Avatar.mjs +4 -0
- package/dist/components/Avatar.mjs.map +1 -0
- package/dist/components/Badge.d.mts +16 -0
- package/dist/components/Badge.d.mts.map +1 -0
- package/dist/components/Badge.d.ts +16 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Badge.js +4 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Badge.mjs +4 -0
- package/dist/components/Badge.mjs.map +1 -0
- package/dist/components/Breadcrumb.d.mts +17 -0
- package/dist/components/Breadcrumb.d.mts.map +1 -0
- package/dist/components/Breadcrumb.d.ts +17 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb.js +3 -0
- package/dist/components/Breadcrumb.js.map +1 -0
- package/dist/components/Breadcrumb.mjs +3 -0
- package/dist/components/Breadcrumb.mjs.map +1 -0
- package/dist/components/Button.d.mts +19 -0
- package/dist/components/Button.d.mts.map +1 -0
- package/dist/components/Button.d.ts +19 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +4 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Button.mjs +4 -0
- package/dist/components/Button.mjs.map +1 -0
- package/dist/components/CardContinue.d.mts +20 -0
- package/dist/components/CardContinue.d.mts.map +1 -0
- package/dist/components/CardContinue.d.ts +20 -0
- package/dist/components/CardContinue.d.ts.map +1 -0
- package/dist/components/CardContinue.js +4 -0
- package/dist/components/CardContinue.js.map +1 -0
- package/dist/components/CardContinue.mjs +4 -0
- package/dist/components/CardContinue.mjs.map +1 -0
- package/dist/components/CardLesson.d.mts +45 -0
- package/dist/components/CardLesson.d.mts.map +1 -0
- package/dist/components/CardLesson.d.ts +45 -0
- package/dist/components/CardLesson.d.ts.map +1 -0
- package/dist/components/CardLesson.js +4 -0
- package/dist/components/CardLesson.js.map +1 -0
- package/dist/components/CardLesson.mjs +4 -0
- package/dist/components/CardLesson.mjs.map +1 -0
- package/dist/components/CardModule.d.mts +33 -0
- package/dist/components/CardModule.d.mts.map +1 -0
- package/dist/components/CardModule.d.ts +33 -0
- package/dist/components/CardModule.d.ts.map +1 -0
- package/dist/components/CardModule.js +4 -0
- package/dist/components/CardModule.js.map +1 -0
- package/dist/components/CardModule.mjs +4 -0
- package/dist/components/CardModule.mjs.map +1 -0
- package/dist/components/CardNews.d.mts +42 -0
- package/dist/components/CardNews.d.mts.map +1 -0
- package/dist/components/CardNews.d.ts +42 -0
- package/dist/components/CardNews.d.ts.map +1 -0
- package/dist/components/CardNews.js +4 -0
- package/dist/components/CardNews.js.map +1 -0
- package/dist/components/CardNews.mjs +4 -0
- package/dist/components/CardNews.mjs.map +1 -0
- package/dist/components/CardTopic.d.mts +27 -0
- package/dist/components/CardTopic.d.mts.map +1 -0
- package/dist/components/CardTopic.d.ts +27 -0
- package/dist/components/CardTopic.d.ts.map +1 -0
- package/dist/components/CardTopic.js +4 -0
- package/dist/components/CardTopic.js.map +1 -0
- package/dist/components/CardTopic.mjs +4 -0
- package/dist/components/CardTopic.mjs.map +1 -0
- package/dist/components/CardWeek.d.mts +32 -0
- package/dist/components/CardWeek.d.mts.map +1 -0
- package/dist/components/CardWeek.d.ts +32 -0
- package/dist/components/CardWeek.d.ts.map +1 -0
- package/dist/components/CardWeek.js +4 -0
- package/dist/components/CardWeek.js.map +1 -0
- package/dist/components/CardWeek.mjs +4 -0
- package/dist/components/CardWeek.mjs.map +1 -0
- package/dist/components/Checkbox.d.mts +14 -0
- package/dist/components/Checkbox.d.mts.map +1 -0
- package/dist/components/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +4 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/Checkbox.mjs +4 -0
- package/dist/components/Checkbox.mjs.map +1 -0
- package/dist/components/Collapsible.d.mts +15 -0
- package/dist/components/Collapsible.d.mts.map +1 -0
- package/dist/components/Collapsible.d.ts +15 -0
- package/dist/components/Collapsible.d.ts.map +1 -0
- package/dist/components/Collapsible.js +4 -0
- package/dist/components/Collapsible.js.map +1 -0
- package/dist/components/Collapsible.mjs +4 -0
- package/dist/components/Collapsible.mjs.map +1 -0
- package/dist/components/Command.d.mts +17 -0
- package/dist/components/Command.d.mts.map +1 -0
- package/dist/components/Command.d.ts +17 -0
- package/dist/components/Command.d.ts.map +1 -0
- package/dist/components/Command.js +4 -0
- package/dist/components/Command.js.map +1 -0
- package/dist/components/Command.mjs +4 -0
- package/dist/components/Command.mjs.map +1 -0
- package/dist/components/DatePicker.d.mts +57 -0
- package/dist/components/DatePicker.d.mts.map +1 -0
- package/dist/components/DatePicker.d.ts +57 -0
- package/dist/components/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker.js +4 -0
- package/dist/components/DatePicker.js.map +1 -0
- package/dist/components/DatePicker.mjs +4 -0
- package/dist/components/DatePicker.mjs.map +1 -0
- package/dist/components/Dialog.d.mts +34 -0
- package/dist/components/Dialog.d.mts.map +1 -0
- package/dist/components/Dialog.d.ts +34 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog.js +4 -0
- package/dist/components/Dialog.js.map +1 -0
- package/dist/components/Dialog.mjs +4 -0
- package/dist/components/Dialog.mjs.map +1 -0
- package/dist/components/DropdownMenu.d.mts +28 -0
- package/dist/components/DropdownMenu.d.mts.map +1 -0
- package/dist/components/DropdownMenu.d.ts +28 -0
- package/dist/components/DropdownMenu.d.ts.map +1 -0
- package/dist/components/DropdownMenu.js +4 -0
- package/dist/components/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu.mjs +4 -0
- package/dist/components/DropdownMenu.mjs.map +1 -0
- package/dist/components/FallbackImage.d.mts +8 -0
- package/dist/components/FallbackImage.d.mts.map +1 -0
- package/dist/components/FallbackImage.d.ts +8 -0
- package/dist/components/FallbackImage.d.ts.map +1 -0
- package/dist/components/FallbackImage.js +4 -0
- package/dist/components/FallbackImage.js.map +1 -0
- package/dist/components/FallbackImage.mjs +4 -0
- package/dist/components/FallbackImage.mjs.map +1 -0
- package/dist/components/IndexLevel.d.mts +47 -0
- package/dist/components/IndexLevel.d.mts.map +1 -0
- package/dist/components/IndexLevel.d.ts +47 -0
- package/dist/components/IndexLevel.d.ts.map +1 -0
- package/dist/components/IndexLevel.js +4 -0
- package/dist/components/IndexLevel.js.map +1 -0
- package/dist/components/IndexLevel.mjs +4 -0
- package/dist/components/IndexLevel.mjs.map +1 -0
- package/dist/components/IndexLevelAnimated.d.mts +34 -0
- package/dist/components/IndexLevelAnimated.d.mts.map +1 -0
- package/dist/components/IndexLevelAnimated.d.ts +34 -0
- package/dist/components/IndexLevelAnimated.d.ts.map +1 -0
- package/dist/components/IndexLevelAnimated.js +4 -0
- package/dist/components/IndexLevelAnimated.js.map +1 -0
- package/dist/components/IndexLevelAnimated.mjs +4 -0
- package/dist/components/IndexLevelAnimated.mjs.map +1 -0
- package/dist/components/Input.d.mts +39 -0
- package/dist/components/Input.d.mts.map +1 -0
- package/dist/components/Input.d.ts +39 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +4 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Input.mjs +4 -0
- package/dist/components/Input.mjs.map +1 -0
- package/dist/components/Label.d.mts +14 -0
- package/dist/components/Label.d.mts.map +1 -0
- package/dist/components/Label.d.ts +14 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Label.js +4 -0
- package/dist/components/Label.js.map +1 -0
- package/dist/components/Label.mjs +4 -0
- package/dist/components/Label.mjs.map +1 -0
- package/dist/components/Loading.d.mts +8 -0
- package/dist/components/Loading.d.mts.map +1 -0
- package/dist/components/Loading.d.ts +8 -0
- package/dist/components/Loading.d.ts.map +1 -0
- package/dist/components/Loading.js +4 -0
- package/dist/components/Loading.js.map +1 -0
- package/dist/components/Loading.mjs +4 -0
- package/dist/components/Loading.mjs.map +1 -0
- package/dist/components/Logo.d.mts +11 -0
- package/dist/components/Logo.d.mts.map +1 -0
- package/dist/components/Logo.d.ts +11 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Logo.js +4 -0
- package/dist/components/Logo.js.map +1 -0
- package/dist/components/Logo.mjs +4 -0
- package/dist/components/Logo.mjs.map +1 -0
- package/dist/components/NoteEditor.d.mts +119 -0
- package/dist/components/NoteEditor.d.mts.map +1 -0
- package/dist/components/NoteEditor.d.ts +119 -0
- package/dist/components/NoteEditor.d.ts.map +1 -0
- package/dist/components/NoteEditor.js +4 -0
- package/dist/components/NoteEditor.js.map +1 -0
- package/dist/components/NoteEditor.mjs +4 -0
- package/dist/components/NoteEditor.mjs.map +1 -0
- package/dist/components/Pagination.d.mts +43 -0
- package/dist/components/Pagination.d.mts.map +1 -0
- package/dist/components/Pagination.d.ts +43 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +4 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Pagination.mjs +4 -0
- package/dist/components/Pagination.mjs.map +1 -0
- package/dist/components/Popover.d.mts +10 -0
- package/dist/components/Popover.d.mts.map +1 -0
- package/dist/components/Popover.d.ts +10 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/components/Popover.js +4 -0
- package/dist/components/Popover.js.map +1 -0
- package/dist/components/Popover.mjs +4 -0
- package/dist/components/Popover.mjs.map +1 -0
- package/dist/components/Progress.d.mts +9 -0
- package/dist/components/Progress.d.mts.map +1 -0
- package/dist/components/Progress.d.ts +9 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/Progress.js +4 -0
- package/dist/components/Progress.js.map +1 -0
- package/dist/components/Progress.mjs +4 -0
- package/dist/components/Progress.mjs.map +1 -0
- package/dist/components/ProgressCircle.d.mts +14 -0
- package/dist/components/ProgressCircle.d.mts.map +1 -0
- package/dist/components/ProgressCircle.d.ts +14 -0
- package/dist/components/ProgressCircle.d.ts.map +1 -0
- package/dist/components/ProgressCircle.js +4 -0
- package/dist/components/ProgressCircle.js.map +1 -0
- package/dist/components/ProgressCircle.mjs +4 -0
- package/dist/components/ProgressCircle.mjs.map +1 -0
- package/dist/components/RadioGroup.d.mts +14 -0
- package/dist/components/RadioGroup.d.mts.map +1 -0
- package/dist/components/RadioGroup.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +4 -0
- package/dist/components/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup.mjs +4 -0
- package/dist/components/RadioGroup.mjs.map +1 -0
- package/dist/components/Ranking.d.mts +95 -0
- package/dist/components/Ranking.d.mts.map +1 -0
- package/dist/components/Ranking.d.ts +95 -0
- package/dist/components/Ranking.d.ts.map +1 -0
- package/dist/components/Ranking.js +4 -0
- package/dist/components/Ranking.js.map +1 -0
- package/dist/components/Ranking.mjs +4 -0
- package/dist/components/Ranking.mjs.map +1 -0
- package/dist/components/Rating.d.mts +27 -0
- package/dist/components/Rating.d.mts.map +1 -0
- package/dist/components/Rating.d.ts +27 -0
- package/dist/components/Rating.d.ts.map +1 -0
- package/dist/components/Rating.js +4 -0
- package/dist/components/Rating.js.map +1 -0
- package/dist/components/Rating.mjs +4 -0
- package/dist/components/Rating.mjs.map +1 -0
- package/dist/components/ScrollArea.d.mts +6 -0
- package/dist/components/ScrollArea.d.mts.map +1 -0
- package/dist/components/ScrollArea.d.ts +6 -0
- package/dist/components/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea.js +4 -0
- package/dist/components/ScrollArea.js.map +1 -0
- package/dist/components/ScrollArea.mjs +4 -0
- package/dist/components/ScrollArea.mjs.map +1 -0
- package/dist/components/SegmentControl.d.mts +27 -0
- package/dist/components/SegmentControl.d.mts.map +1 -0
- package/dist/components/SegmentControl.d.ts +27 -0
- package/dist/components/SegmentControl.d.ts.map +1 -0
- package/dist/components/SegmentControl.js +4 -0
- package/dist/components/SegmentControl.js.map +1 -0
- package/dist/components/SegmentControl.mjs +4 -0
- package/dist/components/SegmentControl.mjs.map +1 -0
- package/dist/components/Select.d.mts +32 -0
- package/dist/components/Select.d.mts.map +1 -0
- package/dist/components/Select.d.ts +32 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Select.js +4 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/Select.mjs +4 -0
- package/dist/components/Select.mjs.map +1 -0
- package/dist/components/Separator.d.mts +5 -0
- package/dist/components/Separator.d.mts.map +1 -0
- package/dist/components/Separator.d.ts +5 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Separator.js +4 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Separator.mjs +4 -0
- package/dist/components/Separator.mjs.map +1 -0
- package/dist/components/Sheet.d.mts +16 -0
- package/dist/components/Sheet.d.mts.map +1 -0
- package/dist/components/Sheet.d.ts +16 -0
- package/dist/components/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet.js +4 -0
- package/dist/components/Sheet.js.map +1 -0
- package/dist/components/Sheet.mjs +4 -0
- package/dist/components/Sheet.mjs.map +1 -0
- package/dist/components/Sidebar.d.mts +87 -0
- package/dist/components/Sidebar.d.mts.map +1 -0
- package/dist/components/Sidebar.d.ts +87 -0
- package/dist/components/Sidebar.d.ts.map +1 -0
- package/dist/components/Sidebar.js +4 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/Sidebar.mjs +4 -0
- package/dist/components/Sidebar.mjs.map +1 -0
- package/dist/components/Skeleton.d.mts +4 -0
- package/dist/components/Skeleton.d.mts.map +1 -0
- package/dist/components/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +4 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/Skeleton.mjs +4 -0
- package/dist/components/Skeleton.mjs.map +1 -0
- package/dist/components/Switch.d.mts +15 -0
- package/dist/components/Switch.d.mts.map +1 -0
- package/dist/components/Switch.d.ts +15 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Switch.js +4 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Switch.mjs +4 -0
- package/dist/components/Switch.mjs.map +1 -0
- package/dist/components/Switcher.d.mts +55 -0
- package/dist/components/Switcher.d.mts.map +1 -0
- package/dist/components/Switcher.d.ts +55 -0
- package/dist/components/Switcher.d.ts.map +1 -0
- package/dist/components/Switcher.js +4 -0
- package/dist/components/Switcher.js.map +1 -0
- package/dist/components/Switcher.mjs +4 -0
- package/dist/components/Switcher.mjs.map +1 -0
- package/dist/components/Tabs.d.mts +39 -0
- package/dist/components/Tabs.d.mts.map +1 -0
- package/dist/components/Tabs.d.ts +39 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs.js +4 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/Tabs.mjs +4 -0
- package/dist/components/Tabs.mjs.map +1 -0
- package/dist/components/Tag.d.mts +13 -0
- package/dist/components/Tag.d.mts.map +1 -0
- package/dist/components/Tag.d.ts +13 -0
- package/dist/components/Tag.d.ts.map +1 -0
- package/dist/components/Tag.js +4 -0
- package/dist/components/Tag.js.map +1 -0
- package/dist/components/Tag.mjs +4 -0
- package/dist/components/Tag.mjs.map +1 -0
- package/dist/components/Tile.d.mts +19 -0
- package/dist/components/Tile.d.mts.map +1 -0
- package/dist/components/Tile.d.ts +19 -0
- package/dist/components/Tile.d.ts.map +1 -0
- package/dist/components/Tile.js +4 -0
- package/dist/components/Tile.js.map +1 -0
- package/dist/components/Tile.mjs +4 -0
- package/dist/components/Tile.mjs.map +1 -0
- package/dist/components/Toast.d.mts +29 -0
- package/dist/components/Toast.d.mts.map +1 -0
- package/dist/components/Toast.d.ts +29 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +4 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/Toast.mjs +4 -0
- package/dist/components/Toast.mjs.map +1 -0
- package/dist/components/Tooltip.d.mts +8 -0
- package/dist/components/Tooltip.d.mts.map +1 -0
- package/dist/components/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip.js +4 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/Tooltip.mjs +4 -0
- package/dist/components/Tooltip.mjs.map +1 -0
- package/dist/hooks/use-id.d.mts +2 -0
- package/dist/hooks/use-id.d.mts.map +1 -0
- package/dist/hooks/use-id.d.ts +2 -0
- package/dist/hooks/use-id.d.ts.map +1 -0
- package/dist/hooks/use-id.js +3 -0
- package/dist/hooks/use-id.js.map +1 -0
- package/dist/hooks/use-id.mjs +3 -0
- package/dist/hooks/use-id.mjs.map +1 -0
- package/dist/hooks/use-mobile.d.mts +2 -0
- package/dist/hooks/use-mobile.d.mts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +3 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mobile.mjs +3 -0
- package/dist/hooks/use-mobile.mjs.map +1 -0
- package/dist/hooks/use-toast.d.mts +45 -0
- package/dist/hooks/use-toast.d.mts.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +4 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/hooks/use-toast.mjs +4 -0
- package/dist/hooks/use-toast.mjs.map +1 -0
- package/dist/index.d.mts +88 -1153
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +88 -1153
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -16
- package/dist/index.mjs.map +1 -1
- package/dist/lib/cmdk.d.mts +124 -0
- package/dist/lib/cmdk.d.mts.map +1 -0
- package/dist/lib/cmdk.d.ts +124 -0
- package/dist/lib/cmdk.d.ts.map +1 -0
- package/dist/lib/cmdk.js +4 -0
- package/dist/lib/cmdk.js.map +1 -0
- package/dist/lib/cmdk.mjs +4 -0
- package/dist/lib/cmdk.mjs.map +1 -0
- package/dist/lib/command-score.d.mts +2 -0
- package/dist/lib/command-score.d.mts.map +1 -0
- package/dist/lib/command-score.d.ts +2 -0
- package/dist/lib/command-score.d.ts.map +1 -0
- package/dist/lib/command-score.js +3 -0
- package/dist/lib/command-score.js.map +1 -0
- package/dist/lib/command-score.mjs +3 -0
- package/dist/lib/command-score.mjs.map +1 -0
- package/dist/lib/utils.d.mts +3 -0
- package/dist/lib/utils.d.mts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +3 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.mjs.map +1 -0
- package/dist/note-editor.d.mts +10 -118
- package/dist/note-editor.d.mts.map +1 -0
- package/dist/note-editor.d.ts +10 -118
- package/dist/note-editor.d.ts.map +1 -0
- package/dist/note-editor.js +3 -3
- package/dist/note-editor.js.map +1 -1
- package/dist/note-editor.mjs +3 -3
- package/dist/note-editor.mjs.map +1 -1
- package/package.json +10 -5
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command component - Forked from cmdk (https://github.com/pacocoursey/cmdk)
|
|
3
|
+
* MIT License - Copyright (c) 2024 Paco Coursey
|
|
4
|
+
*
|
|
5
|
+
* Modified to remove React 18 dependency (useSyncExternalStore)
|
|
6
|
+
* and external @radix-ui/* dependencies, making it compatible with React 17+.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
type Children = {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
14
|
+
type State = {
|
|
15
|
+
search: string;
|
|
16
|
+
value: string;
|
|
17
|
+
selectedItemId?: string;
|
|
18
|
+
filtered: {
|
|
19
|
+
count: number;
|
|
20
|
+
items: Map<string, number>;
|
|
21
|
+
groups: Set<string>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type Group = {
|
|
25
|
+
id: string;
|
|
26
|
+
forceMount?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const defaultFilter: CommandFilter;
|
|
29
|
+
declare const Command: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
30
|
+
label?: string;
|
|
31
|
+
shouldFilter?: boolean;
|
|
32
|
+
filter?: CommandFilter;
|
|
33
|
+
defaultValue?: string;
|
|
34
|
+
value?: string;
|
|
35
|
+
onValueChange?: (value: string) => void;
|
|
36
|
+
loop?: boolean;
|
|
37
|
+
disablePointerSelection?: boolean;
|
|
38
|
+
vimBindings?: boolean;
|
|
39
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
onSelect?: (value: string) => void;
|
|
43
|
+
value?: string;
|
|
44
|
+
keywords?: string[];
|
|
45
|
+
forceMount?: boolean;
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
48
|
+
heading?: React.ReactNode;
|
|
49
|
+
value?: string;
|
|
50
|
+
forceMount?: boolean;
|
|
51
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const Separator: React.ForwardRefExoticComponent<DivProps & {
|
|
53
|
+
alwaysRender?: boolean;
|
|
54
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
|
|
56
|
+
value?: string;
|
|
57
|
+
onValueChange?: (search: string) => void;
|
|
58
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
59
|
+
declare const List: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
60
|
+
label?: string;
|
|
61
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
declare const Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const Loading: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
64
|
+
progress?: number;
|
|
65
|
+
label?: string;
|
|
66
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
declare const pkg: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
68
|
+
label?: string;
|
|
69
|
+
shouldFilter?: boolean;
|
|
70
|
+
filter?: CommandFilter;
|
|
71
|
+
defaultValue?: string;
|
|
72
|
+
value?: string;
|
|
73
|
+
onValueChange?: (value: string) => void;
|
|
74
|
+
loop?: boolean;
|
|
75
|
+
disablePointerSelection?: boolean;
|
|
76
|
+
vimBindings?: boolean;
|
|
77
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
78
|
+
List: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
79
|
+
label?: string;
|
|
80
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
onSelect?: (value: string) => void;
|
|
84
|
+
value?: string;
|
|
85
|
+
keywords?: string[];
|
|
86
|
+
forceMount?: boolean;
|
|
87
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
|
|
89
|
+
value?: string;
|
|
90
|
+
onValueChange?: (search: string) => void;
|
|
91
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
92
|
+
Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
93
|
+
heading?: React.ReactNode;
|
|
94
|
+
value?: string;
|
|
95
|
+
forceMount?: boolean;
|
|
96
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
Separator: React.ForwardRefExoticComponent<DivProps & {
|
|
98
|
+
alwaysRender?: boolean;
|
|
99
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
101
|
+
Loading: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
102
|
+
progress?: number;
|
|
103
|
+
label?: string;
|
|
104
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
};
|
|
106
|
+
export { useCmdk as useCommandState };
|
|
107
|
+
export { pkg as Command };
|
|
108
|
+
export { defaultFilter };
|
|
109
|
+
export { Command as CommandRoot };
|
|
110
|
+
export { List as CommandList };
|
|
111
|
+
export { Item as CommandItem };
|
|
112
|
+
export { Input as CommandInput };
|
|
113
|
+
export { Group as CommandGroup };
|
|
114
|
+
export { Separator as CommandSeparator };
|
|
115
|
+
export { Empty as CommandEmpty };
|
|
116
|
+
export { Loading as CommandLoading };
|
|
117
|
+
/**
|
|
118
|
+
* Drop-in replacement for useSyncExternalStore that works with React 17+.
|
|
119
|
+
* Uses useState + useLayoutEffect to subscribe to the store and re-render on changes.
|
|
120
|
+
* useLayoutEffect is critical here (not useEffect) to ensure the subscription
|
|
121
|
+
* is registered before other layout effects emit store updates (e.g., item registration).
|
|
122
|
+
*/
|
|
123
|
+
declare function useCmdk<T = any>(selector: (state: State) => T): T;
|
|
124
|
+
//# sourceMappingURL=cmdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmdk.d.ts","sourceRoot":"","sources":["../../src/lib/cmdk.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command component - Forked from cmdk (https://github.com/pacocoursey/cmdk)
|
|
3
|
+
* MIT License - Copyright (c) 2024 Paco Coursey
|
|
4
|
+
*
|
|
5
|
+
* Modified to remove React 18 dependency (useSyncExternalStore)
|
|
6
|
+
* and external @radix-ui/* dependencies, making it compatible with React 17+.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
type Children = {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
type CommandFilter = (value: string, search: string, keywords?: string[]) => number;
|
|
14
|
+
type State = {
|
|
15
|
+
search: string;
|
|
16
|
+
value: string;
|
|
17
|
+
selectedItemId?: string;
|
|
18
|
+
filtered: {
|
|
19
|
+
count: number;
|
|
20
|
+
items: Map<string, number>;
|
|
21
|
+
groups: Set<string>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type Group = {
|
|
25
|
+
id: string;
|
|
26
|
+
forceMount?: boolean;
|
|
27
|
+
};
|
|
28
|
+
declare const defaultFilter: CommandFilter;
|
|
29
|
+
declare const Command: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
30
|
+
label?: string;
|
|
31
|
+
shouldFilter?: boolean;
|
|
32
|
+
filter?: CommandFilter;
|
|
33
|
+
defaultValue?: string;
|
|
34
|
+
value?: string;
|
|
35
|
+
onValueChange?: (value: string) => void;
|
|
36
|
+
loop?: boolean;
|
|
37
|
+
disablePointerSelection?: boolean;
|
|
38
|
+
vimBindings?: boolean;
|
|
39
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
onSelect?: (value: string) => void;
|
|
43
|
+
value?: string;
|
|
44
|
+
keywords?: string[];
|
|
45
|
+
forceMount?: boolean;
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
declare const Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
48
|
+
heading?: React.ReactNode;
|
|
49
|
+
value?: string;
|
|
50
|
+
forceMount?: boolean;
|
|
51
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const Separator: React.ForwardRefExoticComponent<DivProps & {
|
|
53
|
+
alwaysRender?: boolean;
|
|
54
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
|
|
56
|
+
value?: string;
|
|
57
|
+
onValueChange?: (search: string) => void;
|
|
58
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
59
|
+
declare const List: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
60
|
+
label?: string;
|
|
61
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
declare const Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const Loading: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
64
|
+
progress?: number;
|
|
65
|
+
label?: string;
|
|
66
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
declare const pkg: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
68
|
+
label?: string;
|
|
69
|
+
shouldFilter?: boolean;
|
|
70
|
+
filter?: CommandFilter;
|
|
71
|
+
defaultValue?: string;
|
|
72
|
+
value?: string;
|
|
73
|
+
onValueChange?: (value: string) => void;
|
|
74
|
+
loop?: boolean;
|
|
75
|
+
disablePointerSelection?: boolean;
|
|
76
|
+
vimBindings?: boolean;
|
|
77
|
+
} & React.RefAttributes<HTMLDivElement>> & {
|
|
78
|
+
List: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
79
|
+
label?: string;
|
|
80
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
Item: React.ForwardRefExoticComponent<Children & Omit<DivProps, "onSelect" | "disabled" | "value"> & {
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
onSelect?: (value: string) => void;
|
|
84
|
+
value?: string;
|
|
85
|
+
keywords?: string[];
|
|
86
|
+
forceMount?: boolean;
|
|
87
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "value"> & {
|
|
89
|
+
value?: string;
|
|
90
|
+
onValueChange?: (search: string) => void;
|
|
91
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
92
|
+
Group: React.ForwardRefExoticComponent<Children & Omit<DivProps, "value" | "heading"> & {
|
|
93
|
+
heading?: React.ReactNode;
|
|
94
|
+
value?: string;
|
|
95
|
+
forceMount?: boolean;
|
|
96
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
Separator: React.ForwardRefExoticComponent<DivProps & {
|
|
98
|
+
alwaysRender?: boolean;
|
|
99
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
+
Empty: React.ForwardRefExoticComponent<Children & DivProps & React.RefAttributes<HTMLDivElement>>;
|
|
101
|
+
Loading: React.ForwardRefExoticComponent<Children & DivProps & {
|
|
102
|
+
progress?: number;
|
|
103
|
+
label?: string;
|
|
104
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
};
|
|
106
|
+
export { useCmdk as useCommandState };
|
|
107
|
+
export { pkg as Command };
|
|
108
|
+
export { defaultFilter };
|
|
109
|
+
export { Command as CommandRoot };
|
|
110
|
+
export { List as CommandList };
|
|
111
|
+
export { Item as CommandItem };
|
|
112
|
+
export { Input as CommandInput };
|
|
113
|
+
export { Group as CommandGroup };
|
|
114
|
+
export { Separator as CommandSeparator };
|
|
115
|
+
export { Empty as CommandEmpty };
|
|
116
|
+
export { Loading as CommandLoading };
|
|
117
|
+
/**
|
|
118
|
+
* Drop-in replacement for useSyncExternalStore that works with React 17+.
|
|
119
|
+
* Uses useState + useLayoutEffect to subscribe to the store and re-render on changes.
|
|
120
|
+
* useLayoutEffect is critical here (not useEffect) to ensure the subscription
|
|
121
|
+
* is registered before other layout effects emit store updates (e.g., item registration).
|
|
122
|
+
*/
|
|
123
|
+
declare function useCmdk<T = any>(selector: (state: State) => T): T;
|
|
124
|
+
//# sourceMappingURL=cmdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmdk.d.ts","sourceRoot":"","sources":["../../src/lib/cmdk.tsx"],"names":[],"mappings":"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"}
|
package/dist/lib/cmdk.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
"use strict";var w=require("react/jsx-runtime"),Ae=require("react"),De=require("./command-score.js"),N=require("../hooks/use-id.js");function Le(e){var n=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}}),n.default=e,Object.freeze(n)}var a=Le(Ae),Fe=Object.defineProperty,qe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,xe=(e,n,t)=>n in e?Fe(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,M=(e,n)=>{for(var t in n||(n={}))Se.call(n,t)&&xe(e,t,n[t]);if(_)for(var t of _(n))Ee.call(n,t)&&xe(e,t,n[t]);return e},P=(e,n)=>qe(e,Ke(n)),F=(e,n)=>{var t={};for(var u in e)Se.call(e,u)&&n.indexOf(u)<0&&(t[u]=e[u]);if(e!=null&&_)for(var u of _(e))n.indexOf(u)<0&&Ee.call(e,u)&&(t[u]=e[u]);return t};const G='[cmdk-group=""]',ne='[cmdk-group-items=""]',Ne='[cmdk-group-heading=""]',Ie='[cmdk-item=""]',ke=`${Ie}:not([aria-disabled="true"])`,le="cmdk-item-select",V="data-value",Ce=(e,n,t)=>De.commandScore(e,n,t),je=a.createContext(void 0),z=()=>a.useContext(je),Re=a.createContext(void 0),ue=()=>a.useContext(Re),Oe=a.createContext(void 0),oe=a.forwardRef((e,n)=>{const t=$(()=>{var r,o;return{search:"",value:(o=(r=e.value)!=null?r:e.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=$(()=>new Set),d=$(()=>new Map),v=$(()=>new Map),m=$(()=>new Set),i=Me(e),S=e,{label:h,children:c,value:E,onValueChange:x,filter:R,shouldFilter:I,loop:J,disablePointerSelection:Q=!1,vimBindings:D=!0}=S,T=F(S,["label","children","value","onValueChange","filter","shouldFilter","loop","disablePointerSelection","vimBindings"]),W=N.useId(),me=N.useId(),X=N.useId(),L=a.useRef(null),p=Ge();A(()=>{if(E!==void 0){const r=E.trim();t.current.value=r,y.emit()}},[E]),A(()=>{p(6,he)},[]);const y=a.useMemo(()=>({subscribe:r=>(m.current.add(r),()=>m.current.delete(r)),snapshot:()=>t.current,setState:(r,o,s)=>{var l,f,b,g,k,O;if(!Object.is(t.current[r],o)){if(t.current[r]=o,r==="search")ee(),Y(),p(1,Z);else if(r==="value"){if((l=document.activeElement)!=null&&l.hasAttribute("cmdk-input")||(f=document.activeElement)!=null&&f.hasAttribute("cmdk-root")){const C=document.getElementById(X);C?C.focus():(b=document.getElementById(W))==null||b.focus()}if(p(7,()=>{var C;t.current.selectedItemId=(C=K())==null?void 0:C.id,y.emit()}),s||p(5,he),((g=i.current)==null?void 0:g.value)!==void 0){const C=o!=null?o:"";(O=(k=i.current).onValueChange)==null||O.call(k,C);return}}y.emit()}},emit:()=>{m.current.forEach(r=>r())}}),[]),q=a.useMemo(()=>({value:(r,o,s)=>{var l;o!==((l=v.current.get(r))==null?void 0:l.value)&&(v.current.set(r,{value:o,keywords:s}),t.current.filtered.items.set(r,pe(o,s)),p(2,()=>{Y(),y.emit()}))},item:(r,o)=>(u.current.add(r),o&&(d.current.has(o)?d.current.get(o).add(r):d.current.set(o,new Set([r]))),p(3,()=>{ee(),Y(),t.current.value||Z(),y.emit()}),()=>{v.current.delete(r),u.current.delete(r),t.current.filtered.items.delete(r);const s=K();p(4,()=>{ee(),(s==null?void 0:s.getAttribute("id"))===r&&Z(),y.emit()})}),group:r=>(d.current.has(r)||d.current.set(r,new Set),()=>{v.current.delete(r),d.current.delete(r)}),filter:()=>i.current.shouldFilter!==!1,label:h||e["aria-label"]||"",getDisablePointerSelection:()=>!!i.current.disablePointerSelection,listId:W,inputId:X,labelId:me,listInnerRef:L}),[]);function pe(r,o){var s,l;const f=(l=(s=i.current)==null?void 0:s.filter)!=null?l:Ce;return r?f(r,t.current.search,o):0}function Y(){if(!t.current.search||i.current.shouldFilter===!1)return;const r=t.current.filtered.items,o=[];t.current.filtered.groups.forEach(l=>{const f=d.current.get(l);let b=0;f==null||f.forEach(g=>{const k=r.get(g);b=Math.max(k!=null?k:0,b)}),o.push([l,b])});const s=L.current;B().sort((l,f)=>{var b,g;const k=l.getAttribute("id"),O=f.getAttribute("id");return((b=r.get(O))!=null?b:0)-((g=r.get(k))!=null?g:0)}).forEach(l=>{const f=l.closest(ne);f?f.appendChild(l.parentElement===f?l:l.closest(`${ne} > *`)):s==null||s.appendChild(l.parentElement===s?l:l.closest(`${ne} > *`))}),o.sort((l,f)=>f[1]-l[1]).forEach(l=>{var f,b;const g=(f=L.current)==null?void 0:f.querySelector(`${G}[${V}="${encodeURIComponent(l[0])}"]`);(b=g==null?void 0:g.parentElement)==null||b.appendChild(g)})}function Z(){const r=B().find(s=>s.getAttribute("aria-disabled")!=="true"),o=r==null?void 0:r.getAttribute(V);y.setState("value",o||void 0)}function ee(){var r,o,s,l,f;if(!t.current.search||i.current.shouldFilter===!1){t.current.filtered.count=u.current.size;return}t.current.filtered.groups=new Set;let b=0;for(const g of u.current){const k=(o=(r=v.current.get(g))==null?void 0:r.value)!=null?o:"",O=(l=(s=v.current.get(g))==null?void 0:s.keywords)!=null?l:[],C=pe(k,O);t.current.filtered.items.set(g,C),C>0&&b++}for(const[g,k]of d.current)for(const O of k)if(((f=t.current.filtered.items.get(O))!=null?f:0)>0){t.current.filtered.groups.add(g);break}t.current.filtered.count=b}function he(){var r,o,s;const l=K();l&&(((r=l.parentElement)==null?void 0:r.firstChild)===l&&((s=(o=l.closest(G))==null?void 0:o.querySelector(Ne))==null||s.scrollIntoView({block:"nearest"})),l.scrollIntoView({block:"nearest"}))}function K(){var r;return(r=L.current)==null?void 0:r.querySelector(`${Ie}[aria-selected="true"]`)}function B(){var r;return Array.from(((r=L.current)==null?void 0:r.querySelectorAll(ke))||[])}function te(r){const o=B()[r];o&&y.setState("value",o.getAttribute(V))}function re(r){var o;const s=K(),l=B(),f=l.findIndex(g=>g===s);let b=l[f+r];(o=i.current)!=null&&o.loop&&(b=f+r<0?l[l.length-1]:f+r===l.length?l[0]:l[f+r]),b&&y.setState("value",b.getAttribute(V))}function be(r){const o=K();let s=o==null?void 0:o.closest(G),l;for(;s&&!l;)s=r>0?$e(s,G):Be(s,G),l=s==null?void 0:s.querySelector(ke);l?y.setState("value",l.getAttribute(V)):re(r)}const ge=()=>te(B().length-1),ye=r=>{r.preventDefault(),r.metaKey?ge():r.altKey?be(1):re(1)},we=r=>{r.preventDefault(),r.metaKey?te(0):r.altKey?be(-1):re(-1)};return w.jsxs("div",P(M({ref:n,tabIndex:-1},T),{"cmdk-root":"",onKeyDown:r=>{var o;(o=T.onKeyDown)==null||o.call(T,r);const s=r.nativeEvent.isComposing||r.keyCode===229;if(!(r.defaultPrevented||s))switch(r.key){case"n":case"j":{D&&r.ctrlKey&&ye(r);break}case"ArrowDown":{ye(r);break}case"p":case"k":{D&&r.ctrlKey&&we(r);break}case"ArrowUp":{we(r);break}case"Home":{r.preventDefault(),te(0);break}case"End":{r.preventDefault(),ge();break}case"Enter":{r.preventDefault();const l=K();if(l){const f=new Event(le);l.dispatchEvent(f)}}}},children:[w.jsx("label",{"cmdk-label":"",htmlFor:q.inputId,id:q.labelId,style:He,children:h}),U(e,r=>w.jsx(Re.Provider,{value:y,children:w.jsx(je.Provider,{value:q,children:r})}))]}))});oe.displayName="Command";const ae=a.forwardRef((e,n)=>{var t,u;const d=N.useId(),v=a.useRef(null),m=a.useContext(Oe),i=z(),S=Me(e),h=(u=(t=S.current)==null?void 0:t.forceMount)!=null?u:m==null?void 0:m.forceMount;A(()=>{if(!h)return i.item(d,m==null?void 0:m.id)},[h]);const c=Pe(d,v,[e.value,e.children,v],e.keywords),E=ue(),x=j(p=>p.value&&p.value===c.current),R=j(p=>{var y;return h||i.filter()===!1?!0:p.search?((y=p.filtered.items.get(d))!=null?y:0)>0:!0});a.useEffect(()=>{const p=v.current;if(!(!p||e.disabled))return p.addEventListener(le,I),()=>p.removeEventListener(le,I)},[R,e.onSelect,e.disabled]);function I(){var p,y,q;J(),(q=(y=S.current).onSelect)==null||q.call(y,(p=c.current)!=null?p:"")}function J(){var p;E.setState("value",(p=c.current)!=null?p:"",!0)}if(!R)return null;const Q=e,{disabled:D,value:T,onSelect:W,forceMount:me,keywords:X}=Q,L=F(Q,["disabled","value","onSelect","forceMount","keywords"]);return w.jsx("div",P(M({ref:H(v,n)},L),{id:d,"cmdk-item":"",role:"option","aria-disabled":!!D,"aria-selected":!!x,"data-disabled":!!D,"data-selected":!!x,onPointerMove:D||i.getDisablePointerSelection()?void 0:J,onClick:D?void 0:I,children:e.children}))});ae.displayName="Item";const ie=a.forwardRef((e,n)=>{const t=e,{heading:u,children:d,forceMount:v}=t,m=F(t,["heading","children","forceMount"]),i=N.useId(),S=a.useRef(null),h=a.useRef(null),c=N.useId(),E=z(),x=j(I=>v||E.filter()===!1?!0:I.search?I.filtered.groups.has(i):!0);A(()=>E.group(i),[]),Pe(i,S,[e.value,e.heading,h]);const R=a.useMemo(()=>({id:i,forceMount:v}),[v]);return w.jsxs("div",P(M({ref:H(S,n)},m),{"cmdk-group":"",role:"presentation",hidden:x?void 0:!0,children:[u&&w.jsx("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:c,children:u}),U(e,I=>w.jsx("div",{"cmdk-group-items":"",role:"group","aria-labelledby":u?c:void 0,children:w.jsx(Oe.Provider,{value:R,children:I})}))]}))});ie.displayName="Group";const ce=a.forwardRef((e,n)=>{const t=e,{alwaysRender:u}=t,d=F(t,["alwaysRender"]),v=a.useRef(null),m=j(i=>!i.search);return!u&&!m?null:w.jsx("div",P(M({ref:H(v,n)},d),{"cmdk-separator":"",role:"separator"}))});ce.displayName="Separator";const se=a.forwardRef((e,n)=>{const t=e,{onValueChange:u}=t,d=F(t,["onValueChange"]),v=e.value!=null,m=ue(),i=j(c=>c.search),S=j(c=>c.selectedItemId),h=z();return a.useEffect(()=>{e.value!=null&&m.setState("search",e.value)},[e.value]),w.jsx("input",P(M({ref:n},d),{"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":S,id:h.inputId,type:"text",value:v?e.value:i,onChange:c=>{v||m.setState("search",c.target.value),u==null||u(c.target.value)}}))});se.displayName="Input";const de=a.forwardRef((e,n)=>{const t=e,{children:u,label:d="Suggestions"}=t,v=F(t,["children","label"]),m=a.useRef(null),i=a.useRef(null),S=j(c=>c.selectedItemId),h=z();return a.useEffect(()=>{if(i.current&&m.current){const c=i.current,E=m.current;let x;const R=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{const I=c.offsetHeight;E.style.setProperty("--cmdk-list-height",I.toFixed(1)+"px")})});return R.observe(c),()=>{cancelAnimationFrame(x),R.unobserve(c)}}},[]),a.useEffect(()=>{const c=m.current;if(!c)return;const E=x=>{c.contains(x.target)&&x.stopPropagation()};return document.addEventListener("wheel",E,{capture:!0}),()=>{document.removeEventListener("wheel",E,{capture:!0})}},[]),w.jsx("div",P(M({ref:H(m,n)},v),{"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":S,"aria-label":d,id:h.listId,children:U(e,c=>w.jsx("div",{ref:H(i,h.listInnerRef),"cmdk-list-sizer":"",children:c}))}))});de.displayName="List";const fe=a.forwardRef((e,n)=>j(t=>t.filtered.count===0)?w.jsx("div",P(M({ref:n},e),{"cmdk-empty":"",role:"presentation"})):null);fe.displayName="Empty";const ve=a.forwardRef((e,n)=>{const t=e,{progress:u,children:d,label:v="Loading..."}=t,m=F(t,["progress","children","label"]);return w.jsx("div",P(M({ref:n},m),{"cmdk-loading":"",role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-label":v,children:U(e,i=>w.jsx("div",{"aria-hidden":!0,children:i}))}))});ve.displayName="Loading";const Ve=Object.assign(oe,{List:de,Item:ae,Input:se,Group:ie,Separator:ce,Empty:fe,Loading:ve});function $e(e,n){let t=e.nextElementSibling;for(;t;){if(t.matches(n))return t;t=t.nextElementSibling}}function Be(e,n){let t=e.previousElementSibling;for(;t;){if(t.matches(n))return t;t=t.previousElementSibling}}function Me(e){const n=a.useRef(e);return A(()=>{n.current=e}),n}const A=typeof window=="undefined"?a.useEffect:a.useLayoutEffect;function $(e){const n=a.useRef(void 0);return n.current===void 0&&(n.current=e()),n}function j(e){const n=ue(),[,t]=a.useState({}),u=a.useRef(e(n.snapshot()));return u.current=e(n.snapshot()),A(()=>n.subscribe(()=>{const d=e(n.snapshot());Object.is(d,u.current)||(u.current=d,t({}))}),[n,e]),u.current}function Pe(e,n,t,u=[]){const d=a.useRef(void 0),v=z();return A(()=>{var m;const i=(()=>{var h;for(const c of t){if(typeof c=="string")return c.trim();if(typeof c=="object"&&c!==null&&"current"in c)return c.current?(h=c.current.textContent)==null?void 0:h.trim():d.current}})(),S=u.map(h=>h.trim());v.value(e,i!=null?i:"",S),(m=n.current)==null||m.setAttribute(V,i!=null?i:""),d.current=i}),d}const Ge=()=>{const[e,n]=a.useState(),t=$(()=>new Map);return A(()=>{t.current.forEach(u=>u()),t.current=new Map},[e]),(u,d)=>{t.current.set(u,d),n({})}};function ze(e){const n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function U({asChild:e,children:n},t){return e&&a.isValidElement(n)?a.cloneElement(ze(n),{ref:n.ref},t(n.props.children)):t(n)}function H(...e){return n=>{e.forEach(t=>{typeof t=="function"?t(n):t!=null&&typeof t=="object"&&(t.current=n)})}}const He={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};exports.Command=Ve,exports.CommandEmpty=fe,exports.CommandGroup=ie,exports.CommandInput=se,exports.CommandItem=ae,exports.CommandList=de,exports.CommandLoading=ve,exports.CommandRoot=oe,exports.CommandSeparator=ce,exports.defaultFilter=Ce,exports.useCommandState=j;
|
|
4
|
+
//# sourceMappingURL=cmdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmdk.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import{jsxs as Se,jsx as S}from"react/jsx-runtime";import*as a from"react";import{commandScore as Le}from"./command-score.mjs";import{useId as N}from"../hooks/use-id.mjs";var De=Object.defineProperty,Fe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Ie=(t,n,r)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,P=(t,n)=>{for(var r in n||(n={}))Ee.call(n,r)&&Ie(t,r,n[r]);if(U)for(var r of U(n))ke.call(n,r)&&Ie(t,r,n[r]);return t},j=(t,n)=>Fe(t,Ke(n)),F=(t,n)=>{var r={};for(var u in t)Ee.call(t,u)&&n.indexOf(u)<0&&(r[u]=t[u]);if(t!=null&&U)for(var u of U(t))n.indexOf(u)<0&&ke.call(t,u)&&(r[u]=t[u]);return r};const G='[cmdk-group=""]',ne='[cmdk-group-items=""]',Ve='[cmdk-group-heading=""]',Ce='[cmdk-item=""]',xe=`${Ce}:not([aria-disabled="true"])`,le="cmdk-item-select",$="data-value",Re=(t,n,r)=>Le(t,n,r),Me=a.createContext(void 0),H=()=>a.useContext(Me),Ae=a.createContext(void 0),oe=()=>a.useContext(Ae),Pe=a.createContext(void 0),ue=a.forwardRef((t,n)=>{const r=q(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=q(()=>new Set),d=q(()=>new Map),v=q(()=>new Map),m=q(()=>new Set),i=je(t),w=t,{label:h,children:c,value:E,onValueChange:k,filter:M,shouldFilter:I,loop:Q,disablePointerSelection:W=!1,vimBindings:L=!0}=w,z=F(w,["label","children","value","onValueChange","filter","shouldFilter","loop","disablePointerSelection","vimBindings"]),X=N(),me=N(),_=N(),D=a.useRef(null),p=Be();O(()=>{if(E!==void 0){const e=E.trim();r.current.value=e,y.emit()}},[E]),O(()=>{p(6,he)},[]);const y=a.useMemo(()=>({subscribe:e=>(m.current.add(e),()=>m.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var l,f,b,g,C,A;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")ee(),Y(),p(1,Z);else if(e==="value"){if((l=document.activeElement)!=null&&l.hasAttribute("cmdk-input")||(f=document.activeElement)!=null&&f.hasAttribute("cmdk-root")){const x=document.getElementById(_);x?x.focus():(b=document.getElementById(X))==null||b.focus()}if(p(7,()=>{var x;r.current.selectedItemId=(x=V())==null?void 0:x.id,y.emit()}),s||p(5,he),((g=i.current)==null?void 0:g.value)!==void 0){const x=o!=null?o:"";(A=(C=i.current).onValueChange)==null||A.call(C,x);return}}y.emit()}},emit:()=>{m.current.forEach(e=>e())}}),[]),K=a.useMemo(()=>({value:(e,o,s)=>{var l;o!==((l=v.current.get(e))==null?void 0:l.value)&&(v.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,pe(o,s)),p(2,()=>{Y(),y.emit()}))},item:(e,o)=>(u.current.add(e),o&&(d.current.has(o)?d.current.get(o).add(e):d.current.set(o,new Set([e]))),p(3,()=>{ee(),Y(),r.current.value||Z(),y.emit()}),()=>{v.current.delete(e),u.current.delete(e),r.current.filtered.items.delete(e);const s=V();p(4,()=>{ee(),(s==null?void 0:s.getAttribute("id"))===e&&Z(),y.emit()})}),group:e=>(d.current.has(e)||d.current.set(e,new Set),()=>{v.current.delete(e),d.current.delete(e)}),filter:()=>i.current.shouldFilter!==!1,label:h||t["aria-label"]||"",getDisablePointerSelection:()=>!!i.current.disablePointerSelection,listId:X,inputId:_,labelId:me,listInnerRef:D}),[]);function pe(e,o){var s,l;const f=(l=(s=i.current)==null?void 0:s.filter)!=null?l:Re;return e?f(e,r.current.search,o):0}function Y(){if(!r.current.search||i.current.shouldFilter===!1)return;const e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(l=>{const f=d.current.get(l);let b=0;f==null||f.forEach(g=>{const C=e.get(g);b=Math.max(C!=null?C:0,b)}),o.push([l,b])});const s=D.current;B().sort((l,f)=>{var b,g;const C=l.getAttribute("id"),A=f.getAttribute("id");return((b=e.get(A))!=null?b:0)-((g=e.get(C))!=null?g:0)}).forEach(l=>{const f=l.closest(ne);f?f.appendChild(l.parentElement===f?l:l.closest(`${ne} > *`)):s==null||s.appendChild(l.parentElement===s?l:l.closest(`${ne} > *`))}),o.sort((l,f)=>f[1]-l[1]).forEach(l=>{var f,b;const g=(f=D.current)==null?void 0:f.querySelector(`${G}[${$}="${encodeURIComponent(l[0])}"]`);(b=g==null?void 0:g.parentElement)==null||b.appendChild(g)})}function Z(){const e=B().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e==null?void 0:e.getAttribute($);y.setState("value",o||void 0)}function ee(){var e,o,s,l,f;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=u.current.size;return}r.current.filtered.groups=new Set;let b=0;for(const g of u.current){const C=(o=(e=v.current.get(g))==null?void 0:e.value)!=null?o:"",A=(l=(s=v.current.get(g))==null?void 0:s.keywords)!=null?l:[],x=pe(C,A);r.current.filtered.items.set(g,x),x>0&&b++}for(const[g,C]of d.current)for(const A of C)if(((f=r.current.filtered.items.get(A))!=null?f:0)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=b}function he(){var e,o,s;const l=V();l&&(((e=l.parentElement)==null?void 0:e.firstChild)===l&&((s=(o=l.closest(G))==null?void 0:o.querySelector(Ve))==null||s.scrollIntoView({block:"nearest"})),l.scrollIntoView({block:"nearest"}))}function V(){var e;return(e=D.current)==null?void 0:e.querySelector(`${Ce}[aria-selected="true"]`)}function B(){var e;return Array.from(((e=D.current)==null?void 0:e.querySelectorAll(xe))||[])}function te(e){const o=B()[e];o&&y.setState("value",o.getAttribute($))}function re(e){var o;const s=V(),l=B(),f=l.findIndex(g=>g===s);let b=l[f+e];(o=i.current)!=null&&o.loop&&(b=f+e<0?l[l.length-1]:f+e===l.length?l[0]:l[f+e]),b&&y.setState("value",b.getAttribute($))}function be(e){const o=V();let s=o==null?void 0:o.closest(G),l;for(;s&&!l;)s=e>0?$e(s,G):qe(s,G),l=s==null?void 0:s.querySelector(xe);l?y.setState("value",l.getAttribute($)):re(e)}const ge=()=>te(B().length-1),ye=e=>{e.preventDefault(),e.metaKey?ge():e.altKey?be(1):re(1)},we=e=>{e.preventDefault(),e.metaKey?te(0):e.altKey?be(-1):re(-1)};return Se("div",j(P({ref:n,tabIndex:-1},z),{"cmdk-root":"",onKeyDown:e=>{var o;(o=z.onKeyDown)==null||o.call(z,e);const s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{L&&e.ctrlKey&&ye(e);break}case"ArrowDown":{ye(e);break}case"p":case"k":{L&&e.ctrlKey&&we(e);break}case"ArrowUp":{we(e);break}case"Home":{e.preventDefault(),te(0);break}case"End":{e.preventDefault(),ge();break}case"Enter":{e.preventDefault();const l=V();if(l){const f=new Event(le);l.dispatchEvent(f)}}}},children:[S("label",{"cmdk-label":"",htmlFor:K.inputId,id:K.labelId,style:He,children:h}),J(t,e=>S(Ae.Provider,{value:y,children:S(Me.Provider,{value:K,children:e})}))]}))});ue.displayName="Command";const ae=a.forwardRef((t,n)=>{var r,u;const d=N(),v=a.useRef(null),m=a.useContext(Pe),i=H(),w=je(t),h=(u=(r=w.current)==null?void 0:r.forceMount)!=null?u:m==null?void 0:m.forceMount;O(()=>{if(!h)return i.item(d,m==null?void 0:m.id)},[h]);const c=Oe(d,v,[t.value,t.children,v],t.keywords),E=oe(),k=R(p=>p.value&&p.value===c.current),M=R(p=>{var y;return h||i.filter()===!1?!0:p.search?((y=p.filtered.items.get(d))!=null?y:0)>0:!0});a.useEffect(()=>{const p=v.current;if(!(!p||t.disabled))return p.addEventListener(le,I),()=>p.removeEventListener(le,I)},[M,t.onSelect,t.disabled]);function I(){var p,y,K;Q(),(K=(y=w.current).onSelect)==null||K.call(y,(p=c.current)!=null?p:"")}function Q(){var p;E.setState("value",(p=c.current)!=null?p:"",!0)}if(!M)return null;const W=t,{disabled:L,value:z,onSelect:X,forceMount:me,keywords:_}=W,D=F(W,["disabled","value","onSelect","forceMount","keywords"]);return S("div",j(P({ref:T(v,n)},D),{id:d,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!k,"data-disabled":!!L,"data-selected":!!k,onPointerMove:L||i.getDisablePointerSelection()?void 0:Q,onClick:L?void 0:I,children:t.children}))});ae.displayName="Item";const ie=a.forwardRef((t,n)=>{const r=t,{heading:u,children:d,forceMount:v}=r,m=F(r,["heading","children","forceMount"]),i=N(),w=a.useRef(null),h=a.useRef(null),c=N(),E=H(),k=R(I=>v||E.filter()===!1?!0:I.search?I.filtered.groups.has(i):!0);O(()=>E.group(i),[]),Oe(i,w,[t.value,t.heading,h]);const M=a.useMemo(()=>({id:i,forceMount:v}),[v]);return Se("div",j(P({ref:T(w,n)},m),{"cmdk-group":"",role:"presentation",hidden:k?void 0:!0,children:[u&&S("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:c,children:u}),J(t,I=>S("div",{"cmdk-group-items":"",role:"group","aria-labelledby":u?c:void 0,children:S(Pe.Provider,{value:M,children:I})}))]}))});ie.displayName="Group";const ce=a.forwardRef((t,n)=>{const r=t,{alwaysRender:u}=r,d=F(r,["alwaysRender"]),v=a.useRef(null),m=R(i=>!i.search);return!u&&!m?null:S("div",j(P({ref:T(v,n)},d),{"cmdk-separator":"",role:"separator"}))});ce.displayName="Separator";const se=a.forwardRef((t,n)=>{const r=t,{onValueChange:u}=r,d=F(r,["onValueChange"]),v=t.value!=null,m=oe(),i=R(c=>c.search),w=R(c=>c.selectedItemId),h=H();return a.useEffect(()=>{t.value!=null&&m.setState("search",t.value)},[t.value]),S("input",j(P({ref:n},d),{"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":w,id:h.inputId,type:"text",value:v?t.value:i,onChange:c=>{v||m.setState("search",c.target.value),u==null||u(c.target.value)}}))});se.displayName="Input";const de=a.forwardRef((t,n)=>{const r=t,{children:u,label:d="Suggestions"}=r,v=F(r,["children","label"]),m=a.useRef(null),i=a.useRef(null),w=R(c=>c.selectedItemId),h=H();return a.useEffect(()=>{if(i.current&&m.current){const c=i.current,E=m.current;let k;const M=new ResizeObserver(()=>{k=requestAnimationFrame(()=>{const I=c.offsetHeight;E.style.setProperty("--cmdk-list-height",I.toFixed(1)+"px")})});return M.observe(c),()=>{cancelAnimationFrame(k),M.unobserve(c)}}},[]),a.useEffect(()=>{const c=m.current;if(!c)return;const E=k=>{c.contains(k.target)&&k.stopPropagation()};return document.addEventListener("wheel",E,{capture:!0}),()=>{document.removeEventListener("wheel",E,{capture:!0})}},[]),S("div",j(P({ref:T(m,n)},v),{"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":w,"aria-label":d,id:h.listId,children:J(t,c=>S("div",{ref:T(i,h.listInnerRef),"cmdk-list-sizer":"",children:c}))}))});de.displayName="List";const fe=a.forwardRef((t,n)=>R(r=>r.filtered.count===0)?S("div",j(P({ref:n},t),{"cmdk-empty":"",role:"presentation"})):null);fe.displayName="Empty";const ve=a.forwardRef((t,n)=>{const r=t,{progress:u,children:d,label:v="Loading..."}=r,m=F(r,["progress","children","label"]);return S("div",j(P({ref:n},m),{"cmdk-loading":"",role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-label":v,children:J(t,i=>S("div",{"aria-hidden":!0,children:i}))}))});ve.displayName="Loading";const Ne=Object.assign(ue,{List:de,Item:ae,Input:se,Group:ie,Separator:ce,Empty:fe,Loading:ve});function $e(t,n){let r=t.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function qe(t,n){let r=t.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function je(t){const n=a.useRef(t);return O(()=>{n.current=t}),n}const O=typeof window=="undefined"?a.useEffect:a.useLayoutEffect;function q(t){const n=a.useRef(void 0);return n.current===void 0&&(n.current=t()),n}function R(t){const n=oe(),[,r]=a.useState({}),u=a.useRef(t(n.snapshot()));return u.current=t(n.snapshot()),O(()=>n.subscribe(()=>{const d=t(n.snapshot());Object.is(d,u.current)||(u.current=d,r({}))}),[n,t]),u.current}function Oe(t,n,r,u=[]){const d=a.useRef(void 0),v=H();return O(()=>{var m;const i=(()=>{var h;for(const c of r){if(typeof c=="string")return c.trim();if(typeof c=="object"&&c!==null&&"current"in c)return c.current?(h=c.current.textContent)==null?void 0:h.trim():d.current}})(),w=u.map(h=>h.trim());v.value(t,i!=null?i:"",w),(m=n.current)==null||m.setAttribute($,i!=null?i:""),d.current=i}),d}const Be=()=>{const[t,n]=a.useState(),r=q(()=>new Map);return O(()=>{r.current.forEach(u=>u()),r.current=new Map},[t]),(u,d)=>{r.current.set(u,d),n({})}};function Ge(t){const n=t.type;return typeof n=="function"?n(t.props):"render"in n?n.render(t.props):t}function J({asChild:t,children:n},r){return t&&a.isValidElement(n)?a.cloneElement(Ge(n),{ref:n.ref},r(n.props.children)):r(n)}function T(...t){return n=>{t.forEach(r=>{typeof r=="function"?r(n):r!=null&&typeof r=="object"&&(r.current=n)})}}const He={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ne as Command,fe as CommandEmpty,ie as CommandGroup,se as CommandInput,ae as CommandItem,de as CommandList,ve as CommandLoading,ue as CommandRoot,ce as CommandSeparator,Re as defaultFilter,R as useCommandState};
|
|
4
|
+
//# sourceMappingURL=cmdk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmdk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-score.d.ts","sourceRoot":"","sources":["../../src/lib/command-score.ts"],"names":[],"mappings":"AA2IA,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,MAAM,CAcR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-score.d.ts","sourceRoot":"","sources":["../../src/lib/command-score.ts"],"names":[],"mappings":"AA2IA,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,MAAM,CAcR"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use strict";const M=/[\\\/_+.#"@\[\(\{&]/,_=/[\\\/_+.#"@\[\(\{&]/g,$=/[\s-]/,p=/[\s-]/g;function m(t,a,e,o,n,h,i){if(h===a.length)return n===t.length?1:.99;const u=`${n},${h}`;if(i[u]!==void 0)return i[u];const d=o.charAt(h);let r=e.indexOf(d,n),s=0,c,f,l,g;for(;r>=0;)c=m(t,a,e,o,r+1,h+1,i),c>s&&(r===n?c*=1:M.test(t.charAt(r-1))?(c*=.8,l=t.slice(n,r-1).match(_),l&&n>0&&(c*=Math.pow(.999,l.length))):$.test(t.charAt(r-1))?(c*=.9,g=t.slice(n,r-1).match(p),g&&n>0&&(c*=Math.pow(.999,g.length))):(c*=.17,n>0&&(c*=Math.pow(.999,r-n))),t.charAt(r)!==a.charAt(h)&&(c*=.9999)),(c<.1&&e.charAt(r-1)===o.charAt(h+1)||o.charAt(h+1)===o.charAt(h)&&e.charAt(r-1)!==o.charAt(h))&&(f=m(t,a,e,o,r+1,h+2,i),f*.1>c&&(c=f*.1)),c>s&&(s=c),r=e.indexOf(d,r+1);return i[u]=s,s}function w(t){return t.toLowerCase().replace(p," ")}function x(t,a,e){return t=e&&e.length>0?`${t+" "+e.join(" ")}`:t,m(t,a,w(t),w(a),0,0,{})}exports.commandScore=x;
|
|
3
|
+
//# sourceMappingURL=command-score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-score.js","sources":["../../src/lib/command-score.ts"],"sourcesContent":["// The scores are arranged so that a continuous match of characters will\n// result in a total score of 1.\n//\n// The best case, this character is a match, and either this is the start\n// of the string, or the previous character was also a match.\nconst SCORE_CONTINUE_MATCH = 1;\n// A new match at the start of a word scores better than a new match\n// elsewhere as it's more likely that the user will type the starts\n// of fragments.\n// NOTE: We score word jumps between spaces slightly higher than slashes, brackets\n// hyphens, etc.\nconst SCORE_SPACE_WORD_JUMP = 0.9;\nconst SCORE_NON_SPACE_WORD_JUMP = 0.8;\n// Any other match isn't ideal, but we include it for completeness.\nconst SCORE_CHARACTER_JUMP = 0.17;\n// If the user transposed two letters, it should be significantly penalized.\nconst SCORE_TRANSPOSITION = 0.1;\n// The goodness of a match should decay slightly with each missing character.\nconst PENALTY_SKIPPED = 0.999;\n// The goodness of an exact-case match should be higher than a case-insensitive match by a small amount.\nconst PENALTY_CASE_MISMATCH = 0.9999;\n// If the word has more characters than the user typed, it should be penalised slightly.\nconst PENALTY_NOT_COMPLETE = 0.99;\n\nconst IS_GAP_REGEXP = /[\\\\\\/_+.#\"@\\[\\(\\{&]/;\nconst COUNT_GAPS_REGEXP = /[\\\\\\/_+.#\"@\\[\\(\\{&]/g;\nconst IS_SPACE_REGEXP = /[\\s-]/;\nconst COUNT_SPACE_REGEXP = /[\\s-]/g;\n\nfunction commandScoreInner(\n string: string,\n abbreviation: string,\n lowerString: string,\n lowerAbbreviation: string,\n stringIndex: number,\n abbreviationIndex: number,\n memoizedResults: Record<string, number>\n): number {\n if (abbreviationIndex === abbreviation.length) {\n if (stringIndex === string.length) {\n return SCORE_CONTINUE_MATCH;\n }\n return PENALTY_NOT_COMPLETE;\n }\n\n const memoizeKey = `${stringIndex},${abbreviationIndex}`;\n if (memoizedResults[memoizeKey] !== undefined) {\n return memoizedResults[memoizeKey];\n }\n\n const abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);\n let index = lowerString.indexOf(abbreviationChar, stringIndex);\n let highScore = 0;\n\n let score: number;\n let transposedScore: number;\n let wordBreaks: RegExpMatchArray | null;\n let spaceBreaks: RegExpMatchArray | null;\n\n while (index >= 0) {\n score = commandScoreInner(\n string,\n abbreviation,\n lowerString,\n lowerAbbreviation,\n index + 1,\n abbreviationIndex + 1,\n memoizedResults\n );\n if (score > highScore) {\n if (index === stringIndex) {\n score *= SCORE_CONTINUE_MATCH;\n } else if (IS_GAP_REGEXP.test(string.charAt(index - 1))) {\n score *= SCORE_NON_SPACE_WORD_JUMP;\n wordBreaks = string\n .slice(stringIndex, index - 1)\n .match(COUNT_GAPS_REGEXP);\n if (wordBreaks && stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, wordBreaks.length);\n }\n } else if (IS_SPACE_REGEXP.test(string.charAt(index - 1))) {\n score *= SCORE_SPACE_WORD_JUMP;\n spaceBreaks = string\n .slice(stringIndex, index - 1)\n .match(COUNT_SPACE_REGEXP);\n if (spaceBreaks && stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, spaceBreaks.length);\n }\n } else {\n score *= SCORE_CHARACTER_JUMP;\n if (stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);\n }\n }\n\n if (string.charAt(index) !== abbreviation.charAt(abbreviationIndex)) {\n score *= PENALTY_CASE_MISMATCH;\n }\n }\n\n if (\n (score < SCORE_TRANSPOSITION &&\n lowerString.charAt(index - 1) ===\n lowerAbbreviation.charAt(abbreviationIndex + 1)) ||\n (lowerAbbreviation.charAt(abbreviationIndex + 1) ===\n lowerAbbreviation.charAt(abbreviationIndex) &&\n lowerString.charAt(index - 1) !==\n lowerAbbreviation.charAt(abbreviationIndex))\n ) {\n transposedScore = commandScoreInner(\n string,\n abbreviation,\n lowerString,\n lowerAbbreviation,\n index + 1,\n abbreviationIndex + 2,\n memoizedResults\n );\n\n if (transposedScore * SCORE_TRANSPOSITION > score) {\n score = transposedScore * SCORE_TRANSPOSITION;\n }\n }\n\n if (score > highScore) {\n highScore = score;\n }\n\n index = lowerString.indexOf(abbreviationChar, index + 1);\n }\n\n memoizedResults[memoizeKey] = highScore;\n return highScore;\n}\n\nfunction formatInput(string: string) {\n return string.toLowerCase().replace(COUNT_SPACE_REGEXP, \" \");\n}\n\nexport function commandScore(\n string: string,\n abbreviation: string,\n aliases?: string[]\n): number {\n string =\n aliases && aliases.length > 0\n ? `${string + \" \" + aliases.join(\" \")}`\n : string;\n return commandScoreInner(\n string,\n abbreviation,\n formatInput(string),\n formatInput(abbreviation),\n 0,\n 0,\n {}\n );\n}\n"],"names":[],"mappings":";AAKA;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const M=/[\\\/_+.#"@\[\(\{&]/,x=/[\\\/_+.#"@\[\(\{&]/g,_=/[\s-]/,d=/[\s-]/g;function p(t,a,e,o,n,h,i){if(h===a.length)return n===t.length?1:.99;const f=`${n},${h}`;if(i[f]!==void 0)return i[f];const m=o.charAt(h);let c=e.indexOf(m,n),s=0,r,l,u,g;for(;c>=0;)r=p(t,a,e,o,c+1,h+1,i),r>s&&(c===n?r*=1:M.test(t.charAt(c-1))?(r*=.8,u=t.slice(n,c-1).match(x),u&&n>0&&(r*=Math.pow(.999,u.length))):_.test(t.charAt(c-1))?(r*=.9,g=t.slice(n,c-1).match(d),g&&n>0&&(r*=Math.pow(.999,g.length))):(r*=.17,n>0&&(r*=Math.pow(.999,c-n))),t.charAt(c)!==a.charAt(h)&&(r*=.9999)),(r<.1&&e.charAt(c-1)===o.charAt(h+1)||o.charAt(h+1)===o.charAt(h)&&e.charAt(c-1)!==o.charAt(h))&&(l=p(t,a,e,o,c+1,h+2,i),l*.1>r&&(r=l*.1)),r>s&&(s=r),c=e.indexOf(m,c+1);return i[f]=s,s}function w(t){return t.toLowerCase().replace(d," ")}function $(t,a,e){return t=e&&e.length>0?`${t+" "+e.join(" ")}`:t,p(t,a,w(t),w(a),0,0,{})}export{$ as commandScore};
|
|
3
|
+
//# sourceMappingURL=command-score.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-score.mjs","sources":["../../src/lib/command-score.ts"],"sourcesContent":["// The scores are arranged so that a continuous match of characters will\n// result in a total score of 1.\n//\n// The best case, this character is a match, and either this is the start\n// of the string, or the previous character was also a match.\nconst SCORE_CONTINUE_MATCH = 1;\n// A new match at the start of a word scores better than a new match\n// elsewhere as it's more likely that the user will type the starts\n// of fragments.\n// NOTE: We score word jumps between spaces slightly higher than slashes, brackets\n// hyphens, etc.\nconst SCORE_SPACE_WORD_JUMP = 0.9;\nconst SCORE_NON_SPACE_WORD_JUMP = 0.8;\n// Any other match isn't ideal, but we include it for completeness.\nconst SCORE_CHARACTER_JUMP = 0.17;\n// If the user transposed two letters, it should be significantly penalized.\nconst SCORE_TRANSPOSITION = 0.1;\n// The goodness of a match should decay slightly with each missing character.\nconst PENALTY_SKIPPED = 0.999;\n// The goodness of an exact-case match should be higher than a case-insensitive match by a small amount.\nconst PENALTY_CASE_MISMATCH = 0.9999;\n// If the word has more characters than the user typed, it should be penalised slightly.\nconst PENALTY_NOT_COMPLETE = 0.99;\n\nconst IS_GAP_REGEXP = /[\\\\\\/_+.#\"@\\[\\(\\{&]/;\nconst COUNT_GAPS_REGEXP = /[\\\\\\/_+.#\"@\\[\\(\\{&]/g;\nconst IS_SPACE_REGEXP = /[\\s-]/;\nconst COUNT_SPACE_REGEXP = /[\\s-]/g;\n\nfunction commandScoreInner(\n string: string,\n abbreviation: string,\n lowerString: string,\n lowerAbbreviation: string,\n stringIndex: number,\n abbreviationIndex: number,\n memoizedResults: Record<string, number>\n): number {\n if (abbreviationIndex === abbreviation.length) {\n if (stringIndex === string.length) {\n return SCORE_CONTINUE_MATCH;\n }\n return PENALTY_NOT_COMPLETE;\n }\n\n const memoizeKey = `${stringIndex},${abbreviationIndex}`;\n if (memoizedResults[memoizeKey] !== undefined) {\n return memoizedResults[memoizeKey];\n }\n\n const abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);\n let index = lowerString.indexOf(abbreviationChar, stringIndex);\n let highScore = 0;\n\n let score: number;\n let transposedScore: number;\n let wordBreaks: RegExpMatchArray | null;\n let spaceBreaks: RegExpMatchArray | null;\n\n while (index >= 0) {\n score = commandScoreInner(\n string,\n abbreviation,\n lowerString,\n lowerAbbreviation,\n index + 1,\n abbreviationIndex + 1,\n memoizedResults\n );\n if (score > highScore) {\n if (index === stringIndex) {\n score *= SCORE_CONTINUE_MATCH;\n } else if (IS_GAP_REGEXP.test(string.charAt(index - 1))) {\n score *= SCORE_NON_SPACE_WORD_JUMP;\n wordBreaks = string\n .slice(stringIndex, index - 1)\n .match(COUNT_GAPS_REGEXP);\n if (wordBreaks && stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, wordBreaks.length);\n }\n } else if (IS_SPACE_REGEXP.test(string.charAt(index - 1))) {\n score *= SCORE_SPACE_WORD_JUMP;\n spaceBreaks = string\n .slice(stringIndex, index - 1)\n .match(COUNT_SPACE_REGEXP);\n if (spaceBreaks && stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, spaceBreaks.length);\n }\n } else {\n score *= SCORE_CHARACTER_JUMP;\n if (stringIndex > 0) {\n score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);\n }\n }\n\n if (string.charAt(index) !== abbreviation.charAt(abbreviationIndex)) {\n score *= PENALTY_CASE_MISMATCH;\n }\n }\n\n if (\n (score < SCORE_TRANSPOSITION &&\n lowerString.charAt(index - 1) ===\n lowerAbbreviation.charAt(abbreviationIndex + 1)) ||\n (lowerAbbreviation.charAt(abbreviationIndex + 1) ===\n lowerAbbreviation.charAt(abbreviationIndex) &&\n lowerString.charAt(index - 1) !==\n lowerAbbreviation.charAt(abbreviationIndex))\n ) {\n transposedScore = commandScoreInner(\n string,\n abbreviation,\n lowerString,\n lowerAbbreviation,\n index + 1,\n abbreviationIndex + 2,\n memoizedResults\n );\n\n if (transposedScore * SCORE_TRANSPOSITION > score) {\n score = transposedScore * SCORE_TRANSPOSITION;\n }\n }\n\n if (score > highScore) {\n highScore = score;\n }\n\n index = lowerString.indexOf(abbreviationChar, index + 1);\n }\n\n memoizedResults[memoizeKey] = highScore;\n return highScore;\n}\n\nfunction formatInput(string: string) {\n return string.toLowerCase().replace(COUNT_SPACE_REGEXP, \" \");\n}\n\nexport function commandScore(\n string: string,\n abbreviation: string,\n aliases?: string[]\n): number {\n string =\n aliases && aliases.length > 0\n ? `${string + \" \" + aliases.join(\" \")}`\n : string;\n return commandScoreInner(\n string,\n abbreviation,\n formatInput(string),\n formatInput(abbreviation),\n 0,\n 0,\n {}\n );\n}\n"],"names":[],"mappings":";AAKA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AA4D7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AA4D7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use strict";var t=require("clsx"),l=require("tailwind-merge");const d=l.extendTailwindMerge({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-sm","text-base","text-md","text-lg","text-xl","text-title-xs","text-title-sm","text-title-md","text-title-lg","text-title-xl","text-title-xxl","text-display-sm","text-display-md","text-display-lg"],leading:["leading-xxs","leading-xs","leading-sm","leading-md","leading-lg","leading-title-xs","leading-title-sm","leading-title-md","leading-title-lg","leading-title-xl","leading-title-xxl","leading-display-sm","leading-display-md","leading-display-lg"],"font-weight":["font-regular","font-medium","font-semibold","font-bold","font-extrabold"],rounded:["rounded-none","rounded-sm","rounded-md","rounded-lg","rounded-pill","rounded-circular","rounded-full"]}}});function i(...e){return d(t.clsx(e))}exports.cn=i;
|
|
3
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import{clsx as e}from"clsx";import{extendTailwindMerge as l}from"tailwind-merge";const d=l({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-sm","text-base","text-md","text-lg","text-xl","text-title-xs","text-title-sm","text-title-md","text-title-lg","text-title-xl","text-title-xxl","text-display-sm","text-display-md","text-display-lg"],leading:["leading-xxs","leading-xs","leading-sm","leading-md","leading-lg","leading-title-xs","leading-title-sm","leading-title-md","leading-title-lg","leading-title-xl","leading-title-xxl","leading-display-sm","leading-display-md","leading-display-lg"],"font-weight":["font-regular","font-medium","font-semibold","font-bold","font-extrabold"],rounded:["rounded-none","rounded-sm","rounded-md","rounded-lg","rounded-pill","rounded-circular","rounded-full"]}}});function i(...t){return d(e(t))}export{i as cn};
|
|
3
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var N=Object.defineProperty,h=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var d=(e,r,t)=>r in e?N(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,l=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&d(e,t,r[t]);if(s)for(var t of s(r))f.call(r,t)&&d(e,t,r[t]);return e},v=(e,r)=>h(e,w(r));var b=(e,r)=>{var t={};for(var a in e)m.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&s)for(var a of s(e))r.indexOf(a)<0&&f.call(e,a)&&(t[a]=e[a]);return t};Object.defineProperty(exports,"__esModule",{value:!0});var o=require("react"),C=require("./defaultAttributes.js"),n=require("./shared/src/utils.js");/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const E=o.forwardRef((P,g)=>{var c=P,{color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:a,className:y="",children:u,iconNode:A}=c,i=b(c,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return o.createElement("svg",l(l(v(l({ref:g},C.default),{width:r,height:r,stroke:e,strokeWidth:a?Number(t)*24/Number(r):t,className:n.mergeClasses("lucide",y)}),!u&&!n.hasA11yProp(i)&&{"aria-hidden":"true"}),i),[...A.map(([p,q])=>o.createElement(p,q)),...Array.isArray(u)?u:[u]])});exports.default=E;
|
|
7
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../../node_modules/lucide-react/dist/esm/Icon.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n"],"names":["Icon","forwardRef","_a","ref","_b","color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode","rest","__objRest","createElement","__spreadValues","__spreadProps","defaultAttributes","mergeClasses","hasA11yProp","tag","attrs"],"mappings":"ivBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWK,MAACA,EAAOC,EAAAA,WACX,CAACC,EASEC,IAAG,CATL,IAAAC,EAAAF,EACC,OAAAG,EAAQ,eACR,KAAAC,EAAO,GACP,YAAAC,EAAc,EACd,oBAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EACA,SAAAC,GAPDP,EAQIQ,EAAAC,EARJT,EAQI,CAPH,QACA,OACA,cACA,sBACA,YACA,WACA,aAESU,OAAAA,EAAAA,cACT,MACAC,IAAAC,EAAAD,EAAA,CACE,IAAAZ,GACGc,EAAAA,SAFL,CAGE,MAAOX,EACP,OAAQA,EACR,OAAQD,EACR,YAAaG,EAAsB,OAAOD,CAAW,EAAI,GAAK,OAAOD,CAAI,EAAIC,EAC7E,UAAWW,EAAAA,aAAa,SAAUT,CAAS,IACxC,CAACC,GAAY,CAACS,EAAAA,YAAYP,CAAI,GAAK,CAAE,cAAe,MAAM,GAC1DA,GAEL,CACE,GAAGD,EAAS,IAAI,CAAC,CAACS,EAAKC,CAAK,IAAMP,EAAAA,cAAcM,EAAKC,CAAK,CAAC,EAC3D,GAAG,MAAM,QAAQX,CAAQ,EAAIA,EAAW,CAACA,CAAQ,CACvD,CACA,EACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var n=Object.defineProperty,w=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var p=(r,t,e)=>t in r?n(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,s=(r,t)=>{for(var e in t||(t={}))i.call(t,e)&&p(r,e,t[e]);if(m)for(var e of m(t))d.call(t,e)&&p(r,e,t[e]);return r},l=(r,t)=>w(r,C(t));var A=(r,t)=>{var e={};for(var a in r)i.call(r,a)&&t.indexOf(a)<0&&(e[a]=r[a]);if(r!=null&&m)for(var a of m(r))t.indexOf(a)<0&&d.call(r,a)&&(e[a]=r[a]);return e};import{forwardRef as k,createElement as b}from"react";import v from"./defaultAttributes.mjs";import{hasA11yProp as x,mergeClasses as E}from"./shared/src/utils.mjs";/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const I=k((P,y)=>{var f=P,{color:r="currentColor",size:t=24,strokeWidth:e=2,absoluteStrokeWidth:a,className:c="",children:o,iconNode:g}=f,u=A(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return b("svg",s(s(l(s({ref:y},v),{width:t,height:t,stroke:r,strokeWidth:a?Number(e)*24/Number(t):e,className:E("lucide",c)}),!o&&!x(u)&&{"aria-hidden":"true"}),u),[...g.map(([N,h])=>b(N,h)),...Array.isArray(o)?o:[o]])});export{I as default};
|
|
7
|
+
//# sourceMappingURL=Icon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.mjs","sources":["../../../../../node_modules/lucide-react/dist/esm/Icon.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n"],"names":["Icon","forwardRef","_a","ref","_b","color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode","rest","__objRest","createElement","__spreadValues","__spreadProps","defaultAttributes","mergeClasses","hasA11yProp","tag","attrs"],"mappings":"mvBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWK,MAACA,EAAOC,EACX,CAACC,EASEC,IAAG,CATL,IAAAC,EAAAF,EACC,OAAAG,EAAQ,eACR,KAAAC,EAAO,GACP,YAAAC,EAAc,EACd,oBAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EACA,SAAAC,GAPDP,EAQIQ,EAAAC,EARJT,EAQI,CAPH,QACA,OACA,cACA,sBACA,YACA,WACA,aAES,OAAAU,EACT,MACAC,IAAAC,EAAAD,EAAA,CACE,IAAAZ,GACGc,GAFL,CAGE,MAAOX,EACP,OAAQA,EACR,OAAQD,EACR,YAAaG,EAAsB,OAAOD,CAAW,EAAI,GAAK,OAAOD,CAAI,EAAIC,EAC7E,UAAWW,EAAa,SAAUT,CAAS,IACxC,CAACC,GAAY,CAACS,EAAYP,CAAI,GAAK,CAAE,cAAe,MAAM,GAC1DA,GAEL,CACE,GAAGD,EAAS,IAAI,CAAC,CAACS,EAAKC,CAAK,IAAMP,EAAcM,EAAKC,CAAK,CAAC,EAC3D,GAAG,MAAM,QAAQX,CAAQ,EAAIA,EAAW,CAACA,CAAQ,CACvD,CACA,EACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var b=Object.defineProperty;var s=Object.getOwnPropertySymbols;var o=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var l=(e,r,a)=>r in e?b(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,i=(e,r)=>{for(var a in r||(r={}))o.call(r,a)&&l(e,a,r[a]);if(s)for(var a of s(r))d.call(r,a)&&l(e,a,r[a]);return e};var n=(e,r)=>{var a={};for(var t in e)o.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&s)for(var t of s(e))r.indexOf(t)<0&&d.call(e,t)&&(a[t]=e[t]);return a};Object.defineProperty(exports,"__esModule",{value:!0});var f=require("react"),u=require("./shared/src/utils.js"),m=require("./Icon.js");/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const p=(e,r)=>{const a=f.forwardRef((q,v)=>{var c=q,{className:t}=c,C=n(c,["className"]);return f.createElement(m.default,i({ref:v,iconNode:r,className:u.mergeClasses(`lucide-${u.toKebabCase(u.toPascalCase(e))}`,`lucide-${e}`,t)},C))});return a.displayName=u.toPascalCase(e),a};exports.default=p;
|
|
7
|
+
//# sourceMappingURL=createLucideIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLucideIcon.js","sources":["../../../../../node_modules/lucide-react/dist/esm/createLucideIcon.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n"],"names":["createLucideIcon","iconName","iconNode","Component","forwardRef","_a","ref","_b","className","props","__objRest","createElement","Icon","__spreadValues","mergeClasses","toKebabCase","toPascalCase"],"mappings":"gpBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWK,MAACA,EAAmB,CAACC,EAAUC,IAAa,CAC/C,MAAMC,EAAYC,EAAAA,WAChB,CAACC,EAAyBC,IAAG,CAA5B,IAAAC,EAAAF,EAAE,WAAAG,GAAFD,EAAgBE,EAAAC,EAAhBH,EAAgB,CAAd,cAA+BI,OAAAA,EAAAA,cAAcC,UAAMC,EAAA,CACpD,IAAAP,EACA,SAAAJ,EACA,UAAWY,EAAAA,aACT,UAAUC,EAAAA,YAAYC,EAAAA,aAAaf,CAAQ,CAAC,CAAC,GAC7C,UAAUA,CAAQ,GAClBO,CACR,GACSC,EACJ,EACL,EACE,OAAAN,EAAU,YAAca,EAAAA,aAAaf,CAAQ,EACtCE,CACT","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var u=Object.defineProperty;var a=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var c=(e,r,o)=>r in e?u(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,d=(e,r)=>{for(var o in r||(r={}))m.call(r,o)&&c(e,o,r[o]);if(a)for(var o of a(r))l.call(r,o)&&c(e,o,r[o]);return e};var f=(e,r)=>{var o={};for(var t in e)m.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&a)for(var t of a(e))r.indexOf(t)<0&&l.call(e,t)&&(o[t]=e[t]);return o};import{forwardRef as C,createElement as b}from"react";import{mergeClasses as I,toKebabCase as $,toPascalCase as n}from"./shared/src/utils.mjs";import g from"./Icon.mjs";/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const w=(e,r)=>{const o=C((x,i)=>{var s=x,{className:t}=s,p=f(s,["className"]);return b(g,d({ref:i,iconNode:r,className:I(`lucide-${$(n(e))}`,`lucide-${e}`,t)},p))});return o.displayName=n(e),o};export{w as default};
|
|
7
|
+
//# sourceMappingURL=createLucideIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLucideIcon.mjs","sources":["../../../../../node_modules/lucide-react/dist/esm/createLucideIcon.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n"],"names":["createLucideIcon","iconName","iconNode","Component","forwardRef","_a","ref","_b","className","props","__objRest","createElement","Icon","__spreadValues","mergeClasses","toKebabCase","toPascalCase"],"mappings":"oqBAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWK,MAACA,EAAmB,CAACC,EAAUC,IAAa,CAC/C,MAAMC,EAAYC,EAChB,CAACC,EAAyBC,IAAG,CAA5B,IAAAC,EAAAF,EAAE,WAAAG,GAAFD,EAAgBE,EAAAC,EAAhBH,EAAgB,CAAd,cAA+B,OAAAI,EAAcC,EAAMC,EAAA,CACpD,IAAAP,EACA,SAAAJ,EACA,UAAWY,EACT,UAAUC,EAAYC,EAAaf,CAAQ,CAAC,CAAC,GAC7C,UAAUA,CAAQ,GAClBO,CACR,GACSC,EACJ,EACL,EACE,OAAAN,EAAU,YAAca,EAAaf,CAAQ,EACtCE,CACT","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};exports.default=e;
|
|
7
|
+
//# sourceMappingURL=defaultAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultAttributes.js","sources":["../../../../../node_modules/lucide-react/dist/esm/defaultAttributes.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n"],"names":["defaultAttributes"],"mappings":"oEAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOG,IAACA,EAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};export{t as default};
|
|
7
|
+
//# sourceMappingURL=defaultAttributes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultAttributes.mjs","sources":["../../../../../node_modules/lucide-react/dist/esm/defaultAttributes.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n"],"names":["defaultAttributes"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOG,IAACA,EAAoB,CACtB,MAAO,6BACP,MAAO,GACP,OAAQ,GACR,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,EACb,cAAe,QACf,eAAgB,OAClB","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../createLucideIcon.js");/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],d=t.default("x",e);exports.__iconNode=e,exports.default=d;
|
|
7
|
+
//# sourceMappingURL=x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x.js","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","X","createLucideIcon"],"mappings":"4GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,CAC7C,EACMC,EAAIC,EAAAA,QAAiB,IAAKF,CAAU","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import o from"../createLucideIcon.mjs";/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=o("x",e);export{e as __iconNode,t as default};
|
|
7
|
+
//# sourceMappingURL=x.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"x.mjs","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","X","createLucideIcon"],"mappings":"uCAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,CAC7C,EACMC,EAAIC,EAAiB,IAAKF,CAAU","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license lucide-react v0.540.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const r=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,s)=>s?s.toUpperCase():a.toLowerCase()),C=t=>{const e=o(t);return e.charAt(0).toUpperCase()+e.slice(1)},c=(...t)=>t.filter((e,a,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===a).join(" ").trim(),n=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};exports.hasA11yProp=n,exports.mergeClasses=c,exports.toCamelCase=o,exports.toKebabCase=r,exports.toPascalCase=C;
|
|
7
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/lucide-react/dist/esm/shared/src/utils.js"],"sourcesContent":["/**\n * @license lucide-react v0.540.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n"],"names":["toKebabCase","string","toCamelCase","match","p1","p2","toPascalCase","camelCase","mergeClasses","classes","className","index","array","hasA11yProp","props","prop"],"mappings":"aAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOK,MAACA,EAAeC,GAAWA,EAAO,QAAQ,qBAAsB,OAAO,EAAE,YAAW,EACnFC,EAAeD,GAAWA,EAAO,QACrC,wBACA,CAACE,EAAOC,EAAIC,IAAOA,EAAKA,EAAG,YAAW,EAAKD,EAAG,YAAW,CAC3D,EACME,EAAgBL,GAAW,CAC/B,MAAMM,EAAYL,EAAYD,CAAM,EACpC,OAAOM,EAAU,OAAO,CAAC,EAAE,YAAW,EAAKA,EAAU,MAAM,CAAC,CAC9D,EACMC,EAAe,IAAIC,IAAYA,EAAQ,OAAO,CAACC,EAAWC,EAAOC,IAC9D,EAAQF,GAAcA,EAAU,KAAI,IAAO,IAAME,EAAM,QAAQF,CAAS,IAAMC,CACtF,EAAE,KAAK,GAAG,EAAE,KAAI,EACXE,EAAeC,GAAU,CAC7B,UAAWC,KAAQD,EACjB,GAAIC,EAAK,WAAW,OAAO,GAAKA,IAAS,QAAUA,IAAS,QAC1D,MAAO,EAGb","x_google_ignoreList":[0]}
|