{"version":3,"file":"index.dev.cjs","mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,qBAAM,gBAAgB,qBAAM,IAAI,qBAAM,sBAAsB,qBAAM;;AAE1F;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ,WAAW;AAC9B,WAAW,SAAS;AACpB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ,WAAW;AAC9B,WAAW,SAAS;AACpB;AACA,WAAW,SAAS;AACpB;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,mBAAmB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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CPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC,I;;;;;WCPD,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNmC;AACD;AACG;AACO;AACX;AACK;AACH;AACU;AACE;AACA;AACb;AACU;AACL;AACI;AACD","sources":["webpack://@react-hive/honey-hooks/./node_modules/.pnpm/lodash.throttle@4.1.1/node_modules/lodash.throttle/index.js","webpack://@react-hive/honey-hooks/./src/constants.ts","webpack://@react-hive/honey-hooks/./src/use-honey-decay.ts","webpack://@react-hive/honey-hooks/./src/use-honey-document-key-up.ts","webpack://@react-hive/honey-hooks/./src/use-honey-drag-and-drop.ts","webpack://@react-hive/honey-hooks/./src/use-honey-drag.ts","webpack://@react-hive/honey-hooks/./src/use-honey-force-rerender.ts","webpack://@react-hive/honey-hooks/./src/use-honey-latest.ts","webpack://@react-hive/honey-hooks/./src/use-honey-object-url.ts","webpack://@react-hive/honey-hooks/./src/use-honey-on-change.ts","webpack://@react-hive/honey-hooks/./src/use-honey-pending-targets.ts","webpack://@react-hive/honey-hooks/./src/use-honey-raf-loop.ts","webpack://@react-hive/honey-hooks/./src/use-honey-resize.ts","webpack://@react-hive/honey-hooks/./src/use-honey-synthetic-scroll-x.ts","webpack://@react-hive/honey-hooks/./src/use-honey-synthetic-scroll-y.ts","webpack://@react-hive/honey-hooks/./src/use-honey-synthetic-scroll.ts","webpack://@react-hive/honey-hooks/./src/use-honey-timer.ts","webpack://@react-hive/honey-hooks/./src/utils/apply-scroll-delta.ts","webpack://@react-hive/honey-hooks/./src/utils/index.ts","webpack://@react-hive/honey-hooks/./src/utils/prevent-default-event.ts","webpack://@react-hive/honey-hooks/./src/utils/resolve-axis-translate.ts","webpack://@react-hive/honey-hooks/external commonjs2 \"react\"","webpack://@react-hive/honey-hooks/./node_modules/.pnpm/@react-hive+honey-utils@3.31.0/node_modules/@react-hive/honey-utils/dist/index.mjs","webpack://@react-hive/honey-hooks/webpack/bootstrap","webpack://@react-hive/honey-hooks/webpack/runtime/compat get default export","webpack://@react-hive/honey-hooks/webpack/runtime/define property getters","webpack://@react-hive/honey-hooks/webpack/runtime/global","webpack://@react-hive/honey-hooks/webpack/runtime/hasOwnProperty shorthand","webpack://@react-hive/honey-hooks/webpack/runtime/make namespace object","webpack://@react-hive/honey-hooks/./src/index.ts"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        result = wait - timeSinceLastCall;\n\n    return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = value.replace(reTrim, '');\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","const ENV = process.env.NODE_ENV || 'development';\n\nexport const __DEV__ = ENV !== 'production';\n\nif (__DEV__ && typeof window !== 'undefined' && !process.env.JEST_WORKER_ID) {\n  console.info(\n    '[@react-hive/honey-hooks]: You are running in development mode. ' +\n      'This build is not optimized for production and may include extra checks or logs.',\n  );\n}\n","import { useCallback, useRef, useState } from 'react';\nimport type { InertiaOptions } from '@react-hive/honey-utils';\nimport { applyInertiaStep } from '@react-hive/honey-utils';\n\nimport type { UseHoneyRafOnFrameHandler } from './use-honey-raf-loop';\nimport { useHoneyRafLoop } from './use-honey-raf-loop';\nimport { useHoneyLatest } from './use-honey-latest';\n\n/**\n * Configuration options for {@link useHoneyDecay}.\n */\nexport interface UseHoneyDecayOptions extends Pick<\n  InertiaOptions,\n  'friction' | 'minVelocityPxMs' | 'emaAlpha'\n> {\n  /**\n   * Initial numeric value from which inertial motion starts.\n   *\n   * This typically represents a translated position  (e.g. scroll offset or `translateX` value),\n   * but may be any bounded numeric domain.\n   */\n  initialValue: number;\n  /**\n   * Lower bound for the value (inclusive).\n   *\n   * Movement beyond this boundary is not permitted.\n   */\n  min: number;\n  /**\n   * Upper bound for the value (inclusive).\n   *\n   * Movement beyond this boundary is not permitted.\n   */\n  max: number;\n  /**\n   * Optional callback invoked exactly once when inertial motion terminates.\n   *\n   * Triggered when inertia ends due to:\n   * - velocity decaying below `minVelocityPxMs`\n   * - movement being blocked by bounds\n   * - an explicit call to `stop()`\n   *\n   * Not invoked if inertia was never started.\n   */\n  onStop?: () => void;\n}\n\n/**\n * Public control API returned by {@link useHoneyDecay}.\n *\n * Exposes imperative controls for managing velocity-based inertial motion.\n */\nexport interface UseHoneyDecayApi {\n  /**\n   * Current value produced by the decay simulation.\n   *\n   * This value updates over time while inertia is active\n   * and always remains within the configured bounds.\n   */\n  value: number;\n  /**\n   * Indicates whether inertial motion is currently active.\n   */\n  isRunning: boolean;\n  /**\n   * Updates the hard bounds used by the decay simulation.\n   *\n   * This method is safe to call **at any time**, including while inertia is actively running.\n   *\n   * ### Behavior\n   * - If the current value lies **within** the new bounds:\n   *   - bounds are updated\n   *   - inertia (if running) continues uninterrupted\n   *\n   * - If the current value lies **outside** the new bounds:\n   *   - the value is immediately clamped to the nearest boundary\n   *   - internal velocity is reset to `0`\n   *   - any active inertia is **terminated immediately**\n   *   - `onStop` is invoked exactly once (if inertia was active)\n   *\n   * This deterministic behavior mirrors native scroll engines and ensures:\n   * - no overshoot\n   * - no extra inertia frames\n   * - consistent `onStop` semantics\n   *\n   * ### Intended usage\n   * - Responding to layout or content changes\n   * - Handling resize / orientation changes\n   * - Updating overscroll or overflow limits dynamically\n   *\n   * ⚠️ This method should **not** be called from inside the RAF frame handler.\n   *\n   * @param min - New lower bound (inclusive)\n   * @param max - New upper bound (inclusive)\n   */\n  setBounds: (min: number, max: number) => void;\n  /**\n   * Starts inertial motion from the current value using\n   * the provided initial velocity.\n   *\n   * The sign of the velocity determines a direction:\n   * - Positive → movement toward the upper bound\n   * - Negative → movement toward the lower bound\n   *\n   * @param velocityPxMs - Initial velocity expressed in pixels per millisecond (`px/ms`).\n   */\n  start: (velocityPxMs: number) => void;\n  /**\n   * Immediately sets the value and starts inertial motion from that value in a single atomic operation.\n   *\n   * This is the preferred way to hand off from a gesture (e.g. drag end) to inertia, as it:\n   * - avoids transient intermediate states\n   * - guarantees correct value/velocity ordering\n   * - ensures `onStop` semantics remain consistent\n   *\n   * @param value - Starting value for the inertia simulation\n   * @param velocityPxMs - Initial velocity in pixels per millisecond (`px/ms`)\n   */\n  startFrom: (value: number, velocityPxMs: number) => void;\n  /**\n   * Immediately stops inertial motion.\n   *\n   * If inertia is currently active, this will:\n   * - cancel the RAF loop\n   * - reset internal velocity\n   * - invoke `onStop` exactly once\n   */\n  stop: () => void;\n}\n\n/**\n * A bounded, velocity-based inertia (decay) hook built on top\n * of {@link useHoneyRafLoop} and {@link applyInertiaStep}.\n *\n * This hook models **momentum-driven motion** where:\n * - Motion starts with an initial velocity\n * - Velocity decays exponentially over time\n * - Movement is constrained by hard numeric bounds\n * - Inertia stops naturally when velocity becomes negligible\n *\n * Unlike spring-based motion, this hook has **no target value**.\n * Motion continues purely based on momentum until it decays\n * or is blocked by a boundary.\n *\n * ---\n *\n * ### Key characteristics\n * - Frame-rate independent (delta-time based)\n * - Deterministic and interruptible\n * - Direction-aware and bound-safe (no overshoot or jitter)\n * - Closely matches native scroll and drag inertia behavior\n *\n * ---\n *\n * ### Visibility behavior\n * This hook is a **simulation-based system**:\n * - Inertia automatically pauses when the document becomes hidden\n * - No time elapses while hidden\n * - Motion resumes only when explicitly restarted\n *\n * This behavior is inherited from {@link useHoneyRafLoop} and is intentional.\n *\n * ---\n *\n * ### Common use cases\n * - Scroll containers with momentum\n * - Drag-to-scroll interactions\n * - Carousels and sliders\n * - Timelines and scrubbers\n * - Kinetic panning and flinging\n *\n * ---\n *\n * @example\n * ```ts\n * const decay = useHoneyDecay({\n *   initialValue: 0,\n *   min: -maxOverflow,\n *   max: 0,\n * });\n *\n * const onRelease = (velocityPxMs: number) => {\n *   decay.start(velocityPxMs);\n * };\n *\n * return (\n *   <div style={{ transform: `translateX(${decay.value}px)` }} />\n * );\n * ```\n */\nexport const useHoneyDecay = ({\n  initialValue,\n  min,\n  max,\n  friction = 0.002,\n  minVelocityPxMs = 0.01,\n  emaAlpha = 0.2,\n  onStop,\n}: UseHoneyDecayOptions): UseHoneyDecayApi => {\n  const [value, setValue] = useState(initialValue);\n\n  const valueRef = useRef(initialValue);\n  const velocityPxMsRef = useRef(0);\n  const hasActiveInertiaRef = useRef(false);\n\n  const minRef = useRef(min);\n  const maxRef = useRef(max);\n\n  const onStopRef = useHoneyLatest(onStop);\n\n  const frameHandler = useCallback<UseHoneyRafOnFrameHandler>(\n    (deltaTimeMs, frameContext) => {\n      // Ignore the first RAF tick\n      if (deltaTimeMs === 0) {\n        return;\n      }\n\n      const inertia = applyInertiaStep({\n        value: valueRef.current,\n        velocityPxMs: velocityPxMsRef.current,\n        min: minRef.current,\n        max: maxRef.current,\n        deltaTimeMs,\n        friction,\n        minVelocityPxMs,\n        emaAlpha,\n      });\n\n      if (inertia === null) {\n        velocityPxMsRef.current = 0;\n\n        if (hasActiveInertiaRef.current) {\n          hasActiveInertiaRef.current = false;\n\n          onStopRef.current?.();\n        }\n\n        frameContext.stop();\n        return;\n      }\n\n      hasActiveInertiaRef.current = true;\n\n      valueRef.current = inertia.value;\n      velocityPxMsRef.current = inertia.velocityPxMs;\n\n      setValue(inertia.value);\n    },\n    [friction, minVelocityPxMs, emaAlpha],\n  );\n\n  const rafLoop = useHoneyRafLoop(frameHandler);\n\n  const setBounds = useCallback(\n    (nextMin: number, nextMax: number) => {\n      minRef.current = nextMin;\n      maxRef.current = nextMax;\n\n      const currentValue = valueRef.current;\n\n      if (currentValue < nextMin || currentValue > nextMax) {\n        const nextValue = Math.min(Math.max(currentValue, nextMin), nextMax);\n\n        valueRef.current = nextValue;\n        velocityPxMsRef.current = 0;\n\n        setValue(nextValue);\n\n        if (hasActiveInertiaRef.current) {\n          hasActiveInertiaRef.current = false;\n\n          onStopRef.current?.();\n        }\n\n        rafLoop.stop();\n      }\n    },\n    [rafLoop.stop],\n  );\n\n  const start = useCallback(\n    (velocityPxMs: number) => {\n      velocityPxMsRef.current = velocityPxMs;\n      hasActiveInertiaRef.current = true;\n\n      rafLoop.start();\n    },\n    [rafLoop.start],\n  );\n\n  const startFrom = useCallback(\n    (nextValue: number, velocityPxMs: number) => {\n      valueRef.current = nextValue;\n      velocityPxMsRef.current = velocityPxMs;\n      hasActiveInertiaRef.current = true;\n\n      setValue(nextValue);\n      rafLoop.start();\n    },\n    [rafLoop.start],\n  );\n\n  const stop = useCallback(() => {\n    if (hasActiveInertiaRef.current) {\n      hasActiveInertiaRef.current = false;\n\n      onStopRef.current?.();\n    }\n\n    velocityPxMsRef.current = 0;\n    rafLoop.stop();\n  }, [rafLoop.stop]);\n\n  return {\n    value,\n    isRunning: rafLoop.isRunning,\n    setBounds,\n    start,\n    startFrom,\n    stop,\n  };\n};\n","import { useEffect } from 'react';\n\nimport type { HoneyKeyboardEventCode } from './types';\nimport { useHoneyLatest } from './use-honey-latest';\n\n/**\n * Callback invoked when a matching `keyup` event is fired on the document.\n *\n * @param keyCode - Released key code from `KeyboardEvent.code`.\n * @param e - Native keyboard event.\n */\nexport type UseHoneyDocumentOnKeyUpHandler = (\n  keyCode: HoneyKeyboardEventCode,\n  e: KeyboardEvent,\n) => void;\n\ninterface UseHoneyDocumentKeyUpOptions {\n  /**\n   * Whether the event listener should be active.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n  /**\n   * Whether to call `preventDefault()` on matching `keyup` events.\n   *\n   * This is useful for suppressing default browser behavior\n   * (for example, scrolling with the Space key).\n   *\n   * @default true\n   */\n  preventDefault?: boolean;\n}\n\n/**\n * Subscribes to `keyup` events on the `document` and invokes the callback\n * when one of the specified keys is released.\n *\n * The hook keeps a stable document event listener and always uses the latest\n * `onKeyUp` callback and `listenKeys` values without re-subscribing when they change.\n *\n * @param onKeyUp - Callback invoked when a matching key is released.\n * @param listenKeys - List of `KeyboardEvent.code` values to listen for.\n * @param options - Listener behavior configuration.\n *\n * @example\n * ```tsx\n * useHoneyDocumentKeyUp(\n *   (keyCode, event) => {\n *     console.log('Key released:', keyCode);\n *   },\n *   ['Escape'],\n * );\n * ```\n */\nexport const useHoneyDocumentKeyUp = (\n  onKeyUp: UseHoneyDocumentOnKeyUpHandler,\n  listenKeys: HoneyKeyboardEventCode[],\n  { enabled = true, preventDefault = true }: UseHoneyDocumentKeyUpOptions = {},\n) => {\n  const onKeyUpRef = useHoneyLatest(onKeyUp);\n  const listenKeysRef = useHoneyLatest(listenKeys);\n\n  useEffect(() => {\n    if (!enabled) {\n      return;\n    }\n\n    const handleKeyUp = (e: KeyboardEvent) => {\n      const keyCode = e.code as HoneyKeyboardEventCode;\n\n      if (listenKeysRef.current.includes(keyCode)) {\n        if (preventDefault) {\n          e.preventDefault();\n        }\n\n        onKeyUpRef.current(keyCode, e);\n      }\n    };\n\n    document.addEventListener('keyup', handleKeyUp);\n\n    return () => {\n      document.removeEventListener('keyup', handleKeyUp);\n    };\n  }, [enabled, preventDefault]);\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\nimport { Nullable } from './types';\nimport { preventDefaultEvent } from './utils';\nimport { useHoneyLatest } from './use-honey-latest';\nimport { useHoneyForceRerender } from './use-honey-force-rerender';\n\n/**\n * Class name applied to the drop zone while a drag operation is active\n * anywhere within the document.\n */\nexport const HONEY_HIGHLIGHT_DROP_ZONE_CLASS_NAME = 'honey__highlight-drop-zone';\n\n/**\n * Class name applied to the drop zone while the dragged item is directly\n * over the drop zone element.\n */\nexport const HONEY_HIGHLIGHT_DROP_ZONE_OVER_CLASS_NAME = 'honey__highlight-drop-zone-over';\n\n/**\n * Callback invoked once when a drag operation enters the document.\n *\n * @template Element - The drop zone element type.\n *\n * @param dropZoneElement - The current drop zone element, or `null` if it is not mounted.\n * @param e - The native drag event.\n */\nexport type UseHoneyDragAndDropStartHandler<Element extends HTMLElement> = (\n  dropZoneElement: Nullable<Element>,\n  e: DragEvent,\n) => void;\n\n/**\n * Callback invoked when a drag operation ends.\n *\n * This can happen when the dragged item leaves the document or after a drop.\n *\n * @template Element - The drop zone element type.\n *\n * @param dropZoneElement - The current drop zone element, or `null` if it is not mounted.\n * @param e - The native drag event.\n */\nexport type UseHoneyDragAndDropEndHandler<Element extends HTMLElement> = (\n  dropZoneElement: Nullable<Element>,\n  e: DragEvent,\n) => void;\n\n/**\n * Callback invoked when an item is dropped on the drop zone element.\n *\n * @template Element - The drop zone element type.\n *\n * @param dropZoneElement - The current drop zone element, or `null` if it is not mounted.\n * @param e - The native drag event.\n */\nexport type UseHoneyDragAndDropDropHandler<Element extends HTMLElement> = (\n  dropZoneElement: Nullable<Element>,\n  e: DragEvent,\n) => void;\n\n/**\n * Callback ref used to register or unregister the drop zone element.\n *\n * Pass this handler to the target element's `ref` prop.\n *\n * @template Element - The drop zone element type.\n *\n * @param dropZoneElement - The mounted drop zone element, or `null` when unmounted.\n */\nexport type UseHoneyDragAndDropSetElementHandler<Element extends HTMLElement> = (\n  dropZoneElement: Nullable<Element>,\n) => void;\n\n/**\n * Options for configuring the `useDragAndDrop` hook.\n *\n * @template Element - The drop zone element type.\n */\nexport interface UseHoneyDragAndDropOptions<Element extends HTMLElement> {\n  /**\n   * Callback invoked when an item is dropped on the drop zone element.\n   */\n  onDrop: UseHoneyDragAndDropDropHandler<Element>;\n  /**\n   * Optional callback invoked once when a drag operation enters the document.\n   */\n  onDragStart?: UseHoneyDragAndDropStartHandler<Element>;\n  /**\n   * Optional callback invoked when a drag operation leaves the document or after drop.\n   */\n  onDragEnd?: UseHoneyDragAndDropEndHandler<Element>;\n  /**\n   * Whether drag-and-drop handling is enabled.\n   *\n   * When disabled, event listeners are not attached and highlight classes are removed.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n}\n\n/**\n * Adds document-level drag tracking and drop-zone-specific drop handling.\n *\n * The hook highlights the drop zone when a drag operation enters the document,\n * applies an additional class when the dragged item is directly over the drop zone,\n * and invokes the provided callbacks for drag start, drag end, and drop events.\n *\n * Native event listeners are attached directly to the document and drop zone element.\n * Latest callback references are used internally, so changing callback props does not\n * require re-attaching all listeners.\n *\n * @template Element - The drop zone element type.\n *\n * @param options - Hook configuration.\n *\n * @returns An object containing a callback ref to assign to the drop zone element.\n *\n * @example\n * ```tsx\n * const { setDropZoneRef } = useDragAndDrop<HTMLDivElement>({\n *   onDrop: (dropZoneElement, e) => {\n *     const files = Array.from(e.dataTransfer?.files ?? []);\n *\n *     console.log(dropZoneElement, files);\n *   },\n * });\n *\n * return <div ref={setDropZoneRef}>Drop files here</div>;\n * ```\n */\nexport const useHoneyDragAndDrop = <Element extends HTMLElement>({\n  onDragStart,\n  onDragEnd,\n  onDrop,\n  enabled = true,\n}: UseHoneyDragAndDropOptions<Element>) => {\n  const forceRerender = useHoneyForceRerender();\n\n  const dropZoneRef = useRef<Nullable<Element>>(null);\n  /**\n   * Tracks nested document-level drag enter/leave events to avoid ending the\n   * drag operation too early when moving between child elements.\n   */\n  const dragDepthRef = useRef(0);\n  const isDraggingRef = useRef(false);\n\n  /**\n   * Latest callback refs prevent native listeners from capturing stale closures.\n   */\n  const onDragStartRef = useHoneyLatest(onDragStart);\n  const onDragEndRef = useHoneyLatest(onDragEnd);\n  const onDropRef = useHoneyLatest(onDrop);\n\n  const clearDropZoneClasses = useCallback((dropZoneElement = dropZoneRef.current) => {\n    dropZoneElement?.classList.remove(HONEY_HIGHLIGHT_DROP_ZONE_CLASS_NAME);\n    dropZoneElement?.classList.remove(HONEY_HIGHLIGHT_DROP_ZONE_OVER_CLASS_NAME);\n  }, []);\n\n  /**\n   * Starts a drag operation if one is not already active.\n   *\n   * @param e - The native drag event that started the operation.\n   */\n  const startDragging = useCallback((e: DragEvent) => {\n    if (isDraggingRef.current) {\n      return;\n    }\n\n    isDraggingRef.current = true;\n\n    dropZoneRef.current?.classList.add(HONEY_HIGHLIGHT_DROP_ZONE_CLASS_NAME);\n\n    onDragStartRef.current?.(dropZoneRef.current, e);\n  }, []);\n\n  /**\n   * Ends the current drag operation and clears all drag-related state.\n   *\n   * @param e - The native drag event that ended the operation.\n   */\n  const endDragging = useCallback((e: DragEvent) => {\n    if (!isDraggingRef.current) {\n      return;\n    }\n\n    dragDepthRef.current = 0;\n    isDraggingRef.current = false;\n\n    clearDropZoneClasses();\n\n    onDragEndRef.current?.(dropZoneRef.current, e);\n  }, []);\n\n  /**\n   * Handles drag entering the document.\n   *\n   * Increments drag depth and starts the drag operation if needed.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDocumentDragEnter = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    dragDepthRef.current += 1;\n\n    startDragging(e);\n  }, []);\n\n  /**\n   * Handles dragging over the document.\n   *\n   * Prevents the browser's default drag behavior.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDocumentDragOver = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n  }, []);\n\n  /**\n   * Handles drag leaving the document.\n   *\n   * Decrements drag depth and ends the drag operation when no nested drag targets remain.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDocumentDragLeave = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    dragDepthRef.current = Math.max(0, dragDepthRef.current - 1);\n\n    if (dragDepthRef.current === 0) {\n      endDragging(e);\n    }\n  }, []);\n\n  /**\n   * Handles dropping anywhere in the document.\n   *\n   * This is used only to clean up drag state when the item is dropped outside\n   * the actual drop zone.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDocumentDrop = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    endDragging(e);\n  }, []);\n\n  /**\n   * Handles dragging directly over the drop zone element.\n   *\n   * Adds the drop-zone-over highlight class.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDropZoneDragOver = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    dropZoneRef.current?.classList.add(HONEY_HIGHLIGHT_DROP_ZONE_OVER_CLASS_NAME);\n  }, []);\n\n  /**\n   * Handles drag leaving the drop zone element.\n   *\n   * Removes the drop-zone-over highlight class.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDropZoneDragLeave = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    dropZoneRef.current?.classList.remove(HONEY_HIGHLIGHT_DROP_ZONE_OVER_CLASS_NAME);\n  }, []);\n\n  /**\n   * Handles dropping directly on the drop zone element.\n   *\n   * Invokes the latest `onDrop` callback and then ends the active drag operation.\n   *\n   * @param e - The native drag event.\n   */\n  const handleDrop = useCallback((e: DragEvent) => {\n    preventDefaultEvent(e);\n\n    onDropRef.current(dropZoneRef.current, e);\n\n    endDragging(e);\n  }, []);\n\n  /**\n   * Callback ref used to register the drop zone element.\n   *\n   * A rerender is triggered so the effect can attach listeners to the latest\n   * mounted element.\n   *\n   * @param dropZoneElement - The mounted drop zone element, or `null` when unmounted.\n   */\n  const setDropZoneRef = useCallback<UseHoneyDragAndDropSetElementHandler<Element>>(\n    dropZoneElement => {\n      dropZoneRef.current = dropZoneElement;\n\n      forceRerender();\n    },\n    [],\n  );\n\n  useEffect(() => {\n    const dropZoneElement = dropZoneRef.current;\n\n    if (!enabled || !dropZoneElement) {\n      clearDropZoneClasses();\n\n      return;\n    }\n\n    document.addEventListener('dragenter', handleDocumentDragEnter);\n    document.addEventListener('dragover', handleDocumentDragOver);\n    document.addEventListener('dragleave', handleDocumentDragLeave);\n    document.addEventListener('drop', handleDocumentDrop);\n\n    dropZoneElement.addEventListener('dragover', handleDropZoneDragOver);\n    dropZoneElement.addEventListener('dragleave', handleDropZoneDragLeave);\n    dropZoneElement.addEventListener('drop', handleDrop);\n\n    return () => {\n      document.removeEventListener('dragenter', handleDocumentDragEnter);\n      document.removeEventListener('dragover', handleDocumentDragOver);\n      document.removeEventListener('dragleave', handleDocumentDragLeave);\n      document.removeEventListener('drop', handleDocumentDrop);\n\n      dropZoneElement.removeEventListener('dragover', handleDropZoneDragOver);\n      dropZoneElement.removeEventListener('dragleave', handleDropZoneDragLeave);\n      dropZoneElement.removeEventListener('drop', handleDrop);\n\n      clearDropZoneClasses(dropZoneElement);\n\n      dragDepthRef.current = 0;\n      isDraggingRef.current = false;\n    };\n  }, [enabled]);\n\n  return {\n    dropZoneRef,\n    setDropZoneRef,\n  };\n};\n","import type { RefObject } from 'react';\nimport { useEffect } from 'react';\n\nimport type { Nullable } from './types';\nimport { useHoneyLatest } from './use-honey-latest';\n\n/**\n * Invoked when a drag gesture is about to start.\n *\n * This handler is called on the initial pointer-down interaction\n * (mouse or touch) before drag tracking begins.\n *\n * It can be used to:\n * - allow or block dragging\n * - capture initial external state\n * - cancel dragging based on application logic\n *\n * @template Element - Draggable element type.\n *\n * @param draggableElement - Element that is about to be dragged.\n * @param e - Pointer event that initiated the drag.\n *\n * @returns Promise resolving to:\n * - `true` to allow dragging\n * - `false` to cancel dragging\n */\nexport type UseHoneyDragOnStartHandler<Element extends HTMLElement> = (\n  draggableElement: Element,\n  e: MouseEvent | TouchEvent,\n) => Promise<boolean>;\n\n/**\n * Context describing pointer movement during an active drag gesture.\n *\n * All values are expressed in **pixels** and are relative\n * to the drag start or previous frame as noted.\n */\nexport interface UseHoneyDragOnMoveContext {\n  /**\n   * Horizontal delta since the previous move event.\n   *\n   * Positive values indicate movement to the right.\n   */\n  deltaX: number;\n  /**\n   * Vertical delta since the previous move event.\n   *\n   * Positive values indicate movement downward.\n   */\n  deltaY: number;\n  /**\n   * Total horizontal displacement from the drag start position.\n   */\n  distanceX: number;\n  /**\n   * Total vertical displacement from the drag start position.\n   */\n  distanceY: number;\n}\n\n/**\n * Creates a move callback for the current drag gesture.\n *\n * The returned callback is invoked on each pointer move and receives\n * incremental and total movement data.\n *\n * Returning `false` from the move callback immediately terminates the drag.\n *\n * @template Element - The draggable element type.\n *\n * @param draggableElement - The element being dragged.\n *\n * @returns A function invoked on every pointer move, receiving\n *          {@link UseHoneyDragOnMoveContext}, and resolving to:\n *          - `true` to continue dragging\n *          - `false` to stop dragging immediately\n */\nexport type UseHoneyDragOnMoveHandler<Element extends HTMLElement> = (\n  draggableElement: Element,\n) => (context: UseHoneyDragOnMoveContext) => Promise<boolean>;\n\n/**\n * Context describing the final state of a completed drag gesture.\n *\n * This context exposes **release velocity**, which is suitable for\n * inertia, momentum, or decay-based motion systems.\n */\ninterface UseHoneyDragOnEndContext {\n  /**\n   * Total horizontal displacement from drag start to release.\n   */\n  deltaX: number;\n  /**\n   * Total vertical displacement from drag start to release.\n   */\n  deltaY: number;\n  /**\n   * Horizontal release velocity in pixels per millisecond (`px/ms`).\n   *\n   * This value represents the **instantaneous velocity at release**\n   * and is suitable for inertia or momentum-based motion.\n   */\n  velocityXPxMs: number;\n  /**\n   * Vertical release velocity in pixels per millisecond (`px/ms`).\n   *\n   * This value represents the **instantaneous velocity at release**\n   * and is suitable for inertia or momentum-based motion.\n   */\n  velocityYPxMs: number;\n}\n\n/**\n * Invoked when a drag gesture ends.\n *\n * This handler is called when:\n * - the pointer is released\n * - the drag is stopped programmatically, unless skipped\n *\n * It receives final drag displacement and release velocity.\n *\n * @template Element - Draggable element type.\n *\n * @param context - Final drag metrics.\n * @param draggableElement - Element that was dragged.\n * @param e - Pointer event that finished the drag.\n *\n * @returns Promise resolved when end-of-drag logic completes.\n */\nexport type UseHoneyDragOnEndHandler<Element extends HTMLElement> = (\n  context: UseHoneyDragOnEndContext,\n  draggableElement: Element,\n  e: MouseEvent | TouchEvent,\n) => Promise<void>;\n\n/**\n * Handlers controlling the drag gesture lifecycle.\n *\n * Together, these handlers define:\n * - whether dragging can start\n * - how movement is handled\n * - what happens when dragging ends\n */\nexport interface UseHoneyDragHandlers<Element extends HTMLElement> {\n  /**\n   * Optional handler triggered when the drag operation starts.\n   * This is useful for capturing the initial state or performing any setup actions before the drag starts.\n   *\n   * @param element - The element being dragged.\n   *\n   * @returns A boolean or Promise resolving to a boolean indicating if the drag should proceed.\n   */\n  onStartDrag?: UseHoneyDragOnStartHandler<Element>;\n  /**\n   * Required handler triggered continuously during the drag operation.\n   * This handler is responsible for updating the drag state and typically tracks the element's movement.\n   *\n   * @param element - The element being dragged.\n   *\n   * @returns A boolean or Promise resolving to a boolean indicating whether the drag should continue.\n   */\n  onMoveDrag: UseHoneyDragOnMoveHandler<Element>;\n  /**\n   * Optional handler triggered when the drag operation ends.\n   * This is commonly used for cleanup or finalizing the drag process.\n   *\n   * @param context - Contains information about the drag operation, such as distance and speed.\n   * @param element - The element being dragged.\n   *\n   * @returns A Promise.\n   */\n  onEndDrag?: UseHoneyDragOnEndHandler<Element>;\n}\n\n/**\n * Options controlling drag behavior.\n */\nexport interface UseHoneyDragOptions<\n  Element extends HTMLElement,\n> extends UseHoneyDragHandlers<Element> {\n  /**\n   * Controls whether the `onEndDrag` handler is skipped when the drag operation is forcibly stopped.\n   * This can be useful when dragging is interrupted or terminated early due to movement restrictions.\n   *\n   * @default false\n   */\n  skipOnEndDragWhenStopped?: boolean;\n  /**\n   * Whether dragging is enabled.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n}\n\n/**\n * Enables mouse and touch dragging for an element.\n *\n * The hook:\n * - tracks drag movement for mouse and touch input\n * - computes instantaneous release velocity using `performance.now()`\n * - emits drag lifecycle events for start, move, and end\n * - keeps DOM event subscriptions stable while always using the latest handler references\n *\n * Handler behavior:\n * - `onStartDrag`, `onMoveDrag`, and `onEndDrag` are read through `useHoneyLatest`\n * - listener subscriptions are not recreated when handler identities change\n * - the latest `onMoveDrag` factory is used for the attached element\n *\n * Architectural notes:\n * - velocity is computed during movement, not at drag end\n * - no layout reads or writes are performed internally\n * - supports both mouse and touch input\n *\n * @template Element - Draggable HTML element type.\n *\n * @param draggableElementRef - Ref pointing to the draggable element.\n * @param options - Drag lifecycle handlers and configuration.\n */\nexport const useHoneyDrag = <Element extends HTMLElement>(\n  draggableElementRef: RefObject<Nullable<Element>>,\n  {\n    skipOnEndDragWhenStopped = false,\n    enabled = true,\n    onMoveDrag,\n    onStartDrag,\n    onEndDrag,\n  }: UseHoneyDragOptions<Element>,\n) => {\n  const onStartDragRef = useHoneyLatest(onStartDrag);\n  const onMoveDragRef = useHoneyLatest(onMoveDrag);\n  const onEndDragRef = useHoneyLatest(onEndDrag);\n\n  useEffect(() => {\n    const draggableElement = draggableElementRef.current;\n\n    if (!enabled || !draggableElement) {\n      return;\n    }\n\n    let onMove: Nullable<ReturnType<UseHoneyDragOnMoveHandler<Element>>> = null;\n\n    let isDragging = false;\n\n    let startX = 0;\n    let startY = 0;\n\n    let lastX = 0;\n    let lastY = 0;\n    let lastMoveTimeMs = 0;\n\n    let velocityXPxMs = 0;\n    let velocityYPxMs = 0;\n\n    const startDrag = async (clientX: number, clientY: number, e: MouseEvent | TouchEvent) => {\n      if (onStartDragRef.current && !(await onStartDragRef.current(draggableElement, e))) {\n        return;\n      }\n\n      onMove = onMoveDragRef.current(draggableElement);\n\n      lastMoveTimeMs = performance.now();\n\n      isDragging = true;\n\n      startX = clientX;\n      startY = clientY;\n      lastX = clientX;\n      lastY = clientY;\n\n      velocityXPxMs = 0;\n      velocityYPxMs = 0;\n    };\n\n    const stopDrag = async (shouldTriggerOnEndDrag: boolean, e: MouseEvent | TouchEvent) => {\n      if (!isDragging) {\n        return;\n      }\n\n      isDragging = false;\n\n      if (shouldTriggerOnEndDrag && onEndDragRef.current) {\n        const deltaX = lastX - startX;\n        const deltaY = lastY - startY;\n\n        const endContext: UseHoneyDragOnEndContext = {\n          deltaX,\n          deltaY,\n          velocityXPxMs,\n          velocityYPxMs,\n        };\n\n        await onEndDragRef.current(endContext, draggableElement, e);\n      }\n\n      onMove = null;\n    };\n\n    const releaseDragEvents = () => {\n      window.removeEventListener('mousemove', mouseMoveHandler, { capture: true });\n      window.removeEventListener('mouseup', mouseUpHandler, { capture: true });\n\n      window.removeEventListener('touchmove', touchMoveHandler, { capture: true });\n      window.removeEventListener('touchend', touchEndHandler, { capture: true });\n      window.removeEventListener('touchcancel', touchCancelHandler, { capture: true });\n    };\n\n    const releaseDrag = async (shouldTriggerOnEndDrag: boolean, e: MouseEvent | TouchEvent) => {\n      await stopDrag(shouldTriggerOnEndDrag, e);\n\n      releaseDragEvents();\n    };\n\n    const mouseUpHandler = async (e: MouseEvent) => {\n      await releaseDrag(true, e);\n    };\n\n    const moveHandler = async (clientX: number, clientY: number, e: MouseEvent | TouchEvent) => {\n      if (!isDragging || !onMove) {\n        return;\n      }\n\n      const nowMs = performance.now();\n      const deltaTimeMs = nowMs - lastMoveTimeMs;\n\n      const deltaX = clientX - lastX;\n      const deltaY = clientY - lastY;\n\n      if (deltaTimeMs > 0) {\n        velocityXPxMs = deltaX / deltaTimeMs;\n        velocityYPxMs = deltaY / deltaTimeMs;\n      }\n\n      const distanceX = clientX - startX;\n      const distanceY = clientY - startY;\n\n      const isContinue = await onMove({\n        deltaX,\n        deltaY,\n        distanceX,\n        distanceY,\n      });\n\n      lastX = clientX;\n      lastY = clientY;\n      lastMoveTimeMs = nowMs;\n\n      if (!isContinue) {\n        await releaseDrag(!skipOnEndDragWhenStopped, e);\n      }\n    };\n\n    const mouseMoveHandler = async (e: MouseEvent) => {\n      await moveHandler(e.clientX, e.clientY, e);\n    };\n\n    const touchMoveHandler = async (e: TouchEvent) => {\n      const touch = e.touches[0];\n\n      await moveHandler(touch.clientX, touch.clientY, e);\n    };\n\n    const touchEndHandler = async (e: TouchEvent) => {\n      await releaseDrag(true, e);\n    };\n\n    const touchCancelHandler = async (e: TouchEvent) => {\n      await releaseDrag(true, e);\n    };\n\n    const touchStartHandler = async (e: TouchEvent) => {\n      e.stopPropagation();\n\n      const touch = e.touches[0];\n\n      await startDrag(touch.clientX, touch.clientY, e);\n\n      window.addEventListener('touchmove', touchMoveHandler, {\n        passive: true,\n        capture: true,\n      });\n      window.addEventListener('touchend', touchEndHandler, { capture: true });\n      window.addEventListener('touchcancel', touchCancelHandler, { capture: true });\n    };\n\n    const mouseDownHandler = async (e: MouseEvent) => {\n      e.stopPropagation();\n\n      await startDrag(e.clientX, e.clientY, e);\n\n      window.addEventListener('mousemove', mouseMoveHandler, { capture: true });\n      window.addEventListener('mouseup', mouseUpHandler, { capture: true });\n    };\n\n    draggableElement.addEventListener('mousedown', mouseDownHandler);\n    draggableElement.addEventListener('touchstart', touchStartHandler, {\n      passive: true,\n    });\n\n    return () => {\n      draggableElement.removeEventListener('mousedown', mouseDownHandler);\n      draggableElement.removeEventListener('touchstart', touchStartHandler);\n\n      releaseDragEvents();\n    };\n  }, [enabled]);\n};\n","import { useCallback, useState } from 'react';\n\n/**\n * Creates a stable callback that forces the component to rerender.\n *\n * Useful when mutable refs are updated and the component needs to rerun effects\n * or refresh derived values without storing meaningful state.\n *\n * @returns A stable callback that forces a rerender.\n *\n * @example\n * ```tsx\n * const forceRerender = useHoneyForceRerender();\n *\n * const setElementRef = useCallback((element: Nullable<HTMLDivElement>) => {\n *   elementRef.current = element;\n *\n *   forceRerender();\n * }, []);\n * ```\n */\nexport const useHoneyForceRerender = () => {\n  const [, setState] = useState(0);\n\n  return useCallback(() => {\n    setState(value => value + 1);\n  }, []);\n};\n","import type { RefObject } from 'react';\nimport { useRef } from 'react';\n\ntype UseHoneyLatest = {\n  <T>(value: T): RefObject<T>;\n  <T>(value: T | undefined): RefObject<T | undefined>;\n};\n\n/**\n * Stores the latest value in a stable ref.\n *\n * Guarantees that:\n * - `ref.current` always points to the latest value\n * - the ref object identity never changes\n *\n * Overload behavior:\n * - If a non-optional value is provided, `.current` is non-optional\n * - If an optional value is provided, `.current` is optional\n */\nexport const useHoneyLatest: UseHoneyLatest = <T>(\n  value: T | undefined,\n): RefObject<T | undefined> => {\n  const ref = useRef<T | undefined>(value);\n\n  ref.current = value;\n\n  return ref;\n};\n","import { useEffect, useState } from 'react';\n\nimport type { Nullable } from './types';\nimport { useHoneyLatest } from './use-honey-latest';\nimport { useHoneyOnChange } from './use-honey-on-change';\n\n/**\n * Revokes an object URL asynchronously.\n *\n * Delaying revocation avoids conflicts with cases where the URL\n * may still be used during the current execution frame.\n *\n * @param url - Object URL to revoke.\n */\nconst revokeObjectURL = (url: Nullable<string>) => {\n  if (url) {\n    // Revoke the URL asynchronously to avoid conflicts with its usage\n    setTimeout(() => URL.revokeObjectURL(url), 0);\n  }\n};\n\n/**\n * Creates and manages an object URL for the provided `Blob` or `MediaSource`.\n *\n * The hook:\n * - creates an object URL for the current object\n * - updates the URL when the object changes\n * - revokes the previous URL asynchronously to avoid revoking it while it may still be in use\n * - revokes the current URL on unmounting to prevent memory leaks\n *\n * This hook returns `null` when no object is provided.\n *\n * @param obj - Source object used to create an object URL.\n *\n * @returns Object URL for the provided object, or `null` when `obj` is not defined.\n *\n * @example\n * ```tsx\n * const objectUrl = useObjectUrl(mediaFileData);\n *\n * return objectUrl ? <img src={objectUrl} alt=\"Preview\" /> : null;\n * ```\n */\nexport const useHoneyObjectUrl = (\n  obj: Nullable<Blob | MediaSource> | undefined,\n): Nullable<string> => {\n  const [objectUrl, setObjectUrl] = useState<Nullable<string>>(() =>\n    obj ? URL.createObjectURL(obj) : null,\n  );\n\n  const objectUrlRef = useHoneyLatest(objectUrl);\n\n  useHoneyOnChange(obj, newObj => {\n    revokeObjectURL(objectUrlRef.current);\n\n    setObjectUrl(newObj ? URL.createObjectURL(newObj) : null);\n  });\n\n  useEffect(() => {\n    // Handles React StrictMode where the object URL may be revoked during\n    // the development double-invocation cycle and needs to be recreated\n    if (!objectUrlRef.current && obj) {\n      setObjectUrl(URL.createObjectURL(obj));\n    }\n\n    return () => {\n      setObjectUrl(null);\n\n      const urlToRevoke = objectUrlRef.current;\n      objectUrlRef.current = null;\n\n      revokeObjectURL(urlToRevoke);\n    };\n  }, []);\n\n  return objectUrl;\n};\n","import type { EffectCallback } from 'react';\nimport { useEffect, useRef } from 'react';\n\n/**\n * A hook that invokes a callback function whenever the provided `state` value changes.\n *\n * This hook stores the previous value internally and performs a shallow comparison with the current value.\n * If a change is detected, it executes the `onChange` callback. If the callback returns a cleanup function,\n * it will be invoked before the next change or when the component unmounts, similar to standard `useEffect` behavior.\n *\n * @template T - The type of the state being observed.\n *\n * @param state - The value to monitor for changes. Can be of any type.\n * @param onChange - A function called whenever `state` changes. It may return a cleanup function.\n *\n * @returns void\n *\n * @example\n * ```ts\n * useHoneyOnChange(someValue, (newValue) => {\n *   console.log('Value changed to:', newValue);\n *\n *   return () => {\n *     console.log('Cleanup for value:', newValue);\n *   };\n * });\n * ```\n */\nexport const useHoneyOnChange = <T>(\n  state: T,\n  onChange: (newState: T) => ReturnType<EffectCallback>,\n) => {\n  const prevStateRef = useRef(state);\n\n  useEffect(() => {\n    if (prevStateRef.current !== state) {\n      prevStateRef.current = state;\n\n      return onChange(state);\n    }\n  }, [state]);\n};\n","import { useCallback, useRef } from 'react';\n\nimport type { Nullable } from './types';\n\ntype TargetKey = string;\n\n/**\n * API for managing pending targets keyed by a string identifier.\n *\n * Targets are stored temporarily and can be \"consumed\" once,\n * making this hook useful for deferred attachment scenarios\n * (e.g. IntersectionObserver, ResizeObserver, etc.).\n *\n * @template Target - The type of stored target (e.g. HTMLElement)\n * @template Key - A string union representing allowed keys\n */\nexport interface HoneyPendingTargetsApi<Target, Key extends TargetKey> {\n  /**\n   * Stores a target for the given key.\n   *\n   * @param key - Identifier for the target\n   * @param target - Target to store (or `null` to clear)\n   */\n  set: (key: Key, target: Nullable<Target>) => void;\n  /**\n   * Checks whether a non-null target exists for the given key.\n   *\n   * @param key - Identifier for the target\n   *\n   * @returns `true` if a target is present, otherwise `false`\n   */\n  has: (key: Key) => boolean;\n  /**\n   * Retrieves the current target for the given key without removing it.\n   *\n   * @param key - Identifier for the target\n   *\n   * @returns The stored target or `null` if none exists\n   */\n  get: (key: Key) => Nullable<Target>;\n  /**\n   * Retrieves and removes the target for the given key.\n   *\n   * After calling this, the stored value becomes `null`.\n   *\n   * @param key - Identifier for the target\n   *\n   * @returns The previously stored target or `null`\n   */\n  consume: (key: Key) => Nullable<Target>;\n  /**\n   * Clears all stored targets.\n   */\n  clear: () => void;\n}\n\n/**\n * Hook for managing pending (deferred) targets keyed by identifiers.\n *\n * Useful when targets may be assigned before a consumer is ready\n * (e.g. before an observer is initialized). Targets can later be\n * consumed and attached when needed.\n *\n * This hook does not trigger re-renders and is fully ref-based.\n *\n * @template Target - The type of stored target (e.g. HTMLElement)\n * @template Key - A string union representing allowed keys\n *\n * @returns API for managing pending targets\n *\n * @example\n * ```tsx\n * const pendingTargets = useHoneyPendingTargets<HTMLElement, 'top' | 'bottom'>();\n *\n * // store target before observer is ready\n * pendingTargets.set('top', el);\n *\n * // later\n * const target = pendingTargets.consume('top');\n * if (target) {\n *   observer.observe(target);\n * }\n * ```\n */\nexport const useHoneyPendingTargets = <\n  Target,\n  Key extends TargetKey = TargetKey,\n>(): HoneyPendingTargetsApi<Target, Key> => {\n  const pendingTargetsRef = useRef<Record<Key, Nullable<Target>>>(\n    {} as Record<Key, Nullable<Target>>,\n  );\n\n  const set = useCallback((key: Key, target: Nullable<Target>) => {\n    pendingTargetsRef.current[key] = target;\n  }, []);\n\n  const has = useCallback((key: Key) => pendingTargetsRef.current[key] != null, []);\n\n  const get = useCallback((key: Key) => pendingTargetsRef.current[key] ?? null, []);\n\n  const consume = useCallback((key: Key) => {\n    const target = pendingTargetsRef.current[key] ?? null;\n\n    pendingTargetsRef.current[key] = null;\n\n    return target;\n  }, []);\n\n  const clear = useCallback(() => {\n    pendingTargetsRef.current = {} as Record<Key, Nullable<Target>>;\n  }, []);\n\n  return {\n    set,\n    has,\n    get,\n    consume,\n    clear,\n  };\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { Nullable } from './types';\nimport { __DEV__ } from './constants';\nimport { useHoneyLatest } from './use-honey-latest';\n\ninterface UseHoneyRafFrameContext {\n  /**\n   * Immediately terminates the active `requestAnimationFrame` loop.\n   *\n   * This method is **safe to call synchronously from within the frame handler**\n   * and is the **recommended mechanism** for ending frame-driven processes based on runtime conditions.\n   *\n   * Typical use cases:\n   * - Inertia or momentum decay reaching a threshold\n   * - Animation or transition completion\n   * - Time- or state-based termination conditions\n   */\n  stop: () => void;\n}\n\n/**\n * Function invoked on every animation frame while the RAF loop is active.\n *\n * The handler is expected to be **side-effect driven** and may:\n * - Mutate refs\n * - Update React state\n * - Stop the RAF loop via `context.stop()`\n *\n * ⚠️ Referential stability\n * This handler **must be wrapped in `useCallback`** to avoid unnecessary\n * re-bindings and to ensure predictable behavior across renders.\n *\n * @param deltaTimeMs - Time delta in milliseconds since the previous frame.\n *                      This value is clamped to `maxDeltaMs` to prevent large\n *                      time steps caused by tab backgrounding, visibility changes,\n *                      or browser throttling.\n *\n * @param context - RAF lifecycle control context. See {@link UseHoneyRafFrameContext}.\n */\nexport type UseHoneyRafOnFrameHandler = (\n  deltaTimeMs: number,\n  context: UseHoneyRafFrameContext,\n) => void;\n\n/**\n * Configuration options for {@link useHoneyRafLoop}.\n */\ninterface UseHoneyRafLoopOptions {\n  /**\n   * Automatically start the RAF loop on mount.\n   *\n   * This is useful for continuous loops (e.g. visualizers),\n   * but should generally be disabled for gesture- or intent-driven animations.\n   *\n   * @default false\n   */\n  autoStart?: boolean;\n  /**\n   * Whether the RAF loop should automatically resume when the\n   * document becomes visible again after being hidden.\n   *\n   * ⚠️ Important:\n   * - Visibility changes will ALWAYS stop the RAF loop\n   * - Resuming is **opt-in** and never happens implicitly\n   *\n   * This option should only be enabled for truly continuous\n   * systems (e.g. game loops, live visualizations).\n   *\n   * It is intentionally disabled by default to avoid restarting\n   * gesture-driven or state-sensitive animations with stale data.\n   *\n   * Requires `autoStart` to be enabled.\n   *\n   * @default false\n   */\n  resumeOnVisibility?: boolean;\n  /**\n   * Maximum allowed delta time between frames.\n   *\n   * This prevents physics, inertia, or animation logic from receiving large\n   * time steps after backgrounding, tab switches, or frame drops.\n   *\n   * @default 32\n   */\n  maxDeltaMs?: number;\n  /**\n   * Optional error handler invoked when the RAF callback throws.\n   *\n   * When an error occurs:\n   * - The RAF loop is immediately stopped\n   * - `isRafLoopRunning` is set to `false`\n   * - The error is passed to this handler\n   *\n   * @default undefined\n   */\n  onError?: (error: unknown) => void;\n}\n\n/**\n * Public control API returned by {@link useHoneyRafLoop}.\n */\nexport interface HoneyRafLoopApi {\n  /**\n   * Indicates whether the RAF loop is currently running.\n   */\n  isRunning: boolean;\n  /**\n   * Starts the RAF loop.\n   *\n   * If the loop is already running, this call is ignored.\n   */\n  start: () => void;\n  /**\n   * Stops the RAF loop immediately.\n   *\n   * This method is safe to call:\n   * - From user code\n   * - From within the RAF frame handler\n   */\n  stop: () => void;\n}\n\n/**\n * A hook for running a controlled `requestAnimationFrame` loop.\n *\n * Features:\n * - Explicit RAF lifecycle control (`start` / `stop`)\n * - Delta time calculation with frame clamping\n * - Automatic cleanup on unmounting\n * - Conservative handling of tab visibility changes (mobile-safe)\n * - Safe error handling (stops loop on exception)\n *\n * Visibility behavior:\n * - The RAF loop is always stopped when the document becomes hidden\n * - Automatic resume is disabled by default and must be explicitly enabled\n *\n * This hook is designed for gesture handling, inertia, physics simulations,\n * and animation loops that must not trigger React re-renders on every frame.\n *\n * @param onFrame - Function invoked on each animation frame.\n * @param options  - Optional configuration for the RAF loop.\n *\n * @returns Control helpers and RAF loop state.\n *\n * @example\n * ```ts\n * // Gesture-driven inertia (recommended usage)\n * // The RAF loop stops itself when motion decays.\n *\n * const velocityRef = useRef({ x: 12, y: 4 });\n *\n * const onFrame = useCallback<HoneyRafOnFrameHandler>(\n *   (dtMs, { stop }) => {\n *     velocityRef.current.x *= 0.94;\n *     velocityRef.current.y *= 0.94;\n *\n *     setPosition(p => ({\n *       x: p.x + velocityRef.current.x,\n *       y: p.y + velocityRef.current.y,\n *     }));\n *\n *     if (\n *       Math.abs(velocityRef.current.x) < 0.1 &&\n *       Math.abs(velocityRef.current.y) < 0.1\n *     ) {\n *       stop(); // terminate RAF loop\n *     }\n *   },\n *   [],\n * );\n *\n * useHoneyRafLoop(onFrame);\n * ```\n */\nexport const useHoneyRafLoop = (\n  onFrame: UseHoneyRafOnFrameHandler,\n  {\n    autoStart = false,\n    resumeOnVisibility = false,\n    maxDeltaMs = 32, // ~30fps clamp\n    onError,\n  }: UseHoneyRafLoopOptions = {},\n): HoneyRafLoopApi => {\n  const [isRunning, setIsRunning] = useState(false);\n  const isRunningRef = useRef(false);\n\n  const rafIdRef = useRef<Nullable<number>>(null);\n  const lastTimeMsRef = useRef<Nullable<number>>(null);\n\n  const onFrameRef = useHoneyLatest(onFrame);\n  const onErrorRef = useHoneyLatest(onError);\n\n  const stop = useCallback(() => {\n    if (!isRunningRef.current) {\n      return;\n    }\n\n    isRunningRef.current = false;\n\n    if (rafIdRef.current !== null) {\n      cancelAnimationFrame(rafIdRef.current);\n\n      rafIdRef.current = null;\n    }\n\n    lastTimeMsRef.current = null;\n    setIsRunning(false);\n  }, []);\n\n  const loop = useCallback<FrameRequestCallback>(\n    timeMs => {\n      if (!isRunningRef.current) {\n        return;\n      }\n\n      if (lastTimeMsRef.current === null) {\n        lastTimeMsRef.current = timeMs;\n      }\n\n      let deltaTimeMs = timeMs - lastTimeMsRef.current;\n      lastTimeMsRef.current = timeMs;\n\n      // Clamp delta (prevents jumps after background tab / lag)\n      if (deltaTimeMs > maxDeltaMs) {\n        deltaTimeMs = maxDeltaMs;\n      }\n\n      try {\n        onFrameRef.current(deltaTimeMs, {\n          stop,\n        });\n\n        if (isRunningRef.current) {\n          rafIdRef.current = requestAnimationFrame(loop);\n        }\n      } catch (e) {\n        if (__DEV__) {\n          console.error(e);\n        }\n\n        stop();\n\n        onErrorRef.current?.(e);\n      }\n    },\n    [maxDeltaMs, stop],\n  );\n\n  const start = useCallback(() => {\n    if (isRunningRef.current) {\n      return;\n    }\n\n    lastTimeMsRef.current = null;\n\n    isRunningRef.current = true;\n    setIsRunning(true);\n\n    rafIdRef.current = requestAnimationFrame(loop);\n  }, [loop]);\n\n  useEffect(() => {\n    if (autoStart) {\n      start();\n    }\n\n    return stop;\n  }, [autoStart]);\n\n  // Pause when a tab is hidden (important for mobile)\n  useEffect(() => {\n    const onVisibilityChange = () => {\n      if (document.hidden) {\n        stop();\n      } else if (resumeOnVisibility && autoStart) {\n        start();\n      }\n    };\n\n    document.addEventListener('visibilitychange', onVisibilityChange);\n\n    return () => {\n      document.removeEventListener('visibilitychange', onVisibilityChange);\n    };\n  }, [autoStart, resumeOnVisibility, start, stop]);\n\n  return {\n    isRunning,\n    start,\n    stop,\n  };\n};\n","import { useEffect, useRef } from 'react';\nimport { isFunction } from '@react-hive/honey-utils';\nimport throttle from 'lodash.throttle';\n\nimport { useHoneyLatest } from './use-honey-latest';\n\n/**\n * Cleanup function returned by the resize handler.\n */\ntype UseHoneyResizeCleanup = () => void;\n\n/**\n * Callback invoked when the resize listener runs.\n *\n * May optionally return a cleanup function. When returned, that cleanup\n * function is called before the next successful handler execution and when\n * the hook is cleaned up.\n */\nexport type UseHoneyResizeHandler = () => UseHoneyResizeCleanup | undefined;\n\ninterface UseHoneyResizeOptions {\n  /**\n   * Whether to invoke the resize handler immediately after the listener is attached.\n   *\n   * Useful when initial layout measurements should be performed\n   * before any resize events occur.\n   *\n   * @default false\n   */\n  invokeOnMount?: boolean;\n  /**\n   * Throttle delay, in milliseconds, applied to the resize handler.\n   *\n   * When greater than `0`, the resize listener is throttled using\n   * `lodash.throttle` to reduce execution frequency.\n   *\n   * @default 0\n   */\n  throttleTime?: number;\n  /**\n   * Whether the resize listener should be active.\n   *\n   * @default true\n   */\n  enabled?: boolean;\n}\n\n/**\n * Subscribes to the window `resize` event and invokes the provided handler.\n *\n * The handler may optionally return a cleanup function. When provided, the\n * cleanup function is called before the next handler execution and when the\n * hook is cleaned up, such as on unmount or when the effect re-runs.\n *\n * The resize listener can be invoked immediately on mount and optionally\n * throttled to reduce execution frequency for expensive layout work.\n *\n * @param handler - Callback invoked when the resize listener runs.\n * @param options - Configuration options controlling listener behavior.\n *\n * @example\n * ```ts\n * useHoneyResize(() => {\n *   console.log('Window resized');\n * }, { throttleTime: 200 });\n * ```\n *\n * @example\n * ```ts\n * useHoneyResize(() => {\n *   const observer = createResizeSideEffect();\n *\n *   return () => {\n *     observer.disconnect();\n *   };\n * }, { invokeOnMount: true });\n * ```\n */\nexport const useHoneyResize = (\n  handler: UseHoneyResizeHandler,\n  { invokeOnMount = false, throttleTime = 0, enabled = true }: UseHoneyResizeOptions = {},\n) => {\n  const handlerRef = useHoneyLatest(handler);\n  const cleanupRef = useRef<ReturnType<UseHoneyResizeHandler>>(undefined);\n\n  useEffect(() => {\n    if (!enabled) {\n      return;\n    }\n\n    const runHandler = () => {\n      cleanupRef.current?.();\n\n      const cleanup = handlerRef.current();\n\n      cleanupRef.current = isFunction(cleanup) ? cleanup : undefined;\n    };\n\n    const handleResize: typeof runHandler | ReturnType<typeof throttle> = throttleTime\n      ? throttle(runHandler, throttleTime)\n      : runHandler;\n\n    window.addEventListener('resize', handleResize);\n\n    if (invokeOnMount) {\n      runHandler();\n    }\n\n    return () => {\n      if ('cancel' in handleResize && isFunction(handleResize.cancel)) {\n        handleResize.cancel();\n      }\n\n      window.removeEventListener('resize', handleResize);\n\n      cleanupRef.current?.();\n      cleanupRef.current = undefined;\n    };\n  }, [enabled, invokeOnMount, throttleTime]);\n};\n","import type { UseHoneySyntheticScrollOptions } from './use-honey-synthetic-scroll';\nimport { useHoneySyntheticScroll } from './use-honey-synthetic-scroll';\n\n/**\n * Enables synthetic horizontal (X-axis) scrolling for a container element\n * using pointer-based drag interactions.\n *\n * This is a convenience wrapper around {@link useHoneySyntheticScroll} with\n * the axis fixed to `'x'`.\n *\n * All behavior, boundaries, and lifecycle guarantees are identical to the\n * base hook, but limited to horizontal movement only.\n *\n * @template Element - The HTML element type of the scrollable container.\n *\n * @param options - Configuration options forwarded to\n * {@link useHoneySyntheticScroll}, excluding the `axis` option.\n *\n * @returns A ref that must be attached to the scrollable container element.\n */\nexport const useHoneySyntheticScrollX = <Element extends HTMLElement>(\n  options?: Omit<UseHoneySyntheticScrollOptions<Element>, 'axis'>,\n) =>\n  useHoneySyntheticScroll<Element>({\n    ...options,\n    axis: 'x',\n  });\n","import type { UseHoneySyntheticScrollOptions } from './use-honey-synthetic-scroll';\nimport { useHoneySyntheticScroll } from './use-honey-synthetic-scroll';\n\n/**\n * Enables synthetic vertical (Y-axis) scrolling for a container element\n * using pointer-based drag interactions.\n *\n * This is a convenience wrapper around {@link useHoneySyntheticScroll} with\n * the axis fixed to `'y'`.\n *\n * All behavior, boundaries, and lifecycle guarantees are identical to the\n * base hook, but limited to vertical movement only.\n *\n * @template Element - The HTML element type of the scrollable container.\n *\n * @param options - Configuration options forwarded to\n * {@link useHoneySyntheticScroll}, excluding the `axis` option.\n *\n * @returns A ref that must be attached to the scrollable container element.\n */\nexport const useHoneySyntheticScrollY = <Element extends HTMLElement>(\n  options?: Omit<UseHoneySyntheticScrollOptions<Element>, 'axis'>,\n) =>\n  useHoneySyntheticScroll<Element>({\n    ...options,\n    axis: 'y',\n  });\n","import type { RefObject } from 'react';\nimport { useCallback, useEffect, useRef } from 'react';\nimport type { Axis } from '@react-hive/honey-utils';\nimport { resolveAxisDelta } from '@react-hive/honey-utils';\nimport * as CSS from 'csstype';\n\nimport type { Nullable } from './types';\nimport type {\n  UseHoneyDragHandlers,\n  UseHoneyDragOnEndHandler,\n  UseHoneyDragOnMoveHandler,\n  UseHoneyDragOnStartHandler,\n} from './use-honey-drag';\nimport { useHoneyDrag } from './use-honey-drag';\nimport { applyScrollDelta } from './utils';\nimport type { UseHoneyResizeHandler } from './use-honey-resize';\nimport { useHoneyResize } from './use-honey-resize';\n\nexport type HoneySyntheticScrollMode = 'default' | 'embedded';\n\nexport interface UseHoneySyntheticScrollOptions<Element extends HTMLElement> extends Pick<\n  UseHoneyDragHandlers<Element>,\n  'onStartDrag' | 'onEndDrag'\n> {\n  /**\n   * Axis along which synthetic scrolling is enabled.\n   *\n   * - `'x'` — horizontal only\n   * - `'y'` — vertical only\n   * - `'both'` — horizontal and vertical\n   *\n   * @default 'both'\n   */\n  axis?: Axis;\n  /**\n   * Percentage of the container size used as an overscroll buffer\n   * on each enabled axis.\n   *\n   * This allows limited dragging beyond the natural content bounds\n   * before movement is clamped.\n   *\n   * A value of `0` disables overscroll entirely.\n   *\n   * @default 0\n   */\n  overscrollPct?: number;\n  /**\n   * Controls how the hook applies scroll-related interaction styles\n   * (`touch-action` and `overscroll-behavior`) to the container.\n   *\n   * Synthetic scrolling often requires restricting native browser scrolling\n   * behavior to ensure consistent drag and wheel handling.\n   *\n   * However, in some embedded layouts (such as carousels placed inside a\n   * vertically scrollable page), applying these styles can unintentionally\n   * block natural page scrolling.\n   *\n   * ### Modes\n   * - `default` - Applies restrictive interaction styles:\n   *   - `overscroll-behavior: contain`\n   *   - Axis-aware `touch-action` (`pan-y`, `pan-x`, or `none`)\n   *\n   *   Recommended for standalone synthetic scroll containers.\n   *\n   * - `embedded` - Does not apply any interaction-blocking styles.\n   *\n   *   Recommended when the container is integrated into another scrollable\n   *   context (e.g. horizontal carousel inside a page), where native scroll\n   *   chaining must remain intact.\n   *\n   * @default default\n   */\n  mode?: HoneySyntheticScrollMode;\n  /**\n   * Whether to clear any applied translation transforms when the window resizes.\n   *\n   * Useful to keep the layout state consistent after dimension changes.\n   *\n   * @default true\n   */\n  resetOnResize?: boolean;\n  /**\n   * Enables synthetic scrolling driven by pointer-based scroll input,\n   * such as mouse wheels and trackpads.\n   *\n   * When enabled, scroll input is intercepted and converted into bounded\n   * translation using the same logic as drag gestures.\n   *\n   * When disabled, native scrolling behavior is preserved and no scroll\n   * input is handled by this hook.\n   *\n   * @default true\n   */\n  enablePointerScroll?: boolean;\n  /**\n   * Master toggle for the synthetic scroll behavior.\n   *\n   * When `true`, the hook:\n   * - Enables drag-based translation via {@link useHoneyDrag}.\n   * - Optionally resets transforms on resize via {@link useHoneyResize}.\n   * - Applies overscroll and touch-action styles.\n   * - Intercepts wheel / trackpad scroll input if {@link enablePointerScroll} is enabled.\n   *\n   * When `false`, the hook becomes completely inert:\n   * - No drag or wheel listeners are attached.\n   * - No transforms are applied.\n   * - Native scrolling behavior is preserved.\n   *\n   * Useful for conditionally disabling synthetic scrolling\n   * (e.g. mobile layouts, reduced motion, or feature flags).\n   *\n   * @default true\n   */\n  enabled?: boolean;\n}\n\n/**\n * Enables synthetic scrolling for a container using pointer-based drag gestures.\n *\n * Instead of relying on native scrollbars, this hook translates the container\n * using CSS transforms in response to drag input.\n *\n * ### Key characteristics\n * - Dragging is only applied when content overflows the container on a given axis.\n * - Movement is clamped within calculated bounds, with optional overscroll allowance.\n * - Scroll position is stored purely in `transform: translate(...)`.\n * - Active transforms can be automatically cleared on window resize.\n *\n * ### Internals\n * - Uses {@link useHoneyDrag} to track mouse / touch movement.\n * - Uses {@link useHoneyResize} to optionally reset scroll state on resize.\n *\n * @template Element - The HTML element type of the scrollable container.\n *\n * @param options - Configuration controlling axes, boundaries, and lifecycle behavior.\n *\n * @returns A ref that must be attached to the scrollable container element.\n */\nexport const useHoneySyntheticScroll = <Element extends HTMLElement>({\n  axis = 'both',\n  overscrollPct = 0,\n  onStartDrag,\n  onEndDrag,\n  mode = 'default',\n  resetOnResize = true,\n  enablePointerScroll = true,\n  enabled = true,\n}: UseHoneySyntheticScrollOptions<Element> = {}): RefObject<Nullable<Element>> => {\n  const containerRef = useRef<Nullable<Element>>(null);\n\n  const handleOnStartDrag = useCallback<UseHoneyDragOnStartHandler<Element>>(\n    async (...args) => {\n      return onStartDrag?.(...args) ?? true;\n    },\n    [onStartDrag],\n  );\n\n  const handleOnMoveDrag = useCallback<UseHoneyDragOnMoveHandler<Element>>(\n    container =>\n      async ({ deltaX, deltaY }) => {\n        applyScrollDelta({\n          container,\n          deltaX,\n          deltaY,\n          axis,\n          overscrollPct,\n        });\n\n        return true;\n      },\n    [axis, overscrollPct],\n  );\n\n  const handleOnEndDrag = useCallback<UseHoneyDragOnEndHandler<Element>>(\n    async (...args) => {\n      onEndDrag?.(...args);\n    },\n    [axis, overscrollPct, onEndDrag],\n  );\n\n  useHoneyDrag(containerRef, {\n    enabled,\n    onStartDrag: handleOnStartDrag,\n    onMoveDrag: handleOnMoveDrag,\n    onEndDrag: handleOnEndDrag,\n  });\n\n  const resizeHandler = useCallback<UseHoneyResizeHandler>(() => {\n    const container = containerRef.current;\n    if (container) {\n      container.style.removeProperty('transform');\n    }\n  }, []);\n\n  useHoneyResize(resizeHandler, {\n    enabled: enabled && resetOnResize,\n  });\n\n  useEffect(() => {\n    const container = containerRef.current;\n    if (!enabled || !container) {\n      return;\n    }\n\n    if (mode === 'default') {\n      const touchAction: CSS.Properties['touchAction'] =\n        axis === 'x' ? 'pan-y' : axis === 'y' ? 'pan-x' : 'none';\n\n      container.style.overscrollBehavior = 'contain';\n      container.style.touchAction = touchAction;\n    }\n\n    const handleOnWheel = (event: WheelEvent) => {\n      const { deltaX, deltaY } = resolveAxisDelta(\n        {\n          deltaX: event.deltaX,\n          deltaY: event.deltaY,\n        },\n        axis,\n      );\n\n      const didScroll = applyScrollDelta({\n        container,\n        deltaX,\n        deltaY,\n        axis,\n        overscrollPct,\n      });\n\n      if (didScroll) {\n        event.preventDefault();\n      }\n    };\n\n    if (enablePointerScroll) {\n      container.addEventListener('wheel', handleOnWheel, { passive: false });\n    }\n\n    return () => {\n      if (mode === 'default') {\n        container.style.removeProperty('overscroll-behavior');\n        container.style.removeProperty('touch-action');\n      }\n\n      if (enablePointerScroll) {\n        container.removeEventListener('wheel', handleOnWheel);\n      }\n    };\n  }, [mode, enabled, enablePointerScroll]);\n\n  return containerRef;\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nimport { useHoneyLatest } from './use-honey-latest';\nimport type { UseHoneyRafOnFrameHandler } from './use-honey-raf-loop';\nimport { useHoneyRafLoop } from './use-honey-raf-loop';\nimport type { Nullable } from './types';\n\n/**\n * Timer operating mode.\n *\n * - `countdown` — decreases time until it reaches `targetTimeMs`\n * - `countup` — increases time until it reaches `targetTimeMs` (if provided)\n */\ntype UseHoneyTimerMode = 'countdown' | 'countup';\n\ntype UseHoneyTimerOnEndHandler = () => void;\n\nexport interface UseHoneyTimerOptions {\n  /**\n   * Initial timer value in milliseconds.\n   *\n   * - Countdown: starting time\n   * - Count-up: initial offset\n   */\n  initialTimeMs: number;\n  /**\n   * Target time in milliseconds.\n   *\n   * - Countdown: usually `0`\n   * - Count-up: optional upper limit\n   *\n   * When reached, the timer stops and `onEnd` is invoked.\n   *\n   * @default 0\n   */\n  targetTimeMs?: number;\n  /**\n   * Direction in which the timer progresses.\n   *\n   * @default 'countdown'\n   */\n  mode?: UseHoneyTimerMode;\n  /**\n   * Whether the timer should automatically start on mount.\n   *\n   * @default false\n   */\n  autoStart?: boolean;\n  /**\n   * Optional callback invoked exactly once when the timer reaches the target time.\n   */\n  onEnd?: UseHoneyTimerOnEndHandler;\n}\n\n/**\n * Public control API returned by {@link useHoneyTimer}.\n */\nexport interface UseHoneyTimerApi {\n  /**\n   * Current timer value in milliseconds.\n   *\n   * This value updates over time while the timer is running.\n   */\n  timeMs: number;\n  /**\n   * Indicates whether the timer is currently progressing.\n   */\n  isRunning: boolean;\n  /**\n   * Starts the timer from `initialTimeMs`, resetting any previous state.\n   */\n  start: () => void;\n  /**\n   * Pauses the timer while preserving the current time value.\n   */\n  pause: () => void;\n  /**\n   * Resumes the timer from its current time value.\n   *\n   * Has no effect if the timer is already running.\n   */\n  resume: () => void;\n  /**\n   * Resets the timer to a specific time value.\n   *\n   * @param timeMs - Optional new timer value. Defaults to `initialTimeMs`.\n   */\n  reset: (timeMs?: number) => void;\n}\n\n/**\n * A high-precision timer hook built on top of {@link useHoneyRafLoop}.\n *\n * Features:\n * - Frame-accurate time progression using `requestAnimationFrame`\n * - Supports countdown and count-up modes\n * - Explicit lifecycle control (start / pause / resume / reset)\n * - Drift-free timing using delta-based updates\n * - Safe completion handling via `onEnd`\n *\n * Architectural notes:\n * - Time progression is handled imperatively via refs to avoid stale closures and unnecessary re-renders.\n * - React state is updated only with the derived timer value.\n * - RAF lifecycle is fully delegated to `useHoneyRafLoop`.\n *\n * @example\n * ```ts\n * const timer = useHoneyTimer({\n *   initialTimeMs: 10_000,\n *   targetTimeMs: 0,\n *   onEnd: () => console.log('Done'),\n * });\n *\n * timer.startTimer();\n * ```\n */\nexport const useHoneyTimer = ({\n  initialTimeMs,\n  targetTimeMs = 0,\n  mode = 'countdown',\n  autoStart = false,\n  onEnd,\n}: UseHoneyTimerOptions): UseHoneyTimerApi => {\n  const [timeMs, setTimeMs] = useState(initialTimeMs);\n  const timeRef = useHoneyLatest(timeMs);\n\n  const onEndRef = useHoneyLatest<Nullable<UseHoneyTimerOnEndHandler>>(onEnd);\n\n  /**\n   * RAF frame handler responsible for advancing the timer.\n   *\n   * - Computes the next timer value based on `deltaTimeMs`\n   * - Detects completion and stops the RAF loop\n   * - Updates React state with the derived value\n   */\n  const frameHandler = useCallback<UseHoneyRafOnFrameHandler>(\n    (deltaTimeMs, frameContext) => {\n      let nextTime =\n        mode === 'countdown' ? timeRef.current - deltaTimeMs : timeRef.current + deltaTimeMs;\n\n      let finished = false;\n\n      if (mode === 'countdown') {\n        if (nextTime <= targetTimeMs) {\n          nextTime = targetTimeMs;\n          finished = true;\n        }\n      } else if (targetTimeMs > 0 && nextTime >= targetTimeMs) {\n        nextTime = targetTimeMs;\n        finished = true;\n      }\n\n      timeRef.current = nextTime;\n      setTimeMs(nextTime);\n\n      if (finished) {\n        frameContext.stop();\n\n        onEndRef.current?.();\n      }\n    },\n    [mode, targetTimeMs],\n  );\n\n  const rafLoop = useHoneyRafLoop(frameHandler);\n\n  const start = useCallback(() => {\n    timeRef.current = initialTimeMs;\n\n    setTimeMs(initialTimeMs);\n    rafLoop.start();\n  }, [initialTimeMs, rafLoop.start]);\n\n  const pause = useCallback(() => {\n    rafLoop.stop();\n  }, [rafLoop.stop]);\n\n  const resume = useCallback(() => {\n    if (!rafLoop.isRunning) {\n      rafLoop.start();\n    }\n  }, [rafLoop.isRunning, rafLoop.start]);\n\n  const reset = useCallback(\n    (nextTimeMs = initialTimeMs) => {\n      rafLoop.stop();\n\n      timeRef.current = nextTimeMs;\n      setTimeMs(nextTimeMs);\n    },\n    [initialTimeMs, rafLoop.stop],\n  );\n\n  useEffect(() => {\n    if (autoStart) {\n      start();\n    }\n  }, [autoStart]);\n\n  return {\n    timeMs,\n    isRunning: rafLoop.isRunning,\n    start,\n    pause,\n    resume,\n    reset,\n  };\n};\n","import type { Axis } from '@react-hive/honey-utils';\nimport { getXOverflowWidth, getYOverflowHeight, parse2DMatrix } from '@react-hive/honey-utils';\n\nimport { resolveAxisTranslate } from './resolve-axis-translate';\n\ninterface ApplyScrollDeltaOptions {\n  axis: Axis;\n  container: HTMLElement;\n  deltaX: number;\n  deltaY: number;\n  overscrollPct: number;\n}\n\nexport const applyScrollDelta = ({\n  axis,\n  container,\n  deltaX,\n  deltaY,\n  overscrollPct,\n}: ApplyScrollDeltaOptions): boolean => {\n  const { translateX, translateY } = parse2DMatrix(container);\n\n  let nextX = translateX;\n  let nextY = translateY;\n  let shouldScroll = false;\n\n  if (axis === 'x' || axis === 'both') {\n    const next = resolveAxisTranslate({\n      delta: deltaX,\n      translate: translateX,\n      containerSize: container.clientWidth,\n      overflowSize: getXOverflowWidth(container),\n      overscrollPct,\n    });\n\n    if (next !== null) {\n      nextX = next;\n      shouldScroll = true;\n    }\n  }\n\n  if (axis === 'y' || axis === 'both') {\n    const next = resolveAxisTranslate({\n      delta: deltaY,\n      translate: translateY,\n      containerSize: container.clientHeight,\n      overflowSize: getYOverflowHeight(container),\n      overscrollPct,\n    });\n\n    if (next !== null) {\n      nextY = next;\n      shouldScroll = true;\n    }\n  }\n\n  if (shouldScroll) {\n    container.style.transform = `translate(${nextX}px, ${nextY}px)`;\n  }\n\n  return shouldScroll;\n};\n","export * from './prevent-default-event';\nexport * from './apply-scroll-delta';\nexport * from './resolve-axis-translate';\n","/**\n * Prevents the browser's default drag-and-drop behavior and stops the event\n * from bubbling further.\n *\n * This is required to allow custom drop handling and to prevent the browser\n * from opening dropped files.\n *\n * @param e - The event to prevent.\n */\nexport const preventDefaultEvent = (e: Event) => {\n  e.preventDefault();\n  e.stopPropagation();\n};\n","import { resolveBoundedDelta } from '@react-hive/honey-utils';\n\nimport type { Nullable } from '../types';\n\ninterface ResolveAxisTranslateOptions {\n  /**\n   * Drag delta for the axis (deltaX or deltaY).\n   */\n  delta: number;\n  /**\n   * Current translate value for the axis.\n   */\n  translate: number;\n  /**\n   * Visible container size for the axis (width or height).\n   */\n  containerSize: number;\n  /**\n   * Overflow size for the axis.\n   */\n  overflowSize: number;\n  /**\n   * Overscroll window percentage.\n   */\n  overscrollPct: number;\n}\n\nexport const resolveAxisTranslate = ({\n  delta,\n  translate,\n  containerSize,\n  overflowSize,\n  overscrollPct,\n}: ResolveAxisTranslateOptions): Nullable<number> => {\n  if (overflowSize <= 0) {\n    return null;\n  }\n\n  const threshold = containerSize * (overscrollPct / 100);\n\n  return resolveBoundedDelta({\n    delta,\n    value: translate,\n    min: -(overflowSize + threshold),\n    max: threshold,\n  });\n};\n","module.exports = require(\"react\");","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()},s=(...e)=>t=>e.reduce((e,t)=>t(e),t),c=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),u=(e,t)=>e.filter(e=>!t.includes(e)),h=e=>[...new Set(e)],f=(...e)=>{if(0===e.length)return[];if(1===e.length)return[...e[0]];const[t,...n]=e;return h(t).filter(e=>n.every(t=>t.includes(e)))};function d(e,t){if(!e)throw new Error(t)}const m=e=>null===e,p=e=>null==e,g=e=>null!=e,y=e=>void 0===e,w=e=>\"number\"==typeof e,b=e=>\"boolean\"==typeof e,x=e=>\"object\"==typeof e,A=e=>x(e)&&!m(e)&&0===Object.keys(e).length,M=e=>e instanceof Date,v=e=>e instanceof Blob,I=e=>e instanceof Error,S=e=>M(e)&&!isNaN(e.getTime()),C=e=>e instanceof RegExp,k=e=>e instanceof Map,E=e=>e instanceof Set,O=e=>\"symbol\"==typeof e,L=e=>w(e)&&isFinite(e),P=e=>w(e)&&Number.isInteger(e),T=e=>L(e)&&!Number.isInteger(e),X=(e,t)=>(d(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))),$=e=>e.filter(Boolean),_=e=>Array.isArray(e),N=e=>_(e)&&0===e.length,Y=(e,t,n)=>{if(!e?.length||!t)return{previousItem:null,currentItem:null,nextItem:null};const r=e.findIndex(e=>n(e,t));return-1===r?{previousItem:null,currentItem:null,nextItem:null}:{previousItem:r>0?e[r-1]:null,currentItem:e[r],nextItem:r<e.length-1?e[r+1]:null}},F=()=>{},R=e=>\"function\"==typeof e,j=e=>(...t)=>!e(...t),z=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}},U=e=>R(e?.then),W=async(e,t)=>{const n=[];for(let r=0;r<e.length;r++)n.push(await t(e[r],r,e));return n},D=async(e,t)=>Promise.all(e.map(t)),H=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},B=async(e,t)=>{const n=await D(e,async(e,n,r)=>!!await t(e,n,r)&&e);return $(n)},V=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return!0;return!1},Z=async(e,t)=>{for(let n=0;n<e.length;n++)if(!await t(e[n],n,e))return!1;return!0},G=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},J=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return e[n];return null},q=e=>new Promise(t=>setTimeout(t,e)),K=async(e,t,n=\"Operation timed out\")=>{try{return await Promise.race([e,q(t).then(()=>Promise.reject(new Error(n)))])}finally{}},Q=(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 q(t)}}throw i},ee=\"application/json\",te=(e,t)=>{e.setData(ee,JSON.stringify(t))},ne=e=>{const t=e.getData(ee);if(t)try{return JSON.parse(t)}catch{return}},re=e=>\"string\"==typeof e,ae=(e,{fileName:t,target:n}={})=>{if(y(document))return;const r=document.createElement(\"a\");let a=null;try{const l=re(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(()=>{d(a,\"Object URL should not be null\"),URL.revokeObjectURL(a)},0)}},le=e=>e.scrollWidth>e.clientWidth,ie=e=>Math.max(0,e.scrollWidth-e.clientWidth),oe=e=>e.scrollHeight>e.clientHeight,se=e=>Math.max(0,e.scrollHeight-e.clientHeight),ce=({containerSize:e,elementOffset:t,elementSize:n})=>-(t+n/2-e/2),ue=(e,t)=>t<=0?0:Math.max(-t,Math.min(e,0)),he=(e,t,{axis:n=\"both\",shouldClamp:r=!0}={})=>{let a=0,l=0;if(\"x\"===n||\"both\"===n){const n=ce({containerSize:e.clientWidth,elementOffset:t.offsetLeft,elementSize:t.clientWidth});a=r?ue(n,ie(e)):n}if(\"y\"===n||\"both\"===n){const n=ce({containerSize:e.clientHeight,elementOffset:t.offsetTop,elementSize:t.clientHeight});l=r?ue(n,se(e)):n}e.style.transform=`translate(${a}px, ${l}px)`},fe=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}},de=()=>{if(\"undefined\"==typeof window||!window.localStorage)return!1;try{return window.localStorage.getItem(\"__non_existing_key__\"),!0}catch{return!1}},me=()=>{if(!de())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}},pe=e=>e instanceof File,ge=e=>{if(!e)return[];const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t},ye=(e,t)=>new File([e],t,{type:e.type}),we=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 D(r,async e=>e.isDirectory?we(e,{skipFiles:t}):n.has(e.name)?[]:[await new Promise((t,n)=>{e.file(t,n)})])).flat()},be=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(we(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()},xe=(e,...t)=>\"function\"==typeof e?e(...t):e,Ae=({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},Me=({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=Ae({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}},ve=()=>`${Math.floor(1e3*performance.now()).toString(36)}${Math.random().toString(36).slice(2,10)}`,Ie=(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),Se=(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}}},Ce=(e,t,n,r)=>{const a=n-e,l=r-t;return Math.hypot(a,l)},ke=(e,t)=>Math.abs(e/t),Ee=(e,t)=>e*t/100,Oe=e=>{let t=5381;for(let n=0;n<e.length;n++)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)},Le=e=>Object.entries(e).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}),Pe=e=>e.replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").toLowerCase(),Te=e=>{const t=e.charAt(0),n=e.slice(1);return t.toLowerCase()+n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)},Xe=e=>e.replace(/([a-z0-9])([A-Z])/g,\"$1 $2\"),$e=e=>0===e.length?[]:e.split(\" \").filter(Boolean),_e=e=>\"\"===e||p(e),Ne=e=>{const t=e.lastIndexOf(\".\");return t<=0||t===e.length-1?[e,\"\"]:[e.slice(0,t),e.slice(t+1).toLowerCase()]},Ye=(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},Fe=(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)}},Re=(e,t=1/0)=>0===e.length?\"\":$e(e).slice(0,t).map(e=>e[0]).join(\"\").toUpperCase(),je=(e,t,n,r=t)=>e.split(t).map((e,t)=>n(e.trim(),t)).join(r),ze=(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];ze(s,t,n,r,a,l+1)}}),r),Ue=(e,t,n)=>e.filter(e=>e.parentId===t&&(!n||n(e))),We=(e,t,n,r)=>{const a=$e(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 s=$e(o.toLowerCase());if(a.every(e=>s.some(t=>t.startsWith(e))))if(y(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];y(i.parentId)||t(i);const o=r.length?r[r.length-1].parentId:null;(m(o)||o!==n.parentId)&&(d(i,\"[@react-hive/honey-utils]: Parent node was not found.\"),r.push(i))};t(i),r.push(i)}return r},[])},De=(e,t)=>{d(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})$/);d(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\")}`};export{ee as DATA_TRANSFER_JSON_MIME,a as FOCUSABLE_HTML_TAGS,Me as applyInertiaStep,d as assert,ye as blobToFile,ce as calculateCenterOffset,Ce as calculateEuclideanDistance,ke as calculateMovingSpeed,Ee as calculatePercentage,Te as camelToDashCase,Xe as camelToWords,he as centerElementInContainer,X as chunk,ue as clampOffsetToOverflow,e as cloneBlob,$ as compact,c as compose,Le as definedProps,q as delay,u as difference,ae as downloadFile,Z as everyAsync,ge as fileListToFiles,B as filterParallel,H as filterSequential,J as findAsync,Ye as findCharIndices,ze as flattenTree,Fe as forEachChar,ve as generateEphemeralId,Y as getAdjacentItems,Ie as getDOMRectIntersectionRatio,ne as getDataTransferJson,t as getElementOffsetRect,i as getFocusableHtmlElements,me as getLocalStorageCapabilities,Ue as getTreeChildren,Re as getWordsInitials,ie as getXOverflowWidth,se as getYOverflowHeight,le as hasXOverflow,oe as hasYOverflow,Oe as hashString,De as hexWithAlpha,f as intersection,xe as invokeIfFunction,n as isAnchorHtmlElement,_ as isArray,v as isBlob,b as isBool,r as isContentEditableHtmlElement,M as isDate,T as isDecimal,g as isDefined,N as isEmptyArray,A as isEmptyObject,I as isError,pe as isFile,L as isFiniteNumber,R as isFunction,l as isHtmlElementFocusable,P as isInteger,de as isLocalStorageReadable,k as isMap,p as isNil,_e as isNilOrEmptyString,m as isNull,w as isNumber,x as isObject,U as isPromise,C as isRegExp,E as isSet,re as isString,O as isSymbol,y as isUndefined,S as isValidDate,o as moveFocusWithinContainer,F as noop,j as not,z as once,fe as parse2DMatrix,Ne as parseFileName,s as pipe,be as readFilesFromDataTransfer,G as reduceAsync,Se as resolveAxisDelta,Ae as resolveBoundedDelta,Q as retry,D as runParallel,W as runSequential,We as searchTree,te as setDataTransferJson,V as someAsync,je as splitMapJoin,$e as splitStringIntoWords,K as timeout,Pe as toKebabCase,we as traverseFileSystemDirectory,h as unique};\n//# sourceMappingURL=index.mjs.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tif (!(moduleId in __webpack_modules__)) {\n\t\tdelete __webpack_module_cache__[moduleId];\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export * from './use-honey-latest';\nexport * from './use-honey-decay';\nexport * from './use-honey-raf-loop';\nexport * from './use-honey-document-key-up';\nexport * from './use-honey-drag';\nexport * from './use-honey-on-change';\nexport * from './use-honey-resize';\nexport * from './use-honey-synthetic-scroll';\nexport * from './use-honey-synthetic-scroll-x';\nexport * from './use-honey-synthetic-scroll-y';\nexport * from './use-honey-timer';\nexport * from './use-honey-pending-targets';\nexport * from './use-honey-object-url';\nexport * from './use-honey-force-rerender';\nexport * from './use-honey-drag-and-drop';\n"],"names":[],"sourceRoot":""}