All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.react-utils.useBreakpoints.index.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"index.js","names":["_react","require","_ramda","_utils","useBreakpoints","breakpointOverrides","getSnapshot","getCurrentSize","window","currentSize","useSyncExternalStore","subscribe","isSize","equals","_default","exports"],"sources":["../../../../src/react-utils/useBreakpoints/index.js"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\n\nimport { equals } from \"ramda\";\n\nimport { getCurrentSize, subscribe } from \"./utils\";\n\nconst useBreakpoints = breakpointOverrides => {\n  const getSnapshot = () => getCurrentSize(window, breakpointOverrides);\n  const currentSize = useSyncExternalStore(subscribe, getSnapshot);\n\n  return { currentSize, isSize: equals(currentSize) };\n};\n\nexport default useBreakpoints;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAMG,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,mBAAmB,EAAI;EAC5C,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA;IAAA,OAAS,IAAAC,qBAAc,EAACC,MAAM,EAAEH,mBAAmB,CAAC;EAAA;EACrE,IAAMI,WAAW,GAAG,IAAAC,2BAAoB,EAACC,gBAAS,EAAEL,WAAW,CAAC;EAEhE,OAAO;IAAEG,WAAW,EAAXA,WAAW;IAAEG,MAAM,EAAE,IAAAC,aAAM,EAACJ,WAAW;EAAE,CAAC;AACrD,CAAC;AAAC,IAAAK,QAAA,GAEaV,cAAc;AAAAW,OAAA,cAAAD,QAAA"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy