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

package.cjs.react-utils.useKeyboardShortcutsPaneState.useKeyboardShortcutsPaneState.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":"useKeyboardShortcutsPaneState.js","names":["_zustand","require","_shallow","useKeyboardShortcutsStore","create","set","isOpen","setIsOpen","arg","state","useKeyboardShortcutsPaneState","_ref","shallow","_default","exports"],"sources":["../../../../src/react-utils/useKeyboardShortcutsPaneState/useKeyboardShortcutsPaneState.js"],"sourcesContent":["import { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst useKeyboardShortcutsStore = create(set => ({\n  isOpen: false,\n\n  setIsOpen: arg => {\n    if (typeof arg === \"function\") {\n      set(state => ({ isOpen: arg(state.isOpen) }));\n    } else {\n      set({ isOpen: arg });\n    }\n  },\n}));\n\nconst useKeyboardShortcutsPaneState = () =>\n  useKeyboardShortcutsStore(\n    ({ isOpen, setIsOpen }) => [isOpen, setIsOpen],\n    shallow\n  );\n\nexport default useKeyboardShortcutsPaneState;\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAME,yBAAyB,GAAG,IAAAC,eAAM,EAAC,UAAAC,GAAG;EAAA,OAAK;IAC/CC,MAAM,EAAE,KAAK;IAEbC,SAAS,EAAE,SAAAA,UAAAC,GAAG,EAAI;MAChB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BH,GAAG,CAAC,UAAAI,KAAK;UAAA,OAAK;YAAEH,MAAM,EAAEE,GAAG,CAACC,KAAK,CAACH,MAAM;UAAE,CAAC;QAAA,CAAC,CAAC;MAC/C,CAAC,MAAM;QACLD,GAAG,CAAC;UAAEC,MAAM,EAAEE;QAAI,CAAC,CAAC;MACtB;IACF;EACF,CAAC;AAAA,CAAC,CAAC;AAEH,IAAME,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAA;EAAA,OACjCP,yBAAyB,CACvB,UAAAQ,IAAA;IAAA,IAAGL,MAAM,GAAAK,IAAA,CAANL,MAAM;MAAEC,SAAS,GAAAI,IAAA,CAATJ,SAAS;IAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;EAAA,GAC9CK,gBAAO,CACR;AAAA;AAAC,IAAAC,QAAA,GAEWH,6BAA6B;AAAAI,OAAA,cAAAD,QAAA"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy