@lobehub/ui 6.0.0-beta.1 → 6.0.0-beta.11
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/README.md +6 -4
- package/es/Accordion/Accordion.mjs +3 -3
- package/es/Accordion/Accordion.mjs.map +1 -1
- package/es/Accordion/atoms.mjs +2 -2
- package/es/Accordion/atoms.mjs.map +1 -1
- package/es/Accordion/style.d.mts +1 -1
- package/es/ActionIcon/ActionIcon.mjs +2 -2
- package/es/ActionIcon/ActionIcon.mjs.map +1 -1
- package/es/ActionIcon/style.mjs +1 -1
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/ActionIcon/type.d.mts +1 -0
- package/es/Alert/Alert.mjs +5 -5
- package/es/Alert/Alert.mjs.map +1 -1
- package/es/Alert/type.d.mts +1 -0
- package/es/Anchor/Anchor.mjs +2 -2
- package/es/Anchor/Anchor.mjs.map +1 -1
- package/es/AutoComplete/AutoComplete.mjs +5 -5
- package/es/AutoComplete/AutoComplete.mjs.map +1 -1
- package/es/AutoComplete/style.d.mts +1 -0
- package/es/AutoComplete/style.mjs +2 -2
- package/es/AutoComplete/style.mjs.map +1 -1
- package/es/AutoComplete/type.d.mts +1 -0
- package/es/Avatar/Avatar.mjs +2 -2
- package/es/Avatar/Avatar.mjs.map +1 -1
- package/es/Avatar/AvatarGroup/index.mjs +2 -2
- package/es/Avatar/AvatarGroup/index.mjs.map +1 -1
- package/es/Breadcrumb/Breadcrumb.mjs +2 -2
- package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/es/Button/Button.mjs +1 -1
- package/es/Button/Button.mjs.map +1 -1
- package/es/Button/style.d.mts +8 -1
- package/es/Button/style.mjs +41 -18
- package/es/Button/style.mjs.map +1 -1
- package/es/Button/type.d.mts +1 -0
- package/es/Carousel/Carousel.mjs +1 -1
- package/es/Carousel/Carousel.mjs.map +1 -1
- package/es/Checkbox/Checkbox.mjs +3 -3
- package/es/Checkbox/Checkbox.mjs.map +1 -1
- package/es/Checkbox/type.d.mts +1 -0
- package/es/CodeDiff/CodeDiff.mjs.map +1 -1
- package/es/CodeDiff/DiffPanel.mjs +6 -6
- package/es/CodeDiff/DiffPanel.mjs.map +1 -1
- package/es/CodeDiff/PatchDiff.mjs.map +1 -1
- package/es/CodeDiff/theme.mjs.map +1 -1
- package/es/CodeDiff/type.d.mts +2 -2
- package/es/CodeEditor/CodeEditor.mjs +5 -5
- package/es/CodeEditor/CodeEditor.mjs.map +1 -1
- package/es/ColorPicker/ColorInputs.mjs +136 -0
- package/es/ColorPicker/ColorInputs.mjs.map +1 -0
- package/es/ColorPicker/ColorPanel.mjs +145 -0
- package/es/ColorPicker/ColorPanel.mjs.map +1 -0
- package/es/ColorPicker/ColorPicker.mjs +63 -200
- package/es/ColorPicker/ColorPicker.mjs.map +1 -1
- package/es/ColorPicker/SaturationArea.mjs +2 -1
- package/es/ColorPicker/SaturationArea.mjs.map +1 -1
- package/es/ColorPicker/Swatch.mjs +24 -0
- package/es/ColorPicker/Swatch.mjs.map +1 -0
- package/es/ColorPicker/Swatches.mjs +66 -0
- package/es/ColorPicker/Swatches.mjs.map +1 -0
- package/es/ColorPicker/Trigger.mjs +112 -0
- package/es/ColorPicker/Trigger.mjs.map +1 -0
- package/es/ColorPicker/color.mjs +25 -1
- package/es/ColorPicker/color.mjs.map +1 -1
- package/es/ColorPicker/recent.mjs +25 -0
- package/es/ColorPicker/recent.mjs.map +1 -0
- package/es/ColorPicker/style.mjs +269 -70
- package/es/ColorPicker/style.mjs.map +1 -1
- package/es/ColorPicker/type.d.mts +15 -0
- package/es/ColorSwatches/ColorSwatches.mjs +18 -23
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ColorSwatches/CustomPicker.mjs +101 -0
- package/es/ColorSwatches/CustomPicker.mjs.map +1 -0
- package/es/ColorSwatches/index.d.mts +2 -2
- package/es/ColorSwatches/marker.stylex.mjs +9 -0
- package/es/ColorSwatches/marker.stylex.mjs.map +1 -0
- package/es/ColorSwatches/style.mjs +36 -0
- package/es/ColorSwatches/style.mjs.map +1 -1
- package/es/ColorSwatches/type.d.mts +12 -2
- package/es/ConfigProvider/cdnAssets.mjs +6 -0
- package/es/ConfigProvider/cdnAssets.mjs.map +1 -0
- package/es/ConfigProvider/index.mjs +2 -1
- package/es/ConfigProvider/index.mjs.map +1 -1
- package/es/ContextMenu/ContextMenuHost.mjs +2 -2
- package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
- package/es/ContextMenu/ContextMenuTrigger.mjs +2 -2
- package/es/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- package/es/ContextMenu/renderItems.mjs +3 -3
- package/es/ContextMenu/renderItems.mjs.map +1 -1
- package/es/ContextMenu/store.d.mts +0 -1
- package/es/ContextMenu/store.mjs.map +1 -1
- package/es/DatePicker/DatePicker.d.mts +9 -2
- package/es/DatePicker/DatePicker.mjs +15 -85
- package/es/DatePicker/DatePicker.mjs.map +1 -1
- package/es/DatePicker/DateRangePicker.d.mts +3 -2
- package/es/DatePicker/DateRangePicker.mjs +3 -125
- package/es/DatePicker/DateRangePicker.mjs.map +1 -1
- package/es/DatePicker/DayjsDatePicker.d.mts +12 -0
- package/es/DatePicker/DayjsDatePicker.mjs +19 -0
- package/es/DatePicker/DayjsDatePicker.mjs.map +1 -0
- package/es/DatePicker/DayjsDateRangePicker.d.mts +7 -0
- package/es/DatePicker/DayjsDateRangePicker.mjs +8 -0
- package/es/DatePicker/DayjsDateRangePicker.mjs.map +1 -0
- package/es/DatePicker/PurePanel.mjs +65 -0
- package/es/DatePicker/PurePanel.mjs.map +1 -0
- package/es/DatePicker/RangePicker.mjs +121 -0
- package/es/DatePicker/RangePicker.mjs.map +1 -0
- package/es/DatePicker/SinglePicker.mjs +134 -0
- package/es/DatePicker/SinglePicker.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +57 -0
- package/es/DatePicker/core/PickerInput/Popup/Footer.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs +57 -0
- package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Popup/PresetPanel.mjs +29 -0
- package/es/DatePicker/core/PickerInput/Popup/PresetPanel.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Popup/index.mjs +133 -0
- package/es/DatePicker/core/PickerInput/Popup/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/RangePicker.d.mts +51 -0
- package/es/DatePicker/core/PickerInput/RangePicker.mjs +343 -0
- package/es/DatePicker/core/PickerInput/RangePicker.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs +27 -0
- package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/Icon.mjs +19 -0
- package/es/DatePicker/core/PickerInput/Selector/Icon.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs +237 -0
- package/es/DatePicker/core/PickerInput/Selector/Input.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/MaskFormat.mjs +70 -0
- package/es/DatePicker/core/PickerInput/Selector/MaskFormat.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.d.mts +8 -0
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +136 -0
- package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs +28 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/MultipleDates.mjs +69 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/MultipleDates.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +111 -0
- package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useClearIcon.mjs +18 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useClearIcon.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs +108 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs +11 -0
- package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/Selector/util.mjs +20 -0
- package/es/DatePicker/core/PickerInput/Selector/util.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/SinglePicker.d.mts +55 -0
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs +318 -0
- package/es/DatePicker/core/PickerInput/SinglePicker.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/context.mjs +7 -0
- package/es/DatePicker/core/PickerInput/context.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs +30 -0
- package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useDelayState.mjs +37 -0
- package/es/DatePicker/core/PickerInput/hooks/useDelayState.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useDisabledBoundary.mjs +18 -0
- package/es/DatePicker/core/PickerInput/hooks/useDisabledBoundary.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs +20 -0
- package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs +31 -0
- package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs +98 -0
- package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs +41 -0
- package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs +34 -0
- package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs +35 -0
- package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useInputReadOnly.mjs +9 -0
- package/es/DatePicker/core/PickerInput/hooks/useInputReadOnly.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useInvalidate.mjs +36 -0
- package/es/DatePicker/core/PickerInput/hooks/useInvalidate.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs +27 -0
- package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useOpen.mjs +18 -0
- package/es/DatePicker/core/PickerInput/hooks/useOpen.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs +19 -0
- package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs +20 -0
- package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeDisabledDate.mjs +24 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeDisabledDate.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs +107 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs +144 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs +219 -0
- package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs.map +1 -0
- package/es/DatePicker/core/PickerInput/hooks/useShowNow.mjs +11 -0
- package/es/DatePicker/core/PickerInput/hooks/useShowNow.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/DatePanel/index.mjs +131 -0
- package/es/DatePicker/core/PickerPanel/DatePanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/DateTimePanel/index.mjs +35 -0
- package/es/DatePicker/core/PickerPanel/DateTimePanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/DecadePanel/index.mjs +84 -0
- package/es/DatePicker/core/PickerPanel/DecadePanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/MonthPanel/index.mjs +73 -0
- package/es/DatePicker/core/PickerPanel/MonthPanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/PanelBody.mjs +95 -0
- package/es/DatePicker/core/PickerPanel/PanelBody.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/PanelHeader.mjs +130 -0
- package/es/DatePicker/core/PickerPanel/PanelHeader.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/QuarterPanel/index.mjs +64 -0
- package/es/DatePicker/core/PickerPanel/QuarterPanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs +108 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/geometry.mjs +44 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/geometry.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +157 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs +100 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +71 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs +62 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs +200 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/util.mjs +25 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/util.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/index.mjs +31 -0
- package/es/DatePicker/core/PickerPanel/TimePanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/WeekPanel/index.mjs +34 -0
- package/es/DatePicker/core/PickerPanel/WeekPanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/YearPanel/index.mjs +92 -0
- package/es/DatePicker/core/PickerPanel/YearPanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/context.mjs +48 -0
- package/es/DatePicker/core/PickerPanel/context.mjs.map +1 -0
- package/es/DatePicker/core/PickerPanel/index.d.mts +1 -0
- package/es/DatePicker/core/PickerPanel/index.mjs +175 -0
- package/es/DatePicker/core/PickerPanel/index.mjs.map +1 -0
- package/es/DatePicker/core/PickerPopup.mjs +118 -0
- package/es/DatePicker/core/PickerPopup.mjs.map +1 -0
- package/es/DatePicker/core/generate/dayjs.mjs +109 -0
- package/es/DatePicker/core/generate/dayjs.mjs.map +1 -0
- package/es/DatePicker/core/generate/index.d.mts +40 -0
- package/es/DatePicker/core/hooks/react.mjs +58 -0
- package/es/DatePicker/core/hooks/react.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useLocale.mjs +51 -0
- package/es/DatePicker/core/hooks/useLocale.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useSemantic.mjs +20 -0
- package/es/DatePicker/core/hooks/useSemantic.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useSyncState.mjs +25 -0
- package/es/DatePicker/core/hooks/useSyncState.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useTimeConfig.mjs +173 -0
- package/es/DatePicker/core/hooks/useTimeConfig.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useTimeInfo.mjs +110 -0
- package/es/DatePicker/core/hooks/useTimeInfo.mjs.map +1 -0
- package/es/DatePicker/core/hooks/useToggleDates.mjs +21 -0
- package/es/DatePicker/core/hooks/useToggleDates.mjs.map +1 -0
- package/es/DatePicker/core/index.d.mts +5 -0
- package/es/DatePicker/core/index.mjs +9 -0
- package/es/DatePicker/core/index.mjs.map +1 -0
- package/es/DatePicker/core/interface.d.mts +325 -0
- package/es/DatePicker/core/locale/common.mjs +11 -0
- package/es/DatePicker/core/locale/common.mjs.map +1 -0
- package/es/DatePicker/core/locale/en_US.mjs +39 -0
- package/es/DatePicker/core/locale/en_US.mjs.map +1 -0
- package/es/DatePicker/core/utils/common.mjs +73 -0
- package/es/DatePicker/core/utils/common.mjs.map +1 -0
- package/es/DatePicker/core/utils/dateUtil.mjs +106 -0
- package/es/DatePicker/core/utils/dateUtil.mjs.map +1 -0
- package/es/DatePicker/core/utils/miscUtil.mjs +46 -0
- package/es/DatePicker/core/utils/miscUtil.mjs.map +1 -0
- package/es/DatePicker/core/utils/uiUtil.mjs +9 -0
- package/es/DatePicker/core/utils/uiUtil.mjs.map +1 -0
- package/es/DatePicker/dateGenerateConfig.mjs +52 -0
- package/es/DatePicker/dateGenerateConfig.mjs.map +1 -0
- package/es/DatePicker/generateConfig.mjs +12 -0
- package/es/DatePicker/generateConfig.mjs.map +1 -0
- package/es/DatePicker/generatePicker.d.mts +12 -0
- package/es/DatePicker/generatePicker.mjs +22 -0
- package/es/DatePicker/generatePicker.mjs.map +1 -0
- package/es/DatePicker/index.d.mts +8 -3
- package/es/DatePicker/index.mjs +5 -1
- package/es/DatePicker/legacyDate.mjs +58 -0
- package/es/DatePicker/legacyDate.mjs.map +1 -0
- package/es/DatePicker/locale.d.mts +15 -0
- package/es/DatePicker/locale.mjs +143 -0
- package/es/DatePicker/locale.mjs.map +1 -0
- package/es/DatePicker/semantic.mjs +29 -0
- package/es/DatePicker/semantic.mjs.map +1 -0
- package/es/DatePicker/style.mjs +3 -155
- package/es/DatePicker/style.mjs.map +1 -1
- package/es/DatePicker/type.d.mts +294 -27
- package/es/DatePicker/usePanelKeyboard.mjs +230 -0
- package/es/DatePicker/usePanelKeyboard.mjs.map +1 -0
- package/es/DatePicker/usePickerShared.mjs +106 -0
- package/es/DatePicker/usePickerShared.mjs.map +1 -0
- package/es/DatePicker/usePresetActive.mjs +49 -0
- package/es/DatePicker/usePresetActive.mjs.map +1 -0
- package/es/DraggablePanel/atoms.mjs +6 -6
- package/es/DraggablePanel/atoms.mjs.map +1 -1
- package/es/DraggableSideNav/DraggableSideNav.mjs +5 -5
- package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
- package/es/Drawer/Drawer.mjs +2 -2
- package/es/Drawer/Drawer.mjs.map +1 -1
- package/es/Drawer/atoms.d.mts +1 -0
- package/es/Drawer/atoms.mjs +7 -7
- package/es/Drawer/atoms.mjs.map +1 -1
- package/es/Drawer/constants.d.mts +1 -0
- package/es/Drawer/style.mjs.map +1 -1
- package/es/DropdownMenu/atoms.mjs +23 -23
- package/es/DropdownMenu/atoms.mjs.map +1 -1
- package/es/DropdownMenu/sharedStyle.mjs +2 -2
- package/es/DropdownMenu/sharedStyle.mjs.map +1 -1
- package/es/EditableText/ControlInput.mjs +42 -29
- package/es/EditableText/ControlInput.mjs.map +1 -1
- package/es/EditableText/EditableText.mjs +2 -2
- package/es/EditableText/EditableText.mjs.map +1 -1
- package/es/EditorSlashMenu/atoms.mjs +12 -12
- package/es/EditorSlashMenu/atoms.mjs.map +1 -1
- package/es/EmojiPicker/EmojiPicker.mjs +10 -16
- package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
- package/es/EmojiPicker/loadEmojiData.mjs +6 -0
- package/es/EmojiPicker/loadEmojiData.mjs.map +1 -0
- package/es/EmojiPicker/useEmojiMartI18n.mjs +37 -0
- package/es/EmojiPicker/useEmojiMartI18n.mjs.map +1 -0
- package/es/FileTypeIcon/type.d.mts +1 -0
- package/es/FloatingPanel/FloatingPanel.mjs +2 -2
- package/es/FloatingPanel/FloatingPanel.mjs.map +1 -1
- package/es/FloatingPanel/style.mjs +3 -2
- package/es/FloatingPanel/style.mjs.map +1 -1
- package/es/Form/Form.mjs +6 -2
- package/es/Form/Form.mjs.map +1 -1
- package/es/Form/style.mjs +3 -3
- package/es/Form/style.mjs.map +1 -1
- package/es/Form/type.d.mts +8 -0
- package/es/FormKit/List.mjs +2 -2
- package/es/FormKit/List.mjs.map +1 -1
- package/es/FormKit/engine/tanstack.mjs +1 -1
- package/es/FormKit/engine/tanstack.mjs.map +1 -1
- package/es/Grid/style.mjs +1 -1
- package/es/Grid/style.mjs.map +1 -1
- package/es/GroupAvatar/type.d.mts +1 -0
- package/es/Highlighter/FullFeatured.mjs +2 -2
- package/es/Highlighter/FullFeatured.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs +2 -2
- package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs.map +1 -1
- package/es/Highlighter/SyntaxHighlighter/index.mjs +4 -4
- package/es/Highlighter/SyntaxHighlighter/index.mjs.map +1 -1
- package/es/Highlighter/const.d.mts +1 -0
- package/es/Highlighter/style.mjs +2 -2
- package/es/Highlighter/style.mjs.map +1 -1
- package/es/HotkeyInput/HotkeyInput.mjs +1 -1
- package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
- package/es/HtmlPreview/HtmlPreview.mjs +2 -2
- package/es/HtmlPreview/HtmlPreview.mjs.map +1 -1
- package/es/Icon/Icon.mjs +2 -2
- package/es/Icon/Icon.mjs.map +1 -1
- package/es/Image/type.d.mts +1 -0
- package/es/Image/viewer/ImageViewer.mjs +2 -1
- package/es/Image/viewer/ImageViewer.mjs.map +1 -1
- package/es/Image/viewer/Toolbar.mjs +19 -6
- package/es/Image/viewer/Toolbar.mjs.map +1 -1
- package/es/Image/viewer/ViewerChrome.mjs.map +1 -1
- package/es/ImageSelect/ImageSelect.mjs +1 -1
- package/es/ImageSelect/ImageSelect.mjs.map +1 -1
- package/es/Input/Input.mjs +7 -5
- package/es/Input/Input.mjs.map +1 -1
- package/es/Input/TextArea.mjs +1 -1
- package/es/Input/TextArea.mjs.map +1 -1
- package/es/Input/style.d.mts +1 -0
- package/es/Input/style.mjs +3 -3
- package/es/Input/style.mjs.map +1 -1
- package/es/Input/type.d.mts +1 -0
- package/es/List/ListRow.mjs +3 -3
- package/es/List/ListRow.mjs.map +1 -1
- package/es/Markdown/Markdown.mjs +2 -2
- package/es/Markdown/Markdown.mjs.map +1 -1
- package/es/Markdown/Typography.mjs +2 -2
- package/es/Markdown/Typography.mjs.map +1 -1
- package/es/Markdown/plugins/remarkColor.d.mts +1 -0
- package/es/Markdown/plugins/remarkGfmPlus.d.mts +1 -0
- package/es/Markdown/plugins/remarkVideo.d.mts +1 -0
- package/es/Mermaid/FullFeatured.mjs +2 -2
- package/es/Mermaid/FullFeatured.mjs.map +1 -1
- package/es/Mermaid/SyntaxMermaid/index.mjs +4 -4
- package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
- package/es/Mermaid/const.d.mts +1 -0
- package/es/Modal/atoms.d.mts +1 -0
- package/es/Modal/atoms.mjs +8 -8
- package/es/Modal/atoms.mjs.map +1 -1
- package/es/Modal/constants.d.mts +1 -0
- package/es/Modal/type.d.mts +1 -0
- package/es/Pagination/Pagination.mjs +182 -42
- package/es/Pagination/Pagination.mjs.map +1 -1
- package/es/Pagination/helpers.mjs +3 -3
- package/es/Pagination/helpers.mjs.map +1 -1
- package/es/Pagination/index.d.mts +2 -2
- package/es/Pagination/marker.stylex.mjs +9 -0
- package/es/Pagination/marker.stylex.mjs.map +1 -0
- package/es/Pagination/style.mjs +74 -4
- package/es/Pagination/style.mjs.map +1 -1
- package/es/Pagination/type.d.mts +41 -3
- package/es/Popover/PopoverInGroup.mjs +3 -3
- package/es/Popover/PopoverInGroup.mjs.map +1 -1
- package/es/Popover/atoms.mjs +7 -7
- package/es/Popover/atoms.mjs.map +1 -1
- package/es/Popover/style.mjs +1 -1
- package/es/Popover/style.mjs.map +1 -1
- package/es/ProTable/ProTable.d.mts +11 -0
- package/es/ProTable/ProTable.mjs +208 -0
- package/es/ProTable/ProTable.mjs.map +1 -0
- package/es/ProTable/hooks/useColumnRequest.mjs +55 -0
- package/es/ProTable/hooks/useColumnRequest.mjs.map +1 -0
- package/es/ProTable/hooks/useColumnsState.mjs +37 -0
- package/es/ProTable/hooks/useColumnsState.mjs.map +1 -0
- package/es/ProTable/hooks/useDelayedFlag.mjs +18 -0
- package/es/ProTable/hooks/useDelayedFlag.mjs.map +1 -0
- package/es/ProTable/hooks/useDensity.mjs +15 -0
- package/es/ProTable/hooks/useDensity.mjs.map +1 -0
- package/es/ProTable/hooks/useFetchData.mjs +97 -0
- package/es/ProTable/hooks/useFetchData.mjs.map +1 -0
- package/es/ProTable/hooks/useFullscreen.mjs +22 -0
- package/es/ProTable/hooks/useFullscreen.mjs.map +1 -0
- package/es/ProTable/hooks/usePageInfo.mjs +35 -0
- package/es/ProTable/hooks/usePageInfo.mjs.map +1 -0
- package/es/ProTable/hooks/useProColumns.mjs +123 -0
- package/es/ProTable/hooks/useProColumns.mjs.map +1 -0
- package/es/ProTable/hooks/useProLoading.mjs +19 -0
- package/es/ProTable/hooks/useProLoading.mjs.map +1 -0
- package/es/ProTable/hooks/useProLocale.mjs +22 -0
- package/es/ProTable/hooks/useProLocale.mjs.map +1 -0
- package/es/ProTable/hooks/useProRequest.mjs +137 -0
- package/es/ProTable/hooks/useProRequest.mjs.map +1 -0
- package/es/ProTable/hooks/useRowCache.mjs +11 -0
- package/es/ProTable/hooks/useRowCache.mjs.map +1 -0
- package/es/ProTable/hooks/useSearchForm.mjs +141 -0
- package/es/ProTable/hooks/useSearchForm.mjs.map +1 -0
- package/es/ProTable/hooks/useTableBindings.mjs +39 -0
- package/es/ProTable/hooks/useTableBindings.mjs.map +1 -0
- package/es/ProTable/hooks/useTableSelection.mjs +14 -0
- package/es/ProTable/hooks/useTableSelection.mjs.map +1 -0
- package/es/ProTable/index.d.mts +4 -0
- package/es/ProTable/index.d.ts +1 -0
- package/es/ProTable/index.js +1 -0
- package/es/ProTable/index.mjs +3 -0
- package/es/ProTable/locale.d.mts +15 -0
- package/es/ProTable/locale.mjs +66 -0
- package/es/ProTable/locale.mjs.map +1 -0
- package/es/ProTable/parts/ColumnSetting.mjs +155 -0
- package/es/ProTable/parts/ColumnSetting.mjs.map +1 -0
- package/es/ProTable/parts/FieldControl.mjs +134 -0
- package/es/ProTable/parts/FieldControl.mjs.map +1 -0
- package/es/ProTable/parts/KeywordInput.mjs +19 -0
- package/es/ProTable/parts/KeywordInput.mjs.map +1 -0
- package/es/ProTable/parts/LightFilter.mjs +70 -0
- package/es/ProTable/parts/LightFilter.mjs.map +1 -0
- package/es/ProTable/parts/OptionPopover.mjs +17 -0
- package/es/ProTable/parts/OptionPopover.mjs.map +1 -0
- package/es/ProTable/parts/SearchForm.mjs +180 -0
- package/es/ProTable/parts/SearchForm.mjs.map +1 -0
- package/es/ProTable/parts/SearchSection.mjs +33 -0
- package/es/ProTable/parts/SearchSection.mjs.map +1 -0
- package/es/ProTable/parts/TableAlert.mjs +38 -0
- package/es/ProTable/parts/TableAlert.mjs.map +1 -0
- package/es/ProTable/parts/Toolbar.mjs +50 -0
- package/es/ProTable/parts/Toolbar.mjs.map +1 -0
- package/es/ProTable/parts/ToolbarOptions.mjs +103 -0
- package/es/ProTable/parts/ToolbarOptions.mjs.map +1 -0
- package/es/ProTable/parts/renderValue.mjs +118 -0
- package/es/ProTable/parts/renderValue.mjs.map +1 -0
- package/es/ProTable/style.mjs +287 -0
- package/es/ProTable/style.mjs.map +1 -0
- package/es/ProTable/type.d.mts +400 -0
- package/es/ProTable/utils.mjs +152 -0
- package/es/ProTable/utils.mjs.map +1 -0
- package/es/Radio/Radio.mjs +3 -3
- package/es/Radio/Radio.mjs.map +1 -1
- package/es/Radio/type.d.mts +1 -0
- package/es/Rate/Rate.mjs +1 -1
- package/es/Rate/Rate.mjs.map +1 -1
- package/es/ScrollArea/atoms.mjs +4 -4
- package/es/ScrollArea/atoms.mjs.map +1 -1
- package/es/ScrollShadow/ScrollShadow.mjs +1 -1
- package/es/ScrollShadow/ScrollShadow.mjs.map +1 -1
- package/es/SearchBar/SearchBar.mjs +31 -25
- package/es/SearchBar/SearchBar.mjs.map +1 -1
- package/es/Segmented/Segmented.mjs +4 -4
- package/es/Segmented/Segmented.mjs.map +1 -1
- package/es/Segmented/atoms.d.mts +1 -0
- package/es/Segmented/atoms.mjs +2 -2
- package/es/Segmented/atoms.mjs.map +1 -1
- package/es/Select/Select.mjs +22 -13
- package/es/Select/Select.mjs.map +1 -1
- package/es/Select/atoms.mjs +5 -5
- package/es/Select/atoms.mjs.map +1 -1
- package/es/Select/helpers.mjs +8 -1
- package/es/Select/helpers.mjs.map +1 -1
- package/es/Select/hooks.mjs +8 -4
- package/es/Select/hooks.mjs.map +1 -1
- package/es/Select/renderOptions.mjs +2 -2
- package/es/Select/renderOptions.mjs.map +1 -1
- package/es/Select/type.d.mts +7 -0
- package/es/Slider/type.d.mts +1 -0
- package/es/Switch/Switch.mjs +9 -2
- package/es/Switch/Switch.mjs.map +1 -1
- package/es/Switch/atoms.d.mts +8 -1
- package/es/Switch/atoms.mjs +23 -7
- package/es/Switch/atoms.mjs.map +1 -1
- package/es/Switch/style.mjs +33 -2
- package/es/Switch/style.mjs.map +1 -1
- package/es/Table/Column.d.mts +8 -0
- package/es/Table/Column.mjs +6 -0
- package/es/Table/Column.mjs.map +1 -0
- package/es/Table/ColumnGroup.d.mts +11 -0
- package/es/Table/ColumnGroup.mjs +6 -0
- package/es/Table/ColumnGroup.mjs.map +1 -0
- package/es/Table/Table.d.mts +16 -2
- package/es/Table/Table.mjs +158 -118
- package/es/Table/Table.mjs.map +1 -1
- package/es/Table/atoms/cells.d.mts +42 -0
- package/es/Table/atoms/cells.mjs +72 -0
- package/es/Table/atoms/cells.mjs.map +1 -0
- package/es/Table/atoms/index.d.mts +3 -0
- package/es/Table/atoms/layout.d.mts +44 -0
- package/es/Table/atoms/layout.mjs +62 -0
- package/es/Table/atoms/layout.mjs.map +1 -0
- package/es/Table/constants.mjs +16 -0
- package/es/Table/constants.mjs.map +1 -0
- package/es/Table/engine/fixed.d.mts +1 -0
- package/es/Table/engine/fixed.mjs +53 -0
- package/es/Table/engine/fixed.mjs.map +1 -0
- package/es/Table/engine/types.d.mts +1 -0
- package/es/Table/engine/useTableEngine.mjs +180 -0
- package/es/Table/engine/useTableEngine.mjs.map +1 -0
- package/es/Table/index.d.mts +7 -2
- package/es/Table/index.mjs +4 -1
- package/es/Table/internal.d.mts +3 -0
- package/es/Table/pipeline/columnUtils.d.mts +5 -0
- package/es/Table/pipeline/columnUtils.mjs +58 -0
- package/es/Table/pipeline/columnUtils.mjs.map +1 -0
- package/es/Table/pipeline/convertChildrenToColumns.mjs +24 -0
- package/es/Table/pipeline/convertChildrenToColumns.mjs.map +1 -0
- package/es/Table/pipeline/normalizeColumns.mjs +140 -0
- package/es/Table/pipeline/normalizeColumns.mjs.map +1 -0
- package/es/Table/pipeline/selectionUtils.d.mts +9 -0
- package/es/Table/pipeline/selectionUtils.mjs +115 -0
- package/es/Table/pipeline/selectionUtils.mjs.map +1 -0
- package/es/Table/pipeline/useBreakpoint.mjs +36 -0
- package/es/Table/pipeline/useBreakpoint.mjs.map +1 -0
- package/es/Table/pipeline/useExpandable.mjs +45 -0
- package/es/Table/pipeline/useExpandable.mjs.map +1 -0
- package/es/Table/pipeline/useFilter.mjs +52 -0
- package/es/Table/pipeline/useFilter.mjs.map +1 -0
- package/es/Table/pipeline/useSelection.mjs +302 -0
- package/es/Table/pipeline/useSelection.mjs.map +1 -0
- package/es/Table/pipeline/useSorter.mjs +146 -0
- package/es/Table/pipeline/useSorter.mjs.map +1 -0
- package/es/Table/pipeline/useTableLocale.mjs +30 -0
- package/es/Table/pipeline/useTableLocale.mjs.map +1 -0
- package/es/Table/pipeline/useTableState.mjs +118 -0
- package/es/Table/pipeline/useTableState.mjs.map +1 -0
- package/es/Table/pipeline/useVirtualLayout.mjs +80 -0
- package/es/Table/pipeline/useVirtualLayout.mjs.map +1 -0
- package/es/Table/render/Body.mjs +150 -0
- package/es/Table/render/Body.mjs.map +1 -0
- package/es/Table/render/BodyCell.mjs +87 -0
- package/es/Table/render/BodyCell.mjs.map +1 -0
- package/es/Table/render/CellShell.mjs +84 -0
- package/es/Table/render/CellShell.mjs.map +1 -0
- package/es/Table/render/ExpandIcon.mjs +28 -0
- package/es/Table/render/ExpandIcon.mjs.map +1 -0
- package/es/Table/render/FilterDropdown.mjs +139 -0
- package/es/Table/render/FilterDropdown.mjs.map +1 -0
- package/es/Table/render/FilterPanel.mjs +152 -0
- package/es/Table/render/FilterPanel.mjs.map +1 -0
- package/es/Table/render/FixedFrost.mjs +122 -0
- package/es/Table/render/FixedFrost.mjs.map +1 -0
- package/es/Table/render/FixedHolder.mjs +51 -0
- package/es/Table/render/FixedHolder.mjs.map +1 -0
- package/es/Table/render/Header.mjs +184 -0
- package/es/Table/render/Header.mjs.map +1 -0
- package/es/Table/render/LoadingSkeleton.mjs +78 -0
- package/es/Table/render/LoadingSkeleton.mjs.map +1 -0
- package/es/Table/render/PaginationBar.mjs +71 -0
- package/es/Table/render/PaginationBar.mjs.map +1 -0
- package/es/Table/render/SelectionCells.mjs +111 -0
- package/es/Table/render/SelectionCells.mjs.map +1 -0
- package/es/Table/render/StickyScrollBar.mjs +99 -0
- package/es/Table/render/StickyScrollBar.mjs.map +1 -0
- package/es/Table/render/Summary.d.mts +16 -0
- package/es/Table/render/Summary.mjs +58 -0
- package/es/Table/render/Summary.mjs.map +1 -0
- package/es/Table/render/TableView.mjs +215 -0
- package/es/Table/render/TableView.mjs.map +1 -0
- package/es/Table/render/VirtualBody.mjs +101 -0
- package/es/Table/render/VirtualBody.mjs.map +1 -0
- package/es/Table/render/context.mjs +15 -0
- package/es/Table/render/context.mjs.map +1 -0
- package/es/Table/render/filterUtils.mjs +22 -0
- package/es/Table/render/filterUtils.mjs.map +1 -0
- package/es/Table/render/tableHelpers.mjs +27 -0
- package/es/Table/render/tableHelpers.mjs.map +1 -0
- package/es/Table/render/useColGroups.mjs +23 -0
- package/es/Table/render/useColGroups.mjs.map +1 -0
- package/es/Table/render/useScrollSync.mjs +104 -0
- package/es/Table/render/useScrollSync.mjs.map +1 -0
- package/es/Table/render/useViewContexts.mjs +134 -0
- package/es/Table/render/useViewContexts.mjs.map +1 -0
- package/es/Table/semantic.mjs +45 -0
- package/es/Table/semantic.mjs.map +1 -0
- package/es/Table/store/createTableStore.d.mts +1 -0
- package/es/Table/store/createTableStore.mjs +40 -0
- package/es/Table/store/createTableStore.mjs.map +1 -0
- package/es/Table/store/hooks.mjs +24 -0
- package/es/Table/store/hooks.mjs.map +1 -0
- package/es/Table/style.mjs +179 -90
- package/es/Table/style.mjs.map +1 -1
- package/es/Table/type.d.mts +467 -37
- package/es/Table/useTableController.mjs +293 -0
- package/es/Table/useTableController.mjs.map +1 -0
- package/es/Tabs/Tabs.mjs +37 -23
- package/es/Tabs/Tabs.mjs.map +1 -1
- package/es/Tabs/atoms.mjs +2 -2
- package/es/Tabs/atoms.mjs.map +1 -1
- package/es/Tabs/style.d.mts +1 -1
- package/es/Tag/Tag.mjs +2 -2
- package/es/Tag/Tag.mjs.map +1 -1
- package/es/Text/Text.mjs +2 -2
- package/es/Text/Text.mjs.map +1 -1
- package/es/Text/style.d.mts +1 -0
- package/es/Text/style.mjs +3 -3
- package/es/Text/style.mjs.map +1 -1
- package/es/Toast/dodge.mjs +0 -1
- package/es/Toast/dodge.mjs.map +1 -1
- package/es/Toast/dodge.stylex.mjs +1 -4
- package/es/Toast/dodge.stylex.mjs.map +1 -1
- package/es/Toast/style.mjs +1 -1
- package/es/Toast/style.mjs.map +1 -1
- package/es/ToggleGroup/ToggleGroup.mjs +4 -4
- package/es/ToggleGroup/ToggleGroup.mjs.map +1 -1
- package/es/ToggleGroup/atoms.d.mts +1 -0
- package/es/ToggleGroup/atoms.mjs +2 -2
- package/es/ToggleGroup/atoms.mjs.map +1 -1
- package/es/Tooltip/TooltipGroup.mjs +3 -3
- package/es/Tooltip/TooltipGroup.mjs.map +1 -1
- package/es/Tooltip/TooltipInGroup.mjs +1 -1
- package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
- package/es/Tooltip/TooltipStandalone.mjs +4 -4
- package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
- package/es/Tooltip/style.mjs +2 -2
- package/es/Tooltip/style.mjs.map +1 -1
- package/es/Tree/Tree.mjs +3 -3
- package/es/Tree/Tree.mjs.map +1 -1
- package/es/Tree/TreeNode.mjs +2 -2
- package/es/Tree/TreeNode.mjs.map +1 -1
- package/es/Video/Video.mjs +46 -0
- package/es/Video/Video.mjs.map +1 -0
- package/es/Video/context.mjs +14 -0
- package/es/Video/context.mjs.map +1 -0
- package/es/Video/index.d.mts +23 -39
- package/es/Video/index.mjs +21 -111
- package/es/Video/index.mjs.map +1 -1
- package/es/Video/parts/Caption.d.mts +9 -0
- package/es/Video/parts/Caption.mjs +37 -0
- package/es/Video/parts/Caption.mjs.map +1 -0
- package/es/Video/parts/CenterPlay.d.mts +8 -0
- package/es/Video/parts/CenterPlay.mjs +34 -0
- package/es/Video/parts/CenterPlay.mjs.map +1 -0
- package/es/Video/parts/Controls.d.mts +9 -0
- package/es/Video/parts/Controls.mjs +128 -0
- package/es/Video/parts/Controls.mjs.map +1 -0
- package/es/Video/parts/Frame.d.mts +9 -0
- package/es/Video/parts/Frame.mjs +101 -0
- package/es/Video/parts/Frame.mjs.map +1 -0
- package/es/Video/parts/HoverPreview.mjs +93 -0
- package/es/Video/parts/HoverPreview.mjs.map +1 -0
- package/es/Video/parts/LoadError.d.mts +8 -0
- package/es/Video/parts/LoadError.mjs +47 -0
- package/es/Video/parts/LoadError.mjs.map +1 -0
- package/es/Video/parts/PlayPauseIcon.mjs +48 -0
- package/es/Video/parts/PlayPauseIcon.mjs.map +1 -0
- package/es/Video/parts/RateMenu.mjs +48 -0
- package/es/Video/parts/RateMenu.mjs.map +1 -0
- package/es/Video/parts/Root.d.mts +9 -0
- package/es/Video/parts/Root.mjs +110 -0
- package/es/Video/parts/Root.mjs.map +1 -0
- package/es/Video/parts/SectionList.d.mts +9 -0
- package/es/Video/parts/SectionList.mjs +32 -0
- package/es/Video/parts/SectionList.mjs.map +1 -0
- package/es/Video/parts/SectionMenu.mjs +63 -0
- package/es/Video/parts/SectionMenu.mjs.map +1 -0
- package/es/Video/parts/Timeline.d.mts +9 -0
- package/es/Video/parts/Timeline.mjs +169 -0
- package/es/Video/parts/Timeline.mjs.map +1 -0
- package/es/Video/store.mjs +241 -0
- package/es/Video/store.mjs.map +1 -0
- package/es/Video/style.mjs +393 -23
- package/es/Video/style.mjs.map +1 -1
- package/es/Video/time.mjs +60 -0
- package/es/Video/time.mjs.map +1 -0
- package/es/Video/type.d.mts +125 -0
- package/es/Video/useControlsIdle.mjs +39 -0
- package/es/Video/useControlsIdle.mjs.map +1 -0
- package/es/Video/useFullscreen.mjs +17 -0
- package/es/Video/useFullscreen.mjs.map +1 -0
- package/es/Video/useKeyboard.mjs +60 -0
- package/es/Video/useKeyboard.mjs.map +1 -0
- package/es/Video/useVideo.d.mts +9 -0
- package/es/Video/useVideo.mjs +17 -0
- package/es/Video/useVideo.mjs.map +1 -0
- package/es/awesome/Features/FeatureItem.mjs +2 -2
- package/es/awesome/Features/FeatureItem.mjs.map +1 -1
- package/es/awesome/Giscus/style.mjs +9 -9
- package/es/awesome/Giscus/style.mjs.map +1 -1
- package/es/awesome/Grainient/Grainient.d.mts +11 -0
- package/es/awesome/Grainient/Grainient.mjs +314 -0
- package/es/awesome/Grainient/Grainient.mjs.map +1 -0
- package/es/awesome/Grainient/index.d.mts +3 -0
- package/es/awesome/Grainient/style.mjs +23 -0
- package/es/awesome/Grainient/style.mjs.map +1 -0
- package/es/awesome/Grainient/type.d.mts +121 -0
- package/es/awesome/GridBackground/GridBackground.mjs +1 -1
- package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
- package/es/awesome/GridBackground/GridShowcase.mjs +4 -4
- package/es/awesome/GridBackground/GridShowcase.mjs.map +1 -1
- package/es/awesome/Hero/Hero.mjs +3 -3
- package/es/awesome/Hero/Hero.mjs.map +1 -1
- package/es/awesome/InstallBanner/InstallBanner.mjs +2 -2
- package/es/awesome/InstallBanner/InstallBanner.mjs.map +1 -1
- package/es/awesome/LandingHero/LandingHero.mjs +3 -3
- package/es/awesome/LandingHero/LandingHero.mjs.map +1 -1
- package/es/awesome/LogoMarquee/LogoMarquee.mjs +2 -2
- package/es/awesome/LogoMarquee/LogoMarquee.mjs.map +1 -1
- package/es/awesome/Spline/ParentSize.mjs +1 -1
- package/es/awesome/Spline/ParentSize.mjs.map +1 -1
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs +4 -4
- package/es/awesome/TypewriterEffect/TypewriterEffect.mjs.map +1 -1
- package/es/awesome/index.d.mts +4 -1
- package/es/awesome/index.mjs +2 -1
- package/es/awesome/landingActions.mjs +2 -2
- package/es/awesome/landingActions.mjs.map +1 -1
- package/es/chat/BackBottom/BackBottom.mjs +1 -1
- package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
- package/es/chat/BackBottom/type.d.mts +2 -2
- package/es/chat/ChatItem/ChatItem.mjs +2 -2
- package/es/chat/ChatItem/ChatItem.mjs.map +1 -1
- package/es/chat/EditableMessage/EditableMessage.mjs +4 -4
- package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
- package/es/chat/EditableMessageList/EditableMessageList.mjs +2 -2
- package/es/chat/EditableMessageList/EditableMessageList.mjs.map +1 -1
- package/es/chat/EditableMessageList/messageReducer.mjs +30 -23
- package/es/chat/EditableMessageList/messageReducer.mjs.map +1 -1
- package/es/chat/MessageInput/MessageInput.mjs +3 -3
- package/es/chat/MessageInput/MessageInput.mjs.map +1 -1
- package/es/chat/MessageModal/MessageModal.mjs +1 -1
- package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
- package/es/chat/TokenTag/TokenTag.mjs +2 -3
- package/es/chat/TokenTag/TokenTag.mjs.map +1 -1
- package/es/color/index.d.mts +2 -1
- package/es/color/index.mjs +2 -1
- package/es/color/status/error.mjs +67 -0
- package/es/color/status/error.mjs.map +1 -0
- package/es/color/status/index.d.mts +11 -0
- package/es/color/status/index.mjs +15 -0
- package/es/color/status/index.mjs.map +1 -0
- package/es/color/status/info.mjs +67 -0
- package/es/color/status/info.mjs.map +1 -0
- package/es/color/status/success.mjs +67 -0
- package/es/color/status/success.mjs.map +1 -0
- package/es/color/status/warning.mjs +67 -0
- package/es/color/status/warning.mjs.map +1 -0
- package/es/color/types.d.mts +1 -0
- package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
- package/es/dashboard/AuthLayout/Aside.mjs +31 -0
- package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +97 -37
- package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
- package/es/dashboard/AuthLayout/index.d.mts +3 -2
- package/es/dashboard/AuthLayout/style.mjs +109 -1
- package/es/dashboard/AuthLayout/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/type.d.mts +38 -2
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +33 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/index.d.mts +4 -0
- package/es/dashboard/AuthTools/style.mjs +27 -0
- package/es/dashboard/AuthTools/style.mjs.map +1 -0
- package/es/dashboard/AuthTools/type.d.mts +29 -0
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +19 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
- package/es/dashboard/ChartGrid/index.d.mts +3 -0
- package/es/dashboard/ChartGrid/style.mjs +18 -0
- package/es/dashboard/ChartGrid/style.mjs.map +1 -0
- package/es/dashboard/ChartGrid/type.d.mts +8 -0
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs +3 -3
- package/es/dashboard/ConsoleNav/ConsoleNav.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs +82 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/index.d.mts +3 -2
- package/es/dashboard/ConsoleNav/style.mjs +20 -2
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/type.d.mts +13 -0
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +26 -6
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +11 -1
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/type.d.mts +11 -0
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
- package/es/dashboard/FilterSidebar/style.mjs +2 -2
- package/es/dashboard/FilterSidebar/style.mjs.map +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
- package/es/dashboard/FilterStrip/index.d.mts +3 -0
- package/es/dashboard/FilterStrip/style.mjs +78 -0
- package/es/dashboard/FilterStrip/style.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +25 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
- package/es/dashboard/LabelWithKey/index.d.mts +3 -0
- package/es/dashboard/LabelWithKey/type.d.mts +11 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs +92 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
- package/es/dashboard/MetricStrip/index.d.mts +3 -0
- package/es/dashboard/MetricStrip/style.mjs +169 -0
- package/es/dashboard/MetricStrip/style.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +38 -0
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/style.mjs +2 -1
- package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
- package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs +22 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
- package/es/dashboard/PageToolbar/index.d.mts +3 -0
- package/es/dashboard/PageToolbar/style.mjs +36 -0
- package/es/dashboard/PageToolbar/style.mjs.map +1 -0
- package/es/dashboard/PageToolbar/type.d.mts +11 -0
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +40 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
- package/es/dashboard/PanelSurface/index.d.mts +3 -0
- package/es/dashboard/PanelSurface/style.mjs +25 -0
- package/es/dashboard/PanelSurface/style.mjs.map +1 -0
- package/es/dashboard/PanelSurface/type.d.mts +17 -0
- package/es/dashboard/Section/Section.d.mts +10 -0
- package/es/dashboard/Section/Section.mjs +81 -0
- package/es/dashboard/Section/Section.mjs.map +1 -0
- package/es/dashboard/Section/index.d.mts +3 -0
- package/es/dashboard/Section/style.mjs +31 -0
- package/es/dashboard/Section/style.mjs.map +1 -0
- package/es/dashboard/Section/type.d.mts +23 -0
- package/es/dashboard/StatCard/StatCard.d.mts +2 -1
- package/es/dashboard/StatCard/StatCard.mjs +29 -91
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/type.d.mts +18 -5
- package/es/dashboard/Surface/Surface.d.mts +4 -3
- package/es/dashboard/Surface/Surface.mjs +90 -8
- package/es/dashboard/Surface/Surface.mjs.map +1 -1
- package/es/dashboard/Surface/index.d.mts +3 -2
- package/es/dashboard/Surface/link.d.mts +16 -0
- package/es/dashboard/Surface/link.mjs +40 -0
- package/es/dashboard/Surface/link.mjs.map +1 -0
- package/es/dashboard/Surface/marker.stylex.mjs +9 -0
- package/es/dashboard/Surface/marker.stylex.mjs.map +1 -0
- package/es/dashboard/Surface/style.d.mts +2 -0
- package/es/dashboard/Surface/style.mjs +156 -14
- package/es/dashboard/Surface/style.mjs.map +1 -1
- package/es/dashboard/Surface/type.d.mts +29 -1
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
- package/es/dashboard/TableIconActions/index.d.mts +3 -0
- package/es/dashboard/TableIconActions/type.d.mts +17 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
- package/es/dashboard/TitleWithTips/index.d.mts +3 -0
- package/es/dashboard/TitleWithTips/type.d.mts +10 -0
- package/es/dashboard/index.d.mts +38 -4
- package/es/dashboard/index.mjs +18 -4
- package/es/eslint/noBaseUiSubpath.mjs +2 -1
- package/es/eslint/noBaseUiSubpath.mjs.map +1 -1
- package/es/hooks/useControlledState.mjs +20 -0
- package/es/hooks/useControlledState.mjs.map +1 -0
- package/es/hooks/useHighlight.mjs +2 -2
- package/es/hooks/useHighlight.mjs.map +1 -1
- package/es/hooks/useHover.mjs +22 -0
- package/es/hooks/useHover.mjs.map +1 -0
- package/es/hooks/useMarkdown/utils.d.mts +1 -0
- package/es/hooks/useScroll.d.mts +8 -0
- package/es/hooks/useScroll.mjs +33 -0
- package/es/hooks/useScroll.mjs.map +1 -0
- package/es/hooks/useSize.mjs +26 -0
- package/es/hooks/useSize.mjs.map +1 -0
- package/es/i18n/resources/en/colorPicker.d.mts +5 -0
- package/es/i18n/resources/en/colorPicker.mjs +5 -0
- package/es/i18n/resources/en/colorPicker.mjs.map +1 -1
- package/es/i18n/resources/en/datePicker.d.mts +54 -0
- package/es/i18n/resources/en/datePicker.mjs +55 -1
- package/es/i18n/resources/en/datePicker.mjs.map +1 -1
- package/es/i18n/resources/en/index.d.mts +4 -2
- package/es/i18n/resources/en/index.mjs +6 -2
- package/es/i18n/resources/en/index.mjs.map +1 -1
- package/es/i18n/resources/en/table.d.mts +23 -0
- package/es/i18n/resources/en/table.mjs +24 -0
- package/es/i18n/resources/en/table.mjs.map +1 -0
- package/es/i18n/resources/en/video.d.mts +23 -0
- package/es/i18n/resources/en/video.mjs +24 -0
- package/es/i18n/resources/en/video.mjs.map +1 -0
- package/es/i18n/resources/zhCn/colorPicker.d.mts +5 -0
- package/es/i18n/resources/zhCn/colorPicker.mjs +5 -0
- package/es/i18n/resources/zhCn/colorPicker.mjs.map +1 -1
- package/es/i18n/resources/zhCn/datePicker.d.mts +54 -0
- package/es/i18n/resources/zhCn/datePicker.mjs +55 -1
- package/es/i18n/resources/zhCn/datePicker.mjs.map +1 -1
- package/es/i18n/resources/zhCn/index.d.mts +4 -2
- package/es/i18n/resources/zhCn/index.mjs +7 -3
- package/es/i18n/resources/zhCn/index.mjs.map +1 -1
- package/es/i18n/resources/zhCn/table.d.mts +23 -0
- package/es/i18n/resources/zhCn/table.mjs +24 -0
- package/es/i18n/resources/zhCn/table.mjs.map +1 -0
- package/es/i18n/resources/zhCn/video.d.mts +23 -0
- package/es/i18n/resources/zhCn/video.mjs +24 -0
- package/es/i18n/resources/zhCn/video.mjs.map +1 -0
- package/es/i18n/types.d.mts +4 -1
- package/es/index.d.mts +21 -8
- package/es/index.mjs +18 -9
- package/es/internal/menu/itemInterface.d.mts +1 -0
- package/es/internal/menu/renderUtils.d.mts +1 -0
- package/es/internal/overflow/OverflowList.mjs +71 -0
- package/es/internal/overflow/OverflowList.mjs.map +1 -0
- package/es/internal/virtual/VirtualScrollArea.mjs +1 -1
- package/es/internal/virtual/VirtualScrollArea.mjs.map +1 -1
- package/es/mdx/Callout/index.mjs +2 -2
- package/es/mdx/Callout/index.mjs.map +1 -1
- package/es/mdx/Cards/Card.mjs +2 -2
- package/es/mdx/Cards/Card.mjs.map +1 -1
- package/es/mdx/Cards/index.mjs +2 -2
- package/es/mdx/Cards/index.mjs.map +1 -1
- package/es/mdx/Mdx/index.mjs +2 -2
- package/es/mdx/Mdx/index.mjs.map +1 -1
- package/es/mdx/Steps/index.mjs +2 -2
- package/es/mdx/Steps/index.mjs.map +1 -1
- package/es/mdx/mdxComponents/Pre.mjs +5 -5
- package/es/mdx/mdxComponents/Pre.mjs.map +1 -1
- package/es/mdx/mdxComponents/Video.d.mts +2 -1
- package/es/mdx/mdxComponents/Video.mjs +5 -3
- package/es/mdx/mdxComponents/Video.mjs.map +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.mjs +1 -1
- package/es/mobile/ChatInputArea/ChatInputArea.mjs.map +1 -1
- package/es/mobile/TabBar/TabBar.mjs +1 -1
- package/es/mobile/TabBar/TabBar.mjs.map +1 -1
- package/es/node_modules/.pnpm/@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.mts +2 -46
- package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.mts +1 -1
- package/es/node_modules/.pnpm/@types_estree@1.0.9/node_modules/@types/estree/index.d.mts +1 -4
- package/es/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.mts +1 -0
- package/es/node_modules/.pnpm/eslint@10.12.0_jiti@2.6.1_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.mts +2 -1
- package/es/storybook/StoryBook/style.mjs +2 -0
- package/es/storybook/StoryBook/style.mjs.map +1 -1
- package/es/style.css +3643 -996
- package/es/styles/createGlobalStyle.d.mts +1 -0
- package/es/styles/createGlobalStyle.mjs +1 -1
- package/es/styles/index.d.mts +4 -2
- package/es/styles/index.mjs +6 -4
- package/es/styles/stylex/cssVar.stylex.mjs +3 -0
- package/es/styles/stylex/cssVar.stylex.mjs.map +1 -1
- package/es/styles/stylex/props.mjs +2 -2
- package/es/styles/stylex/props.mjs.map +1 -1
- package/es/styles/theme/createLobeToken.d.mts +12 -7
- package/es/styles/theme/createLobeToken.mjs +3 -2
- package/es/styles/theme/createLobeToken.mjs.map +1 -1
- package/es/styles/theme/customPalette.d.mts +6 -0
- package/es/styles/theme/customPalette.mjs +28 -0
- package/es/styles/theme/customPalette.mjs.map +1 -0
- package/es/styles/theme/customPrimary.d.mts +7 -0
- package/es/styles/theme/customPrimary.mjs +101 -0
- package/es/styles/theme/customPrimary.mjs.map +1 -0
- package/es/styles/theme/generateColorPalette.d.mts +1 -0
- package/es/styles/theme/scope.d.mts +9 -5
- package/es/styles/theme/scope.mjs +73 -18
- package/es/styles/theme/scope.mjs.map +1 -1
- package/es/styles/theme/themeCss.d.mts +3 -0
- package/es/styles/theme/themeCss.mjs +39 -2
- package/es/styles/theme/themeCss.mjs.map +1 -1
- package/es/styles/theme/token/legacy.mjs +12 -12
- package/es/styles/theme/token/legacy.mjs.map +1 -1
- package/es/styles/theme/token/neutral.mjs +17 -9
- package/es/styles/theme/token/neutral.mjs.map +1 -1
- package/es/styles/theme/token/neutralText.mjs +91 -0
- package/es/styles/theme/token/neutralText.mjs.map +1 -0
- package/es/styles/theme/token/palette.mjs +16 -41
- package/es/styles/theme/token/palette.mjs.map +1 -1
- package/es/styles/theme/token/primary.mjs +6 -2
- package/es/styles/theme/token/primary.mjs.map +1 -1
- package/es/styles/theme/token/static.mjs +3 -0
- package/es/styles/theme/token/static.mjs.map +1 -1
- package/es/theme.css +301 -290
- package/es/types/customToken.d.mts +1 -0
- package/es/utils/colorMath.mjs +52 -0
- package/es/utils/colorMath.mjs.map +1 -0
- package/es/utils/formatNumber.mjs +7 -0
- package/es/utils/formatNumber.mjs.map +1 -0
- package/es/utils/genCdnUrl.mjs +6 -3
- package/es/utils/genCdnUrl.mjs.map +1 -1
- package/es/utils/hashString.mjs +19 -0
- package/es/utils/hashString.mjs.map +1 -0
- package/es/utils/mergeRefs.mjs +20 -0
- package/es/utils/mergeRefs.mjs.map +1 -0
- package/es/utils/placement.d.mts +5 -5
- package/es/utils/placement.mjs.map +1 -1
- package/package.json +25 -46
- package/es/DatePicker/CalendarPanel.mjs +0 -189
- package/es/DatePicker/CalendarPanel.mjs.map +0 -1
- package/es/DatePicker/PickerShell.mjs +0 -43
- package/es/DatePicker/PickerShell.mjs.map +0 -1
- package/es/DatePicker/calendar.d.mts +0 -4
- package/es/DatePicker/calendar.mjs +0 -46
- package/es/DatePicker/calendar.mjs.map +0 -1
- package/es/Table/FilterMenu.mjs +0 -45
- package/es/Table/FilterMenu.mjs.map +0 -1
- package/es/Table/TableBody.mjs +0 -67
- package/es/Table/TableBody.mjs.map +0 -1
- package/es/Table/TableHead.mjs +0 -58
- package/es/Table/TableHead.mjs.map +0 -1
- package/es/Table/features.mjs +0 -12
- package/es/Table/features.mjs.map +0 -1
- package/es/Table/fixedOffsets.mjs +0 -29
- package/es/Table/fixedOffsets.mjs.map +0 -1
- package/es/Table/marker.stylex.mjs +0 -9
- package/es/Table/marker.stylex.mjs.map +0 -1
- package/es/Table/toColumnDefs.mjs +0 -26
- package/es/Table/toColumnDefs.mjs.map +0 -1
- package/es/Table/useTableState.mjs +0 -99
- package/es/Table/useTableState.mjs.map +0 -1
- package/es/Video/marker.stylex.mjs +0 -9
- package/es/Video/marker.stylex.mjs.map +0 -1
- package/es/dashboard/StatCard/style.mjs +0 -105
- package/es/dashboard/StatCard/style.mjs.map +0 -1
package/es/Video/style.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Video/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nimport { videoMarker } from './marker.stylex';\n\nexport const maskHoverCls = 'lobe-video-mask';\n\nexport const styles = stylex.create({\n filled: {\n borderColor: cssVar.colorBorderSecondary,\n borderStyle: 'solid',\n borderWidth: 1,\n backgroundColor: cssVar.colorFillTertiary,\n },\n mask: {\n inset: 0,\n transition: 'opacity 0.2s ease',\n backgroundColor: cssVar.colorBgMask,\n opacity: { default: 0, [stylex.when.ancestor(':hover', videoMarker)]: 1 },\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n height: '100%',\n width: '100%',\n },\n root: {\n borderRadius: cssVar.borderRadius,\n overflow: 'hidden',\n backgroundColor: cssVar.colorFillTertiary,\n marginBlockEnd: '1em',\n marginBlockStart: 0,\n position: 'relative',\n height: 'auto',\n maxHeight: 'var(--video-max-height, 100%)',\n maxWidth: 'var(--video-max-width, 100%)',\n minHeight: 'var(--video-min-height, unset)',\n minWidth: 'var(--video-min-width, unset)',\n width: '100%',\n },\n video: {\n cursor: 'pointer',\n width: '100%',\n },\n});\n"],"mappings":";AAKA,MAAa,eAAe;AAC5B,MAAa,SAAS;CACpB,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../src/Video/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nconst reducedMotion = '@media (prefers-reduced-motion: reduce)';\nconst chromeBar = '#151515';\n\nconst labelFromBelow = stylex.keyframes({\n from: { opacity: 0, transform: 'translateY(70%)' },\n to: { opacity: 1, transform: 'none' },\n});\nconst labelFromAbove = stylex.keyframes({\n from: { opacity: 0, transform: 'translateY(-70%)' },\n to: { opacity: 1, transform: 'none' },\n});\n\n// The chrome stays dark in both themes: it sits on the black letterbox and\n// must not flash white around a dark recording.\nexport const styles = stylex.create({\n barButton: {\n padding: 0,\n borderRadius: 6,\n borderStyle: 'none',\n flex: 'none',\n outline: { 'default': 'none', ':focus-visible': '2px solid rgb(255 255 255 / 60%)' },\n alignItems: 'center',\n backgroundColor: {\n 'default': 'transparent',\n ':hover': 'rgb(255 255 255 / 12%)',\n },\n color: 'inherit',\n cursor: 'pointer',\n display: 'inline-flex',\n fontFamily: 'inherit',\n fontSize: 12,\n justifyContent: 'center',\n height: 28,\n minWidth: 28,\n },\n barButtonActive: {\n backgroundColor: 'rgb(255 255 255 / 18%)',\n },\n caption: {\n borderRadius: 8,\n paddingBlock: 8,\n paddingInline: 12,\n transition: { default: 'inset-block-end 200ms ease', [reducedMotion]: 'none' },\n backgroundColor: 'rgb(0 0 0 / 78%)',\n color: '#fff',\n fontSize: 13,\n insetBlockEnd: 16,\n insetInlineStart: 16,\n lineHeight: 1.5,\n position: 'absolute',\n zIndex: 2,\n maxWidth: '70%',\n },\n captionItem: {\n marginBlockStart: { 'default': 8, ':first-child': 0 },\n },\n captionRaised: {\n insetBlockEnd: 76,\n },\n captionTitle: {\n gap: 6,\n alignItems: 'center',\n display: 'flex',\n fontWeight: 600,\n },\n centerPlay: {\n borderRadius: '50%',\n borderStyle: 'none',\n alignItems: 'center',\n backgroundColor: 'rgb(0 0 0 / 55%)',\n color: '#fff',\n cursor: 'pointer',\n display: 'flex',\n insetBlockStart: '50%',\n insetInlineStart: '50%',\n justifyContent: 'center',\n position: 'absolute',\n transform: 'translate(-50%, -50%)',\n zIndex: 2,\n height: 56,\n width: 56,\n },\n chip: {\n borderRadius: 6,\n borderStyle: 'none',\n gap: 2,\n overflow: 'hidden',\n alignItems: 'center',\n backgroundColor: { 'default': 'rgb(255 255 255 / 10%)', ':hover': 'rgb(255 255 255 / 16%)' },\n color: 'inherit',\n cursor: 'pointer',\n display: 'inline-flex',\n fontFamily: 'inherit',\n fontSize: 12,\n paddingInlineEnd: 4,\n paddingInlineStart: 8,\n height: 24,\n maxWidth: '40%',\n minWidth: 0,\n },\n chipLabelBackward: {\n animationDuration: { default: '220ms', [reducedMotion]: '0s' },\n animationName: labelFromAbove,\n animationTimingFunction: 'cubic-bezier(0.2, 0, 0, 1)',\n },\n chipLabelForward: {\n animationDuration: { default: '220ms', [reducedMotion]: '0s' },\n animationName: labelFromBelow,\n animationTimingFunction: 'cubic-bezier(0.2, 0, 0, 1)',\n },\n chipText: {\n overflow: 'hidden',\n display: 'block',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n controls: {\n paddingInline: 12,\n color: '#fff',\n paddingBlockEnd: 6,\n },\n controlsBelow: {\n backgroundColor: chromeBar,\n paddingBlockStart: 6,\n },\n controlsHidden: {\n opacity: 0,\n pointerEvents: 'none',\n },\n controlsOverlay: {\n insetInline: 0,\n transition: { default: 'opacity 200ms ease', [reducedMotion]: 'none' },\n backgroundImage: 'linear-gradient(to bottom, rgb(0 0 0 / 0%), rgb(0 0 0 / 72%))',\n insetBlockEnd: 0,\n paddingBlockStart: 40,\n position: 'absolute',\n zIndex: 3,\n },\n disabled: {\n opacity: 0.4,\n pointerEvents: 'none',\n },\n dot: {\n borderRadius: '50%',\n flex: 'none',\n height: 6,\n width: 6,\n },\n error: {\n inset: 0,\n gap: 10,\n alignItems: 'center',\n backgroundColor: '#000',\n color: '#ccc',\n display: 'flex',\n flexDirection: 'column',\n fontSize: 13,\n justifyContent: 'center',\n position: 'absolute',\n zIndex: 4,\n },\n errorActions: {\n gap: 8,\n display: 'flex',\n },\n errorButton: {\n borderColor: 'rgb(255 255 255 / 20%)',\n borderRadius: 6,\n borderStyle: 'solid',\n borderWidth: 1,\n gap: 6,\n paddingInline: 10,\n textDecoration: 'none',\n alignItems: 'center',\n backgroundColor: { 'default': 'rgb(255 255 255 / 8%)', ':hover': 'rgb(255 255 255 / 14%)' },\n color: '#fff',\n cursor: 'pointer',\n display: 'inline-flex',\n fontFamily: 'inherit',\n fontSize: 12,\n height: 28,\n },\n frame: {\n overflow: 'hidden',\n backgroundColor: '#000',\n position: 'relative',\n width: '100%',\n },\n frameNo: {\n color: '#8a8a8a',\n fontFamily: cssVar.fontFamilyCode,\n fontVariantNumeric: 'tabular-nums',\n whiteSpace: 'nowrap',\n },\n hairline: {\n backgroundColor: 'rgb(0 0 0 / 55%)',\n insetBlockStart: 8,\n pointerEvents: 'none',\n position: 'absolute',\n height: 4,\n width: 1,\n },\n head: {\n borderRadius: '50%',\n backgroundColor: '#fff',\n insetBlockStart: 4,\n marginInlineStart: -6,\n pointerEvents: 'none',\n position: 'absolute',\n height: 12,\n width: 12,\n },\n marker: {\n padding: 0,\n borderColor: 'rgb(0 0 0 / 60%)',\n borderRadius: '50%',\n borderStyle: 'solid',\n borderWidth: 1.5,\n outline: { 'default': 'none', ':focus-visible': '2px solid #fff' },\n transition: { default: 'transform 120ms ease', [reducedMotion]: 'none' },\n cursor: 'pointer',\n insetBlockStart: -2,\n marginInlineStart: -5,\n position: 'absolute',\n transform: { 'default': null, ':hover': 'scale(1.3)' },\n zIndex: 1,\n height: 10,\n width: 10,\n },\n preview: {\n gap: 4,\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column',\n insetBlockEnd: 24,\n marginInlineStart: -88,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 2,\n width: 176,\n },\n previewCanvas: {\n borderColor: '#333',\n borderRadius: 8,\n borderStyle: 'solid',\n borderWidth: 1,\n backgroundColor: '#000',\n display: 'block',\n height: 99,\n width: 176,\n },\n previewLabel: {\n borderRadius: 6,\n overflow: 'hidden',\n paddingBlock: 3,\n paddingInline: 8,\n backgroundColor: 'rgb(0 0 0 / 82%)',\n fontSize: 12,\n lineHeight: 1.4,\n textAlign: 'center',\n textOverflow: 'ellipsis',\n maxWidth: 176,\n },\n previewTime: {\n color: '#ddd',\n fontFamily: cssVar.fontFamilyCode,\n fontSize: 11,\n },\n previewTitle: {\n fontWeight: 600,\n whiteSpace: 'nowrap',\n },\n root: {\n borderRadius: cssVar.borderRadiusLG,\n outline: 'none',\n overflow: 'hidden',\n backgroundColor: '#000',\n boxShadow: { 'default': null, ':focus-visible': `0 0 0 2px ${cssVar.colorPrimaryBorder}` },\n color: '#fff',\n lineHeight: 1,\n position: 'relative',\n maxWidth: '100%',\n },\n rateButton: {\n paddingInline: 6,\n fontFamily: cssVar.fontFamilyCode,\n },\n row: {\n gap: 4,\n alignItems: 'center',\n display: 'flex',\n fontSize: 12,\n height: 32,\n },\n sectionChip: {\n borderColor: 'rgb(255 255 255 / 14%)',\n borderRadius: 6,\n borderStyle: 'solid',\n borderWidth: 1,\n gap: 6,\n outline: { 'default': 'none', ':focus-visible': '2px solid rgb(255 255 255 / 60%)' },\n paddingInline: 8,\n alignItems: 'center',\n backgroundColor: { 'default': 'transparent', ':hover': 'rgb(255 255 255 / 8%)' },\n color: { 'default': '#bbb', ':hover': '#fff' },\n cursor: 'pointer',\n display: 'inline-flex',\n fontFamily: 'inherit',\n fontSize: 12,\n height: 24,\n },\n sectionChipActive: {\n backgroundColor: 'rgb(255 255 255 / 16%)',\n color: '#fff',\n },\n sectionChipTime: {\n fontFamily: cssVar.fontFamilyCode,\n opacity: 0.7,\n },\n sectionList: {\n gap: 6,\n paddingBlock: 8,\n paddingInline: 12,\n backgroundColor: '#151515',\n display: 'flex',\n flexWrap: 'wrap',\n },\n segment: {\n borderRadius: 2,\n overflow: 'hidden',\n transition: {\n default: 'height 120ms ease, inset-block-start 120ms ease',\n [reducedMotion]: 'none',\n },\n backgroundColor: 'rgb(255 255 255 / 24%)',\n insetBlockStart: 8,\n position: 'absolute',\n height: 4,\n },\n segmentFill: {\n insetBlock: 0,\n insetInlineStart: 0,\n position: 'absolute',\n },\n segmentHovered: {\n insetBlockStart: 6,\n height: 8,\n },\n spacer: {\n flex: '1',\n },\n surface: {\n inset: 0,\n cursor: 'pointer',\n position: 'absolute',\n },\n time: {\n color: '#ddd',\n fontFamily: cssVar.fontFamilyCode,\n fontVariantNumeric: 'tabular-nums',\n whiteSpace: 'nowrap',\n },\n track: {\n outline: 'none',\n cursor: 'pointer',\n position: 'relative',\n touchAction: 'none',\n height: 20,\n },\n video: {\n display: 'block',\n objectFit: 'contain',\n height: '100%',\n width: '100%',\n },\n});\n\nexport const markerColor = (color?: string) => {\n switch (color) {\n case undefined:\n case 'info': {\n return cssVar.colorInfo;\n }\n case 'success': {\n return cssVar.colorSuccess;\n }\n case 'warning': {\n return cssVar.colorWarning;\n }\n case 'error': {\n return cssVar.colorError;\n }\n default: {\n return color;\n }\n }\n};\n"],"mappings":";;AAUA,MAAa,SAAS;CACpB,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,mBAAmB;EACjB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,kBAAkB;EAChB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,KAAK;EACH,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,cAAc;EACZ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,KAAK;EACH,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,mBAAmB;EACjB,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF;AACA,MAAa,eAAe,UAAmB;CAC7C,QAAQ,OAAR;EACE,KAAK,KAAA;EACL,KAAK,QAED,OAAO,OAAO;EAElB,KAAK,WAED,OAAO,OAAO;EAElB,KAAK,WAED,OAAO,OAAO;EAElB,KAAK,SAED,OAAO,OAAO;EAElB,SAEI,OAAO;CAEb;AACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const pad = (value) => String(value).padStart(2, "0");
|
|
2
|
+
const formatTime = (seconds) => {
|
|
3
|
+
const total = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;
|
|
4
|
+
const hours = Math.floor(total / 3600);
|
|
5
|
+
const minutes = Math.floor(total % 3600 / 60);
|
|
6
|
+
const rest = total % 60;
|
|
7
|
+
return hours > 0 ? `${hours}:${pad(minutes)}:${pad(rest)}` : `${minutes}:${pad(rest)}`;
|
|
8
|
+
};
|
|
9
|
+
const frameOf = (seconds, fps) => Math.floor(seconds * fps + 1e-6);
|
|
10
|
+
const steppedTime = (current, frames, duration, fps) => Math.min(Math.max((frameOf(current, fps) + frames + .5) / fps, 0), duration);
|
|
11
|
+
const sortSections = (sections) => [...sections].sort((a, b) => a.start - b.start);
|
|
12
|
+
const sectionAt = (sorted, time) => sorted.findLast((section) => section.start <= time + .01);
|
|
13
|
+
const markersAt = (markers, time, fps) => {
|
|
14
|
+
let latest;
|
|
15
|
+
for (const marker of markers) {
|
|
16
|
+
if (marker.content === void 0 || marker.content === null) continue;
|
|
17
|
+
if (time >= marker.time - .5 / fps && time < marker.time + 2 && (latest === void 0 || marker.time > latest)) latest = marker.time;
|
|
18
|
+
}
|
|
19
|
+
if (latest === void 0) return [];
|
|
20
|
+
return markers.filter((marker) => marker.time === latest && marker.content !== void 0 && marker.content !== null);
|
|
21
|
+
};
|
|
22
|
+
const mergeSegments = (sorted, duration, trackPx, minPx = 12) => {
|
|
23
|
+
if (!(duration > 0)) return {
|
|
24
|
+
hairlines: [],
|
|
25
|
+
segments: []
|
|
26
|
+
};
|
|
27
|
+
const bounds = [
|
|
28
|
+
0,
|
|
29
|
+
...[...new Set(sorted.map((s) => s.start).filter((start) => start > 0 && start < duration))],
|
|
30
|
+
duration
|
|
31
|
+
];
|
|
32
|
+
const segments = [];
|
|
33
|
+
const hairlines = [];
|
|
34
|
+
const minSeconds = trackPx > 0 ? minPx / trackPx * duration : 0;
|
|
35
|
+
let carry = false;
|
|
36
|
+
for (let i = 0; i < bounds.length - 1; i++) {
|
|
37
|
+
const raw = {
|
|
38
|
+
end: bounds[i + 1],
|
|
39
|
+
start: bounds[i]
|
|
40
|
+
};
|
|
41
|
+
const narrow = raw.end - raw.start < minSeconds;
|
|
42
|
+
const last = segments.at(-1);
|
|
43
|
+
if (last && (narrow || carry)) {
|
|
44
|
+
last.end = raw.end;
|
|
45
|
+
hairlines.push(raw.start);
|
|
46
|
+
carry = false;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
segments.push(raw);
|
|
50
|
+
carry = narrow;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
hairlines,
|
|
54
|
+
segments
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { formatTime, frameOf, markersAt, mergeSegments, sectionAt, sortSections, steppedTime };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=time.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.mjs","names":[],"sources":["../../src/Video/time.ts"],"sourcesContent":["import type { VideoMarker, VideoSection } from './type';\n\nexport const CAPTION_SECONDS = 2;\nexport const MIN_SEGMENT_PX = 12;\n\nconst pad = (value: number) => String(value).padStart(2, '0');\n\nexport const formatTime = (seconds: number) => {\n const total = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const hours = Math.floor(total / 3600);\n const minutes = Math.floor((total % 3600) / 60);\n const rest = total % 60;\n return hours > 0 ? `${hours}:${pad(minutes)}:${pad(rest)}` : `${minutes}:${pad(rest)}`;\n};\n\n// The epsilon absorbs float error at exact frame boundaries.\nexport const frameOf = (seconds: number, fps: number) => Math.floor(seconds * fps + 1e-6);\n\n// Landing on frame centres means repeated steps never skip a frame or show one twice.\nexport const steppedTime = (current: number, frames: number, duration: number, fps: number) =>\n Math.min(Math.max((frameOf(current, fps) + frames + 0.5) / fps, 0), duration);\n\nexport const sortSections = (sections: VideoSection[]) =>\n [...sections].sort((a, b) => a.start - b.start);\n\nexport const sectionAt = (sorted: VideoSection[], time: number) =>\n sorted.findLast((section) => section.start <= time + 0.01);\n\nexport const markersAt = (markers: VideoMarker[], time: number, fps: number): VideoMarker[] => {\n let latest: number | undefined;\n for (const marker of markers) {\n if (marker.content === undefined || marker.content === null) continue;\n const onScreen = time >= marker.time - 0.5 / fps && time < marker.time + CAPTION_SECONDS;\n if (onScreen && (latest === undefined || marker.time > latest)) latest = marker.time;\n }\n if (latest === undefined) return [];\n return markers.filter(\n (marker) => marker.time === latest && marker.content !== undefined && marker.content !== null,\n );\n};\n\nexport interface Segment {\n end: number;\n start: number;\n}\n\nexport const mergeSegments = (\n sorted: VideoSection[],\n duration: number,\n trackPx: number,\n minPx = MIN_SEGMENT_PX,\n): { hairlines: number[]; segments: Segment[] } => {\n if (!(duration > 0)) return { hairlines: [], segments: [] };\n\n const cuts = [\n ...new Set(sorted.map((s) => s.start).filter((start) => start > 0 && start < duration)),\n ];\n const bounds = [0, ...cuts, duration];\n const segments: Segment[] = [];\n const hairlines: number[] = [];\n const minSeconds = trackPx > 0 ? (minPx / trackPx) * duration : 0;\n let carry = false;\n\n for (let i = 0; i < bounds.length - 1; i++) {\n const raw = { end: bounds[i + 1], start: bounds[i] };\n const narrow = raw.end - raw.start < minSeconds;\n const last = segments.at(-1);\n if (last && (narrow || carry)) {\n last.end = raw.end;\n hairlines.push(raw.start);\n carry = false;\n continue;\n }\n segments.push(raw);\n carry = narrow;\n }\n\n return { hairlines, segments };\n};\n"],"mappings":"AAKA,MAAM,OAAO,UAAkB,OAAO,KAAK,CAAC,CAAC,SAAS,GAAG,GAAG;AAE5D,MAAa,cAAc,YAAoB;CAC7C,MAAM,QAAQ,OAAO,SAAS,OAAO,KAAK,UAAU,IAAI,KAAK,MAAM,OAAO,IAAI;CAC9E,MAAM,QAAQ,KAAK,MAAM,QAAQ,IAAI;CACrC,MAAM,UAAU,KAAK,MAAO,QAAQ,OAAQ,EAAE;CAC9C,MAAM,OAAO,QAAQ;CACrB,OAAO,QAAQ,IAAI,GAAG,MAAM,GAAG,IAAI,OAAO,EAAE,GAAG,IAAI,IAAI,MAAM,GAAG,QAAQ,GAAG,IAAI,IAAI;AACrF;AAGA,MAAa,WAAW,SAAiB,QAAgB,KAAK,MAAM,UAAU,MAAM,IAAI;AAGxF,MAAa,eAAe,SAAiB,QAAgB,UAAkB,QAC7E,KAAK,IAAI,KAAK,KAAK,QAAQ,SAAS,GAAG,IAAI,SAAS,MAAO,KAAK,CAAC,GAAG,QAAQ;AAE9E,MAAa,gBAAgB,aAC3B,CAAC,GAAG,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,KAAK;AAEhD,MAAa,aAAa,QAAwB,SAChD,OAAO,UAAU,YAAY,QAAQ,SAAS,OAAO,GAAI;AAE3D,MAAa,aAAa,SAAwB,MAAc,QAA+B;CAC7F,IAAI;CACJ,KAAK,MAAM,UAAU,SAAS;EAC5B,IAAI,OAAO,YAAY,KAAA,KAAa,OAAO,YAAY,MAAM;EAE7D,IADiB,QAAQ,OAAO,OAAO,KAAM,OAAO,OAAO,OAAO,OAAA,MACjD,WAAW,KAAA,KAAa,OAAO,OAAO,SAAS,SAAS,OAAO;CAClF;CACA,IAAI,WAAW,KAAA,GAAW,OAAO,CAAC;CAClC,OAAO,QAAQ,QACZ,WAAW,OAAO,SAAS,UAAU,OAAO,YAAY,KAAA,KAAa,OAAO,YAAY,IAC3F;AACF;AAOA,MAAa,iBACX,QACA,UACA,SACA,QAAA,OACiD;CACjD,IAAI,EAAE,WAAW,IAAI,OAAO;EAAE,WAAW,CAAC;EAAG,UAAU,CAAC;CAAE;CAK1D,MAAM,SAAS;EAAC;EAAG,GAAG,CAFpB,GAAG,IAAI,IAAI,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,UAAU,QAAQ,KAAK,QAAQ,QAAQ,CAAC,CAE/D;EAAG;CAAQ;CACpC,MAAM,WAAsB,CAAC;CAC7B,MAAM,YAAsB,CAAC;CAC7B,MAAM,aAAa,UAAU,IAAK,QAAQ,UAAW,WAAW;CAChE,IAAI,QAAQ;CAEZ,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,SAAS,GAAG,KAAK;EAC1C,MAAM,MAAM;GAAE,KAAK,OAAO,IAAI;GAAI,OAAO,OAAO;EAAG;EACnD,MAAM,SAAS,IAAI,MAAM,IAAI,QAAQ;EACrC,MAAM,OAAO,SAAS,GAAG,EAAE;EAC3B,IAAI,SAAS,UAAU,QAAQ;GAC7B,KAAK,MAAM,IAAI;GACf,UAAU,KAAK,IAAI,KAAK;GACxB,QAAQ;GACR;EACF;EACA,SAAS,KAAK,GAAG;EACjB,QAAQ;CACV;CAEA,OAAO;EAAE;EAAW;CAAS;AAC/B"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { CSSProperties, Key, ReactEventHandler, ReactNode, Ref } from "react";
|
|
2
|
+
//#region src/Video/type.d.ts
|
|
3
|
+
export interface VideoSection {
|
|
4
|
+
start: number;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export type VideoMarkerColor = 'success' | 'warning' | 'error' | 'info' | (string & {});
|
|
8
|
+
export interface VideoMarker {
|
|
9
|
+
color?: VideoMarkerColor;
|
|
10
|
+
content?: ReactNode;
|
|
11
|
+
key?: Key;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
time: number;
|
|
14
|
+
}
|
|
15
|
+
export type VideoStatus = 'loading' | 'ready' | 'error';
|
|
16
|
+
export interface VideoState {
|
|
17
|
+
activeMarkers: VideoMarker[];
|
|
18
|
+
activeSection?: VideoSection;
|
|
19
|
+
captions: boolean;
|
|
20
|
+
duration: number;
|
|
21
|
+
muted: boolean;
|
|
22
|
+
paused: boolean;
|
|
23
|
+
rate: number;
|
|
24
|
+
size?: {
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
status: VideoStatus;
|
|
29
|
+
time: number;
|
|
30
|
+
}
|
|
31
|
+
export interface VideoPlayer {
|
|
32
|
+
getState: () => VideoState;
|
|
33
|
+
pause: () => void;
|
|
34
|
+
play: () => Promise<void>;
|
|
35
|
+
requestFullscreen: () => Promise<void>;
|
|
36
|
+
readonly root: HTMLDivElement | null;
|
|
37
|
+
seek: (seconds: number) => void;
|
|
38
|
+
setCaptions: (captions: boolean) => void;
|
|
39
|
+
setMuted: (muted: boolean) => void;
|
|
40
|
+
setRate: (rate: number) => void;
|
|
41
|
+
step: (frames: number) => void;
|
|
42
|
+
subscribe: (listener: (state: VideoState) => void) => () => void;
|
|
43
|
+
toggle: () => void;
|
|
44
|
+
toggleMute: () => void;
|
|
45
|
+
readonly video: HTMLVideoElement | null;
|
|
46
|
+
}
|
|
47
|
+
export interface VideoMediaProps {
|
|
48
|
+
autoPlay?: boolean;
|
|
49
|
+
loop?: boolean;
|
|
50
|
+
onEnded?: ReactEventHandler<HTMLVideoElement>;
|
|
51
|
+
onError?: ReactEventHandler<HTMLVideoElement>;
|
|
52
|
+
onPause?: ReactEventHandler<HTMLVideoElement>;
|
|
53
|
+
onPlay?: ReactEventHandler<HTMLVideoElement>;
|
|
54
|
+
onTimeUpdate?: ReactEventHandler<HTMLVideoElement>;
|
|
55
|
+
poster?: string;
|
|
56
|
+
preload?: HTMLVideoElement['preload'];
|
|
57
|
+
src: string;
|
|
58
|
+
}
|
|
59
|
+
export interface VideoRootProps extends VideoMediaProps {
|
|
60
|
+
captions?: boolean;
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
className?: string;
|
|
63
|
+
defaultPlaybackRate?: number;
|
|
64
|
+
fps?: number;
|
|
65
|
+
height?: number | string;
|
|
66
|
+
markers?: VideoMarker[];
|
|
67
|
+
maxHeight?: number;
|
|
68
|
+
muted?: boolean;
|
|
69
|
+
onMarkerClick?: (marker: VideoMarker) => void;
|
|
70
|
+
onMutedChange?: (muted: boolean) => void;
|
|
71
|
+
onRateChange?: (rate: number) => void;
|
|
72
|
+
onRetry?: () => Promise<unknown> | void;
|
|
73
|
+
playbackRates?: number[];
|
|
74
|
+
player?: VideoPlayer;
|
|
75
|
+
ref?: Ref<VideoPlayer>;
|
|
76
|
+
sections?: VideoSection[];
|
|
77
|
+
style?: CSSProperties;
|
|
78
|
+
width?: number | string;
|
|
79
|
+
}
|
|
80
|
+
export interface VideoTimelineProps {
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
className?: string;
|
|
83
|
+
style?: CSSProperties;
|
|
84
|
+
thumbnails?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface VideoControlsProps {
|
|
87
|
+
children?: ReactNode;
|
|
88
|
+
className?: string;
|
|
89
|
+
extra?: ReactNode;
|
|
90
|
+
frameStep?: boolean;
|
|
91
|
+
style?: CSSProperties;
|
|
92
|
+
}
|
|
93
|
+
export interface VideoCaptionProps {
|
|
94
|
+
action?: (marker: VideoMarker) => ReactNode;
|
|
95
|
+
className?: string;
|
|
96
|
+
style?: CSSProperties;
|
|
97
|
+
}
|
|
98
|
+
export interface VideoFrameProps {
|
|
99
|
+
children?: ReactNode;
|
|
100
|
+
className?: string;
|
|
101
|
+
style?: CSSProperties;
|
|
102
|
+
}
|
|
103
|
+
export interface VideoSectionListProps {
|
|
104
|
+
className?: string;
|
|
105
|
+
style?: CSSProperties;
|
|
106
|
+
}
|
|
107
|
+
export interface VideoProps extends Omit<VideoRootProps, 'children'> {
|
|
108
|
+
classNames?: {
|
|
109
|
+
controls?: string;
|
|
110
|
+
frame?: string;
|
|
111
|
+
root?: string;
|
|
112
|
+
timeline?: string;
|
|
113
|
+
};
|
|
114
|
+
frameStep?: boolean;
|
|
115
|
+
overlay?: (state: VideoState) => ReactNode;
|
|
116
|
+
styles?: {
|
|
117
|
+
controls?: CSSProperties;
|
|
118
|
+
frame?: CSSProperties;
|
|
119
|
+
root?: CSSProperties;
|
|
120
|
+
timeline?: CSSProperties;
|
|
121
|
+
};
|
|
122
|
+
thumbnails?: boolean;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
//#region src/Video/useControlsIdle.ts
|
|
4
|
+
const IDLE_HIDE_MS = 2e3;
|
|
5
|
+
const useControlsIdle = (forceVisible) => {
|
|
6
|
+
const [active, setActive] = useState(false);
|
|
7
|
+
const [focused, setFocused] = useState(false);
|
|
8
|
+
const [held, setHeld] = useState(false);
|
|
9
|
+
const timer = useRef(void 0);
|
|
10
|
+
const clear = useCallback(() => {
|
|
11
|
+
if (timer.current === void 0) return;
|
|
12
|
+
window.clearTimeout(timer.current);
|
|
13
|
+
timer.current = void 0;
|
|
14
|
+
}, []);
|
|
15
|
+
const wake = useCallback(() => {
|
|
16
|
+
setActive(true);
|
|
17
|
+
clear();
|
|
18
|
+
timer.current = window.setTimeout(() => {
|
|
19
|
+
timer.current = void 0;
|
|
20
|
+
setActive(false);
|
|
21
|
+
}, IDLE_HIDE_MS);
|
|
22
|
+
}, [clear]);
|
|
23
|
+
const sleep = useCallback(() => {
|
|
24
|
+
clear();
|
|
25
|
+
setActive(false);
|
|
26
|
+
}, [clear]);
|
|
27
|
+
useEffect(() => clear, [clear]);
|
|
28
|
+
return {
|
|
29
|
+
hold: setHeld,
|
|
30
|
+
setFocused,
|
|
31
|
+
sleep,
|
|
32
|
+
visible: forceVisible || active || focused || held,
|
|
33
|
+
wake
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useControlsIdle };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=useControlsIdle.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlsIdle.mjs","names":[],"sources":["../../src/Video/useControlsIdle.ts"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nconst IDLE_HIDE_MS = 2000;\n\nexport const useControlsIdle = (forceVisible: boolean) => {\n const [active, setActive] = useState(false);\n const [focused, setFocused] = useState(false);\n const [held, setHeld] = useState(false);\n const timer = useRef<number | undefined>(undefined);\n\n const clear = useCallback(() => {\n if (timer.current === undefined) return;\n window.clearTimeout(timer.current);\n timer.current = undefined;\n }, []);\n\n const wake = useCallback(() => {\n setActive(true);\n clear();\n timer.current = window.setTimeout(() => {\n timer.current = undefined;\n setActive(false);\n }, IDLE_HIDE_MS);\n }, [clear]);\n\n const sleep = useCallback(() => {\n clear();\n setActive(false);\n }, [clear]);\n\n useEffect(() => clear, [clear]);\n\n return {\n hold: setHeld,\n setFocused,\n sleep,\n visible: forceVisible || active || focused || held,\n wake,\n };\n};\n"],"mappings":";;;AAIA,MAAM,eAAe;AAErB,MAAa,mBAAmB,iBAA0B;CACxD,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,QAAQ,OAA2B,KAAA,CAAS;CAElD,MAAM,QAAQ,kBAAkB;EAC9B,IAAI,MAAM,YAAY,KAAA,GAAW;EACjC,OAAO,aAAa,MAAM,OAAO;EACjC,MAAM,UAAU,KAAA;CAClB,GAAG,CAAC,CAAC;CAEL,MAAM,OAAO,kBAAkB;EAC7B,UAAU,IAAI;EACd,MAAM;EACN,MAAM,UAAU,OAAO,iBAAiB;GACtC,MAAM,UAAU,KAAA;GAChB,UAAU,KAAK;EACjB,GAAG,YAAY;CACjB,GAAG,CAAC,KAAK,CAAC;CAEV,MAAM,QAAQ,kBAAkB;EAC9B,MAAM;EACN,UAAU,KAAK;CACjB,GAAG,CAAC,KAAK,CAAC;CAEV,gBAAgB,OAAO,CAAC,KAAK,CAAC;CAE9B,OAAO;EACL,MAAM;EACN;EACA;EACA,SAAS,gBAAgB,UAAU,WAAW;EAC9C;CACF;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/Video/useFullscreen.ts
|
|
4
|
+
const useFullscreen = (store) => {
|
|
5
|
+
const [fullscreen, setFullscreen] = useState(false);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const sync = () => setFullscreen(Boolean(store.root) && document.fullscreenElement === store.root);
|
|
8
|
+
sync();
|
|
9
|
+
document.addEventListener("fullscreenchange", sync);
|
|
10
|
+
return () => document.removeEventListener("fullscreenchange", sync);
|
|
11
|
+
}, [store]);
|
|
12
|
+
return fullscreen;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useFullscreen };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=useFullscreen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFullscreen.mjs","names":[],"sources":["../../src/Video/useFullscreen.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\nimport type { VideoStore } from './store';\n\nexport const useFullscreen = (store: VideoStore) => {\n const [fullscreen, setFullscreen] = useState(false);\n useEffect(() => {\n const sync = () =>\n setFullscreen(Boolean(store.root) && document.fullscreenElement === store.root);\n sync();\n document.addEventListener('fullscreenchange', sync);\n return () => document.removeEventListener('fullscreenchange', sync);\n }, [store]);\n return fullscreen;\n};\n"],"mappings":";;;AAMA,MAAa,iBAAiB,UAAsB;CAClD,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAClD,gBAAgB;EACd,MAAM,aACJ,cAAc,QAAQ,MAAM,IAAI,KAAK,SAAS,sBAAsB,MAAM,IAAI;EAChF,KAAK;EACL,SAAS,iBAAiB,oBAAoB,IAAI;EAClD,aAAa,SAAS,oBAAoB,oBAAoB,IAAI;CACpE,GAAG,CAAC,KAAK,CAAC;CACV,OAAO;AACT"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/Video/useKeyboard.ts
|
|
2
|
+
const DEFAULT_PLAYBACK_RATES = [
|
|
3
|
+
.5,
|
|
4
|
+
1,
|
|
5
|
+
1.5,
|
|
6
|
+
2
|
|
7
|
+
];
|
|
8
|
+
const nextRate = (rates, current, direction) => {
|
|
9
|
+
const index = rates.indexOf(current);
|
|
10
|
+
const from = index === -1 ? rates.findIndex((rate) => rate >= current) : index;
|
|
11
|
+
return rates[Math.min(Math.max((from === -1 ? rates.length - 1 : from) + direction, 0), rates.length - 1)];
|
|
12
|
+
};
|
|
13
|
+
const handleVideoKey = (event, store, rates = DEFAULT_PLAYBACK_RATES) => {
|
|
14
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return false;
|
|
15
|
+
const target = event.target;
|
|
16
|
+
const host = event.currentTarget;
|
|
17
|
+
if (host instanceof Node && target instanceof Node && host !== target && !host.contains(target)) return false;
|
|
18
|
+
if (target?.isContentEditable || target?.closest?.("input, textarea, select, [role=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"])")) return false;
|
|
19
|
+
if (target instanceof HTMLButtonElement && (event.key === " " || event.key === "Enter")) return false;
|
|
20
|
+
const state = store.getState();
|
|
21
|
+
if (state.status !== "ready") return false;
|
|
22
|
+
switch (event.key.toLowerCase()) {
|
|
23
|
+
case " ":
|
|
24
|
+
case "k":
|
|
25
|
+
store.toggle();
|
|
26
|
+
return true;
|
|
27
|
+
case ",":
|
|
28
|
+
store.step(-1);
|
|
29
|
+
return true;
|
|
30
|
+
case ".":
|
|
31
|
+
store.step(1);
|
|
32
|
+
return true;
|
|
33
|
+
case "arrowleft":
|
|
34
|
+
store.seek(state.time - (event.shiftKey ? 5 : 1));
|
|
35
|
+
return true;
|
|
36
|
+
case "arrowright":
|
|
37
|
+
store.seek(state.time + (event.shiftKey ? 5 : 1));
|
|
38
|
+
return true;
|
|
39
|
+
case "j":
|
|
40
|
+
store.setRate(nextRate(rates, state.rate, -1));
|
|
41
|
+
return true;
|
|
42
|
+
case "l":
|
|
43
|
+
store.setRate(nextRate(rates, state.rate, 1));
|
|
44
|
+
return true;
|
|
45
|
+
case "m":
|
|
46
|
+
store.toggleMute();
|
|
47
|
+
return true;
|
|
48
|
+
case "c":
|
|
49
|
+
store.setCaptions(!state.captions);
|
|
50
|
+
return true;
|
|
51
|
+
case "f":
|
|
52
|
+
store.toggleFullscreen();
|
|
53
|
+
return true;
|
|
54
|
+
default: return false;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { DEFAULT_PLAYBACK_RATES, handleVideoKey };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=useKeyboard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboard.mjs","names":[],"sources":["../../src/Video/useKeyboard.ts"],"sourcesContent":["import type { KeyboardEvent as ReactKeyboardEvent } from 'react';\n\nimport type { VideoStore } from './store';\n\nexport const DEFAULT_PLAYBACK_RATES = [0.5, 1, 1.5, 2];\n\nconst nextRate = (rates: number[], current: number, direction: 1 | -1) => {\n const index = rates.indexOf(current);\n const from = index === -1 ? rates.findIndex((rate) => rate >= current) : index;\n const next = Math.min(\n Math.max((from === -1 ? rates.length - 1 : from) + direction, 0),\n rates.length - 1,\n );\n return rates[next];\n};\n\nexport const handleVideoKey = (\n event: KeyboardEvent | ReactKeyboardEvent,\n store: VideoStore,\n rates: number[] = DEFAULT_PLAYBACK_RATES,\n) => {\n if (event.altKey || event.ctrlKey || event.metaKey) return false;\n const target = event.target as HTMLElement | null;\n // Portalled content (menus) bubbles through React to Root without being inside it.\n const host = event.currentTarget as Node | null;\n if (host instanceof Node && target instanceof Node && host !== target && !host.contains(target))\n return false;\n if (\n target?.isContentEditable ||\n target?.closest?.(\n 'input, textarea, select, [role=\"menuitem\"], [contenteditable]:not([contenteditable=\"false\"])',\n )\n )\n return false;\n if (target instanceof HTMLButtonElement && (event.key === ' ' || event.key === 'Enter'))\n return false;\n const state = store.getState();\n if (state.status !== 'ready') return false;\n\n switch (event.key.toLowerCase()) {\n case ' ':\n case 'k': {\n store.toggle();\n return true;\n }\n case ',': {\n store.step(-1);\n return true;\n }\n case '.': {\n store.step(1);\n return true;\n }\n case 'arrowleft': {\n store.seek(state.time - (event.shiftKey ? 5 : 1));\n return true;\n }\n case 'arrowright': {\n store.seek(state.time + (event.shiftKey ? 5 : 1));\n return true;\n }\n case 'j': {\n store.setRate(nextRate(rates, state.rate, -1));\n return true;\n }\n case 'l': {\n store.setRate(nextRate(rates, state.rate, 1));\n return true;\n }\n case 'm': {\n store.toggleMute();\n return true;\n }\n case 'c': {\n store.setCaptions(!state.captions);\n return true;\n }\n case 'f': {\n store.toggleFullscreen();\n return true;\n }\n default: {\n return false;\n }\n }\n};\n"],"mappings":";AAIA,MAAa,yBAAyB;CAAC;CAAK;CAAG;CAAK;AAAC;AAErD,MAAM,YAAY,OAAiB,SAAiB,cAAsB;CACxE,MAAM,QAAQ,MAAM,QAAQ,OAAO;CACnC,MAAM,OAAO,UAAU,KAAK,MAAM,WAAW,SAAS,QAAQ,OAAO,IAAI;CAKzE,OAAO,MAJM,KAAK,IAChB,KAAK,KAAK,SAAS,KAAK,MAAM,SAAS,IAAI,QAAQ,WAAW,CAAC,GAC/D,MAAM,SAAS,CAED;AAClB;AAEA,MAAa,kBACX,OACA,OACA,QAAkB,2BACf;CACH,IAAI,MAAM,UAAU,MAAM,WAAW,MAAM,SAAS,OAAO;CAC3D,MAAM,SAAS,MAAM;CAErB,MAAM,OAAO,MAAM;CACnB,IAAI,gBAAgB,QAAQ,kBAAkB,QAAQ,SAAS,UAAU,CAAC,KAAK,SAAS,MAAM,GAC5F,OAAO;CACT,IACE,QAAQ,qBACR,QAAQ,UACN,kGACF,GAEA,OAAO;CACT,IAAI,kBAAkB,sBAAsB,MAAM,QAAQ,OAAO,MAAM,QAAQ,UAC7E,OAAO;CACT,MAAM,QAAQ,MAAM,SAAS;CAC7B,IAAI,MAAM,WAAW,SAAS,OAAO;CAErC,QAAQ,MAAM,IAAI,YAAY,GAA9B;EACE,KAAK;EACL,KAAK;GACH,MAAM,OAAO;GACb,OAAO;EAET,KAAK;GACH,MAAM,KAAK,EAAE;GACb,OAAO;EAET,KAAK;GACH,MAAM,KAAK,CAAC;GACZ,OAAO;EAET,KAAK;GACH,MAAM,KAAK,MAAM,QAAQ,MAAM,WAAW,IAAI,EAAE;GAChD,OAAO;EAET,KAAK;GACH,MAAM,KAAK,MAAM,QAAQ,MAAM,WAAW,IAAI,EAAE;GAChD,OAAO;EAET,KAAK;GACH,MAAM,QAAQ,SAAS,OAAO,MAAM,MAAM,EAAE,CAAC;GAC7C,OAAO;EAET,KAAK;GACH,MAAM,QAAQ,SAAS,OAAO,MAAM,MAAM,CAAC,CAAC;GAC5C,OAAO;EAET,KAAK;GACH,MAAM,WAAW;GACjB,OAAO;EAET,KAAK;GACH,MAAM,YAAY,CAAC,MAAM,QAAQ;GACjC,OAAO;EAET,KAAK;GACH,MAAM,iBAAiB;GACvB,OAAO;EAET,SACE,OAAO;CAEX;AACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VideoPlayer, VideoState } from "./type.mjs";
|
|
2
|
+
//#region src/Video/useVideo.d.ts
|
|
3
|
+
export declare function useVideoState(player: VideoPlayer): VideoState;
|
|
4
|
+
export declare function useVideoState<T>(player: VideoPlayer, selector: (state: VideoState) => T): T;
|
|
5
|
+
export declare function useVideo(): VideoState;
|
|
6
|
+
export declare function useVideo<T>(selector: (state: VideoState) => T): T;
|
|
7
|
+
export declare const useVideoPlayer: () => VideoPlayer;
|
|
8
|
+
//#endregion
|
|
9
|
+
//# sourceMappingURL=useVideo.d.mts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useVideoContext } from "./context.mjs";
|
|
3
|
+
import { createVideoStore } from "./store.mjs";
|
|
4
|
+
import { useState, useSyncExternalStore } from "react";
|
|
5
|
+
//#region src/Video/useVideo.ts
|
|
6
|
+
const identity = (state) => state;
|
|
7
|
+
function useVideoState(player, selector = identity) {
|
|
8
|
+
return useSyncExternalStore(player.subscribe, () => selector(player.getState()), () => selector(player.getState()));
|
|
9
|
+
}
|
|
10
|
+
function useVideo(selector = identity) {
|
|
11
|
+
return useVideoState(useVideoContext().store, selector);
|
|
12
|
+
}
|
|
13
|
+
const useVideoPlayer = () => useState(createVideoStore)[0];
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useVideo, useVideoPlayer, useVideoState };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=useVideo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVideo.mjs","names":[],"sources":["../../src/Video/useVideo.ts"],"sourcesContent":["'use client';\n\nimport { useState, useSyncExternalStore } from 'react';\n\nimport { useVideoContext } from './context';\nimport { createVideoStore } from './store';\nimport type { VideoPlayer, VideoState } from './type';\n\nconst identity = (state: VideoState) => state as unknown;\n\nexport function useVideoState(player: VideoPlayer): VideoState;\nexport function useVideoState<T>(player: VideoPlayer, selector: (state: VideoState) => T): T;\nexport function useVideoState(\n player: VideoPlayer,\n selector: (state: VideoState) => unknown = identity,\n) {\n return useSyncExternalStore(\n player.subscribe,\n () => selector(player.getState()),\n () => selector(player.getState()),\n );\n}\n\nexport function useVideo(): VideoState;\nexport function useVideo<T>(selector: (state: VideoState) => T): T;\nexport function useVideo(selector: (state: VideoState) => unknown = identity) {\n return useVideoState(useVideoContext().store, selector);\n}\n\nexport const useVideoPlayer = (): VideoPlayer => useState(createVideoStore)[0];\n"],"mappings":";;;;;AAQA,MAAM,YAAY,UAAsB;AAIxC,SAAgB,cACd,QACA,WAA2C,UAC3C;CACA,OAAO,qBACL,OAAO,iBACD,SAAS,OAAO,SAAS,CAAC,SAC1B,SAAS,OAAO,SAAS,CAAC,CAClC;AACF;AAIA,SAAgB,SAAS,WAA2C,UAAU;CAC5E,OAAO,cAAc,gBAAgB,CAAC,CAAC,OAAO,QAAQ;AACxD;AAEA,MAAa,uBAAoC,SAAS,gBAAgB,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@ import Text from "../../Text/Text.mjs";
|
|
|
9
9
|
import { childStyles, styles } from "./style.mjs";
|
|
10
10
|
import { memo, useMemo } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
import clsx from "clsx";
|
|
12
|
+
import clsx$1 from "clsx";
|
|
13
13
|
import * as stylex from "@stylexjs/stylex";
|
|
14
14
|
//#region src/awesome/Features/FeatureItem.tsx
|
|
15
15
|
const Image = memo(({ image, className, title, style }) => {
|
|
@@ -32,7 +32,7 @@ const Item = memo(({ style, className, row, column, description, image, title, l
|
|
|
32
32
|
"--features-title-hover-size": hasLink ? "14px" : "20px"
|
|
33
33
|
}), [rowNumber, hasLink]);
|
|
34
34
|
return /* @__PURE__ */ jsx("div", {
|
|
35
|
-
...styleProps(styles.container, clsx("lobe-features-item", className), {
|
|
35
|
+
...styleProps(styles.container, clsx$1("lobe-features-item", className), {
|
|
36
36
|
...cssVariables,
|
|
37
37
|
gridColumn: `span ${column || 1}`,
|
|
38
38
|
gridRow: `span ${rowNumber}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureItem.mjs","names":["Flexbox"],"sources":["../../../src/awesome/Features/FeatureItem.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo, useMemo } from 'react';\n\nimport A from '@/A';\nimport { Center, Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\nimport Img from '@/Img';\nimport { styleProps } from '@/styles/stylex/props';\nimport Text from '@/Text';\n\nimport { childStyles, styles } from './style';\nimport type { FeatureItemProps } from './type';\n\nconst Image = memo<{ className?: string; image: string; style?: CSSProperties; title: string }>(\n ({ image, className, title, style }) => {\n return image.startsWith('http') ? (\n <Img alt={title} className={className} src={image} style={style} />\n ) : (\n <Center className={className} style={style}>\n {image}\n </Center>\n );\n },\n);\n\nconst Item = memo<FeatureItemProps>(\n ({\n style,\n className,\n row,\n column,\n description,\n image,\n title,\n link,\n icon,\n imageStyle,\n openExternal,\n ...rest\n }) => {\n const rowNumber = row || 7;\n const hasLink = Boolean(link);\n\n const cssVariables = useMemo<Record<string, string>>(\n () => ({\n '--features-row-num': String(rowNumber),\n '--features-title-hover-size': hasLink ? '14px' : '20px',\n }),\n [rowNumber, hasLink],\n );\n\n return (\n <div\n {...styleProps(styles.container, clsx('lobe-features-item', className), {\n ...cssVariables,\n gridColumn: `span ${column || 1}`,\n gridRow: `span ${rowNumber}`,\n ...style,\n })}\n {...rest}\n >\n <div {...stylex.props(styles.cell)}>\n {image ||\n (icon && (\n <Center {...styleProps(styles.imgContainer, undefined, imageStyle)}>\n {icon && <Icon icon={icon} style={childStyles.img} />}\n {image && <Image image={image} style={childStyles.img} title={title} />}\n </Center>\n ))}\n {title && (\n <Flexbox\n horizontal\n align={'center'}\n as={'h3'}\n className={stylex.props(styles.title).className}\n gap={8}\n >\n {title}\n </Flexbox>\n )}\n {description && (\n <Text\n style={childStyles.desc}\n ellipsis={{\n rows: 4,\n }}\n >\n {description}\n </Text>\n )}\n {link && (\n <div {...stylex.props(styles.link)}>\n <A href={link} rel=\"noreferrer\" target={openExternal ? '_blank' : undefined}>\n Read More\n </A>\n </div>\n )}\n </div>\n </div>\n );\n },\n);\n\nItem.displayName = 'FeatureItem';\n\nexport default Item;\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,QAAQ,MAKV,EACF,OACA,WACA,OACA,YACI;CACJ,OAAO,MAAM,WAAW,MAAM,IAAI,oBAAC,KAAD;EAAK,KAAK;EAAkB;EAAW,KAAK;EAAc;CAAQ,CAAA,IAAI,oBAAC,QAAD;EAAmB;EAAkB;EACtI,UAAA;CACK,CAAA;AACd,CAAC;AACD,MAAM,OAAO,MAAwB,EACnC,OACA,WACA,KACA,QACA,aACA,OACA,OACA,MACA,MACA,YACA,cACA,GAAG,WACC;CACJ,MAAM,YAAY,OAAO;CACzB,MAAM,UAAU,QAAQ,IAAI;CAC5B,MAAM,eAAe,eAAuC;EAC1D,sBAAsB,OAAO,SAAS;EACtC,+BAA+B,UAAU,SAAS;CACpD,IAAI,CAAC,WAAW,OAAO,CAAC;CACxB,OAAO,oBAAC,OAAD;EAAK,GAAI,WAAW,OAAO,
|
|
1
|
+
{"version":3,"file":"FeatureItem.mjs","names":["clsx","Flexbox"],"sources":["../../../src/awesome/Features/FeatureItem.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { type CSSProperties, memo, useMemo } from 'react';\n\nimport A from '@/A';\nimport { Center, Flexbox } from '@/Flex';\nimport Icon from '@/Icon';\nimport Img from '@/Img';\nimport { styleProps } from '@/styles/stylex/props';\nimport Text from '@/Text';\n\nimport { childStyles, styles } from './style';\nimport type { FeatureItemProps } from './type';\n\nconst Image = memo<{ className?: string; image: string; style?: CSSProperties; title: string }>(\n ({ image, className, title, style }) => {\n return image.startsWith('http') ? (\n <Img alt={title} className={className} src={image} style={style} />\n ) : (\n <Center className={className} style={style}>\n {image}\n </Center>\n );\n },\n);\n\nconst Item = memo<FeatureItemProps>(\n ({\n style,\n className,\n row,\n column,\n description,\n image,\n title,\n link,\n icon,\n imageStyle,\n openExternal,\n ...rest\n }) => {\n const rowNumber = row || 7;\n const hasLink = Boolean(link);\n\n const cssVariables = useMemo<Record<string, string>>(\n () => ({\n '--features-row-num': String(rowNumber),\n '--features-title-hover-size': hasLink ? '14px' : '20px',\n }),\n [rowNumber, hasLink],\n );\n\n return (\n <div\n {...styleProps(styles.container, clsx('lobe-features-item', className), {\n ...cssVariables,\n gridColumn: `span ${column || 1}`,\n gridRow: `span ${rowNumber}`,\n ...style,\n })}\n {...rest}\n >\n <div {...stylex.props(styles.cell)}>\n {image ||\n (icon && (\n <Center {...styleProps(styles.imgContainer, undefined, imageStyle)}>\n {icon && <Icon icon={icon} style={childStyles.img} />}\n {image && <Image image={image} style={childStyles.img} title={title} />}\n </Center>\n ))}\n {title && (\n <Flexbox\n horizontal\n align={'center'}\n as={'h3'}\n className={stylex.props(styles.title).className}\n gap={8}\n >\n {title}\n </Flexbox>\n )}\n {description && (\n <Text\n style={childStyles.desc}\n ellipsis={{\n rows: 4,\n }}\n >\n {description}\n </Text>\n )}\n {link && (\n <div {...stylex.props(styles.link)}>\n <A href={link} rel=\"noreferrer\" target={openExternal ? '_blank' : undefined}>\n Read More\n </A>\n </div>\n )}\n </div>\n </div>\n );\n },\n);\n\nItem.displayName = 'FeatureItem';\n\nexport default Item;\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,QAAQ,MAKV,EACF,OACA,WACA,OACA,YACI;CACJ,OAAO,MAAM,WAAW,MAAM,IAAI,oBAAC,KAAD;EAAK,KAAK;EAAkB;EAAW,KAAK;EAAc;CAAQ,CAAA,IAAI,oBAAC,QAAD;EAAmB;EAAkB;EACtI,UAAA;CACK,CAAA;AACd,CAAC;AACD,MAAM,OAAO,MAAwB,EACnC,OACA,WACA,KACA,QACA,aACA,OACA,OACA,MACA,MACA,YACA,cACA,GAAG,WACC;CACJ,MAAM,YAAY,OAAO;CACzB,MAAM,UAAU,QAAQ,IAAI;CAC5B,MAAM,eAAe,eAAuC;EAC1D,sBAAsB,OAAO,SAAS;EACtC,+BAA+B,UAAU,SAAS;CACpD,IAAI,CAAC,WAAW,OAAO,CAAC;CACxB,OAAO,oBAAC,OAAD;EAAK,GAAI,WAAW,OAAO,WAAWA,OAAK,sBAAsB,SAAS,GAAG;GAClF,GAAG;GACH,YAAY,QAAQ,UAAU;GAC9B,SAAS,QAAQ;GACjB,GAAG;EACL,CAAC;EAAG,GAAI;EACF,UAAA,qBAAC,OAAD;GAAK,GAAI,OAAO,MAAM,OAAO,IAAI;GAAjC,UAAA;IACG,SAAS,QAAQ,qBAAC,QAAD;KAAQ,GAAI,WAAW,OAAO,cAAc,KAAA,GAAW,UAAU;KAAjE,UAAA,CACX,QAAQ,oBAAC,MAAD;MAAY;MAAM,OAAO,YAAY;KAAM,CAAA,GACnD,SAAS,oBAAC,OAAD;MAAc;MAAO,OAAO,YAAY;MAAY;KAAQ,CAAA,CAChE;;IACX,SAAS,oBAACC,mBAAD;KAAS,YAAA;KAAW,OAAO;KAAU,IAAI;KAAM,WAAW,OAAO,MAAM,OAAO,KAAK,CAAC,CAAC;KAAW,KAAK;KAC1G,UAAA;IACM,CAAA;IACV,eAAe,oBAAC,MAAD;KAAM,OAAO,YAAY;KAAM,UAAU,EAC3D,MAAM,EACR;KACS,UAAA;IACG,CAAA;IACP,QAAQ,oBAAC,OAAD;KAAK,GAAI,OAAO,MAAM,OAAO,IAAI;KACtC,UAAA,oBAAC,GAAD;MAAG,MAAM;MAAM,KAAI;MAAa,QAAQ,eAAe,WAAW,KAAA;MAAW,UAAA;KAE1E,CAAA;IACA,CAAA;GACJ;;CACF,CAAA;AACX,CAAC;AACD,KAAK,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { withAlpha } from "../../utils/colorMath.mjs";
|
|
1
2
|
import { useTheme } from "../../styles/theme/scope.mjs";
|
|
2
3
|
import { safeReadableColor } from "../../utils/safeReadableColor.mjs";
|
|
3
4
|
import { useMemo } from "react";
|
|
4
|
-
import { rgba } from "polished";
|
|
5
5
|
//#region src/awesome/Giscus/style.ts
|
|
6
6
|
const useStyles = () => {
|
|
7
7
|
const theme = useTheme();
|
|
@@ -26,22 +26,22 @@ const useStyles = () => {
|
|
|
26
26
|
--color-prettylights-syntax-variable: ${colorRed};
|
|
27
27
|
--color-prettylights-syntax-brackethighlighter-unmatched: ${colorRed};
|
|
28
28
|
--color-prettylights-syntax-invalid-illegal-text: ${colorTextSecondary};
|
|
29
|
-
--color-prettylights-syntax-invalid-illegal-bg: ${
|
|
29
|
+
--color-prettylights-syntax-invalid-illegal-bg: ${withAlpha(colorRed, .4)};
|
|
30
30
|
--color-prettylights-syntax-carriage-return-text: ${colorTextSecondary};
|
|
31
|
-
--color-prettylights-syntax-carriage-return-bg: ${
|
|
31
|
+
--color-prettylights-syntax-carriage-return-bg: ${withAlpha(colorRed, .6)};
|
|
32
32
|
--color-prettylights-syntax-string-regexp: ${colorGreen};
|
|
33
33
|
--color-prettylights-syntax-markup-list: ${colorOrange};
|
|
34
34
|
--color-prettylights-syntax-markup-heading: ${colorBlue};
|
|
35
35
|
--color-prettylights-syntax-markup-italic: ${colorTextSecondary};
|
|
36
36
|
--color-prettylights-syntax-markup-bold: ${colorTextSecondary};
|
|
37
37
|
--color-prettylights-syntax-markup-deleted-text: ${colorTextSecondary};
|
|
38
|
-
--color-prettylights-syntax-markup-deleted-bg: ${
|
|
38
|
+
--color-prettylights-syntax-markup-deleted-bg: ${withAlpha(colorRed, .2)};
|
|
39
39
|
--color-prettylights-syntax-markup-inserted-text: ${colorGreen};
|
|
40
|
-
--color-prettylights-syntax-markup-inserted-bg: ${
|
|
40
|
+
--color-prettylights-syntax-markup-inserted-bg: ${withAlpha(colorGreen, .2)};
|
|
41
41
|
--color-prettylights-syntax-markup-changed-text: ${colorOrange};
|
|
42
|
-
--color-prettylights-syntax-markup-changed-bg: ${
|
|
42
|
+
--color-prettylights-syntax-markup-changed-bg: ${withAlpha(colorRed, .2)};
|
|
43
43
|
--color-prettylights-syntax-markup-ignored-text: ${colorTextSecondary};
|
|
44
|
-
--color-prettylights-syntax-markup-ignored-bg: ${
|
|
44
|
+
--color-prettylights-syntax-markup-ignored-bg: ${withAlpha(colorBlue, .2)};
|
|
45
45
|
--color-prettylights-syntax-meta-diff-range: ${colorOrange};
|
|
46
46
|
--color-prettylights-syntax-brackethighlighter-angle: ${colorTextSecondary};
|
|
47
47
|
--color-prettylights-syntax-sublimelinter-gutter-mark: ${colorTextTertiary};
|
|
@@ -70,8 +70,8 @@ const useStyles = () => {
|
|
|
70
70
|
${safeReadableColor(theme.colorPrimary)} 50%,
|
|
71
71
|
transparent
|
|
72
72
|
);
|
|
73
|
-
--color-btn-primary-disabled-bg: ${
|
|
74
|
-
--color-btn-primary-disabled-border: ${
|
|
73
|
+
--color-btn-primary-disabled-bg: ${withAlpha(theme.colorPrimary, .5)};
|
|
74
|
+
--color-btn-primary-disabled-border: ${withAlpha(theme.colorPrimaryBorder, .5)};
|
|
75
75
|
--color-action-list-item-default-hover-bg: ${theme.colorFillQuaternary};
|
|
76
76
|
--color-segmented-control-bg: ${theme.colorFillTertiary};
|
|
77
77
|
--color-segmented-control-button-bg: transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/awesome/Giscus/style.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/awesome/Giscus/style.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useTheme } from '@/styles/theme/scope';\nimport { withAlpha } from '@/utils/colorMath';\nimport { safeReadableColor } from '@/utils/safeReadableColor';\n\nexport const useStyles = () => {\n const theme = useTheme();\n const colorText = theme.colorText;\n const colorTextSecondary = theme.colorTextSecondary;\n const colorTextTertiary = theme.colorTextTertiary;\n const colorRed = theme.colorError;\n const colorOrange = theme.colorWarning;\n const colorGreen = theme.colorSuccess;\n const colorBlue = theme.colorInfo;\n const loaderContainer = theme.isDarkMode\n ? 'https://github.com/images/modules/pulls/progressive-disclosure-line-dark.svg'\n : 'https://github.com/images/modules/pulls/progressive-disclosure-line.svg';\n const loadingImage = theme.isDarkMode\n ? 'https://github.githubassets.com/images/mona-loading-dark.gif'\n : 'https://github.githubassets.com/images/mona-loading-default.gif';\n const styles = `\n main {\n --color-prettylights-syntax-comment: ${colorTextTertiary};\n --color-prettylights-syntax-constant: ${colorGreen};\n --color-prettylights-syntax-entity: ${colorOrange};\n --color-prettylights-syntax-storage-modifier-import: ${colorRed};\n --color-prettylights-syntax-entity-tag: ${colorBlue};\n --color-prettylights-syntax-keyword: ${colorBlue};\n --color-prettylights-syntax-string: ${colorGreen};\n --color-prettylights-syntax-variable: ${colorRed};\n --color-prettylights-syntax-brackethighlighter-unmatched: ${colorRed};\n --color-prettylights-syntax-invalid-illegal-text: ${colorTextSecondary};\n --color-prettylights-syntax-invalid-illegal-bg: ${withAlpha(colorRed, 0.4)};\n --color-prettylights-syntax-carriage-return-text: ${colorTextSecondary};\n --color-prettylights-syntax-carriage-return-bg: ${withAlpha(colorRed, 0.6)};\n --color-prettylights-syntax-string-regexp: ${colorGreen};\n --color-prettylights-syntax-markup-list: ${colorOrange};\n --color-prettylights-syntax-markup-heading: ${colorBlue};\n --color-prettylights-syntax-markup-italic: ${colorTextSecondary};\n --color-prettylights-syntax-markup-bold: ${colorTextSecondary};\n --color-prettylights-syntax-markup-deleted-text: ${colorTextSecondary};\n --color-prettylights-syntax-markup-deleted-bg: ${withAlpha(colorRed, 0.2)};\n --color-prettylights-syntax-markup-inserted-text: ${colorGreen};\n --color-prettylights-syntax-markup-inserted-bg: ${withAlpha(colorGreen, 0.2)};\n --color-prettylights-syntax-markup-changed-text: ${colorOrange};\n --color-prettylights-syntax-markup-changed-bg: ${withAlpha(colorRed, 0.2)};\n --color-prettylights-syntax-markup-ignored-text: ${colorTextSecondary};\n --color-prettylights-syntax-markup-ignored-bg: ${withAlpha(colorBlue, 0.2)};\n --color-prettylights-syntax-meta-diff-range: ${colorOrange};\n --color-prettylights-syntax-brackethighlighter-angle: ${colorTextSecondary};\n --color-prettylights-syntax-sublimelinter-gutter-mark: ${colorTextTertiary};\n --color-prettylights-syntax-constant-other-reference-link: ${colorBlue};\n --color-btn-text: ${theme.colorText};\n --color-btn-bg: ${theme.colorFillTertiary};\n --color-btn-border: ${theme.colorBorderSecondary};\n --color-btn-shadow: 0 0 transparent;\n --color-btn-inset-shadow: 0 0 transparent;\n --color-btn-hover-bg: ${theme.colorFillSecondary};\n --color-btn-hover-border: ${theme.colorBorder};\n --color-btn-active-bg: ${theme.colorFillSecondary};\n --color-btn-active-border: ${theme.colorBorder};\n --color-btn-selected-bg: ${theme.colorFillSecondary};\n --color-btn-primary-text: ${safeReadableColor(theme.colorPrimary)};\n --color-btn-primary-bg: ${theme.colorPrimary};\n --color-btn-primary-border: ${theme.colorPrimaryBorder};\n --color-btn-primary-shadow: 0 0 transparent;\n --color-btn-primary-inset-shadow: 0 0 transparent;\n --color-btn-primary-hover-bg: ${theme.colorPrimaryHover};\n --color-btn-primary-hover-border: ${theme.colorPrimaryBorderHover};\n --color-btn-primary-selected-bg: ${theme.colorPrimaryActive};\n --color-btn-primary-selected-shadow: 0 0 transparent;\n --color-btn-primary-disabled-text: color-mix(\n in srgb,\n ${safeReadableColor(theme.colorPrimary)} 50%,\n transparent\n );\n --color-btn-primary-disabled-bg: ${withAlpha(theme.colorPrimary, 0.5)};\n --color-btn-primary-disabled-border: ${withAlpha(theme.colorPrimaryBorder, 0.5)};\n --color-action-list-item-default-hover-bg: ${theme.colorFillQuaternary};\n --color-segmented-control-bg: ${theme.colorFillTertiary};\n --color-segmented-control-button-bg: transparent;\n --color-segmented-control-button-selected-border: ${theme.colorBorder};\n --color-fg-default: ${theme.colorText};\n --color-fg-muted: ${theme.colorTextSecondary};\n --color-fg-subtle: ${theme.colorTextQuaternary};\n --color-canvas-default: transparent;\n --color-canvas-overlay: ${theme.colorBgElevated};\n --color-canvas-inset: transparent;\n --color-canvas-subtle: ${theme.colorFillQuaternary};\n --color-border-default: ${theme.colorBorder};\n --color-border-muted: ${theme.colorBorderSecondary};\n --color-neutral-muted: ${theme.colorFillQuaternary};\n --color-neutral-subtle: ${theme.colorFillTertiary};\n --color-accent-fg: ${theme.colorInfo};\n --color-accent-emphasis: ${theme.colorInfoBorderHover};\n --color-accent-muted: ${theme.colorInfoBorder};\n --color-accent-subtle: ${theme.colorInfoBg};\n --color-success-fg: ${theme.colorSuccess};\n --color-attention-fg: ${theme.colorWarning};\n --color-attention-muted: ${theme.colorWarningBorder};\n --color-attention-subtle: ${theme.colorWarningBg};\n --color-danger-fg: ${theme.colorError};\n --color-danger-muted: ${theme.colorErrorBorder};\n --color-danger-subtle: ${theme.colorErrorBg};\n --color-primer-shadow-inset: 0 0 transparent;\n --color-scale-gray-7: ${theme.colorBgContainer};\n --color-scale-blue-8: ${theme.colorInfoBg};\n --color-social-reaction-bg-hover: ${theme.colorFillSecondary};\n --color-social-reaction-bg-reacted-hover: ${theme.colorInfoBgHover};\n\n .markdown pre {\n color: ${colorText};\n }\n\n .pagination-loader-container {\n background-image: url(${loaderContainer});\n }\n\n .gsc-pagination-button {\n background-color: var(--color-btn-bg);\n }\n\n .gsc-reactions-popover {\n width: 170px;\n\n > .m-2 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n }\n\n .gsc-emoji-button.has-reacted {\n border-color: ${theme.colorInfoBorderHover};\n border-radius: ${theme.borderRadius}px;\n }\n\n .gsc-loading-image {\n background-image: url(${loadingImage});\n }\n }\n `;\n\n return useMemo(() => `data:text/css;base64,${btoa(styles)}`, [styles]);\n};\n\nexport const formatLang = (lang: string) => {\n if (['zh_CN', 'zh_TW'].includes(lang)) {\n return lang.replace('_', '-');\n } else if (lang === 'zh_HK') {\n return 'zh-TW';\n } else {\n return lang.split('_')[0];\n }\n};\n"],"mappings":";;;;;AAMA,MAAa,kBAAkB;CAC7B,MAAM,QAAQ,SAAS;CACvB,MAAM,YAAY,MAAM;CACxB,MAAM,qBAAqB,MAAM;CACjC,MAAM,oBAAoB,MAAM;CAChC,MAAM,WAAW,MAAM;CACvB,MAAM,cAAc,MAAM;CAC1B,MAAM,aAAa,MAAM;CACzB,MAAM,YAAY,MAAM;CACxB,MAAM,kBAAkB,MAAM,aAC1B,iFACA;CACJ,MAAM,eAAe,MAAM,aACvB,iEACA;CACJ,MAAM,SAAS;;6CAE4B,kBAAkB;8CACjB,WAAW;4CACb,YAAY;6DACK,SAAS;gDACtB,UAAU;6CACb,UAAU;4CACX,WAAW;8CACT,SAAS;kEACW,SAAS;0DACjB,mBAAmB;wDACrB,UAAU,UAAU,EAAG,EAAE;0DACvB,mBAAmB;wDACrB,UAAU,UAAU,EAAG,EAAE;mDAC9B,WAAW;iDACb,YAAY;oDACT,UAAU;mDACX,mBAAmB;iDACrB,mBAAmB;yDACX,mBAAmB;uDACrB,UAAU,UAAU,EAAG,EAAE;0DACtB,WAAW;wDACb,UAAU,YAAY,EAAG,EAAE;yDAC1B,YAAY;uDACd,UAAU,UAAU,EAAG,EAAE;yDACvB,mBAAmB;uDACrB,UAAU,WAAW,EAAG,EAAE;qDAC5B,YAAY;8DACH,mBAAmB;+DAClB,kBAAkB;mEACd,UAAU;0BACnD,MAAM,UAAU;wBAClB,MAAM,kBAAkB;4BACpB,MAAM,qBAAqB;;;8BAGzB,MAAM,mBAAmB;kCACrB,MAAM,YAAY;+BACrB,MAAM,mBAAmB;mCACrB,MAAM,YAAY;iCACpB,MAAM,mBAAmB;kCACxB,kBAAkB,MAAM,YAAY,EAAE;gCACxC,MAAM,aAAa;oCACf,MAAM,mBAAmB;;;sCAGvB,MAAM,kBAAkB;0CACpB,MAAM,wBAAwB;yCAC/B,MAAM,mBAAmB;;;;UAIxD,kBAAkB,MAAM,YAAY,EAAE;;;yCAGP,UAAU,MAAM,cAAc,EAAG,EAAE;6CAC/B,UAAU,MAAM,oBAAoB,EAAG,EAAE;mDACnC,MAAM,oBAAoB;sCACvC,MAAM,kBAAkB;;0DAEJ,MAAM,YAAY;4BAChD,MAAM,UAAU;0BAClB,MAAM,mBAAmB;2BACxB,MAAM,oBAAoB;;gCAErB,MAAM,gBAAgB;;+BAEvB,MAAM,oBAAoB;gCACzB,MAAM,YAAY;8BACpB,MAAM,qBAAqB;+BAC1B,MAAM,oBAAoB;gCACzB,MAAM,kBAAkB;2BAC7B,MAAM,UAAU;iCACV,MAAM,qBAAqB;8BAC9B,MAAM,gBAAgB;+BACrB,MAAM,YAAY;4BACrB,MAAM,aAAa;8BACjB,MAAM,aAAa;iCAChB,MAAM,mBAAmB;kCACxB,MAAM,eAAe;2BAC5B,MAAM,WAAW;8BACd,MAAM,iBAAiB;+BACtB,MAAM,aAAa;;8BAEpB,MAAM,iBAAiB;8BACvB,MAAM,YAAY;0CACN,MAAM,mBAAmB;kDACjB,MAAM,iBAAiB;;;iBAGxD,UAAU;;;;gCAIK,gBAAgB;;;;;;;;;;;;;;;;;;wBAkBxB,MAAM,qBAAqB;yBAC1B,MAAM,aAAa;;;;gCAIZ,aAAa;;;;CAK3C,OAAO,cAAc,wBAAwB,KAAK,MAAM,KAAK,CAAC,MAAM,CAAC;AACvE;AAEA,MAAa,cAAc,SAAiB;CAC1C,IAAI,CAAC,SAAS,OAAO,CAAC,CAAC,SAAS,IAAI,GAClC,OAAO,KAAK,QAAQ,KAAK,GAAG;MACvB,IAAI,SAAS,SAClB,OAAO;MAEP,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC;AAE3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GrainientProps } from "./type.mjs";
|
|
2
|
+
//#region src/awesome/Grainient/Grainient.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Animated grainy gradient (WebGL2, no extra dependency). Fills its nearest positioned ancestor,
|
|
5
|
+
* pauses when off-screen or the tab is hidden, and draws one still frame when reduced motion is
|
|
6
|
+
* preferred. Without WebGL2 it renders nothing, so give the parent a fallback background.
|
|
7
|
+
*/
|
|
8
|
+
declare const Grainient: import("react").NamedExoticComponent<GrainientProps>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Grainient as default };
|
|
11
|
+
//# sourceMappingURL=Grainient.d.mts.map
|