{"_id":"@aethex.os/hooks","_rev":"4-08f97e8d490e70b7badff0aa3028a571","name":"@aethex.os/hooks","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@aethex.os/hooks","version":"1.0.0","keywords":["aethex","react","hooks","touch","gestures","swipe","offline","sync","metaverse"],"author":{"name":"AeThex Corporation"},"license":"MIT","_id":"@aethex.os/hooks@1.0.0","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"homepage":"https://aethex.dev","bugs":{"url":"https://github.com/AeThex-Corporation/AeThex-OS/issues"},"dist":{"shasum":"c7dac59ca90ebe4a3726034d5d7d66212c051670","tarball":"https://registry.npmjs.org/@aethex.os/hooks/-/hooks-1.0.0.tgz","fileCount":13,"integrity":"sha512-ZhQAPOH2PyHKIrPbZRA/asQ/yzQ9pSbG6iNyTVRWFNmbuIrV8kB5C+RKCCMFTa4laA3wIGhBfxrDNfJpXSo71w==","signatures":[{"sig":"MEQCIGHthALxfmfBhxHVqHVkc5/u9p0hsg4V5+H5XFKtholWAiBd1Im49RRQ4BdnbwCQXUI5FyTDmYLJtiK6JjHlhsrKWA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18558},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b094d5c032765a30612c2348ce0356d3a50d9feb","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"repository":{"url":"git+https://github.com/AeThex-Corporation/AeThex-OS.git","type":"git","directory":"packages/aethex-hooks"},"_npmVersion":"11.12.1","description":"AeThex React hooks — touch gestures (swipe, pinch, double-tap, long-press) and offline sync queue","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@types/react":"^18.0.0"},"peerDependencies":{"react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hooks_1.0.0_1777697671845_0.6700420030839023","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@aethex.os/hooks","version":"1.1.0","keywords":["aethex","react","hooks","touch","gestures","swipe","offline","sync","metaverse"],"author":{"name":"AeThex Corporation"},"license":"MIT","_id":"@aethex.os/hooks@1.1.0","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"homepage":"https://aethex.dev","bugs":{"url":"https://github.com/AeThex-Corporation/AeThex-OS/issues"},"dist":{"shasum":"31cf4baba4e5227e84ff7ce5c6ba80b7d6f55928","tarball":"https://registry.npmjs.org/@aethex.os/hooks/-/hooks-1.1.0.tgz","fileCount":25,"integrity":"sha512-sf7xj/ABok1YJftxdpqccaAKfKiUu9a5jqr2p5G1TfYPtdF7XaXmKOQxCLB3oFxdmmgvxsRZHQnNrCDWfSwUKQ==","signatures":[{"sig":"MEYCIQDP8USaUUsMfSkHi8iHh3GuLr861bVZEbx4XDeq5kMibAIhAM6Y3N0HplMBTDvWCagRGNLCXd5zEL5Y3TtpPrsZ2szE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31362},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b094d5c032765a30612c2348ce0356d3a50d9feb","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"repository":{"url":"git+https://github.com/AeThex-Corporation/AeThex-OS.git","type":"git","directory":"packages/aethex-hooks"},"_npmVersion":"11.12.1","description":"AeThex React hooks — touch gestures (swipe, pinch, double-tap, long-press) and offline sync queue","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@types/react":"^18.0.0"},"peerDependencies":{"react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hooks_1.1.0_1777698342356_0.08612036889451291","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@aethex.os/hooks","version":"1.1.1","keywords":["aethex","react","hooks","touch","gestures","swipe","offline","sync","metaverse"],"author":{"name":"AeThex Corporation"},"license":"MIT","_id":"@aethex.os/hooks@1.1.1","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"homepage":"https://aethex.dev","bugs":{"url":"https://github.com/AeThex-Corporation/AeThex-OS/issues"},"dist":{"shasum":"83c188deb175340f58bbe1b6b53c5727c7637397","tarball":"https://registry.npmjs.org/@aethex.os/hooks/-/hooks-1.1.1.tgz","fileCount":26,"integrity":"sha512-eMQRfmLiOIY3LyB1sLQGfyqLqFmOgb2dDNTTIM1GnmLF6JbACyt/RWm+Djjitf5GVNtIuOXbHNCcNarc/rFwig==","signatures":[{"sig":"MEUCIQCNP66ZKw43kCuMMkFNcTs8iSs8OoCpcFbrUYW3vbf79wIgYJfNNhPijEptm/eMC2N0aVOL7U2vxfYMFtn+cXgN9nU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33611},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b094d5c032765a30612c2348ce0356d3a50d9feb","scripts":{"dev":"tsc --watch","build":"tsc"},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"repository":{"url":"git+https://github.com/AeThex-Corporation/AeThex-OS.git","type":"git","directory":"packages/aethex-hooks"},"_npmVersion":"11.12.1","description":"AeThex React hooks — touch gestures (swipe, pinch, double-tap, long-press) and offline sync queue","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0","@types/react":"^18.0.0"},"peerDependencies":{"react":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hooks_1.1.1_1777932470189_0.04596125863088085","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@aethex.os/hooks","version":"1.1.2","description":"AeThex React hooks — touch gestures (swipe, pinch, double-tap, long-press) and offline sync queue","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch"},"keywords":["aethex","react","hooks","touch","gestures","swipe","offline","sync","metaverse"],"author":{"name":"AeThex Corporation"},"license":"MIT","homepage":"https://aethex.dev/docs","repository":{"type":"git","url":"git+https://git.aethex.tech/Labs/os.git","directory":"packages/aethex-hooks"},"peerDependencies":{"react":">=17.0.0"},"devDependencies":{"@types/node":"^20.0.0","@types/react":"^18.0.0","typescript":"^5.3.0"},"engines":{"node":">=18.0.0"},"bugs":{"url":"https://git.aethex.tech/Labs/os/issues"},"_id":"@aethex.os/hooks@1.1.2","gitHead":"6c77abd6440deb925777f64998d4c67a398236e0","_nodeVersion":"22.22.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-JpT4cAe03KhOBTAoS99ae1xf+SIeZld20R3ZXd2B4Ik6wDpcRRlGxkhKXQaHIv2R1B06FzXYbMqMueUw8aDO3w==","shasum":"6c60ab69c4f9e964a53bc6cbae47dfe47800d832","tarball":"https://registry.npmjs.org/@aethex.os/hooks/-/hooks-1.1.2.tgz","fileCount":26,"unpackedSize":33673,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA3aHxbP3kjqvR+CR6pLk2BXUJMKUibakN74dp69i/vvAiEA0XU3s/1TZAp75J/sf0mDYHhkqGBz6j+DMQYI9CdOo1Q="}]},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"directories":{},"maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hooks_1.1.2_1783400205091_0.7251218190418225"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T04:54:31.778Z","modified":"2026-07-07T04:56:45.364Z","1.0.0":"2026-05-02T04:54:31.974Z","1.1.0":"2026-05-02T05:05:42.498Z","1.1.1":"2026-05-04T22:07:50.327Z","1.1.2":"2026-07-07T04:56:45.243Z"},"bugs":{"url":"https://git.aethex.tech/Labs/os/issues"},"author":{"name":"AeThex Corporation"},"license":"MIT","homepage":"https://aethex.dev/docs","keywords":["aethex","react","hooks","touch","gestures","swipe","offline","sync","metaverse"],"repository":{"type":"git","url":"git+https://git.aethex.tech/Labs/os.git","directory":"packages/aethex-hooks"},"description":"AeThex React hooks — touch gestures (swipe, pinch, double-tap, long-press) and offline sync queue","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"readme":"# @aethex.os/hooks\n\nReact hooks for touch gestures, offline sync, file picking, clipboard, and native sharing. No Capacitor required — pure browser APIs.\n\n## Install\n\n```bash\nnpm install @aethex.os/hooks\n```\n\n## Hooks\n\n### useTouchGestures\n\nSwipe, pinch, double-tap, and long-press on any element (or the whole document).\n\n```tsx\nimport { useTouchGestures } from '@aethex.os/hooks';\n\nfunction Card() {\n  const ref = useRef<HTMLDivElement>(null);\n\n  useTouchGestures({\n    onSwipeLeft:  () => navigate('next'),\n    onSwipeRight: () => navigate('prev'),\n    onDoubleTap:  () => like(),\n    onLongPress:  () => openMenu(),\n    onPinch:      (scale) => setZoom(scale),\n  }, ref);\n\n  return <div ref={ref}>...</div>;\n}\n```\n\n### useOfflineSync\n\nQueue mutations while offline, flush them automatically when connectivity returns.\n\n```tsx\nimport { useOfflineSync } from '@aethex.os/hooks';\n\nfunction App() {\n  const { isOnline, addToQueue, isSyncing } = useOfflineSync({\n    syncUrl: '/api/sync', // your endpoint\n  });\n\n  const save = () => {\n    addToQueue('profile', 'update', { bio: 'new bio' });\n    // queued immediately, synced when online\n  };\n\n  return <button onClick={save}>{isOnline ? 'Save' : 'Save (offline)'}</button>;\n}\n```\n\n### useDeviceFilePicker\n\n```tsx\nimport { useDeviceFilePicker } from '@aethex.os/hooks';\n\nfunction Upload() {\n  const { pickFile, file } = useDeviceFilePicker({ accept: 'image/*' });\n\n  return (\n    <>\n      <button onClick={pickFile}>Pick image</button>\n      {file && <img src={file.dataUrl} />}\n    </>\n  );\n}\n```\n\n### useClipboard\n\n```tsx\nimport { useClipboard } from '@aethex.os/hooks';\n\nfunction CopyButton({ text }: { text: string }) {\n  const { copy, copied } = useClipboard();\n  return <button onClick={() => copy(text)}>{copied ? 'Copied!' : 'Copy'}</button>;\n}\n```\n\n### useShare\n\n```tsx\nimport { useShare } from '@aethex.os/hooks';\n\nfunction ShareButton() {\n  const { share, isSupported } = useShare();\n\n  return (\n    <button onClick={() => share({ title: 'Check this out', url: window.location.href })}>\n      {isSupported ? 'Share' : 'Copy link'}\n    </button>\n  );\n}\n```\n\n## Part of the @aethex.os ecosystem\n\nSee [@aethex.os/core](https://npmjs.com/package/@aethex.os/core) for the full package list.\n","readmeFilename":"README.md"}