@react-hive/honey-layout 15.0.0 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HoneyBox/HoneyBox.d.ts +5 -5
- package/dist/components/HoneyFlex/HoneyFlex.d.ts +2 -2
- package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +2 -2
- package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +2 -2
- package/dist/components/HoneyList/HoneyListStyled.d.ts +2 -2
- package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +2 -2
- package/dist/components/HoneyPopup/hooks/use-honey-popup.d.ts +3 -3
- package/dist/effects.d.ts +2 -2
- package/dist/helpers/helpers.d.ts +3 -3
- package/dist/hooks/index.d.ts +0 -11
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.dev.cjs +424 -1434
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/dist/types/css.types.d.ts +11 -11
- package/package.json +10 -9
- package/dist/hooks/use-honey-decay.d.ts +0 -179
- package/dist/hooks/use-honey-document-key-up.d.ts +0 -40
- package/dist/hooks/use-honey-drag.d.ts +0 -200
- package/dist/hooks/use-honey-latest.d.ts +0 -18
- package/dist/hooks/use-honey-on-change.d.ts +0 -27
- package/dist/hooks/use-honey-raf-loop.d.ts +0 -164
- package/dist/hooks/use-honey-resize.d.ts +0 -45
- package/dist/hooks/use-honey-synthetic-scroll-x.d.ts +0 -19
- package/dist/hooks/use-honey-synthetic-scroll-y.d.ts +0 -19
- package/dist/hooks/use-honey-synthetic-scroll.d.ts +0 -143
- package/dist/hooks/use-honey-timer.d.ts +0 -107
package/dist/index.dev.cjs
CHANGED
|
@@ -4478,7 +4478,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4478
4478
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
4479
4479
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
4480
4480
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
4481
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
4481
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
4482
4482
|
/* harmony import */ var _HoneyLayerRegistryContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HoneyLayerRegistryContext */ "./src/components/HoneyLayerRegistry/HoneyLayerRegistryContext.ts");
|
|
4483
4483
|
|
|
4484
4484
|
|
|
@@ -4592,7 +4592,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4592
4592
|
/* harmony export */ });
|
|
4593
4593
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
4594
4594
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4595
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
4595
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
4596
4596
|
/* harmony import */ var _HoneyLayerRegistryContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HoneyLayerRegistryContext */ "./src/components/HoneyLayerRegistry/HoneyLayerRegistryContext.ts");
|
|
4597
4597
|
|
|
4598
4598
|
|
|
@@ -4826,7 +4826,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4826
4826
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
4827
4827
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
4828
4828
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
4829
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
4829
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
4830
4830
|
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.ts");
|
|
4831
4831
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.ts");
|
|
4832
4832
|
/* harmony import */ var _HoneyFlex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HoneyFlex */ "./src/components/HoneyFlex/index.ts");
|
|
@@ -4935,8 +4935,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4935
4935
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
4936
4936
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
4937
4937
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
4938
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
4939
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
4938
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs");
|
|
4939
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
4940
4940
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components */ "./src/components/index.ts");
|
|
4941
4941
|
/* harmony import */ var _HoneyPopupStyled__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HoneyPopupStyled */ "./src/components/HoneyPopup/HoneyPopupStyled.ts");
|
|
4942
4942
|
/* harmony import */ var _HoneyPopupPortal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HoneyPopupPortal */ "./src/components/HoneyPopup/HoneyPopupPortal.tsx");
|
|
@@ -5004,7 +5004,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5004
5004
|
/* harmony export */ HoneyPopupPortal: () => (/* binding */ HoneyPopupPortal)
|
|
5005
5005
|
/* harmony export */ });
|
|
5006
5006
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
5007
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
5007
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs");
|
|
5008
5008
|
|
|
5009
5009
|
|
|
5010
5010
|
const HoneyPopupPortal = ({ children, enabled = true, ...props }) => {
|
|
@@ -5049,7 +5049,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5049
5049
|
/* harmony export */ HoneyPopupTree: () => (/* binding */ HoneyPopupTree)
|
|
5050
5050
|
/* harmony export */ });
|
|
5051
5051
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
5052
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
5052
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs");
|
|
5053
5053
|
|
|
5054
5054
|
|
|
5055
5055
|
/**
|
|
@@ -5101,7 +5101,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5101
5101
|
/* harmony export */ });
|
|
5102
5102
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5103
5103
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5104
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
5104
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5105
5105
|
/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../components */ "./src/components/index.ts");
|
|
5106
5106
|
|
|
5107
5107
|
|
|
@@ -5126,7 +5126,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5126
5126
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5127
5127
|
/* harmony export */ useHoneyPopupInteractions: () => (/* binding */ useHoneyPopupInteractions)
|
|
5128
5128
|
/* harmony export */ });
|
|
5129
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
5129
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs");
|
|
5130
5130
|
|
|
5131
5131
|
const useHoneyPopupInteractions = (context, { enabled = true, event = 'click', dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, extraInteractions = [], }) => {
|
|
5132
5132
|
const dismiss = (0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_0__.useDismiss)(context, {
|
|
@@ -5171,12 +5171,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5171
5171
|
/* harmony export */ });
|
|
5172
5172
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5173
5173
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5174
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
5175
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+dom@1.7.
|
|
5176
|
-
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.
|
|
5177
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
5178
|
-
/* harmony import */ var
|
|
5179
|
-
/* harmony import */ var
|
|
5174
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs");
|
|
5175
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs");
|
|
5176
|
+
/* harmony import */ var _floating_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @floating-ui/react */ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.8_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs");
|
|
5177
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5178
|
+
/* harmony import */ var _react_hive_honey_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @react-hive/honey-hooks */ "./node_modules/.pnpm/@react-hive+honey-hooks@1.0.0_react@19.2.4/node_modules/@react-hive/honey-hooks/dist/index.mjs");
|
|
5179
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../hooks */ "./src/hooks/index.ts");
|
|
5180
|
+
/* harmony import */ var _use_honey_popup_interactions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./use-honey-popup-interactions */ "./src/components/HoneyPopup/hooks/use-honey-popup-interactions.ts");
|
|
5181
|
+
|
|
5180
5182
|
|
|
5181
5183
|
|
|
5182
5184
|
|
|
@@ -5190,7 +5192,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5190
5192
|
* @returns An object containing state and utilities for managing the popup.
|
|
5191
5193
|
*/
|
|
5192
5194
|
const useHoneyPopup = ({ enabled = true, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, extraInteractions, open, floatingOptions, useOffset = true, offsetOptions, useFlip = true, flipOptions, useShift = true, shiftOptions, useArrow = false, arrowOptions, transitionOptions, useAutoPlacement = false, autoPlacementOptions, useAutoUpdate = false, autoUpdateOptions, useAutoSize = false, sizeOptions, minAcceptableWidth = null, minAcceptableHeight = null, maxAcceptableWidth, maxAcceptableHeight, onOpen, onClose, }) => {
|
|
5193
|
-
const { theme } = (0,
|
|
5195
|
+
const { theme } = (0,_hooks__WEBPACK_IMPORTED_MODULE_6__.useHoneyLayout)();
|
|
5194
5196
|
const nodeId = (0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_1__.useFloatingNodeId)();
|
|
5195
5197
|
const [isOpenLocal, setIsOpenLocal] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
5196
5198
|
const arrowRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
@@ -5200,7 +5202,7 @@ const useHoneyPopup = ({ enabled = true, event, dismissOptions, clickOptions, ho
|
|
|
5200
5202
|
onOpen?.();
|
|
5201
5203
|
}
|
|
5202
5204
|
}, [isOpen]);
|
|
5203
|
-
(0,
|
|
5205
|
+
(0,_react_hive_honey_hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyOnChange)(enabled, enabled => {
|
|
5204
5206
|
if (!enabled) {
|
|
5205
5207
|
setIsOpenLocal(false);
|
|
5206
5208
|
}
|
|
@@ -5312,7 +5314,7 @@ const useHoneyPopup = ({ enabled = true, event, dismissOptions, clickOptions, ho
|
|
|
5312
5314
|
}),
|
|
5313
5315
|
...floatingOptions,
|
|
5314
5316
|
});
|
|
5315
|
-
const interactions = (0,
|
|
5317
|
+
const interactions = (0,_use_honey_popup_interactions__WEBPACK_IMPORTED_MODULE_7__.useHoneyPopupInteractions)(floating.context, {
|
|
5316
5318
|
enabled,
|
|
5317
5319
|
event,
|
|
5318
5320
|
dismissOptions,
|
|
@@ -5565,8 +5567,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5565
5567
|
/* harmony export */ });
|
|
5566
5568
|
/* harmony import */ var _react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-style */ "@react-hive/honey-style");
|
|
5567
5569
|
/* harmony import */ var _react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__);
|
|
5568
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
5569
|
-
|
|
5570
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5570
5571
|
|
|
5571
5572
|
|
|
5572
5573
|
const generateUniqueId = () => {
|
|
@@ -5587,7 +5588,7 @@ const generateUniqueId = () => {
|
|
|
5587
5588
|
*
|
|
5588
5589
|
* @returns `true` if the property is a spacing property, otherwise `false`.
|
|
5589
5590
|
*/
|
|
5590
|
-
const
|
|
5591
|
+
const isSpacingCssProperty = (propertyName) => _react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.CSS_SPACING_PROPERTIES.includes(propertyName);
|
|
5591
5592
|
/**
|
|
5592
5593
|
* Type guard function to check if a property name is a color property.
|
|
5593
5594
|
*
|
|
@@ -5595,7 +5596,7 @@ const checkIsSpacingCSSProperty = (propertyName) => _react_hive_honey_style__WEB
|
|
|
5595
5596
|
*
|
|
5596
5597
|
* @returns True if the property name is a color property, false otherwise.
|
|
5597
5598
|
*/
|
|
5598
|
-
const
|
|
5599
|
+
const isColorCssProperty = (propertyName) => _react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.CSS_COLOR_PROPERTIES.includes(propertyName);
|
|
5599
5600
|
/**
|
|
5600
5601
|
* Determines if a given HTML property is a CSS property that is prefixed with a '$'.
|
|
5601
5602
|
* This convention is typically used for applying dynamic or responsive styles.
|
|
@@ -5604,7 +5605,7 @@ const checkIsColorCSSProperty = (propertyName) => _react_hive_honey_style__WEBPA
|
|
|
5604
5605
|
*
|
|
5605
5606
|
* @returns Returns true if the property is a valid prefixed CSS property, otherwise false.
|
|
5606
5607
|
*/
|
|
5607
|
-
const is$
|
|
5608
|
+
const is$PrefixedCssProperty = (propertyName) => propertyName[0] === '$';
|
|
5608
5609
|
/**
|
|
5609
5610
|
* Retrieves the CSS property value for a specific breakpoint, potentially resolving it to include units.
|
|
5610
5611
|
*
|
|
@@ -5625,7 +5626,7 @@ const is$PrefixedCSSProperty = (propertyName) => propertyName[0] === '$';
|
|
|
5625
5626
|
* - A direct value (if `propertyValue` was not an object or the property is not related to dimensions).
|
|
5626
5627
|
* - A value formatted with units (if the property is related to dimensions or spacing and `resolveSpacing` was applied).
|
|
5627
5628
|
*/
|
|
5628
|
-
const
|
|
5629
|
+
const getCssPropertyValue = (propertyName, propertyValue, breakpoint) => {
|
|
5629
5630
|
// Determine the actual value to use based on the breakpoint
|
|
5630
5631
|
const resolvedValue = typeof propertyValue === 'object' && !Array.isArray(propertyValue)
|
|
5631
5632
|
? propertyValue[breakpoint]
|
|
@@ -5633,13 +5634,13 @@ const getCSSPropertyValue = (propertyName, propertyValue, breakpoint) => {
|
|
|
5633
5634
|
if (resolvedValue === undefined) {
|
|
5634
5635
|
return undefined;
|
|
5635
5636
|
}
|
|
5636
|
-
if (
|
|
5637
|
+
if (isSpacingCssProperty(propertyName)) {
|
|
5637
5638
|
if (typeof resolvedValue === 'number' || Array.isArray(resolvedValue)) {
|
|
5638
5639
|
return (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.resolveSpacing)(resolvedValue, 'px');
|
|
5639
5640
|
}
|
|
5640
5641
|
}
|
|
5641
|
-
else if (
|
|
5642
|
-
if (typeof resolvedValue === 'string' && (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.
|
|
5642
|
+
else if (isColorCssProperty(propertyName)) {
|
|
5643
|
+
if (typeof resolvedValue === 'string' && (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.isThemeColorValue)(resolvedValue)) {
|
|
5643
5644
|
return (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.resolveColor)(resolvedValue);
|
|
5644
5645
|
}
|
|
5645
5646
|
}
|
|
@@ -5655,8 +5656,8 @@ const getCSSPropertyValue = (propertyName, propertyValue, breakpoint) => {
|
|
|
5655
5656
|
*
|
|
5656
5657
|
* @returns An array of tuples where each tuple contains a Honey-prefixed CSS property and its value.
|
|
5657
5658
|
*/
|
|
5658
|
-
const
|
|
5659
|
-
const isMatchingXsBreakpoint = breakpoint === 'xs' && is$
|
|
5659
|
+
const matchCssProperties = (props, breakpoint) => Object.entries(props).filter(([propertyName, propertyValue]) => {
|
|
5660
|
+
const isMatchingXsBreakpoint = breakpoint === 'xs' && is$PrefixedCssProperty(propertyName);
|
|
5660
5661
|
return (isMatchingXsBreakpoint ||
|
|
5661
5662
|
(propertyValue && typeof propertyValue === 'object' && breakpoint in propertyValue));
|
|
5662
5663
|
});
|
|
@@ -5673,10 +5674,10 @@ const matchCSSProperties = (props, breakpoint) => Object.entries(props).filter((
|
|
|
5673
5674
|
* with styles generated for the specified breakpoint.
|
|
5674
5675
|
*/
|
|
5675
5676
|
const createStyles = (breakpoint) => ({ theme, ...props }) => (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.css) `
|
|
5676
|
-
${
|
|
5677
|
+
${matchCssProperties(props, breakpoint).map(([prefixedPropertyName, propertyValue]) => {
|
|
5677
5678
|
const propertyName = prefixedPropertyName.slice(1);
|
|
5678
5679
|
return (0,_react_hive_honey_style__WEBPACK_IMPORTED_MODULE_0__.css) `
|
|
5679
|
-
${(0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.camelToDashCase)(propertyName)}: ${
|
|
5680
|
+
${(0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.camelToDashCase)(propertyName)}: ${getCssPropertyValue(propertyName, propertyValue, breakpoint)};
|
|
5680
5681
|
`;
|
|
5681
5682
|
})}
|
|
5682
5683
|
`;
|
|
@@ -5690,7 +5691,7 @@ const createStyles = (breakpoint) => ({ theme, ...props }) => (0,_react_hive_hon
|
|
|
5690
5691
|
*
|
|
5691
5692
|
* @returns Returns true if at least one property in `props` has styles for the specified breakpoint; otherwise, false.
|
|
5692
5693
|
*/
|
|
5693
|
-
const hasBreakpointStyles = (breakpoint, props) => Object.entries(props).some(([propertyName, propertyValue]) => is$
|
|
5694
|
+
const hasBreakpointStyles = (breakpoint, props) => Object.entries(props).some(([propertyName, propertyValue]) => is$PrefixedCssProperty(propertyName) &&
|
|
5694
5695
|
typeof propertyValue === 'object' &&
|
|
5695
5696
|
breakpoint in propertyValue);
|
|
5696
5697
|
/**
|
|
@@ -5805,7 +5806,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5805
5806
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5806
5807
|
/* harmony export */ mergeRefs: () => (/* binding */ mergeRefs)
|
|
5807
5808
|
/* harmony export */ });
|
|
5808
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
5809
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5809
5810
|
|
|
5810
5811
|
/**
|
|
5811
5812
|
* Merges multiple refs into a single ref callback.
|
|
@@ -5815,1178 +5816,146 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5815
5816
|
*
|
|
5816
5817
|
* @returns A single ref callback that assigns the element to all provided refs.
|
|
5817
5818
|
*/
|
|
5818
|
-
const mergeRefs = (...refs) => value => {
|
|
5819
|
-
refs.forEach(ref => {
|
|
5820
|
-
if ((0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__.isFunction)(ref)) {
|
|
5821
|
-
ref(value);
|
|
5822
|
-
}
|
|
5823
|
-
else if ((0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__.isObject)(ref)) {
|
|
5824
|
-
ref.current = value;
|
|
5825
|
-
}
|
|
5826
|
-
});
|
|
5827
|
-
};
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
/***/ },
|
|
5831
|
-
|
|
5832
|
-
/***/ "./src/hooks/index.ts"
|
|
5833
|
-
/*!****************************!*\
|
|
5834
|
-
!*** ./src/hooks/index.ts ***!
|
|
5835
|
-
\****************************/
|
|
5836
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5837
|
-
|
|
5838
|
-
"use strict";
|
|
5839
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5840
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5841
|
-
/* harmony export */ resolveAxisTranslate: () => (/* reexport safe */ _use_honey_synthetic_scroll__WEBPACK_IMPORTED_MODULE_8__.resolveAxisTranslate),
|
|
5842
|
-
/* harmony export */ useHoneyDecay: () => (/* reexport safe */ _use_honey_decay__WEBPACK_IMPORTED_MODULE_13__.useHoneyDecay),
|
|
5843
|
-
/* harmony export */ useHoneyDocumentKeyUp: () => (/* reexport safe */ _use_honey_document_key_up__WEBPACK_IMPORTED_MODULE_3__.useHoneyDocumentKeyUp),
|
|
5844
|
-
/* harmony export */ useHoneyDrag: () => (/* reexport safe */ _use_honey_drag__WEBPACK_IMPORTED_MODULE_2__.useHoneyDrag),
|
|
5845
|
-
/* harmony export */ useHoneyLatest: () => (/* reexport safe */ _use_honey_latest__WEBPACK_IMPORTED_MODULE_14__.useHoneyLatest),
|
|
5846
|
-
/* harmony export */ useHoneyLayout: () => (/* reexport safe */ _use_honey_layout__WEBPACK_IMPORTED_MODULE_4__.useHoneyLayout),
|
|
5847
|
-
/* harmony export */ useHoneyMediaQuery: () => (/* reexport safe */ _use_honey_media_query__WEBPACK_IMPORTED_MODULE_1__.useHoneyMediaQuery),
|
|
5848
|
-
/* harmony export */ useHoneyOnChange: () => (/* reexport safe */ _use_honey_on_change__WEBPACK_IMPORTED_MODULE_0__.useHoneyOnChange),
|
|
5849
|
-
/* harmony export */ useHoneyOverlay: () => (/* reexport safe */ _use_honey_overlay__WEBPACK_IMPORTED_MODULE_6__.useHoneyOverlay),
|
|
5850
|
-
/* harmony export */ useHoneyRafLoop: () => (/* reexport safe */ _use_honey_raf_loop__WEBPACK_IMPORTED_MODULE_11__.useHoneyRafLoop),
|
|
5851
|
-
/* harmony export */ useHoneyResize: () => (/* reexport safe */ _use_honey_resize__WEBPACK_IMPORTED_MODULE_7__.useHoneyResize),
|
|
5852
|
-
/* harmony export */ useHoneySyntheticScroll: () => (/* reexport safe */ _use_honey_synthetic_scroll__WEBPACK_IMPORTED_MODULE_8__.useHoneySyntheticScroll),
|
|
5853
|
-
/* harmony export */ useHoneySyntheticScrollX: () => (/* reexport safe */ _use_honey_synthetic_scroll_x__WEBPACK_IMPORTED_MODULE_9__.useHoneySyntheticScrollX),
|
|
5854
|
-
/* harmony export */ useHoneySyntheticScrollY: () => (/* reexport safe */ _use_honey_synthetic_scroll_y__WEBPACK_IMPORTED_MODULE_10__.useHoneySyntheticScrollY),
|
|
5855
|
-
/* harmony export */ useHoneyTimer: () => (/* reexport safe */ _use_honey_timer__WEBPACK_IMPORTED_MODULE_12__.useHoneyTimer),
|
|
5856
|
-
/* harmony export */ useRegisterHoneyOverlay: () => (/* reexport safe */ _use_register_honey_overlay__WEBPACK_IMPORTED_MODULE_5__.useRegisterHoneyOverlay)
|
|
5857
|
-
/* harmony export */ });
|
|
5858
|
-
/* harmony import */ var _use_honey_on_change__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-honey-on-change */ "./src/hooks/use-honey-on-change.ts");
|
|
5859
|
-
/* harmony import */ var _use_honey_media_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-honey-media-query */ "./src/hooks/use-honey-media-query.ts");
|
|
5860
|
-
/* harmony import */ var _use_honey_drag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-honey-drag */ "./src/hooks/use-honey-drag.ts");
|
|
5861
|
-
/* harmony import */ var _use_honey_document_key_up__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-honey-document-key-up */ "./src/hooks/use-honey-document-key-up.ts");
|
|
5862
|
-
/* harmony import */ var _use_honey_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use-honey-layout */ "./src/hooks/use-honey-layout.ts");
|
|
5863
|
-
/* harmony import */ var _use_register_honey_overlay__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use-register-honey-overlay */ "./src/hooks/use-register-honey-overlay.ts");
|
|
5864
|
-
/* harmony import */ var _use_honey_overlay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use-honey-overlay */ "./src/hooks/use-honey-overlay.ts");
|
|
5865
|
-
/* harmony import */ var _use_honey_resize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./use-honey-resize */ "./src/hooks/use-honey-resize.ts");
|
|
5866
|
-
/* harmony import */ var _use_honey_synthetic_scroll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./use-honey-synthetic-scroll */ "./src/hooks/use-honey-synthetic-scroll.ts");
|
|
5867
|
-
/* harmony import */ var _use_honey_synthetic_scroll_x__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./use-honey-synthetic-scroll-x */ "./src/hooks/use-honey-synthetic-scroll-x.ts");
|
|
5868
|
-
/* harmony import */ var _use_honey_synthetic_scroll_y__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./use-honey-synthetic-scroll-y */ "./src/hooks/use-honey-synthetic-scroll-y.ts");
|
|
5869
|
-
/* harmony import */ var _use_honey_raf_loop__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./use-honey-raf-loop */ "./src/hooks/use-honey-raf-loop.ts");
|
|
5870
|
-
/* harmony import */ var _use_honey_timer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./use-honey-timer */ "./src/hooks/use-honey-timer.ts");
|
|
5871
|
-
/* harmony import */ var _use_honey_decay__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./use-honey-decay */ "./src/hooks/use-honey-decay.ts");
|
|
5872
|
-
/* harmony import */ var _use_honey_latest__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./use-honey-latest */ "./src/hooks/use-honey-latest.ts");
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
/***/ },
|
|
5891
|
-
|
|
5892
|
-
/***/ "./src/hooks/use-honey-decay.ts"
|
|
5893
|
-
/*!**************************************!*\
|
|
5894
|
-
!*** ./src/hooks/use-honey-decay.ts ***!
|
|
5895
|
-
\**************************************/
|
|
5896
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5897
|
-
|
|
5898
|
-
"use strict";
|
|
5899
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5900
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5901
|
-
/* harmony export */ useHoneyDecay: () => (/* binding */ useHoneyDecay)
|
|
5902
|
-
/* harmony export */ });
|
|
5903
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5904
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5905
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.24.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5906
|
-
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.ts");
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
/**
|
|
5911
|
-
* A bounded, velocity-based inertia (decay) hook built on top
|
|
5912
|
-
* of {@link useHoneyRafLoop} and {@link applyInertiaStep}.
|
|
5913
|
-
*
|
|
5914
|
-
* This hook models **momentum-driven motion** where:
|
|
5915
|
-
* - Motion starts with an initial velocity
|
|
5916
|
-
* - Velocity decays exponentially over time
|
|
5917
|
-
* - Movement is constrained by hard numeric bounds
|
|
5918
|
-
* - Inertia stops naturally when velocity becomes negligible
|
|
5919
|
-
*
|
|
5920
|
-
* Unlike spring-based motion, this hook has **no target value**.
|
|
5921
|
-
* Motion continues purely based on momentum until it decays
|
|
5922
|
-
* or is blocked by a boundary.
|
|
5923
|
-
*
|
|
5924
|
-
* ---
|
|
5925
|
-
*
|
|
5926
|
-
* ### Key characteristics
|
|
5927
|
-
* - Frame-rate independent (delta-time based)
|
|
5928
|
-
* - Deterministic and interruptible
|
|
5929
|
-
* - Direction-aware and bound-safe (no overshoot or jitter)
|
|
5930
|
-
* - Closely matches native scroll and drag inertia behavior
|
|
5931
|
-
*
|
|
5932
|
-
* ---
|
|
5933
|
-
*
|
|
5934
|
-
* ### Visibility behavior
|
|
5935
|
-
* This hook is a **simulation-based system**:
|
|
5936
|
-
* - Inertia automatically pauses when the document becomes hidden
|
|
5937
|
-
* - No time elapses while hidden
|
|
5938
|
-
* - Motion resumes only when explicitly restarted
|
|
5939
|
-
*
|
|
5940
|
-
* This behavior is inherited from {@link useHoneyRafLoop} and is intentional.
|
|
5941
|
-
*
|
|
5942
|
-
* ---
|
|
5943
|
-
*
|
|
5944
|
-
* ### Common use cases
|
|
5945
|
-
* - Scroll containers with momentum
|
|
5946
|
-
* - Drag-to-scroll interactions
|
|
5947
|
-
* - Carousels and sliders
|
|
5948
|
-
* - Timelines and scrubbers
|
|
5949
|
-
* - Kinetic panning and flinging
|
|
5950
|
-
*
|
|
5951
|
-
* ---
|
|
5952
|
-
*
|
|
5953
|
-
* @example
|
|
5954
|
-
* ```ts
|
|
5955
|
-
* const decay = useHoneyDecay({
|
|
5956
|
-
* initialValue: 0,
|
|
5957
|
-
* min: -maxOverflow,
|
|
5958
|
-
* max: 0,
|
|
5959
|
-
* });
|
|
5960
|
-
*
|
|
5961
|
-
* const onRelease = (velocityPxMs: number) => {
|
|
5962
|
-
* decay.start(velocityPxMs);
|
|
5963
|
-
* };
|
|
5964
|
-
*
|
|
5965
|
-
* return (
|
|
5966
|
-
* <div style={{ transform: `translateX(${decay.value}px)` }} />
|
|
5967
|
-
* );
|
|
5968
|
-
* ```
|
|
5969
|
-
*/
|
|
5970
|
-
const useHoneyDecay = ({ initialValue, min, max, friction = 0.002, minVelocityPxMs = 0.01, emaAlpha = 0.2, onStop, }) => {
|
|
5971
|
-
const [value, setValue] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialValue);
|
|
5972
|
-
const valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(initialValue);
|
|
5973
|
-
const velocityPxMsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
|
|
5974
|
-
const hasActiveInertiaRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
|
5975
|
-
const minRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(min);
|
|
5976
|
-
const maxRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(max);
|
|
5977
|
-
const onStopRef = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useHoneyLatest)(onStop);
|
|
5978
|
-
const frameHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((deltaTimeMs, frameContext) => {
|
|
5979
|
-
// Ignore the first RAF tick
|
|
5980
|
-
if (deltaTimeMs === 0) {
|
|
5981
|
-
return;
|
|
5982
|
-
}
|
|
5983
|
-
const inertia = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.applyInertiaStep)({
|
|
5984
|
-
value: valueRef.current,
|
|
5985
|
-
velocityPxMs: velocityPxMsRef.current,
|
|
5986
|
-
min: minRef.current,
|
|
5987
|
-
max: maxRef.current,
|
|
5988
|
-
deltaTimeMs,
|
|
5989
|
-
friction,
|
|
5990
|
-
minVelocityPxMs,
|
|
5991
|
-
emaAlpha,
|
|
5992
|
-
});
|
|
5993
|
-
if (inertia === null) {
|
|
5994
|
-
velocityPxMsRef.current = 0;
|
|
5995
|
-
if (hasActiveInertiaRef.current) {
|
|
5996
|
-
hasActiveInertiaRef.current = false;
|
|
5997
|
-
onStopRef.current?.();
|
|
5998
|
-
}
|
|
5999
|
-
frameContext.stop();
|
|
6000
|
-
return;
|
|
6001
|
-
}
|
|
6002
|
-
hasActiveInertiaRef.current = true;
|
|
6003
|
-
valueRef.current = inertia.value;
|
|
6004
|
-
velocityPxMsRef.current = inertia.velocityPxMs;
|
|
6005
|
-
setValue(inertia.value);
|
|
6006
|
-
}, [friction, minVelocityPxMs, emaAlpha]);
|
|
6007
|
-
const rafLoop = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useHoneyRafLoop)(frameHandler);
|
|
6008
|
-
const setBounds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextMin, nextMax) => {
|
|
6009
|
-
minRef.current = nextMin;
|
|
6010
|
-
maxRef.current = nextMax;
|
|
6011
|
-
const currentValue = valueRef.current;
|
|
6012
|
-
if (currentValue < nextMin || currentValue > nextMax) {
|
|
6013
|
-
const nextValue = Math.min(Math.max(currentValue, nextMin), nextMax);
|
|
6014
|
-
valueRef.current = nextValue;
|
|
6015
|
-
velocityPxMsRef.current = 0;
|
|
6016
|
-
setValue(nextValue);
|
|
6017
|
-
if (hasActiveInertiaRef.current) {
|
|
6018
|
-
hasActiveInertiaRef.current = false;
|
|
6019
|
-
onStopRef.current?.();
|
|
6020
|
-
}
|
|
6021
|
-
rafLoop.stop();
|
|
6022
|
-
}
|
|
6023
|
-
}, [rafLoop.stop]);
|
|
6024
|
-
const start = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((velocityPxMs) => {
|
|
6025
|
-
velocityPxMsRef.current = velocityPxMs;
|
|
6026
|
-
hasActiveInertiaRef.current = true;
|
|
6027
|
-
rafLoop.start();
|
|
6028
|
-
}, [rafLoop.start]);
|
|
6029
|
-
const startFrom = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextValue, velocityPxMs) => {
|
|
6030
|
-
valueRef.current = nextValue;
|
|
6031
|
-
velocityPxMsRef.current = velocityPxMs;
|
|
6032
|
-
hasActiveInertiaRef.current = true;
|
|
6033
|
-
setValue(nextValue);
|
|
6034
|
-
rafLoop.start();
|
|
6035
|
-
}, [rafLoop.start]);
|
|
6036
|
-
const stop = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
6037
|
-
if (hasActiveInertiaRef.current) {
|
|
6038
|
-
hasActiveInertiaRef.current = false;
|
|
6039
|
-
onStopRef.current?.();
|
|
6040
|
-
}
|
|
6041
|
-
velocityPxMsRef.current = 0;
|
|
6042
|
-
rafLoop.stop();
|
|
6043
|
-
}, [rafLoop.stop]);
|
|
6044
|
-
return {
|
|
6045
|
-
value,
|
|
6046
|
-
isRunning: rafLoop.isRunning,
|
|
6047
|
-
setBounds,
|
|
6048
|
-
start,
|
|
6049
|
-
startFrom,
|
|
6050
|
-
stop,
|
|
6051
|
-
};
|
|
6052
|
-
};
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
/***/ },
|
|
6056
|
-
|
|
6057
|
-
/***/ "./src/hooks/use-honey-document-key-up.ts"
|
|
6058
|
-
/*!************************************************!*\
|
|
6059
|
-
!*** ./src/hooks/use-honey-document-key-up.ts ***!
|
|
6060
|
-
\************************************************/
|
|
6061
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6062
|
-
|
|
6063
|
-
"use strict";
|
|
6064
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6065
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6066
|
-
/* harmony export */ useHoneyDocumentKeyUp: () => (/* binding */ useHoneyDocumentKeyUp)
|
|
6067
|
-
/* harmony export */ });
|
|
6068
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6069
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6070
|
-
|
|
6071
|
-
/**
|
|
6072
|
-
* Hook for handling specific key up events on the `document` object.
|
|
6073
|
-
*
|
|
6074
|
-
* This hook adds a `keyup` event listener at the document level and triggers the provided `keyUpHandler`
|
|
6075
|
-
* when one of the specified `listenKeys` is released.
|
|
6076
|
-
*
|
|
6077
|
-
* @param onKeyUp - The callback function invoked when a matching key is released.
|
|
6078
|
-
* @param listenKeys - An array of key codes (`KeyboardEvent.code`) to listen for.
|
|
6079
|
-
* @param options - Optional configuration to control event behavior and listener activation.
|
|
6080
|
-
*
|
|
6081
|
-
* @example
|
|
6082
|
-
* ```tsx
|
|
6083
|
-
* useHoneyDocumentKeyUp(
|
|
6084
|
-
* (keyCode, event) => {
|
|
6085
|
-
* console.log('Key released:', keyCode);
|
|
6086
|
-
* },
|
|
6087
|
-
* ['Escape'],
|
|
6088
|
-
* );
|
|
6089
|
-
* ```
|
|
6090
|
-
*/
|
|
6091
|
-
const useHoneyDocumentKeyUp = (onKeyUp, listenKeys, { enabled = true, preventDefault = true } = {}) => {
|
|
6092
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6093
|
-
if (!enabled) {
|
|
6094
|
-
return;
|
|
6095
|
-
}
|
|
6096
|
-
const handleKeyUp = (e) => {
|
|
6097
|
-
const keyCode = e.code;
|
|
6098
|
-
if (listenKeys.includes(keyCode)) {
|
|
6099
|
-
if (preventDefault) {
|
|
6100
|
-
e.preventDefault();
|
|
6101
|
-
}
|
|
6102
|
-
onKeyUp(keyCode, e);
|
|
6103
|
-
}
|
|
6104
|
-
};
|
|
6105
|
-
document.addEventListener('keyup', handleKeyUp);
|
|
6106
|
-
return () => {
|
|
6107
|
-
document.removeEventListener('keyup', handleKeyUp);
|
|
6108
|
-
};
|
|
6109
|
-
}, [onKeyUp, enabled, preventDefault]);
|
|
6110
|
-
};
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
/***/ },
|
|
6114
|
-
|
|
6115
|
-
/***/ "./src/hooks/use-honey-drag.ts"
|
|
6116
|
-
/*!*************************************!*\
|
|
6117
|
-
!*** ./src/hooks/use-honey-drag.ts ***!
|
|
6118
|
-
\*************************************/
|
|
6119
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6120
|
-
|
|
6121
|
-
"use strict";
|
|
6122
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6123
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6124
|
-
/* harmony export */ useHoneyDrag: () => (/* binding */ useHoneyDrag)
|
|
6125
|
-
/* harmony export */ });
|
|
6126
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6127
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6128
|
-
|
|
6129
|
-
/**
|
|
6130
|
-
* Enables high-precision mouse and touch dragging for an element.
|
|
6131
|
-
*
|
|
6132
|
-
* This hook:
|
|
6133
|
-
* - Tracks pointer movement using `performance.now()`
|
|
6134
|
-
* - Computes **instantaneous release velocity** (px/ms)
|
|
6135
|
-
* - Emits deterministic drag lifecycle events
|
|
6136
|
-
* - Supports both mouse and touch input
|
|
6137
|
-
*
|
|
6138
|
-
* Architectural notes:
|
|
6139
|
-
* - Velocity is computed **during movement**, not at drag end
|
|
6140
|
-
* - Release velocity is suitable for inertia / decay systems
|
|
6141
|
-
* - No layout reads or writes are performed internally
|
|
6142
|
-
*
|
|
6143
|
-
* @template Element - The draggable HTML element type.
|
|
6144
|
-
*
|
|
6145
|
-
* @param draggableElementRef - Ref pointing to the draggable element.
|
|
6146
|
-
* @param options - Drag lifecycle handlers and configuration flags.
|
|
6147
|
-
*/
|
|
6148
|
-
const useHoneyDrag = (draggableElementRef, { skipOnEndDragWhenStopped = false, enabled = true, onMoveDrag, onStartDrag, onEndDrag, }) => {
|
|
6149
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6150
|
-
const draggableElement = draggableElementRef.current;
|
|
6151
|
-
if (!enabled || !draggableElement) {
|
|
6152
|
-
return;
|
|
6153
|
-
}
|
|
6154
|
-
const onMove = onMoveDrag(draggableElement);
|
|
6155
|
-
let isDragging = false;
|
|
6156
|
-
let startX = 0;
|
|
6157
|
-
let startY = 0;
|
|
6158
|
-
let lastX = 0;
|
|
6159
|
-
let lastY = 0;
|
|
6160
|
-
let lastMoveTimeMs = 0;
|
|
6161
|
-
let velocityXPxMs = 0;
|
|
6162
|
-
let velocityYPxMs = 0;
|
|
6163
|
-
const startDrag = async (clientX, clientY, e) => {
|
|
6164
|
-
if (onStartDrag && !(await onStartDrag(draggableElement, e))) {
|
|
6165
|
-
// Exit when `onStartDrag` returns false, preventing the dragging
|
|
6166
|
-
return;
|
|
6167
|
-
}
|
|
6168
|
-
lastMoveTimeMs = performance.now();
|
|
6169
|
-
isDragging = true;
|
|
6170
|
-
startX = clientX;
|
|
6171
|
-
startY = clientY;
|
|
6172
|
-
lastX = clientX;
|
|
6173
|
-
lastY = clientY;
|
|
6174
|
-
velocityXPxMs = 0;
|
|
6175
|
-
velocityYPxMs = 0;
|
|
6176
|
-
};
|
|
6177
|
-
const stopDrag = async (isTriggerOnEndDrag, e) => {
|
|
6178
|
-
if (!isDragging) {
|
|
6179
|
-
return;
|
|
6180
|
-
}
|
|
6181
|
-
isDragging = false;
|
|
6182
|
-
if (isTriggerOnEndDrag && onEndDrag) {
|
|
6183
|
-
const deltaX = lastX - startX;
|
|
6184
|
-
const deltaY = lastY - startY;
|
|
6185
|
-
const endContext = {
|
|
6186
|
-
deltaX,
|
|
6187
|
-
deltaY,
|
|
6188
|
-
velocityXPxMs,
|
|
6189
|
-
velocityYPxMs,
|
|
6190
|
-
};
|
|
6191
|
-
await onEndDrag(endContext, draggableElement, e);
|
|
6192
|
-
}
|
|
6193
|
-
};
|
|
6194
|
-
const releaseDrag = async (isTriggerOnEndDrag, e) => {
|
|
6195
|
-
await stopDrag(isTriggerOnEndDrag, e);
|
|
6196
|
-
window.removeEventListener('mousemove', mouseMoveHandler, { capture: true });
|
|
6197
|
-
window.removeEventListener('mouseup', mouseUpHandler, { capture: true });
|
|
6198
|
-
window.removeEventListener('touchmove', touchMoveHandler, { capture: true });
|
|
6199
|
-
window.removeEventListener('touchend', touchEndHandler, { capture: true });
|
|
6200
|
-
window.removeEventListener('touchcancel', touchCancelHandler, { capture: true });
|
|
6201
|
-
};
|
|
6202
|
-
const mouseUpHandler = async (e) => {
|
|
6203
|
-
await releaseDrag(true, e);
|
|
6204
|
-
};
|
|
6205
|
-
const moveHandler = async (clientX, clientY, e) => {
|
|
6206
|
-
if (!isDragging) {
|
|
6207
|
-
return;
|
|
6208
|
-
}
|
|
6209
|
-
const nowMs = performance.now();
|
|
6210
|
-
const deltaTimeMs = nowMs - lastMoveTimeMs;
|
|
6211
|
-
const deltaX = clientX - lastX;
|
|
6212
|
-
const deltaY = clientY - lastY;
|
|
6213
|
-
if (deltaTimeMs > 0) {
|
|
6214
|
-
velocityXPxMs = deltaX / deltaTimeMs;
|
|
6215
|
-
velocityYPxMs = deltaY / deltaTimeMs;
|
|
6216
|
-
}
|
|
6217
|
-
const distanceX = clientX - startX;
|
|
6218
|
-
const distanceY = clientY - startY;
|
|
6219
|
-
const isContinue = await onMove({
|
|
6220
|
-
deltaX,
|
|
6221
|
-
deltaY,
|
|
6222
|
-
distanceX,
|
|
6223
|
-
distanceY,
|
|
6224
|
-
});
|
|
6225
|
-
lastX = clientX;
|
|
6226
|
-
lastY = clientY;
|
|
6227
|
-
lastMoveTimeMs = nowMs;
|
|
6228
|
-
if (!isContinue) {
|
|
6229
|
-
await releaseDrag(!skipOnEndDragWhenStopped, e);
|
|
6230
|
-
}
|
|
6231
|
-
};
|
|
6232
|
-
const mouseMoveHandler = async (e) => {
|
|
6233
|
-
await moveHandler(e.clientX, e.clientY, e);
|
|
6234
|
-
};
|
|
6235
|
-
const touchMoveHandler = async (e) => {
|
|
6236
|
-
const touch = e.touches[0];
|
|
6237
|
-
await moveHandler(touch.clientX, touch.clientY, e);
|
|
6238
|
-
};
|
|
6239
|
-
const touchEndHandler = async (e) => {
|
|
6240
|
-
await releaseDrag(true, e);
|
|
6241
|
-
};
|
|
6242
|
-
const touchCancelHandler = async (e) => {
|
|
6243
|
-
await releaseDrag(true, e);
|
|
6244
|
-
};
|
|
6245
|
-
const touchStartHandler = async (e) => {
|
|
6246
|
-
e.stopPropagation();
|
|
6247
|
-
const touch = e.touches[0];
|
|
6248
|
-
await startDrag(touch.clientX, touch.clientY, e);
|
|
6249
|
-
window.addEventListener('touchmove', touchMoveHandler, {
|
|
6250
|
-
passive: true,
|
|
6251
|
-
capture: true,
|
|
6252
|
-
});
|
|
6253
|
-
window.addEventListener('touchend', touchEndHandler, { capture: true });
|
|
6254
|
-
window.addEventListener('touchcancel', touchCancelHandler, { capture: true });
|
|
6255
|
-
};
|
|
6256
|
-
const mouseDownHandler = async (e) => {
|
|
6257
|
-
e.stopPropagation();
|
|
6258
|
-
await startDrag(e.clientX, e.clientY, e);
|
|
6259
|
-
window.addEventListener('mousemove', mouseMoveHandler, { capture: true });
|
|
6260
|
-
window.addEventListener('mouseup', mouseUpHandler, { capture: true });
|
|
6261
|
-
};
|
|
6262
|
-
draggableElement.addEventListener('mousedown', mouseDownHandler);
|
|
6263
|
-
draggableElement.addEventListener('touchstart', touchStartHandler, {
|
|
6264
|
-
passive: true,
|
|
6265
|
-
});
|
|
6266
|
-
return () => {
|
|
6267
|
-
draggableElement.removeEventListener('mousedown', mouseDownHandler);
|
|
6268
|
-
draggableElement.removeEventListener('touchstart', touchStartHandler);
|
|
6269
|
-
};
|
|
6270
|
-
}, [enabled, onStartDrag, onMoveDrag, onEndDrag]);
|
|
6271
|
-
};
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
/***/ },
|
|
6275
|
-
|
|
6276
|
-
/***/ "./src/hooks/use-honey-latest.ts"
|
|
6277
|
-
/*!***************************************!*\
|
|
6278
|
-
!*** ./src/hooks/use-honey-latest.ts ***!
|
|
6279
|
-
\***************************************/
|
|
6280
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6281
|
-
|
|
6282
|
-
"use strict";
|
|
6283
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6284
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6285
|
-
/* harmony export */ useHoneyLatest: () => (/* binding */ useHoneyLatest)
|
|
6286
|
-
/* harmony export */ });
|
|
6287
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6288
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6289
|
-
|
|
6290
|
-
/**
|
|
6291
|
-
* Stores the latest value in a stable ref.
|
|
6292
|
-
*
|
|
6293
|
-
* Guarantees that:
|
|
6294
|
-
* - `ref.current` always points to the latest value
|
|
6295
|
-
* - the ref object identity never changes
|
|
6296
|
-
*
|
|
6297
|
-
* Overload behavior:
|
|
6298
|
-
* - If a non-optional value is provided, `.current` is non-optional
|
|
6299
|
-
* - If an optional value is provided, `.current` is optional
|
|
6300
|
-
*/
|
|
6301
|
-
const useHoneyLatest = (value) => {
|
|
6302
|
-
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);
|
|
6303
|
-
ref.current = value;
|
|
6304
|
-
return ref;
|
|
6305
|
-
};
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
/***/ },
|
|
6309
|
-
|
|
6310
|
-
/***/ "./src/hooks/use-honey-layout.ts"
|
|
6311
|
-
/*!***************************************!*\
|
|
6312
|
-
!*** ./src/hooks/use-honey-layout.ts ***!
|
|
6313
|
-
\***************************************/
|
|
6314
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6315
|
-
|
|
6316
|
-
"use strict";
|
|
6317
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6318
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6319
|
-
/* harmony export */ useHoneyLayout: () => (/* binding */ useHoneyLayout)
|
|
6320
|
-
/* harmony export */ });
|
|
6321
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6322
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6323
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.24.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
6324
|
-
/* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
/**
|
|
6329
|
-
* Custom hook to access the Honey layout context.
|
|
6330
|
-
*
|
|
6331
|
-
* @throws Will throw an error if the hook is used outside of a `HoneyLayoutProvider` component.
|
|
6332
|
-
*
|
|
6333
|
-
* @returns The context value providing theming utilities and screen state.
|
|
6334
|
-
*/
|
|
6335
|
-
const useHoneyLayout = () => {
|
|
6336
|
-
const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts__WEBPACK_IMPORTED_MODULE_2__.HoneyLayoutContext);
|
|
6337
|
-
(0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.assert)(context, 'The `useHoneyLayout()` hook must be used inside <HoneyLayoutProvider/> component!');
|
|
6338
|
-
return context;
|
|
6339
|
-
};
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
/***/ },
|
|
6343
|
-
|
|
6344
|
-
/***/ "./src/hooks/use-honey-media-query.ts"
|
|
6345
|
-
/*!********************************************!*\
|
|
6346
|
-
!*** ./src/hooks/use-honey-media-query.ts ***!
|
|
6347
|
-
\********************************************/
|
|
6348
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6349
|
-
|
|
6350
|
-
"use strict";
|
|
6351
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6352
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6353
|
-
/* harmony export */ useHoneyMediaQuery: () => (/* binding */ useHoneyMediaQuery)
|
|
6354
|
-
/* harmony export */ });
|
|
6355
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6356
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6357
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash.throttle */ "./node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js");
|
|
6358
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);
|
|
6359
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.ts");
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
/**
|
|
6364
|
-
* The hook that tracks the current screen state based on the theme's media breakpoints.
|
|
6365
|
-
* It updates the state on window resize and orientation change.
|
|
6366
|
-
*
|
|
6367
|
-
* @param theme - Theme object.
|
|
6368
|
-
* @param options - Optional configuration object.
|
|
6369
|
-
*
|
|
6370
|
-
* @returns The current screen state, indicating the orientation (portrait or landscape)
|
|
6371
|
-
* and the active breakpoint (xs, sm, md, lg, xl).
|
|
6372
|
-
*/
|
|
6373
|
-
const useHoneyMediaQuery = (theme, { resizeThrottle = 0, overrideScreenState } = {}) => {
|
|
6374
|
-
const [screenState, setScreenState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => ({
|
|
6375
|
-
...(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.resolveScreenState)(theme.breakpoints),
|
|
6376
|
-
...overrideScreenState,
|
|
6377
|
-
}));
|
|
6378
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6379
|
-
const handleResize = lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
6380
|
-
setScreenState({
|
|
6381
|
-
...(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.resolveScreenState)(theme.breakpoints),
|
|
6382
|
-
...overrideScreenState,
|
|
6383
|
-
});
|
|
6384
|
-
}, resizeThrottle);
|
|
6385
|
-
handleResize();
|
|
6386
|
-
window.addEventListener('resize', handleResize);
|
|
6387
|
-
window.screen.orientation.addEventListener('change', handleResize);
|
|
6388
|
-
return () => {
|
|
6389
|
-
handleResize.cancel();
|
|
6390
|
-
window.removeEventListener('resize', handleResize);
|
|
6391
|
-
window.screen.orientation.removeEventListener('change', handleResize);
|
|
6392
|
-
};
|
|
6393
|
-
}, []);
|
|
6394
|
-
return screenState;
|
|
6395
|
-
};
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
/***/ },
|
|
6399
|
-
|
|
6400
|
-
/***/ "./src/hooks/use-honey-on-change.ts"
|
|
6401
|
-
/*!******************************************!*\
|
|
6402
|
-
!*** ./src/hooks/use-honey-on-change.ts ***!
|
|
6403
|
-
\******************************************/
|
|
6404
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6405
|
-
|
|
6406
|
-
"use strict";
|
|
6407
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6408
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6409
|
-
/* harmony export */ useHoneyOnChange: () => (/* binding */ useHoneyOnChange)
|
|
6410
|
-
/* harmony export */ });
|
|
6411
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6412
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6413
|
-
|
|
6414
|
-
/**
|
|
6415
|
-
* A hook that invokes a callback function whenever the provided `state` value changes.
|
|
6416
|
-
*
|
|
6417
|
-
* This hook stores the previous value internally and performs a shallow comparison with the current value.
|
|
6418
|
-
* If a change is detected, it executes the `onChange` callback. If the callback returns a cleanup function,
|
|
6419
|
-
* it will be invoked before the next change or when the component unmounts, similar to standard `useEffect` behavior.
|
|
6420
|
-
*
|
|
6421
|
-
* @template T - The type of the state being observed.
|
|
6422
|
-
*
|
|
6423
|
-
* @param state - The value to monitor for changes. Can be of any type.
|
|
6424
|
-
* @param onChange - A function called whenever `state` changes. It may return a cleanup function.
|
|
6425
|
-
*
|
|
6426
|
-
* @returns void
|
|
6427
|
-
*
|
|
6428
|
-
* @example
|
|
6429
|
-
* ```ts
|
|
6430
|
-
* useHoneyOnChange(someValue, (newValue) => {
|
|
6431
|
-
* console.log('Value changed to:', newValue);
|
|
6432
|
-
*
|
|
6433
|
-
* return () => {
|
|
6434
|
-
* console.log('Cleanup for value:', newValue);
|
|
6435
|
-
* };
|
|
6436
|
-
* });
|
|
6437
|
-
* ```
|
|
6438
|
-
*/
|
|
6439
|
-
const useHoneyOnChange = (state, onChange) => {
|
|
6440
|
-
const prevStateRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(state);
|
|
6441
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6442
|
-
if (prevStateRef.current !== state) {
|
|
6443
|
-
prevStateRef.current = state;
|
|
6444
|
-
return onChange(state);
|
|
6445
|
-
}
|
|
6446
|
-
}, [state]);
|
|
6447
|
-
};
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
/***/ },
|
|
6451
|
-
|
|
6452
|
-
/***/ "./src/hooks/use-honey-overlay.ts"
|
|
6453
|
-
/*!****************************************!*\
|
|
6454
|
-
!*** ./src/hooks/use-honey-overlay.ts ***!
|
|
6455
|
-
\****************************************/
|
|
6456
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6457
|
-
|
|
6458
|
-
"use strict";
|
|
6459
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6460
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6461
|
-
/* harmony export */ useHoneyOverlay: () => (/* binding */ useHoneyOverlay)
|
|
6462
|
-
/* harmony export */ });
|
|
6463
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6464
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6465
|
-
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.ts");
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
/**
|
|
6469
|
-
* Hook for interacting with an active overlay managed by `HoneyLayoutProvider`.
|
|
6470
|
-
*
|
|
6471
|
-
* @param targetOverlayId - The unique ID of the overlay you want to interact with.
|
|
6472
|
-
* @param options - Optional configuration such as event handlers (e.g., `onKeyUp`).
|
|
6473
|
-
*
|
|
6474
|
-
* @returns The overlay instance matching the provided ID, or `undefined` if not found.
|
|
6475
|
-
*
|
|
6476
|
-
* @remarks
|
|
6477
|
-
* - This hook only works with overlays that are currently active.
|
|
6478
|
-
* - If the overlay is not active or not registered, `undefined` will be returned.
|
|
6479
|
-
* - Event handlers like `onKeyUp` are automatically registered and cleaned up for the overlay.
|
|
6480
|
-
*
|
|
6481
|
-
* @example
|
|
6482
|
-
* ```tsx
|
|
6483
|
-
* const overlay = useHoneyOverlay('my-overlay-id', {
|
|
6484
|
-
* onKeyUp: (keyCode, e) => {
|
|
6485
|
-
* if (keyCode === 'Escape') {
|
|
6486
|
-
* console.log('Escape key pressed!');
|
|
6487
|
-
* }
|
|
6488
|
-
* },
|
|
6489
|
-
* });
|
|
6490
|
-
* ```
|
|
6491
|
-
*/
|
|
6492
|
-
const useHoneyOverlay = (targetOverlayId, { onKeyUp } = {}) => {
|
|
6493
|
-
const { overlays } = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useHoneyLayout)();
|
|
6494
|
-
const overlay = overlays.find(overlay => overlay.id === targetOverlayId);
|
|
6495
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6496
|
-
// If no overlay is found or no `onKeyUp` handler is provided, skip setting up the listener
|
|
6497
|
-
if (!overlay || !onKeyUp) {
|
|
6498
|
-
return;
|
|
6499
|
-
}
|
|
6500
|
-
overlay.addListener('keyup', onKeyUp);
|
|
6501
|
-
return () => {
|
|
6502
|
-
overlay.removeListener('keyup', onKeyUp);
|
|
6503
|
-
};
|
|
6504
|
-
}, [overlay, onKeyUp]);
|
|
6505
|
-
return overlay;
|
|
6506
|
-
};
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
/***/ },
|
|
6510
|
-
|
|
6511
|
-
/***/ "./src/hooks/use-honey-raf-loop.ts"
|
|
6512
|
-
/*!*****************************************!*\
|
|
6513
|
-
!*** ./src/hooks/use-honey-raf-loop.ts ***!
|
|
6514
|
-
\*****************************************/
|
|
6515
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6516
|
-
|
|
6517
|
-
"use strict";
|
|
6518
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6519
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6520
|
-
/* harmony export */ useHoneyRafLoop: () => (/* binding */ useHoneyRafLoop)
|
|
6521
|
-
/* harmony export */ });
|
|
6522
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6523
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6524
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./src/constants.ts");
|
|
6525
|
-
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.ts");
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
/**
|
|
6530
|
-
* A hook for running a controlled `requestAnimationFrame` loop.
|
|
6531
|
-
*
|
|
6532
|
-
* Features:
|
|
6533
|
-
* - Explicit RAF lifecycle control (`start` / `stop`)
|
|
6534
|
-
* - Delta time calculation with frame clamping
|
|
6535
|
-
* - Automatic cleanup on unmounting
|
|
6536
|
-
* - Conservative handling of tab visibility changes (mobile-safe)
|
|
6537
|
-
* - Safe error handling (stops loop on exception)
|
|
6538
|
-
*
|
|
6539
|
-
* Visibility behavior:
|
|
6540
|
-
* - The RAF loop is always stopped when the document becomes hidden
|
|
6541
|
-
* - Automatic resume is disabled by default and must be explicitly enabled
|
|
6542
|
-
*
|
|
6543
|
-
* This hook is designed for gesture handling, inertia, physics simulations,
|
|
6544
|
-
* and animation loops that must not trigger React re-renders on every frame.
|
|
6545
|
-
*
|
|
6546
|
-
* @param onFrame - Function invoked on each animation frame.
|
|
6547
|
-
* @param options - Optional configuration for the RAF loop.
|
|
6548
|
-
*
|
|
6549
|
-
* @returns Control helpers and RAF loop state.
|
|
6550
|
-
*
|
|
6551
|
-
* @example
|
|
6552
|
-
* ```ts
|
|
6553
|
-
* // Gesture-driven inertia (recommended usage)
|
|
6554
|
-
* // The RAF loop stops itself when motion decays.
|
|
6555
|
-
*
|
|
6556
|
-
* const velocityRef = useRef({ x: 12, y: 4 });
|
|
6557
|
-
*
|
|
6558
|
-
* const onFrame = useCallback<HoneyRafOnFrameHandler>(
|
|
6559
|
-
* (dtMs, { stop }) => {
|
|
6560
|
-
* velocityRef.current.x *= 0.94;
|
|
6561
|
-
* velocityRef.current.y *= 0.94;
|
|
6562
|
-
*
|
|
6563
|
-
* setPosition(p => ({
|
|
6564
|
-
* x: p.x + velocityRef.current.x,
|
|
6565
|
-
* y: p.y + velocityRef.current.y,
|
|
6566
|
-
* }));
|
|
6567
|
-
*
|
|
6568
|
-
* if (
|
|
6569
|
-
* Math.abs(velocityRef.current.x) < 0.1 &&
|
|
6570
|
-
* Math.abs(velocityRef.current.y) < 0.1
|
|
6571
|
-
* ) {
|
|
6572
|
-
* stop(); // terminate RAF loop
|
|
6573
|
-
* }
|
|
6574
|
-
* },
|
|
6575
|
-
* [],
|
|
6576
|
-
* );
|
|
6577
|
-
*
|
|
6578
|
-
* useHoneyRafLoop(onFrame);
|
|
6579
|
-
* ```
|
|
6580
|
-
*/
|
|
6581
|
-
const useHoneyRafLoop = (onFrame, { autoStart = false, resumeOnVisibility = false, maxDeltaMs = 32, // ~30fps clamp
|
|
6582
|
-
onError, } = {}) => {
|
|
6583
|
-
const rafIdRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
6584
|
-
const lastTimeMsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
6585
|
-
const onFrameRef = (0,_hooks__WEBPACK_IMPORTED_MODULE_2__.useHoneyLatest)(onFrame);
|
|
6586
|
-
const [isRunning, setIsRunning] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
|
|
6587
|
-
const isRunningRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
|
|
6588
|
-
const stop = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
6589
|
-
if (!isRunningRef.current) {
|
|
6590
|
-
return;
|
|
6591
|
-
}
|
|
6592
|
-
isRunningRef.current = false;
|
|
6593
|
-
if (rafIdRef.current !== null) {
|
|
6594
|
-
cancelAnimationFrame(rafIdRef.current);
|
|
6595
|
-
rafIdRef.current = null;
|
|
6596
|
-
}
|
|
6597
|
-
lastTimeMsRef.current = null;
|
|
6598
|
-
setIsRunning(false);
|
|
6599
|
-
}, []);
|
|
6600
|
-
const loop = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(timeMs => {
|
|
6601
|
-
if (!isRunningRef.current) {
|
|
6602
|
-
return;
|
|
6603
|
-
}
|
|
6604
|
-
if (lastTimeMsRef.current === null) {
|
|
6605
|
-
lastTimeMsRef.current = timeMs;
|
|
6606
|
-
}
|
|
6607
|
-
let deltaTimeMs = timeMs - lastTimeMsRef.current;
|
|
6608
|
-
lastTimeMsRef.current = timeMs;
|
|
6609
|
-
// Clamp delta (prevents jumps after background tab / lag)
|
|
6610
|
-
if (deltaTimeMs > maxDeltaMs) {
|
|
6611
|
-
deltaTimeMs = maxDeltaMs;
|
|
6612
|
-
}
|
|
6613
|
-
try {
|
|
6614
|
-
onFrameRef.current(deltaTimeMs, {
|
|
6615
|
-
stop,
|
|
6616
|
-
});
|
|
6617
|
-
if (isRunningRef.current) {
|
|
6618
|
-
rafIdRef.current = requestAnimationFrame(loop);
|
|
6619
|
-
}
|
|
6620
|
-
}
|
|
6621
|
-
catch (e) {
|
|
6622
|
-
if (_constants__WEBPACK_IMPORTED_MODULE_1__.__DEV__) {
|
|
6623
|
-
console.error(e);
|
|
6624
|
-
}
|
|
6625
|
-
stop();
|
|
6626
|
-
onError?.(e);
|
|
6627
|
-
}
|
|
6628
|
-
}, [maxDeltaMs, stop, onError]);
|
|
6629
|
-
const start = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
6630
|
-
if (isRunningRef.current) {
|
|
6631
|
-
return;
|
|
6632
|
-
}
|
|
6633
|
-
lastTimeMsRef.current = null;
|
|
6634
|
-
isRunningRef.current = true;
|
|
6635
|
-
setIsRunning(true);
|
|
6636
|
-
rafIdRef.current = requestAnimationFrame(loop);
|
|
6637
|
-
}, [loop]);
|
|
6638
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6639
|
-
if (autoStart) {
|
|
6640
|
-
start();
|
|
6641
|
-
}
|
|
6642
|
-
return stop;
|
|
6643
|
-
}, [autoStart]);
|
|
6644
|
-
// Pause when a tab is hidden (important for mobile)
|
|
6645
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6646
|
-
const onVisibilityChange = () => {
|
|
6647
|
-
if (document.hidden) {
|
|
6648
|
-
stop();
|
|
6649
|
-
}
|
|
6650
|
-
else if (resumeOnVisibility && autoStart) {
|
|
6651
|
-
start();
|
|
6652
|
-
}
|
|
6653
|
-
};
|
|
6654
|
-
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
6655
|
-
return () => {
|
|
6656
|
-
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
6657
|
-
};
|
|
6658
|
-
}, [autoStart, resumeOnVisibility, start, stop]);
|
|
6659
|
-
return {
|
|
6660
|
-
isRunning,
|
|
6661
|
-
start,
|
|
6662
|
-
stop,
|
|
6663
|
-
};
|
|
6664
|
-
};
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
/***/ },
|
|
6668
|
-
|
|
6669
|
-
/***/ "./src/hooks/use-honey-resize.ts"
|
|
6670
|
-
/*!***************************************!*\
|
|
6671
|
-
!*** ./src/hooks/use-honey-resize.ts ***!
|
|
6672
|
-
\***************************************/
|
|
6673
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6674
|
-
|
|
6675
|
-
"use strict";
|
|
6676
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6677
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6678
|
-
/* harmony export */ useHoneyResize: () => (/* binding */ useHoneyResize)
|
|
6679
|
-
/* harmony export */ });
|
|
6680
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6681
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6682
|
-
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.24.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
6683
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash.throttle */ "./node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js");
|
|
6684
|
-
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_2__);
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
/**
|
|
6689
|
-
* A hook that subscribes to the window `resize` event and invokes a handler function in response.
|
|
6690
|
-
*
|
|
6691
|
-
* The handler can be optionally throttled to limit execution frequency, which is useful
|
|
6692
|
-
* for expensive layout calculations or DOM measurements.
|
|
6693
|
-
*
|
|
6694
|
-
* @example
|
|
6695
|
-
* ```ts
|
|
6696
|
-
* useHoneyResize(() => {
|
|
6697
|
-
* console.log('Window resized');
|
|
6698
|
-
* }, { throttleTime: 200 });
|
|
6699
|
-
* ```
|
|
6700
|
-
*
|
|
6701
|
-
* @param handler - Callback invoked when the window is resized.
|
|
6702
|
-
* @param options - Configuration options controlling invocation timing and performance.
|
|
6703
|
-
*/
|
|
6704
|
-
const useHoneyResize = (handler, { invokeOnMount = false, throttleTime = 0, enabled = true } = {}) => {
|
|
6705
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6706
|
-
if (!enabled) {
|
|
6707
|
-
return;
|
|
5819
|
+
const mergeRefs = (...refs) => value => {
|
|
5820
|
+
refs.forEach(ref => {
|
|
5821
|
+
if ((0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__.isFunction)(ref)) {
|
|
5822
|
+
ref(value);
|
|
6708
5823
|
}
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
: handler;
|
|
6712
|
-
window.addEventListener('resize', handleResize);
|
|
6713
|
-
if (invokeOnMount) {
|
|
6714
|
-
handler();
|
|
5824
|
+
else if ((0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_0__.isObject)(ref)) {
|
|
5825
|
+
ref.current = value;
|
|
6715
5826
|
}
|
|
6716
|
-
|
|
6717
|
-
if ('cancel' in handleResize && (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handleResize.cancel)) {
|
|
6718
|
-
handleResize.cancel();
|
|
6719
|
-
}
|
|
6720
|
-
window.removeEventListener('resize', handleResize);
|
|
6721
|
-
};
|
|
6722
|
-
}, [enabled, invokeOnMount, handler]);
|
|
5827
|
+
});
|
|
6723
5828
|
};
|
|
6724
5829
|
|
|
6725
5830
|
|
|
6726
5831
|
/***/ },
|
|
6727
5832
|
|
|
6728
|
-
/***/ "./src/hooks/
|
|
6729
|
-
|
|
6730
|
-
!*** ./src/hooks/
|
|
6731
|
-
|
|
5833
|
+
/***/ "./src/hooks/index.ts"
|
|
5834
|
+
/*!****************************!*\
|
|
5835
|
+
!*** ./src/hooks/index.ts ***!
|
|
5836
|
+
\****************************/
|
|
6732
5837
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6733
5838
|
|
|
6734
5839
|
"use strict";
|
|
6735
5840
|
__webpack_require__.r(__webpack_exports__);
|
|
6736
5841
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6737
|
-
/* harmony export */
|
|
5842
|
+
/* harmony export */ useHoneyLayout: () => (/* reexport safe */ _use_honey_layout__WEBPACK_IMPORTED_MODULE_1__.useHoneyLayout),
|
|
5843
|
+
/* harmony export */ useHoneyMediaQuery: () => (/* reexport safe */ _use_honey_media_query__WEBPACK_IMPORTED_MODULE_0__.useHoneyMediaQuery),
|
|
5844
|
+
/* harmony export */ useHoneyOverlay: () => (/* reexport safe */ _use_honey_overlay__WEBPACK_IMPORTED_MODULE_3__.useHoneyOverlay),
|
|
5845
|
+
/* harmony export */ useRegisterHoneyOverlay: () => (/* reexport safe */ _use_register_honey_overlay__WEBPACK_IMPORTED_MODULE_2__.useRegisterHoneyOverlay)
|
|
6738
5846
|
/* harmony export */ });
|
|
6739
|
-
/* harmony import */ var
|
|
5847
|
+
/* harmony import */ var _use_honey_media_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-honey-media-query */ "./src/hooks/use-honey-media-query.ts");
|
|
5848
|
+
/* harmony import */ var _use_honey_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-honey-layout */ "./src/hooks/use-honey-layout.ts");
|
|
5849
|
+
/* harmony import */ var _use_register_honey_overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-register-honey-overlay */ "./src/hooks/use-register-honey-overlay.ts");
|
|
5850
|
+
/* harmony import */ var _use_honey_overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-honey-overlay */ "./src/hooks/use-honey-overlay.ts");
|
|
5851
|
+
|
|
5852
|
+
|
|
5853
|
+
|
|
6740
5854
|
|
|
6741
|
-
/**
|
|
6742
|
-
* Enables synthetic horizontal (X-axis) scrolling for a container element
|
|
6743
|
-
* using pointer-based drag interactions.
|
|
6744
|
-
*
|
|
6745
|
-
* This is a convenience wrapper around {@link useHoneySyntheticScroll} with
|
|
6746
|
-
* the axis fixed to `'x'`.
|
|
6747
|
-
*
|
|
6748
|
-
* All behavior, boundaries, and lifecycle guarantees are identical to the
|
|
6749
|
-
* base hook, but limited to horizontal movement only.
|
|
6750
|
-
*
|
|
6751
|
-
* @template Element - The HTML element type of the scrollable container.
|
|
6752
|
-
*
|
|
6753
|
-
* @param options - Configuration options forwarded to
|
|
6754
|
-
* {@link useHoneySyntheticScroll}, excluding the `axis` option.
|
|
6755
|
-
*
|
|
6756
|
-
* @returns A ref that must be attached to the scrollable container element.
|
|
6757
|
-
*/
|
|
6758
|
-
const useHoneySyntheticScrollX = (options) => (0,_use_honey_synthetic_scroll__WEBPACK_IMPORTED_MODULE_0__.useHoneySyntheticScroll)({
|
|
6759
|
-
...options,
|
|
6760
|
-
axis: 'x',
|
|
6761
|
-
});
|
|
6762
5855
|
|
|
6763
5856
|
|
|
6764
5857
|
/***/ },
|
|
6765
5858
|
|
|
6766
|
-
/***/ "./src/hooks/use-honey-
|
|
6767
|
-
|
|
6768
|
-
!*** ./src/hooks/use-honey-
|
|
6769
|
-
|
|
5859
|
+
/***/ "./src/hooks/use-honey-layout.ts"
|
|
5860
|
+
/*!***************************************!*\
|
|
5861
|
+
!*** ./src/hooks/use-honey-layout.ts ***!
|
|
5862
|
+
\***************************************/
|
|
6770
5863
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6771
5864
|
|
|
6772
5865
|
"use strict";
|
|
6773
5866
|
__webpack_require__.r(__webpack_exports__);
|
|
6774
5867
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6775
|
-
/* harmony export */
|
|
5868
|
+
/* harmony export */ useHoneyLayout: () => (/* binding */ useHoneyLayout)
|
|
6776
5869
|
/* harmony export */ });
|
|
6777
|
-
/* harmony import */ var
|
|
5870
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5871
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5872
|
+
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
5873
|
+
/* harmony import */ var _contexts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../contexts */ "./src/contexts/index.ts");
|
|
5874
|
+
|
|
5875
|
+
|
|
6778
5876
|
|
|
6779
5877
|
/**
|
|
6780
|
-
*
|
|
6781
|
-
* using pointer-based drag interactions.
|
|
6782
|
-
*
|
|
6783
|
-
* This is a convenience wrapper around {@link useHoneySyntheticScroll} with
|
|
6784
|
-
* the axis fixed to `'y'`.
|
|
6785
|
-
*
|
|
6786
|
-
* All behavior, boundaries, and lifecycle guarantees are identical to the
|
|
6787
|
-
* base hook, but limited to vertical movement only.
|
|
6788
|
-
*
|
|
6789
|
-
* @template Element - The HTML element type of the scrollable container.
|
|
5878
|
+
* Custom hook to access the Honey layout context.
|
|
6790
5879
|
*
|
|
6791
|
-
* @
|
|
6792
|
-
* {@link useHoneySyntheticScroll}, excluding the `axis` option.
|
|
5880
|
+
* @throws Will throw an error if the hook is used outside of a `HoneyLayoutProvider` component.
|
|
6793
5881
|
*
|
|
6794
|
-
* @returns
|
|
5882
|
+
* @returns The context value providing theming utilities and screen state.
|
|
6795
5883
|
*/
|
|
6796
|
-
const
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
5884
|
+
const useHoneyLayout = () => {
|
|
5885
|
+
const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_contexts__WEBPACK_IMPORTED_MODULE_2__.HoneyLayoutContext);
|
|
5886
|
+
(0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.assert)(context, 'The `useHoneyLayout()` hook must be used inside <HoneyLayoutProvider/> component!');
|
|
5887
|
+
return context;
|
|
5888
|
+
};
|
|
6800
5889
|
|
|
6801
5890
|
|
|
6802
5891
|
/***/ },
|
|
6803
5892
|
|
|
6804
|
-
/***/ "./src/hooks/use-honey-
|
|
6805
|
-
|
|
6806
|
-
!*** ./src/hooks/use-honey-
|
|
6807
|
-
|
|
5893
|
+
/***/ "./src/hooks/use-honey-media-query.ts"
|
|
5894
|
+
/*!********************************************!*\
|
|
5895
|
+
!*** ./src/hooks/use-honey-media-query.ts ***!
|
|
5896
|
+
\********************************************/
|
|
6808
5897
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6809
5898
|
|
|
6810
5899
|
"use strict";
|
|
6811
5900
|
__webpack_require__.r(__webpack_exports__);
|
|
6812
5901
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6813
|
-
/* harmony export */
|
|
6814
|
-
/* harmony export */ useHoneySyntheticScroll: () => (/* binding */ useHoneySyntheticScroll)
|
|
5902
|
+
/* harmony export */ useHoneyMediaQuery: () => (/* binding */ useHoneyMediaQuery)
|
|
6815
5903
|
/* harmony export */ });
|
|
6816
5904
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6817
5905
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6818
|
-
/* harmony import */ var
|
|
6819
|
-
/* harmony import */ var
|
|
6820
|
-
/* harmony import */ var
|
|
6821
|
-
|
|
5906
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash.throttle */ "./node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js");
|
|
5907
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);
|
|
5908
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.ts");
|
|
6822
5909
|
|
|
6823
5910
|
|
|
6824
5911
|
|
|
6825
|
-
const resolveAxisTranslate = ({ delta, translate, containerSize, overflowSize, overscrollPct, }) => {
|
|
6826
|
-
if (overflowSize <= 0) {
|
|
6827
|
-
return null;
|
|
6828
|
-
}
|
|
6829
|
-
const threshold = containerSize * (overscrollPct / 100);
|
|
6830
|
-
return (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.resolveBoundedDelta)({
|
|
6831
|
-
delta,
|
|
6832
|
-
value: translate,
|
|
6833
|
-
min: -(overflowSize + threshold),
|
|
6834
|
-
max: threshold,
|
|
6835
|
-
});
|
|
6836
|
-
};
|
|
6837
|
-
const applyScrollDelta = ({ axis, container, deltaX, deltaY, overscrollPct, }) => {
|
|
6838
|
-
const { translateX, translateY } = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.parse2DMatrix)(container);
|
|
6839
|
-
let nextX = translateX;
|
|
6840
|
-
let nextY = translateY;
|
|
6841
|
-
let shouldScroll = false;
|
|
6842
|
-
if (axis === 'x' || axis === 'both') {
|
|
6843
|
-
const next = resolveAxisTranslate({
|
|
6844
|
-
delta: deltaX,
|
|
6845
|
-
translate: translateX,
|
|
6846
|
-
containerSize: container.clientWidth,
|
|
6847
|
-
overflowSize: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.getXOverflowWidth)(container),
|
|
6848
|
-
overscrollPct,
|
|
6849
|
-
});
|
|
6850
|
-
if (next !== null) {
|
|
6851
|
-
nextX = next;
|
|
6852
|
-
shouldScroll = true;
|
|
6853
|
-
}
|
|
6854
|
-
}
|
|
6855
|
-
if (axis === 'y' || axis === 'both') {
|
|
6856
|
-
const next = resolveAxisTranslate({
|
|
6857
|
-
delta: deltaY,
|
|
6858
|
-
translate: translateY,
|
|
6859
|
-
containerSize: container.clientHeight,
|
|
6860
|
-
overflowSize: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.getYOverflowHeight)(container),
|
|
6861
|
-
overscrollPct,
|
|
6862
|
-
});
|
|
6863
|
-
if (next !== null) {
|
|
6864
|
-
nextY = next;
|
|
6865
|
-
shouldScroll = true;
|
|
6866
|
-
}
|
|
6867
|
-
}
|
|
6868
|
-
if (shouldScroll) {
|
|
6869
|
-
container.style.transform = `translate(${nextX}px, ${nextY}px)`;
|
|
6870
|
-
}
|
|
6871
|
-
return shouldScroll;
|
|
6872
|
-
};
|
|
6873
5912
|
/**
|
|
6874
|
-
*
|
|
6875
|
-
*
|
|
6876
|
-
* Instead of relying on native scrollbars, this hook translates the container
|
|
6877
|
-
* using CSS transforms in response to drag input.
|
|
6878
|
-
*
|
|
6879
|
-
* ### Key characteristics
|
|
6880
|
-
* - Dragging is only applied when content overflows the container on a given axis.
|
|
6881
|
-
* - Movement is clamped within calculated bounds, with optional overscroll allowance.
|
|
6882
|
-
* - Scroll position is stored purely in `transform: translate(...)`.
|
|
6883
|
-
* - Active transforms can be automatically cleared on window resize.
|
|
6884
|
-
*
|
|
6885
|
-
* ### Internals
|
|
6886
|
-
* - Uses {@link useHoneyDrag} to track mouse / touch movement.
|
|
6887
|
-
* - Uses {@link useHoneyResize} to optionally reset scroll state on resize.
|
|
6888
|
-
*
|
|
6889
|
-
* @template Element - The HTML element type of the scrollable container.
|
|
5913
|
+
* The hook that tracks the current screen state based on the theme's media breakpoints.
|
|
5914
|
+
* It updates the state on window resize and orientation change.
|
|
6890
5915
|
*
|
|
6891
|
-
* @param
|
|
5916
|
+
* @param theme - Theme object.
|
|
5917
|
+
* @param options - Optional configuration object.
|
|
6892
5918
|
*
|
|
6893
|
-
* @returns
|
|
5919
|
+
* @returns The current screen state, indicating the orientation (portrait or landscape)
|
|
5920
|
+
* and the active breakpoint (xs, sm, md, lg, xl).
|
|
6894
5921
|
*/
|
|
6895
|
-
const
|
|
6896
|
-
const
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
}
|
|
6900
|
-
/**
|
|
6901
|
-
* Handles drag movement and applies clamped translation along the enabled axis or axes.
|
|
6902
|
-
*
|
|
6903
|
-
* For each axis:
|
|
6904
|
-
* - Skip processing if there is no overflow.
|
|
6905
|
-
* - Compute the candidate translate value from the drag delta.
|
|
6906
|
-
* - Clamp movement within calculated min / max bounds.
|
|
6907
|
-
*/
|
|
6908
|
-
const handleOnMoveDrag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(container => async ({ deltaX, deltaY }) => {
|
|
6909
|
-
return applyScrollDelta({
|
|
6910
|
-
container,
|
|
6911
|
-
deltaX,
|
|
6912
|
-
deltaY,
|
|
6913
|
-
axis,
|
|
6914
|
-
overscrollPct,
|
|
6915
|
-
});
|
|
6916
|
-
}, [axis, overscrollPct]);
|
|
6917
|
-
const handleOnEndDrag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (...args) => {
|
|
6918
|
-
onEndDrag?.(...args);
|
|
6919
|
-
}, [axis, overscrollPct, onEndDrag]);
|
|
6920
|
-
(0,_use_honey_drag__WEBPACK_IMPORTED_MODULE_2__.useHoneyDrag)(containerRef, {
|
|
6921
|
-
enabled,
|
|
6922
|
-
onStartDrag: handleOnStartDrag,
|
|
6923
|
-
onMoveDrag: handleOnMoveDrag,
|
|
6924
|
-
onEndDrag: handleOnEndDrag,
|
|
6925
|
-
});
|
|
6926
|
-
const resizeHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
6927
|
-
const container = containerRef.current;
|
|
6928
|
-
if (container) {
|
|
6929
|
-
container.style.removeProperty('transform');
|
|
6930
|
-
}
|
|
6931
|
-
}, []);
|
|
6932
|
-
(0,_use_honey_resize__WEBPACK_IMPORTED_MODULE_3__.useHoneyResize)(resizeHandler, {
|
|
6933
|
-
enabled: enabled && resetOnResize,
|
|
6934
|
-
});
|
|
5922
|
+
const useHoneyMediaQuery = (theme, { resizeThrottle = 0, overrideScreenState } = {}) => {
|
|
5923
|
+
const [screenState, setScreenState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(() => ({
|
|
5924
|
+
...(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.resolveScreenState)(theme.breakpoints),
|
|
5925
|
+
...overrideScreenState,
|
|
5926
|
+
}));
|
|
6935
5927
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
6936
|
-
const
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
if (scrollMode === 'default') {
|
|
6941
|
-
const touchAction = axis === 'x' ? 'pan-y' : axis === 'y' ? 'pan-x' : 'none';
|
|
6942
|
-
container.style.overscrollBehavior = 'contain';
|
|
6943
|
-
container.style.touchAction = touchAction;
|
|
6944
|
-
}
|
|
6945
|
-
const handleOnWheel = (event) => {
|
|
6946
|
-
const { deltaX, deltaY } = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.resolveAxisDelta)({
|
|
6947
|
-
deltaX: event.deltaX,
|
|
6948
|
-
deltaY: event.deltaY,
|
|
6949
|
-
}, axis);
|
|
6950
|
-
const didScroll = applyScrollDelta({
|
|
6951
|
-
container,
|
|
6952
|
-
deltaX,
|
|
6953
|
-
deltaY,
|
|
6954
|
-
axis,
|
|
6955
|
-
overscrollPct,
|
|
5928
|
+
const handleResize = lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
5929
|
+
setScreenState({
|
|
5930
|
+
...(0,_helpers__WEBPACK_IMPORTED_MODULE_2__.resolveScreenState)(theme.breakpoints),
|
|
5931
|
+
...overrideScreenState,
|
|
6956
5932
|
});
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
if (enablePointerScroll) {
|
|
6962
|
-
container.addEventListener('wheel', handleOnWheel, { passive: false });
|
|
6963
|
-
}
|
|
5933
|
+
}, resizeThrottle);
|
|
5934
|
+
handleResize();
|
|
5935
|
+
window.addEventListener('resize', handleResize);
|
|
5936
|
+
window.screen.orientation.addEventListener('change', handleResize);
|
|
6964
5937
|
return () => {
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
}
|
|
6969
|
-
if (enablePointerScroll) {
|
|
6970
|
-
container.removeEventListener('wheel', handleOnWheel);
|
|
6971
|
-
}
|
|
5938
|
+
handleResize.cancel();
|
|
5939
|
+
window.removeEventListener('resize', handleResize);
|
|
5940
|
+
window.screen.orientation.removeEventListener('change', handleResize);
|
|
6972
5941
|
};
|
|
6973
|
-
}, [
|
|
6974
|
-
return
|
|
5942
|
+
}, []);
|
|
5943
|
+
return screenState;
|
|
6975
5944
|
};
|
|
6976
5945
|
|
|
6977
5946
|
|
|
6978
5947
|
/***/ },
|
|
6979
5948
|
|
|
6980
|
-
/***/ "./src/hooks/use-honey-
|
|
6981
|
-
|
|
6982
|
-
!*** ./src/hooks/use-honey-
|
|
6983
|
-
|
|
5949
|
+
/***/ "./src/hooks/use-honey-overlay.ts"
|
|
5950
|
+
/*!****************************************!*\
|
|
5951
|
+
!*** ./src/hooks/use-honey-overlay.ts ***!
|
|
5952
|
+
\****************************************/
|
|
6984
5953
|
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6985
5954
|
|
|
6986
5955
|
"use strict";
|
|
6987
5956
|
__webpack_require__.r(__webpack_exports__);
|
|
6988
5957
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6989
|
-
/* harmony export */
|
|
5958
|
+
/* harmony export */ useHoneyOverlay: () => (/* binding */ useHoneyOverlay)
|
|
6990
5959
|
/* harmony export */ });
|
|
6991
5960
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6992
5961
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -6994,94 +5963,43 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6994
5963
|
|
|
6995
5964
|
|
|
6996
5965
|
/**
|
|
6997
|
-
*
|
|
5966
|
+
* Hook for interacting with an active overlay managed by `HoneyLayoutProvider`.
|
|
5967
|
+
*
|
|
5968
|
+
* @param targetOverlayId - The unique ID of the overlay you want to interact with.
|
|
5969
|
+
* @param options - Optional configuration such as event handlers (e.g., `onKeyUp`).
|
|
6998
5970
|
*
|
|
6999
|
-
*
|
|
7000
|
-
* - Frame-accurate time progression using `requestAnimationFrame`
|
|
7001
|
-
* - Supports countdown and count-up modes
|
|
7002
|
-
* - Explicit lifecycle control (start / pause / resume / reset)
|
|
7003
|
-
* - Drift-free timing using delta-based updates
|
|
7004
|
-
* - Safe completion handling via `onEnd`
|
|
5971
|
+
* @returns The overlay instance matching the provided ID, or `undefined` if not found.
|
|
7005
5972
|
*
|
|
7006
|
-
*
|
|
7007
|
-
* -
|
|
7008
|
-
* -
|
|
7009
|
-
* -
|
|
5973
|
+
* @remarks
|
|
5974
|
+
* - This hook only works with overlays that are currently active.
|
|
5975
|
+
* - If the overlay is not active or not registered, `undefined` will be returned.
|
|
5976
|
+
* - Event handlers like `onKeyUp` are automatically registered and cleaned up for the overlay.
|
|
7010
5977
|
*
|
|
7011
5978
|
* @example
|
|
7012
|
-
* ```
|
|
7013
|
-
* const
|
|
7014
|
-
*
|
|
7015
|
-
*
|
|
7016
|
-
*
|
|
5979
|
+
* ```tsx
|
|
5980
|
+
* const overlay = useHoneyOverlay('my-overlay-id', {
|
|
5981
|
+
* onKeyUp: (keyCode, e) => {
|
|
5982
|
+
* if (keyCode === 'Escape') {
|
|
5983
|
+
* console.log('Escape key pressed!');
|
|
5984
|
+
* }
|
|
5985
|
+
* },
|
|
7017
5986
|
* });
|
|
7018
|
-
*
|
|
7019
|
-
* timer.startTimer();
|
|
7020
5987
|
* ```
|
|
7021
5988
|
*/
|
|
7022
|
-
const
|
|
7023
|
-
const
|
|
7024
|
-
const
|
|
7025
|
-
const onEndRef = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useHoneyLatest)(onEnd);
|
|
7026
|
-
/**
|
|
7027
|
-
* RAF frame handler responsible for advancing the timer.
|
|
7028
|
-
*
|
|
7029
|
-
* - Computes the next timer value based on `deltaTimeMs`
|
|
7030
|
-
* - Detects completion and stops the RAF loop
|
|
7031
|
-
* - Updates React state with the derived value
|
|
7032
|
-
*/
|
|
7033
|
-
const frameHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((deltaTimeMs, frameContext) => {
|
|
7034
|
-
let nextTime = mode === 'countdown' ? timeRef.current - deltaTimeMs : timeRef.current + deltaTimeMs;
|
|
7035
|
-
let finished = false;
|
|
7036
|
-
if (mode === 'countdown') {
|
|
7037
|
-
if (nextTime <= targetTimeMs) {
|
|
7038
|
-
nextTime = targetTimeMs;
|
|
7039
|
-
finished = true;
|
|
7040
|
-
}
|
|
7041
|
-
}
|
|
7042
|
-
else if (targetTimeMs > 0 && nextTime >= targetTimeMs) {
|
|
7043
|
-
nextTime = targetTimeMs;
|
|
7044
|
-
finished = true;
|
|
7045
|
-
}
|
|
7046
|
-
timeRef.current = nextTime;
|
|
7047
|
-
setTimeMs(nextTime);
|
|
7048
|
-
if (finished) {
|
|
7049
|
-
frameContext.stop();
|
|
7050
|
-
onEndRef.current?.();
|
|
7051
|
-
}
|
|
7052
|
-
}, [mode, targetTimeMs]);
|
|
7053
|
-
const rafLoop = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useHoneyRafLoop)(frameHandler);
|
|
7054
|
-
const start = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
7055
|
-
timeRef.current = initialTimeMs;
|
|
7056
|
-
setTimeMs(initialTimeMs);
|
|
7057
|
-
rafLoop.start();
|
|
7058
|
-
}, [initialTimeMs, rafLoop.start]);
|
|
7059
|
-
const pause = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
7060
|
-
rafLoop.stop();
|
|
7061
|
-
}, [rafLoop.stop]);
|
|
7062
|
-
const resume = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
7063
|
-
if (!rafLoop.isRunning) {
|
|
7064
|
-
rafLoop.start();
|
|
7065
|
-
}
|
|
7066
|
-
}, [rafLoop.isRunning, rafLoop.start]);
|
|
7067
|
-
const reset = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextTimeMs = initialTimeMs) => {
|
|
7068
|
-
rafLoop.stop();
|
|
7069
|
-
timeRef.current = nextTimeMs;
|
|
7070
|
-
setTimeMs(nextTimeMs);
|
|
7071
|
-
}, [initialTimeMs, rafLoop.stop]);
|
|
5989
|
+
const useHoneyOverlay = (targetOverlayId, { onKeyUp } = {}) => {
|
|
5990
|
+
const { overlays } = (0,_hooks__WEBPACK_IMPORTED_MODULE_1__.useHoneyLayout)();
|
|
5991
|
+
const overlay = overlays.find(overlay => overlay.id === targetOverlayId);
|
|
7072
5992
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
7073
|
-
|
|
7074
|
-
|
|
5993
|
+
// If no overlay is found or no `onKeyUp` handler is provided, skip setting up the listener
|
|
5994
|
+
if (!overlay || !onKeyUp) {
|
|
5995
|
+
return;
|
|
7075
5996
|
}
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
resume,
|
|
7083
|
-
reset,
|
|
7084
|
-
};
|
|
5997
|
+
overlay.addListener('keyup', onKeyUp);
|
|
5998
|
+
return () => {
|
|
5999
|
+
overlay.removeListener('keyup', onKeyUp);
|
|
6000
|
+
};
|
|
6001
|
+
}, [overlay, onKeyUp]);
|
|
6002
|
+
return overlay;
|
|
7085
6003
|
};
|
|
7086
6004
|
|
|
7087
6005
|
|
|
@@ -7505,9 +6423,9 @@ module.exports = require("react");
|
|
|
7505
6423
|
|
|
7506
6424
|
/***/ },
|
|
7507
6425
|
|
|
7508
|
-
/***/ "./node_modules/.pnpm/@floating-ui+core@1.7.
|
|
6426
|
+
/***/ "./node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"
|
|
7509
6427
|
/*!*************************************************************************************************************!*\
|
|
7510
|
-
!*** ./node_modules/.pnpm/@floating-ui+core@1.7.
|
|
6428
|
+
!*** ./node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs ***!
|
|
7511
6429
|
\*************************************************************************************************************/
|
|
7512
6430
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7513
6431
|
|
|
@@ -7527,7 +6445,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7527
6445
|
/* harmony export */ shift: () => (/* binding */ shift),
|
|
7528
6446
|
/* harmony export */ size: () => (/* binding */ size)
|
|
7529
6447
|
/* harmony export */ });
|
|
7530
|
-
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
6448
|
+
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");
|
|
7531
6449
|
|
|
7532
6450
|
|
|
7533
6451
|
|
|
@@ -7652,6 +6570,9 @@ async function detectOverflow(state, options) {
|
|
|
7652
6570
|
};
|
|
7653
6571
|
}
|
|
7654
6572
|
|
|
6573
|
+
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
6574
|
+
const MAX_RESET_COUNT = 50;
|
|
6575
|
+
|
|
7655
6576
|
/**
|
|
7656
6577
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
7657
6578
|
* next to a given reference element.
|
|
@@ -7666,7 +6587,10 @@ const computePosition = async (reference, floating, config) => {
|
|
|
7666
6587
|
middleware = [],
|
|
7667
6588
|
platform
|
|
7668
6589
|
} = config;
|
|
7669
|
-
const
|
|
6590
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
6591
|
+
...platform,
|
|
6592
|
+
detectOverflow
|
|
6593
|
+
};
|
|
7670
6594
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
7671
6595
|
let rects = await platform.getElementRects({
|
|
7672
6596
|
reference,
|
|
@@ -7678,14 +6602,17 @@ const computePosition = async (reference, floating, config) => {
|
|
|
7678
6602
|
y
|
|
7679
6603
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
7680
6604
|
let statefulPlacement = placement;
|
|
7681
|
-
let middlewareData = {};
|
|
7682
6605
|
let resetCount = 0;
|
|
7683
|
-
|
|
7684
|
-
|
|
6606
|
+
const middlewareData = {};
|
|
6607
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
6608
|
+
const currentMiddleware = middleware[i];
|
|
6609
|
+
if (!currentMiddleware) {
|
|
6610
|
+
continue;
|
|
6611
|
+
}
|
|
7685
6612
|
const {
|
|
7686
6613
|
name,
|
|
7687
6614
|
fn
|
|
7688
|
-
} =
|
|
6615
|
+
} = currentMiddleware;
|
|
7689
6616
|
const {
|
|
7690
6617
|
x: nextX,
|
|
7691
6618
|
y: nextY,
|
|
@@ -7699,10 +6626,7 @@ const computePosition = async (reference, floating, config) => {
|
|
|
7699
6626
|
strategy,
|
|
7700
6627
|
middlewareData,
|
|
7701
6628
|
rects,
|
|
7702
|
-
platform:
|
|
7703
|
-
...platform,
|
|
7704
|
-
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
7705
|
-
},
|
|
6629
|
+
platform: platformWithDetectOverflow,
|
|
7706
6630
|
elements: {
|
|
7707
6631
|
reference,
|
|
7708
6632
|
floating
|
|
@@ -7710,14 +6634,11 @@ const computePosition = async (reference, floating, config) => {
|
|
|
7710
6634
|
});
|
|
7711
6635
|
x = nextX != null ? nextX : x;
|
|
7712
6636
|
y = nextY != null ? nextY : y;
|
|
7713
|
-
middlewareData = {
|
|
7714
|
-
...middlewareData,
|
|
7715
|
-
|
|
7716
|
-
...middlewareData[name],
|
|
7717
|
-
...data
|
|
7718
|
-
}
|
|
6637
|
+
middlewareData[name] = {
|
|
6638
|
+
...middlewareData[name],
|
|
6639
|
+
...data
|
|
7719
6640
|
};
|
|
7720
|
-
if (reset && resetCount
|
|
6641
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
7721
6642
|
resetCount++;
|
|
7722
6643
|
if (typeof reset === 'object') {
|
|
7723
6644
|
if (reset.placement) {
|
|
@@ -8587,9 +7508,9 @@ const size = function (options) {
|
|
|
8587
7508
|
|
|
8588
7509
|
/***/ },
|
|
8589
7510
|
|
|
8590
|
-
/***/ "./node_modules/.pnpm/@floating-ui+dom@1.7.
|
|
7511
|
+
/***/ "./node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"
|
|
8591
7512
|
/*!**********************************************************************************************************!*\
|
|
8592
|
-
!*** ./node_modules/.pnpm/@floating-ui+dom@1.7.
|
|
7513
|
+
!*** ./node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs ***!
|
|
8593
7514
|
\**********************************************************************************************************/
|
|
8594
7515
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
8595
7516
|
|
|
@@ -8611,9 +7532,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8611
7532
|
/* harmony export */ shift: () => (/* binding */ shift),
|
|
8612
7533
|
/* harmony export */ size: () => (/* binding */ size)
|
|
8613
7534
|
/* harmony export */ });
|
|
8614
|
-
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/core */ "./node_modules/.pnpm/@floating-ui+core@1.7.
|
|
8615
|
-
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
8616
|
-
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/utils/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
7535
|
+
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/core */ "./node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs");
|
|
7536
|
+
/* harmony import */ var _floating_ui_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");
|
|
7537
|
+
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/utils/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");
|
|
8617
7538
|
|
|
8618
7539
|
|
|
8619
7540
|
|
|
@@ -8790,7 +7711,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
8790
7711
|
if ((0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeName)(offsetParent) !== 'body' || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isOverflowElement)(documentElement)) {
|
|
8791
7712
|
scroll = (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getNodeScroll)(offsetParent);
|
|
8792
7713
|
}
|
|
8793
|
-
if (
|
|
7714
|
+
if (isOffsetParentAnElement) {
|
|
8794
7715
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
8795
7716
|
scale = getScale(offsetParent);
|
|
8796
7717
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -8878,7 +7799,6 @@ function getViewportRect(element, strategy) {
|
|
|
8878
7799
|
};
|
|
8879
7800
|
}
|
|
8880
7801
|
|
|
8881
|
-
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
8882
7802
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
8883
7803
|
function getInnerBoundingClientRect(element, strategy) {
|
|
8884
7804
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -8943,7 +7863,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
8943
7863
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
8944
7864
|
currentContainingBlockComputedStyle = null;
|
|
8945
7865
|
}
|
|
8946
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
7866
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isOverflowElement)(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
8947
7867
|
if (shouldDropCurrentNode) {
|
|
8948
7868
|
// Drop non-containing blocks.
|
|
8949
7869
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -8968,20 +7888,23 @@ function getClippingRect(_ref) {
|
|
|
8968
7888
|
} = _ref;
|
|
8969
7889
|
const elementClippingAncestors = boundary === 'clippingAncestors' ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.isTopLayer)(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
8970
7890
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
8971
|
-
const
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
7891
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
7892
|
+
let top = firstRect.top;
|
|
7893
|
+
let right = firstRect.right;
|
|
7894
|
+
let bottom = firstRect.bottom;
|
|
7895
|
+
let left = firstRect.left;
|
|
7896
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
7897
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
7898
|
+
top = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(rect.top, top);
|
|
7899
|
+
right = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.min)(rect.right, right);
|
|
7900
|
+
bottom = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.min)(rect.bottom, bottom);
|
|
7901
|
+
left = (0,_floating_ui_core__WEBPACK_IMPORTED_MODULE_1__.max)(rect.left, left);
|
|
7902
|
+
}
|
|
8980
7903
|
return {
|
|
8981
|
-
width:
|
|
8982
|
-
height:
|
|
8983
|
-
x:
|
|
8984
|
-
y:
|
|
7904
|
+
width: right - left,
|
|
7905
|
+
height: bottom - top,
|
|
7906
|
+
x: left,
|
|
7907
|
+
y: top
|
|
8985
7908
|
};
|
|
8986
7909
|
}
|
|
8987
7910
|
|
|
@@ -9232,7 +8155,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
9232
8155
|
animationFrame = false
|
|
9233
8156
|
} = options;
|
|
9234
8157
|
const referenceEl = unwrapElement(reference);
|
|
9235
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(referenceEl) : []), ...(0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(floating)] : [];
|
|
8158
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(referenceEl) : []), ...(floating ? (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_2__.getOverflowAncestors)(floating) : [])] : [];
|
|
9236
8159
|
ancestors.forEach(ancestor => {
|
|
9237
8160
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
9238
8161
|
passive: true
|
|
@@ -9245,7 +8168,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
9245
8168
|
if (elementResize) {
|
|
9246
8169
|
resizeObserver = new ResizeObserver(_ref => {
|
|
9247
8170
|
let [firstEntry] = _ref;
|
|
9248
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
8171
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
9249
8172
|
// Prevent update loops when using the `size` middleware.
|
|
9250
8173
|
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
9251
8174
|
resizeObserver.unobserve(floating);
|
|
@@ -9260,7 +8183,9 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
9260
8183
|
if (referenceEl && !animationFrame) {
|
|
9261
8184
|
resizeObserver.observe(referenceEl);
|
|
9262
8185
|
}
|
|
9263
|
-
|
|
8186
|
+
if (floating) {
|
|
8187
|
+
resizeObserver.observe(floating);
|
|
8188
|
+
}
|
|
9264
8189
|
}
|
|
9265
8190
|
let frameId;
|
|
9266
8191
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -9395,9 +8320,9 @@ const computePosition = (reference, floating, options) => {
|
|
|
9395
8320
|
|
|
9396
8321
|
/***/ },
|
|
9397
8322
|
|
|
9398
|
-
/***/ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.
|
|
8323
|
+
/***/ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.8_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"
|
|
9399
8324
|
/*!************************************************************************************************************************************************************************!*\
|
|
9400
|
-
!*** ./node_modules/.pnpm/@floating-ui+react-dom@2.1.
|
|
8325
|
+
!*** ./node_modules/.pnpm/@floating-ui+react-dom@2.1.8_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs ***!
|
|
9401
8326
|
\************************************************************************************************************************************************************************/
|
|
9402
8327
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
9403
8328
|
|
|
@@ -9420,8 +8345,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9420
8345
|
/* harmony export */ size: () => (/* binding */ size),
|
|
9421
8346
|
/* harmony export */ useFloating: () => (/* binding */ useFloating)
|
|
9422
8347
|
/* harmony export */ });
|
|
9423
|
-
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/.pnpm/@floating-ui+dom@1.7.
|
|
9424
|
-
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
8348
|
+
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs");
|
|
8349
|
+
/* harmony import */ var _floating_ui_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");
|
|
9425
8350
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
9426
8351
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "./node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js");
|
|
9427
8352
|
|
|
@@ -9707,28 +8632,39 @@ const arrow$1 = options => {
|
|
|
9707
8632
|
* object may be passed.
|
|
9708
8633
|
* @see https://floating-ui.com/docs/offset
|
|
9709
8634
|
*/
|
|
9710
|
-
const offset = (options, deps) =>
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
8635
|
+
const offset = (options, deps) => {
|
|
8636
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.offset)(options);
|
|
8637
|
+
return {
|
|
8638
|
+
name: result.name,
|
|
8639
|
+
fn: result.fn,
|
|
8640
|
+
options: [options, deps]
|
|
8641
|
+
};
|
|
8642
|
+
};
|
|
9714
8643
|
|
|
9715
8644
|
/**
|
|
9716
8645
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
9717
8646
|
* keep it in view when it will overflow the clipping boundary.
|
|
9718
8647
|
* @see https://floating-ui.com/docs/shift
|
|
9719
8648
|
*/
|
|
9720
|
-
const shift = (options, deps) =>
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
8649
|
+
const shift = (options, deps) => {
|
|
8650
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.shift)(options);
|
|
8651
|
+
return {
|
|
8652
|
+
name: result.name,
|
|
8653
|
+
fn: result.fn,
|
|
8654
|
+
options: [options, deps]
|
|
8655
|
+
};
|
|
8656
|
+
};
|
|
9724
8657
|
|
|
9725
8658
|
/**
|
|
9726
8659
|
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
9727
8660
|
*/
|
|
9728
|
-
const limitShift = (options, deps) =>
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
8661
|
+
const limitShift = (options, deps) => {
|
|
8662
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.limitShift)(options);
|
|
8663
|
+
return {
|
|
8664
|
+
fn: result.fn,
|
|
8665
|
+
options: [options, deps]
|
|
8666
|
+
};
|
|
8667
|
+
};
|
|
9732
8668
|
|
|
9733
8669
|
/**
|
|
9734
8670
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
@@ -9736,10 +8672,14 @@ const limitShift = (options, deps) => ({
|
|
|
9736
8672
|
* clipping boundary. Alternative to `autoPlacement`.
|
|
9737
8673
|
* @see https://floating-ui.com/docs/flip
|
|
9738
8674
|
*/
|
|
9739
|
-
const flip = (options, deps) =>
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
8675
|
+
const flip = (options, deps) => {
|
|
8676
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.flip)(options);
|
|
8677
|
+
return {
|
|
8678
|
+
name: result.name,
|
|
8679
|
+
fn: result.fn,
|
|
8680
|
+
options: [options, deps]
|
|
8681
|
+
};
|
|
8682
|
+
};
|
|
9743
8683
|
|
|
9744
8684
|
/**
|
|
9745
8685
|
* Provides data that allows you to change the size of the floating element —
|
|
@@ -9747,10 +8687,14 @@ const flip = (options, deps) => ({
|
|
|
9747
8687
|
* width of the reference element.
|
|
9748
8688
|
* @see https://floating-ui.com/docs/size
|
|
9749
8689
|
*/
|
|
9750
|
-
const size = (options, deps) =>
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
8690
|
+
const size = (options, deps) => {
|
|
8691
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.size)(options);
|
|
8692
|
+
return {
|
|
8693
|
+
name: result.name,
|
|
8694
|
+
fn: result.fn,
|
|
8695
|
+
options: [options, deps]
|
|
8696
|
+
};
|
|
8697
|
+
};
|
|
9754
8698
|
|
|
9755
8699
|
/**
|
|
9756
8700
|
* Optimizes the visibility of the floating element by choosing the placement
|
|
@@ -9758,30 +8702,42 @@ const size = (options, deps) => ({
|
|
|
9758
8702
|
* preferred placement. Alternative to `flip`.
|
|
9759
8703
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
9760
8704
|
*/
|
|
9761
|
-
const autoPlacement = (options, deps) =>
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
8705
|
+
const autoPlacement = (options, deps) => {
|
|
8706
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.autoPlacement)(options);
|
|
8707
|
+
return {
|
|
8708
|
+
name: result.name,
|
|
8709
|
+
fn: result.fn,
|
|
8710
|
+
options: [options, deps]
|
|
8711
|
+
};
|
|
8712
|
+
};
|
|
9765
8713
|
|
|
9766
8714
|
/**
|
|
9767
8715
|
* Provides data to hide the floating element in applicable situations, such as
|
|
9768
8716
|
* when it is not in the same clipping context as the reference element.
|
|
9769
8717
|
* @see https://floating-ui.com/docs/hide
|
|
9770
8718
|
*/
|
|
9771
|
-
const hide = (options, deps) =>
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
8719
|
+
const hide = (options, deps) => {
|
|
8720
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.hide)(options);
|
|
8721
|
+
return {
|
|
8722
|
+
name: result.name,
|
|
8723
|
+
fn: result.fn,
|
|
8724
|
+
options: [options, deps]
|
|
8725
|
+
};
|
|
8726
|
+
};
|
|
9775
8727
|
|
|
9776
8728
|
/**
|
|
9777
8729
|
* Provides improved positioning for inline reference elements that can span
|
|
9778
8730
|
* over multiple lines, such as hyperlinks or range selections.
|
|
9779
8731
|
* @see https://floating-ui.com/docs/inline
|
|
9780
8732
|
*/
|
|
9781
|
-
const inline = (options, deps) =>
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
8733
|
+
const inline = (options, deps) => {
|
|
8734
|
+
const result = (0,_floating_ui_dom__WEBPACK_IMPORTED_MODULE_0__.inline)(options);
|
|
8735
|
+
return {
|
|
8736
|
+
name: result.name,
|
|
8737
|
+
fn: result.fn,
|
|
8738
|
+
options: [options, deps]
|
|
8739
|
+
};
|
|
8740
|
+
};
|
|
9785
8741
|
|
|
9786
8742
|
/**
|
|
9787
8743
|
* Provides data to position an inner element of the floating element so that it
|
|
@@ -9789,19 +8745,23 @@ const inline = (options, deps) => ({
|
|
|
9789
8745
|
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
9790
8746
|
* @see https://floating-ui.com/docs/arrow
|
|
9791
8747
|
*/
|
|
9792
|
-
const arrow = (options, deps) =>
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
8748
|
+
const arrow = (options, deps) => {
|
|
8749
|
+
const result = arrow$1(options);
|
|
8750
|
+
return {
|
|
8751
|
+
name: result.name,
|
|
8752
|
+
fn: result.fn,
|
|
8753
|
+
options: [options, deps]
|
|
8754
|
+
};
|
|
8755
|
+
};
|
|
9796
8756
|
|
|
9797
8757
|
|
|
9798
8758
|
|
|
9799
8759
|
|
|
9800
8760
|
/***/ },
|
|
9801
8761
|
|
|
9802
|
-
/***/ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
8762
|
+
/***/ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs"
|
|
9803
8763
|
/*!**************************************************************************************************************************************************************!*\
|
|
9804
|
-
!*** ./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
8764
|
+
!*** ./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.mjs ***!
|
|
9805
8765
|
\**************************************************************************************************************************************************************/
|
|
9806
8766
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
9807
8767
|
|
|
@@ -9862,14 +8822,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9862
8822
|
/* harmony export */ useTypeahead: () => (/* binding */ useTypeahead)
|
|
9863
8823
|
/* harmony export */ });
|
|
9864
8824
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9865
|
-
/* harmony import */ var _floating_ui_react_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react/utils */ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
8825
|
+
/* harmony import */ var _floating_ui_react_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @floating-ui/react/utils */ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs");
|
|
9866
8826
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/.pnpm/react@19.2.4/node_modules/react/jsx-runtime.js");
|
|
9867
|
-
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
8827
|
+
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");
|
|
9868
8828
|
/* harmony import */ var tabbable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tabbable */ "./node_modules/.pnpm/tabbable@6.4.0/node_modules/tabbable/dist/index.esm.js");
|
|
9869
8829
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ "./node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/index.js");
|
|
9870
|
-
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.
|
|
9871
|
-
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+dom@1.7.
|
|
9872
|
-
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
8830
|
+
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+react-dom@2.1.8_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs");
|
|
8831
|
+
/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @floating-ui/react-dom */ "./node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs");
|
|
8832
|
+
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");
|
|
9873
8833
|
|
|
9874
8834
|
|
|
9875
8835
|
|
|
@@ -11232,7 +10192,12 @@ let uncontrolledElementsSet = /*#__PURE__*/new WeakSet();
|
|
|
11232
10192
|
let markerMap = {};
|
|
11233
10193
|
let lockCount$1 = 0;
|
|
11234
10194
|
const supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;
|
|
11235
|
-
|
|
10195
|
+
function unwrapHost(node) {
|
|
10196
|
+
if (!node) {
|
|
10197
|
+
return null;
|
|
10198
|
+
}
|
|
10199
|
+
return (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_3__.isShadowRoot)(node) ? node.host : unwrapHost(node.parentNode);
|
|
10200
|
+
}
|
|
11236
10201
|
const correctElements = (parent, targets) => targets.map(target => {
|
|
11237
10202
|
if (parent.contains(target)) {
|
|
11238
10203
|
return target;
|
|
@@ -11583,7 +10548,7 @@ function addPreviouslyFocusedElement(element) {
|
|
|
11583
10548
|
if (element && (0,_floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_3__.getNodeName)(element) !== 'body') {
|
|
11584
10549
|
previouslyFocusedElements.push(new WeakRef(element));
|
|
11585
10550
|
if (previouslyFocusedElements.length > LIST_LIMIT) {
|
|
11586
|
-
previouslyFocusedElements = previouslyFocusedElements.slice(-
|
|
10551
|
+
previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);
|
|
11587
10552
|
}
|
|
11588
10553
|
}
|
|
11589
10554
|
}
|
|
@@ -12703,18 +11668,22 @@ function useDismiss(context, props) {
|
|
|
12703
11668
|
})
|
|
12704
11669
|
})
|
|
12705
11670
|
}), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);
|
|
12706
|
-
const floating = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() =>
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
onMouseUp() {
|
|
11671
|
+
const floating = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
|
|
11672
|
+
function setMouseDownOrUpInside(event) {
|
|
11673
|
+
if (event.button !== 0) {
|
|
11674
|
+
return;
|
|
11675
|
+
}
|
|
12712
11676
|
endedOrStartedInsideRef.current = true;
|
|
12713
|
-
},
|
|
12714
|
-
[captureHandlerKeys[outsidePressEvent]]: () => {
|
|
12715
|
-
dataRef.current.insideReactTree = true;
|
|
12716
11677
|
}
|
|
12717
|
-
|
|
11678
|
+
return {
|
|
11679
|
+
onKeyDown: closeOnEscapeKeyDown,
|
|
11680
|
+
onMouseDown: setMouseDownOrUpInside,
|
|
11681
|
+
onMouseUp: setMouseDownOrUpInside,
|
|
11682
|
+
[captureHandlerKeys[outsidePressEvent]]: () => {
|
|
11683
|
+
dataRef.current.insideReactTree = true;
|
|
11684
|
+
}
|
|
11685
|
+
};
|
|
11686
|
+
}, [closeOnEscapeKeyDown, outsidePressEvent, dataRef]);
|
|
12718
11687
|
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => enabled ? {
|
|
12719
11688
|
reference,
|
|
12720
11689
|
floating
|
|
@@ -14473,9 +13442,9 @@ function safePolygon(options) {
|
|
|
14473
13442
|
|
|
14474
13443
|
/***/ },
|
|
14475
13444
|
|
|
14476
|
-
/***/ "./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
13445
|
+
/***/ "./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs"
|
|
14477
13446
|
/*!********************************************************************************************************************************************************************!*\
|
|
14478
|
-
!*** ./node_modules/.pnpm/@floating-ui+react@0.27.
|
|
13447
|
+
!*** ./node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs ***!
|
|
14479
13448
|
\********************************************************************************************************************************************************************/
|
|
14480
13449
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
14481
13450
|
|
|
@@ -14527,9 +13496,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14527
13496
|
/* harmony export */ useLatestRef: () => (/* binding */ useLatestRef),
|
|
14528
13497
|
/* harmony export */ useModernLayoutEffect: () => (/* binding */ index)
|
|
14529
13498
|
/* harmony export */ });
|
|
14530
|
-
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/utils/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
13499
|
+
/* harmony import */ var _floating_ui_utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @floating-ui/utils/dom */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs");
|
|
14531
13500
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
14532
|
-
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
13501
|
+
/* harmony import */ var _floating_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @floating-ui/utils */ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs");
|
|
14533
13502
|
/* harmony import */ var tabbable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tabbable */ "./node_modules/.pnpm/tabbable@6.4.0/node_modules/tabbable/dist/index.esm.js");
|
|
14534
13503
|
|
|
14535
13504
|
|
|
@@ -15072,9 +14041,9 @@ function enableFocusInside(container) {
|
|
|
15072
14041
|
|
|
15073
14042
|
/***/ },
|
|
15074
14043
|
|
|
15075
|
-
/***/ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
14044
|
+
/***/ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"
|
|
15076
14045
|
/*!*********************************************************************************************************************!*\
|
|
15077
|
-
!*** ./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
14046
|
+
!*** ./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs ***!
|
|
15078
14047
|
\*********************************************************************************************************************/
|
|
15079
14048
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
15080
14049
|
|
|
@@ -15146,7 +14115,6 @@ function isShadowRoot(value) {
|
|
|
15146
14115
|
}
|
|
15147
14116
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
15148
14117
|
}
|
|
15149
|
-
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
15150
14118
|
function isOverflowElement(element) {
|
|
15151
14119
|
const {
|
|
15152
14120
|
overflow,
|
|
@@ -15154,32 +14122,35 @@ function isOverflowElement(element) {
|
|
|
15154
14122
|
overflowY,
|
|
15155
14123
|
display
|
|
15156
14124
|
} = getComputedStyle(element);
|
|
15157
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
14125
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
15158
14126
|
}
|
|
15159
|
-
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
15160
14127
|
function isTableElement(element) {
|
|
15161
|
-
return
|
|
14128
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
15162
14129
|
}
|
|
15163
|
-
const topLayerSelectors = [':popover-open', ':modal'];
|
|
15164
14130
|
function isTopLayer(element) {
|
|
15165
|
-
|
|
15166
|
-
|
|
15167
|
-
return
|
|
15168
|
-
} catch (_e) {
|
|
15169
|
-
return false;
|
|
14131
|
+
try {
|
|
14132
|
+
if (element.matches(':popover-open')) {
|
|
14133
|
+
return true;
|
|
15170
14134
|
}
|
|
15171
|
-
})
|
|
14135
|
+
} catch (_e) {
|
|
14136
|
+
// no-op
|
|
14137
|
+
}
|
|
14138
|
+
try {
|
|
14139
|
+
return element.matches(':modal');
|
|
14140
|
+
} catch (_e) {
|
|
14141
|
+
return false;
|
|
14142
|
+
}
|
|
15172
14143
|
}
|
|
15173
|
-
const
|
|
15174
|
-
const
|
|
15175
|
-
const
|
|
14144
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
14145
|
+
const containRe = /paint|layout|strict|content/;
|
|
14146
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
14147
|
+
let isWebKitValue;
|
|
15176
14148
|
function isContainingBlock(elementOrCss) {
|
|
15177
|
-
const webkit = isWebKit();
|
|
15178
14149
|
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
15179
14150
|
|
|
15180
14151
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
15181
14152
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
15182
|
-
return
|
|
14153
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
15183
14154
|
}
|
|
15184
14155
|
function getContainingBlock(element) {
|
|
15185
14156
|
let currentNode = getParentNode(element);
|
|
@@ -15194,12 +14165,13 @@ function getContainingBlock(element) {
|
|
|
15194
14165
|
return null;
|
|
15195
14166
|
}
|
|
15196
14167
|
function isWebKit() {
|
|
15197
|
-
if (
|
|
15198
|
-
|
|
14168
|
+
if (isWebKitValue == null) {
|
|
14169
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
14170
|
+
}
|
|
14171
|
+
return isWebKitValue;
|
|
15199
14172
|
}
|
|
15200
|
-
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
15201
14173
|
function isLastTraversableNode(node) {
|
|
15202
|
-
return
|
|
14174
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
15203
14175
|
}
|
|
15204
14176
|
function getComputedStyle(element) {
|
|
15205
14177
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -15255,8 +14227,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
15255
14227
|
if (isBody) {
|
|
15256
14228
|
const frameElement = getFrameElement(win);
|
|
15257
14229
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
14230
|
+
} else {
|
|
14231
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
15258
14232
|
}
|
|
15259
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
15260
14233
|
}
|
|
15261
14234
|
function getFrameElement(win) {
|
|
15262
14235
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
@@ -15267,9 +14240,9 @@ function getFrameElement(win) {
|
|
|
15267
14240
|
|
|
15268
14241
|
/***/ },
|
|
15269
14242
|
|
|
15270
|
-
/***/ "./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
14243
|
+
/***/ "./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"
|
|
15271
14244
|
/*!*****************************************************************************************************************!*\
|
|
15272
|
-
!*** ./node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
14245
|
+
!*** ./node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs ***!
|
|
15273
14246
|
\*****************************************************************************************************************/
|
|
15274
14247
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
15275
14248
|
|
|
@@ -15323,10 +14296,6 @@ const oppositeSideMap = {
|
|
|
15323
14296
|
bottom: 'top',
|
|
15324
14297
|
top: 'bottom'
|
|
15325
14298
|
};
|
|
15326
|
-
const oppositeAlignmentMap = {
|
|
15327
|
-
start: 'end',
|
|
15328
|
-
end: 'start'
|
|
15329
|
-
};
|
|
15330
14299
|
function clamp(start, value, end) {
|
|
15331
14300
|
return max(start, min(value, end));
|
|
15332
14301
|
}
|
|
@@ -15345,9 +14314,9 @@ function getOppositeAxis(axis) {
|
|
|
15345
14314
|
function getAxisLength(axis) {
|
|
15346
14315
|
return axis === 'y' ? 'height' : 'width';
|
|
15347
14316
|
}
|
|
15348
|
-
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
15349
14317
|
function getSideAxis(placement) {
|
|
15350
|
-
|
|
14318
|
+
const firstChar = placement[0];
|
|
14319
|
+
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
15351
14320
|
}
|
|
15352
14321
|
function getAlignmentAxis(placement) {
|
|
15353
14322
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -15370,7 +14339,7 @@ function getExpandedPlacements(placement) {
|
|
|
15370
14339
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
15371
14340
|
}
|
|
15372
14341
|
function getOppositeAlignmentPlacement(placement) {
|
|
15373
|
-
return placement.replace(
|
|
14342
|
+
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
15374
14343
|
}
|
|
15375
14344
|
const lrPlacement = ['left', 'right'];
|
|
15376
14345
|
const rlPlacement = ['right', 'left'];
|
|
@@ -15401,7 +14370,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
15401
14370
|
return list;
|
|
15402
14371
|
}
|
|
15403
14372
|
function getOppositePlacement(placement) {
|
|
15404
|
-
|
|
14373
|
+
const side = getSide(placement);
|
|
14374
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
15405
14375
|
}
|
|
15406
14376
|
function expandPaddingObject(padding) {
|
|
15407
14377
|
return {
|
|
@@ -15444,56 +14414,87 @@ function rectToClientRect(rect) {
|
|
|
15444
14414
|
|
|
15445
14415
|
/***/ },
|
|
15446
14416
|
|
|
15447
|
-
/***/ "./node_modules/.pnpm/@react-hive+honey-
|
|
14417
|
+
/***/ "./node_modules/.pnpm/@react-hive+honey-hooks@1.0.0_react@19.2.4/node_modules/@react-hive/honey-hooks/dist/index.mjs"
|
|
14418
|
+
/*!***************************************************************************************************************************!*\
|
|
14419
|
+
!*** ./node_modules/.pnpm/@react-hive+honey-hooks@1.0.0_react@19.2.4/node_modules/@react-hive/honey-hooks/dist/index.mjs ***!
|
|
14420
|
+
\***************************************************************************************************************************/
|
|
14421
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
14422
|
+
|
|
14423
|
+
"use strict";
|
|
14424
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14425
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14426
|
+
/* harmony export */ resolveAxisTranslate: () => (/* binding */ h),
|
|
14427
|
+
/* harmony export */ useHoneyDecay: () => (/* binding */ d),
|
|
14428
|
+
/* harmony export */ useHoneyDocumentKeyUp: () => (/* binding */ v),
|
|
14429
|
+
/* harmony export */ useHoneyDrag: () => (/* binding */ f),
|
|
14430
|
+
/* harmony export */ useHoneyLatest: () => (/* binding */ c),
|
|
14431
|
+
/* harmony export */ useHoneyOnChange: () => (/* binding */ m),
|
|
14432
|
+
/* harmony export */ useHoneyRafLoop: () => (/* binding */ l),
|
|
14433
|
+
/* harmony export */ useHoneyResize: () => (/* binding */ w),
|
|
14434
|
+
/* harmony export */ useHoneySyntheticScroll: () => (/* binding */ g),
|
|
14435
|
+
/* harmony export */ useHoneySyntheticScrollX: () => (/* binding */ b),
|
|
14436
|
+
/* harmony export */ useHoneySyntheticScrollY: () => (/* binding */ E),
|
|
14437
|
+
/* harmony export */ useHoneyTimer: () => (/* binding */ M)
|
|
14438
|
+
/* harmony export */ });
|
|
14439
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
14440
|
+
var a={551(t,e,n){var r="Expected a function",a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=s||l||Function("return this")(),v=Object.prototype.toString,f=Math.max,m=Math.min,p=function(){return d.Date.now()};function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function w(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==v.call(t)}(t))return NaN;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=i.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}t.exports=function(t,e,n){var a=!0,o=!0;if("function"!=typeof t)throw new TypeError(r);return y(n)&&(a="leading"in n?!!n.leading:a,o="trailing"in n?!!n.trailing:o),function(t,e,n){var a,o,i,c,u,s,l=0,d=!1,v=!1,h=!0;if("function"!=typeof t)throw new TypeError(r);function x(e){var n=a,r=o;return a=o=void 0,l=e,c=t.apply(r,n)}function g(t){var n=t-s;return void 0===s||n>=e||n<0||v&&t-l>=i}function b(){var t=p();if(g(t))return E(t);u=setTimeout(b,function(t){var n=e-(t-s);return v?m(n,i-(t-l)):n}(t))}function E(t){return u=void 0,h&&a?x(t):(a=o=void 0,c)}function M(){var t=p(),n=g(t);if(a=arguments,o=this,s=t,n){if(void 0===u)return function(t){return l=t,u=setTimeout(b,e),d?x(t):c}(s);if(v)return u=setTimeout(b,e),x(s)}return void 0===u&&(u=setTimeout(b,e)),c}return e=w(e)||0,y(n)&&(d=!!n.leading,i=(v="maxWait"in n)?f(w(n.maxWait)||0,e):i,h="trailing"in n?!!n.trailing:h),M.cancel=function(){void 0!==u&&clearTimeout(u),l=0,a=s=o=u=void 0},M.flush=function(){return void 0===u?c:E(p())},M}(t,e,{leading:a,maxWait:e,trailing:o})}}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return a[t](n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);const c=t=>{const e=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(t);return e.current=t,e},u=t=>Math.max(0,t.scrollHeight-t.clientHeight),s=({delta:t,value:e,min:n,max:r})=>{if(0===t)return null;const a=e+t;return t<0?e<=n?null:Math.max(a,n):t>0?e>=r?null:Math.min(a,r):null},l=(a,{autoStart:o=!1,resumeOnVisibility:i=!1,maxDeltaMs:u=32,onError:s}={})=>{const l=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),v=c(a),[f,m]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),p=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{p.current&&(p.current=!1,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),d.current=null,m(!1))},[]),w=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(t=>{if(!p.current)return;null===d.current&&(d.current=t);let e=t-d.current;d.current=t,e>u&&(e=u);try{v.current(e,{stop:y}),p.current&&(l.current=requestAnimationFrame(w))}catch(t){y(),s?.(t)}},[u,y,s]),h=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{p.current||(d.current=null,p.current=!0,m(!0),l.current=requestAnimationFrame(w))},[w]);return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>(o&&h(),y),[o]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{const t=()=>{document.hidden?y():i&&o&&h()};return document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[o,i,h,y]),{isRunning:f,start:h,stop:y}},d=({initialValue:e,min:a,max:o,friction:i=.002,minVelocityPxMs:u=.01,emaAlpha:d=.2,onStop:v})=>{const[f,m]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(e),p=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(e),y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0),w=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!1),h=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(a),x=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(o),g=c(v),b=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((t,e)=>{if(0===t)return;const n=(({value:t,min:e,max:n,velocityPxMs:r,deltaTimeMs:a,friction:o=.002,minVelocityPxMs:i=.01,emaAlpha:c=.2})=>{if(Math.abs(r)<i)return null;const u=s({delta:r*a,value:t,min:e,max:n});if(null===u)return null;const l=r*Math.exp(-o*a),d=c>0?r*(1-c)+l*c:l;return Math.abs(d)<i?null:{value:u,velocityPxMs:d}})({value:p.current,velocityPxMs:y.current,min:h.current,max:x.current,deltaTimeMs:t,friction:i,minVelocityPxMs:u,emaAlpha:d});if(null===n)return y.current=0,w.current&&(w.current=!1,g.current?.()),void e.stop();w.current=!0,p.current=n.value,y.current=n.velocityPxMs,m(n.value)},[i,u,d]),E=l(b),M=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((t,e)=>{h.current=t,x.current=e;const n=p.current;if(n<t||n>e){const r=Math.min(Math.max(n,t),e);p.current=r,y.current=0,m(r),w.current&&(w.current=!1,g.current?.()),E.stop()}},[E.stop]),X=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(t=>{y.current=t,w.current=!0,E.start()},[E.start]),Y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((t,e)=>{p.current=t,y.current=e,w.current=!0,m(t),E.start()},[E.start]),P=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{w.current&&(w.current=!1,g.current?.()),y.current=0,E.stop()},[E.stop]);return{value:f,isRunning:E.isRunning,setBounds:M,start:X,startFrom:Y,stop:P}},v=(t,n,{enabled:r=!0,preventDefault:a=!0}={})=>{(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(!r)return;const e=e=>{const r=e.code;n.includes(r)&&(a&&e.preventDefault(),t(r,e))};return document.addEventListener("keyup",e),()=>{document.removeEventListener("keyup",e)}},[t,r,a])},f=(t,{skipOnEndDragWhenStopped:n=!1,enabled:r=!0,onMoveDrag:a,onStartDrag:o,onEndDrag:i})=>{(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{const e=t.current;if(!r||!e)return;const c=a(e);let u=!1,s=0,l=0,d=0,v=0,f=0,m=0,p=0;const y=async(t,n,r)=>{o&&!await o(e,r)||(f=performance.now(),u=!0,s=t,l=n,d=t,v=n,m=0,p=0)},w=async(t,n)=>{await(async(t,n)=>{if(u&&(u=!1,t&&i)){const t={deltaX:d-s,deltaY:v-l,velocityXPxMs:m,velocityYPxMs:p};await i(t,e,n)}})(t,n),window.removeEventListener("mousemove",g,{capture:!0}),window.removeEventListener("mouseup",h,{capture:!0}),window.removeEventListener("touchmove",b,{capture:!0}),window.removeEventListener("touchend",E,{capture:!0}),window.removeEventListener("touchcancel",M,{capture:!0})},h=async t=>{await w(!0,t)},x=async(t,e,r)=>{if(!u)return;const a=performance.now(),o=a-f,i=t-d,y=e-v;o>0&&(m=i/o,p=y/o);const h=t-s,x=e-l,g=await c({deltaX:i,deltaY:y,distanceX:h,distanceY:x});d=t,v=e,f=a,g||await w(!n,r)},g=async t=>{await x(t.clientX,t.clientY,t)},b=async t=>{const e=t.touches[0];await x(e.clientX,e.clientY,t)},E=async t=>{await w(!0,t)},M=async t=>{await w(!0,t)},X=async t=>{t.stopPropagation();const e=t.touches[0];await y(e.clientX,e.clientY,t),window.addEventListener("touchmove",b,{passive:!0,capture:!0}),window.addEventListener("touchend",E,{capture:!0}),window.addEventListener("touchcancel",M,{capture:!0})},Y=async t=>{t.stopPropagation(),await y(t.clientX,t.clientY,t),window.addEventListener("mousemove",g,{capture:!0}),window.addEventListener("mouseup",h,{capture:!0})};return e.addEventListener("mousedown",Y),e.addEventListener("touchstart",X,{passive:!0}),()=>{e.removeEventListener("mousedown",Y),e.removeEventListener("touchstart",X)}},[r,o,a,i])},m=(t,r)=>{const a=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(t);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(a.current!==t)return a.current=t,r(t)},[t])};var p=i(551),y=i.n(p);const w=(t,{invokeOnMount:n=!1,throttleTime:r=0,enabled:a=!0}={})=>{(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{if(!a)return;const e=r?y()(t,r):t;return window.addEventListener("resize",e),n&&t(),()=>{"cancel"in e&&"function"==typeof e.cancel&&e.cancel(),window.removeEventListener("resize",e)}},[a,n,t])},h=({delta:t,translate:e,containerSize:n,overflowSize:r,overscrollPct:a})=>{if(r<=0)return null;const o=n*(a/100);return s({delta:t,value:e,min:-(r+o),max:o})},x=({axis:t,container:e,deltaX:n,deltaY:r,overscrollPct:a})=>{const{translateX:o,translateY:i}=(t=>{const e=window.getComputedStyle(t).getPropertyValue("transform").match(/^matrix\((.+)\)$/);if(!e)return{translateX:0,translateY:0,scaleX:1,scaleY:1,skewX:0,skewY:0};const[n,r,a,o,i,c]=e[1].split(", ").map(parseFloat);return{translateX:i,translateY:c,scaleX:n,scaleY:o,skewX:a,skewY:r}})(e);let c=o,s=i,l=!1;if("x"===t||"both"===t){const t=h({delta:n,translate:o,containerSize:e.clientWidth,overflowSize:(d=e,Math.max(0,d.scrollWidth-d.clientWidth)),overscrollPct:a});null!==t&&(c=t,l=!0)}var d;if("y"===t||"both"===t){const t=h({delta:r,translate:i,containerSize:e.clientHeight,overflowSize:u(e),overscrollPct:a});null!==t&&(s=t,l=!0)}return l&&(e.style.transform=`translate(${c}px, ${s}px)`),l},g=({axis:r="both",overscrollPct:a=0,onStartDrag:o,onEndDrag:i,scrollMode:c="default",resetOnResize:u=!0,enablePointerScroll:s=!0,enabled:l=!0}={})=>{const d=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),v=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async(...t)=>o?.(...t)??!0,[o]),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(t=>async({deltaX:e,deltaY:n})=>x({container:t,deltaX:e,deltaY:n,axis:r,overscrollPct:a}),[r,a]),p=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async(...t)=>{i?.(...t)},[r,a,i]);f(d,{enabled:l,onStartDrag:v,onMoveDrag:m,onEndDrag:p});const y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{const t=d.current;t&&t.style.removeProperty("transform")},[]);return w(y,{enabled:l&&u}),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{const t=d.current;if(!l||!t)return;if("default"===c){const e="x"===r?"pan-y":"y"===r?"pan-x":"none";t.style.overscrollBehavior="contain",t.style.touchAction=e}const e=e=>{const{deltaX:n,deltaY:o}=((t,e,{allowFallback:n=!0,invert:r=!0}={})=>{const a=r?-1:1;switch(e){case"x":return{deltaX:a*(0!==t.deltaX?t.deltaX:n?t.deltaY:0),deltaY:0};case"y":return{deltaX:0,deltaY:a*t.deltaY};default:return{deltaX:a*t.deltaX,deltaY:a*t.deltaY}}})({deltaX:e.deltaX,deltaY:e.deltaY},r);x({container:t,deltaX:n,deltaY:o,axis:r,overscrollPct:a})&&e.preventDefault()};return s&&t.addEventListener("wheel",e,{passive:!1}),()=>{"default"===c&&(t.style.removeProperty("overscroll-behavior"),t.style.removeProperty("touch-action")),s&&t.removeEventListener("wheel",e)}},[c,l,s]),d},b=t=>g({...t,axis:"x"}),E=t=>g({...t,axis:"y"}),M=({initialTimeMs:n,targetTimeMs:a=0,mode:o="countdown",autoStart:i=!1,onEnd:u})=>{const[s,d]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(n),v=c(s),f=c(u),m=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((t,e)=>{let n="countdown"===o?v.current-t:v.current+t,r=!1;"countdown"===o?n<=a&&(n=a,r=!0):a>0&&n>=a&&(n=a,r=!0),v.current=n,d(n),r&&(e.stop(),f.current?.())},[o,a]),p=l(m),y=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{v.current=n,d(n),p.start()},[n,p.start]),w=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{p.stop()},[p.stop]),h=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(()=>{p.isRunning||p.start()},[p.isRunning,p.start]),x=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((t=n)=>{p.stop(),v.current=t,d(t)},[n,p.stop]);return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{i&&y()},[i]),{timeMs:s,isRunning:p.isRunning,start:y,pause:w,resume:h,reset:x}};
|
|
14441
|
+
//# sourceMappingURL=index.mjs.map
|
|
14442
|
+
|
|
14443
|
+
/***/ },
|
|
14444
|
+
|
|
14445
|
+
/***/ "./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs"
|
|
15448
14446
|
/*!***************************************************************************************************************!*\
|
|
15449
|
-
!*** ./node_modules/.pnpm/@react-hive+honey-utils@3.
|
|
14447
|
+
!*** ./node_modules/.pnpm/@react-hive+honey-utils@3.26.0/node_modules/@react-hive/honey-utils/dist/index.mjs ***!
|
|
15450
14448
|
\***************************************************************************************************************/
|
|
15451
14449
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
15452
14450
|
|
|
15453
14451
|
"use strict";
|
|
15454
14452
|
__webpack_require__.r(__webpack_exports__);
|
|
15455
14453
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14454
|
+
/* harmony export */ DATA_TRANSFER_JSON_MIME: () => (/* binding */ Q),
|
|
15456
14455
|
/* harmony export */ FOCUSABLE_HTML_TAGS: () => (/* binding */ a),
|
|
15457
|
-
/* harmony export */ applyInertiaStep: () => (/* binding */
|
|
14456
|
+
/* harmony export */ applyInertiaStep: () => (/* binding */ xe),
|
|
15458
14457
|
/* harmony export */ assert: () => (/* binding */ s),
|
|
15459
|
-
/* harmony export */ blobToFile: () => (/* binding */
|
|
15460
|
-
/* harmony export */ calculateCenterOffset: () => (/* binding */
|
|
15461
|
-
/* harmony export */ calculateEuclideanDistance: () => (/* binding */
|
|
15462
|
-
/* harmony export */ calculateMovingSpeed: () => (/* binding */
|
|
15463
|
-
/* harmony export */ calculatePercentage: () => (/* binding */
|
|
15464
|
-
/* harmony export */ camelToDashCase: () => (/* binding */
|
|
15465
|
-
/* harmony export */ camelToWords: () => (/* binding */
|
|
15466
|
-
/* harmony export */ centerElementInContainer: () => (/* binding */
|
|
14458
|
+
/* harmony export */ blobToFile: () => (/* binding */ pe),
|
|
14459
|
+
/* harmony export */ calculateCenterOffset: () => (/* binding */ se),
|
|
14460
|
+
/* harmony export */ calculateEuclideanDistance: () => (/* binding */ ve),
|
|
14461
|
+
/* harmony export */ calculateMovingSpeed: () => (/* binding */ Ce),
|
|
14462
|
+
/* harmony export */ calculatePercentage: () => (/* binding */ Ie),
|
|
14463
|
+
/* harmony export */ camelToDashCase: () => (/* binding */ Le),
|
|
14464
|
+
/* harmony export */ camelToWords: () => (/* binding */ Pe),
|
|
14465
|
+
/* harmony export */ centerElementInContainer: () => (/* binding */ ce),
|
|
15467
14466
|
/* harmony export */ chunk: () => (/* binding */ T),
|
|
15468
14467
|
/* harmony export */ cloneBlob: () => (/* binding */ e),
|
|
15469
|
-
/* harmony export */ compact: () => (/* binding */
|
|
15470
|
-
/* harmony export */ compose: () => (/* binding */
|
|
15471
|
-
/* harmony export */ definedProps: () => (/* binding */
|
|
15472
|
-
/* harmony export */ delay: () => (/* binding */
|
|
15473
|
-
/* harmony export */ difference: () => (/* binding */
|
|
15474
|
-
/* harmony export */ downloadFile: () => (/* binding */
|
|
14468
|
+
/* harmony export */ compact: () => (/* binding */ L),
|
|
14469
|
+
/* harmony export */ compose: () => (/* binding */ z),
|
|
14470
|
+
/* harmony export */ definedProps: () => (/* binding */ Ee),
|
|
14471
|
+
/* harmony export */ delay: () => (/* binding */ J),
|
|
14472
|
+
/* harmony export */ difference: () => (/* binding */ $),
|
|
14473
|
+
/* harmony export */ downloadFile: () => (/* binding */ re),
|
|
15475
14474
|
/* harmony export */ everyAsync: () => (/* binding */ V),
|
|
15476
|
-
/* harmony export */ fileListToFiles: () => (/* binding */
|
|
15477
|
-
/* harmony export */ filterParallel: () => (/* binding */
|
|
15478
|
-
/* harmony export */ filterSequential: () => (/* binding */
|
|
14475
|
+
/* harmony export */ fileListToFiles: () => (/* binding */ me),
|
|
14476
|
+
/* harmony export */ filterParallel: () => (/* binding */ H),
|
|
14477
|
+
/* harmony export */ filterSequential: () => (/* binding */ D),
|
|
15479
14478
|
/* harmony export */ findAsync: () => (/* binding */ G),
|
|
15480
|
-
/* harmony export */ findCharIndices: () => (/* binding */
|
|
15481
|
-
/* harmony export */ flattenTree: () => (/* binding */
|
|
15482
|
-
/* harmony export */ forEachChar: () => (/* binding */
|
|
15483
|
-
/* harmony export */ generateEphemeralId: () => (/* binding */
|
|
15484
|
-
/* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */
|
|
14479
|
+
/* harmony export */ findCharIndices: () => (/* binding */ _e),
|
|
14480
|
+
/* harmony export */ flattenTree: () => (/* binding */ Fe),
|
|
14481
|
+
/* harmony export */ forEachChar: () => (/* binding */ ze),
|
|
14482
|
+
/* harmony export */ generateEphemeralId: () => (/* binding */ Se),
|
|
14483
|
+
/* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */ Ae),
|
|
14484
|
+
/* harmony export */ getDataTransferJson: () => (/* binding */ te),
|
|
15485
14485
|
/* harmony export */ getElementOffsetRect: () => (/* binding */ t),
|
|
15486
14486
|
/* harmony export */ getFocusableHtmlElements: () => (/* binding */ i),
|
|
15487
|
-
/* harmony export */ getLocalStorageCapabilities: () => (/* binding */
|
|
14487
|
+
/* harmony export */ getLocalStorageCapabilities: () => (/* binding */ fe),
|
|
15488
14488
|
/* harmony export */ getTreeChildren: () => (/* binding */ Re),
|
|
15489
|
-
/* harmony export */ getWordsInitials: () => (/* binding */
|
|
15490
|
-
/* harmony export */ getXOverflowWidth: () => (/* binding */
|
|
15491
|
-
/* harmony export */ getYOverflowHeight: () => (/* binding */
|
|
15492
|
-
/* harmony export */ hasXOverflow: () => (/* binding */
|
|
15493
|
-
/* harmony export */ hasYOverflow: () => (/* binding */
|
|
15494
|
-
/* harmony export */ hashString: () => (/* binding */
|
|
14489
|
+
/* harmony export */ getWordsInitials: () => (/* binding */ Ne),
|
|
14490
|
+
/* harmony export */ getXOverflowWidth: () => (/* binding */ le),
|
|
14491
|
+
/* harmony export */ getYOverflowHeight: () => (/* binding */ oe),
|
|
14492
|
+
/* harmony export */ hasXOverflow: () => (/* binding */ ae),
|
|
14493
|
+
/* harmony export */ hasYOverflow: () => (/* binding */ ie),
|
|
14494
|
+
/* harmony export */ hashString: () => (/* binding */ ke),
|
|
14495
|
+
/* harmony export */ hexWithAlpha: () => (/* binding */ Ue),
|
|
15495
14496
|
/* harmony export */ intersection: () => (/* binding */ X),
|
|
15496
|
-
/* harmony export */ invokeIfFunction: () => (/* binding */
|
|
14497
|
+
/* harmony export */ invokeIfFunction: () => (/* binding */ we),
|
|
15497
14498
|
/* harmony export */ isAnchorHtmlElement: () => (/* binding */ n),
|
|
15498
14499
|
/* harmony export */ isArray: () => (/* binding */ E),
|
|
15499
14500
|
/* harmony export */ isBlob: () => (/* binding */ w),
|
|
@@ -15502,52 +14503,53 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15502
14503
|
/* harmony export */ isDate: () => (/* binding */ y),
|
|
15503
14504
|
/* harmony export */ isDecimal: () => (/* binding */ k),
|
|
15504
14505
|
/* harmony export */ isDefined: () => (/* binding */ h),
|
|
15505
|
-
/* harmony export */ isEmptyArray: () => (/* binding */
|
|
14506
|
+
/* harmony export */ isEmptyArray: () => (/* binding */ O),
|
|
15506
14507
|
/* harmony export */ isEmptyObject: () => (/* binding */ g),
|
|
15507
14508
|
/* harmony export */ isError: () => (/* binding */ b),
|
|
15508
|
-
/* harmony export */ isFile: () => (/* binding */
|
|
14509
|
+
/* harmony export */ isFile: () => (/* binding */ de),
|
|
15509
14510
|
/* harmony export */ isFiniteNumber: () => (/* binding */ C),
|
|
15510
|
-
/* harmony export */ isFunction: () => (/* binding */
|
|
14511
|
+
/* harmony export */ isFunction: () => (/* binding */ Y),
|
|
15511
14512
|
/* harmony export */ isHtmlElementFocusable: () => (/* binding */ l),
|
|
15512
14513
|
/* harmony export */ isInteger: () => (/* binding */ I),
|
|
15513
|
-
/* harmony export */ isLocalStorageReadable: () => (/* binding */
|
|
15514
|
-
/* harmony export */ isMap: () => (/* binding */
|
|
14514
|
+
/* harmony export */ isLocalStorageReadable: () => (/* binding */ he),
|
|
14515
|
+
/* harmony export */ isMap: () => (/* binding */ A),
|
|
15515
14516
|
/* harmony export */ isNil: () => (/* binding */ u),
|
|
15516
|
-
/* harmony export */ isNilOrEmptyString: () => (/* binding */
|
|
14517
|
+
/* harmony export */ isNilOrEmptyString: () => (/* binding */ Xe),
|
|
15517
14518
|
/* harmony export */ isNull: () => (/* binding */ c),
|
|
15518
14519
|
/* harmony export */ isNumber: () => (/* binding */ d),
|
|
15519
14520
|
/* harmony export */ isObject: () => (/* binding */ p),
|
|
15520
|
-
/* harmony export */ isPromise: () => (/* binding */
|
|
15521
|
-
/* harmony export */ isRegExp: () => (/* binding */
|
|
15522
|
-
/* harmony export */ isSet: () => (/* binding */
|
|
15523
|
-
/* harmony export */ isString: () => (/* binding */
|
|
14521
|
+
/* harmony export */ isPromise: () => (/* binding */ j),
|
|
14522
|
+
/* harmony export */ isRegExp: () => (/* binding */ S),
|
|
14523
|
+
/* harmony export */ isSet: () => (/* binding */ M),
|
|
14524
|
+
/* harmony export */ isString: () => (/* binding */ ne),
|
|
15524
14525
|
/* harmony export */ isSymbol: () => (/* binding */ v),
|
|
15525
14526
|
/* harmony export */ isUndefined: () => (/* binding */ f),
|
|
15526
14527
|
/* harmony export */ isValidDate: () => (/* binding */ x),
|
|
15527
14528
|
/* harmony export */ moveFocusWithinContainer: () => (/* binding */ o),
|
|
15528
|
-
/* harmony export */ noop: () => (/* binding */
|
|
15529
|
-
/* harmony export */ not: () => (/* binding */
|
|
15530
|
-
/* harmony export */ once: () => (/* binding */
|
|
15531
|
-
/* harmony export */ parse2DMatrix: () => (/* binding */
|
|
15532
|
-
/* harmony export */ parseFileName: () => (/* binding */
|
|
15533
|
-
/* harmony export */ pipe: () => (/* binding */
|
|
15534
|
-
/* harmony export */ readFilesFromDataTransfer: () => (/* binding */
|
|
14529
|
+
/* harmony export */ noop: () => (/* binding */ N),
|
|
14530
|
+
/* harmony export */ not: () => (/* binding */ F),
|
|
14531
|
+
/* harmony export */ once: () => (/* binding */ R),
|
|
14532
|
+
/* harmony export */ parse2DMatrix: () => (/* binding */ ue),
|
|
14533
|
+
/* harmony export */ parseFileName: () => (/* binding */ $e),
|
|
14534
|
+
/* harmony export */ pipe: () => (/* binding */ _),
|
|
14535
|
+
/* harmony export */ readFilesFromDataTransfer: () => (/* binding */ ye),
|
|
15535
14536
|
/* harmony export */ reduceAsync: () => (/* binding */ Z),
|
|
15536
|
-
/* harmony export */ resolveAxisDelta: () => (/* binding */
|
|
15537
|
-
/* harmony export */ resolveBoundedDelta: () => (/* binding */
|
|
14537
|
+
/* harmony export */ resolveAxisDelta: () => (/* binding */ Me),
|
|
14538
|
+
/* harmony export */ resolveBoundedDelta: () => (/* binding */ be),
|
|
15538
14539
|
/* harmony export */ retry: () => (/* binding */ K),
|
|
15539
14540
|
/* harmony export */ runParallel: () => (/* binding */ W),
|
|
15540
14541
|
/* harmony export */ runSequential: () => (/* binding */ U),
|
|
15541
|
-
/* harmony export */ searchTree: () => (/* binding */
|
|
15542
|
-
/* harmony export */
|
|
15543
|
-
/* harmony export */
|
|
15544
|
-
/* harmony export */
|
|
15545
|
-
/* harmony export */
|
|
15546
|
-
/* harmony export */
|
|
15547
|
-
/* harmony export */
|
|
15548
|
-
/* harmony export */
|
|
14542
|
+
/* harmony export */ searchTree: () => (/* binding */ je),
|
|
14543
|
+
/* harmony export */ setDataTransferJson: () => (/* binding */ ee),
|
|
14544
|
+
/* harmony export */ someAsync: () => (/* binding */ B),
|
|
14545
|
+
/* harmony export */ splitMapJoin: () => (/* binding */ Ye),
|
|
14546
|
+
/* harmony export */ splitStringIntoWords: () => (/* binding */ Te),
|
|
14547
|
+
/* harmony export */ timeout: () => (/* binding */ q),
|
|
14548
|
+
/* harmony export */ toKebabCase: () => (/* binding */ Oe),
|
|
14549
|
+
/* harmony export */ traverseFileSystemDirectory: () => (/* binding */ ge),
|
|
14550
|
+
/* harmony export */ unique: () => (/* binding */ P)
|
|
15549
14551
|
/* harmony export */ });
|
|
15550
|
-
const e=e=>new Blob([e],{type:e.type}),t=e=>new DOMRect(e.offsetLeft,e.offsetTop,e.clientWidth,e.clientHeight),n=e=>"A"===e.tagName,r=e=>"true"===e.getAttribute("contenteditable"),a=["INPUT","SELECT","TEXTAREA","BUTTON","A"],l=e=>{if(!e)return!1;const t=window.getComputedStyle(e);if("hidden"===t.visibility||"none"===t.display)return!1;if("disabled"in e&&e.disabled)return!1;const l=e.getAttribute("tabindex");return"-1"!==l&&(a.includes(e.tagName)?!n(e)||""!==e.href:!!r(e)||null!==l)},i=e=>Array.from(e.querySelectorAll("*")).filter(l),o=(e,t=null,{wrap:n=!0,getNextIndex:r}={})=>{const a=document.activeElement,l=t??a?.parentElement;if(!a||!l)return;const o=i(l);if(0===o.length)return;const s=o.indexOf(a);if(-1===s)return;let c;r?c=r(s,e,o):"next"===e?(c=s+1,c>=o.length&&(c=n?0:null)):(c=s-1,c<0&&(c=n?o.length-1:null)),null!==c&&o[c]?.focus()};function s(e,t){if(!e)throw new Error(t)}const c=e=>null===e,u=e=>null==e,h=e=>null!=e,f=e=>void 0===e,d=e=>"number"==typeof e,m=e=>"boolean"==typeof e,p=e=>"object"==typeof e,g=e=>p(e)&&!c(e)&&0===Object.keys(e).length,y=e=>e instanceof Date,w=e=>e instanceof Blob,b=e=>e instanceof Error,x=e=>y(e)&&!isNaN(e.getTime()),
|
|
14552
|
+
const e=e=>new Blob([e],{type:e.type}),t=e=>new DOMRect(e.offsetLeft,e.offsetTop,e.clientWidth,e.clientHeight),n=e=>"A"===e.tagName,r=e=>"true"===e.getAttribute("contenteditable"),a=["INPUT","SELECT","TEXTAREA","BUTTON","A"],l=e=>{if(!e)return!1;const t=window.getComputedStyle(e);if("hidden"===t.visibility||"none"===t.display)return!1;if("disabled"in e&&e.disabled)return!1;const l=e.getAttribute("tabindex");return"-1"!==l&&(a.includes(e.tagName)?!n(e)||""!==e.href:!!r(e)||null!==l)},i=e=>Array.from(e.querySelectorAll("*")).filter(l),o=(e,t=null,{wrap:n=!0,getNextIndex:r}={})=>{const a=document.activeElement,l=t??a?.parentElement;if(!a||!l)return;const o=i(l);if(0===o.length)return;const s=o.indexOf(a);if(-1===s)return;let c;r?c=r(s,e,o):"next"===e?(c=s+1,c>=o.length&&(c=n?0:null)):(c=s-1,c<0&&(c=n?o.length-1:null)),null!==c&&o[c]?.focus()};function s(e,t){if(!e)throw new Error(t)}const c=e=>null===e,u=e=>null==e,h=e=>null!=e,f=e=>void 0===e,d=e=>"number"==typeof e,m=e=>"boolean"==typeof e,p=e=>"object"==typeof e,g=e=>p(e)&&!c(e)&&0===Object.keys(e).length,y=e=>e instanceof Date,w=e=>e instanceof Blob,b=e=>e instanceof Error,x=e=>y(e)&&!isNaN(e.getTime()),S=e=>e instanceof RegExp,A=e=>e instanceof Map,M=e=>e instanceof Set,v=e=>"symbol"==typeof e,C=e=>d(e)&&isFinite(e),I=e=>d(e)&&Number.isInteger(e),k=e=>C(e)&&!Number.isInteger(e),E=e=>Array.isArray(e),O=e=>E(e)&&0===e.length,L=e=>e.filter(Boolean),P=e=>[...new Set(e)],T=(e,t)=>(s(t>0,"Chunk size must be greater than 0"),Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,(r+1)*t))),X=(...e)=>{if(0===e.length)return[];if(1===e.length)return[...e[0]];const[t,...n]=e;return P(t).filter(e=>n.every(t=>t.includes(e)))},$=(e,t)=>e.filter(e=>!t.includes(e)),_=(...e)=>t=>e.reduce((e,t)=>t(e),t),z=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),N=()=>{},Y=e=>"function"==typeof e,F=e=>(...t)=>!e(...t),R=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}},j=e=>Y(e?.then),U=async(e,t)=>{const n=[];for(let r=0;r<e.length;r++)n.push(await t(e[r],r,e));return n},W=async(e,t)=>Promise.all(e.map(t)),D=async(e,t)=>{const n=[];for(let r=0;r<e.length;r++){const a=e[r];await t(a,r,e)&&n.push(a)}return n},H=async(e,t)=>{const n=await W(e,async(e,n,r)=>!!await t(e,n,r)&&e);return L(n)},B=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return!0;return!1},V=async(e,t)=>{for(let n=0;n<e.length;n++)if(!await t(e[n],n,e))return!1;return!0},Z=async(e,t,n)=>{let r=n;for(let n=0;n<e.length;n++)r=await t(r,e[n],n,e);return r},G=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return e[n];return null},J=e=>new Promise(t=>setTimeout(t,e)),q=async(e,t,n="Operation timed out")=>{try{return await Promise.race([e,J(t).then(()=>Promise.reject(new Error(n)))])}finally{}},K=(e,{maxAttempts:t=3,delayMs:n=300,backoff:r=!0,onRetry:a}={})=>async(...l)=>{let i;for(let o=1;o<=t;o++)try{return await e(...l)}catch(e){if(i=e,o<t){a?.(o,e);const t=r?n*2**(o-1):n;await J(t)}}throw i},Q="application/json",ee=(e,t)=>{e.setData(Q,JSON.stringify(t))},te=e=>{const t=e.getData(Q);if(t)try{return JSON.parse(t)}catch{return}},ne=e=>"string"==typeof e,re=(e,{fileName:t,target:n}={})=>{if(f(document))return;const r=document.createElement("a");let a=null;try{const l=ne(e)?e:a=URL.createObjectURL(e);r.href=l,t&&(r.download=t),n&&(r.target=n),document.body.appendChild(r),r.click()}finally{r.remove(),a&&setTimeout(()=>{s(a,"Object URL should not be null"),URL.revokeObjectURL(a)},0)}},ae=e=>e.scrollWidth>e.clientWidth,le=e=>Math.max(0,e.scrollWidth-e.clientWidth),ie=e=>e.scrollHeight>e.clientHeight,oe=e=>Math.max(0,e.scrollHeight-e.clientHeight),se=({overflowSize:e,containerSize:t,elementOffset:n,elementSize:r})=>{if(e<=0)return 0;const a=n+r/2-t/2;return-Math.max(0,Math.min(a,e))},ce=(e,t,{axis:n="both"}={})=>{let r=0,a=0;"x"!==n&&"both"!==n||(r=se({overflowSize:le(e),containerSize:e.clientWidth,elementOffset:t.offsetLeft,elementSize:t.clientWidth})),"y"!==n&&"both"!==n||(a=se({overflowSize:oe(e),containerSize:e.clientHeight,elementOffset:t.offsetTop,elementSize:t.clientHeight})),e.style.transform=`translate(${r}px, ${a}px)`},ue=e=>{const t=window.getComputedStyle(e).getPropertyValue("transform").match(/^matrix\((.+)\)$/);if(!t)return{translateX:0,translateY:0,scaleX:1,scaleY:1,skewX:0,skewY:0};const[n,r,a,l,i,o]=t[1].split(", ").map(parseFloat);return{translateX:i,translateY:o,scaleX:n,scaleY:l,skewX:a,skewY:r}},he=()=>{if("undefined"==typeof window||!window.localStorage)return!1;try{return window.localStorage.getItem("__non_existing_key__"),!0}catch{return!1}},fe=()=>{if(!he())return{readable:!1,writable:!1};try{const e="__test_write__";return window.localStorage.setItem(e,"1"),window.localStorage.removeItem(e),{readable:!0,writable:!0}}catch{}return{readable:!0,writable:!1}},de=e=>e instanceof File,me=e=>{if(!e)return[];const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t},pe=(e,t)=>new File([e],t,{type:e.type}),ge=async(e,{skipFiles:t=[".DS_Store","Thumbs.db","desktop.ini","ehthumbs.db",".Spotlight-V100",".Trashes",".fseventsd","__MACOSX"]}={})=>{const n=new Set(t),r=await(async e=>{const t=e.createReader(),n=async()=>new Promise((e,r)=>{t.readEntries(async t=>{if(t.length)try{const r=await n();e([...t,...r])}catch(e){r(e)}else e([])},r)});return n()})(e);return(await W(r,async e=>e.isDirectory?ge(e,{skipFiles:t}):n.has(e.name)?[]:[await new Promise((t,n)=>{e.file(t,n)})])).flat()},ye=async(e,t={})=>{const n=e?.items;if(!n)return[];const r=[];for(let e=0;e<n.length;e++){const a=n[e];if("webkitGetAsEntry"in a){const e=a.webkitGetAsEntry?.();if(e?.isDirectory){r.push(ge(e,t));continue}if(e?.isFile){r.push(new Promise((t,n)=>e.file(e=>t([e]),n)));continue}}const l=a.getAsFile();l&&r.push(Promise.resolve([l]))}return(await Promise.all(r)).flat()},we=(e,...t)=>"function"==typeof e?e(...t):e,be=({delta:e,value:t,min:n,max:r})=>{if(0===e)return null;const a=t+e;return e<0?t<=n?null:Math.max(a,n):e>0?t>=r?null:Math.min(a,r):null},xe=({value:e,min:t,max:n,velocityPxMs:r,deltaTimeMs:a,friction:l=.002,minVelocityPxMs:i=.01,emaAlpha:o=.2})=>{if(Math.abs(r)<i)return null;const s=be({delta:r*a,value:e,min:t,max:n});if(null===s)return null;const c=r*Math.exp(-l*a),u=o>0?r*(1-o)+c*o:c;return Math.abs(u)<i?null:{value:s,velocityPxMs:u}},Se=()=>`${Math.floor(1e3*performance.now()).toString(36)}${Math.random().toString(36).slice(2,10)}`,Ae=(e,t)=>Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left))*Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top))/(t.width*t.height),Me=(e,t,{allowFallback:n=!0,invert:r=!0}={})=>{const a=r?-1:1;switch(t){case"x":return{deltaX:a*(0!==e.deltaX?e.deltaX:n?e.deltaY:0),deltaY:0};case"y":return{deltaX:0,deltaY:a*e.deltaY};default:return{deltaX:a*e.deltaX,deltaY:a*e.deltaY}}},ve=(e,t,n,r)=>{const a=n-e,l=r-t;return Math.hypot(a,l)},Ce=(e,t)=>Math.abs(e/t),Ie=(e,t)=>e*t/100,ke=e=>{let t=5381;for(let n=0;n<e.length;n++)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)},Ee=e=>Object.entries(e).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}),Oe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Le=e=>{const t=e.charAt(0),n=e.slice(1);return t.toLowerCase()+n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)},Pe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),Te=e=>0===e.length?[]:e.split(" ").filter(Boolean),Xe=e=>""===e||u(e),$e=e=>{const t=e.lastIndexOf(".");return t<=0||t===e.length-1?[e,""]:[e.slice(0,t),e.slice(t+1).toLowerCase()]},_e=(e,t)=>{if(0===e.length)return[];const n=t.charCodeAt(0),r=[];for(let t=0;t<e.length;t++)e.charCodeAt(t)===n&&r.push(t);return r},ze=(e,t,n)=>{if(0===e.length)return;const r=e.length;for(let a=0;a<r;a++){const l=e[a],i={charIndex:a,prevChar:a>0?e[a-1]:null,nextChar:a<r-1?e[a+1]:null};n?.(l,i)||t(l,i)}},Ne=(e,t=1/0)=>0===e.length?"":Te(e).slice(0,t).map(e=>e[0]).join("").toUpperCase(),Ye=(e,t,n,r=t)=>e.split(t).map((e,t)=>n(e.trim(),t)).join(r),Fe=(e,t,n,r=[],a=void 0,l=0)=>(e?.forEach(e=>{const{[n]:i,...o}=e,s=e[n],c=Array.isArray(s);if(r.push({...o,parentId:a,depthLevel:l,childCount:c?s.length:0}),c){const a=e[t];Fe(s,t,n,r,a,l+1)}}),r),Re=(e,t,n)=>e.filter(e=>e.parentId===t&&(!n||n(e))),je=(e,t,n,r)=>{const a=Te(r.toLowerCase());if(!a.length)return e;const l=e.reduce((e,n,r)=>(e[n[t]]=r,e),{});return e.reduce((r,i)=>{const o=i[n];if(!o)return r;if(r.some(e=>e[t]===i[t]))return r;const u=Te(o.toLowerCase());if(a.every(e=>u.some(t=>t.startsWith(e))))if(f(i.parentId)){r.push(i);const n=a=>{a.childCount&&e.forEach(e=>{e.parentId===a[t]&&(r.push(e),n(e))})};n(i)}else{const t=n=>{const a=l[n.parentId],i=e[a];f(i.parentId)||t(i);const o=r.length?r[r.length-1].parentId:null;(c(o)||o!==n.parentId)&&(s(i,"[@react-hive/honey-utils]: Parent node was not found."),r.push(i))};t(i),r.push(i)}return r},[])},Ue=(e,t)=>{s(t>=0&&t<=1,`[@react-hive/honey-utils]: Alpha "${t}" must be a number between 0 and 1.`);const n=e.match(/^#?([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/);s(n,`[@react-hive/honey-utils]: Invalid hex format: ${e}`);const r=n[1];return`#${(3===r.length?r[0]+r[0]+r[1]+r[1]+r[2]+r[2]:r)+Math.round(255*t).toString(16).toUpperCase().padStart(2,"0")}`};
|
|
15551
14553
|
//# sourceMappingURL=index.mjs.map
|
|
15552
14554
|
|
|
15553
14555
|
/***/ }
|
|
@@ -15711,27 +14713,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15711
14713
|
/* harmony export */ getHoneyListItemId: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.getHoneyListItemId),
|
|
15712
14714
|
/* harmony export */ honeyVisibilityTransitionEffect: () => (/* reexport safe */ _effects__WEBPACK_IMPORTED_MODULE_8__.honeyVisibilityTransitionEffect),
|
|
15713
14715
|
/* harmony export */ mergeRefs: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.mergeRefs),
|
|
15714
|
-
/* harmony export */ resolveAxisTranslate: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.resolveAxisTranslate),
|
|
15715
14716
|
/* harmony export */ resolveScreenState: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.resolveScreenState),
|
|
15716
14717
|
/* harmony export */ resolveSpacing: () => (/* binding */ resolveSpacing),
|
|
15717
|
-
/* harmony export */ useHoneyDecay: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyDecay),
|
|
15718
|
-
/* harmony export */ useHoneyDocumentKeyUp: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyDocumentKeyUp),
|
|
15719
|
-
/* harmony export */ useHoneyDrag: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyDrag),
|
|
15720
14718
|
/* harmony export */ useHoneyGridContext: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.useHoneyGridContext),
|
|
15721
|
-
/* harmony export */ useHoneyLatest: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyLatest),
|
|
15722
14719
|
/* harmony export */ useHoneyLayerRegistryContext: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.useHoneyLayerRegistryContext),
|
|
15723
14720
|
/* harmony export */ useHoneyLayout: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyLayout),
|
|
15724
14721
|
/* harmony export */ useHoneyMediaQuery: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyMediaQuery),
|
|
15725
|
-
/* harmony export */ useHoneyOnChange: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyOnChange),
|
|
15726
14722
|
/* harmony export */ useHoneyOverlay: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyOverlay),
|
|
15727
14723
|
/* harmony export */ useHoneyPopup: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.useHoneyPopup),
|
|
15728
14724
|
/* harmony export */ useHoneyPopupContext: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.useHoneyPopupContext),
|
|
15729
|
-
/* harmony export */ useHoneyRafLoop: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyRafLoop),
|
|
15730
|
-
/* harmony export */ useHoneyResize: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyResize),
|
|
15731
|
-
/* harmony export */ useHoneySyntheticScroll: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneySyntheticScroll),
|
|
15732
|
-
/* harmony export */ useHoneySyntheticScrollX: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneySyntheticScrollX),
|
|
15733
|
-
/* harmony export */ useHoneySyntheticScrollY: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneySyntheticScrollY),
|
|
15734
|
-
/* harmony export */ useHoneyTimer: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useHoneyTimer),
|
|
15735
14725
|
/* harmony export */ useRegisterHoneyOverlay: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.useRegisterHoneyOverlay),
|
|
15736
14726
|
/* harmony export */ warnOnce: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.warnOnce)
|
|
15737
14727
|
/* harmony export */ });
|