{"_id":"@cloudcannon/svelte-connector","_rev":"11-a68cbc512fe11e9bd65078fdfbfb0750","name":"@cloudcannon/svelte-connector","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@cloudcannon/svelte-connector","version":"1.0.0","keywords":["svelte","sveltekit","CloudCannon","live","editing","CMS"],"author":"","license":"ISC","_id":"@cloudcannon/svelte-connector@1.0.0","maintainers":[{"name":"ryan-collins","email":"ryan@cloudcannon.com"},{"name":"bigelowcc","email":"liam@cloudcannon.com"},{"name":"georgepaulphillips","email":"georgepaulphillips@gmail.com"},{"name":"nathancc","email":"nathan@cloudcannon.com"},{"name":"jonatah","email":"jonatah@cloudcannon.com"},{"name":"rphillips-cc","email":"ross@cloudcannon.com"}],"homepage":"https://github.com/CloudCannon/svelte-connector#readme","bugs":{"url":"https://github.com/CloudCannon/svelte-connector/issues"},"dist":{"shasum":"938167f5da419241ba13120035f89eff26bd1107","tarball":"https://registry.npmjs.org/@cloudcannon/svelte-connector/-/svelte-connector-1.0.0.tgz","fileCount":3,"integrity":"sha512-OBAwU7OzEGrDDsO2+w1pp8MRtoeQZWstjj6PJRM3DWxYxStCGUyJbzTEEfOBBkqw+13sw8xaCvGDnDAp0tT1Aw==","signatures":[{"sig":"MEQCIA9Xk5t3WZXtyvnanPeoRnb5eOCKdoebG2DZoMwdmFgJAiAyI6aVMNtgrXYi+UJp7E1UbauisSmHUZFIc3OEFEnzfQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3154},"main":"index.js","gitHead":"708b87bcb8e8c5810efca5a44a9a4c46927d2db3","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"nathancc","email":"nathan@cloudcannon.com"},"repository":{"url":"git+https://github.com/CloudCannon/svelte-connector.git","type":"git"},"_npmVersion":"7.20.0","description":"A connector for live editing Svelte components in CloudCannon","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@cloudcannon/visual-editor-connector":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/svelte-connector_1.0.0_1634771765440_0.43048146189320646","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@cloudcannon/svelte-connector","version":"1.0.1","keywords":["svelte","sveltekit","CloudCannon","live","editing","CMS"],"author":"","license":"ISC","_id":"@cloudcannon/svelte-connector@1.0.1","maintainers":[{"name":"ryan-collins","email":"ryan@cloudcannon.com"},{"name":"bigelowcc","email":"liam@cloudcannon.com"},{"name":"georgepaulphillips","email":"georgepaulphillips@gmail.com"},{"name":"nathancc","email":"nathan@cloudcannon.com"},{"name":"jonatah","email":"jonatah@cloudcannon.com"},{"name":"rphillips-cc","email":"ross@cloudcannon.com"}],"homepage":"https://github.com/CloudCannon/svelte-connector#readme","bugs":{"url":"https://github.com/CloudCannon/svelte-connector/issues"},"dist":{"shasum":"1efb903bfff8c9bd4f99bb09c2f42136ca027f43","tarball":"https://registry.npmjs.org/@cloudcannon/svelte-connector/-/svelte-connector-1.0.1.tgz","fileCount":3,"integrity":"sha512-7aiYGhIqfJSGfy3Xepu05mxlL9hrLUKTGCx6IlTA7njHEPwKc5Cj1uzZLlAd/RFADSOrU/PxQT+rzcCpSDrNpw==","signatures":[{"sig":"MEUCIFGM8uWI4EpH1EWUNniHekWM1pgfWmybDl3Xh8M4jtH2AiEAtileTXzXVuh4q/g/t4aBBp2wsUw79LFQRFJbtbVtORs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzc2eCRA9TVsSAnZWagAASjUP/inh03Flxs+W6LsWW4LS\nZmk6CXTtCAb0NFvulaBTV1Qg4gA/J26FGu+TR6hB1ZEJKDdWMaPXryl59OGG\ncFzbQgoJdXEcJi2UxzrG4abgEDw/Wn0k6i3RHOwxUgjY4dn1wSL/O9VpF6Hb\n6YZkiq/S5J4GRoDotgMUoTAh+jFmxGT90JA+TAGytHDpkqWrbit7lBlFHT+A\n5YA5ft3eRrzyyRaNAqroe7Fl/cTLN0/skrnz2uBefgZEUPdTnzto86LFLFIT\nzXg9GPhK6GsnEhouH2f8FgXwGEuSHYNKBIWhCH+7eilbR9r0fhyeHnDBeFV5\nOSK/MnFiTXbN1VD3eH40UOswLQp1NWvdzM0Pb2Nt/tldx+QLyJwaXTv64DH+\nhSBsU8J9tTbFZGI7nJ/uImapWrHH0obc5IL3LjYEWHr32arV2YHtQaCTpED0\nAY06SNfopuO5PUkmvaO47FxgPCgs6pwES1Ofngl7WRYIumsE8PKmfuVLCEFF\ntRhc+2bpNsBZ8Pxe6EMYxZF3bStWjkcGP+N6WsZafLBhGv0cM1vNw0WegadU\nVp+VM9uoB9afwKggDSabP7kd6cT9xYYyFoQ7bqbxdBJ3Uqx2KHnR9zB8dzso\nf3WLSi7Q6lX4hpQLrIicEekjHT8fLIF1qqvxH7ekeK31E79XTyHk7QpSNali\nZGkd\r\n=k2sv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"201d42a92dd6bb543fe72c10489014f270aced5d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"nathancc","email":"nathan@cloudcannon.com"},"repository":{"url":"git+https://github.com/CloudCannon/svelte-connector.git","type":"git"},"_npmVersion":"7.20.0","description":"A connector for live editing Svelte components in CloudCannon","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@cloudcannon/visual-editor-connector":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/svelte-connector_1.0.1_1634774179108_0.9099768247048265","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@cloudcannon/svelte-connector","version":"1.0.2","keywords":["svelte","sveltekit","CloudCannon","live","editing","CMS"],"author":"","license":"ISC","_id":"@cloudcannon/svelte-connector@1.0.2","maintainers":[{"name":"tate-cc","email":"tate@cloudcannon.com"},{"name":"ryan-collins","email":"ryan@cloudcannon.com"},{"name":"bigelowcc","email":"liam@cloudcannon.com"},{"name":"georgepaulphillips","email":"georgepaulphillips@gmail.com"},{"name":"nathancc","email":"nathan@cloudcannon.com"},{"name":"jonatah","email":"jonatah@cloudcannon.com"},{"name":"rphillips-cc","email":"ross@cloudcannon.com"}],"homepage":"https://github.com/CloudCannon/svelte-connector#readme","bugs":{"url":"https://github.com/CloudCannon/svelte-connector/issues"},"dist":{"shasum":"6e2f1b54834199c2ac12ef7e88215ea4277bc749","tarball":"https://registry.npmjs.org/@cloudcannon/svelte-connector/-/svelte-connector-1.0.2.tgz","fileCount":3,"integrity":"sha512-S0qda9+WxT1LLSoOsFRJJhoAPap2L36WnZKr9ys1XicTFuTLzCiPPyohKy88D8dXdNQg0I5VDDiU09Ezd1TFSw==","signatures":[{"sig":"MEUCIQDCL8JJfLl03JJbrpx7w7+ycxYVmUVa6GLuNXYmXVbjRAIgWpUq96AC21FWUhLPzZHyV6fLfF81NKLgv7ONci8mhGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1yIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqgqg/7BsPN3iRtmFDE5Zmnq255MUSh4PcRznIyvk1NxWUJidcjEwum\r\ns+eo3keMjfvWmVZ1RneUJc6LH6Uj1goVZ5FWoyI54knq0hsz/v8r8ol51bgM\r\n4+e1/m2kO/yhxFKK8PI2D38HGuGw93cqT9VROFdO90mR432pGCywxljtlUAN\r\n9STvSwd/a+pf0bhiqoMrA9I6gCYOgW2gSz+l5J/n1c6wQbQcSD5H33+W2Xlk\r\n6L19SBnb3Yjzm/B/lqNcaR409nkhRKVz44vjL7dhne+QxlGubBXa79ME51ED\r\nslDK+A2Y0yPb7Fz7qBNDhyuGvwD/DM03kyhqwuSOKZRXhj/4gFGsLIAMIUB6\r\nmWnnGAoLF45dtbv1DTcpTehEBwBsXrPThS9nnODguSsqMklsmuzQrojx6lGl\r\n+LMGgLa6pE8D3h/NM6644PT+5JEp+r6tWg+Ol69xVMfdpDMCcXprh/GRef+h\r\ncAWVT94G66tRdB/RF/5GOnT+HQhhVQdfRTdSgNRv+mutlHVePM/sLxvRQsoq\r\nH20SMsw/cHySFw7fhkHPtk8ZcaalnwHHHGRT14IVvGVa+YrJC0iygcCFzI7m\r\nLsGIJ4A5Tk19UOE8aB3JCAk7Sz+/MUt3un2AEhvqc0kHqMfM0JgBKhDD4Ace\r\ndCAQsJbuOuBnnH1tvmclrZXonSxVqKr9NLI=\r\n=gIKz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","gitHead":"20f8e2e4727fb6adc1c4cc3a1695724891342a63","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"nathancc","email":"nathan@cloudcannon.com"},"repository":{"url":"git+https://github.com/CloudCannon/svelte-connector.git","type":"git"},"_npmVersion":"7.20.0","description":"A connector for live editing Svelte components in CloudCannon","directories":{},"_nodeVersion":"14.17.0","dependencies":{"@cloudcannon/visual-editor-connector":"^1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/svelte-connector_1.0.2_1658266154876_0.782551030044357","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@cloudcannon/svelte-connector","version":"1.0.3","keywords":["svelte","sveltekit","CloudCannon","live","editing","CMS"],"author":"","license":"ISC","_id":"@cloudcannon/svelte-connector@1.0.3","maintainers":[{"name":"tate-cc","email":"tate@cloudcannon.com"},{"name":"ryan-collins","email":"ryan@cloudcannon.com"},{"name":"bigelowcc","email":"liam@cloudcannon.com"},{"name":"georgepaulphillips","email":"georgepaulphillips@gmail.com"},{"name":"nathancc","email":"nathan@cloudcannon.com"},{"name":"jonatah","email":"jonatah@cloudcannon.com"},{"name":"rphillips-cc","email":"ross@cloudcannon.com"}],"homepage":"https://github.com/CloudCannon/svelte-connector#readme","bugs":{"url":"https://github.com/CloudCannon/svelte-connector/issues"},"dist":{"shasum":"ee317795b9548693c8a342caecefdfad3f7a35d0","tarball":"https://registry.npmjs.org/@cloudcannon/svelte-connector/-/svelte-connector-1.0.3.tgz","fileCount":3,"integrity":"sha512-0n1/cbFDzPXlT3Lkk/j+f8R5NFXOCydU6KmqZY+NV+1dd7LFn2qK4XkN5bo8UH1BVyy+R/QmJAuur8waTHm10g==","signatures":[{"sig":"MEUCIEPGpnd5I/zxxNamWbZMW7+JDfs+lTHF0ffTwyomVRqCAiEAkzeg+rDu5/i8lmusuhuXiwOUEuBFaoUvbIHPNEYPMXU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6doiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGKA//SWtK0mH0j40IbllYCUOSgHb47MPcttmztcj78ZUpjPXcp+Qz\r\nPEsaP/HBHPyiU8eBYRj9yHS0Db07yySJvwQIBt5LCNo4JkiwgwdPtenrmQA0\r\n9v9Mfb/HZ/VusLGtQQ1n1FgVfwj2fg4k+H2O2own3Mj95705bBf6AGzeVHIP\r\nKBTxpdDvPQtlJCCRGexhhESZhzWDM6PcDNNRF7NA+itIv7N7L6k/9HazL70N\r\n7EQ2lFboLJxbbWkbl2UKGcrrNd7+ZgzmAi7AQGDt1dXcqg/vpigMn9nN8ge6\r\nxoT/+QQYDxZHLhexFdMG6TZzNJMSld24VWnGEa4zIoeGFfDVzjfFGPpy+v5D\r\nWf5wIFhjM3ayiiKM2I+UPhUBaXf7wMIXP5kv1jIzl364GfTvjjiqALX2+qn6\r\nrxoNIs/BfR1aDjNabJY2iap7Tvlyo0M5/eZ1mIrhyRf+ewSwbKj/06pPxcXY\r\n8W8L6CMMmtpJkPrXTKo2DII+9HYmKjre5SbxyXCR2whOxJ5bzFzGS+E5qN9V\r\nfu47wdOHP3w4LPSB9d6CnpCG5K8+9/UF3jNWDR6S8TJWy4Sc9OZhbs6+Rp3U\r\nzEfQjiAWcX2gd4HmXBy2fBLZs9+sVVmDoR02qxS3kBT9z5l1mxat5ZMI/rzD\r\nLnMnevZkes9LZOJOaE6Ch2AxoJiRDzRPBBc=\r\n=/cVb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","type":"module","gitHead":"68efd40591236375402c7be3f2d4afdd0bb05bdd","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"bigelowcc","email":"liam@cloudcannon.com"},"repository":{"url":"git+https://github.com/CloudCannon/svelte-connector.git","type":"git"},"_npmVersion":"8.11.0","description":"A connector for live editing Svelte components in CloudCannon","directories":{},"_nodeVersion":"17.9.1","dependencies":{"@cloudcannon/visual-editor-connector":"^1.0.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/svelte-connector_1.0.3_1659492898085_0.21069801113385145","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-10-20T23:16:05.358Z","modified":"2026-04-17T02:51:31.002Z","1.0.0":"2021-10-20T23:16:05.614Z","1.0.1":"2021-10-20T23:56:19.231Z","1.0.2":"2022-07-19T21:29:15.061Z","1.0.3":"2022-08-03T02:14:58.260Z"},"bugs":{"url":"https://github.com/CloudCannon/svelte-connector/issues"},"license":"ISC","homepage":"https://github.com/CloudCannon/svelte-connector#readme","keywords":["svelte","sveltekit","CloudCannon","live","editing","CMS"],"repository":{"url":"git+https://github.com/CloudCannon/svelte-connector.git","type":"git"},"description":"A connector for live editing Svelte components in CloudCannon","maintainers":[{"email":"tate@cloudcannon.com","name":"tate-cc"},{"email":"ryan@cloudcannon.com","name":"ryan-collins"},{"email":"ross@cloudcannon.com","name":"rphillips-cc"},{"email":"george@cloudcannon.com","name":"gphillips_nz"}],"readme":"# CloudCannon Svelte Connector\nGive your editors a live visual editing experience by connecting your Svelte site to [CloudCannon](https://cloudcannon.com).\n\n## Installation\n```bash\nnpm i @cloudcannon/svelte-connector\n```\n\n## Example Site\nThis repository contains a [minimal example site](https://github.com/CloudCannon/svelte-connector/tree/main/exampleSite).\nYou can upload this site to CloudCannon to test live editing for yourself.\n\n## Usage\n\n### Requirements for Live Editing\n - Components must have an output URL. SvelteKit routes are a good example.\n - Components must get their data from a data/content file somewhere in your project. This is critical, as the Visual Editor cannot open the components themselves.\n - These data/content files must be configured as a CloudCannon Collection. See the [CloudCannon Reader documentation](https://github.com/CloudCannon/reader#readme) for more information.\n - Components will need to use the Svelte `onDestroy` and `onMount` functions.\n\n\n Add the following code to the component/page you wish to live edit:\n\n ```html\n <script>\n  import { onDestroy, onMount } from 'svelte';\n  import { onCloudCannonChanges, stopCloudCannonChanges } from '@cloudcannon/svelte-connector';\n\n  // pageDetails is passed from parent, or via SvelteKit load function\n  export let pageDetails;\n\n  onMount(async () => {\n    onCloudCannonChanges((newProps) => pageDetails = newProps);\n  });\n\n  onDestroy(async () => {\n    stopCloudCannonChanges();\n  });\n</script>\n```\n\nIn the above code, `pageDetails` is an object that contains data for the markup portion of the component.\nAfter loading the content file in the Visual Editor, changing the data in the sidebar will push the new props to `pageDetails`.\nThis will display the new values in the Visual Editor immediately.\n\n\n## Live Editing in CloudCannon\nOnce configured, open your site in CloudCannon. Open your collection in the sidebar, then open the page you wish to edit.\nAlternatively, open the content file in the CloudCannon file browser, and then switch to the Visual Editor.\n\nMake changes to your data in the sidebar. Your new content will immediately update in the Visual Editor.\n","readmeFilename":"README.md"}