{"_id":"@bizurd/vue-portable-text","_rev":"4-8040dca1cbd869eefaaa4180568fba9a","name":"@bizurd/vue-portable-text","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.1":{"name":"@bizurd/vue-portable-text","version":"0.1.1","description":"A Vue component to render sanity.io's portable text.","main":"dist/vue-portable-text.js","module":"dist/vue-portable-text.esm.js","unpkg":"dist/vue-portable-text.umd.js","types":"dist/index.d.ts","scripts":{"build":"bili","prepare":"husky install","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/bizurd/vue-portable-text.git"},"author":{"name":"Andre van Tonder"},"license":"MIT","bugs":{"url":"https://github.com/bizurd/vue-portable-text/issues"},"homepage":"https://github.com/bizurd/vue-portable-text#readme","dependencies":{"defu":"^5.0.0"},"peerDependencies":{"vue":"^2.0.0"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@testing-library/jest-dom":"^5.14.1","@types/jest":"^26.0.24","@typescript-eslint/eslint-plugin":"^4.29.1","@typescript-eslint/parser":"^4.29.1","@vue/test-utils":"^1.2.2","babel-jest":"^27.0.6","bili":"^5.0.5","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jest-dom":"^3.9.0","eslint-plugin-vue":"^7.15.1","husky":"^7.0.1","jest":"^27.0.6","lint-staged":"^11.1.2","prettier":"^2.3.2","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-vue":"^6.0.0","ts-node":"^10.2.0","typescript":"^4.3.5","vue":"^2.6.14","vue-template-compiler":"^2.6.14"},"lint-staged":{"*.{ts,js,vue}":"eslint --fix","*.{ts,js,vue,md}":"prettier --write"},"_id":"@bizurd/vue-portable-text@0.1.1","dist":{"shasum":"0bfe837f0be77dda022d0c05ea7a6a4d17d8206d","integrity":"sha512-I/KQJejOjFCmSyxS0dHfmzQaEcYWEia97c6ZHCEoK6ciZq73YYVbOzbvhM5/+jOkTD6gpZxXNnBaZfBAQzP1ww==","tarball":"https://registry.npmjs.org/@bizurd/vue-portable-text/-/vue-portable-text-0.1.1.tgz","fileCount":2,"unpackedSize":1751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGiSJCRA9TVsSAnZWagAAnbYP/jR33anoEH8HfuvBrbf5\n1oPHmfolZgY5tymmET0et8OvH5v1yQ4Yjb6M1bWFauGVGBqCp920Yn3FRWJG\nqxXfNIPo8hMxOTlTgV/vxubYKqxa1GbP7s/11rFpDAz5gNwHPHNButh9fMBt\n/BaBVw2bUAjl2cSFh9VwzinL8UZxArmxoz5G9HOpHbpU9YTb/6KZYCDAOv+3\nf8yp+X95XHiqojDxJoLEFD1OC4xmog2eHzMQQOw7vei5M7gVy5eVl58LaiAn\n0JHO/2H/vw8laa+mjugc7QE5J+EeJmmKTvLLG8+t3KdI+EXnoTnLa2zWj49h\nVtsJTxK2TfnweiP1BQH9UpwYZ8EaboGuiQxE6BZkKwII+i2hHkXJqvJzjqgc\nhIuRyB4/tIHXTLMFf7sxyMoQW+3gmLKvyzHBbsDnr7KcoubjHHfgcGJzcy2t\nHI1Dr5HhhDqTAzBDn0Tny/7JOAy09rSo9W2OoVU7R1UHcIUKQQNqM5qUPGRY\nWiCnHHhQ7PCDrsLTkjgI2NiRS0wCacvBplUQ/gOd4mr7NKS8fgdnkz/uDxtQ\nPVXdvK793dwcFiEN3+7XWhNxLSs6ntypM60YZ56C096DV7q0WLjYh+Bgp/mE\nLNV56RHZu3QOY2updVvv9AUw2XtSh7oTtCJzemzFneDdHvMYg8zHsCw1t2Aj\nT7gC\r\n=q8IF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF1X3JHE4PJ/CbWduCAI9MFH74yGNGeCW7XZ2e4R3O5hAiAg8PnOMTChHNGN9LPuVCE1OZ078O8XRy6GxHK5MebB1g=="}]},"_npmUser":{"name":"drevantonder","email":"drevtonder@gmail.com"},"directories":{},"maintainers":[{"name":"drevantonder","email":"drevtonder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-portable-text_0.1.1_1629103241654_0.2255407975120005"},"_hasShrinkwrap":false},"0.1.2":{"name":"@bizurd/vue-portable-text","version":"0.1.2","description":"A Vue component to render sanity.io's portable text.","main":"dist/vue-portable-text.js","module":"dist/vue-portable-text.esm.js","unpkg":"dist/vue-portable-text.umd.js","types":"dist/index.d.ts","scripts":{"build":"bili","prepare":"husky install","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/bizurd/vue-portable-text.git"},"author":{"name":"Andre van Tonder"},"license":"MIT","bugs":{"url":"https://github.com/bizurd/vue-portable-text/issues"},"homepage":"https://github.com/bizurd/vue-portable-text#readme","dependencies":{"defu":"^5.0.0"},"peerDependencies":{"vue":"^2.0.0"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@testing-library/jest-dom":"^5.14.1","@types/jest":"^26.0.24","@typescript-eslint/eslint-plugin":"^4.29.1","@typescript-eslint/parser":"^4.29.1","@vue/test-utils":"^1.2.2","babel-jest":"^27.0.6","bili":"^5.0.5","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jest-dom":"^3.9.0","eslint-plugin-vue":"^7.15.1","husky":"^7.0.1","jest":"^27.0.6","lint-staged":"^11.1.2","prettier":"^2.3.2","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-vue":"^6.0.0","ts-node":"^10.2.0","typescript":"^4.3.5","vue":"^2.6.14","vue-template-compiler":"^2.6.14"},"lint-staged":{"*.{ts,js,vue}":"eslint --fix","*.{ts,js,vue,md}":"prettier --write"},"_id":"@bizurd/vue-portable-text@0.1.2","dist":{"shasum":"b017fb301ee1132de83a2947e019389fad83af18","integrity":"sha512-usW/NTkOqT6t7lRcBtgzHbZHrt8N8ntZ4USpeLxBNUxxsCOCiEZbljFS4E1rFIYcqkhLR2+sFR4jhb3jmr29Tg==","tarball":"https://registry.npmjs.org/@bizurd/vue-portable-text/-/vue-portable-text-0.1.2.tgz","fileCount":26,"unpackedSize":265527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGirLCRA9TVsSAnZWagAAPBoP/24SsVMzzNwvr83zfMAa\ndpvL/hO6Ojcx8LaEi8eLpzenJBHOzEPXy1OupR3S1DOTlzkagwZuWjt55CIF\naXTCNUpWKwrUV3ayKn0uW03ZvEv9PxIXSgyJmjEGQpWdsI0zZnP+bBGybeFL\nuRLMIx6gux5IDBO5Fmdhnz8PHI9lIprmYh0Xgh7fTd5Ht9Jep2i8brwYHz1R\nmLLkM1zPAzico/gcbrOVV/i/kgTBYhcEZVzTql4gvBDcfgOOwlhefFQpBmfI\nMUbqOFcj2WQf47vDs6s9X12ogG9BAt0ELHU3PIkhld2q5el2Y164iDQPW522\nN77VTMTwYfqDQXRDFfgxlZ8DJhe0QOs87gLYNoTtti6odWYHzwkq64GWmVsX\nG1O/gzwKcT+0Lo3PCxpgTIzZ5fmqjBmah6bWUU8NcPSvRa89169FUZWQUmB3\nkepvJZMyGqivmF8sFT8i/2G+4YSWlkYfWYAzNLOn1lwnjc9jAbshm4AwFXVp\nfMX4t4CT8dhOZSqycXb34TNDbX0jfxFsBWzrQBJm8A9gBUPC+FSJPCUDk7eK\neFAnaNarbzbXmm2s8aS3hq4qMksw4VolY4kD73lC4gcSVytCZESSsMxw+DjC\ng+6MUhR7yBlXzRnIIZH5rBDC8VVESmlxAGSiCfsyx/qJWnjlWa+/CeXN0dVh\nb5oi\r\n=rx7B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMDumfmbvZLdzFPZuFyK9kRAB7VPcAGdg1iZ8KfpAd8AiBwaRTRi8FRf8cBvJifqfNw0mcSbT5621mjK0rqCMOoLg=="}]},"_npmUser":{"name":"drevantonder","email":"drevtonder@gmail.com"},"directories":{},"maintainers":[{"name":"drevantonder","email":"drevtonder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-portable-text_0.1.2_1629104843623_0.8032229633012482"},"_hasShrinkwrap":false},"0.1.3":{"name":"@bizurd/vue-portable-text","version":"0.1.3","description":"A Vue component to render sanity.io's portable text.","main":"dist/index.js","module":"dist/index.esm.js","unpkg":"dist/index.umd.js","types":"dist/index.d.ts","scripts":{"build":"bili","prepare":"husky install","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/bizurd/vue-portable-text.git"},"author":{"name":"Andre van Tonder"},"license":"MIT","bugs":{"url":"https://github.com/bizurd/vue-portable-text/issues"},"homepage":"https://github.com/bizurd/vue-portable-text#readme","dependencies":{"defu":"^5.0.0"},"peerDependencies":{"vue":"^2.0.0"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@testing-library/jest-dom":"^5.14.1","@types/jest":"^26.0.24","@typescript-eslint/eslint-plugin":"^4.29.1","@typescript-eslint/parser":"^4.29.1","@vue/test-utils":"^1.2.2","babel-jest":"^27.0.6","bili":"^5.0.5","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jest-dom":"^3.9.0","eslint-plugin-vue":"^7.15.1","husky":"^7.0.1","jest":"^27.0.6","lint-staged":"^11.1.2","prettier":"^2.3.2","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-vue":"^6.0.0","ts-node":"^10.2.0","typescript":"^4.3.5","vue":"^2.6.14","vue-template-compiler":"^2.6.14"},"lint-staged":{"*.{ts,js,vue}":"eslint --fix","*.{ts,js,vue,md}":"prettier --write"},"_id":"@bizurd/vue-portable-text@0.1.3","dist":{"shasum":"ee570383a02676683c696d5b43e49617bcb6527d","integrity":"sha512-oQdRNhFC6hytoInQMU/uq4j9BCorL3ztVUwsl1G9SZTzmG66kh2yLX9ju7ch7E4HuifV8mbjOOuLxEQKpVG47A==","tarball":"https://registry.npmjs.org/@bizurd/vue-portable-text/-/vue-portable-text-0.1.3.tgz","fileCount":26,"unpackedSize":265491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGix6CRA9TVsSAnZWagAAwAMP+wedXHvrZgZgTpIHrpa8\nSIH2Y1YszNfKJA+OnimoOnJbN18+7X+4AUD9w2YndVyQosDT1ahaSFISSHaf\nxzlln6aWL0QLGCH5bdQUj4Aa6Rqx7eS4ukDKR1oYp3Mw5Q3JF06Ols+OImEY\nwyyi61jqR2Wo645O2Yie9/Q855kDRQgkg88R9v42jwumxvB+g+tZqBamSLsZ\nm6GW1Sd/vE7T8eY05A0jL0yQs2AmchyNEVQh5Yd/9bABB0Kz/4ml5jKGOk8i\nFdBJTKHdxxyl2ZxifkiRvgjNW0pGQgNXwUw/kJcItok1G5CurL9/bNlD3JOB\nV6p5DKbbi1e1kmSLAJ4rBfIkQJ+6itrKWZJRcQKT3tE2DbE/WQBfR3glKvVD\nz4DLek4BfVlEO84KFvTlMadslPawy2+NjgIWgqJ5J1ci3RyCF+D3VYRnQGga\nLm1imWgwcSpstgz06w825U9fiWmG2Y7RNyask9eVq6P1Yazfzxd6b2wrfYje\nYELDu3HOlhkYkPEldxz8lX4ZW5Q2ejxULoxO1UJZrcvnXYvgZns6+rSP83B1\nZHV1D6I/hAYVeWTVJUt8WNZ4PeU2NhoS3kzo0UTw5g1A1EJ1OMd30Enq65u+\nQnMq6yLYNohip5MCV4xAGtA6ja4F6Y2y79XFxrUJ34zODpvjC20PdoVzfUWv\nCtvD\r\n=jQ0n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4u3o6dvBUKV5iUzAfRhdokcDQulh/wpKQUpXmt4fO/wIhAK6XfJqvwpKlFPS4W0kIM8Gee39eNeDl/nQSwZZUt7vP"}]},"_npmUser":{"name":"drevantonder","email":"drevtonder@gmail.com"},"directories":{},"maintainers":[{"name":"drevantonder","email":"drevtonder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-portable-text_0.1.3_1629105274459_0.36399876083825133"},"_hasShrinkwrap":false},"0.2.0":{"name":"@bizurd/vue-portable-text","version":"0.2.0","description":"A Vue component to render sanity.io's portable text.","main":"dist/index.js","module":"dist/index.esm.js","unpkg":"dist/index.umd.js","types":"dist/index.d.ts","scripts":{"build":"bili","prepare":"husky install","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/bizurd/vue-portable-text.git"},"author":{"name":"Andre van Tonder"},"license":"MIT","bugs":{"url":"https://github.com/bizurd/vue-portable-text/issues"},"homepage":"https://github.com/bizurd/vue-portable-text#readme","dependencies":{"defu":"^5.0.0"},"peerDependencies":{"vue":"^2.0.0"},"devDependencies":{"@babel/core":"^7.15.0","@babel/preset-env":"^7.15.0","@babel/preset-typescript":"^7.15.0","@testing-library/jest-dom":"^5.14.1","@types/jest":"^26.0.24","@typescript-eslint/eslint-plugin":"^4.29.1","@typescript-eslint/parser":"^4.29.1","@vue/test-utils":"^1.2.2","babel-jest":"^27.0.6","bili":"^5.0.5","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-jest-dom":"^3.9.0","eslint-plugin-vue":"^7.15.1","husky":"^7.0.1","jest":"^27.0.6","lint-staged":"^11.1.2","prettier":"^2.3.2","rollup-plugin-typescript2":"^0.30.0","rollup-plugin-vue":"^6.0.0","ts-node":"^10.2.0","typescript":"^4.3.5","vue":"^2.6.14","vue-template-compiler":"^2.6.14"},"lint-staged":{"*.{ts,js,vue}":"eslint --fix","*.{ts,js,vue,md}":"prettier --write"},"_id":"@bizurd/vue-portable-text@0.2.0","dist":{"shasum":"27728016da4ff215ed9e7c4b474f1abb198d768a","integrity":"sha512-KCN2Dcj0tpz1BCgyR3cYzzQzw+B6GUgy6zgCo6UP+qf08zVGCtPhsyjDYxbu1ZJ+jYyayYh0FOKen7AI0/8sSg==","tarball":"https://registry.npmjs.org/@bizurd/vue-portable-text/-/vue-portable-text-0.2.0.tgz","fileCount":27,"unpackedSize":268214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhG5F8CRA9TVsSAnZWagAA+CgP/1pzbS6r5n/mzwtNy+wR\ndjleHeif9sibz389+2PzdCwr9w8MEHviZo1JqJaa2X6H4JK+Zls7mAG7IpPI\nMIJmbuseUqxvRJ9XQh7NhsFnX7IG2e1EhMae6EPNk/vDbff7jgh2pOQ2mzTI\nuhBNmKxcykDcUNaaYlStlNFcf6fiTje3/3fjgc3ZqjbAJr3/Cbj/+FWvTAK/\nFZigQhAP7y5KfPikiE5J8xoEqpTpupSVS8Qbb3AOrAHS15QslMQZ4L0gw7aN\n0P3alCovfoyUK16wDpXHmEGQLDEPtMANHfMj52lyjj/7GTeRvl67Og88e3OR\nF3KgHDsxURo6SW8gQQ9Jwgtwq4n2cpyMvOw5iGybmgef/vPPFhXi+GfmTwW0\nKK6L2Ab6CEH3P/k41Qh13qe9Iiynx4LRr6jjCwiqN5N92zXEFXwBrUmk6kjs\nw829vRqv9yRwFNP219aVtBnhVz+YnqPwViFpPjVs0kOzH7gce0h6VLh8MArV\nPOeC7wE6CBmrh8wSvuABbV4vFWOmc0egLblEaNPxOqL8LG3uih3+q4kyy6v2\nQcneAb0QrVXBUB3wSBZmgV7SJnSQWjrxHv+W3U/rvWUER1zjuKQeV4xtXW6q\nM83BZmzTKCcme9fdCEnoLyrGPYTNXU+9hx/qLdUk/FCmg7676vARCqcgn9PW\npnCQ\r\n=Shmd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/54bG1eiKWiaRUNq1qxPT+xJCHe1dMB/Km9hlfCJ9PgIgFzfxuUm8eJ008hTq/CGcLwTpVkpTjp4KJaNsOZv0lFo="}]},"_npmUser":{"name":"drevantonder","email":"drevtonder@gmail.com"},"directories":{},"maintainers":[{"name":"drevantonder","email":"drevtonder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-portable-text_0.2.0_1629196668307_0.39052442415058564"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-16T08:40:41.593Z","0.1.1":"2021-08-16T08:40:41.773Z","modified":"2022-04-04T19:17:31.089Z","0.1.2":"2021-08-16T09:07:23.766Z","0.1.3":"2021-08-16T09:14:34.600Z","0.2.0":"2021-08-17T10:37:48.521Z"},"maintainers":[{"name":"drevantonder","email":"drevtonder@gmail.com"}],"description":"A Vue component to render sanity.io's portable text.","homepage":"https://github.com/bizurd/vue-portable-text#readme","repository":{"type":"git","url":"git+https://github.com/bizurd/vue-portable-text.git"},"author":{"name":"Andre van Tonder"},"bugs":{"url":"https://github.com/bizurd/vue-portable-text/issues"},"license":"MIT","readme":"# Vue Portable Text\n\nRender an array of [portable text](https://github.com/portabletext/portabletext) from Sanity with Vue.\n\n> This package works for just Vue 2 for now. However when Nuxt 3 comes out, v2 will support Vue 3 as well. (Not sure if I will maintain Vue 2 support with [vue-demi](https://github.com/vueuse/vue-demi) or support Vue 2 for v1 only)\n\n## Install\n\n```bash\n# NPM\nnpm install --save @bizurd/vue-portable-text\n\n# Yarn\nyarn add @bizurd/vue-portable-text\n\n# PNPM\npnpm add @bizurd/vue-portable-text\n```\n\n## Usage\n\nVue 2:\n\n```vue\n<template>\n  <VuePortableText :blocks=\"blocks\" :serializers=\"serializers\" />\n</template>\n\n<script>\nimport VuePortableText from '@bizurd/vue-portable-text'\n\nexport default {\n  components: {\n    VuePortableText,\n  },\n\n  data() {\n    return {\n      blocks: [\n        {\n          style: 'normal',\n          _type: 'block',\n          children: [\n            {\n              _type: 'span',\n              text: 'Hello World!',\n            },\n          ],\n        },\n      ],\n      serializers: {\n        styles: {\n          // Just for example, I would not recommend doing this\n          normal: 'h1',\n        },\n      },\n    }\n  },\n}\n</script>\n```\n\n### Custom Serializers\n\nYou can create custom serializers using Vue components.\n\n#### Example 1: Heading Component with `id`\n\nHere's an example that adds `id` to headings.\n\n(You'll need `slugify` installed for this example)\n\nIn `MyHeading.vue`:\n\n```vue\n<template>\n  <component :id=\"id\" :is=\"block.style\">\n    <slot />\n  </component>\n</template>\n\n<script>\nimport slugify from 'slugify'\nimport { getTextOfBlocks } from '../portable-text/PortableText'\n\nexport default {\n  props: {\n    block: {\n      type: Object,\n      default: () => {},\n    },\n  },\n\n  computed: {\n    id() {\n      if (!['h1', 'h2', 'h3'].includes(this.block.style)) return undefined\n\n      const text = block.children.reduce((text, block) => text + block.text, '')\n\n      return slugify(text.toLowerCase())\n    },\n  },\n}\n</script>\n```\n\nWherever you're rendering the portable text:\n\n```vue\n<template>\n  <VuePortableText :blocks=\"blocks\" :serializers=\"serializers\" />\n</template>\n\n<script>\nimport MyHeading from './MyHeading.vue'\nimport VuePortableText from '@bizurd/vue-portable-text'\n\nexport default {\n  components: {\n    VuePortableText,\n  },\n\n  data() {\n    return {\n      blocks: [\n        {\n          style: 'h1',\n          _type: 'block',\n          children: [\n            {\n              _type: 'span',\n              text: 'Look the heading has an id!',\n            },\n          ],\n        },\n      ],\n      serializers: {\n        styles: {\n          h1: MyHeading,\n          h2: MyHeading,\n          h3: MyHeading,\n        },\n      },\n    }\n  },\n}\n</script>\n```\n","readmeFilename":"README.md"}