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

package.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":["create","shallow","useKeyboardShortcutsStore","set","isOpen","setIsOpen","arg","state","useKeyboardShortcutsPaneState","_ref"],"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,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,IAAMC,yBAAyB,GAAGF,MAAM,CAAC,UAAAG,GAAG;EAAA,OAAK;IAC/CC,MAAM,EAAE,KAAK;IAEbC,SAAS,EAAE,SAAXA,SAASA,CAAEC,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,OACjCN,yBAAyB,CACvB,UAAAO,IAAA;IAAA,IAAGL,MAAM,GAAAK,IAAA,CAANL,MAAM;MAAEC,SAAS,GAAAI,IAAA,CAATJ,SAAS;IAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;EAAA,GAC9CJ,OACF,CAAC;AAAA;AAEH,eAAeO,6BAA6B","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy