@react-hive/honey-layout 10.3.0 → 10.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HoneyOverlay.d.ts +1 -1
- package/dist/hooks/use-honey-synthetic-scroll.d.ts +19 -12
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.dev.cjs +182 -136
- package/dist/index.dev.cjs.map +1 -1
- package/dist/index.mjs +11 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.dev.cjs
CHANGED
|
@@ -7932,90 +7932,93 @@ function rectToClientRect(rect) {
|
|
|
7932
7932
|
"use strict";
|
|
7933
7933
|
__webpack_require__.r(__webpack_exports__);
|
|
7934
7934
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7935
|
-
/* harmony export */ FOCUSABLE_HTML_TAGS: () => (/* binding */
|
|
7935
|
+
/* harmony export */ FOCUSABLE_HTML_TAGS: () => (/* binding */ ke),
|
|
7936
|
+
/* harmony export */ applyInertiaStep: () => (/* binding */ Ae),
|
|
7936
7937
|
/* harmony export */ assert: () => (/* binding */ t),
|
|
7937
|
-
/* harmony export */ blobToFile: () => (/* binding */
|
|
7938
|
-
/* harmony export */ calculateCenterOffset: () => (/* binding */
|
|
7938
|
+
/* harmony export */ blobToFile: () => (/* binding */ pe),
|
|
7939
|
+
/* harmony export */ calculateCenterOffset: () => (/* binding */ de),
|
|
7939
7940
|
/* harmony export */ calculateEuclideanDistance: () => (/* binding */ ee),
|
|
7940
7941
|
/* harmony export */ calculateMovingSpeed: () => (/* binding */ te),
|
|
7941
7942
|
/* harmony export */ calculatePercentage: () => (/* binding */ ne),
|
|
7942
|
-
/* harmony export */ camelToDashCase: () => (/* binding */
|
|
7943
|
-
/* harmony export */ camelToWords: () => (/* binding */
|
|
7944
|
-
/* harmony export */ centerElementInContainer: () => (/* binding */
|
|
7945
|
-
/* harmony export */ chunk: () => (/* binding */
|
|
7943
|
+
/* harmony export */ camelToDashCase: () => (/* binding */ Z),
|
|
7944
|
+
/* harmony export */ camelToWords: () => (/* binding */ G),
|
|
7945
|
+
/* harmony export */ centerElementInContainer: () => (/* binding */ me),
|
|
7946
|
+
/* harmony export */ chunk: () => (/* binding */ O),
|
|
7946
7947
|
/* harmony export */ cloneBlob: () => (/* binding */ ae),
|
|
7947
|
-
/* harmony export */ compact: () => (/* binding */
|
|
7948
|
-
/* harmony export */ compose: () => (/* binding */
|
|
7949
|
-
/* harmony export */ definedProps: () => (/* binding */
|
|
7950
|
-
/* harmony export */ delay: () => (/* binding */
|
|
7948
|
+
/* harmony export */ compact: () => (/* binding */ A),
|
|
7949
|
+
/* harmony export */ compose: () => (/* binding */ X),
|
|
7950
|
+
/* harmony export */ definedProps: () => (/* binding */ Se),
|
|
7951
|
+
/* harmony export */ delay: () => (/* binding */ U),
|
|
7951
7952
|
/* harmony export */ difference: () => (/* binding */ E),
|
|
7952
|
-
/* harmony export */ downloadFile: () => (/* binding */
|
|
7953
|
-
/* harmony export */ everyAsync: () => (/* binding */
|
|
7954
|
-
/* harmony export */ fileListToFiles: () => (/* binding */
|
|
7955
|
-
/* harmony export */ filterParallel: () => (/* binding */
|
|
7956
|
-
/* harmony export */ filterSequential: () => (/* binding */
|
|
7957
|
-
/* harmony export */ findAsync: () => (/* binding */
|
|
7958
|
-
/* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */
|
|
7953
|
+
/* harmony export */ downloadFile: () => (/* binding */ se),
|
|
7954
|
+
/* harmony export */ everyAsync: () => (/* binding */ I),
|
|
7955
|
+
/* harmony export */ fileListToFiles: () => (/* binding */ ge),
|
|
7956
|
+
/* harmony export */ filterParallel: () => (/* binding */ j),
|
|
7957
|
+
/* harmony export */ filterSequential: () => (/* binding */ N),
|
|
7958
|
+
/* harmony export */ findAsync: () => (/* binding */ H),
|
|
7959
|
+
/* harmony export */ getDOMRectIntersectionRatio: () => (/* binding */ Me),
|
|
7959
7960
|
/* harmony export */ getElementOffsetRect: () => (/* binding */ le),
|
|
7960
|
-
/* harmony export */ getFocusableHtmlElements: () => (/* binding */
|
|
7961
|
-
/* harmony export */ getLocalStorageCapabilities: () => (/* binding */
|
|
7962
|
-
/* harmony export */ getXOverflowWidth: () => (/* binding */
|
|
7963
|
-
/* harmony export */ getYOverflowHeight: () => (/* binding */
|
|
7964
|
-
/* harmony export */ hasXOverflow: () => (/* binding */
|
|
7965
|
-
/* harmony export */ hasYOverflow: () => (/* binding */
|
|
7966
|
-
/* harmony export */ hashString: () => (/* binding */
|
|
7967
|
-
/* harmony export */ intersection: () => (/* binding */
|
|
7968
|
-
/* harmony export */ invokeIfFunction: () => (/* binding */
|
|
7969
|
-
/* harmony export */ isAnchorHtmlElement: () => (/* binding */
|
|
7970
|
-
/* harmony export */ isArray: () => (/* binding */
|
|
7971
|
-
/* harmony export */ isBlob: () => (/* binding */
|
|
7972
|
-
/* harmony export */ isBool: () => (/* binding */
|
|
7973
|
-
/* harmony export */ isContentEditableHtmlElement: () => (/* binding */
|
|
7974
|
-
/* harmony export */ isDate: () => (/* binding */
|
|
7975
|
-
/* harmony export */ isDecimal: () => (/* binding */
|
|
7976
|
-
/* harmony export */ isDefined: () => (/* binding */
|
|
7977
|
-
/* harmony export */ isEmptyArray: () => (/* binding */
|
|
7961
|
+
/* harmony export */ getFocusableHtmlElements: () => (/* binding */ Te),
|
|
7962
|
+
/* harmony export */ getLocalStorageCapabilities: () => (/* binding */ Pe),
|
|
7963
|
+
/* harmony export */ getXOverflowWidth: () => (/* binding */ ue),
|
|
7964
|
+
/* harmony export */ getYOverflowHeight: () => (/* binding */ he),
|
|
7965
|
+
/* harmony export */ hasXOverflow: () => (/* binding */ ce),
|
|
7966
|
+
/* harmony export */ hasYOverflow: () => (/* binding */ fe),
|
|
7967
|
+
/* harmony export */ hashString: () => (/* binding */ re),
|
|
7968
|
+
/* harmony export */ intersection: () => (/* binding */ k),
|
|
7969
|
+
/* harmony export */ invokeIfFunction: () => (/* binding */ Q),
|
|
7970
|
+
/* harmony export */ isAnchorHtmlElement: () => (/* binding */ ie),
|
|
7971
|
+
/* harmony export */ isArray: () => (/* binding */ S),
|
|
7972
|
+
/* harmony export */ isBlob: () => (/* binding */ f),
|
|
7973
|
+
/* harmony export */ isBool: () => (/* binding */ o),
|
|
7974
|
+
/* harmony export */ isContentEditableHtmlElement: () => (/* binding */ oe),
|
|
7975
|
+
/* harmony export */ isDate: () => (/* binding */ u),
|
|
7976
|
+
/* harmony export */ isDecimal: () => (/* binding */ x),
|
|
7977
|
+
/* harmony export */ isDefined: () => (/* binding */ a),
|
|
7978
|
+
/* harmony export */ isEmptyArray: () => (/* binding */ v),
|
|
7978
7979
|
/* harmony export */ isEmptyObject: () => (/* binding */ c),
|
|
7979
7980
|
/* harmony export */ isError: () => (/* binding */ h),
|
|
7980
|
-
/* harmony export */ isFile: () => (/* binding */
|
|
7981
|
+
/* harmony export */ isFile: () => (/* binding */ we),
|
|
7981
7982
|
/* harmony export */ isFiniteNumber: () => (/* binding */ p),
|
|
7982
|
-
/* harmony export */ isFunction: () => (/* binding */
|
|
7983
|
-
/* harmony export */ isHtmlElementFocusable: () => (/* binding */
|
|
7983
|
+
/* harmony export */ isFunction: () => (/* binding */ P),
|
|
7984
|
+
/* harmony export */ isHtmlElementFocusable: () => (/* binding */ Ee),
|
|
7984
7985
|
/* harmony export */ isInteger: () => (/* binding */ b),
|
|
7985
|
-
/* harmony export */ isLocalStorageReadable: () => (/* binding */
|
|
7986
|
-
/* harmony export */ isMap: () => (/* binding */
|
|
7986
|
+
/* harmony export */ isLocalStorageReadable: () => (/* binding */ _e),
|
|
7987
|
+
/* harmony export */ isMap: () => (/* binding */ y),
|
|
7987
7988
|
/* harmony export */ isNil: () => (/* binding */ r),
|
|
7988
|
-
/* harmony export */ isNilOrEmptyString: () => (/* binding */
|
|
7989
|
+
/* harmony export */ isNilOrEmptyString: () => (/* binding */ J),
|
|
7989
7990
|
/* harmony export */ isNull: () => (/* binding */ n),
|
|
7990
|
-
/* harmony export */ isNumber: () => (/* binding */
|
|
7991
|
+
/* harmony export */ isNumber: () => (/* binding */ i),
|
|
7991
7992
|
/* harmony export */ isObject: () => (/* binding */ s),
|
|
7992
|
-
/* harmony export */ isPromise: () => (/* binding */
|
|
7993
|
-
/* harmony export */ isRegExp: () => (/* binding */
|
|
7994
|
-
/* harmony export */ isSet: () => (/* binding */
|
|
7995
|
-
/* harmony export */ isString: () => (/* binding */
|
|
7993
|
+
/* harmony export */ isPromise: () => (/* binding */ Y),
|
|
7994
|
+
/* harmony export */ isRegExp: () => (/* binding */ m),
|
|
7995
|
+
/* harmony export */ isSet: () => (/* binding */ w),
|
|
7996
|
+
/* harmony export */ isString: () => (/* binding */ D),
|
|
7996
7997
|
/* harmony export */ isSymbol: () => (/* binding */ g),
|
|
7997
|
-
/* harmony export */ isUndefined: () => (/* binding */
|
|
7998
|
-
/* harmony export */ isValidDate: () => (/* binding */
|
|
7999
|
-
/* harmony export */ moveFocusWithinContainer: () => (/* binding */
|
|
8000
|
-
/* harmony export */ noop: () => (/* binding */
|
|
8001
|
-
/* harmony export */ not: () => (/* binding */
|
|
8002
|
-
/* harmony export */ once: () => (/* binding */
|
|
8003
|
-
/* harmony export */ parse2DMatrix: () => (/* binding */
|
|
8004
|
-
/* harmony export */ parseFileName: () => (/* binding */
|
|
8005
|
-
/* harmony export */ pipe: () => (/* binding */
|
|
8006
|
-
/* harmony export */ readFilesFromDataTransfer: () => (/* binding */
|
|
8007
|
-
/* harmony export */ reduceAsync: () => (/* binding */
|
|
8008
|
-
/* harmony export */
|
|
8009
|
-
/* harmony export */
|
|
8010
|
-
/* harmony export */
|
|
8011
|
-
/* harmony export */
|
|
8012
|
-
/* harmony export */
|
|
8013
|
-
/* harmony export */
|
|
7998
|
+
/* harmony export */ isUndefined: () => (/* binding */ l),
|
|
7999
|
+
/* harmony export */ isValidDate: () => (/* binding */ d),
|
|
8000
|
+
/* harmony export */ moveFocusWithinContainer: () => (/* binding */ Xe),
|
|
8001
|
+
/* harmony export */ noop: () => (/* binding */ _),
|
|
8002
|
+
/* harmony export */ not: () => (/* binding */ z),
|
|
8003
|
+
/* harmony export */ once: () => (/* binding */ L),
|
|
8004
|
+
/* harmony export */ parse2DMatrix: () => (/* binding */ ye),
|
|
8005
|
+
/* harmony export */ parseFileName: () => (/* binding */ K),
|
|
8006
|
+
/* harmony export */ pipe: () => (/* binding */ T),
|
|
8007
|
+
/* harmony export */ readFilesFromDataTransfer: () => (/* binding */ xe),
|
|
8008
|
+
/* harmony export */ reduceAsync: () => (/* binding */ $),
|
|
8009
|
+
/* harmony export */ resolveAxisDelta: () => (/* binding */ Oe),
|
|
8010
|
+
/* harmony export */ resolveBoundedDelta: () => (/* binding */ ve),
|
|
8011
|
+
/* harmony export */ retry: () => (/* binding */ B),
|
|
8012
|
+
/* harmony export */ runParallel: () => (/* binding */ R),
|
|
8013
|
+
/* harmony export */ runSequential: () => (/* binding */ C),
|
|
8014
|
+
/* harmony export */ someAsync: () => (/* binding */ F),
|
|
8015
|
+
/* harmony export */ splitStringIntoWords: () => (/* binding */ q),
|
|
8016
|
+
/* harmony export */ timeout: () => (/* binding */ W),
|
|
8014
8017
|
/* harmony export */ toKebabCase: () => (/* binding */ V),
|
|
8015
|
-
/* harmony export */ traverseFileSystemDirectory: () => (/* binding */
|
|
8016
|
-
/* harmony export */ unique: () => (/* binding */
|
|
8018
|
+
/* harmony export */ traverseFileSystemDirectory: () => (/* binding */ be),
|
|
8019
|
+
/* harmony export */ unique: () => (/* binding */ M)
|
|
8017
8020
|
/* harmony export */ });
|
|
8018
|
-
var e={};function t(e,t){if(!e)throw new Error(t)}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const n=e=>null===e,r=e=>null==e,
|
|
8021
|
+
var e={};function t(e,t){if(!e)throw new Error(t)}e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const n=e=>null===e,r=e=>null==e,a=e=>null!=e,l=e=>void 0===e,i=e=>"number"==typeof e,o=e=>"boolean"==typeof e,s=e=>"object"==typeof e,c=e=>s(e)&&!n(e)&&0===Object.keys(e).length,u=e=>e instanceof Date,f=e=>e instanceof Blob,h=e=>e instanceof Error,d=e=>u(e)&&!isNaN(e.getTime()),m=e=>e instanceof RegExp,y=e=>e instanceof Map,w=e=>e instanceof Set,g=e=>"symbol"==typeof e,p=e=>i(e)&&isFinite(e),b=e=>i(e)&&Number.isInteger(e),x=e=>p(e)&&!Number.isInteger(e),S=e=>Array.isArray(e),v=e=>S(e)&&0===e.length,A=e=>e.filter(Boolean),M=e=>[...new Set(e)],O=(e,n)=>(t(n>0,"Chunk size must be greater than 0"),Array.from({length:Math.ceil(e.length/n)},(t,r)=>e.slice(r*n,(r+1)*n))),k=(...e)=>{if(0===e.length)return[];if(1===e.length)return[...e[0]];const[t,...n]=e;return M(t).filter(e=>n.every(t=>t.includes(e)))},E=(e,t)=>e.filter(e=>!t.includes(e)),T=(...e)=>t=>e.reduce((e,t)=>t(e),t),X=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),_=()=>{},P=e=>"function"==typeof e,z=e=>(...t)=>!e(...t),L=e=>{let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}},Y=e=>P(e?.then),C=async(e,t)=>{const n=[];for(let r=0;r<e.length;r++)n.push(await t(e[r],r,e));return n},R=async(e,t)=>Promise.all(e.map(t)),N=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},j=async(e,t)=>{const n=await R(e,async(e,n,r)=>!!await t(e,n,r)&&e);return A(n)},F=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return!0;return!1},I=async(e,t)=>{for(let n=0;n<e.length;n++)if(!await t(e[n],n,e))return!1;return!0},$=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},H=async(e,t)=>{for(let n=0;n<e.length;n++)if(await t(e[n],n,e))return e[n];return null},U=e=>new Promise(t=>setTimeout(t,e)),W=async(e,t,n="Operation timed out")=>{try{return await Promise.race([e,U(t).then(()=>Promise.reject(new Error(n)))])}finally{}},B=(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 U(t)}}throw i},D=e=>"string"==typeof e,V=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Z=e=>{const t=e.charAt(0),n=e.slice(1);return t.toLowerCase()+n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)},G=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2"),q=e=>e.split(" ").filter(Boolean),J=e=>""===e||r(e),K=e=>{const t=e.lastIndexOf(".");return t<=0||t===e.length-1?[e,""]:[e.slice(0,t),e.slice(t+1).toLowerCase()]},Q=(e,...t)=>"function"==typeof e?e(...t):e,ee=(e,t,n,r)=>{const a=n-e,l=r-t;return Math.hypot(a,l)},te=(e,t)=>Math.abs(e/t),ne=(e,t)=>e*t/100,re=e=>{let t=5381;for(let n=0;n<e.length;n++)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)},ae=e=>new Blob([e],{type:e.type}),le=e=>new DOMRect(e.offsetLeft,e.offsetTop,e.clientWidth,e.clientHeight),ie=e=>"A"===e.tagName,oe=e=>"true"===e.getAttribute("contenteditable"),se=(e,{fileName:n,target:r}={})=>{if(l(document))return;const a=document.createElement("a");let i=null;try{const t=D(e)?e:i=URL.createObjectURL(e);a.href=t,n&&(a.download=n),r&&(a.target=r),document.body.appendChild(a),a.click()}finally{a.remove(),i&&setTimeout(()=>{t(i,"Object URL should not be null"),URL.revokeObjectURL(i)},0)}},ce=e=>e.scrollWidth>e.clientWidth,ue=e=>Math.max(0,e.scrollWidth-e.clientWidth),fe=e=>e.scrollHeight>e.clientHeight,he=e=>Math.max(0,e.scrollHeight-e.clientHeight),de=({overflowSize:e,containerSize:t,elementOffset:n,elementSize:r})=>{if(e<=0)return 0;const a=n+r/2-t/2;return-Math.max(0,Math.min(a,e))},me=(e,t,{axis:n="both"}={})=>{let r=0,a=0;"x"!==n&&"both"!==n||(r=de({overflowSize:ue(e),containerSize:e.clientWidth,elementOffset:t.offsetLeft,elementSize:t.clientWidth})),"y"!==n&&"both"!==n||(a=de({overflowSize:he(e),containerSize:e.clientHeight,elementOffset:t.offsetTop,elementSize:t.clientHeight})),e.style.transform=`translate(${r}px, ${a}px)`},ye=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}},we=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},pe=(e,t)=>new File([e],t,{type:e.type}),be=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 R(r,async e=>e.isDirectory?be(e,{skipFiles:t}):n.has(e.name)?[]:[await new Promise((t,n)=>{e.file(t,n)})])).flat()},xe=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(be(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()},Se=e=>Object.entries(e).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}),ve=({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},Ae=({value:e,min:t,max:n,velocity:r,deltaTime:a,friction:l=.002,minVelocity:i=.01})=>{if(Math.abs(r)<i)return null;const o=ve({delta:r*a,value:e,min:t,max:n});return null===o?null:{value:o,velocity:r*Math.exp(-l*a)}},Me=(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),Oe=(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}}},ke=["INPUT","SELECT","TEXTAREA","BUTTON","A"],Ee=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 n=e.getAttribute("tabindex");return"-1"!==n&&(ke.includes(e.tagName)?!ie(e)||""!==e.href:!!oe(e)||null!==n)},Te=e=>Array.from(e.querySelectorAll("*")).filter(Ee),Xe=(e,t=null,{wrap:n=!0,getNextIndex:r}={})=>{const a=document.activeElement,l=t??a?.parentElement;if(!a||!l)return;const i=Te(l);if(0===i.length)return;const o=i.indexOf(a);if(-1===o)return;let s;r?s=r(o,e,i):"next"===e?(s=o+1,s>=i.length&&(s=n?0:null)):(s=o-1,s<0&&(s=n?i.length-1:null)),null!==s&&i[s]?.focus()},_e=()=>{if("undefined"==typeof window||!window.localStorage)return!1;try{return window.localStorage.getItem("__non_existing_key__"),!0}catch{return!1}},Pe=()=>{if(!_e())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}};
|
|
8019
8022
|
//# sourceMappingURL=index.mjs.map
|
|
8020
8023
|
|
|
8021
8024
|
/***/ },
|
|
@@ -12674,9 +12677,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12674
12677
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
12675
12678
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
12676
12679
|
/* harmony import */ var _react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @react-hive/honey-utils */ "./node_modules/@react-hive/honey-utils/dist/index.mjs");
|
|
12677
|
-
/* harmony import */ var
|
|
12678
|
-
/* harmony import */ var
|
|
12679
|
-
/* harmony import */ var
|
|
12680
|
+
/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.ts");
|
|
12681
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers */ "./src/helpers/index.ts");
|
|
12682
|
+
/* harmony import */ var _HoneyFlex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HoneyFlex */ "./src/components/HoneyFlex/index.ts");
|
|
12680
12683
|
|
|
12681
12684
|
|
|
12682
12685
|
|
|
@@ -12706,7 +12709,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12706
12709
|
* ```
|
|
12707
12710
|
*/
|
|
12708
12711
|
const HoneyOverlay = ({ ref, children, active, overlayId, onDeactivate, ...props }) => {
|
|
12709
|
-
const overlay = (0,
|
|
12712
|
+
const overlay = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useRegisterHoneyOverlay)(active, {
|
|
12710
12713
|
id: overlayId,
|
|
12711
12714
|
onKeyUp: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(keyCode => {
|
|
12712
12715
|
if (keyCode === 'Escape') {
|
|
@@ -12714,8 +12717,8 @@ const HoneyOverlay = ({ ref, children, active, overlayId, onDeactivate, ...props
|
|
|
12714
12717
|
}
|
|
12715
12718
|
}, [onDeactivate]),
|
|
12716
12719
|
});
|
|
12717
|
-
const mergedRef = (0,
|
|
12718
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
12720
|
+
const mergedRef = (0,_helpers__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)(overlay?.setContainerRef, ref);
|
|
12721
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HoneyFlex__WEBPACK_IMPORTED_MODULE_5__.HoneyFlex, { ref: mergedRef, inert: !active, ...props, children: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_2__.invokeIfFunction)(children, {
|
|
12719
12722
|
overlay,
|
|
12720
12723
|
deactivateOverlay: onDeactivate,
|
|
12721
12724
|
}) }));
|
|
@@ -13715,7 +13718,7 @@ const mergeRefs = (...refs) => value => {
|
|
|
13715
13718
|
"use strict";
|
|
13716
13719
|
__webpack_require__.r(__webpack_exports__);
|
|
13717
13720
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13718
|
-
/* harmony export */
|
|
13721
|
+
/* harmony export */ resolveAxisTranslate: () => (/* reexport safe */ _use_honey_synthetic_scroll__WEBPACK_IMPORTED_MODULE_8__.resolveAxisTranslate),
|
|
13719
13722
|
/* harmony export */ useHoneyDocumentKeyUpHandler: () => (/* reexport safe */ _use_honey_document_key_up_handler__WEBPACK_IMPORTED_MODULE_3__.useHoneyDocumentKeyUpHandler),
|
|
13720
13723
|
/* harmony export */ useHoneyDrag: () => (/* reexport safe */ _use_honey_drag__WEBPACK_IMPORTED_MODULE_2__.useHoneyDrag),
|
|
13721
13724
|
/* harmony export */ useHoneyLayout: () => (/* reexport safe */ _use_honey_layout__WEBPACK_IMPORTED_MODULE_4__.useHoneyLayout),
|
|
@@ -14309,7 +14312,7 @@ const useHoneySyntheticScrollY = (options) => (0,_use_honey_synthetic_scroll__WE
|
|
|
14309
14312
|
"use strict";
|
|
14310
14313
|
__webpack_require__.r(__webpack_exports__);
|
|
14311
14314
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14312
|
-
/* harmony export */
|
|
14315
|
+
/* harmony export */ resolveAxisTranslate: () => (/* binding */ resolveAxisTranslate),
|
|
14313
14316
|
/* harmony export */ useHoneySyntheticScroll: () => (/* binding */ useHoneySyntheticScroll)
|
|
14314
14317
|
/* harmony export */ });
|
|
14315
14318
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
@@ -14321,22 +14324,53 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14321
14324
|
|
|
14322
14325
|
|
|
14323
14326
|
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
* and determines whether movement is allowed within bounds.
|
|
14327
|
-
*
|
|
14328
|
-
* @returns The next translate value, or `null` if movement is not allowed.
|
|
14329
|
-
*/
|
|
14330
|
-
const applyAxisScroll = ({ delta, currentTranslate, containerSize, overflowSize, overscrollPct, }) => {
|
|
14331
|
-
if (overflowSize <= 0 || delta === 0) {
|
|
14327
|
+
const resolveAxisTranslate = ({ delta, translate, containerSize, overflowSize, overscrollPct, }) => {
|
|
14328
|
+
if (overflowSize <= 0) {
|
|
14332
14329
|
return null;
|
|
14333
14330
|
}
|
|
14334
14331
|
const threshold = containerSize * (overscrollPct / 100);
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14332
|
+
return (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.resolveBoundedDelta)({
|
|
14333
|
+
delta,
|
|
14334
|
+
value: translate,
|
|
14335
|
+
min: -(overflowSize + threshold),
|
|
14336
|
+
max: threshold,
|
|
14337
|
+
});
|
|
14338
|
+
};
|
|
14339
|
+
const applyScrollDelta = ({ axis, container, deltaX, deltaY, overscrollPct, }) => {
|
|
14340
|
+
const { translateX, translateY } = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.parse2DMatrix)(container);
|
|
14341
|
+
let nextX = translateX;
|
|
14342
|
+
let nextY = translateY;
|
|
14343
|
+
let shouldScroll = false;
|
|
14344
|
+
if (axis === 'x' || axis === 'both') {
|
|
14345
|
+
const next = resolveAxisTranslate({
|
|
14346
|
+
delta: deltaX,
|
|
14347
|
+
translate: translateX,
|
|
14348
|
+
containerSize: container.clientWidth,
|
|
14349
|
+
overflowSize: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.getXOverflowWidth)(container),
|
|
14350
|
+
overscrollPct,
|
|
14351
|
+
});
|
|
14352
|
+
if (next !== null) {
|
|
14353
|
+
nextX = next;
|
|
14354
|
+
shouldScroll = true;
|
|
14355
|
+
}
|
|
14356
|
+
}
|
|
14357
|
+
if (axis === 'y' || axis === 'both') {
|
|
14358
|
+
const next = resolveAxisTranslate({
|
|
14359
|
+
delta: deltaY,
|
|
14360
|
+
translate: translateY,
|
|
14361
|
+
containerSize: container.clientHeight,
|
|
14362
|
+
overflowSize: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.getYOverflowHeight)(container),
|
|
14363
|
+
overscrollPct,
|
|
14364
|
+
});
|
|
14365
|
+
if (next !== null) {
|
|
14366
|
+
nextY = next;
|
|
14367
|
+
shouldScroll = true;
|
|
14368
|
+
}
|
|
14369
|
+
}
|
|
14370
|
+
if (shouldScroll) {
|
|
14371
|
+
container.style.transform = `translate(${nextX}px, ${nextY}px)`;
|
|
14372
|
+
}
|
|
14373
|
+
return shouldScroll;
|
|
14340
14374
|
};
|
|
14341
14375
|
/**
|
|
14342
14376
|
* Enables synthetic scrolling for a container using pointer-based drag gestures.
|
|
@@ -14360,8 +14394,11 @@ const applyAxisScroll = ({ delta, currentTranslate, containerSize, overflowSize,
|
|
|
14360
14394
|
*
|
|
14361
14395
|
* @returns A ref that must be attached to the scrollable container element.
|
|
14362
14396
|
*/
|
|
14363
|
-
const useHoneySyntheticScroll = ({ axis = 'both', overscrollPct = 0, onStartDrag, onEndDrag, resetOnResize = true, } = {}) => {
|
|
14364
|
-
const
|
|
14397
|
+
const useHoneySyntheticScroll = ({ axis = 'both', overscrollPct = 0, onStartDrag, onEndDrag, resetOnResize = true, enablePointerScroll = true, } = {}) => {
|
|
14398
|
+
const containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
14399
|
+
const handleOnStartDrag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (...args) => {
|
|
14400
|
+
return onStartDrag?.(...args) ?? true;
|
|
14401
|
+
}, [onStartDrag]);
|
|
14365
14402
|
/**
|
|
14366
14403
|
* Handles drag movement and applies clamped translation along the enabled axis or axes.
|
|
14367
14404
|
*
|
|
@@ -14370,58 +14407,67 @@ const useHoneySyntheticScroll = ({ axis = 'both', overscrollPct = 0, onStartDrag
|
|
|
14370
14407
|
* - Compute the candidate translate value from the drag delta.
|
|
14371
14408
|
* - Clamp movement within calculated min / max bounds.
|
|
14372
14409
|
*/
|
|
14373
|
-
const
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
|
|
14383
|
-
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
}
|
|
14390
|
-
}
|
|
14391
|
-
if (axis === 'y' || axis === 'both') {
|
|
14392
|
-
const next = applyAxisScroll({
|
|
14393
|
-
delta: deltaY,
|
|
14394
|
-
currentTranslate: translateY,
|
|
14395
|
-
containerSize: scrollableContainer.clientHeight,
|
|
14396
|
-
overflowSize: (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.getYOverflowHeight)(scrollableContainer),
|
|
14397
|
-
overscrollPct,
|
|
14398
|
-
});
|
|
14399
|
-
if (next !== null) {
|
|
14400
|
-
nextY = next;
|
|
14401
|
-
shouldScroll = true;
|
|
14402
|
-
}
|
|
14403
|
-
}
|
|
14404
|
-
// Apply transform only when at least one axis was updated
|
|
14405
|
-
if (shouldScroll) {
|
|
14406
|
-
scrollableContainer.style.transform = `translate(${nextX}px, ${nextY}px)`;
|
|
14407
|
-
}
|
|
14408
|
-
return shouldScroll;
|
|
14409
|
-
}, [overscrollPct]);
|
|
14410
|
-
(0,_use_honey_drag__WEBPACK_IMPORTED_MODULE_2__.useHoneyDrag)(scrollableContainerRef, {
|
|
14411
|
-
onStartDrag,
|
|
14412
|
-
onMoveDrag,
|
|
14413
|
-
onEndDrag,
|
|
14410
|
+
const handleOnMoveDrag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(container => async ({ deltaX, deltaY }) => {
|
|
14411
|
+
return applyScrollDelta({
|
|
14412
|
+
container,
|
|
14413
|
+
deltaX,
|
|
14414
|
+
deltaY,
|
|
14415
|
+
axis,
|
|
14416
|
+
overscrollPct,
|
|
14417
|
+
});
|
|
14418
|
+
}, [axis, overscrollPct]);
|
|
14419
|
+
const handleOnEndDrag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async (...args) => {
|
|
14420
|
+
onEndDrag?.(...args);
|
|
14421
|
+
}, [axis, overscrollPct, onEndDrag]);
|
|
14422
|
+
(0,_use_honey_drag__WEBPACK_IMPORTED_MODULE_2__.useHoneyDrag)(containerRef, {
|
|
14423
|
+
onStartDrag: handleOnStartDrag,
|
|
14424
|
+
onMoveDrag: handleOnMoveDrag,
|
|
14425
|
+
onEndDrag: handleOnEndDrag,
|
|
14414
14426
|
});
|
|
14415
14427
|
const resizeHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(() => {
|
|
14416
|
-
const
|
|
14417
|
-
if (
|
|
14418
|
-
|
|
14428
|
+
const container = containerRef.current;
|
|
14429
|
+
if (container) {
|
|
14430
|
+
container.style.removeProperty('transform');
|
|
14419
14431
|
}
|
|
14420
14432
|
}, []);
|
|
14421
14433
|
(0,_use_honey_resize__WEBPACK_IMPORTED_MODULE_3__.useHoneyResize)(resizeHandler, {
|
|
14422
14434
|
enabled: resetOnResize,
|
|
14423
14435
|
});
|
|
14424
|
-
|
|
14436
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
14437
|
+
const container = containerRef.current;
|
|
14438
|
+
if (!container) {
|
|
14439
|
+
return;
|
|
14440
|
+
}
|
|
14441
|
+
container.style.overscrollBehavior = 'contain';
|
|
14442
|
+
container.style.touchAction = 'none';
|
|
14443
|
+
const handleOnWheel = (event) => {
|
|
14444
|
+
const { deltaX, deltaY } = (0,_react_hive_honey_utils__WEBPACK_IMPORTED_MODULE_1__.resolveAxisDelta)({
|
|
14445
|
+
deltaX: event.deltaX,
|
|
14446
|
+
deltaY: event.deltaY,
|
|
14447
|
+
}, axis);
|
|
14448
|
+
const didScroll = applyScrollDelta({
|
|
14449
|
+
container,
|
|
14450
|
+
deltaX,
|
|
14451
|
+
deltaY,
|
|
14452
|
+
axis,
|
|
14453
|
+
overscrollPct,
|
|
14454
|
+
});
|
|
14455
|
+
if (didScroll) {
|
|
14456
|
+
event.preventDefault();
|
|
14457
|
+
}
|
|
14458
|
+
};
|
|
14459
|
+
if (enablePointerScroll) {
|
|
14460
|
+
container.addEventListener('wheel', handleOnWheel, { passive: false });
|
|
14461
|
+
}
|
|
14462
|
+
return () => {
|
|
14463
|
+
container.style.removeProperty('overscroll-behavior');
|
|
14464
|
+
container.style.removeProperty('touch-action');
|
|
14465
|
+
if (enablePointerScroll) {
|
|
14466
|
+
container.removeEventListener('wheel', handleOnWheel);
|
|
14467
|
+
}
|
|
14468
|
+
};
|
|
14469
|
+
}, [enablePointerScroll]);
|
|
14470
|
+
return containerRef;
|
|
14425
14471
|
};
|
|
14426
14472
|
|
|
14427
14473
|
|
|
@@ -15192,7 +15238,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15192
15238
|
/* harmony export */ HoneyPopupContext: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.HoneyPopupContext),
|
|
15193
15239
|
/* harmony export */ HoneyStatusContent: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.HoneyStatusContent),
|
|
15194
15240
|
/* harmony export */ __DEV__: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_1__.__DEV__),
|
|
15195
|
-
/* harmony export */ applyAxisScroll: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.applyAxisScroll),
|
|
15196
15241
|
/* harmony export */ applyBreakpointStyles: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.applyBreakpointStyles),
|
|
15197
15242
|
/* harmony export */ bpMedia: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.bpMedia),
|
|
15198
15243
|
/* harmony export */ createStyles: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.createStyles),
|
|
@@ -15202,6 +15247,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15202
15247
|
/* harmony export */ getHoneyListItemId: () => (/* reexport safe */ _components__WEBPACK_IMPORTED_MODULE_3__.getHoneyListItemId),
|
|
15203
15248
|
/* harmony export */ honeyVisibilityTransitionEffect: () => (/* reexport safe */ _effects__WEBPACK_IMPORTED_MODULE_8__.honeyVisibilityTransitionEffect),
|
|
15204
15249
|
/* harmony export */ mergeRefs: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.mergeRefs),
|
|
15250
|
+
/* harmony export */ resolveAxisTranslate: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_5__.resolveAxisTranslate),
|
|
15205
15251
|
/* harmony export */ resolveScreenState: () => (/* reexport safe */ _helpers__WEBPACK_IMPORTED_MODULE_7__.resolveScreenState),
|
|
15206
15252
|
/* harmony export */ resolveSpacing: () => (/* binding */ resolveSpacing),
|
|
15207
15253
|
/* harmony export */ searchFlattenedItems: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_6__.searchFlattenedItems),
|