{"_id":"react-earthstar","_rev":"75-c38b847b91752b5033bc73c5791e328c","name":"react-earthstar","dist-tags":{"preview":"1.0.0-preview.17","latest":"4.0.0","beta":"4.0.0-beta.4","alpha":"4.0.0-alpha.6","@alpha":"3.0.1-alpha.6"},"versions":{"1.0.0-preview.0":{"version":"1.0.0-preview.0","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html"},"peerDependencies":{},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@testing-library/react-hooks":"^3.4.2","earthstar":"^5.4.0","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"gitHead":"d717b58f24a9dcc5c4e21702497be154d99bdcf5","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Mby44bwO5NT2G/48PQhcXSENyShS+jnqQWcTot6gHTqFvkrKmOx6FuEP22S3ZDfvisv4o/OW99Td9w9cDRgsAw==","shasum":"0ad130251478a8a3623376baf43fdc6aacb335bc","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.0.tgz","fileCount":46,"unpackedSize":142242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfitpdCRA9TVsSAnZWagAALtMP/2yk3ILE6FuPHWxpGHPJ\napjib15smaIya/vhgY+JHehtjezHWwFAoJ9XhxFeG9tcwrMbePNbMOZCqHmr\ngLTzeTZjkxLXSaWi5jxaJEjf1hw0SzQeKuqCZR05s7RyYBtAScFNerQwlgJ8\nyVZgJKnp9BJ/iHnI/ftz9niq6bOvcjTU+hQHBXf1CZdkTu3AmY72mRcKA4Kz\nz3RYdA6e4J+RRMXLZNqTXq9BVoqw/y4Z4RwX+GVFukA54r5K0WPGyb54JfP+\npIzVS+m1bxJP1Nlr4pI9+w9s6rWwNPJRtTt7xG0f2eseNLfGj8ngmqdgZl2S\nSqCN+UfKcTb1XpJHP0bJxHU+VPOdHI2HMWIJfJbfYYVxiHGyCwgc8aPC03Vu\nR5ZQh2Rbg+HhmNgjtWK2UDFq//8P5MzR0KKxtNVquH9V+Ft4lC7AZOWkKjOi\nxwkXKCesTphc+f/BoS2hzJHg7uihCevZR8ChN0LBJ0R69BzFsyntqTl1jtwp\nsBRvFJArpmpTG5NPa3Ti4oWWTLqY2N//31vJKPwgsbaT2UWr1pvRXClON1Wr\nWRahJV69fiZfJxgrwlvRuqXLWDXA5snpk/aluYcUAcEHvNP1jTjMFKVWGcIL\nTaCylpTT7xhLM6lEG09CrmynKbWqS2h9EA4bVik0HNYzVjjpSBLLG3Lxt8XX\nNiU+\r\n=6Ana\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/dFK/Maz5O5ujDGNSWNWeo2U3A1W28w5ie0DKoHVYKwIhANHzY0a2R+XKBEEeATWt0mxwFTn27jspfvR1k86o46P8"}]},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"}],"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.0_1602935389264_0.27249161482728823"},"_hasShrinkwrap":false},"1.0.0-preview.1":{"version":"1.0.0-preview.1","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html"},"peerDependencies":{},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@testing-library/react-hooks":"^3.4.2","earthstar":"^5.4.0","react":"^16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nadd(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"90ca261b3ce8e97d69033ae28ba3439cf887ccea","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-pqgpyC0ntlarlmgbAZM67IY/JqRwxtbQeKM9nNQ4e4lwlmROmh+uvjama6L5ofd/dTYQPrQj98t3dezf5xVh2A==","shasum":"1c84531fb6b410c5c4b7f021de268bb57bb81514","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.1.tgz","fileCount":46,"unpackedSize":142512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjCE5CRA9TVsSAnZWagAAQHgP/i8GbeGX5tgz9juadZBj\n2rX0sU1tU/vWu1TQ4T+5gB9lr/KF7fKTuEUzLf0zmoiWdQ5rKs5PAhVqQCMk\nhkL3dBjp7yk8JzUv0IsArbP3R2arodfIfy3q5b94J/j60o6ogBrukUx3Tg+R\n4/lUFYx0YOT3vNVeaIsHElNo3toofn+ckDxbwa+V3MQIgNNpIfwIurnLNyM3\n5nJGDgu/Vszzxntt2KhiISF3GakwBt9u4/WWBYZFwApjy5paxyZgVr+52jf/\nxINnds3ZJdRD63BRK1JSqXcR0TMk4rl/NF94cYB87FRjgdI831HJk0guWMj5\n+vyND3NQ53hwQu4YrSvjfn/rTAWhow64eYhZV3dJczFPb1YCWXYR8vgXf2+2\nX34dlup8XnS0/YLTb6yRow/Nkqz+LzgC5+4P+yaKmhJ4NyV6c2fiGAV67Q/l\n8Sja+nGdud3G4X/oKs+3ACqGcW0FYviF5dE5Ol7PszCPsjfzHsO5OzG6zGgb\njJ17EW3iCeqH0kz9Z6MlFqgSF+ZpjlawMD+NHOFWu3u2KBPgGVumJQnHhSRw\nuQ6zss+SfSJJhIyAeBq+NJmiP9MpmAS3uif4dgM13DNmihaTde77cXvQ0NCQ\nl/F1zVSziRabutv116VEwOtykAvf+e8rnnCP5+9gDRrVBNIMiDd8C4BT4Bq1\nnY37\r\n=85Ur\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3YKyqNZSDE928QjycZIj1Ng7E9LNIewTx+3m/fO1PPAIgFkAgM0Vg1Arq3aWgBkQRFIlsIITEA8utNNc/B7b9Bw0="}]},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.1_1603019064816_0.8858763219147043"},"_hasShrinkwrap":false},"1.0.0-preview.2":{"version":"1.0.0-preview.2","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html"},"peerDependencies":{"react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3","react-dom":"^16.13.1","react":"~16.13.1","react-test-renderer":"^16.13.1"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@testing-library/react-hooks":"^3.4.2","earthstar":"^5.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"1b59f14a1d53e7d5d83799824b0f800731d32dac","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-eV4+ri6jMWEpP8pMC6EnRFJYRkT3Oa9mxyhBOCqSKMzgLq+tmdSY3H6/Cjr9I12KMoQzhEKKkvOK3X/mRRHfWQ==","shasum":"ae2f144a54c3f3cb64439c54d8e8437e74ab2f4a","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.2.tgz","fileCount":46,"unpackedSize":142542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkBLVCRA9TVsSAnZWagAAruYP/ivwccFCrAL9stXyaC8O\nqj30pd141ycR7brzfb4Pvkpkfe9sn2EyqEHgoecMZiFbVCKlPoxSHDOjJfS4\n6GI2WCmN4nuNED+33/0GHNZ7TWvQH+sJq4Z6saD/hnUjOQogyweD/dGwK7We\nO76mVNY2vApNigeM5APq0X9+1Bfc7fBYF85SsRDy/16Yn6NAwPBW5t2kRiwF\nBBr8Uc+0aN9sU1kfRPiOFB7g3xhAwevumER9Nbf3I88fGbSbDP/HOCwNEDeC\nuaYOHBBGZsKEF8vnCqxtuQltfxlR9S+e1j7itLYuOHdrBMKaybPxlaUv6g5W\ng4kSexYFrnANFBgjagGdw5NpgoQwjEVSko1VAioEaA456+xTGvqcPi6/4x84\n0mSv+UXwJPjpp/57zv5sWp4l2FxDbRfQrqYUh+rvPVFFVf1/KdDyRHhMY7GH\n1wMjFMJ9hVyKJYgcvf8G1Kt67E5A8WOhnJavyJC3YUa6DaQxj9iJxBCuyX99\nvYWS+EO9R+WyPFADUeEi9qtc1pX7bcdrxAWjLb0qOTzeAiR7mcBrr400Grjr\nWUprd0sY4SJtZwmxqdcLfrZ6eJUHBck5Oyd5qoKtuekxXkhxL37nVxC22jRd\nmqiK50tb4QdQ8vr3CbVLW3LYvR7PXZfyyEFoOJwXurAzspIr5UF5/azT/tNv\nvhye\r\n=FHQB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVcC1u/lCu7v0+tKcI8hqnaCRNyro71AmGStjYK/EnCgIgaMXSbHXAGz4Jnnor152lx9FRqIEPX+rWvG4QHvxI6Vc="}]},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.2_1603277525052_0.34156398395216225"},"_hasShrinkwrap":false},"1.0.0-preview.3":{"version":"1.0.0-preview.3","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html"},"peerDependencies":{"react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@testing-library/react-hooks":"^3.4.2","earthstar":"^5.4.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"771fc7e2ecc76c107a4186dd55dcae4b13157e55","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-s4DoalYewDcL00rQjUJJsoo834F5mcT5mZS0ZtsBTtfVAOwsWqzCuQFmrwJDj3W4c9bENHBM9NXYa/Zko5qX3A==","shasum":"7465329856c80427eb181f658f3b9266d5df6065","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.3.tgz","fileCount":46,"unpackedSize":155541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkXCFCRA9TVsSAnZWagAAWJ8QAIi/SqQypnB9je2uNrL2\nFTpJcKgalM34Tz7yXgBGci0M5sbpBORkVRmKa8VKaz+Lq7bE2TaqCXlKHxq1\nF7PVZf13ZvOb5glV7CZCyDIIp92v8yI1BXbY/wVHfKIY/ezd7hhbKp88weEv\nWvhDcM7H5rhhUQAY7zt4yrawaNdg//zWA2kciYwx6ZynLRaFmdKw1HfrtF46\nsmocEjhHmXPDPRDX6DL5Rw3P//VmF4fZK76GhLdXMMY3MJbmH2SfADavh9tQ\n/IsqOQQ73OUCtlBz5JV+5hIk1HEni2+LHb/ByRE/N4rMPC4AF2+F7tHjPCJN\nYCWkYKs/m1fSmh9yz/kBxOjIHg2bIh9o66tVyPgu4idK0WJwgi9HNiccl1Hp\niT0ogkkGf59GpjTeloL9srQWCRThU9I03dNri36rI7tFVgbTUcpplyYsU6zI\nFr1kvZQedrSh0bsxFqgX4xiMjA8/TSgqFx300x7q96jFtaXUIeVhLaX6nrJu\n1ds10Vvqk1rZ4mAk3SI1zrrTFVRETeMiumk4H+N/yni+kIJmO7Kh59dvsF2R\n4ApdnWkE+1T07H8WSR29koDnzwDJgDjPPZZLB+ftoMWT3Gg1VatSq7253M9V\nzlcLqqBk2VqwQJbiNrF04+Kgjb2U3X298Ur15Q6IcBFFWheF+jEMzbGiT+hE\n1miQ\r\n=HUeZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbtY6ZEipeVM0Fsehx2IsXEVgyI8Vwv0r0rkAhjxY35wIgSiXF80z/XMzQbi1iImbTFsDpdBch9MUjKJLiRFajaUg="}]},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.3_1603367045050_0.231627139544329"},"_hasShrinkwrap":false},"1.0.0-preview.4":{"version":"1.0.0-preview.4","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@testing-library/react-hooks":"^3.4.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"bdcc95a6c323c1418ea7849e77b6c8937573c072","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.4","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-qnJR3aNkEDL9l60tT9Oge0VxU53GF550WShqvQm6S35rKoVY4oi1czoDs/wij4xJK4U/5NQU3NxWyZRalrokkA==","shasum":"f9c99f2e68fb7e25dc2657eaecb8a04d867dc612","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.4.tgz","fileCount":75,"unpackedSize":517450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrUrACRA9TVsSAnZWagAAsakP/jr0Y13hR1ri2pLU8XVF\nBW1mFmN46IuEQpAMCY/uM6JSWpEF/8XRK1kJN1DfggyX+X/OBn/ldx7A2oCg\nrXWyoQmg7oyihtAiuGLrWYHUTFz4EnFnP9KXtP1XLGMUZn5yD1Z85H3dyrcn\nVe6ezn+z2fjRxbOugWdZ1POTgWcXvT7qxlrg124Lqhg3lpsgY24vzCoZ3TAn\npFs8TU4Jf3MdCYIcBon5BD0Td+KjFxfhvKLE3clFpCdWjx4o0/P8553YP1dU\neEJcCTqVwTUbJ4D/ZEy6tXekg2l6I39GDFxZmoLH3DfrR4xNTL1Zp87G1upV\nsfZVdd7vwmkYtQB9Qy37p9ypcXtTf+ELjIDAJw/VOEBuDT/P6NJ98C4e6P46\nMN5qmfj3RUAEuiq5hhWNCbz62HhBzgmg3V/IO6RS/Qz2JFopQcf3EzRx+jBp\nvVbxx1F1+Tvv1qvL7D3E3DaRCRYsu36csLNMh5Si3ISEAHfjUUhsdk8fbpkL\nmbmD7lqXb4tSuHBhGNmbPQHhu2oVug0km3DKZZUMEKVJ0DY+ojXgupRfJt3V\nz6jE5h0iPSoycpCWOQ3zz1axg55Sfm5cP0HKhrL2VaSVGWPCL3Ll4kySA6Av\nqHR7VQ6GcrDzXgqnToSfHPuy8x6foFMSyX2eOs1gljmVwsXtbbmrdeFA3QSJ\nBI7G\r\n=PW4f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLFogbbeMG3OwbPUTV3YxxX6ZbmfTdxTDUnhzUTrZu5gIgO9z8QkZbLs9m1I7NdW5O1AuxNJkrZgQcpy/8MblfzyM="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.4_1605192383851_0.23280241141666136"},"_hasShrinkwrap":false},"1.0.0-preview.5":{"version":"1.0.0-preview.5","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@testing-library/react-hooks":"^3.4.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"e56c0b316f783ba72a542ea817482f4f6bfc4397","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.5","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-w531sCOCVPxppNu6NnKQaa/m12FRsvHqvhb+aXIcvTFtHE66L94Kgb331SjfZ8S1r5Uw8QAEdKF+/J/wiSxO/w==","shasum":"18caf75080a2fc28320077410a2ab30557561f2f","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.5.tgz","fileCount":75,"unpackedSize":517482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrUyeCRA9TVsSAnZWagAA4NsP/RyhveTd5vbjfZI718AI\nQ8D//kjqecWwAsuRWG65XGHcqi3UW+6N1b0keRn9cXDMdE157TKX74EZQKSu\nWOWXZNjNQF5Xtp+/F0G38JFDr9dpKyaqrNFP8IdDEbXFS0SNnc4bxYS0EL+3\n30NJ5WcCEZg3c8eXERUR5sTu6WSVn6boy5Uq29LNYRTXl7wS3Pec/RkNfXqD\nLrrbU7GzDLwD3kzQZkfcd9LDAjBGqB4mLiGfrcmsIJA8LzpFuKV7llWJy8FH\nipHOwbDQtzxA/8JSuWa6IC8lbuMJMM7UDC6gT/HRtfmb2IFUDUlrzmsLa7Ol\nl/VT589z87h5m8JZ5mgUVsTWZ8EGdfb3acsVjABqPC9y86P53jlqEWA/ekVi\n49JESRYdkFztArhcRgBbe9bMgTp19GM5hlrHrZq2rmht4EEUiCiXYM8fKaYw\n4YrdxtlPkr2atkeA9WD5pvl/SXkxJbUfEDVlWKSoSquH88g3/d0QAyREbsh2\n8SPPZ3ouh+pB+C+U3iISQMYQ9s1EMrPltJT6BMfUN+nGkwgk/e8grPJdkSnq\n5MDruW6cuQo7WC7NDi/UgSYQOYgI7i+nVn8HVf8r/3LTSBTd6ei9uJ25MgQk\nSfVcRzHX2ufKWQMDx2/C/DwyToD6UPRkEoJU5Eg1ExpRfyT+KOS1/i+J551A\nMktK\r\n=a4rY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIflvCI8UrGTSXuFDQNjQky20IqIM4fGp8mtS8zUbB/QIhANDw1Og6d40+66nHBBz71Pwh+69eZhT4dCtruc3YK1Gi"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.5_1605192861591_0.2751664467306931"},"_hasShrinkwrap":false},"1.0.0-preview.6":{"version":"1.0.0-preview.6","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3","@testing-library/react-hooks":"^3.4.2"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"e4506bf52c280cad888abd6a74f1e7cd26626313","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.6","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-fpY0tzD7e7goGqPLNxe9KNvCIhRMUPTwG8xrxGvx51K0M6dvJqyGLYX0crmlZkX+07NLQJiOVYQEuAHPAN4jeA==","shasum":"6bef9b19d7488d973f385c388b43c4dee72ae3c3","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.6.tgz","fileCount":75,"unpackedSize":529267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr+T7CRA9TVsSAnZWagAAQkEP/04ttYuIArHmxtqmrMZJ\ndGZb7NVjRLlN+u4M40d5PUDov9rcDHFYunRWx/0Wjg9V+tHAKjE0vdnLu+QK\njK8a/BxdbLRRQXyFXJWFeLVHk7Db2Ih1ET28vrRtAAXxDdf6JCEVMUYy/DcD\nI4S3/FRoFel2Y9Hlr1Bw5tgJx61H0lXSNRUrXuYOOtnjRSUNWn+D6o42dAtn\no+B4SxtMRerEjYwfKItJWwTDyL2pjgh5GX2WgmNyWSYnD8tp+/GmciyCHyj6\ngmprQ7KFtFXfRy+GkmRQk7fDisnUZEhZkvhdmNgmVahW/9J4yQYSSeZFNed4\nG6ZY8k0jgdKwBjDUH5kxAC22pQre2u1hSMtNZdq+kz+oPrhFtql5d/vhNGsN\n7siSZv9fLVCFzP09QgwYKclB42RqJRaCMN2LM+YDwQ4YizJ9zR8Comxikv98\nycZH1D9pesRYAto0JGZhJ4f8gQKsHuKP3tbUhVtNTQiLwEsScS/ucUvZCJb8\ntoMhid7Nk9sAEdpDj9pAI9qDo3m2Vs5+3QXFiHk6CjTJ+x1jgXKT0bV+IjPV\n5KYINEw4BFHYjdD4b6fXDaLXR9KhIRp/8nexw+V2tqHezJ/kHWuV+aereQld\nobvPAvqvVASvEKAT6dGlk0Fem0SDqwLoSO+6I02iRZLDBJb/YHs6xzZHHemX\n4BGQ\r\n=Vonw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWwmAY5pbAl6mIxpBsLyMjRT71704lVOmJTbSAVTNGXwIhALgJfuRYjUpzEhabwwz+HD7/tPQBeL30Z6Qr2qheVF2Y"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.6_1605362939249_0.7708131340729221"},"_hasShrinkwrap":false},"1.0.0-preview.7":{"version":"1.0.0-preview.7","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3","@testing-library/react-hooks":"^3.4.2"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"2ed7f5a1f4275a75744e8100a6d12d4045ce491e","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.7","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-VDHH1b+15kzskxIDtABxqhCC1qY9yOvQvaRtfWvjWS0/vkX+5WvbIB8c8+Bm6GolMuCK4d0ILp3Jbwv4smtv3Q==","shasum":"bdd2840b61c4ffbbac09c71dd8c0e3ab6b10e776","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.7.tgz","fileCount":75,"unpackedSize":538959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsTjTCRA9TVsSAnZWagAARvgQAI+u20gNuZfv+xLzLJXp\n0Uv1iObfptV49uORO4Fu8bzjTMrFZkSs0x2WPBsLEDq9IbchbdTQl/uN1MaM\nk3nhlAK71YM3ugQoV7F1ycY9OBNw7gO7Gbup0JV6AVIPlBMIvofjhwA8AX3m\nSBVQJ3TsEmTF0G1KN8LZL/mPpG7jx89nuNDb0sX+sBL/SExF39EbORwrGtbQ\nxbqPKZX/s5hTTzjlxO1a3H+jtlJmAiJRFUC60+iq3XQKm2yGl4sJSM55ZL3U\nnetmP5zuBBeC5qy+4mchjaIHrirLdHdvNErCaUfecZTZnikITvuZfpRy1kh3\nE+QgEvT073+Fif0DN18Wjv41DxLCtiRgabCOdtdahe5MQylpcZhiWqnavdqJ\ns0VihXaUrkXifQjguPl7i5s0YMma0zgOcC1kEGS5+u2AkDwo3U54+R182/cZ\n87gdjl7/46RKfeDygxqBkZxppsA6NVCeH9PvK8EMM8IMdUZ+DUHay0zNtK8J\nbSAdZZH0BspawpxTAt/zwELz2bJ+7ngDkIDvxcA+Vk/vTxMwAyZ+I6JayAPC\nY3BWqcQu3HuF1vbxDCl2EW/tNh/DxpL8MgD2sZiOSSioyW/i4VBtzB8VqdMC\nQhWMJIq5Kgn+weakT1H30MyHcr9tAP6dA7em8EOQuzECHv0Mk0jhYNA7QsDO\nTZOy\r\n=HpLB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD2ckooYxQyEiSKZhEE4KHdtwGBFbpJtDvWF7kjpg2JQIhANnS1dVwdCxUCDoDH5eN1g7vyYz3sEd0D5838Zg6719r"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.7_1605449938653_0.5299306780015243"},"_hasShrinkwrap":false},"1.0.0-preview.8":{"version":"1.0.0-preview.8","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/accordion":"^0.12.0","@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"3edb4eef7dc2ff3e4d5520bfb9bbae1af2e34ff9","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.8","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-JLVEBKAIqrVRSa32lxKiyUvNy3wk89eFs0BvYUbstw48TVNjYRAtkwJXRMHepGxcS9jA8pTCmnJ4ghWcdbTzvw==","shasum":"8110b64126499990d1833ce7ae5341b45684ebc8","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.8.tgz","fileCount":76,"unpackedSize":543239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwlj1CRA9TVsSAnZWagAA9GAP/0RNv3jP5TpcrEXKZxo7\nnrsEp9z0YqzKxxVAYL2YRslO2PWpXOkJ2KCS7Glu7m7pa6SzAPdnU1ZJSYDE\n9kNjOUa4RRg5EiPBGHTLnLJ8Z+7yXGL21T+fWjejud/BSa20BLfxXq32r1jG\nz2e1B04E0r7LcyrJT6nedzya2SgvdqQKvvDs+qBXC6ObxXOJ4TrbHOhfJrJw\nvrOukcRt8gKOVgfLlEszFJe4KJiB3hDawQ609HdWdTnkX50m1yqCw8PD0LP3\nqTB4WHnwo5v19fJh9Qc95VwEalwnUv2T6HWGAlnb1dk14KU9nigbNGdvFK93\n/PW32z/TSFzn7tbieqHGZdy89t21umZVSbMkkQvt0F1cyNfW6sQryif3DkCf\n9lFy2gsDQgMpQPLSTwqJLqj5xMlMwjNQF3qK44Ze+1+N22gjJsCRa+HTehXx\n+HX2SE01RV31CfEf3OQKmnbNgdZzphzfviMshtNjI//33meVHMKmz6WZr9US\nQGaelhZZDkzVyd4j3W7mv0pTka+i0sklRTRaOzn464EtFjytGqyYrAhkeNA1\ngqo+Oc8269xvqtN228u9p/BZyFnNxwQ7Fg0Fg22ZEkhTKtai8ch3e5RnR3JA\nOM04/k1fquApSIa4S5TI7WqQyyH+WjUUVNRHIJzolGceemYFR2RXSJDp5kI7\ncH3f\r\n=o04u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGI8sXjhIGnWwig/ZL5LxPXQa0jnah91TB7lPszPvX/CAiEAjui93Xs7CCRDqEFDuPwInpQ4AeBvuYd6qje+p/I4lWk="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.8_1606572276630_0.5939834429328041"},"_hasShrinkwrap":false},"1.0.0-preview.9":{"version":"1.0.0-preview.9","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"c04b13d4295ae9ef421f25baf41daea9bbb4bf1c","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.9","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4skPItGgBU3LerR9/+D2AtoRZgk7Sjg45OXOEnnu6bAMBN/lUKbi8TppCgUNjmBbOECeFwEUW9NHYxyK3t3URw==","shasum":"4859c3322105552ccd780e5c2c4ef356d29d41c9","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.9.tgz","fileCount":78,"unpackedSize":561682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwmIBCRA9TVsSAnZWagAAa2sP/3p0IVxr2SD99r35I+k8\nyfR32EBIwWx5+D9Y7ghdGdYPblsEM0LgG87tVX2hekJE6VqXPRnAOo13Pd3S\nxeHCvYovq1xo9RKZ9WTHTnDmbYMIaDZhK+nVsskLXTPT4V/BG+GIjocb9ebF\nDiL3ejczgOLRY8HMi/BvzBovW6+kOmFfd5vLVJm4pOxPihTqbrrrXRvEXXan\njRSLR38FK0Ipc+QF7glF3sAIg5xryh8upX6zAKnTRTCS2575Nlr26pYsPN7I\n3FV8x27KFHfudy5eMaNlTaHCCF94Jdhl11LbmDLWG/WRE7w5wYhC7HywosZj\nXrMC+WLZqUD+7DPsWltzGihnqetCOr5izAWnlTTigpq0Y6L+7v5JrONQrkmO\nxrvwmFKC09s9PpEpezn+JUWUIxPxZGnj0scX1eOXH1PiFxCuBvCelaK0b3GM\n/BQnlzvORpRamX7EZeKNqg6s3qca7XeJ1D6RcjXyG4kuhT/26XW5Y1jxDbgj\nJp7mFRuIkjhb9Crsgsoz7EHfTuuyDvfh0h8OMYn1WFQGG9q3FRBuAuCNz6BI\nCcSBwdsP7VmI4VYvH27uZwXx6BRriMZXJ5kgaZ/vC68jeKfO3q0mrZtzUIt2\nQqqUyK10dvYSvRKpactmHvj24cWWh41ekdPIT06j+VXmDDxXh/nu6zP8OoaB\n1F7Y\r\n=gJYJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4SWBV1O1KUWjcng/H9i3UIiagBuA0hEgOIPYbQolzSAIhANZ/vziMlRmvq49PnWpYO+fySEC8uK7nEKAChxkcCynV"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.9_1606574592687_0.8793472324512455"},"_hasShrinkwrap":false},"1.0.0-preview.10":{"version":"1.0.0-preview.10","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"edc88475883d51836f2f9a98aeac62510bf1cae9","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.10","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6iYC8U9rMJhxSVji+Q/0lCSZF5trfWMVP4XaB6aSoSnX33NVcMQqrU/snf0AS7JFSgthDYzqaYCe47hZokxG2Q==","shasum":"f76593a82a665cd6d52c2453811c40525c05a3f1","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.10.tgz","fileCount":78,"unpackedSize":562471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxRU/CRA9TVsSAnZWagAA0OAQAKLhko/FsHwnM68wAJC6\nBWB4vFweTleJfJPMMCGeYc75fGnyoRlIfgmH6lue2hvwmqhQMO04ks24M6jK\nx9rIViRWHOkPtloL/tBkxcQYzBI1EAKS1tHxMZGWINRm55aSnw8TgUHK/PmF\nfofzQmU5j9kjU8PntZsQTu+MFcM3RoGQfuart74ENY4Rcbam6f/P0hZ2TgV2\nSNwmuRyLP5qHvhqHixPHYYW6k+PeY00ahL58iBBLETGkqWx+sUvSf6ZwrnA3\nzBp3K0+iqsg0BW5IL50074arI3Ar1O6xeDq16KSvxuuCHptRj2zDH2fjCwEh\nXZIricQRZF2kaYIZUOfD18zcq20ntNSgZxOiyw4V7nJhtBWLPJYxHvpIrdCv\njXT/0oVs2+n69Tid3J8vOC847skMiVK9G9Zp0L8POaZvdiq8QNA8fvlUwdAJ\nBtkPG/9pTSUMx5oCp96/7VtpqIs3uMVzkdKoF8lXNzK8xlX/15F1s34PjdjM\npF4bp/FqV8h0ba6uR7JiYAD8Fm6zoN0I2GMVQNKMVZFiPZmmXpUZZ7WIBXfE\nI50FtZaj95Q1fzr53Swo/VK2Hlqy5rMgonbFG2+KufRYXTvWK4rOpoP3RaaK\n2c7ryn+AA4d69D+azZVaOLdJUtbidQJgJlIZAK/X06TH6dSwk/vWuwRJZv54\nwUmS\r\n=cAHe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQdEJTbQfZWWakIttNi/ucnjSWaIQ3v8eDr54tbIIxOAiEA94dEhN6eBXdqYrDuMgmp2EYEgqTTBEkjYIaVwYKlS4o="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.10_1606751550756_0.2858310143283138"},"_hasShrinkwrap":false},"1.0.0-preview.11":{"version":"1.0.0-preview.11","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"59b4aa030b2daa06c5b8cd1e647adb12b2b537a1","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.11","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-QKjE9mxtVnoYHUS9Bpsbw3citqYpFWhjk+TKGIDTznk/tJP5wtVhtitnar8ShLB1GfC2j6whwW6fDXZEaXHo2Q==","shasum":"8ebe6e025cd4ee62bac40d94b42e72b30ffd874a","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.11.tgz","fileCount":78,"unpackedSize":562455,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxRV5CRA9TVsSAnZWagAAnlUP/ibyMhD7SeD7fX7lbwTs\n69RDQsCvT6yGjbxVWErG6xcR/UhSKGXe1dlUd4Th9IenaysuZX4s7Pzhuit/\nF30gbv2uFi0YS/hewrgDYGYw7dFpnD/skev4pNxzO3Mer0+gbFQwktofeEuO\nhyAPnr3RdPQn6Q4+E2xEOqtp89FtssxrKTSUObh4xPwIFY56WbX6nSyWzTgn\n96MiPu7+6uiCCfMePvhyqf+DpnJbzNxA+vmbEXOIGK1r4Xp7/We+D0yIJlh9\nVM4LJ6P3vrYSB26uq0O5r8l7De3DFqAx1hpMQfRCkrs2NZa5M4cIyztFS4oa\n98gdW8yz7U3iaMg//3e588EY8ZeU36gCZk5w+Kf1ISLV6E9Cm+DdGL9njz1w\nt+N/BpEQS1zyktkEYfoHKKXseR2YBV1xSvu9ZWqG2bhkeFYTwtNVo++1StO+\n+eR8cFY7njdg6sx84rxsZulgHC/Oqqgi0C1JZk72K/5ofHMdxeUyHtiVzoZ0\nOzEwjt4h+5jovvHzYm/4pt+G9BJMgjCEmJcZMXCzcTPL/ukJf085xc7rwTJv\nrGlxjKnKItpsT6nYfRUYlN8Dn0trluk9mLXwreRTWYE0JP58C9J+svrRljG7\nvQbGjCy5NJM5YmIFTgt/eGww6rtluf9WJg56Sz+Bzx2uO0rydLelBgI3QeW9\nUX1E\r\n=uHJk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFvjh6W9RD8/yX+dmss4wczHb6udGSyYU+nFpiSDJBiAiEAqs/E5usLywJvVQDUpDsKtTqUzfdzPN51jAth0yuBbgY="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.11_1606751609042_0.22760091305395647"},"_hasShrinkwrap":false},"1.0.0-preview.12":{"version":"1.0.0-preview.12","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"0e0441b01bf8894f443be4d15deb6f9d563a0af5","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.12","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-RMeaxOK6LkfCKvobR8wl+Z25bgqv8sLsZPhaYQ5hy6r+/Mz2trpraBq8HgP2Lec2A1ouyM2Y5qs4nj1mHYK9nA==","shasum":"954f67a883fc82c1f5f6bbbae9f5bbabdf5c0adb","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.12.tgz","fileCount":78,"unpackedSize":567020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyi4vCRA9TVsSAnZWagAAysAQAIUKrIIjvevWNJd+qwj6\n0jXvQnb7JuoZJmKmk7E/s30ukkxgKqJH124qXskjFVRUoneab9Osv3wJwdmw\n5yfDS8vRgtX3H0vuPFtfrKEcUzYTKcr9KS0VxtT0I3F1ZSi2IHxXiHVWrH83\nNHHjSQEP6EE3AN/0iw9a0yagpk3ng8//JKpWCasyO+Tf3Ifhvx/CBdr1NKg8\n6aS1ALo24wKm5fyocprt9LCcjevaDm6gZnQ+DM3atUK+FTEs9w04uqY4W6gh\nXZ6eb4hQQvct9MfkqkzWCqI2jc/+wP85MOfisFL4d8CqjiwPK61UQRkZQ+VU\nu36vio5oBBGYSoDnpAnHY9l6UDkUfNy1Kuluh9rWlFp9LiRM9w5KL3ixLmN2\nFjD/MQj7++tDwL+pKb8ti0gt7uLIUp9m4RmoHaGb3n4hgZ269JYvtb5MsW1q\npUNj6kwkozbYK9oW/abu0Q+4Qe6kOcz98JSsT2BBzzRG9+qDgpbFvCJasTJ4\n7so0MfcTv4ZENi04ZfBHQ7eFTqB2Qd9diNvnNOsi+wqZCfSWuA7CH7XXX+wR\nvAEL5F0nk85TdpvP3leA6hpQATvAR/mCLNvPnJkcwneCZajZ/CF9nBYb53pW\nhYvZAS0Y8o8Xb6yoCmGNm7FpdIXbWONGAFtPFnFSow+C9SzLMGvLudsEDK5f\n/9Zu\r\n=zzTt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCepGnbZXB2MmibAkKpzsdvB4BtWKTdf8xt0oJz8g8lzAIgWipYYyKVxXF5376zhvBqvBlmnaI4U5KRuS7cOazutA8="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.12_1607085615288_0.26371501159796207"},"_hasShrinkwrap":false},"1.0.0-preview.13":{"version":"1.0.0-preview.13","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"afd163a33e79b66663727758c448be6ef99de5e6","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.13","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Yi96P2zjTFo8L9vEe98KDiWYIPOdOWm0wfrp//4z8D1eTzUbtnbXT4WdAeBbOFgVQJ5BHwiL+/THYMjyasudew==","shasum":"5cc3e8dcc6e09788ba3ca5f6ec770f8397d8870d","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.13.tgz","fileCount":78,"unpackedSize":567033,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyjASCRA9TVsSAnZWagAACSMQAIxhhHv6jAuOfbHHqY0p\nan35h9oYfwLlzvPiz/MbXaUWsBlFZs/Sfu1WVu5L+LiUe4w0nFdK+aGOh3DY\npd4CSHns6lRpS7z3wh6+BrKFG7ODqgHBGsQ4e1rb9SK/kyOtczSpS7ElCsS9\nK88oT3rRWdKYXlD1DhgB+q7VGv3MbOnCayNihuOLPO7n/ZWWTvcrzaRWylri\nBQjiJ/PS2IXrsfPadX3R7H8wGhFp1bdD4PV1+wKgM8cEclRgTwMOwJKFvGjV\ncjghY6PZrTHGrOUGgc/t1jzMhf/WKxVaU06hVmcd7JCnwf0yy9FJ+a4HjrTq\n0wWHjQta4pEY0dVh4Z3gIr0VSdHbyZFJmS7dwmZSEizfTwYz5wLW5jsxvzRV\nK7KBFOZ2JZxjijWxBZqt2bICl8QohD/arGq+/fXc5WE1yPCZJVQbasO0R1pI\nzFSx9Vl6yoaK0+Ql5GuTdoO9ZqLvgF650iJrII8YTZcVJQb/TC8IWfLzSz3l\nTJDTRGjgI+QWv3b2+k0yg0l3f2mm/V1XB9Hl257/2ClqnCFnexkUI1oziobO\nfbWEgPNxxWLMtcdGfe+kri+LQKk7Zh2ECC7ClE63F1WYZH8+9Z4e1Bvr3Ovy\nAZbaBs9KpP4E3wRUUa8aQFOdT+RXETEKsE5nfwxZNLsRY46uF8/CwAk0Yz07\n7+RL\r\n=rFJn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH7HqbCnZFaqwCNL0K28U6CB4MypWDdA3G8TQ+eEMvmOAiEA1jw+mdjLBKaFlLjbIXJAF06m7cBe0IrqHpHEawwdVQo="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.13_1607086098424_0.1713158131992054"},"_hasShrinkwrap":false},"1.0.0-preview.14":{"version":"1.0.0-preview.14","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"70f0ab15c710e774ffb31ea153cfd95168b3db5f","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.14","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-UCvIB457k2x4LB4OwRo9BUaqEbV8zXbwkkkbm7xEnEsoCaXzlAV1Vn/CNaHT/lh4BSTH9f9j949R586AB6XpEA==","shasum":"70b2f2a5ddb285409ae2d416bdecbb5a467f75d2","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.14.tgz","fileCount":80,"unpackedSize":624120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzkI+CRA9TVsSAnZWagAAR+AP/3qHaoKz8SOA/+vjnam/\nuN4OyZoI6oQ9lZXD7gtGeaKIbopJ10js60Lm39n5pTTLrzNcboZKvxaZtaRz\n29NGwjgAm+R668S5qs+JnDQsjv+OAeBpj4Z0IRQpoPq85C9fUyvx176wai/9\nCfe1lbFW5AeL9/8wciB4uQTMFD3nX4YtPDikygudCr6vmgO/HGGZ6EN1rCxV\nH+6T1aD3TTWUqUJSe9xoTUvtQmEN17w8pX75OKrqGlrPQaXRQkk306hGAJvB\nUiYki7JbuGerBUCErJ96VFY8zkVB4ZDn8Lls/aGb2cg5p7I4J+Z1FnGjxm1n\nB6/Mt93tfZlVBeb/yxw6Fa7D4EcCxwJOWFKu8sY7upC7mABnu6NcPlVKJ1Wc\nPdJP1uRB/BfldEja/lvbSfVZtEwAFY8zPVl6GEDYuWPTmw4ZJYWM/gyjOVqW\nMzFVP2ZaryDszP3w+XwN2tTOEQJgFryyfuoe0Z1iT55NpXs8YKiSziUr/QsB\nPlSFPCz2BbpYfM7k2jecNXvcx/heBwswtNF0xGBD+w/ZyZk5lOwJZyYhoF6G\nuLNEGfNU9bH3aqxD3vWCtisWCexah6bKVCMzbFuMyM/UyZoSU/tut8cS7tnP\n0KFZNXHLXm7YgCxWL3e5SH9IcEYlC1m+2SmnljHeVjdglIFqaWjyW595nn7H\nwOGe\r\n=7NYQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyYlFNzvwnLXh2LFvU43jzZHE2b6mxEzL/USkpCr59wAIgSEkJq9HzjMHdIVCts3RtFFDSABuBeU/Las8xIoDzN2c="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.14_1607352894074_0.8158545715926697"},"_hasShrinkwrap":false},"1.0.0-preview.15":{"version":"1.0.0-preview.15","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"9871c6c4c2982e6fa6f35556370238ef0e8c5b99","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.15","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ec0fcLdp3CKb4WaQ+MFy+NMdN6G22UDY0D79JdwhOciwI+nxduG1FaE5rGBsENEeXi+v6q7v7N5j/7sOdms3xQ==","shasum":"0b938b360b0d3ee5f40db9ca24215cc846432721","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.15.tgz","fileCount":84,"unpackedSize":639738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf11lyCRA9TVsSAnZWagAAH5cP/RWL8+XO7U4DHPfuxTVO\n7cn6NVxG+UYM09KkiuSk/dUEVJrWytSQNyZqb+Mc5+PiKmUpZLgdvV2J6UB5\nUj8V4rnH+MlrcJlmvvVDkEqhxQzzI7XWHMmYL6ZEi3qhmTgGiDOzxSw66H92\nuEQ2Az4bvCUP5D/yH33XZ5Hlg4U5I99zjai/jj0sdFLM45oDFDvhO5618iuP\nsQMa7aw/L9K7lTmDVEAIBVzNdrIrdmerG1neGeyp5yMQykDnLxJHrv1+BwYE\nzNqYf/DC0tz3pfatdBJJu3cV8lJayCOYxLXxdKRhvDsNtBP6oTHo2jy9o1ax\ngBcCUgENvRbjKsy5v1RAVfgzMH1fuz6zC+uz6d2cRj+YZETiG7rNKpRAuKPl\nd0TeMIHCtX9q+B+hYw7Ksm5XtxPloWsdcpP26aNQeI2PU9xhj1OS8P3MoaqV\n0VZVI+c0rt5uaFE3vGMsm3NM6r8QRbfkbc8Zv1bMS4hxHI4MKxz6jW3msdbW\nIaboPHdoJwzdpZcPcA8qnELFRmkTRv1HkzyKfxxXtUCjHkMLq3m1TFXOEJPr\nsjignGaTAGdeGVOD3M72ck52LRPJe51Sd0j4Qb0sJlm9I2gVwOjCBNWJSqN+\npCRXmOGHCXoVgSsezOafSPDvkvp94Hl+J49Xc5O9UJl/3jSvelvMfkrKrFE2\n6OMx\r\n=54+n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnq5sw5R+Pn1fHBhhMhMnKkS6sHfW1mXBVc92cG3cT9gIhAMsKvk101OYjGGcRp0E47me34Q9CyXaf9UjoWIIOnkzd"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.15_1607948658259_0.6953179669933327"},"_hasShrinkwrap":false},"1.0.0-preview.16":{"version":"1.0.0-preview.16","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"63da6e35e04931f9627feb90587ecb91f1c68ea2","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.16","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-R6XQCe37ciCNXJsj/bQBKuxLydvqRSnZqx/gReE0zYHKlP5+scI05J9s9Ifip7JyPegnOjiF/6oEBNsmfkEYdw==","shasum":"f6025b81dc02c8c8c8e8d7db55628872c1a69a8f","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.16.tgz","fileCount":86,"unpackedSize":728653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFnXECRA9TVsSAnZWagAAZJgP/0cHJLJdtB7YovF8NmEm\nfVAplq1f/LDXJA34aBJSfY7IZY+tgK6XKsZLo2kEALt2thGG9cr/XHNM72yO\nGOxermmVaaUd78rUMr0Bua5P+iPijcWr+ewlD2vYsD3uWHsZ53k9oRHS3TgS\nl8ume0QhW88rM/g4/Wh/csFupdjrwjqYlIMI/SvXPJq6hoRVCy3vH9fO1+Pf\nPUuSNymH1XduOWSGCgm/sGWgYqY2MjbHYXQs4Yps/sj00ehHok4ooKpbDyZm\nGfZEkzzyPABB0rHmzLupmDHhcQp8LMbbH9TqV/a3nmf4Ij9YMS3hHwK2c9s7\nsqVYz88nPbJU1oujxcakRNDGfvKhf7Wyw0obHzochQ2SjbkpbT9HrT87GLxd\nymT66w8vRJD7KLfpZq+42V/iSx6nlITDlHQTeyLASkWg9LXuhOEHRlBL9mvP\nIpBJ8QH4ya04mBtDoZvslPmSnRHDb3OfLF/M3LN6p5H2sOjmzn8W4n69GuET\nEtcg3FY0TiCV+8Wl26p9oNHcjsDnR7GjGcbvoNe748DJjnPbHfRPNtUG9Bgo\ny6p7TtWHiQvkv8Dk6No6ZrrUHVDxoWvQ//lrtPoZXIw9ASKXRR27LXMoRfsm\n72rTBPpE+asKde8obaRNxpE9no1Dna6+Wx+YRnb0CSwCmJ/9IN7Voc7QjoMG\nGhUe\r\n=dv2d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdXX6poSxUo92R34D3l8LcRDzWcfAWusTyd7Ovai98ogIhALJKriERP87rOmbKJO0naG2T4erzjNdwbTlDeYLsytyO"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.16_1612084675508_0.6187353636444741"},"_hasShrinkwrap":false},"1.0.0-preview.17":{"version":"1.0.0-preview.17","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.\n\nIn the context of an app, they also need to have interfaces which always show the latest data.\n\nreact-earthstar provides tools for these common tasks and requirements so that you can focus on the exciting bits of your app.\n\n- It has hooks for your components to easily fetch the data and actions they need, and which also automatically update your components when changes are made to the underlying data stores.\n- There are also many components which you can simply place into your app (like a login form, or a pub editor), which you can use to build UIs for common tasks quickly.\n- And finally, we're working on the Earthbar — a single component you can put into your app which acts as a kind of Earthstar control centre for managing workspaces, pubs, syncing, and the current author.\n\nThe hooks are ready to use and are all covered by tests. They can be used in any react renderer (e.g. react-dom, react-native).\n\nThere are a lot of components which you can import from `react-earthstar/components`, but we are still working on default styling, and styling guides so that you can style them to your desires.\n\nEarthbar is being actively worked on, and is not yet available in this package. But soon!\n\nAll of these components are being built with accessibility as a given.\n\n## Installation\n\n`npm install react-earthstar@preview`\n\nor \n\n`yarn add react-earthstar@preview`\n\n## EarthstarPeer\n\nThe hooks and components in this package rely on being rendered within a `EarthstarPeer` component to get the data and functions they need.\n\nThis provider has a few assumptions it organises itself around conceptually. It assumes:\n\n- A collection of workspaces\n- A collection of pubs associated with each of those\n- And a current author, which is represented by one of Earthstar's `AuthorKeypair`s (or null)\n\nWrap it around your app like this:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer>\n      { /* This is your app using react-earthstar hooks and components! */ }\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\n`EarthstarPeer` also has props which set the initial values for certain things. This is useful for cases like initialising with values kept in local storage.\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\n// Get the currentAuthor from local storage\nconst currentAuthor = JSON.parse(window.localStorage.getItem('earthstar-author'));\n\nfunction MyApp() {\n  return (\n    <EarthstarPeer\n      initCurrentAuthor={currentAuthor}\n    >\n      <YourGreatApp />\n    </EarthstarPeer>\n  );\n}\n```\n\nThe full list of initial values you can provide as props are:\n\n```ts\n{\n  initWorkspaces?: IStorage[];\n  initPubs?: Record<string, string[]>;\n  initCurrentAuthor?: AuthorKeypair | null;\n}\n```\n\n## Hooks\n \n### useWorkspaces\n\nReturns a list of workspaces held by your app.\n\n```jsx\nconst workspaces = useWorkspaces();\n  \nconsole.log(workspaces);\n// [\"+myworkspace.a123\", \"+otherspace.b456\"] \n}\n```\n \n### useAddWorkspace\n\nReturns a function you can use to add a new workspace to your app.\n\n```jsx\nconst add = useAddWorkspace();\n\nadd(\"+newclub.x789\")\n```\n\n### useRemoveWorkspace\n\nReturns a function you can use to remove an existing workspace from your app.\n\n```jsx\nconst remove = useRemoveWorkspace();\n\nremove(\"+myworkspace.a123\")\n```\n\n### useWorkspacePubs\n\nUse this to get a given workspace's pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = useWorkspacePubs(\"+myworkspace.a123\");\n\nconsole.log(pubs);\n// [\"https://a.pub\", \"https://b.club\"]\n```\n\n### usePubs\n\nUse this to get all your workspaces' known pubs and modify them.\n\n```jsx\nconst [pubs, setPubs] = usePubs();\n\nconsole.log(pubs);\n/* \n{\n  \"+myworkspace.a123\": [\"https://a.pub\", \"https://b.club\"],\n  \"+otherplace.b456\": [\"https://c.zone\", \"https://d.space\"]\n}\n*/\n```\n\n### useCurrentAuthor\n\nUse this to get and modify the current author.\n\n```jsx\nconst [currentAuthor, setCurrentAuthor] = useCurrentAuthor();\n```\n\n### useSync\n\nReturns a function you can use to start a sync. The function returns a Promise.\n\n```jsx\nfunction SyncButton() {\n  const sync = useSync();\n  \n  return (\n    <button onClick=(() => sync('+myworkspace.a123'))>\n      {\"Sync!\"}\n    </button>\n  )\n} \n\n```\n\n### usePaths\n\nReturns a list of paths for a given workspace and `QueryOpts` arg.\n\nThis hook will automatically re-render the component it's used in when the list of paths updates.\n\n```jsx\nconst paths = usePaths('+myworkspace.a123', {\n  pathPrefix: \"/wiki\"\n});\n\nconsole.log('paths');\n/*\n[\"/wiki/birds\", \"/wiki/plants\", \"/wiki/nuts\"]\n*/\n\n```\n\n### useDocument\n\nUse this to get a document, modify, or delete it.\n\nThis hook will automatically re-render the component it's used in when the document updates.\n\n```jsx\nconst [doc, setDoc, deleteDoc] = useDocument(\"+myworkspace.a123\", \"/messages/welcome\");\n\nconsole.log(doc.content);\n// \"Welcome to our workspace!\"\n\nsetDoc(\"Welcome, welcome, one and all!\");\n```\n\n### useStorages\n\nUse this to get and modify the underlying store of workspace `IStorage`s. This is meant as an escape hatch.\n\n```jsx\nconst [storages, setStorages] = useStorages();\n\nconsole.log(storages)\n/*\n{\n  \"+myworkspace.a123\": IStorage,\n  \"+otherplace.b456\": IStorage\n}\n*/\n```\n\n### useSubscribeToStorages\n\nIf you use `useStorages` to get some workspace data, your React components will not automatically update when changes are made to those workspaces. Use this hook to listen for certain events and provide a callback for what to do when those changes happen.\n\n```jsx\nconst [greeting, setGreeting] = React.useState(\"\")\n\nuseSubscribeToStorages({\n  workspaces: [\"+myworkspace.a123\"],\n  paths: [\"/greeting.txt\"],\n  onWrite: (event) => {\n    setGreeting(event.document.content);\n  }\n});\n```\n","readmeFilename":"README.md","gitHead":"ef67a42bac6447e8ce1d6acabfd1af445f16a894","description":"[Earthstar](https://github.com/earthstar-project/earthstar) apps can be lots of different things: blogs, wikis, to-do lists... but they often need to do a lot of similar jobs, like adding or removing workspaces, editing pubs, or letting you log in out.","_id":"react-earthstar@1.0.0-preview.17","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2gP7XiSUFQl4lH1rYz+fv1fqskZqlbzceB0XIdnnTdDwxBJdAtW59zt0hIoCmHWwvBBeYRTKO1bnoFJSNeM9cw==","shasum":"ae10fd77d6bc59925c3bb55765c175181977d5b3","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0-preview.17.tgz","fileCount":86,"unpackedSize":740723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGCrKCRA9TVsSAnZWagAAEw0QAKK9q/cOPJRSQHoXkjXH\n1dnxtpQWGwsDnSRmgR7cKj/H8qFdVQktjrsc+Lm5ePAHPy5xVxSe7kogWtdZ\nJnDrGqswU4mShxPTrhCgUFCA4DIJumnAA5xojoEXSkMw6slNCfr/Y6Yzspjb\nzcGKoThHf00iDopWpCVwX5hPN78Ach2leNC3OPw0oPLZuzF/gXJvqqI53/M7\nIPyzJwjRt3RNpMHhsSkBkPC59NLlaA5WRoFP/umvqzed55zK/jGL6tvy4dZw\neNYWVtGUCVAOPm4tXI0OHhS8DZ+k++Azc7Z0f3/KnMzlZuywigIJ9jb15vy1\nPtUqOInBikrdqoalWBAdZj4uUWsfdnwtWP1hkFcj6eG8/V3Hss3fGMWQPEiN\nj2+v4AOLFMt0963Q2fBbtuCMuHdj8rWTINr6gf1kdGdcTz0iCj1TSvyPXaly\nTRw6+pJMDhJeoEV3SQvpahbe8yHq28lhTM1CnCV6AIra6N+uw6WN8rNwYaML\nwfF4me0ScN9hM8yvix+p6UELVyjAhOu1yjUwSxsVqP0nXwY4Yv6SLRQ4apWt\ntL/QMZ/QfwWKCn6VgUla1ctBvX2p8imKEkdzPZKqo2YTGsrDjWEzblI2mXIO\nRu1D5t52rJElJyAr3TSMOus5lYKjU72a/s7WKRR1cVVPs2ykn3ZITcUU08Ix\nzeTn\r\n=BSYW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPjjqPo2bIG4Y8jYkY5X3Z9j7IwVKY2jq6HUyk98BdIgIgBS9GHvC4cjeCv1QIsBtNTUWlaClb/cJQxAKX4sFaOrc="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0-preview.17_1612196553364_0.18149541287555104"},"_hasShrinkwrap":false},"1.0.0":{"version":"1.0.0","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@rehooks/local-storage":"^2.4.0","use-deep-compare-effect":"^1.4.0"},"gitHead":"4ff1de4921816ab5417aeeca44e84fa2a0da62d9","description":"## What is this?","_id":"react-earthstar@1.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-u9j333Ij6UVj2srymZDkGzM9RIRVmhKNYEadC4t+T3aRsQqQIlTEPSoBjhk1NsPG4HElJ+43DL/7BwYuzJwNJQ==","shasum":"bb7c8abaa56843b3baa9166da1006c96250b2cdd","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.0.tgz","fileCount":106,"unpackedSize":772500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGnloCRA9TVsSAnZWagAA6aMQAJjXr2o+1uYtCIbswpcB\n/OPsZJhwG+Yj18eM/p9rI8ZXYNPqTZGEo7V//cDZKGbMS5aDdjjYRcchzf+h\neM6QxEGacNGRNtHu207i0awY/tssJFp5IOHpghma7KFrPmJ/EpllbUqP+pI2\nn1bKNZHBbQGBOYnjGFsZxwZRG1n1ZwGHtFcjhEn8zB2tahYlYrKUcdJNpZLE\nyLhH0G4rNcisTEblp38swm7LWl25xiPxwkedNXfPY3XvubCHhZLVXYf2mSfZ\nANLJNRVF8l+zdc3O8RAznqd3EFxqklcnUbl+Y1IKnuc1NFlv7WMNB2QhUREs\nKH4BDQ3JaeDq8GS4wuDKdU9O5Dg2mhld+hgsNe4AZth4KKw9GMjlfxN769wH\nAouDI1oLQV9yI5/qOYxLMjoLxJ0FKRjcJ/Qn/Dl04D/Zsge+mIEiVv0/EnLP\nT5sw2HjjbkkKhU0ZO4reFXfkdtEM5QLPbwm9SJrfADXdoVaXr9BHVtO4p8/4\nmdIVkgcsx6C9Qy/vQhRcoV8mdCceIwaWhB7FfRFU4Vf8YNJyUZwOMfxSLuPl\nmOejmvuwShFGOprO5ZxQLmGbL0LC/U58KwSVGR6LfEZg8wZH2i0AcxIV0TNu\niEOxofS0cDdboiWjKNBX3s6z7O27rSMLlaV03Msbo7dMASTRBE+aixer2mIc\nPD/n\r\n=D0Gz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNytccpZB+LmG4LeJ9JlEiEhQf5cS3uPnF98tqHhmwhQIhAKQwRVDhMKp46b5Ab6J7mW7g0bctzE2J1YVlC+h6RH//"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.0_1612347752052_0.48293797221428014"},"_hasShrinkwrap":false},"1.0.1":{"version":"1.0.1","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@rehooks/local-storage":"^2.4.0","use-deep-compare-effect":"^1.4.0"},"gitHead":"b810cde2994245329669f01fa6668df3f5722d19","description":"## What is this?","_id":"react-earthstar@1.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-C0TsVqjeMwHm+mrM/IVFKd6RsDjXaQsCvMzTreJfYMDa9ndoHucR9MvEx5r2DkYBUeZJHCaPU7/FDFa+MyownA==","shasum":"e35e6a341c042d71ce669bde9de06ef1d89a1b5e","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.1.tgz","fileCount":106,"unpackedSize":772638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGoUICRA9TVsSAnZWagAA8SoP/1Bx51PS14RfwS/54leL\nvmB+X+UwJpHpyqqBsNamUiFOC+v0px1erx/4OdtUb+7EtzvMmw8/teC7/km/\nT8m+XReklY6snS5ug9gJiBheMH4+Mt/m7hNn3FmTRTF+aNHGmFWwgzTjCJeU\nK8a7r1XVwYOjJxst9Gh218Hb3pb00NHISiyJMPJOI0JJwxHCobEsBEP9WBny\n2h3ftq2Y3+3uSWrd/n+bRJxcs9OBWd8ABFSgzXK7aKBI5Nw3oTCmcxMF+s0+\nfgmx8bVS29BjWfSAkTaRNw/xsFs1QlTqkvSeR7v9MV0PpHH/gx2S9oGsSUt7\nbwhixkshMkZAntjf3vyru73PefeTXA07WUF7LTND57N05QiNGd8FpgdvubQI\nWzrXiYrUh2TN4WV5oNUHLgQG52oGD3qkQBR9+d3x8tNYqXdHqLAV362vCpaL\n/2vn3U3tkYbJmpbOTZ9DJ4fl5aZoX6CVhH0jahrBUfI5AOfH0R3nFE8d3fmY\n9wyPBGmGXX23/GXujonOhwxiRBaRKbIY4Uz29IA71AdrrLCJdxck3sn8ahRW\n/KhqKiZmia7rQQDnwnWSdH5cjh7ahSS7+KNiakeVXDYM6b3KuyNKL5CHVZGn\n+HDOBvJUeFFRZJyOEB/AkEmnIhrE0xWCKdcpLCNf6mZIqTbulRFDAeIaoB4q\nMo6x\r\n=WShV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMnIW1aifHbCLh4vIK5JiWDxhq2hbnHz+yur1q15oj+AiBFJeTi2YUedfF0sWxttyXpxpaotdmlVHXfEXvs5QxeoA=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.1_1612350728239_0.7098374357858201"},"_hasShrinkwrap":false},"1.0.2":{"version":"1.0.2","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@rehooks/local-storage":"^2.4.0","use-deep-compare-effect":"^1.4.0"},"gitHead":"a3a271e4cf229873bff65878509072134ca72173","description":"## What is this?","_id":"react-earthstar@1.0.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-R/OwvCcprpZ6qoQOpP3sFiHUUFaJjOeoqiJQGqgzAwr8ejhY61ycC7pW4bdwmlm+y2jFxIu257jT7zGS5XT30Q==","shasum":"1d2ee8d5821de929d74e62ebb5db4bfc7e120d7d","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.2.tgz","fileCount":106,"unpackedSize":772838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHO4PCRA9TVsSAnZWagAAfV4P/jUz3VgWpu2jcEAnd458\n3tIEbq4+N3Ory4SvkLW/VDMhAk4UzG5VpAukMLPpoSvKywRq4OpxQ94ZizjC\n4UzfkrVdnxjV/95y61XXVCii1MLXGSys7gzSSN9QNwfMmOFU0hG0E3/B0BbB\nHWuRwSwYBwSmEHlabcqg1vtkL5KDt8sJ7PihFmLbk/cq1l9xrRjZbu3MGr82\n5BSIlivGiUziLgVcFmwglhAFgMbSaDxg9DE0kZC4vyfCrFeTzLuM8olhUIHO\nQLj2TP6Ab1KQO5ytaRA3orIXI2VffHEbNC+P81LwH8v3NYck4QbjuJm7PFZx\nizBGnle9SNYrCcGQ3juB9XBYJ+d8kHdN+FBWqrRtfyJbN5U8pA1rkdSpK6Wj\nwCw+9gLsbH8Gswefa3qXZcztEXM1/c+1uSbDzj/C6mOIpZvftp7nLidXZkvd\n41WXufGtKeJhpq5eOBaiYQOGBFoM0S3G0cZjokcewNwMmvdyikFFmPkc1YJa\nEo8kwMgbRtjA1IrSigkvEFGHS0bJOv10tyOxQC15HquGiXsp7CbUxqdy9UqZ\nwq4ODRHN/d3gXtdcPbbOeBNWef0RCrLgng2hk8zKgI0QGrFW6sWwqx2JjdLq\n/radvmJYOG9OVA6N5gIuqYA7ud+XcTmhAT0sl0tIb6pCfEbfk+MqnoS96vCl\nOxSj\r\n=yoaL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyEhygOhCBsAFkXzZd3WC1+jB+iCheWB3TcJl/efTKWAIgF1wqzKe3THwZ8YpCb7lcmnzYKdbx5AEUD61vLpQuxec="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.2_1612508687312_0.5499754322271497"},"_hasShrinkwrap":false},"1.0.3":{"version":"1.0.3","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html --port 2345"},"peerDependencies":{"earthstar":"^5.7.4","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.4","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","@rehooks/local-storage":"^2.4.0","use-deep-compare-effect":"^1.4.0"},"gitHead":"f75007307000abc035c193f5446ee5893f0f6dc2","description":"## What is this?","_id":"react-earthstar@1.0.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-64myCo4DVB/fPx7y1db1Sj+n1Vq7UEN4+0iG0uqDVbHuXcSt8RCj21l1NLWkiOMQ5hTeoYgPxPWzqVKIub7swg==","shasum":"10ec2f16c989d6c287da34c743dd893da6a9586e","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.0.3.tgz","fileCount":106,"unpackedSize":773761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHPP+CRA9TVsSAnZWagAA20cP/29ExYaYD62YzY5q+B8O\nOSqDQXqBzwY4CiwxM7Wl9k2XzMvk0KNF9txrPRnzqwNMZboNOQoBgV3DvdRK\nN/xaXMKN89uVTwFL9BG7WKzUbRm//RbGjCLMbGBIKNyGn+MehJ4TEJC9DRzR\nJK63v9mArwj8IK5dXjEWRs+z3Mh2B76miyRKG50WNiXt3qV59xGFanXpXD5L\nlpOv7bcO5bETpAKhFp1Lamk7dg+eixRqhzZ+1U7bId3fjbuaA81TwUGTd+EU\nqnHISkIdTDM6fM74745H4VVpG64Kuh3URlTM7vHPgrtH+niDXolGvXN5dE+q\nfHn628DIFXaTQ02Af7hBKdM3CcIuJ2TRLVNAaN65axo2H5ASTO5wSfr3H5du\naNNoFtpixL4L/JMWN+1W8Joskbo1SdBwlg/0DQabnmsTzBmuwW5Pd/nmaEk/\n6GQ/TtzcssnNv5vnZ5aI26PtjT6aJDw2Q8evJSJISovhYEA1fMSVplQy6mTd\nLQgS7IeY1U1BUJLKKg9OWHiLkxxFA8B/TaJAq4wQLikGF9pAwUnDoTqc8Xpl\n7fV4zVznB8cvOPsFV1vNDcVLwpaw9j+A+Fp5cS+cAYJOG5I2Geg8MFKNnEsv\nRzv5OjFP3kBqnO2DeJxRCSEW8X0XBshOr+vdfJKkmP9LlxVbl//PAJxiyME5\nhXPP\r\n=uc/K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFasprBJSbOCMa8l+jjG0acNwqVKazj9M9uEmIP0zbaQAiEA5n/p6ys6ooQt0ZZW3mRqI0fV1RiHyxLUhWg0gxVaTM8="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.0.3_1612510205857_0.09651934795895034"},"_hasShrinkwrap":false},"1.1.0":{"version":"1.1.0","description":"A React toolkit for making collaborative, offline-first apps for small groups.","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^5.7.6","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.6","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"gitHead":"d37c951f3463bd7d69f04245980466888d7a6994","_id":"react-earthstar@1.1.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-pDNmkq0RjlVJOzEASIHgp39Lum6U9eo4CeTPyi7AYNxIKcwFwNBewsf+KrDqqOsicAHgGT1rK23GHqIXP4SrGg==","shasum":"5437198a742cfffe05c373cba3776cecb0fe62e1","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.1.0.tgz","fileCount":114,"unpackedSize":829342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJimZCRA9TVsSAnZWagAAEDwP/Akf37HmIEfZ0bEM8Z1S\nV8Hs9vGrF3Jzsr4Uby0ctTBHI+MTgtJ4IYBqc/5u1eEgQe76sTAZgdopRXKX\nZJZTypvr1YDVUp3WNrQWG2AGeGiGlpQEiuI0SfLnWuuEnE1iPMPGUYsvwoj2\nrdc8XzkBYAkdhzXY+XCjWOyVr80Wk25u/2qLwB4vXFfPYWex9AiCNPoh+7Ei\nFP4LBklhIxrFpSXywoKSEM4CEFtI/Pl/YN/bLtMXrV3kmkwKMkmLVGGObZtw\nvDAR+9w6DFs30rfVjuYtewlKSJl9apQcILPbrmR7WrZC9p/yQyHB7FE2xZnN\nQOSgRgEf+bNurKLbiSfmRGVWCsxudTecYWZ3oDw3ANQeTDyFPPVfBvw/UwcW\nGT4kbY/0Q50W1eHzHvOPTBeJFrc6pWBGtQnUj8YmDBF2pSA6j6to5Q60bEvL\njXPYvUFLZKKCwlzqPvEMRjtbBbBVjncWk0DzqkrT+QYhMh3N3mXLs1VcgZuI\npZUt+ooJYfv5eM5I4VNaw12QfMzTnFQmcze93Qmg5RTWdKxDmdwfb/tcxO8x\nrgrA26bLWg3tnP+76GQZRV/kKvQBfJPZ6XtVh3DLYdGiZBBpXw6oLqGzqR+N\nondsKHZabwGKH3qqCOZK83Zu5H7OpKSc6pxoBjrX7e/ehZo7QQOuLd4oHlCg\nW3gC\r\n=jnyH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDI3RahCrf4h19Dt0tYuoAgTzHlZZMNexlzkafCzQQuiAIgOLVfOqivVKg9V/KoxMiiTPFno2T8/KqqCuwRNY0pnD0="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.1.0_1613113752737_0.9292487894463632"},"_hasShrinkwrap":false},"1.1.1":{"version":"1.1.1","description":"A React toolkit for making collaborative, offline-first apps for small groups.","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^5.7.6","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^5.7.6","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"gitHead":"60893f040e5593500715f2b9d22f0b3017a44ba4","_id":"react-earthstar@1.1.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Cvk9Eb2dPefunESzknYvlaFWgNFpnG/f99NBastfYtQquJD6t0jmYnjT1yQBhb2jfgpXArrP0YgJ+A4uu8OI3w==","shasum":"7365b256d198fba5f6c38640467acc11622ee877","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-1.1.1.tgz","fileCount":114,"unpackedSize":831292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJlI0CRA9TVsSAnZWagAAeK4QAIFHuFnhKj50RGXJGPgm\nrN92TrppPptr0X85AIaLK4sNcZH1qJE9dhvGW5+b5nyOWPI1u047ASCg9z9F\nDJa6lVkWYtgYJacT6tiuHRRVFZsIAupl8pmZhdDPaLZ3mgcpUtBlZ9c13lf8\npk4f/rpc8IVXFg5F1pJMjrW+CD8GsHl6S1kCEWAxJHF7yFy5e2tDdAFXzI3f\n212rpDW4WZWukpcmGD1kxSZsUUlc7dzG5knhZ7e2LuJZRbCILw24EMjIIZ84\nAij2HxuJu2TWSGHk8rSTuZeFXLC0EHXNIYFjfsPrtPGcvc1ChnZzYrSpOgKO\npo1aXgc0gBuL+wGoqimd0lbS0QzKM2T3BoGeKzS/turQt8jPE73pxazxUIyR\naLZKHgd+8u4fVhHmvKxFDT/eeKcW6hXCQ6vhWNnua3YNsYW/hZMqCvr+AUWD\nKfWcNVQFH1WbEnfKrZ4GSMZsCxrCz+DznVkbLMRlZPTFT85FaFphhPYC/c87\nrfJ7X2Y/D9Uxn3qqGq7d/BOXgxHZ/tuwz9F/hv8OFP204FlgM7H9vs2L9tVJ\nsPZnkdTcX5xpGUzN01hgXnBa/X0eqql6kdQeX5ZJJO11gl9kfiRO8fQJY6lz\nm/gsZrVjS6TTtfPhgqXKl2ttyNscfFGO0hhtxOgMbyWb12ofcGwTQ+k3bn5K\nNGGg\r\n=fzRc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVmIkFXJ3OZ/qZ1m5c7siCWpDXs/QGRVBXrO3K+nXReQIhAIJ4rJHW4OtMBWhJUkuoCuBf6qY1xk9tlBFrpwLwFWpF"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_1.1.1_1613124148502_0.4191606772334422"},"_hasShrinkwrap":false},"2.0.0-beta.0":{"version":"2.0.0-beta.0","description":"A React toolkit for making collaborative, offline-first apps for small groups.","license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.1","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.1","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"4cef56b9c5a13ad27a3d02a72466da0cd3e954dd","_id":"react-earthstar@2.0.0-beta.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Tx4vGuHcumwRYWkeHncgrS0SX4FBFZ4qziGbq1RPwkrtCtUTfo5bWaCNlQBqiFxSgIVYRktwiCZDdXPVii5erw==","shasum":"d77374aec68043d548841a6bdfe0e1812c66d4a0","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-2.0.0-beta.0.tgz","fileCount":115,"unpackedSize":1040954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN/xDCRA9TVsSAnZWagAAVM8QAI9RvXnnmFNJu0Amv5GD\na9G8NTAZyn9WlCHtAzk/ecqhEw6QR++48JiNYPyj2cw1+Rstmt2+l4uA9hT+\n2f9SWUDjwHAha4UmMKEnr3EJ4ctYd0VuEEh2BiWMvJoDSfwYDINcMXPiQNOv\ngxQLHEAv0VdI2Dc6Fg9ug5I3sqCNtDSrov7G3FSzWQ6nYuNyV0Ak+FCQ9uCt\n2j+QRH509ARlBZ06ISnZVlXoQ1+3hNWwfXqoLPfhornDItpPUkDFRl3mGxTV\nicCeZ9ZOYFXN8hieZCWGOPp8JRXdcuOeBk+DH3FiAYpKVyBHnEch0u6wQpEd\nT5UIfapOYWH5x/eK4rJnytRSCBzFzp4Boq6CQ22aRheb535+lgZrjylxob87\n3jKcHpWaL7XJEXXaTQ+UbhyYMmeU3WCiO4NytAgaMekB8ySyxTly05/2BCqG\n28QbjPqUWdxNK4UdlYR3aBrZbEUaJj8mKscFNAT+6UnA2+RfsogII9gtlhbS\n00YOu7o7Q1jcnX83UfIkSl2Rb6E9ecKHDHMaZs81Vrc1pCbx5SK49M4mfhv3\nIPQIjau/o54dyWZQXYBzQet66EgepIPFH6IPT5eXrGFUysBAPZ6hryhAnpuk\nFaMZjQ9KZ9hkK79B7rz8623Pjzigk8tq1DeLr45Fm1AfdxebCtMcD6D/QZnd\ncjZO\r\n=PURl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0tHjNCQ5Rh4VQPeejhhdV0z1XVKxZikFdICXfSbNuUAIhALruNXdxxDmKcN4O8fhyv7lxwljw0gnaWv47BTN4XagG"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_2.0.0-beta.0_1614281794516_0.6722248708168923"},"_hasShrinkwrap":false},"2.0.0":{"version":"2.0.0","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.1","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.1","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"gitHead":"05ce4515bcde282d2462c7f300a18336221e7867","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@2.0.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-e0zCLomFuem1i7QDa7pnc4Rqw0fEfBiPrRb1t6Elu3c5TzKvC+f/0rcZlxbUdUk9csx3jzklKJ7u7v2GjDLHrQ==","shasum":"5fd73eb767437f34e63d5837c2a3145622959859","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-2.0.0.tgz","fileCount":115,"unpackedSize":1041143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPK2RCRA9TVsSAnZWagAARXcQAIzTasyJ/NOof9FwqGyN\n4/0uUW4lJ7jN21LtDxbl68TU1/zrGOics37Ws/wx75YUPHPS+JWQBF0fiLnq\n2seFa3uKr4LYdg5oSv3rsBPXq4Wsx56cm/HgCEoXPjIlePwPIvo9vOgRAcs6\nxTEuH2LtoWVnA7WXou1LEloonSB8gtTsd3O2y6iUaH4Tl/EsvyS9ystiUXk/\nFTPWMqY8jBk+bND5CyZ8BjIjs5/8zqRMUg365Vd5456oXa0icespxps1axiL\n1tbbHPE8uwNyRbpSFulnbRWy7iDKp7A69geKwZRl0/VCD9xsfHUQ+yGm1xB5\nWBLkYnIka1g5IXkfsALGoEmNrOz4b5/03jIfRpA3vN1kWD/ukx7z5rltbNf6\nmJqv8uVckToUi0uN2wmssTWXgZmtQE9ZuPPLozqGfJ2Jtx52hhSPcf0MQlIb\nXUv1nYJCJOat89rwFwWoEExsrLossQmZzF9dBM67gtgbyicl3fk9lfGKnwiR\nPOZnSuDe5LFXGP6JR47WpdsHrQZbfPJ3fln7dGYo31Fjn+Sof+G64TeJjPIL\nMBSvlMp7jU4rSd1QcNDTxDlhh0hWddQgEghz0SrGJC9vPZHq2nmdbPhqbBqh\nSBBhjtMn+nV69digmhRxu/R+5KyA/cx2/zYdmWE2KiqwTzie5nHidS1YQ0u7\nvaPc\r\n=U0yi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTb23avD1GEY5qoPt/mD12VXXxIYfDAwRahBq+Hz1Z3wIgV8rvClKycRYtNARVES0SKiGQgXm6uVsssBO1vo5mUUk="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_2.0.0_1614589329158_0.4958613795760278"},"_hasShrinkwrap":false},"2.0.1":{"version":"2.0.1","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","use-deep-compare-effect":"^1.4.0"},"gitHead":"1d682c922fa4c7da6bf51bab35f0e9763bfffc91","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@2.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-oG1X7Ydk+EXR7SXf+7Pq4gxfcl18CLOSZwhHexg6VI7OcO3CvbkNYSahpvBcDGYWxJkE5ApuunVg5SqYAqTt9A==","shasum":"96d55f6ab29bd325ab8a6ba937f608b6f36c2031","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-2.0.1.tgz","fileCount":115,"unpackedSize":1040434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh24QhCRA9TVsSAnZWagAA7bAP/RXWK84Pesd1Sjhdy3iy\nDFWRXlIM9Upuua9/F+YuIH6SbnuXSJ5lGwmCE3QtAMddRdtIERaK5rbtmXDr\neMRdQ4nWuRQbrFDMy9wrEo6SCXx5TmjUWVW9dGzL/qb8EwbsoTegq938p8nK\nfukofgCXFPfxdPukU3+7k0dZmkg6b8NAiOFJuJLQYraSC/iFSni0t+3iHGsG\niahSKEG4/wV2d4SsB3pPxgeqttnqfLqjzplEd+xwpRAc9mWnGhcBWfwEw09B\nclo6RDu14biAD5WEoz/FkgiMN8QFr4SEuSpv0ddZ5gDC4JlXlusPfhCHMsHP\nPViYsI3PqIhS3IHNWUDfUXSkwMCCmIRBz5TBmUFooS0VWNA354B1cHOggZrv\nWsFDTohqNkVcnDJJMvO3KNhfJQhDkNZ4gn9/rYa//qlguV/xOUwSN041xnP5\nHThCR56zKJYqgEG1fVi00IeuKqBwUkh2CYYropil4Ei7TfHljWZ++BNve7jq\nDdxfD0g3hm60/Ke9ci+JCRo78syhlNMsBjUaonthUztSeF8EtBpjLljUVZ16\nci/qRUcMgi3TU2dzLjsmLZnamqejGGwgAkZ3yg62l3o3c10+EAi0+/zCm7F8\nUmSE2YKxFqvsRn8n2W1P9sMchzZtF4ukhU0NPH94uvRGoZdBzeH4wk9X5/wF\nzs+o\r\n=JC92\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQ/7WIdDVS+DqEjbqIrX+0ZZsYBuSeLveJA2l6K2lApwIgO3FkWrckH+EaooE80K1pyRSbk7OTUo0zO3lAkBgo/pY="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_2.0.1_1615463754889_0.8430383430121253"},"_hasShrinkwrap":false},"3.0.1-alpha.0":{"version":"3.0.1-alpha.0","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"b99198cb01fadc3db5862e6b138df11826cbdaa9","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-8PZYeOHjM+41YQqso6wiEQ0apllO7RczbEoBvhUN+P8wwavjEyH9MsxOnvP5TKF6LCf0WgS5pMEA9x7tHj3wBw==","shasum":"f89abb73affc1f7ff0540d97e37410b442bfccf2","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.0.tgz","fileCount":119,"unpackedSize":1038966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcb3kCRA9TVsSAnZWagAA9XIP/0HsKsvn9Kuh1nxrnra9\nsG3Cg5ZDbTOl/qiK+OrpETFoNKWuZ43WoDrzHV9lGYVh81nEIv+vBpPViNwf\nruk4M2dxraxu17/ZklB9tCdqMpX3PFWxzU5xRIwtVZBc8Ogde13eLlrJt0OR\n9WQB3l1akFGd7JV2oecvzRO3M+yFwJSK8dtCLKNj2exZ9hR1OaYrznmreZXr\nr7u6z699MSkxJJn5HW3fNySVNIak2NgHsNYbe4qx6XHfWrbi3eNt/zhfVSpu\nCeMcHKiFa1B2G7JJdXvoR9WUcnD4zL8TKaYAG1BU1SGh6j1WnGUoM6PXGGpI\nP6lTPwtHnK9fQEORr3zkpai5VvHEXedItG1NiO+mERLTkLKSxvN+uJJmfq8r\nTrqq3ro3acm8kZTkUmUossaDoZQFm0RVJPYi79Zy72NMMFpzl99s5Yj+NF6A\n+eUm+sYNQi51ye6rc9+6Bzcdinx6Uc1JxTPIGgVcgUkJySLwCJrj3HRNoN8t\n4Jp3vFXXaKNI+7whzq1gu39ZlY/dc9306s+r0GO/LSU0Vh+I6UyGsUSgSOJY\nFRuzrHlSke94JdR/VdWCk+4ZBf1xScpPDsVIcNUTVpWwfrZWJPRw/aKuUcW5\nvno1YJMDIJd9CCAF8KqqisV7i/ogfalcXv6eGF2KDEWvmN/URgxA6BJ16RRs\ng2MU\r\n=ls0t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFE0IBdnZ61+YVS7zPf3qFvZvhqjSpiBEmOJ5CJrmQXcAiAPFP3t2lvHednjcbDyXN37f6qdxojK0lbA/WBbGYGYmg=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.0_1618066915948_0.7828011887761148"},"_hasShrinkwrap":false},"3.0.1-alpha.1":{"version":"3.0.1-alpha.1","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"2751ab832dc38184262a3e27612d91d917e3a97e","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-K0GuTWUNAVVhFGX0ZH+Fi/V9Uo8iPynVfFbw8w+f/0mG8Kew721RA3b8PuBLRJorFS/A5tlx9antacImPgkMnA==","shasum":"ba051e4961709379c3a5443f27d9b83bf699519e","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.1.tgz","fileCount":119,"unpackedSize":1037908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcvhjCRA9TVsSAnZWagAAqS0P/2fcJGFQQ50wwWoG11eV\nE0uLry3Qi8vGDKHMkMVBPKGBHftRUTe4K6nGphKY1mmkuypi8FP4QRpg5FMu\nLS6t6theJuoCqKWOLKXscus99wcXY7XMDOwR0SFvSaltV/csIBlbAbXuHMGS\ntrRacBlj+vdo5CVHbhfSLIMibYohhma+yhH+ZvoQrM9WKxIRtCja7yEsrytU\nvU4Ph3nbzxIc0gNYQGe7mJvCWHR4SG1nJzbOYQlaBd0krDq2fiftK24z+SYf\ng824cxqGrqUEadZbiPEEPfyT1LjSmkcsOxQF/hNA8PnUXP5Fe8N4ppgXZcS3\ne9F1HVKhL3UKc/FCiJFOa5W3l9AFjvSOJZg12q4KkcKZk8Xny5MpzRoMp88T\nDhWtwUuEm8qAS9myQynA6UICK58KjOCWjCsziH3rtE1PP3o9DDS4IZh1HXZ3\nR9xzElonSx0o259QDguDEM8DSzw76CLRX6WZ1HU5UPQan8LT6nFCDQuNNlMV\nHbhnxwSsQYcpmciARsyWVMNoZarQ50pi3A66QKKumtrAZ0Ydgt+0SGETZWgF\nptJLV+w4GlXy5l/+9P9J0O5M6/oZzsFnO+r7yfKG6rKYjfGvlbSOH5X8KbqS\n80PjmAHSHTqxUI373SKtEGiwKrCHSYZ9wNpXjeedACf4k3I0h7AyUpR0FwXJ\nnr9h\r\n=IhpA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ3BdadwRBqlMbqW8wg/5kHHHFjDtsOqV6hlNkSt5h+AIgYCTitAjPvvOzW0SCnUbfpgUN72IYiCeRECVIQa87nlE="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.1_1618147426798_0.46708698922098724"},"_hasShrinkwrap":false},"3.0.1-alpha.2":{"version":"3.0.1-alpha.2","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"4933f7e9558c4ed0a77d8fc297ef6e1367bf26b5","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.2","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-szUx4eUcX+ioPZkroUxBdz4PR3jbRQ9u7JacGDuvfLO1trUpdavcNKekrP03LfLceqOljA2v+Y34u5oKnWzt0g==","shasum":"704c832b6bf90d64230c0e474e58b6d25c46b447","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.2.tgz","fileCount":119,"unpackedSize":1111618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcv7wCRA9TVsSAnZWagAA20MP/jZnU7BucwFXB43eZ6Kb\nVVkCfN8dY4J0Jx4gjtgy1aB/jVp/bCo0ihxDh0BvWQL62eXMEjjR03PwVEmM\nD714WkwHIeOnChHJh3ccus92g9FtSenKT+lN19amLuthj6R/9GMpz4jStzOg\nRNxGNWI5MM1CO/w3NVPdkgjgZZDozeVLwGTsidBthXlXRzj4MjB+u8wucfcK\nLZx/6eDiYl9Ko/m6fRCQyZWu45sx9EfzGzXsPYMBOvAnLdJ4fxaQa0ycOm3y\nIphbEtR2pXU2Yo17NEYYdkKfA9g506QmUf/juARuKbALP1HjnBGhklUfBDTf\nkVpxt2dIZ5gPCkaNouodq7sswomOpWoQ/vDLweqt9wPhpfxAu5T7m2X5IS9I\nw7T1paN40LnIB7y7g9vHjgGWJ4KpNgQC19h2OWo138opOcE0h/Rf8++cYlSA\nnAeyvFKpJBQh9RYBq5uzoBwmfMNxjeMsy3K+IN8bSNmOHtqDjN1+XIlEFldp\nYkExl/m7UzRq/UK3+7Rl9NudFeQcCVqVhqod3M8AeqkY1KAK8U2ltouxA5Q7\nXDeUBb5pfOkzb6ZBHJOC4N5tiM0pgu2YD9ygjCK1B3XYpfQCdmY/E4JpdpR7\nGKDEti53JCz44vmk6X4iVN2kmkwMHZ+PwNtgCx3ISreUI/QiB7r257qr9/jJ\npc3l\r\n=qoVe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPUVtkKaN20B3LzcvzCckN8HKcvUoqFDxPDR1o2BGbHAiBMNohnpXlCqnV/l8zZ5aRSKmBnrDhYlQbyqaNspMVSHQ=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.2_1618149104002_0.35927325832497115"},"_hasShrinkwrap":false},"3.0.1-alpha.3":{"version":"3.0.1-alpha.3","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"2f61291a68be60106b71a21ad3a890abdc33b0c5","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.3","_nodeVersion":"14.4.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-yGiAIpIUHlPq8Le0j0FfnHF5k+BqOMwEiWAN4oPEKKMadRaG67BNhs5mvYQGeshgtWmUcBpDaYqx1e78ji5UUQ==","shasum":"c4cadb798dd3aa7d46bd97758e3fc6a4406d999b","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.3.tgz","fileCount":119,"unpackedSize":1112113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc0cJCRA9TVsSAnZWagAAivsQAIfQbTt0QUeKXZSKLvPU\ncXvdkbPHFrR4vt5imvfQUZfduAgXR7J8NNQ4jtYj+Vgtet99vXnWH2tsTHTD\nlvPpir4iz7fe2+8F+MUxLFgJlxR9SdAothb1uqZWVzfzXuofR6NWQoDcA8jS\n542cnyZqjSWxM57FE+vmqgU1x09VdFJRUFob2rmO568rtaOYvyZ6bvo3iudL\nLYQ2qTeArQgA4F0FI73z3TtuyUne5+gOJTflW/Nx4VS69SXeiJMCfXF4r5xq\nVMGv73bhLD/BBCo2xgPL/UnxayLaNTq3Dq3Wm7IWzKpL/z73vgUdBr2FRcSL\nFXk71Y38vSzo3U3FIt/71DW8yO27BbukIfLsTUZPzFhxCCSnKeYZN4Co5pGq\nQLo6MSmMfkk58JMW5q65BqGyjK1UNu6y0SvW5bM5kbLdG+16dadZu2XATI4L\nWH0JqMl5e07gDytAUWYvmg5fDfY4CTGV8kHBtK5dVaXv0zDM4Pg1uJOBvQWw\nq3VkYxM+HDBEcGGdnU6ldIOzJW7J5vWrQh+Ju17qotf/hJv2KfrPFEy9oN3R\n5ecz0vsehZUpSjAN5ECH7v/D6AYIL7+ZYZUqf+bN4LXJb3UzF0h+RkfSnL7v\nGtlpDU0YKK+jIBG28+0wGJomy5EiZNNtbPXCR44ip27smCi4/X71erBNRHQu\nBfaw\r\n=Hn80\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJTXBq0QfA6gQiyh3BSyQ+ObhJPbTeWyxJsuaZ38x0BAIgQQHyaiMF+hNItoftfUVa2T8MS87TLCK7cW5tFli/XF8="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.3_1618167561140_0.05227228147803986"},"_hasShrinkwrap":false},"3.0.1-alpha.4":{"version":"3.0.1-alpha.4","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"75869a10fe77c85d082cb629cb9b95e60db8c2a2","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.4","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Onbp0SvaF6eulSqPfR7u9Oni9RrHi4Oj9P/KUp0u4uI6SCoyFFkNfqXmf3kB+rPeIYcFFC8O7NmeTXg5WO3QtA==","shasum":"1ef18a3120f049facbad481339270ea814001a83","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.4.tgz","fileCount":119,"unpackedSize":1113521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfWIHCRA9TVsSAnZWagAAP/wP/1tCgkjAnui9pn/283+U\ngn2AfU3zVn4IHPmSrIzHh09ON85VclOojeVJ2g+8kWn8iHyjBdAfMTkXrxlE\nM5oX4YOtOvgRuxErusvd2sly7HZ+96QnAjTy2zIsgavbmLjnkNxAZRdBv3s6\n1aAs+TyYom6q5x7jjB1s4GId2jev0PFqxuTepihNpCZ7dj3YUr81UjNf6qEY\n8ip+3pZ2px5whrI0hQUYnJC0zB+m2lvqXupyTGyXnTvChTyMjnw9Xd6DObED\nJa0t3N/8y+I8wV/PSk789TvtDG080zwKfJ/dq2+aY5djLVHnDJd5f1TozRFc\nvU6lcgmuc4+gsoJIrkGbUmT3KWOsHliggjwTwgmW73NOLZlbnDJWLMol5cxx\nhdqNny5N2yh6g8w+nf2ywyDHlA5FZOjvwIqSx/58HktjKrM7gozBYmx4K2oN\nmunLtj7IDPkv7MtHTwTuo1MsaJtolmtBXMECqNh7uvt9kGVPsheUokK8jKqh\n1lyepPrjy+VgXUGdAz4Pqg/EwzONrNOWbVL3IQ/XdU1psWIEdyhRVo6oNBfQ\nfo6mmAbPYaeWGtQUDjyYBk6IPmhk5wWmzpCIl15JPPoz5gqlG9OIfMTA0e5z\n+9B/UM80JB6ii4s5erAzujl4/ZC6oUnKZWopptpf91o5KNJgJ2Am9QnS3w1z\ntEU5\r\n=BW5n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwgrW8Vyg6IynKcbPOVOAdEStQ5+G5aZUPiVE0vl1wuAIgJ9CvO+JPnE5X3mP/uiMfTH3sVDBXIx1kK+j7RJWXOqA="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.4_1618829831048_0.9154916976623306"},"_hasShrinkwrap":false},"3.0.1-alpha.5":{"version":"3.0.1-alpha.5","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"46db72f77f569fadafce0c0f2e3b980e2f1a5c01","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.5","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-1fwixBlsskThg4dCJNyH+kjFtur5yoMj5S21hBo2158ggw00G2FV9ZBk2QlZTBPdUExuTL2/liX66mJXmV0XEw==","shasum":"02c1b03b1841e13a1115587288fd2ac71e19a8c3","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.5.tgz","fileCount":119,"unpackedSize":1114799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfWQYCRA9TVsSAnZWagAAIx0P/iLhM+BQKua/Uy8rty7J\nhOiSyllEJONeTJWDZ8vKfcjr5ABvh8xGVcHfge0esT4aVEEnG2RKouhBcXa2\nGO9rUy+50Th+mX98a/wnt7GhYmvBwQPrB5k5fFXDeHk3jWTGCA646pOmNwlc\n7fIBox588o+nzCpZEPBVWbc19z+0u9HJYeFpnAHRTG9QBcx51GNrYqFZqCk7\nPl1zJMYXyadFJX306EYfr6u+K8jpC4NGZVRa3OoEyASJOgFGmkG4VYRWcU6P\nM4uSiWMcKBku1jvU0uuBVUDVrWkDA7ESXKxNkt5A4bUm0G1IUa2MDEqX22jp\nMTawRSvZtsQKo+yFOyG9nQx+q/cAA0JxYPTii6YkRk52FbqQHzs2bP8f9Gp2\n3BfJtdghd922+bwiXvR1wFwBDgyuUzxHaQ4r8VUD0FyEmMXs4pItXhtkigb0\nITdlXg1tvRp/VfzOfBsG8Avk/BDCsePKW/I/tHk/y8oL2B07qDJYM/tEKOmg\nBmgbB8Qq1rD+YiXch1n0x+4vMtvJvU+ejy90zIDBFH897UxrO4fKxK/kJmac\nAvgQloAf5d9PGmhRjBV/GhVHRijo9FNrB5/rDHy/2FDImHFL+bDOkIYc8HMA\nVAasznReZ1DlFHf6Dh4yOeuSgAaMi/s3FlA+j8iyhwELHUpWjYEsa5rP5PA9\nlH3i\r\n=yGi7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvSCuQLFdv1rSZsKuJ88NCKyuqlQEvsTGm0cwwUBerRgIhAMT6aDJhKgIHE/KxfAozhi2B7iryji4XkIRHsdsmfEHI"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"sgwil","email":"gwilym@me.com"},{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.5_1618830359802_0.37338440610358115"},"_hasShrinkwrap":false},"3.0.1-alpha.6":{"version":"3.0.1-alpha.6","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"b482185d6dcc4d94ae83c429c112a87a60e7a0c4","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.6","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Wxkmh7ML1Js+JAOC05DPAI8dlAMHASaT0adxMNbVhEn9sAFXJLIfkLB2koffcJYWMDEI61iwdi752qLrLVMptg==","shasum":"3f0065deac6cbf98666692806431ffb11421dfe0","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.6.tgz","fileCount":119,"unpackedSize":1112177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg//NTCRA9TVsSAnZWagAA5JAP/18r5vOuLJteWRwsM08k\nWISOw6KC5pPCoPoldyX4mVy9xXnBf6t9ZQGGX4Vb7xd31m6aNVNobYMU6Rrz\ng2C/5nfn6K1PZYO5DBNyKMB8yBXcdDDkZijKudc5FHt+3Em54hV0xVXsUMCQ\nEpwitGa+fqZ1eeCK3UL8DCcIYhFrIdueEw8Y/r6nf8ntzpd2cN+nKT3LALIQ\njaUD9SNnoValgYL7r/NfNZbyfHHWdtMT4R6mX2bm1JFOi0/UqRoKR+9vK/gT\npRjqvXfL0K2eIohLHfHsGlM5x8uFqUbUP9r4BBBz2BoccMGqQNqdatdOEW7u\ncc2qXkPvKZq9v7iQ02aE4zm2gRU5IOb1O+UW+1H7dSf5O1MbzcT5F45ravep\nDUpG2rEeXES+NisgAjEbo5U+NnUa99vHaMedOQeTNrwO436gh5d2Lg4NLPsK\ngyajYe6txrbhouiiVVJN1tb43VzA5NGrFS5oQrXFVq1v0VwBZmRDwzkzfyDO\n5gyhGFKJl0auSelTCQoryTxHGqxQpaJ8VznUoLkxuJ5kprdjMaWVBv5BOaQr\n6BxMmdWaKyEEqI/A1oG+swi6DCBDxP51d5aVg/TeuCzJgbHmhlfnQSmKEDWB\nkLJkVCJAP5cF23iTBY+6EsI1npt0U6NJckHgjgWXyWcXZGBRYilImc9I/GN+\napPs\r\n=IzUS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtBjAmTpHnQn/Yxi7WHujZg5CZjF+sG2eYhQYV+/WnBwIgBfCvmjQUN6XDrONGEwDGTLjV0xCZFWDC2edHfPevSts="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.6_1627386707383_0.4331205235192048"},"_hasShrinkwrap":false},"3.0.1-alpha.7":{"version":"3.0.1-alpha.7","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"0099fdf07a9ed31fc8a2de1e626ad621b2b82d87","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.7","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-9zQaJxWfkbi0VdYVdtSj49eYi9sCEuI2qDRElhYgapD5ZwBwhs8z5E562K6xSN0vu5SyHCXg9ADXF7Z4kRDCJQ==","shasum":"8c27bceb5cc5491923c38b5de3a0889a082b0168","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.7.tgz","fileCount":119,"unpackedSize":1112183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFSpQCRA9TVsSAnZWagAAUwgQAIoXJAYTgmFmm6BgNVvq\nm62Uh0LgftQqtmjMVIrP1BHibp/O65SxYhHrjFsgU1JcYLBphXG+/3TLkqxj\nUvYbEBLTXqNs7t34/FesAgvZTsSJwjv2gFDOAUy/U3Y8VSx+23hAZhmKC2fw\nCnnz/0Vivex+vTnxAjT1/D+0DbjLrRYAxoLyDuDuskJG/nowWJrqQBmeRMT7\n+B64burjC58eig+KwuFRo4xup3O7a4hgHb7DYIwdh1/DZYq+2OKal4MQlJQ7\nlpfiKQUNOz4O46TpoqQ2x5SlOHNy1HQMzi7hMGFiFigDi3j1JpKSwcT3En2G\nTNA12xfMCDydMqmtFB6lXFlJ4R7IkLn6ZezyKH4X1zUsmMB3XdOI30xqKUIX\n0Fktd8I33b/NwpeF8EdHy2ZOIyho4ZMr6o9fzJDr+sdLNxqhCl5AYqKoXKNt\nr8p0feabta0UDBS/EbO5pHGXwcAVFvwz+sDbHnnrrA9pnudtgTa/eRcYpWaW\nqVPN81bitBbwCr4Bx8nrgaFPwwqQALYOcIHpsqjjSRtHzzfPqp23uukkZIzs\nkLbVVaFGMfPZZ2lpkObqAu/MYJCWhVnou3ErbC91RjISU3hsq9IBQg+X32DG\n5QXQkrosWnR627bAnqyOAF5LoZwGnEuCcR+eXSVii7gnZeumGVEJCDPmYG39\nI0Oz\r\n=VGju\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+JN3VxFHPriYimlqRyM0yyQDZJsYkTnNH4rRE3Frd5AiEA2WQZN2HK+O00FZFk+hFqErTSrHMtDRpN8Konjv4Vi7Q="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.7_1628777040374_0.008365930642988406"},"_hasShrinkwrap":false},"3.0.1-alpha.8":{"version":"3.0.1-alpha.8","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"217e02a8693981de213f0242b7ab724c3c1743fa","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.8","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-9eS8p7HWGb83cD0996OI2eud4n4K5ojWSqDI1GqOfXWVHcNGp3Uu8zt6tLFYK/5pNING8sa3E2XvpAOVfMhYBA==","shasum":"c4c8a5baecd3e402b210c78a3f644f697e43a7bb","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.8.tgz","fileCount":119,"unpackedSize":1115311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFSuSCRA9TVsSAnZWagAAKLIP/i2/JRBsWG+WX/iEVlCa\nPzRll+i0wNNba0Yr1Q/Tpp7GEuet7acIxBFGiebDibr4XpIIA3ms+AcNRtC4\nQTEKCvW8n3Q+pjGHuC8ERBSDPgBOB4HvMuu3HnUWsIz2VhKhOzDqG9w+q/cd\nbfdudQ4CAay8WWM+Qd8DUhltL7k1ZfU1gVLKCQGBMUIEsJTT3Dm4797jhG5J\nPwRuLu3RnccByrGyjvFNHuuEtQwCwWXIRc0/ZdPNXQ4/lk90HQALFi3Ix7Ay\nEKUoRYUrtu5NxGa6nh2pboSEC1EtyljJs90SiM+Ux3KUzRwGVzhyjdSgJvkK\n40HbVfvL5HghhKBJY+JGIDhx8N/A46g6XEDTotWFSJeOmgrSO8R62A6iRdPI\nQjblwZWHggV1RH+ru06JM8H5K0Q6SW7r+ukGHXVb3ndQn0N9++Y0qXfvE70Q\nowdAcXelIxQfr7B69xZg4aNUlT89Xomgekx+W7bSZ4MAgN412E32zrKTVQGZ\nd+ApsTqxrY70oxFNGmtl7YimBZHey29C1TtMAkYqpWpydbGX7T36J2ag66wy\nIpjAapeNcQYcLmobUgrkLprbDAljoxTcF/A4zwtFNl/2LJNhI40dgTiPWVJt\nPrfrouaw8QsXE7ztyxZBZGRaIiz8O+SJhHfyL8VhbqppMounJxTnXjAhWHnB\nPFpE\r\n=wDKz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr4kDadk3Gr4zznfn+UiBn1keY5pszSwJsth5U9FLnkgIhAOYLD+OxBZGD2Y4pHkJEzODjoG5zRr/tvmLdK3/9xhq+"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.8_1628777362181_0.18182263263956355"},"_hasShrinkwrap":false},"3.0.1-alpha.9":{"version":"3.0.1-alpha.9","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"d9ddd5825ac3b3a60a1eb780864713be324f9d3a","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.9","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-lQjfR6OLA5LMg2rYc713DrWdAQOx5Ugt1REfZmLwSQQcRXcAWU4O20Ti5vR6N2U+Bw2SMQfGEFwkmVolUzqO0w==","shasum":"dc96699b1df18936145ae25d3f21b80c7dc7f4a3","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.9.tgz","fileCount":119,"unpackedSize":1115993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFTbyCRA9TVsSAnZWagAAJaUQAKTJgzRV/ALAj4Cr9Xwb\nhsQe0MoJwJHXSIbyoaF4njF89HUsnmARNXzKWqC54M+06HhTdVOIQD2hOMAf\nObOSyWLxJqJkYE9xeTO5O9wGX+Q5EhIBv3ob3P/A5o4jAJE9iiD0ZS1vclEt\nfLAo2XUxnMpsvdjAYKWmCWHwnGpcUfj4g+6jhtZoVwxmZVgwdPiPyNzkA/UY\nnzIvXemUcjlUCgxNJ0TmWOvmOgqhWuXtLFEhnIYBSvmxfrwuqyQRztjWEyFV\noV5Y5PKDSH3ppNBSoTsnXqM3f09CAE2TVttiZEfFPpNPuSGEAkMR6Mx/LbzZ\n0V5WCJBB4vIzAzl87ZMVn7CiyrruEnf0YoSmCpLBLJMiF+wuSnIxmmx3luZ/\nBlGSAayCCNj3QZRQSyUqCb9IYj+txKctSEkt55CDe3TPJof+H99cMaSNMxXX\n9M957i5UADGpHPy0dwbhZf8nShyBk3CplVvwJ5/NPYcJb8JheC/wiHYQ74WS\n2g66i269LPNShJtbDtQ1allv9A16u3WZcxYRc3PIjJ0SFfhb3ZMhhe3zItza\nLNoE536DEX6Vmsa3TJtkT7f/Jm5IQvt3H0UC5tJ83tQDn2pOeUNd8UwwoK07\n5ZPszsiqTYwl8ICIroP+QeEni642bmJWpCYU38LWkeIcRsjy59Ygo4CkvyGp\nRoc8\r\n=5Mdi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlvC/yCH9qTeEyTB2JTcvONBC7xqn1vTml/QRoLvP1CAiAxqsA6QWrlHmlU7C6ICUXJpYALq1PzkTvcYHqYnJzNTg=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.9_1628780273900_0.03245572297061461"},"_hasShrinkwrap":false},"3.0.1-alpha.10":{"version":"3.0.1-alpha.10","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"2135e52988990c2c9a69b120a68ee2190cbf6254","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.10","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-UdM4GPpITU6bPMOv0qSCPwDBS1aiLpYMQMBOXd+vGKvY3pGDWUmioiL+6w0wz3oiRZHFH3yzDEktokXFJGxllA==","shasum":"bc874310826aac3f1f68286d753994486d42d370","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.10.tgz","fileCount":119,"unpackedSize":1111936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFTrCCRA9TVsSAnZWagAAff0QAId9Zpxj/+3d9K3hA9Nd\nq+AbN8UxSL6UMsZHw3V6lCsQIS47M0RHtDQlRQxDHoqPmWXA8jGeAeMhnBMH\nAdzcr3+TGhJwRkOYE7e4TQu45kbVmQfj1CUUMNi8E/qhRJ0ZM74zwUEo3cIi\nBwrTyapknekraxlwOf13ouFudcpw3G0gW/LvHRWXTv2tKrfHEe86oUUAO1kL\n5iqLAW14MhojMmfI9tM2xJOzGMM5vIy+qGWuOZw6Bjld0h/lvL9dYxNXhCrc\nSF0tWDVGd8HwLp7/iwx5ejgsumU7XxvpBT2/D9KvPNpVO0KJyuNWw9pCgXmP\n2viLoYMlyFHfx0DMGR5jHNuxvHQS0nH1AnIf3lYKE2PTW3idBf/yT5x5dzle\niBugJgfyhjwDfpYVE6AWMIDiCt19JZldklL3yjlb45VGYX0/nqeY1uknNv2f\nQ0msyaa4uh5Nn5F0l9623qmMhxz2W6Tg2B/ftXCx0fO8b8ZKDjxHNI7fQytR\nMgvOj+JQqXn7OtU/GiUH8Ns6/CURpU2OAwC7qrH0HyOO4M4AivO4c7CHX53s\ne4bZwPQRQ8znw1/1pwLrmJwG/jQEmfXvBqEJCPWK1SJSt0/dA/LJJBJ2e7JR\ngXwklDDNohvTalgc9uC/JGmgJyDS7SGIivHjLmL7VjGNcxSSR/fG9yZHRe7o\nf2KC\r\n=ozxu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdYKsdlcpLvu7hrUDzhDWDhCNOLOXANX7HTywmiF3gkwIhAJDdT9J8kgi+yO5TXk/X43TJJRr9IWE+vkf0MUmdFIYs"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.10_1628781250593_0.6386134011437778"},"_hasShrinkwrap":false},"3.0.1-alpha.11":{"version":"3.0.1-alpha.11","description":"A React toolkit for making collaborative, offline-first apps for small groups.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","components-example":"parcel examples/components/index.html","earthbar-example":"parcel examples/earthbar/index.html"},"peerDependencies":{"earthstar":"^6.3.5","react":"~16.13.1"},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"module":"dist/react-earthstar.esm.js","devDependencies":{"@testing-library/react-hooks":"^3.4.2","@types/jest":"^26.0.14","@types/react-dom":"^16.9.8","babel-jest":"^26.5.2","earthstar":"^6.3.5","eslint-plugin-react-hooks":"^4.1.2","husky":"^4.3.0","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"~16.13.1","react-dom":"^16.13.1","react-test-renderer":"^16.13.1","ts-jest":"^26.4.1","tsdx":"^0.14.0","tslib":"^2.0.1","typescript":"4.0.3"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"@reach/alert":"^0.11.2","@reach/auto-id":"^0.11.2","@reach/combobox":"^0.12.1","@reach/descendants":"0.11.2","@reach/utils":"^0.11.2","fast-equals":"^2.0.0","use-deep-compare-effect":"^1.4.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"2981e83b8d9a8827c1fd889053ef0a7826a4163e","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.11","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-GOmAoFaYAD+eBht5k+ZF01V8Iy9YUDOECy3nLSeBaLhThpt3mUIygfMgbW+HSkHpxz1FkZ8/YagHivzXD0sZZg==","shasum":"0374d258e6b7f78fefb8abc65fec845fec7a749c","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.11.tgz","fileCount":119,"unpackedSize":1116254,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn2YwTMUSZvOAUEFt0rbMvY+PPnFc+H/SuAzYLyPXyRAIhAODTeFtGMVLwXypbmUfTPoPrr+U1CPkKz4aSIhoY/slK"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.11_1635963335513_0.7017316628770225"},"_hasShrinkwrap":false},"3.0.1-alpha.12":{"version":"3.0.1-alpha.12","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build"},"peerDependencies":{"earthstar":"8.0.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.0.0","eslint-plugin-react-hooks":"^4.1.2","jest":"^27.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.12","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Eo54NjcvTI+vXCWgDIq9hsRPYSjHlmwHvLaikbzsa5qAFCJvnwZg8T8wfsiLb4v8XI1Qzgu/ItT2+GweNAZ6yA==","shasum":"9f10a6c3686e8e715eb137df03fbe37f958e8899","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.12.tgz","fileCount":19,"unpackedSize":94643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIJZZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZZw/+IMyoxnlPBxTaNsMyHmtJBAAoxOhBmmLg1HB0mEshjuwWI5Rc\r\nJMGRECX83jfGW6TzeWoHTW48eKhLyMBzPIjfjmiNi7vUNwpBHrwYhF/5cSHR\r\njCJHp+d48hj0BCGWZm5m08LpNWH2eNuJOsL144tFaiWuntwLg2nXwu7zUhBQ\r\npcfYT3tjTVL2uGm3Kt8PqnUoiOwnJ+PCZtwcMkdjue1f2Vl6jo/nnO4BUtu1\r\n8uWFZdis7QUp4sYoZG/6UkT9HAzbp73DXLkqNywdJ9yYqohgMEEJxOPYwKU2\r\n70l68M4+8e+RPok4F4oNdiAMPUrO5MOyKTqHIgJRwc1fRLmdL/W8PGffGpnd\r\nnUybO1kHJJ1Qa7MVDTqVMm00CQzBFqtY1Ra19kyrWR9tEqO2UfoSKJrnGLZw\r\nFXV9PO+gP7cD1oKGbJpFZzQMZTy+tZhySDu+iVBnwuY5gY2EZ7o/HH7mQRYL\r\nlyuoxIfkNc9plobRtFECl/KLf3KmofcLXIbxXDIn1xFlEBdq7E4D9nwhcZLa\r\nDLadHW+PhUlKAZWHqvR5l0uIwsA2lg+RISH6EnkC2jlkDxuW3SJafkw2stm0\r\nbFsgTzd3W/XHgsbGtM7tahMfBWXKc4ICOLSe0zh2fbNwhnSz+nZyCsFUmgOU\r\nhwqTU9all99+hyy8lqKV3EeAwhh+GBvYHL4=\r\n=FT9M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0OqsEDa9AkXxd2+ajreZY4Q9vdBqPweuq5l8l+BpENgIgMLkcOArBZwAQb4wJFUBbpmRf6pCqcRj02wXQ/7jM3Rk="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.12_1646302809461_0.8201558896938153"},"_hasShrinkwrap":false},"3.0.1-alpha.13":{"version":"3.0.1-alpha.13","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build"},"peerDependencies":{"earthstar":"8.1.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.1.0","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.13","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-xtz6tZg2nyiYUl1PQRrMDNX1QvBUvpfr/9WsrnVDbkYVzj+S61N2BWYpgpU3JWZzEatum2Ev4sIyMEfE6SOF9A==","shasum":"9a09f346a97e0d4ccfeb542e3ae1a9db29a75027","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.13.tgz","fileCount":19,"unpackedSize":95185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiILqNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriqQ//SMqvTjJO7U2eCdi//jlE2svYHpPEVBxr5Ixkvu30bZO6+JLt\r\nqTi8lUOK9tl5b+kqlvxulX2nQQwiQaJ8Dz7NMuxH7k0EAJMjC6A8fge1Pzt6\r\njQvxAGdiopzmmg81GXCwfXQbKui/tETGjdfNiDa2WAunLkZbZteSIOZ6ZbB9\r\nd4nnGZqZ95X3Abcnj+RfjjbwRWQbHrUa52DkGXeGulW8ex4t9pEYJZyqKpII\r\nr/h4/oGdCZXfF8S5pMqBRS21lpLdpD/F8zafgSYA4RDSxiVetsgVfXy/eK3W\r\n9AycGLcAl8W/k8o07h4R8l2zmO/nw2mv+EQ7O/gMR5t/+YYDUhWzhmAYSoml\r\nd5Fzp12djVkhNERQsfRAqRDhrfSTRH83hljCrOO2Yh2x1B0IEN2PZrF66vyj\r\nFdvmE06nG6F7YNJY/yx3OlEWNI7doAz042QKSpg/3byFOhlCxEMowX9FRNkX\r\ndYGOB9NeiVqeLaBPg747IOcImDD/6fFqG5MDKyWz0h6U4CC5PKw9e0AJQf0x\r\n5EoEO3ytnBnoQyVVR9C6cOqnVE9zoW6jq/sAAv72G9hvotJ8CaDsgO7o0+1z\r\nfTU//a8HSMUuZp57tJxdyB4x901VApv9Zj38xC/zbxOGEsnOaFosd7gdX3af\r\nZwPvtl3Smdd3YbZoXUXUPr8lTL2h9xmjyuA=\r\n=EMwQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFfPMtaEtS+OKn+LpD4iDRToLUHIXjoJyYWi0xaqeg7AiA5HANsQ79/g3pBFGl/BhsEw5O2gl2GCnALhG5xxg29iQ=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.13_1646312077534_0.2196689622443826"},"_hasShrinkwrap":false},"3.0.1-alpha.14":{"version":"3.0.1-alpha.14","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build"},"peerDependencies":{"earthstar":"8.1.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.1.0","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","parcel":"^1.12.4","react":"17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.14","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-HpL0aOTvFRLjPzxp50Y9NN4L2syRbAVzMRiJVTEHsPk4gJ6fOmquV9rq7m6HKxZ9Mt3+0lDF2S/w4F+Orxwdag==","shasum":"9d211650f745799a241196ac078ae11d52c98c72","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.14.tgz","fileCount":19,"unpackedSize":95161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiILwgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvYw/+KnhRUnjgSTpdNz8w5RKqsfRDbdFctKXDJ4JgjfhD3AcK+vQQ\r\n9a847rH8BNoIWj2Ku7U2p4t2hsiC4TmA3Tkpm8l5XkXFC1laiQ5lXTxtrqD+\r\n21Q2CiDnep9QwwEb+yznhwgu/0ix5EmYm1URJa+lbSXZ7VI9xZpyU9oYE9vI\r\nI1zZUE3R9zlcyJND5xsrfyPeI5eQGCOl1uJvlw4jms2+VfxhKjXJsUgdu2cE\r\nSZjMUzEr1lHjxud+XbGcZ93E6Zo32qtXWKa58UygSvAkA3BzLxyFbV1hYAqD\r\nyv3p6eofHrwj7kZvPJAzvg29T2ZMSy6eisFwsujLgELua5wi/hJTCF6dHn+1\r\nLHDK41ioB2gQQJuCfH2AuSrzvlrTzk7Ae/2E89q8XXCvFooXpXC5D00BDiyg\r\nliu1sUvkYRS0UUu2BeDFLXR8HTWoHDGfpOo2b3EBxDVUAieGQFk71FD60C2b\r\nGjYRGq9pzBSQ0H1Wkz6q+L8WdK/FfoM5e8GtLgjK8d5CKnZU0RFtV+OzEqSI\r\nTN8K18LM6OG9MocYQVlY8h5zXoUkaQ4Bmk0aX7Ul+w8nYBYfkYjIIue9/S4h\r\nyAKU9Vd+CfCFWq+idyQZnQXG9HktWK5rkRj6eRgm/PU5NhDf7ptA26h2Dktj\r\npG2w6UUkS2kkGYlg+0JxofXAKPSNI+VACT0=\r\n=kD3z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAcYzj3Gg0EDGOjejIzJzrwwlSUwhcu/+EREIbfLVRE7AiEA/ornMTFyhGkACFUrLwUz8Wvye1awAPs5++HCPhDyaME="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.14_1646312480515_0.7510790068138691"},"_hasShrinkwrap":false},"3.0.1-alpha.15":{"version":"3.0.1-alpha.15","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build"},"peerDependencies":{"earthstar":"8.1.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.1.0","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^1.12.4","react":"17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"readme":"# react-earthstar\n\n## What is this?\n\nreact-earthstar is a UI toolkit for making collaborative, offline-first applets for small groups. Your applet's data is stored with the peers who use it, and on infrastructure you own or trust.\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\nThis is all made possible by the [Earthstar](https://github.com/earthstar-project/earthstar) protocol.\n\n## What's Earthstar?\n\nWe all want apps where we can look at and change data together: stuff like documents, events, or messages.\n\nBut where is all that kept? And who do we trust it with?\n\nEarthstar is **on offline-first, distributed, syncable, embedded document database for use in p2p software — in browsers and outside of browsers**.\n\nEarthstar's model is: **Workspaces** store **Documents**, which are written and edited by **Authors**. Workspaces' data are propagated by **Pub Servers**.\n\n### Workspaces\n\nIt's like a shared folder for a small group of people. You could have separate workspaces for your family, your D&D party, or book club. A workspace stores many documents.\n\n### Documents\n\nDocuments are stored at paths like `/wiki/gardening/cabbage.txt` They can store any data which can be represented as a UTF-8 string, and their contents can be edited and deleted. They can have editing permissions. They can even be set to automatically delete themselves after a period of time.\n\n### Authors\n\nAuthors are identities used for writing and editing documents. They have a public address and a secret, which are used together to cryptographically prove an author is who they say they are. You can have one or many.\n\n### Pubs\n\nWhile peers _could_ sync data directly to one another, with small groups there's a decent chance no-one else is online when you are. Pubs are little mini-servers used to sync workspace data with peers. They have no special authority over data. They are designed to be very easy to run.\n\n## So what's react-earthstar again?\n\nThis package offers several layers of convenience around Earthstar: React hooks for writing and reading data from workspaces, pre-made components for common tasks, and even a full-blown control centre that does all the table-stakes stuff for you.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `EarthstarPeer` component somewhere near the root of your app:\n\n```jsx\nimport { EarthstarPeer } from 'react-earthstar';\n\nfunction App() {\n  return (\n    <EarthstarPeer>\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </EarthstarPeer>\n  );\n}\n```\n\nUnder the hood, `EarthstarPeer` coordinates the state of your Earthstar app: things like the current user, known workspaces, or whether syncing is active or not.\n\nWith `EarthstarPeer` wrapped around your app, you're ready to go.\n\n## Build your app\n\nClick below for learning about these with their own docs\n\n- [EarthstarPeer](docs/earthstarpeer.md) - Learn more about configuring <EarthstarPeer>\n- [Hooks](docs/hooks.md) - Learn how to access and write data and app state with hooks\n- [Earthbar](docs/earthbar.md) - Pre-made, customisable control center for common earthstar tasks — learn how to customise and style it here\n- [Components](docs/components.md) - Pre-made UIs to make your life easy! - learn what's available and how to style here\n- [Styling](docs/styling.md) How to style components from this package with pre-made themes, or do it yourself!\n","readmeFilename":"README.md","gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.15","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-LiT8K4CbLat3HCFZXm8lWxkMHw/VnaM6WtuPd0iy82R7rAh423Dn9CKrQgzYTwlyl6nL/d56n2f8JoFacl6q3g==","shasum":"8f32f715488a4028fa1e314bffbb8605476af5b8","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.15.tgz","fileCount":19,"unpackedSize":98638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIMqeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTABAAgiBjBh7rCFG42p11Zk6UpaPZ6HzUcEqAMEy1MQAX4DRuMe5O\r\nQO+pnINu28iTA++EANfJJbRgZM0pkiGG0Iq30lPZ5wK9pudyb9qdVKumOi4a\r\npnyNg5AGo2TY2/53P650lszrGAOumSgN/HNkd6xMS0fqqgc0HzJGF4HjmJI7\r\n/JOj3+9tXfEjXZLJvgPKlZBvOJEaIDGblV4uZSdtECvlQc951zEsAS/gtkbs\r\n4sXZT3sPRPHwP3CnkBFQcSmg7lLJqjE3zUdg1oM0pM0FHd16rG7m2PuDQJrk\r\nQl6ibIRwc7GFva7jtXd5Pn8Pe5q78IrkGfaijLhGwiuUIBuPxqlLjs90Q+fz\r\nbXtrZbir4/+eU6GLKXxWqMvM6kVJusKMqO71FzFDxbLxLrBY51fk2lJtGy8l\r\nqMOyQuI+YwY7JEB1GQNOzu9IC9xaNr4kOpuWVn1kHbH9YZivKKbXDe8rme/+\r\nKZR66JSeUd/mJ1doeGOKy8jMssNu7iKbKMArXXtQy0gJDELjy1BIvW5lHwPw\r\nQf9R+Q39Iw4o36SNWGy4ybkNifZOAbyC4b5HhTqSuBcIfF1cGwhyvdHURCL9\r\n4aal7ZfhMGKteK2zAGy6HYjbM1wswKcGOK4qIT46TvJZ7HHovkbo6RRxNOgc\r\nrW3XvU9l56LvCnQW5L5SPvQBDjK265YUJtw=\r\n=QtG5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdOH6JVlrAsK1hpVvYDWBAOVC/FSdOZYUO8rZojTzeFgIgUmdL/LoyIV4RTqk+aKF8ofLmed7R7ysOsBOiSpqWq00="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.15_1646316190535_0.12179436114534647"},"_hasShrinkwrap":false},"3.0.1-alpha.16":{"version":"3.0.1-alpha.16","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.1.3","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.1.3","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.16","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-mPu4Px8d6emxG+LE9vL/rJTA7JHZQf5jSu3RYnOK4jA546/KIYI0dCUqJ403JVxWUuLmHZMjVTDft9LpskTIWA==","shasum":"03f74b514aa44130e91f78bf9486d354af95a04f","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.16.tgz","fileCount":22,"unpackedSize":4656035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIRomACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoa5w/+LPPpScC3C38p7kyWYHnmwIJcV62E/2XigPGNa4KWd0wYipxF\r\n7Ms/leq3b9Y4xswyFVUGrCN55GEZXYQtCNyIva6cjPzKeeFV66oDIJuiH+Ry\r\nFiCwQHvUX1RHzfiuSH5enl11inD83KBrcQuHEeQTF8hNx9ASUI/NmHMwBUuz\r\n4yBKDfBBNPVpPVRiOnOmP4Ccx4tcaLYImRVXWje8VnvdpUuNkgD45kXgzHWQ\r\nmk6cHlPp54Sb+qf3O7+cT1N9+xroP784QzECGZbc2i3rXNZBpqqiqchL1Slx\r\nOaMPdSRZthlE67vJS4Iop+rm0NNP9KtVmelnTOqCqkQ1c3+Vvp3bc9u0uUj/\r\nHsrKQe8ZK4YdIOgwehi8dneQD+pEfXzKiCJzd/yqzCaL4mbAtZf/oNqX1w1z\r\nRIWVsPQt53TkE7KiC74h2wz2BOMCgWuGWe9czTxNRwLd2yMj1ZM/vd1SbaRS\r\nGe3xYtjqSXsZwgGCK85tYPztMEXzuxwhKEox7FyfENN7RUyOubTeenPUq6co\r\n6ELj0OpqF7HHum5iWbmMJxZiTJUuox4eQjwtRGW6jOXIxWu+RhSbW9YOI+FW\r\nN5p/ZhrYD3QzZ9cApcYfhO9mdznzfBcZgqAVVE4u8VowHizx/u8MJ9apEfo8\r\n/qcOD1bufjoU8+7G3eFRJzmqRhH7UzbfZFo=\r\n=E4hp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMty5opYdtLW787BUDJErZAJCZ35hO2tCJxVMj+Zgq7wIgGeW3py7tohhoAzdscynVge6xLL+jVZ+POh1+d76Y11o="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.16_1646336550480_0.4540350323826623"},"_hasShrinkwrap":false},"3.0.1-alpha.17":{"version":"3.0.1-alpha.17","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.1.3","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.1.3","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.17","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-TH8YdJlvuV+sGtlEyqZFBOVOmfzP0teRQtbiJOQS2uZXWTmpSBvMLnunyp00eqooSic/1N4o9VfRBz+XUvDG8Q==","shasum":"4dd621c6d241e40075f9fa7e27fdd4f6e4db94ca","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.17.tgz","fileCount":22,"unpackedSize":4619869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiISJrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfWw/+NEXxkwEVHL3LsUQQcUoO8rr+sZtGsPiwledvo/a6zg5BwppT\r\nAboZsLgNrXhCL/7jmq6H/GaXPdMcB7ZlWeBT4Gq/Pv0a94mFDMXFK3OnTVnu\r\nu/fcnDO+BCUiBK1owzT2TtPcvzWAUVdiJqiVN8svmliNt6t/dRt3tvu1VKmh\r\n2aDAjX9K/7JrnDFWdU0SuMOBxVvmntbfpUXnGMarWa03QE/7Bq82u1+57Zer\r\niLg5kD67ggefJTdQ+ENtnJqynPqTMe5ThDvhpx0gzeAP852AmHcC7IZl+68C\r\nEK9Klp+JTs24dFJtR9siioI+vIxW8PGSvsxgWI4VEFPXi1CvkXTjWn5mXwD2\r\nugPtPoylnaKp4DNXB6e60DTXHJD6movvFHfQqd1jhWEy6txk6zrb0Wl6o5tY\r\ngN0uybvJRjGpkyB3Pr+mglMc1MvyaVDxqOkkx44hQS6pOg2zu6UVX23QBrt0\r\n0o2k3uTV1WSU8DLj46+4Bg7OKQTGAypQfEsjnbek9Sy26cVYOUO4Y557SfRs\r\nhi3Y1bONpvnRykQHok4iuOH7uDsUexErm6slMIT9JvhHC7rB867upfPuo8a1\r\n9i0kz/iW8QFvaXtrdEfsUDMCkEd+TYx/KyjsG5F8njRFAL2IyyZZEUiFFVl3\r\nPc51w7zxWUt3Dejs0/o4I4EU30q7F0gqc+Y=\r\n=eTqh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnSa7xabPqc5+zo3lijeLP51P5+sz3p4orinA9eBkVqAiBHDi5KBL2NIdNsFjm0+cUH4DE/HMoB1mkleLUdlMEdiw=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.17_1646338667638_0.03361877699184146"},"_hasShrinkwrap":false},"3.0.1-alpha.18":{"version":"3.0.1-alpha.18","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.2.0","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.18","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-g7ZTe5xTYDa8ST9wYRFjXAAiEXgHuEqmW/qDzCFYPg778ObcS5fBtbMRi1r4/ws6C2HZduhWZkhpVZLBgDGdfw==","shasum":"1bafdd29ad8e1b7fad3be3139195d82f749676a9","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.18.tgz","fileCount":22,"unpackedSize":4657435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIhbhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrzpw/7BcSinQM/0DgaGHJDt+qzMcI4unaLf3gJFoso8ZGbk1/Yfj5d\r\nXoy3GoytD5LEVlA416fCp6bMnjwLR+XLTkS+K9KKxDmDFtk7sa2QngH32ZLJ\r\nJFAQRn64k4MOhawT93nsy5uNwXEl4CAjOyqHr7qRKqvBb/Oa/5U9EYChssgf\r\nGYobcpHletyuGuG5cCxZ2r5mFyckqPV4nFDe+Id66IMGkoq6/Ojp5GGDTzEs\r\nn3dIvszh8iR1Z+fRS2r76qEWtRliTISmLhm+uoVvlN3cD2LmW5Svl/H+1ofI\r\nd045tqq/zg0rDZMWSiPBShvlYux4QfRwQz3qVJCiIRzqaVNbBRT79a17T0l4\r\np4YIW0YvrXQddKI3jbXKq/Ur6NBEVWvvlcz33Vf2iKOIUMpVBZlkV5sJBFUI\r\nauTzb51aSaeAbx7jaQeRKFCLRVRWJCLXYNkOun5Ib24f5TmpW5ieJXWZq0ni\r\ntQlXUy7ObmqSFdaesad4h+nhwuEt4tD7i0kYgrKJAKEsRQF59x4xcrieJfdI\r\ne74H0u8Zy16NXEdsFsNRvXaQDjgblFI/P/6I2utddYEaqFJwm20Ii2yyj30T\r\ne8/ce2r/FUcWWAqJOFHpq6KOuaRoptHskRFNMfdt9OldnVEP1186Ra2LaCZz\r\neX2KiOmsLzM+gNn2IIUY+eFoSOGVUUCibPc=\r\n=UKZ/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc2bRvYv1sw+pBM/Ml1RJYTnroUqKiIR6PuqS+UKhUWAIhAITwKUiJjR+sNkuJW1IzT0SUXGv7Uqp1+v0/SEdbRCg7"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.18_1646401249544_0.06579729299359727"},"_hasShrinkwrap":false},"3.0.1-alpha.19":{"version":"3.0.1-alpha.19","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.0","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.2.0","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.19","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-5tpNPBBGEO0E/xQxug5WW9NkealKi1VOD7habPCREyOys0Sf28cJy83rs2nrKh+AAXLnoYkNjIOqStUSRwEBgQ==","shasum":"443ad677296da49c1568162a728d38852fd6ed03","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.19.tgz","fileCount":22,"unpackedSize":4606533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIigBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprWg/+KY0uLJi/nWkINbAzw7EEOugySjZ+JapuUVV6T/TyYFPht078\r\n20PE8KAaEkR+aTVWeb961ySGcSLVUW6gqhLqtLYyBYiucsydfL8AE3uUB+aT\r\nNy6YHvdarfNrJJbID6ZVulMo/j3XH/qhcob7z7SYOWbARhprMdJY99fHWAAU\r\np9T0X3NH5bfP1u8lJ8/htqxcpUvVipxdQH+0NZVxg2NYAwGmLOANP2Yt5LvK\r\nl+rmC+eEXxYAYP8ts4voW95/sP5wZAT0Rcr4XmAg7Kus3gT7CQayk9+pqtsU\r\nKXecxN4SDl6irJEV3y7ZwkKHtZOnRxbjfcSQvglyoOxQAbUKg2NjFY66ur+S\r\nIiDUCjHTs/Rtn2xPjQkC5EbsqC9q0VcD34lvmdq8CqeDDfdj2/9CUukHWfba\r\ncKcd8rRSO1hQudI45WFVL8uWrMfSAYNFJxF3EToZ7rK2ob6Vd4HvWLmw2O4E\r\npa5FivtaWmsMExQ+T80JkV/1o3Ub5usLAbzBcCAc2RHa/4CzXVgNIsEuRUgX\r\nXBiknNA+ejGERF2yj+DbMuGIChy2WE2I/B7Oh9BUq998E4DBPjEw953LXXlZ\r\nQQcIsNgCn1uZcmMXJvUQPX7m0FiJ5SUCtPWIO1Wbh7z+JLO7zrabShYutT49\r\n8mWD423fq4X04I+xEPpXoFh5yQVG/m+5NZc=\r\n=86+c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4Ye73w3tbnMe/YNNaYKlrMwinNV8D2aaubBKhykxh6AIgFnNfxk218XtNAvI6sGn/fy28xJx6VAcN0wBBtnkehcQ="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.19_1646405633011_0.3171130546211176"},"_hasShrinkwrap":false},"3.0.1-alpha.20":{"version":"3.0.1-alpha.20","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.2","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.2.2","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.20","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-9dPnT3+RuFIPpxPctZM7/FUZnZnordMABkfSTxzFOeAfeqUzyU5Tqc/wuDRhDNuemZYMfKDqlV4vCyA5r0hrdw==","shasum":"1a9f22b2d465761d788a2762e534ef90277dee84","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.20.tgz","fileCount":22,"unpackedSize":4616658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKiJLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoxkw//fnSi429CfAe29GoyiV/maiWNgp1ogJHDgV5AAhwl5ewGTG1q\r\nZ44i6q4OGnRStHjXTOYCjuoEF8rvmFVUeSTOqUQyFsDi8bxcNiD5QXVs28XK\r\nsLGaGzfzppHQZ/KumiqlPjalg9B8EYK+j7kBjv9PgSXnJIMevontQSEuwd73\r\nENJnTkWy0O/UjWwFay2OQmYyaZfnIs9XPNE07EgeJSVnFrpax/sFYYhNbfsI\r\njMlbcvgQKyz0hHWP6CmS9nw8OmXu6brg1fabQlKnoGmmloaQRGlqGP91crFt\r\nEDdQaD6jHRYJbETf0bmFAFu19kboPgR6RTsDiPgz51vrrBoTc2zfLOfl9Frb\r\nEa6jFKMbL0PDtfHJHb1g92WdY0QGTvL78zk7prL8JDG9GCPY/XZiNoS50hqz\r\nxYbNIr/UNml4xekR6VuQx4PdvfZLOSwK+t8uRnEdXhrm/1hhRpSloMOJcrBe\r\nk5RUjJFBQ5jJmfU7cYtfe3++NSK+sdz0+X0k4TufMjnsNxq4KszN6NezLhZB\r\n61MGw++rS0AT5q1rjFG0ItYtIBbDr+hKN//I/3eaZJj99glOEnh0UHdDrFKB\r\niSCRKTs/IrYn63HxjTIrc+vq+X0Ep+jmJa5n+m8Sh6Ik8wDjFOLn79kyxwDK\r\nkU2JiHIIdeRmCne0FE4l5VoOzKwL0nT2+nU=\r\n=DDhj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFS0NPK8KKYXXhNBUbLSi95Hs69YSda0zyKgn5rXK/ZDAiEAkIt9HfbOX2uv161ZM9tJ2pruOC8jp1Qba+ZR9pNmVhE="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.20_1646928459769_0.24505056645586776"},"_hasShrinkwrap":false},"3.0.1-alpha.21":{"version":"3.0.1-alpha.21","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.2","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.2.2","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.21","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-xmaGLIAbMJDOyNbBCyVROCgDp0bb2+xntLwVIcPdMGxsLKlxw8z9yvnhzUu1/ZK8z0Sba9xQPlUt/TgZZgvFWA==","shasum":"d13214a27eca2e77b8f767bb62c5f5e6c3543c20","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.21.tgz","fileCount":22,"unpackedSize":4618086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKw+SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5aQ//aWEEMdJt1qdRlRmzTgTpiSP2zN6z3FN++He446aRtdmVf5ew\r\ntbOXHzX8WGC4R4p9yk85skt7r01onXBgHc47sfiUdm3yc1WJbq7yLsAs1ZNC\r\nSMcsl9cex5HkggT40lDYJZqTZ5wfRwm2T0j4tPPTLS5xRvYdIfMPi019iUd0\r\nO6e8qS6XxOoBfZFgT/SEs0//Clc0XUHKF4PthmW+SqS5ywOalBPabm/OgZ+/\r\nsQdmwgpxycCdH+C6zEl7rzYsAohIH//xIy26gOAJ+T0kba84xWisECJUkHbS\r\nGNWqACgAF0OgZdhgXd3JrdhHfEWYvHB8nIBEOWr0tzUyvE6CJrkVl9ca/8JX\r\nbCq8qmZtkW3APTi3p2yqIyeA7t0SLUfT6d/owo+3OXV+C4SxHU4PxVAstOFr\r\nqa2EjnztwvdN0QeUmaT/lEzoahji8L55R0MePYn9o3R1Ucyb/c+jrvVxnH/a\r\nmKevuaikAD3JGSm2gx59edx7KWfWhFFgda4GCXIJ5p1YLck+9vxQ8nENy8gF\r\nPBGKW6tMK4QTiufLGgFO0XMtsw68PKPl6T+93Rjc/FyBSrWnLYhWI+/16tw/\r\nGM4QEGYSpOCMJhxyjtQMWZDd+8ndGXOlqrvaEY4VNN9ceLt5dvugIetg/CgO\r\n8J+QNL/4lHGyEie7nI8KaFVIBIQDQ/miUlw=\r\n=ER8/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4K73ZmNUumpmQqU75viI+BoGlLFeecjBgk3zU4x3WOgIgdf+puE7QSngQYWar0xxK4Al2G5m2wHUANcOZsZgVGW4="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.21_1646989201838_0.21445219408756833"},"_hasShrinkwrap":false},"3.0.1-alpha.22":{"version":"3.0.1-alpha.22","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.2","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"8.2.2","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"use-sync-external-store":"^1.0.0-rc.0"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.22","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-0z+05stLNLJRsmQXL0QYKl9gri4tIGHXRPZ1EBROYlf3i7WDcxG/+Jwoe8sUdZggJORxLcy3EpLn4mRbzzvtGA==","shasum":"b997e43dddfdee5186dabc64bea4e67a1d6b528c","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.22.tgz","fileCount":22,"unpackedSize":4618138,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKxALACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwEhAAhmT3GcJhOHgWKEtNzWz92cZL525U3ov5rO1RMb0+cZKPdXx/\r\nGyMezorTzU2WnG77JyIFLAbknaDBOSZXRfbeSjFcr1+tCTMr3KsY8IjK9RVr\r\nJQ4TuSaOphbBKTGGTASprRde9SURxIdGIc1K+KljE182qPxYnAg8Mb1eLh1y\r\n9zvbpwDBCu0Bg/rqI6jtgW4/seFaC8SioTcagokE/Uc0GPshWIYEyh5iYHcg\r\n5mN/Di+8loIfk8Zk3m1i+ahggUeG90BebUO8PahesuW/gRZpvVtMTD4znVMg\r\n4scOEcQTLKcfJs79vV6dvq9Qi8Fwia0BP0k1EOVKMu0XxaANECQdn0eLFROU\r\npmqBu0OXVJNswD7CuvGuO8TiPOoao1oavGuysvfaLsOXBhn69iS4Mey0al2S\r\nAkjmcMCYN1XkblzRzgThOW5VfPgGUmTZTEa+kHyrnAw3oIue9VW40aMh+Hkc\r\nQdogDPPls0CwZiQHo+dZqKyhCH/0q1eOk2cWYG74spYXsoOeBZ9giUoVfPUc\r\n1yiDnIRTSRNnQCUjmyX4x1yG+ZvoavzDoVI9ueDv8up89/Bf3H4r/Jxrgu4m\r\nuKU+5rJm/iqBJhQwV3eqS9o4eMhizcWrBF68XkwMxfIv40KXV8OA4rwxX3rU\r\nza9qGHOqtmjiY7nWqN+rwkbXJdQkgopyVC8=\r\n=Trpy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQxp0eWua7rQtRwp+i+LjKjqPJF0YZ/eqgRKa3G7RLbAiAFq/uAltRMqmlWoPvsyzg1rTThQ/rAqGU08BzN5nZUQA=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.22_1646989323463_0.5293849772876491"},"_hasShrinkwrap":false},"3.0.1-alpha.23":{"version":"3.0.1-alpha.23","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.2","react":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.3","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.23","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-iD5YpK1mmoLB14J+ohqjjgdptxdK0jR5t3JiLDHWOky9LDMyRAWaw7L1R8tBxkEqwtTQeK+sDauvvfetqoJ5dg==","shasum":"78c6129a534097307d7816eda988d123d4aea8d0","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.23.tgz","fileCount":22,"unpackedSize":4618489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKx7fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPkA/9FeVOFHwnA5br7k8huUuCtm2qJVD+WHplP6LfjOCJHHWenYLt\r\nRU4ktSijt4Bhck6Rm5Ea6gOYvVRqXwk53m9ZPkqc9xANvTIu5XqrAwSt1gzC\r\n13A1ZlmY2wSbK/PP9kFYCsN19OVHvOg2vbnfuUVav4YMXaQ/8Vr9g8p/YEOy\r\nVdq3d7Vr9ryIcmU2liuqKT9EWPLoGsoFIAEzDz//6KW6Ime5LeFZnG3j1kzn\r\nPLVcnx6fdf8ZlXS9hCIStDY5B3HvTXA2ZXcOeXBfkNfrAFpgASgTDszwAlBK\r\nsdx1PB/5VGtcrW6lHHll5ot6qSqLBEMqJVyGpmiDsqPKjJtSIGx7BMfXCqP/\r\nLbYZo6utoDvV79BYaRLlz725Sw6tNy/au5+qYQ6Bd0MvnRi5uFmD9cEa4xvF\r\n9VjisLWxDo5kKiC7S66M1QYl9MYcpA5McHVRFF1q4MJ6HsmoUl1rwSZTDW9n\r\nTZ6yWoncZjD4xoCT2iIV8BM1542o/XrlbcJHp0047bVApgywe1GWQ7tGyMhe\r\nK2Ptg4BKd1ZHMR8OIWp1ioOgq0UDTx7l76O3Ia4GGc+GoBawEox/17dG3dmb\r\n8me2EmJbgQR+xTgzTPdA1CI8stQ8s8rFZm15FJj6BCXD178H4C75QVWpD95Z\r\nvBVweyjk+KokZKdlLkfSd7iT+FSvilmnQ5Q=\r\n=j59e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA6J+ZGdcCxlheGXSb/RpwU6Avgp3CEyDlU1WjbAWhYsAiBexxjTW4fzy6QVgFQX+2r3ZYKDyUDHl9JzeONMeOMnAw=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.23_1646993119102_0.9997005248960948"},"_hasShrinkwrap":false},"3.0.1-alpha.25":{"version":"3.0.1-alpha.25","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.25","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-yRai/UHCP3mAydr6wbZWYLjXjMWOdrzwVKMmEmod+vyOusmes8MPNHQc3Zcknfmshio4VuF5YIn6/I9iWtX3RA==","shasum":"ee9caf26668d8bf55bd25f3bf54f00baa1501eef","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.25.tgz","fileCount":22,"unpackedSize":4618960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKzxHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpo5Q//XUMs5IEcIvUuAkKA/vPinqStXWQ1W0bbEklzfaT6XmYxn7Hf\r\ngsu5Jp+b2M2+1Y9bxrpjwdDtH+ZIH2qLq/MvfIzFK+3syt7Jd1eRo4M63gva\r\nWDbr2c3ifUG9TBT5AsZAdinHjy1YFVzZeq+jFv9RGyQmXJAoYgcDsREvNCXF\r\nfOhBCnhXE6V9zfoF1igMoqLEhfVDyEAMfuoSXwD2kaG890H3eJb3Yw37DpIJ\r\ntZm6uEGW5+P461dyp55QXqLAnnomSGXCM7rlM93SIYK54wwkM0n/6cU0ejj0\r\nNyMxUAwKy5MmQ836Yqcvlrx/gZsmVI0zvQGYX6PvQy6BZ2yyqXyh2JDF9EF/\r\ngCecR8+MRhqu3dicOvwOB4t9P4SbhQUB1EDR1TS7Ki6P8um7kdQLmrdv+jRV\r\nSyzwi7+WpQOqs2ZIiirh/jyc06akIe36Jk6NAaNtcBSvvlU9TMqfkH2qrNVd\r\ny9esBuxhT3URj3sCwozijpc4WhUJkk5xtr0iwlQ7561eP6klSXFQW6f5/c3k\r\nP/Z9BNrNBRi97jLAFt03itPHCxj8VhI4zWOA9SrUOD4Xn8XZC8jHmxGJbTJo\r\nryRCgAzx2p9sb5h2jC/cv0Yu//jvskGPN+KECZYp+HVScGcOvkKIle76Rbzr\r\nv7mC16seCj6f1pHAV+Hzpw8naZbPokZzj54=\r\n=w92a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPCp5+apD43pDXCemobNg95MCgzVoTvF1CEMF8Zyw/XAiANsUFFYDWn/QdzOTzNyFFaODpZ0glXq73ElgDW0bgQNw=="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.25_1647000647049_0.192826736998438"},"_hasShrinkwrap":false},"3.0.1-alpha.26":{"version":"3.0.1-alpha.26","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.26","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-zP7jtKxys2AxbHDuV0eFhylfJNQ++Qfvhxb1/yma7/a83CNDjqwHn1A7u6RofrLtcSCCOMy+QH3xnTl6IPGakg==","shasum":"251c554d3809cf9a2e2607496bc7a418e3487b18","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.26.tgz","fileCount":22,"unpackedSize":4621636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK2YxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrC6g//VcMYSdD9s/IqgZjqAlBar0qn7pMJcRsXApJfxteICFoX69ew\r\n7/OSVG9BMGF7hUR2aElVawFkAhq/Mefjmlg41wyBOmks91+K+zbYQiLU22oA\r\nWcPhacWQHYh9ABd36+L8iYsiMR6wXvWeQhiDpS8U1PjtDERMVxtfi2XgOVGr\r\nzrUIH/TzcU1k1rJ4y7objUL0DXPe5UFcKQE54f0kqra7GYiuPzjDYsIQVf+u\r\nXYeOyJg3tQptCJMb6DMo7sw5eEJPboueVrwf/SYLJ8qXhyeP+1iRk9xLxd21\r\nFCe59XjPXqWYdDjWJ1uZo7XhGpHXAJBR5eYErLYHLcm7C2NBCSZvxGwKUCwU\r\nddKlIdUbHqiCtcL5k7G8ASuDkKoGyPj+L4o7Zcrt9u36Xem9KEoUwoHbmFPE\r\nvkMTy6eCB7abd6zyFy7+zZmK/0qSBnbxQ2ssF3dDe6GJPhLXfUVEBtmuZw8+\r\nwITtjCNMvni/nvkTc7bgtONhMHcoOo31OdGEfu0F3YBYMqTMbZg4V0EUmsZ6\r\ng68822/dOcryn8W0/ITpdv3Z9wcX3/ttq98VRtv2Y+85fVRpoc1FEVvRqLCF\r\nkwajo+ek8KgCnNOZ57qLvoAkdoINtNa+/G1aF1Rnwxt5igz2V0+PPt24+B42\r\nrkwEsPhi3TIVDHoKOD0syNaS+gMJr+Y8dGU=\r\n=lSyk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG84pK3AtKm/XGZ3n0Rb4dbUp70izsoGNz7l3YKz3RE4AiEAsDYwpqFwK9U4FYPm2qYQaH/pfjtpS7tb8Zzw56vo06Q="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.26_1647011376899_0.2017866232483989"},"_hasShrinkwrap":false},"3.0.1-alpha.27":{"version":"3.0.1-alpha.27","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.27","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-xJ8wBkBTwoJ4TU9YODSSmZuwsQzzweMLNY+MOlZBdteC2YolK9hFnM5zIxhs53MHbV9t+c5dO+eE6CjQsoRpvg==","shasum":"40b899bfc6caea929fba99eb91d15f0cc11dee68","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.27.tgz","fileCount":22,"unpackedSize":4621489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK2cyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrreA/+KNYAejJ7l+RyM0lKLoRVnrBQMTGZdE1tpPhM509KpKGfB9nG\r\nq+W/Rg5bV0/x2IyGZzOvepwq0kgLwvv7RyX3YMYIML/evgPFZ19kEkCskt5E\r\nl/UtIK9os+Hfla9bvVBfXMuHOmfLJmINTXr0uKWk5+XMR5ND5YYNrcGZubpr\r\nsLm+2dYTfFzCOic0EYC64mg/aM2OFiGrOV7uS5v4tax067irUbcEtRc46Pjj\r\nTNMy5z6BqzrjYOhRdLSLF8n3T+ZT8hVml7OhENrSkz+vvM7IYl7BFIG1gaiZ\r\nzzVtdCM+Um8SUSiyDxLOt7c91vORe1xzMT/h7QPxHKdf1L8QcJG6A2RePhJF\r\nijvWBR5D20RGAM7IdBa+q7swyrvXGrP6Px3PY/6Xmf1LR355LNc5C2zrTd1Y\r\nMi0vXq6z8xM/iWWrE93Mr3QrZ0LTBBzLKokvmYeOzR1X7L+oAp9sZtGcDF4x\r\ngm38zBxHjNGi/2fhgj1mCS3HuHaB9Y6svaq0d+rOdWDLkXCUP3sbLdKmPxsa\r\nlx+QaLJkYr8q2uMeBJtIWs3WGXbUGNMsW3RKM+vkvX8A61ODVFEKHkMp+RLi\r\ne992UreHA4cs9jML5JHlxVwl58MjUKin9705mJRAODXRzQ2AwvrAULGpGQSq\r\nZCDeqCDATPebpNPkCWjyTfhhg78F0lSH5U4=\r\n=6k/L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9mzAQfFo5Y+0GuwWewu1uECSLZeREBNSIgthvThoXyAiEAp6acMZSEgiI3R9huMY/BWL5GIItS+UPqIdL11wtWaRg="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.27_1647011634571_0.43160594443679856"},"_hasShrinkwrap":false},"3.0.1-alpha.28":{"version":"3.0.1-alpha.28","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.28","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Gs3JgvsOok1c0ikuSLq+ocNWJoG8yvBOJVCKIMp46rUOr4KZUtstoaT+bfKTXPYV0Z9cL0Y6xgSMYHvieIkjlg==","shasum":"97d194b28c26bbda053b6e11e844338eaa86039d","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.28.tgz","fileCount":22,"unpackedSize":4621724,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK2fvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobig//fEyL0VL3iUevV9oVnHR/COaEbE/aHAksjNVHvpsyWvRgU8oL\r\nldqUxJEaTLKBFxF5svsYyzkwYzw2RoYinifsjkcAOAimMqutYj4LGFEdzPjt\r\nQ/XJ8sl2J83OJVqQnqcA4TRbeN7u+xeXWENbSHMi1gDuwvUHY7ru91A9GgVw\r\nAMbyodgqem2DUSFcmfD9ASiJQysruY3ip00QjJ14HCPvxTKbcYY+r/FLgEcd\r\nVNiPuYmujD0GAnAo92IKBHa1GYXgVOJsxZ2jfCrtkf8Z8t++J6UBayupfbqd\r\nMJVc/6A3zGRWYhrTX/FTGVSG0BKrYCDx1+/XB+U4E2DRaMykMv0MbPWjR5Br\r\nropWIDpfyXQeHGOUZcQD6Ih0mCUb1cK7SFCNp44tl+NyqAnL6X2hQiN8TX6Z\r\n+xYln9cN1Nz0Gu/Y8/4/HVQ2j7IW3+ElF2Kgs/cUPL2eIn50p7ms4lUhoj2k\r\nj6gJFG9P/MhVVvmzlMlFmk3RqDGFIiBl3xkNZP4ku9Anu+sxBdW2pDz2t/8I\r\n4Cc17ktzRf1hdJQGdeW6aibUQyrjKDiPYp7HppfjLDtbw+MsUUF1LwiT5pYR\r\n55QUNrjq5LLUHl5EqRYf96Q24nVXLDwnMFtLUN0JVpb3fgs3mY8ja5sYjml9\r\n2P2MKHI7RWsvjnw+V4cDgDmZoa8/vlOxbZw=\r\n=NijS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+eKgjdWXKKSrJn5lrXIWU711Peby0OFtxcCP83gT74wIgEhwoapGqSIGVvMcwfMES84sEzQk2y7DZdCHjFmlGSrU="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.28_1647011823343_0.6014687166485495"},"_hasShrinkwrap":false},"3.0.1-alpha.29":{"version":"3.0.1-alpha.29","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.29","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-FTry3EVMoJPkoalccVLENroMXyrm+q+O+WFNFwktSQiVLuTYSSTibta2SzsljEZcINrEHvKnmHer6+hDhNguXg==","shasum":"2fa295b4f762ef45226db022a6ab80138459ed7a","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.29.tgz","fileCount":22,"unpackedSize":4621441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK2hbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLZw//UrbxNhOn/ZICHjsJpetLPIc/Hca5IXgqjYv7utqiphR/r+qF\r\n8ORYPfCvQ8hi0IN6fa3B/jpPOJ3Qwm3Fn72sjfzg0y9suRwW1PdAKGRzgADc\r\nzIYd3jzqaAFshib5blitXWPGIxajUOBss/6XJcQPwNRbGqteiKWSDK++QVBD\r\n+0dTmUDFUwhLPLXK6Ce57QD7Hs/vFvMgj48nIUQq6usg72FDLha36bOHR8CA\r\nrnvcpRG/NFCZgcX+PQcBjBg7+ef32dV+P4Dq0GyLzordtSFsGv0KgaWRyHdX\r\nEE8TDoANbv6Ddw+hLXh+rplrcrRpBto4vE5B/vkagGbPFwFNxVnglCn2N/FH\r\nAkhlT0aUlqSZGPmbIdqxcdm1r7oA6zOrGeUuNk43NiJPw+a/tslpz9sh8ndq\r\nNDsmMfBhqfJngE2NNb3CSctYPEOzyPagEZO3Yi/zhKY4rKTJ75XzXan7xkCv\r\nUPRfvUwGmMicawhbY0vA6QR9jLl48/KQrMJYUIX6rUoHib1h6OPHy5ggjIbs\r\nmcZEi4/QYSlNWo1jgh/2cvX344uiWUk5Znf6LM+OJW3aqg1UbJHro98U2VhS\r\nqpHuAkbHSQWpSk64RCzEgtbIJYSgmuQ8797MocBZCklFfMrcNGuhKvdi3CZD\r\n+uJafKkJlu5pC3wiE2Ih4bD0wQJQSH8k6ag=\r\n=wM2f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR82rxrAnmglwT26wmBVljJFZcHc/0cwnSZcKFUD2ZowIgDTEGYkuQZkl5k2PRByz/1hdp6mLFWCNZ8CGErOU+hiM="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.29_1647011931514_0.6387395482467995"},"_hasShrinkwrap":false},"3.0.1-alpha.30":{"version":"3.0.1-alpha.30","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.1-alpha.30","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-piGAeJQWP0O+kE9B8v8KIdgQ762Pa9PoG5iMcYkovlJrpexMGAW0EuDrgD+meliBHdjbCoNOv32E2OeIz86MvA==","shasum":"b11140a04a3b96a43288e53d529a76c1fc760ae3","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.1-alpha.30.tgz","fileCount":22,"unpackedSize":4621744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK2u7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2xA//WxPU/pkeAT7W2R1k5XjpfrKf4tZ40L8W8ygYyXXUQbqpO5CK\r\nXtbx1e8jokEClPw8SUc1pG6rhwBNWIe+U4NNOlmlHSC50zt7Ib8B0bDeF2H3\r\nxjYXZU+rR4ZCisO66+wtjR3ffIRTNw6r4xnfzb5dt1U/dtX3pJML8ZFIalxJ\r\nEpgiuvnHHbrgcXjT35ccMD7f2m9mRr0OsXFTw1RLbVuKgQeaK4EwWxj6Vt/2\r\nS5OUL1oxXdX1k1ItRhyflkQksn1gzYA4rKtIjsaGGyIRRk30QIK8VVeStEAr\r\nQO292hYRgEafce0Zd7hJeHyqqn3klgHCoNlXCf8ywOwed3k2OrsWuzNhAmwp\r\nc71oLU1Bin3JwZCMegZXAOLojk8qGUG8HbBD372HC2X7Ca0qkTTgcpBPnfJs\r\nPaBWHPn1wbgZGHTzrFl7kpHi41ZyiO7hVEz4VStVPU9fuVdGS3KjSswJfcyY\r\nXtC+CHD1sEqzX1eisheaO60lBJA632W47Rjnk3aJe0+Z4yh3CjCvh9qrzx88\r\n8kANL8d/inMoKFfLtKK6NGtXX1iOdqrWsVoaq+q2fBrRRwrqD9DQqU4FQhjX\r\nzNe1y3269fGtEIRPHEnQLswZarBA/G3aWDv4jRv7iD8ODgi7PhUq8QI+LmTJ\r\nGf+D339/dmru6eNFpQ08GP6pUB+nPSNqSsE=\r\n=/vOR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClLjAjfo47d8pf6oA1JNmB9Eo6ZKNY1bVAZ4wEzSZ9hgIgBwHZo5RkGYpFFJZi9J1Mqg4DYoxWwZE1mU8wxlqmqR8="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.1-alpha.30_1647012794777_0.7712634331637256"},"_hasShrinkwrap":false},"3.0.0-beta.1":{"version":"3.0.0-beta.1","description":"A React toolkit for making collaborative, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"8d4f08b8219717043af333dc454d57b3fa10d2bd","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.0-beta.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-cNjr0kKJfpXbHazefeBf51FGivCfTlX8uuZwWc8slw0zFndzQKtWyO1Qgon7v0+pTne+X1Nfi/KNcBhx1MPdYQ==","shasum":"360222c7bc1f98ceb3546bf431a634871aea28f2","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.0-beta.1.tgz","fileCount":22,"unpackedSize":4621808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK735ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVLg//fEyx7UBwMfTuUvBRnzjuVAmY445dMo0AfoGs3giOFI0YrX3y\r\nB/hZh0OXp3g6voBxWg4MVNCB54zroNG6ws9+HI5hjkco2/WGjQpY//QlUVHq\r\nV6qP9eo3dJzhxsMM3xJ4WrNbtRJMq+MhOEjfDCNVmtqpSQ08wrYoRFPBBqmy\r\nrZYHhTIUiwDAyUgK3+Qfp3YB0neqzEM29qGTqHTmxyyAiQYFMGAuE/nl1DOO\r\nVsIhEBen4+krqSBzpx9Arn8xqHNZEQxTiXnq78KwtxWaxc0edj+OqZgcBNRB\r\n+7iqjOHIFLiFdsANyrdbfqW9IsKpVhzKRKSgGDvWCV48pbthbkcHp0oSuzBP\r\n5+V68CrfdvWVSvYkbCh3N95BA+PlMdqXkgrRnBrGVdupwhi32nMbd3/Ej+gU\r\nbx9Jv+tBZRcpg7ubiUMUg6zugpjqXy/DKXICfxjjy/mG2g57xpXem2S8unBU\r\nkoq0BZoJmK+XBsdeQc5U8admrcyZ5kx/qzjaeVrPRoO+kWvNAzt7VbD3ShgH\r\nc9hDOt2fuTQbrKJS5NUNjsl+Db6REejJA2oaD1sMlWkLpfxg9OjafKKK/MVe\r\nzg+VCAkJwMbULDacgybjTD3lZoR/v8azO/3zR96BQMEbk1DwETxxKiW5DQ6Z\r\n+SukDcd+yorEMUSxlfXCuGhUq6dSPU/F4Rg=\r\n=HLko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUR4N70m6nvvW7WNx4nDW1Bpg4YY9EfoMdkbfl3l09MQIhAPGoeiJTiba/GHrUuWyfpEpbvfhpgNLQpzzQHwF2cXjP"}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.0-beta.1_1647033848744_0.4813453354448809"},"_hasShrinkwrap":false},"3.0.0":{"version":"3.0.0","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"8.2.4","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"8.2.4","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"ceb39a7ba1a243c451b7b9dce5a2c0d3145a0bec","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@3.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-vPiWCkBqtKBU9r/nTRCcwOCni2QKeHJc5LHpnG4zD9gFAGAIPbt503cziyXOrCqHQrrf2V2IYMyII5b06liDeA==","shasum":"985dc2facc2ff1f7cc3e7c48763bc6a855585374","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-3.0.0.tgz","fileCount":22,"unpackedSize":4624681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLg1XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVhw//f+Ye45EkwSgMqgFIPwqtMndcGq/mdZUxJGb2l+XKFEGmHpY1\r\nkSS+PkxgI5sfJAizBLdCi30VwMoBc9BCJhDohQPnQBEonlb8phW8w48u1zzF\r\nUWQCSOMjDMQdOscACt7Q0AchIAj5lAbg9wnUmhhYwRj4oo5iAjtET8cNFdfV\r\nsjKxskn/l97H8LrtE4aV+RS/2FcrVoNiNro1vmdAP0MIIBtSKtEJV1lx/sLm\r\ntpZ7g02Owyq7zG/Gcdg0wlcDnLo1CpRoXGaZ1UCAgOqGbQ8MhkONkVRQmcHB\r\nxDuUgp2ZsVTTSSNABiLU2XysBSXEhp62EPFZrPySDUUsTIrwsEto1pZ2M770\r\nNPm6dtWGuMC7CkFy4bYhE9LAVyXqpzvnX2areFeJkxF28pFahKiJ4IK4ium3\r\nEgQeGACWCXY/FJebqAmqatr8wrB2ZS+1Rv63pJmGXI6DMQscpJGOp1TqkPUj\r\nlWM4HQJfbCKVarlxiXfG09VmAhhmAF43flLXqjOKEOYbf/A/P/JYwzeJYh+O\r\nhZKEJvLjTXqTPCQfrllDZPQn7jMC0uOxDLeRt727u/m0KHp9/UgnwAVIWgdm\r\niu9eRZpw52TQ9tXQ3Epkm9UF5KqJ7in2JZTDA+p7Aah9Jf6Liz9Q0nxKFzrH\r\njjcUu84287nBcbZKtqahvQyWtvDx4pfCUHg=\r\n=Ydfm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7Sg+tyuF02FZFCBfMdUQepzs9JpcGkQK70ovIidpDEAIgSZ8qJ1I2iEAIDPckiOXg4qSMetwz59wpyp4jdTs3HSw="}]},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_3.0.0_1647185238847_0.16728380301677248"},"_hasShrinkwrap":false},"4.0.0-alpha.1":{"version":"4.0.0-alpha.1","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.2","eslint-plugin-react-hooks":"^4.1.2","jest":"v28.0.0-alpha.4","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"a7a902bcc1e42d7a78cb581cc6d8fc10d8ba4337","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-igaW40712O43EfZ9qngB7C41rIG4KeQFSR+EpZJVFk2pouo/xYC3GtRpKQkE2I5A1AQZQ9IQg+nh4+zF60WGag==","shasum":"c8d287890dd2b0411aac558b303b1b532ceb2c37","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.1.tgz","fileCount":21,"unpackedSize":4146861,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIESPEmmCRhPJaDPphmluGpOqAEk0lpWG1t9ByQFUQQCrAiA20zXzqgpFwgFWsm9R7U/pD+TzLlNEYCHtp5nNaPsbAA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHvdAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpqzQ//TZBRSyBPTObK1V1pE/3u66jR09gM10avqk6Mav83n9JZ7UZ7\r\nSGGNwhvQ0jJ0Z44i9wkV7Fe6uDaywMPGFYDecQMEU7BYVXiCLrUFgyq124RE\r\nVk2+C3bXI1tQStFVUk6+IrnOAHC+POBnFHXsT343T5oxF8KqE1tFIGR42tpw\r\n0s09s+19yPiSxnDkPgGkCiTEJZyokKc+Dnxww1Q0mUwdBkrQDeiIAtHzmbFV\r\nCjJKd/LpyE3DggnwsndbRXJAveANq3saQACsBzBPKtDKvWJSlsTGawCzxda6\r\nEbJGRgvdz86jklazOi9r23nrTWObQn+qlR9lnYRq+yojtkV210wf2k7pz7+E\r\n2zZuilqMMM5bLYdng289YqkSi0cF/4D8oMS68VCoz30OdNSAhAV49lSW8pOd\r\nK6RvtetqQEbi4KQJRksFuEFlSYAuQqvWGawJa8ruTtZXFmJcAK6WtqKtsvsc\r\naB/y6PyieXNP91F4NH8FqE7m3wmXX2tjpkeCPR9CvIcJHhBE5FiyfeSUTyLQ\r\nFmHojoJ+hGXs48hH2P6HHpprwtGJ1JPVxVnpYJRFmCJ5561JZfOrQPnIG7sP\r\ncx4A7bxoa8/URCItyCT3lbo4JXouglTXFEtRfaPl0rPoOJra9eOEFZcyFUZe\r\nx01LWHdXlK75z4twGiBghAwiuigJr3aX6EU=\r\n=LsU/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.1_1662973760110_0.1641903555370925"},"_hasShrinkwrap":false},"4.0.0-alpha.2":{"version":"4.0.0-alpha.2","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.3","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"gitHead":"bff69c74c763214df948835c66c97ad956c49145","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-zH6RasZdFLwwJQNgT2hXCV6P/DUIGtjDOg2aPzK7qwIqnXCF7EwGCdUSDwixahQilioS42fg+U1xr/SCQhGqKA==","shasum":"122ee4c813dc23e37b12e987f4bb9f2a5dd6507f","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.2.tgz","fileCount":21,"unpackedSize":4152457,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQmKOlAvFDs2rEyd9og3/xErPj9Rjn93Ao5FH7Djz9NAiBNbSFnrPc+zuQHNNbxW6bGY2wJromajGm5pyEqqfR3Dw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNr3uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhNA//UhptDABWQpVyLTkFMmR0U+s24bIFh0E1tzp6cj3N+kiA8UeI\r\nQtSh+ChrHFR3tNNW5Nhp4C3JOWcoEG3h0RIy0JJVYOUfZT6V1Qxq6ApxUY9A\r\nxxcE5TmrNmDnhTp8lnGWGdtoAKzoe5uUQllXYYSkbQ0V06pu5jIUS3ykmeUC\r\nK96EQsonNih0ypeUAJA/fEYEwMUUiDJ1DaphMgkxIJICdeRrXu8kGwW8OMIY\r\n0IlPklqtNBjjZnXx2Y51UKOOtlhhmAc6ldvOWlaaOBC6wCys8z7Ecgl96B4y\r\noUI6gvhsJMwhb9D2+5v5rB9lm95ZuH4+6zKCp7vA+V0IrQuqRhpe5FWCNutT\r\ngoj1eztD0L4Jo2Yie2tLmTANbP1avxGbGpAYalsg2bbZYPdk4Mj++a/a3iQU\r\npHTjKjW8RIGDDmJi4+4YUvgo9VuqOYpeYZIRdSUhtex+kDa+lRDrsJHcQl4l\r\nOVqYyVHD3qcCqT3qcnY0yopM3CcnGKlrBSVcOpMzuaM4BpG6WprWoOB+Cad8\r\nAok1TgdyeJiMdiGQfYQ6OkXXenknfl2+tFlSt9lXytqsIw42tqKZDnnl5W/P\r\nSQCNRjgjFwu7Nja3la9gN0iO8ZcERx4bf4RfKDduPiSzPaPjSJApi04CZYZK\r\n7w4gHhpXoEZF3FhWTYol4W9ZD2QhewFyYKY=\r\n=mIjq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.2_1664531949860_0.9125428094415566"},"_hasShrinkwrap":false},"4.0.0-alpha.3":{"version":"4.0.0-alpha.3","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.3","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"bff69c74c763214df948835c66c97ad956c49145","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.3","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-dDOfFNzT7w/H8Zf0T26yuoJ2HHz0Zkl5kP663ta1cDkob1BpvehNzKI0MAdJp2TAJ1y19M4ejKRwy81PD0im0w==","shasum":"898dc747f1d1f14f01894144e9b575870b654503","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.3.tgz","fileCount":21,"unpackedSize":4169687,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+Feb0zYBoxAe2b2bHGqNNz1fqDhcEouIlfSEY1dlSwAiBiS8Rsoenv3Od9nwDngibpL4tUK9N2IEO8JxM/rLIYqg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUmGMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1hQ//Sj4c6uPhStefluEqfAwVhg4lsBQ0iVLPzVdGvV4HZJMpERu/\r\nZrpCMlRauKxoOF1AlAMv/BWZl5CK63dQBbqHgaYy8n1XJtYg0hTMZYXKctMM\r\nkBTpBRY3DSeaPdmNqrWnzatELAjj89HYj2rP6toqiScXnw7a7z92PaJ27jjA\r\nqex7HLWnqyt0Dgvmox2m2aOQHOqqo9m+QsznOoWSZrEkAAhC8lr7gK3xkamQ\r\nxTPNg36vQOowPpMNF5zM290O/YEzYi/3kaYkpb8GUfZhXmguAOw3HKOajPYT\r\n4dFFAmUJiEwYTjD7omoofbpq63rGTUuZ+XUoeAX5JIwizM+hd2MgSkQDm93d\r\nrnVzBgNu0tGEUipmvwXQ7Y/bs7itZrwfjb7pJ8B6f7jGr4lfXi640fedHCuC\r\n0c0vGXFIHGnTc6NUHGS670ZDTROKu2jre+nBjSAytNnGAwmAlH+tNacbLDwY\r\nhJeYlQGLWth6/WPipLFMiLIGLXIV3Tl//LYbeHLIvxLHPJPT8H6J8QWA8tRV\r\nBpPFnw8kAyCNimjklwnQBazEbXxkTqQYmhAXEj5DoFm9Eq3f8fR7Hyp2sqWG\r\nlSLhT8K8UOkhfj9h4wcuLFGgnu4ZXa27TrQLOEdmimW9qW8up+fg+mTINvPt\r\nhGZudyd1fVGUTn3CoO/Db5z4Wwoyqs+7+8A=\r\n=G8ob\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.3_1666343308249_0.21403127883893003"},"_hasShrinkwrap":false},"4.0.0-alpha.4":{"version":"4.0.0-alpha.4","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.3","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"bff69c74c763214df948835c66c97ad956c49145","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.4","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-DXBM1+2UvkjY5f95R5kZCj/z/9Lw9Jwy3fBAwIeSk1l+sUAH/q0yQKFrVcinfYhvoFwObtyokrnwb/9mo04fyw==","shasum":"6fce08fc7f0f6b3e6af4dcd4199c4022e2e5e3c6","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.4.tgz","fileCount":21,"unpackedSize":4171027,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOz0/AzE1yzcMO+WRtCamT0F82vseGaRrf/Jo64V1PrgIgMAq85Aqw35Bqacax3O/JiMvg3aB2AKqowlvCytrhGPA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUnBLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF0Q//VCgSsmdiHb7wAu+OKKeFo59a8yvvhIP9aCyplpmp+iZrPVP1\r\nvPa+giuPqrXlm9qd10QqFRlAONML4NuluFiNaBm68N7jd8PNF6U879hkaRG3\r\nzBSm7stucbEwmpNNQ7Q59RVIkIb0zx/tGgWBvrabnb+IRM9z2JZ/ys6oCJCx\r\n74O9suxDuvpYkhwG1cKuBVTD3ZHIAeVYK9N7f8TP3bpkL3yec81R1rxHpNlK\r\nv4LzE5h3PipXyPIONg9v7ah119Vc2OIk2mFF6ZCWHerVNiiDPnbbhewyDcPJ\r\nTmKrJfJHVrzuetYCgt46SrtI5SLbatfH9tV5TDjlRMJJcGfJI3dCK7+2CwUy\r\nJEy+WobXlRTuXfpebT+Wic84zwfcU1gvdY1ow2ixc7IGtySrtdsW/0XQAHTZ\r\nRhn+ST/9pMBYCGkvj/KBTg9PTo0cNh5t7pLQ6/b+DWYwdEBTedtZzIDXzpsy\r\nG6Z2MiLk0erXs9tRIt5bhBNk/uz+4bxeYBFKUJv8tiuy9gnilCDZA0tc2uFa\r\nxczdB6n1yzvFbyF3YiTA/2SvMWwq502ScdnSBbaeS14xrfKgO8HcGj20R/eA\r\nouWi4U0CDn8hlJ/AQOs/HSMm0XnMphCMXsdxvmikobSCHjjqKksoDaGyzSoz\r\np3XeFb9k30hFi744gFz8kkTjoc5+qPqs4NM=\r\n=H5wY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.4_1666347082904_0.7237247684666783"},"_hasShrinkwrap":false},"4.0.0-alpha.5":{"version":"4.0.0-alpha.5","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.3","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"bff69c74c763214df948835c66c97ad956c49145","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.5","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-wCXO7yJm+GuHIbia8HHYkmAGItEq2mfELN5k6JendWN4WPoKP02jKIoEp4IVzFDJKikkWl2EEstze+5YXasOvw==","shasum":"ebbed0c355b452f8c92e20924d32067133326d45","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.5.tgz","fileCount":21,"unpackedSize":4171043,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGWSJJwnbVx+udjc0bsTkhm52juXC9J27PL9nnCFfCnwIgaTO//DToYrc+deQscl3WhpGxcZI+qQxlELxJNjxe7IY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUnR4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdcQ/+OYqgZNbXF4uICLW/9fwdppXpcFP27mtPJvFqhWFCd2lII/kj\r\nFVROBFE0tgVUu7KRRf69Oeq8/EMNDTahF+7Dc1NtrYp5dOtm5XNB4YguqeYT\r\n6XMGqRPQAzgTLfn0iJcyt9LIzaGbPmxvU20iiX+wAnm60Nm3gNkqzwgBLp54\r\nCDEQDaQgJso0VTdP+qmgRQuBZxIkplX54X/4fP14rIzfgI+LRXfMzOeNCl52\r\nOCpoEpFz+8m44eg38eE07UMWBhw4MOdtfAAFMdt24CxdEUk0Cum9VKtLN702\r\n8M43VrITPqLxHwFzGEmxYKGgu5naPdB17BYm3HbgfxMEr9dPiU5H7/O9Yevr\r\n69aYNsCRS86oqlEGWjAKWB+p2AoDkm70bmc6D1fWMdQ/czg2Pb3w0+h5h3c3\r\n4GUR5xfPEMqvpioThy40GGNEBBQjIUuSRPpFj6cfn5It1VESqLNH/qpxchTt\r\nAMJw+FqRvSi5gc9I/Dj7l2020iDuV0LZ3mMNl4GSblYjdhg2HDwexgfc1z9J\r\nVtczYrUEEoqqy0F4DPrm31IIXzJixwdq7urYxv/Z8xIjVncCVrDzQRtEopDq\r\nfTYHoyzzzHE4iTOdV4/ij6mcjGiSnBIUoDNo+AfNWtUa9XctXj9K2hqUb5or\r\nX/VRky61qQI69IKplkoytNbhaG6F8OqYIlM=\r\n=7hmG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.5_1666348152634_0.42624644214459595"},"_hasShrinkwrap":false},"4.0.0-alpha.6":{"version":"4.0.0-alpha.6","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"file:../earthstar/npm","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-alpha.3","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-localstorage-mock":"^2.4.6","jsdom":"^19.0.0","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"bff69c74c763214df948835c66c97ad956c49145","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-alpha.6","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-CGBXo9CDQKZ7RXoPjJnjIIvdAsNOwZQiXbdG3LugbyqW3OMCowgp/9Fv8j+xGG0Tv3l8ZrNz1hSGuO1FWflD0Q==","shasum":"ba8db5f7abfa751f93e4380d4b585b046504b076","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-alpha.6.tgz","fileCount":21,"unpackedSize":4171047,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+2OOWQKQdoktzqNqZOCXxmL63HogQriX6bQcFlPQimAiA2JzDGQJvkiZocgg5DcOVy+YXUG1rqESpupW/qHqXypw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUnUjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqb6g/+Mwl4LLSYK8ie7hP0FgRbAr75eVscwDBielweX4DkG3DC69MD\r\nLoSxUMwy+mMqWHHNdCs9H94793wlZe0k+0iJFQK8yASuwCpgcl5AcoIuS570\r\nInI3N2cBVOptKDn2jRukNeBe/NzNA8eYnZVkCTYT61yRlRaEW24GraMoi7XQ\r\nDfzIj9TGZ5PkII6p/uFcLgG8BEEkpPsGEOeTvepuKTYzjJJAb9pQ7vXdizNH\r\nZ4kYwjcYd5kDAWLYWSybI5U5rEvza9rrM/U4ZOdU3MezVVKx9LkwsQ19V6sK\r\nnGwVMTUZP0aRkBDxMaaG0QvC5WfeirDSoDASHwaaJCt7XdP34/2WiIncM1jf\r\n+U/HJ4qCFb6I+fcrb/2SlDnznpBxz7F9xGhp5oK56+YR0oMwz3DBwmNr2ErB\r\nDGBunxZ3YnqaPBt1TvwYeF5HE0CVAFQS2LQEhW0VCXhmksm2moSzwqj/JSjc\r\ns/I2KGqrmsB0T3E0HVnsYuqBOlPMR6tD2oMxME2ZintekdvtAFvXiCPjm4Ox\r\neLr+rsoKjKDXk/TQYRn1+uakdU19qEvUEKRpirI8EcCiUbmzNW1uFLfD5yJa\r\nbKoFqc9XogRvGxdVRb6usfT5e3NG/fQbj9+w3Mx0QVQcJE3GR3NZnQ9nUG49\r\nFB6hKcN05lWdlJ6QrvPr1tnqGX/2sAF006s=\r\n=iV5a\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-alpha.6_1666348323357_0.6275293062331391"},"_hasShrinkwrap":false},"4.0.0-beta.1":{"version":"4.0.0-beta.1","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-beta.2","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","earthstar":"^10.0.0-beta.4","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"17.0.2","react-dom":"^17.0.2","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"44b569e84d0ea441776af382bcc862728cb68bb9","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-beta.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-X+mfthVQZp2QSLAWHNR+tYMSs//c77VPwPpC55wlxy2UVDpkI/mWF7ZOcv4yAX+IZYi22NzKktsCTRojwYvzhw==","shasum":"3f34659816ac7cbed47e581d1b3c9b547699a122","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-beta.1.tgz","fileCount":17,"unpackedSize":4415264,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLMhHwv8Jw1rCFW4EaRKHm4KU4gudEF6gigDQPSICNuAIhAIz7ZI0lD4Zv06udoTZP01Im+uvHEz/vwo9ALY0XLIFx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfi+BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIOw//Z2pf82AOC8PfVEEbHkS4OLci1a+7e6xLEAtTrWMTkrHRpsru\r\nO/frQyxnRFGO7XA/rLzVQaxwCbo/vHCve3W4bAlBWyzgLWI5rM0dD5xnZRpx\r\nUl7/IIdvw3YrxIurAU37T34kaGqyURRdZfop2oQbHtbsIRXZlKGFvwooJ7yr\r\naM3GFVSjFO2m4l2XC2hs65AnVClNwAxvfT1Xk3fURDN8hRwwa9FgpgoyUhKF\r\nSTR7csEAMlOzN/Ipj2nXAmmrSAZ26sN4YU3kVcus5rcICTf0+rNPrVH78IgT\r\nvI55Ue/v0neASZ+bb6quoe8t9O6iFck4FG+Cz5lnM+02zr2CgbmC1Al7Qs4T\r\nKtNSPqh4GzPydvxT3h5E3QX+FxqocGANw9bsMJMlgDY1e6hlsUWvUCLiBnQn\r\nP+sR+iZUWH4H/VgWG7W3bJvNV+1ooYTjdlMaAa7KXzf305FODHnMlRgmQHC4\r\n7WDTm55cW5iV9hNXJCkgdY8h5pC6eRyEemorEbpBm3yEbirIqd9ZLe4EeRh+\r\nS1iu7m1ZdLeJ4nskl3dY0/3EDaVes+G6ixzod2gufyoeEQphjQmJRtZNBzNP\r\nFNnhWXa+YmEq4Un+6mu48g0zlDWTrPBVQrtIeXaP7wU9VikKPJwMrDea/iA1\r\nESDTSIKzQCerlOxIwyzgiCRsPYfg4RJkXfw=\r\n=cagu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-beta.1_1669214081172_0.9619083286034522"},"_hasShrinkwrap":false},"4.0.0-beta.2":{"version":"4.0.0-beta.2","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-beta.2","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0-beta.4","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"44b569e84d0ea441776af382bcc862728cb68bb9","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-beta.2","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-WxlGSZvkiS9w9fDvQ9+RDq5UiKOUXgD5jWRGT58hq8XF3UxzZkRwj8Z/bRQkXpOT2fKhbvuN2YK/3NbDlLJKFA==","shasum":"732f616846bd474ba0db55d8aed2b4d6277cd759","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-beta.2.tgz","fileCount":18,"unpackedSize":4835776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr8zrX+bDAMB1iFbOrqHg8b6fmKxxPdhuX5UXU8GWY6QIgUDE64++pqIVCq+nVY0gDsCaWKVONjoZ0XBEcam1clP0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfzwXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3jBAAkK7cvHIkyTGUM6rmfWiWmjkjrYcDjq27Zb+bXnjVf+3GDDU2\r\nLv5toBF0I/cbfcTdx+47Ps4IV82yuOkPGhQmAoN5CHRHQPBStpyzhEo8yPEO\r\nN1W1rIfdLhBMHgby+yDopHsL/COy7Oju9ZaNQn5c5I3W8pmZzHVAGJUt5Z3+\r\nq4/fMW/IjAmGX7J/kMlYuHHrGxvSdNyIlncPFM/nw5pQL3XQdtf1qiBoTK5n\r\nnOcHGioohGlT20DkYztzifS2xRQ/k+yhEXLcpNeClAtKdbRRerPnHc+yxkQK\r\nt5ZYWPIQ2Xj0jnio6HXnQU9ftSe6vfvN75HLHv3RpkI2YwZ6KCTMMroSeOW5\r\nRXAQcCzm/RZ/jUv7cKNvRcT+ZvAjX2nKHR0Jc2WVAM6m3oQ/Y1i2K/sfh5LN\r\n8ups3FKMm+XlyOFHWpeDvwieArnaLf+q+xJXnClehQ8MTMhSbh17jpPYP3jr\r\n1Gu5A7lWYa2WR4cL7r5UHo+AKyhJHfF3U1/B6UFDidFmvDca9lxQBDjZQmNH\r\n1cjVdEzUYaxA8ItPTkcVEwGDrTlyvB/A4gSyye7dMSA9zdAChWkuiCif4YAD\r\nVsZqXWfr+5tJkaG3Z1KEZ1CfhbDTluMAeKskU5+VbqWft34FgfDNopsaWyHg\r\nRFdULRpX+r5whwjWwoLbMRyfuwdnHrR1cDk=\r\n=DUpK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-beta.2_1669282839099_0.7187258306302462"},"_hasShrinkwrap":false},"4.0.0-beta.3":{"version":"4.0.0-beta.3","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-beta.2","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0-beta.4","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"44b569e84d0ea441776af382bcc862728cb68bb9","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-beta.3","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-KQe73ZzI5MISqHpsQabJZ9uHyzgh3EzLPSq0PLWLJJEb9hGLEtfNRxjmMogHuoTLrYrXeQEeSEzBFCF7H9Dn3w==","shasum":"87f0e4ebaf969fe74c6e191cfdccba0f0f3d64f4","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-beta.3.tgz","fileCount":18,"unpackedSize":4815493,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbaYj7tz5FMlnso0DtkD/GCS0npWlbJ8SbQxKr3WlEKQIgdM8xQxdg8OyolT4wNiq8SkoV0Al4oLI8q+ptuAXBuno="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf1iSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrceg//bByUbXRqaI+0KeCi3EHipdlmZqXHkzv1oXvrLbiTkdNCv2U9\r\nFsobw5os1Yi+ZhsZvYinWjPR9mwUAMq8beDZdIopUdzb9cVByHM4/B1L8L3C\r\nyChyV7jqU0YNxkQADMILzNteI8FUmsIQAWK9GV25ERLfjbfXO94EQEJwgVe1\r\nsic7QYaOub/24ybLMj5RWqGJvE2uVhP0Nl4Hg/RTF0+ukwFgkRtLWWENQK2c\r\nu/y3Xl993v4W76KwIG5EdE/TJ1OnuI1cO6BjhpB7d7FNwaUDninGZe+IzDh0\r\nVcYcafx64zVYSWIehxLBbqPKgUJ7m32qzY15yPYmzpJs5k+IkxAj69CpypVC\r\n/tU0hzL2P5ROMXfkYCwqK7UW1TIvh4aBbwxhasB6ezjH6kU++mEr6qSDBtMW\r\nZCewWqgHmeFupHEjwgVpBHX15gdVK6YpDWvyCTuvhwh1cb2N+6goTMNV8P3A\r\nW6G+aNfALQXuS8ADkIjY4l1lwtmgmHccD/iI1d0yvQHn12bCq304zgVZyV2k\r\nLbSMRCUx9fp61PlgR3ZBIBoTploKz6nGMsbT6iVcaaLsdhkbSsor2BJEOaAw\r\nOKeOeGtI7hqZ12raSLfZPQqTyzGFtGDxTyoMWrg88d8L5IX4rdNDj8K6i0Gj\r\nGhSKjCGl0FBnrX08hnhRj2tpEBS3+ICdgQA=\r\n=cuMs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-beta.3_1669290130597_0.6611466835757507"},"_hasShrinkwrap":false},"4.0.0-beta.4":{"version":"4.0.0-beta.4","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-beta.2","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0-beta.4","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"readme":"# react-earthstar\n\n## What is this?\n\nA library for using React with [Earthstar](https://earthstar-project.org), a library for building syncing, decentralised online tools.\n\nFeaturing:\n\n- Don't-have-to-think-about-it realtime collaborative data\n- No-servers-involved authentication\n- No-distinction-between-the-two offline and online support\n\n## Earthstar\n\nEarthstar models collaborative online tools using the concepts of Shares, Replicas, Documents, and Identities. To learn more about what that all means, check out our [how it works](http://earthstar-project.org/get-started/how-it-works) page.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your project:\n\n```\nyarn add earthstar react-earthstar\n```\n\n```\nnpm install earthstar react-earthstar\n```\n\nStart by placing the `Peer` component somewhere near the root of your app:\n\n```jsx\nimport { Peer } from 'react-earthstar';\nimport { FormatValidatorEs4 } from 'earthstar';\nimport { ReplicaDriverIndexedDB } from 'earthstar/browser';\n\nfunction App() {\n  return (\n    <Peer\n      onCreateShare={(address) => {\n        // Here we're teaching Peer how to persist data for shares.\n        const driver = new ReplicaDriverIndexedDB(address);\n        return new Replica(address, FormatValidatorEs4, driver);\n      }}\n    >\n      <h1>{'The beginnings of my app!'}</h1>\n      <SomeCoolFeature />\n    </Peer>\n  );\n}\n```\n\n`<Peer>`  coordinates the state of your Earthstar app: things like share replicas, the current identity in use, or \n\nWith you app wrapped in `<Peer>`, you now use all of react-earthstar's hooks!\n\n## Hooks\n\n### useReplica\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica();\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: '.txt' } });\n```\n\nThis hook returns an instance of Earthstar's [`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v8.2.4/mod.ts/~/ReplicaCache), with the exact same API.\n\nWhen you query docs the replica keeps track of what was queried for, and only updates React when the results of those queries are updated. This results in a best-of-both-worlds API where we can have the same API as the vanilla Earthstar library, and components which only re-render when they need to. Nice!\n\n### useCurrentShare\n\nA hook to get and set the active share.\n\n```jsx\nconst [currentShare, setCurrentShare] = useCurrentShare();\n\nreturn <div>{`You are currently browsing the docs of ${currentShare}!`}</div>;\n```\n\n### useIdentity\n\nA convenience hook for getting and setting an Earthstar identity keypair.\n\n```js\nconst replica = useReplica();\nconst [identity, setIdentity] = useIdentity();\n\nconst set = () => {\n  replica.set(identity, { content: 'Hi!', 'path': '/greetings.txt', format: 'es.4' });\n};\n```\n\n### usePeer\n\n```js\nconst peer = usePeer();\n\nconst allShares = peer.shares();\n```\n\nReturns an instance of Earthstar's [`Peer` class](https://doc.deno.land/https://deno.land/x/earthstar/mod.ts/~/Peer). Useful for getting the list of all shares, adding or removing replicas, etc.\n\n### useIsLive\n\nGet and set whether synchronisation with remote peers is active or not.\n\n```jsx\nconst [isLive, setIsLive] = useIsLive();\n\nreturn <label><input checked={isLive} onChange={(e) => { setIsLive(e.target.checked )}} /> Syncing?</label>\n```\n\n### useInvitation\n\nEarthstar has a [specification for URL-style invitations](https://github.com/earthstar-project/earthstar/issues/36). This hook parses such URLs and adds any shares or replica servers derived from them.\n\n```jsx\nconst redeem = useInvitation(\"earthstar:///?workspace=+gardening.abc&pub=http://pub1.org& v=1\");\n\nreturn <button onClick={() => redeem()}>Join!</button>\n```\n\n### useMakeInvitation\n\nYou can also create invitations to be used by others:\n\n```js\nconst invitation = useInvitation(['wss://my.server'], '+gardening.a123');\n```\n\n### useAddShare\n\nAdds a share using the `onCreateShare` passed to `<Peer>`:\n\n```js\nconsnt add = useAddShare();\n\nadd('+archery.k456');\n```\n\n### useLocalStorageEarthstarSettings\n\n`<Peer>`` holds state which you probably want to persist between sessions. You can use this hook to access this state (written by the `<LocalStorageSettingsWriter/>` component).\n\n```jsx\nconst settings = useLocalStorageEarthstarSettings('my-app');\n\nreturn <Peer {...settings} {...etc} />;\n```\n\n## Components\n\nThere are a few components needed to make things work, as well as a few convenience ones.\n\n### <Peer>\n\nYou'll need this somewhere in your app to use react-earthstar.\n\n```jsx\n<Peer\n  onCreateShare={(address) => {\n    // Here we're teaching Peer how to persist data for shares.\n    const driver = new ReplicaDriverIndexedDB(address);\n    return new Replica(address, FormatValidatorEs4, driver);\n  }}\n>\n  <MyGreatAppUsingEarthstar/>\n</Peer>\n```\n\n`<Peer>` also has a bunch of props for setting its initial state, e.g. `initShares`, `initReplicaServers`, `initIdentity`, etc. These can be hydrated and persisted to local storage using `useEarthstarLocalStorageSettings` and `<LocalStorageSettingsWriter>`.\n\nThis component will also automatically start synchronising with any replica servers it knows of.\n\n### <LocalStorageSettingsWriter>\n\nStick this somewhere within `<Peer>` and it'll automatically persist many settings to local storage, namespaced by a key of your choice.\n\n```jsx\n<Peer>\n  <LocalStorageSettingsWriter storageKey=\"my-app\"/>\n</Peer>\n```\n\n### <ShareLabel>\n\nRenders the human readable portion of a share address, and omits the obscuring portion: e.g. '+gardening.b34ue9ug' becomes '+gardening'. Good for making sure you don't disclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\n### <IdentityLabel>\n\nRenders the shortname portion of an identity's address, omitting the public key, e.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\n### <CurrentIdentityLabel>\n\nDoes the same as `<IdentityLabel>` but doesn't take an address prop and just uses the current identity provided by `<Peer>`.\n\n## What about Earthbar?\n\nEarthbar was an out-of-the-box UI for managing many Earthstar related tasks. It attempted to pack a lot of functionality and flexibility into this repo, and it was huge. It's been removed from react-earthstar for maintainability reasons, and we will be bringing back something similar in a separate package somewhere down the road.","readmeFilename":"README.md","gitHead":"44b569e84d0ea441776af382bcc862728cb68bb9","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-beta.4","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-xfgkco4BnRrAxCS977gC+AqnSXPWnqfd8IAeaWcrX3x/znC9lVjIJ8jsT7F26rJKV6j/yVNXt8Xb9ECdPiRasw==","shasum":"34c39ed3273670efcec599b2adf8136ead92b6e1","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-beta.4.tgz","fileCount":18,"unpackedSize":4835614,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWk9k+z5L1K7YEZtwkqq6dmgYlawdrch5DkLx8tlj7qQIgQor9s/KPFpOC0OFAXyvXmo4K2k0VI8lPJhBhjx53TWk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf2ADACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4dg/+OHb/7K0iOIKOyhV4lijR0SGAzww7So0MRT+FocXxYWLD+pG2\r\npS1C/wTVYvOjm7CjCBfEr6x+Eq5p++4XNsDr1rR7iFnrG5MrJ2Sv2P111eR4\r\nSPH69mJH4LicVpuNY32N1AgmgkDnZs5Gh9SmB3ZbKZJUWvhk+rWQij2DixrS\r\nY/VpYZI5q+hF+OMQyo5I8kGDRsXVtc7Cf0u19Af3Xp25lKrglnPJMy8CIh/e\r\nGCnP70REC3fIgRDHM678BC8rV9hlTLZFvmHtSIjsKwdtGkB77BykVwjNQcWu\r\nM8YUnjJCYPQUUTKu1PYPF6HTdVQiLm4+8vRzYUuV3FlKKO3OgNjoZLj/VyNc\r\nwGM4ZNKxMbz+VXEmzFglk+96W/h8orV9hvBPnIwTFAwV4Rt1upBvpvdXYOvc\r\nNwMr6e+RtnxR5LpYMPoNbAPyp6T3zQIkTb8PXnjnp7br3ZlcB1YjP63FFCJ9\r\njFMmlKuvi9jDJDK2Wx0YuyQDuDLIiXGqSJb7BpwYyw/svpHYVLW1OSlQMwOu\r\nYCB1WOgT54aCLg0KDPP9tJZOkyE2wMiEWYsDgpbpL3jYMCbFJ/XU3t48JsZd\r\nstA8amALYI6cTdV5gAvMGlojeO9sR3XyZz0W9ZoSwddDPDbz/XqNoyd0dwj0\r\n7lUmraE711nuFmEhdrRDBfnQekAELHrllL8=\r\n=25Wy\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-beta.4_1669292035612_0.7452157672360773"},"_hasShrinkwrap":false},"4.0.0-beta.5":{"version":"4.0.0-beta.5","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=14"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-beta.2","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0-beta.4","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"gitHead":"fdb80ed6f6a85617f5fcb7d7baf4f842d06bd1be","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-beta.5","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-CSTi4VishywVL8VRMLdHebCDakfU/VwpnLovohM4Ibpt/jGgRjW7IBCZfROrIaDTQtHmqk9zURHqUl0NqALleQ==","shasum":"8ba205f46c64175ef8e3ca1adc6e1fec865ebc7e","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-beta.5.tgz","fileCount":18,"unpackedSize":4834957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe+y49jx9qWnvil6kr46ztVDwFc9AeCEhX+GICw8KG5wIgH+5Boh9d1hMQE4r4D7zI39nQWskC4V6AWA5rB7oUPSM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlxkuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEig/8CnPgRbs675knRt5O5JfVTZkdg+lsU36ZvdWCU7FG4V2Oa2JO\r\n2zB528cZH/wMdyQ+57yXR3AnPkcm+A13rUSRM1Z6nqVQsw9RrBEJuh7xKH65\r\nr6W2yYxOJ7oItd69fx4D5in8WV0NfA23+iEZE6qUwQ1uyhsz34sHfPMdTC9q\r\nzT0Rd4A0E6WBsq3lZiVTf76zcRn+QuLUGj+mRGDwNqMJV27cC8AbHC5Fj8tw\r\nwnA4a8R2MsYRj9tN48yqAHsMRIFUu5RLcQ7nN1CIgqjKCNScIbjeSLrZzFD0\r\nfaVxEptLFoMZv7qVJ5iUhCoIVYgk5encjUN+5PFCeHOIUMxYIEKMGPqb9cxW\r\nBGF6y/BlDJERNosq8CTtzrpV63XQDbyJc5I86YBNSNNPVhUUmWjgMFOH+fLQ\r\n2zm4Unw2Bc01acnzdORrLd9PMj3hDPXULhji5KMmgFiEIdOdr3MpoQcjtVab\r\nU97Iu/hVsI5fgeRQHHhzBlq1W55/blAYYggBRb4Ebh8kiZAtV7IM4GFTZiGv\r\nf09e67NxVJtAWsH8sHuF9RmOQrB3siSmVNTV9iWn914cMwIU1Rrc6IouMM3d\r\nhnXdOdslQPk/UINJxQfE21xNSJj82TAHHOGJ2KN+b7O2PiQ2HJs0szbvwYTr\r\nCVAU31flChmgy4e43AkOb6z9BajXSCP25gw=\r\n=zjHR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-beta.5_1670846766527_0.13821517473352096"},"_hasShrinkwrap":false},"4.0.0-rc.1":{"version":"4.0.0-rc.1","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=16"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0-rc.1","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0-rc.1","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"gitHead":"a4b9d290d8026f58d754382aa3182372161153de","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0-rc.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-vSTxDnAnJE1oNX3PvojYJX9cysdQHfJRCHTNJlNiufZ50Zn8PsKo96pRqYBV4JycwMF+totREk9SxYpdCL103Q==","shasum":"1ea5cc0a80e75a1407921b5252e2227c4e59198c","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0-rc.1.tgz","fileCount":18,"unpackedSize":4834951,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDARXdj/FRz3q+NKf0jKq9zgzpp4OVqln7cqjFGLwlIgIgDwMhiSG6hBcPkf+ugSA9tHiPB9WICGyhg7XiJM+Ewto="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjouIjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4qxAAltqG/4/9LfLAYk4lVHkngZLLx21SZRYeyARZDGJ57Jrtm1Uk\r\n+kxzgCBOEOTH6A5g/CqWdb8JU48KiJgTgVR14OXRmiHIkkVi0qLxjm3wky8K\r\nsAKxHZJ9wwsVtA55RGb3CZgindtahKCaybmDMned5kXWk/YvoKZf/4nr6zAN\r\nixBn65LaMf5VFoiLzH8Z1FWyXdZtIfeRbPT3b7Djuwbl6LHrkHehyadTIOqq\r\nHNqaAdoQoyR9dxNlkqfUIF5OqXI9sJCCWW9Gyi3MTTBq/pCBTOW59XVLJiCw\r\nEEmUO+pP+3TAIBtvj7Cua1DoegA0RlnOlxCxNw2P7c5ZowMyn4q8MOFSTdku\r\n5rdQM0qHsHaMZ07w6xt/PfxEzjg9zYYrcNNVW/6xF6IHeAOUR4fy8XN8xevc\r\nCvNlojN25bK2xI2r3KderPkjUOffVMUlY0bjYrx2wqX5Ekuek424h118s+A5\r\nf8dR5goHLaMiAbAlwP040GtDLy6DQ0dR5c8/ph36deU30KQNdN9Z+0NYh0Be\r\njsQ/xT6TdyCzziXTI49GjrhRNxi4u4f0IonbnI4yDAGaEv2690U79rcsobJ9\r\nrWLYWDLyMKVh2iJzFREcz6jy76L2DymJhcrxRCyHLRKwTpXtqKjbPtekciqU\r\n+tDq+/0YJeZ7Txf+jYBeeTgSuEn58cA/QbY=\r\n=un3W\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0-rc.1_1671619106987_0.47693398679170884"},"_hasShrinkwrap":false},"4.0.0":{"version":"4.0.0","description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"keywords":["react","decentralized","p2p","distributed","private","earthstar"],"license":"AGPL-3.0","main":"./dist/react-earthstar.cjs","module":"./dist/react-earthstar.js","types":"./dist/react-earthstar.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/react-earthstar.d.ts","node":{"require":"./dist/react-earthstar.cjs","import":"./dist/react-earthstar.mjs"},"default":"./dist/react-earthstar.js"}},"engines":{"node":">=16"},"scripts":{"test":"jest","build":"rollup --config rollup.config.ts --configPlugin typescript","prepare":"yarn build","example":"parcel examples/index.html"},"peerDependencies":{"earthstar":"^10.0.0","react":"^17.0.0","react-dom":"^17.0.0"},"name":"react-earthstar","author":{"name":"Sam Gwilym"},"devDependencies":{"@babel/preset-env":"^7.16.11","@babel/preset-react":"^7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-typescript":"^8.3.1","@testing-library/react-hooks":"^7.0.2","@types/jest":"^26.0.14","@types/jsdom":"^16.2.14","@types/react":"^17.0.39","@types/use-sync-external-store":"^0.0.3","earthstar":"^10.0.0","eslint-plugin-react-hooks":"^4.1.2","jest":"^29.1.1","jest-environment-jsdom":"^29.3.1","jest-localstorage-mock":"^2.4.6","parcel":"^2.3.2","react":"18.2.0","react-dom":"18.2.0","react-test-renderer":"^17.0.2","rollup":"^2.68.0","rollup-plugin-ts":"^2.0.5","typescript":"^4.5.5"},"resolutions":{"**/@typescript-eslint/eslint-plugin":"^4.1.1","**/@typescript-eslint/parser":"^4.1.1"},"dependencies":{"minidenticons":"^1.0.3","use-sync-external-store":"^1.2.0"},"gitHead":"d4a979fcf12a2edcad03d649c88685f322457641","bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"},"homepage":"https://github.com/earthstar-project/react-earthstar#readme","_id":"react-earthstar@4.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.0","dist":{"integrity":"sha512-PhG02RMrSSxGmouFidU0IShLUeldC1J7aAD1XMVWDmbht0ibCokmDnalhoDVgNdYH0iEp5QWmEExVNgeJoUyNg==","shasum":"0af891d2ff89ea003ae0b8dc22585cd4edbaba6b","tarball":"https://registry.npmjs.org/react-earthstar/-/react-earthstar-4.0.0.tgz","fileCount":18,"unpackedSize":4834936,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMZfnNbq+R4YNdEdyru92iflDh6cf74IIMiipYhk982QIgcBsTcZjEuWw7zKJAU83wvFcBNjlKY6dzCpPUevmNcuM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjstExACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoo0A//SPpfTVpamvbEvAPq3Etas6Xzs0fRRXkf/6v4Z7hQWlcSo+AZ\r\nbxWikTgjWCmEkovoetZpO483TKYKCOEXApA5SEhiDK6zsHgDrPXdI2UcAsNA\r\nz+t3x45/LXd0p6nQVEu33ilEIG++ZrLkMIppcR8qQVGMr00u6g3L7r7SdUY0\r\nwiZF6wynw5ettWpryObUR/dCfPEeGC+ca8hLAOmD6P3NxKANPBRfDoYPGaRR\r\n9k/wk2GrZPkMGcS3fN5FyGBvwvi0T12fKwee0FgSRvSZVZ5Q+EJOBSSr49JD\r\ntQ25fsBGaL7k+O0iz1e+GIY9+eErGkXb6rkns9sxOLPpsQKrDG+GoQrTP1md\r\nrIsMsM/zorcHhgmOfCaOsCSC3QlMhOb+9dSAzFIb2mOpIWINmuOBea4CJTtj\r\nm7jf97o0zc0xicUNN4mtBdge/wQYIp0R9wW/cGiUZUNCIKSxbi3aBndfiL7o\r\nB+czn+fIvNcffKssMp0TIbROyh0dp2FXSsJd22jo0eoo3iVOjY4XxSVhiZFc\r\nid9NYHFNMPt6OllqyF/InUwTPCKm1AcatIWSL7G7tMUIl9nOMz6zJfwhZM6j\r\n7mRo/5Cckd/QeJJg95kbjbzlpLvIAH+EtOkEUNH3SN/NWlEzX8Ckw1aebz/X\r\nRGvXRycJxS2mKDjTB1X90NApEakSm3gXLlk=\r\n=2gju\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"sgwil","email":"gwilym@me.com"},"directories":{},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-earthstar_4.0.0_1672663345295_0.5383564024253926"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-17T11:49:49.263Z","1.0.0-preview.0":"2020-10-17T11:49:49.383Z","modified":"2023-01-02T12:42:25.612Z","1.0.0-preview.1":"2020-10-18T11:04:24.979Z","1.0.0-preview.2":"2020-10-21T10:52:05.204Z","1.0.0-preview.3":"2020-10-22T11:44:05.188Z","1.0.0-preview.4":"2020-11-12T14:46:23.975Z","1.0.0-preview.5":"2020-11-12T14:54:21.734Z","1.0.0-preview.6":"2020-11-14T14:08:59.396Z","1.0.0-preview.7":"2020-11-15T14:18:58.814Z","1.0.0-preview.8":"2020-11-28T14:04:36.773Z","1.0.0-preview.9":"2020-11-28T14:43:12.833Z","1.0.0-preview.10":"2020-11-30T15:52:30.868Z","1.0.0-preview.11":"2020-11-30T15:53:29.301Z","1.0.0-preview.12":"2020-12-04T12:40:15.397Z","1.0.0-preview.13":"2020-12-04T12:48:18.565Z","1.0.0-preview.14":"2020-12-07T14:54:54.235Z","1.0.0-preview.15":"2020-12-14T12:24:18.447Z","1.0.0-preview.16":"2021-01-31T09:17:55.755Z","1.0.0-preview.17":"2021-02-01T16:22:34.091Z","1.0.0":"2021-02-03T10:22:32.334Z","1.0.1":"2021-02-03T11:12:08.435Z","1.0.2":"2021-02-05T07:04:47.517Z","1.0.3":"2021-02-05T07:30:06.038Z","1.1.0":"2021-02-12T07:09:12.879Z","1.1.1":"2021-02-12T10:02:28.670Z","2.0.0-beta.0":"2021-02-25T19:36:34.757Z","2.0.0":"2021-03-01T09:02:09.426Z","2.0.1":"2021-03-11T11:55:55.072Z","3.0.1-alpha.0":"2021-04-10T15:01:56.082Z","3.0.1-alpha.1":"2021-04-11T13:23:47.033Z","3.0.1-alpha.2":"2021-04-11T13:51:44.177Z","3.0.1-alpha.3":"2021-04-11T18:59:21.302Z","3.0.1-alpha.4":"2021-04-19T10:57:11.204Z","3.0.1-alpha.5":"2021-04-19T11:05:59.986Z","3.0.1-alpha.6":"2021-07-27T11:51:47.593Z","3.0.1-alpha.7":"2021-08-12T14:04:00.596Z","3.0.1-alpha.8":"2021-08-12T14:09:22.383Z","3.0.1-alpha.9":"2021-08-12T14:57:54.173Z","3.0.1-alpha.10":"2021-08-12T15:14:10.837Z","3.0.1-alpha.11":"2021-11-03T18:15:35.927Z","3.0.1-alpha.12":"2022-03-03T10:20:09.632Z","3.0.1-alpha.13":"2022-03-03T12:54:37.663Z","3.0.1-alpha.14":"2022-03-03T13:01:20.661Z","3.0.1-alpha.15":"2022-03-03T14:03:10.717Z","3.0.1-alpha.16":"2022-03-03T19:42:30.710Z","3.0.1-alpha.17":"2022-03-03T20:17:47.896Z","3.0.1-alpha.18":"2022-03-04T13:40:49.825Z","3.0.1-alpha.19":"2022-03-04T14:53:53.267Z","3.0.1-alpha.20":"2022-03-10T16:07:39.993Z","3.0.1-alpha.21":"2022-03-11T09:00:02.580Z","3.0.1-alpha.22":"2022-03-11T09:02:03.897Z","3.0.1-alpha.23":"2022-03-11T10:05:19.345Z","3.0.1-alpha.25":"2022-03-11T12:10:47.261Z","3.0.1-alpha.26":"2022-03-11T15:09:37.155Z","3.0.1-alpha.27":"2022-03-11T15:13:54.801Z","3.0.1-alpha.28":"2022-03-11T15:17:03.518Z","3.0.1-alpha.29":"2022-03-11T15:18:51.713Z","3.0.1-alpha.30":"2022-03-11T15:33:15.027Z","3.0.0-beta.1":"2022-03-11T21:24:09.116Z","3.0.0":"2022-03-13T15:27:19.109Z","4.0.0-alpha.1":"2022-09-12T09:09:20.314Z","4.0.0-alpha.2":"2022-09-30T09:59:10.119Z","4.0.0-alpha.3":"2022-10-21T09:08:28.491Z","4.0.0-alpha.4":"2022-10-21T10:11:23.120Z","4.0.0-alpha.5":"2022-10-21T10:29:12.917Z","4.0.0-alpha.6":"2022-10-21T10:32:03.545Z","4.0.0-beta.1":"2022-11-23T14:34:41.426Z","4.0.0-beta.2":"2022-11-24T09:40:39.368Z","4.0.0-beta.3":"2022-11-24T11:42:10.859Z","4.0.0-beta.4":"2022-11-24T12:13:55.901Z","4.0.0-beta.5":"2022-12-12T12:06:06.788Z","4.0.0-rc.1":"2022-12-21T10:38:27.323Z","4.0.0":"2023-01-02T12:42:25.519Z"},"maintainers":[{"name":"cinnamon_npm","email":"cinnamon_npm@fastmail.com"},{"name":"rangermauve","email":"rangermauve@hotmail.com"},{"name":"sgwil","email":"gwilym@me.com"}],"description":"A React toolkit for making collaborative, decentralised, offline-first tools you can truly call your own.","author":{"name":"Sam Gwilym"},"license":"AGPL-3.0","readme":"# react-earthstar\n\n## What is this?\n\nA library of React hooks and components for usage with\n[Earthstar](https://earthstar-project.org), storage for private, distributed,\noffline-first application.\n\nThis library is just a few small hooks for subscribing to some events in\nEarthstar, with the same API for querying and writing data.\n\nIt's recommended that you check out Earthstar's\n[README](https://github.com/earthstar-project/earthstar) before reading on if\nyou haven't already.\n\n## Getting started\n\nFirst, install `react-earthstar` and `earthstar` as dependencies to your\nproject:\n\n```\nnpm install earthstar react-earthstar\n```\n\nHere's a basic applet which creates a IndexedDB replica for a `+gardening`\nshare, and renders a list of notes using `useReplica`.\n\n```jsx\nimport * as Earthstar from \"earthstar\";\nimport { useReplica } from 'react-earthstar';\n\n// You get the share address and secret from someone else,\n// Or using Earthstar.Crypto.generateShareKeypair()\n\nconst MY_SHARE_ADDRESS =\n  \"+gardening.bhyux4opeug2ieqcy36exrf4qymc56adwll4zeazm42oamxtr7heq\";\n\nconst MY_SHARE_SECRET = \"buaqth6jr5wkksnhdlpfi64cqcnjzfx3r6cssnfqdvitjmfygsk3q\";\n\nconst replica = new Earthstar.Replica({\n  driver: new ReplicaDriverWeb(MY_SHARE_ADDRESS),\n  shareSecret: MY_SHARE_SECRET,\n});\n\nfunction App() {\n  const cache = useReplica(replica);\n\n  // This will update whenever a document with a path starting with '/notes' updates.\n  const notes = cache.queryDocs({\n    filter: {\n      pathStartsWith: \"/notes\",\n      author: \n    },\n  });\n\n  return (\n    <div>\n      <h1>My notes</h1>\n      { notes.map((noteDoc) => \n        <li>noteDoc.text</li>\n      )}\n      \n    </div>\n  );\n}\n```\n\n## Hooks\n\n### `useReplica`\n\nThis is the workhorse of the library, used for querying documents from replicas.\n\n```js\nconst replica = useReplica(myReplica);\n\nconst txtDocs = replica.queryDocs({ filter: { pathEndsWith: \".txt\" } });\n```\n\nThis hook returns an instance of Earthstar's\n[`ReplicaCache` class](https://doc.deno.land/https://deno.land/x/earthstar@v10.0.0-beta.8/mod.ts/~/ReplicaCache),\nwith the exact same API as `Replica` except synchronous.\n\nWhen you query docs the replica keeps track of what was queried for, and only\nupdates React when the results of those queries are updated. This results in a\nbest-of-both-worlds API where we can have the same API as the vanilla Earthstar\nlibrary, and components which only re-render when they need to. Nice!\n\n### `usePeerReplicas`\n\nReturns an updating array of `Replica` for a given `Peer`.\n\n```js\nfunction ReplicaList() {\n  const replicas = usePeerReplicas(myPeer);\n\n  return (\n    <div>\n      <h1>My replicas</h1>\n      <ul>\n        {replicas.map((replica) => <li>{replica.share}</li>)}\n      </ul>\n    </div>\n  );\n}\n```\n\n### `useAuthorSettings`\n\nReturns a getter and setter for the `SharedSettings`' current author setting.\nUses the `SharedSettingsContext`.\n\n```js\nfunction CurrentAuthorAddress() {\n  const [author, setAuthor] = useAuthorSettings();\n\n  return <div>{author.address}</div>;\n}\n```\n\n### `useShareSettings`\n\nReturns the shares + a callback to add a share + a callback to remove a share\nfrom `SharedSettings`' shares setting. Uses the `SharedSettingsContext`.\n\n```js\nfunction KnownShares() {\n  const [shares, addShare, removeShare] = useAuthorSettings();\n\n  return (\n    <div>\n      <h1>My shares</h1>\n      <ul>\n        {shares.map((share) => <li>{share}</li>)}\n      </ul>\n    </div>\n  );\n}\n```\n\n### `useShareSecretSettings`\n\nReturns the secrets + a callback to add a secret + a callback to remove a secret\nfrom `SharedSettings`' share secrets setting. Uses the `SharedSettingsContext`.\n\n```js\nfunction KnownSecrets() {\n  const [secrets, addSecret, removeSecret] = useAuthorSettings();\n\n  return (\n    <div>\n      <h1>Known secrets...p</h1>\n      <ul>\n        {Object.keys(secrets).map((share) => (\n          <li>{share} {secrets[\"share\"] ? \"✓\" : \"???\"}</li>\n        ))}\n      </ul>\n    </div>\n  );\n}\n```\n\n### `useServerSettings`\n\nReturns the server + a callback to add a server + a callback to remove a server\nfrom `SharedSettings`' servers setting. Uses the `SharedSettingsContext`.\n\n```js\nfunction KnownShares() {\n  const [servers, addServer, removeServer] = useAuthorSettings();\n\n  return (\n    <div>\n      <h1>My servers</h1>\n      <ul>\n        {servers.map((share) => <li>{server}</li>)}\n      </ul>\n    </div>\n  );\n}\n```\n\n## Components\n\n### `<SharedSettingsContext.Provider>`\n\nIf you're going to use any of the settings hooks, you should provide a single\ninstance of `SharedSettings` as a context for them:\n\n```js\nconst settings = new Earthstar.SharedSettings();\n\nfunction App() {\n  return (\n    <SharedSettings.Provider value={settings}>\n      // Components which use useAuthorSettings, useShareSettings etc.\n      <TheRestOfTheApp />\n    </SharedSettings.Provider>\n  );\n}\n```\n\n### `<ShareLabel>`\n\nRenders the human readable portion of a share address, and omits the public key:\ne.g. '+gardening.bhyux4opeug2ieqcy36exrf4qymc56adwll4zeazm42oamxtr7heq' becomes\n'+gardening'. Also renders an identicon next to the address to make it harder\nfor shares to be mistaken for one another. Good for making sure you don't\ndisclose share addresses to people looking over your users' shoulders.\n\n```jsx\n<ShareLabel address=\"+potatoes.b34ou9e8\">\n```\n\nAlso takes an `iconSize` prop (side size in `px`), and a `viewingAuthorSecret`\nprop. The latter prop is used as a salt for generating the identicon, making it\nso that each user has their own identicon for each share, making them harder for\nan attacker to imitate. If available, pass the current user's keypair secret to\nthis prop.\n\n### `<IdentityLabel>`\n\nRenders the shortname portion of an identity's address, omitting the public key,\ne.g. `@cinn.euu8euheuigoe...` just becomes `@cinn`.\n\n```jsx\n<IdentityLabel address=\"@devy.a234gue9Juhxo9eu...\">\n```\n\nAlso takes an `iconSize` prop (side size in `px`), and a `viewingAuthorSecret`\nprop. The latter prop is used as a salt for generating the identicon, making it\nso that each user has their own identicon for each share, making them harder for\nan attacker to imitate. If available, pass the current user's keypair secret to\nthis prop.\n","readmeFilename":"README.md","homepage":"https://github.com/earthstar-project/react-earthstar#readme","keywords":["react","decentralized","p2p","distributed","private","earthstar"],"repository":{"type":"git","url":"git+https://github.com/earthstar-project/react-earthstar.git"},"bugs":{"url":"https://github.com/earthstar-project/react-earthstar/issues"}}