{"_id":"@portabletext/html","_rev":"11-10e6841608ce99fe3bcff1300553162d","name":"@portabletext/html","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.0":{"name":"@portabletext/html","version":"1.0.0","keywords":["portable-text","html"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.0.0","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"6058aff2016303087e63c0463b5872f7bdb9c560","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.0.0.tgz","fileCount":15,"integrity":"sha512-JXbVXj10yAbcw+1UvyaEQWGvOTJAqc4l85HbdZ34HNI4GOHuP6wr42onyrjbGlI92kY6l3MGR+dd9lSboTv8pw==","signatures":[{"sig":"MEUCIE9S8RU5mkq6WopI0xZqvQwOWjonvPHGz6uQzJfQeZI3AiEAyrWP87GENpm2piPOtipJj7R+rJ9sI7F9F1O/2FcJi0c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":235861},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.0.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"christianhg","email":"services@groengaard.dk"},"_resolved":"/private/var/folders/tk/v4wjs8ys3qg845n0bcflmnv00000gp/T/74f59bd38f360b35f13c448946d0be1e/portabletext-html-1.0.0.tgz","_integrity":"sha512-JXbVXj10yAbcw+1UvyaEQWGvOTJAqc4l85HbdZ34HNI4GOHuP6wr42onyrjbGlI92kY6l3MGR+dd9lSboTv8pw==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"10.9.2","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"@vercel/stega":"1.0.0","@portabletext/schema":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.0.0","vitest":"^4.0.18","typescript":"5.9.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.2.1","@portabletext/test":"^1.0.3","@portabletext/types":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/html_1.0.0_1772621466570_0.49042375277088723","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@portabletext/html","version":"1.0.1","keywords":["portable-text","html"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.0.1","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"7951b9180988ffb0fabb75070f833aeaf2c59fa4","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.0.1.tgz","fileCount":15,"integrity":"sha512-EAZxCHN8FYMEFox/PBc+tOg1HYqPD7u9RalgHCu8JMR2ENEPpMU9dEmr1xpUlqe2hUtKTbMiJz9kasAgtH/8uw==","signatures":[{"sig":"MEYCIQC0S+me4Vxzp9szjhxufM/N7LG7WqVLw4TNklO2RwC96AIhAMX37g3hzo84sVabg4yMkOsNuglBDZzeGTqRvokygm9B","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":235861},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.0.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/e31ba4422c0a2133138814136b5f6bd6/portabletext-html-1.0.1.tgz","_integrity":"sha512-EAZxCHN8FYMEFox/PBc+tOg1HYqPD7u9RalgHCu8JMR2ENEPpMU9dEmr1xpUlqe2hUtKTbMiJz9kasAgtH/8uw==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.12.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.0.0","vitest":"^4.1.0","typescript":"5.9.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.2.1","@portabletext/test":"^1.0.3","@portabletext/types":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/html_1.0.1_1773934807102_0.6428842965437229","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@portabletext/html","version":"1.0.2","keywords":["portable-text","html"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.0.2","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"125b471ded31c715b6a3ad3ee3d8e37ff09028ff","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.0.2.tgz","fileCount":15,"integrity":"sha512-99rfmQixUuCvpXAgg0/Wjxq9HHeadCSTOQVC91RCd3SgrIcxSi7b6syJVstbk3KiAC6ND6PQIgfZrzg+UlIqqg==","signatures":[{"sig":"MEUCIANL9CwmEF16JSij2uemqigAESHYbD9U7mOu6d7BDz6YAiEA70KqQTeEkCxsS8zhnBbcqPi0nc6QkmXv69DuwRrpjr0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":234040},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.0.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/57a3d95a084a1a4ee991e47aeb8f7e93/portabletext-html-1.0.2.tgz","_integrity":"sha512-99rfmQixUuCvpXAgg0/Wjxq9HHeadCSTOQVC91RCd3SgrIcxSi7b6syJVstbk3KiAC6ND6PQIgfZrzg+UlIqqg==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.14.1","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.0.0","vitest":"^4.1.4","typescript":"5.9.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.2.1","@portabletext/test":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/html_1.0.2_1779280216331_0.07317797097833023","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@portabletext/html","version":"1.0.3","keywords":["portable-text","html"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.0.3","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"6d6ffbc321758bc4a545dfb5f305d9f5f68ca51f","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.0.3.tgz","fileCount":15,"integrity":"sha512-O7kHWwJKGK9iBw29Qk4qyklVPmGE2CdYAY1RlJWFV7JLxxFhrvxKq/tbGcg+FRUjnxTqrxxEAkmIcGWDAQX53A==","signatures":[{"sig":"MEYCIQD9PY4k8b8UIycURXER/qvypM+yokRfdtMlBXIJhoADJQIhAOFdWw4UDjTjfRMQWFyOW10B2V46bmCAJHTVvnSJQJ/V","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":234040},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.0.3.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/cf2c74cf083be8042abf151b2503f0b5/portabletext-html-1.0.3.tgz","_integrity":"sha512-O7kHWwJKGK9iBw29Qk4qyklVPmGE2CdYAY1RlJWFV7JLxxFhrvxKq/tbGcg+FRUjnxTqrxxEAkmIcGWDAQX53A==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.17.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.0.0","vitest":"^4.1.8","typescript":"5.9.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.2.1","@portabletext/test":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/html_1.0.3_1781856925544_0.339116646467879","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@portabletext/html","version":"1.1.0","keywords":["portable-text","html"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.1.0","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"9af7387393f9896b9c33c36cbf75d85ce1026cb0","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.1.0.tgz","fileCount":15,"integrity":"sha512-5+gl7vuB0xHuKcEnT0aI4w8/Ob4xa1zNnxNgOJ3u5flV20wIzFbFYlWa1+LTA21jMQwoGExg7T+cnelnnDO9kQ==","signatures":[{"sig":"MEUCIQCWA5Khm01r+qvBFbzrDaHh9n4/j7iuGAlrN7soV70M4gIgHxJPrzjccDHidx1oOVbX3OdyciGQy5TM67Sj3Kdtv10=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":254203},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/64d8a759eccc0e06aa99a0041254d072/portabletext-html-1.1.0.tgz","_integrity":"sha512-5+gl7vuB0xHuKcEnT0aI4w8/Ob4xa1zNnxNgOJ3u5flV20wIzFbFYlWa1+LTA21jMQwoGExg7T+cnelnnDO9kQ==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.17.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.2.0","vitest":"^4.1.9","typescript":"5.9.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.2.1","@portabletext/test":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/html_1.1.0_1782294102273_0.7752920559355834","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@portabletext/html","version":"1.1.1","keywords":["html","portable-text"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.1.1","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"afc3d26e2ee12972b4cc7332ae5a89378ba3579f","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.1.1.tgz","fileCount":15,"integrity":"sha512-PoMAnbyT3Nz2v0pHF2IkhPKwOd8Rb/LxwwnfbK3SNBswdZmYODprrFgRe+wovUQxvTr6NQlPi1Zttydt5JKZ5A==","signatures":[{"sig":"MEYCIQDzeWv495rrQmeIQMeZ53x9QdMlV/J6/yVL+tcRVjJdpQIhAIVZZAtkrcWU4hpkk+kRWYVKhV/0ynE5mrWL/E7CKND9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":254131},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.1.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check --clean","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/dbb7061bc15a2127b99d6b2d26c9a395/portabletext-html-1.1.1.tgz","_integrity":"sha512-PoMAnbyT3Nz2v0pHF2IkhPKwOd8Rb/LxwwnfbK3SNBswdZmYODprrFgRe+wovUQxvTr6NQlPi1Zttydt5JKZ5A==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.18.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.3"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^27.2.0","vitest":"^4.1.10","typescript":"6.0.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^10.8.2","@portabletext/test":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/html_1.1.1_1783686993310_0.95004427899407","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@portabletext/html","version":"1.1.2","keywords":["html","portable-text"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.1.2","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"98a9d4ec1f2db407866be75182bd8a622ea29e04","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.1.2.tgz","fileCount":15,"integrity":"sha512-y1r71CwPvz0nLBrrGf+O80plCYCZSsDEdrdKVAbpbpHM5/w92M1XEhm+NyT61e6FOBvQsn/XA9nIZKqcbRBKLw==","signatures":[{"sig":"MEUCIBaNQxfgeP+BhCTb8AH23E7r611gODtMP6STfb0iaIgcAiEAqnFHLDQlSFds9vnb9vIlrkG5JY5sLY100SJEtuFg++Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":248035},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/407c816b65fbce60f0a30cd554ded977/portabletext-html-1.1.2.tgz","_integrity":"sha512-y1r71CwPvz0nLBrrGf+O80plCYCZSsDEdrdKVAbpbpHM5/w92M1XEhm+NyT61e6FOBvQsn/XA9nIZKqcbRBKLw==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.19.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.4"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0","jsdom":"^27.2.0","vitest":"^4.1.10","typescript":"6.0.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^12.1.0","@portabletext/test":"^1.0.5"},"_npmOperationalInternal":{"tmp":"tmp/html_1.1.2_1786343734813_0.44182975742844643","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@portabletext/html","version":"1.2.0","keywords":["html","portable-text"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@1.2.0","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"aef2fb67aa601fa07138a3537e915830037fb03e","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-1.2.0.tgz","fileCount":15,"integrity":"sha512-4xtdIdGOAdpXv4PfcSLZAoVdOURt4hVLs/bKeXjpQzja3vWgD/A5sscMsElO3zESDXcp5fWZG2s3eJwjLU3i3g==","signatures":[{"sig":"MEUCIQDzrCN5FXDIDIzSLyUo1Cio3mVG1rGbZnvSCBRFj8RbSAIgIriPqQxbLuM38nJX+pe2+/azyPMeqSmRF8IjnsVoFto=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":262091},"main":"./dist/index.js","type":"module","_from":"file:portabletext-html-1.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19 <22 || >=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check","clean":"del .turbo && del dist && del node_modules","lint:fix":"biome lint --write .","test:unit":"vitest --run --project unit","check:lint":"biome lint .","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/e3eef4a98dd726822c761b8ef635f41b/portabletext-html-1.2.0.tgz","_integrity":"sha512-4xtdIdGOAdpXv4PfcSLZAoVdOURt4hVLs/bKeXjpQzja3vWgD/A5sscMsElO3zESDXcp5fWZG2s3eJwjLU3i3g==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.19.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^2.2.4"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0","jsdom":"^27.2.0","vitest":"^4.1.10","typescript":"6.0.3","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^12.1.0","@portabletext/test":"^1.0.5"},"_npmOperationalInternal":{"tmp":"tmp/html_1.2.0_1786972149065_0.34473467484953413","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@portabletext/html","version":"2.0.0","keywords":["html","portable-text"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@2.0.0","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"4e752b37dae7e2eed7066dfe6a22b4c8e4b2f029","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-2.0.0.tgz","fileCount":15,"integrity":"sha512-TYGEgArg2VA3FEDVKQr53Zf5fdwfTUjW2vs1nIVFzEOBV5/vUJu6k2wc3uqSG2KBmJ36QiH1Db++d0InqfEkhg==","signatures":[{"sig":"MEUCIQD5QKj+HRLECZPFCTeMtgtxAUFyRwOzsdaGoki+BZe+PAIgH07Cfm5KsKx0pHgxi2LOL5QSgGegOOWuy5fJwHjSXnc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":261943},"type":"module","_from":"file:portabletext-html-2.0.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check","clean":"del .turbo && del dist && del node_modules","test:unit":"vitest --run --project unit","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/2125c93d3f319a5d326e0ae862810e1d/portabletext-html-2.0.0.tgz","_integrity":"sha512-TYGEgArg2VA3FEDVKQr53Zf5fdwfTUjW2vs1nIVFzEOBV5/vUJu6k2wc3uqSG2KBmJ36QiH1Db++d0InqfEkhg==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.19.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0","jsdom":"^27.2.0","vitest":"^4.1.10","typescript":"^7.0.2","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^12.3.0","@portabletext/test":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/html_2.0.0_1787648607537_0.7764913992097091","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@portabletext/html","version":"2.0.1","keywords":["html","portable-text"],"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","_id":"@portabletext/html@2.0.1","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"homepage":"https://portabletext.org","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"d1ab5ff054269bf9ec05f2256809bf0872e0f6ec","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-2.0.1.tgz","fileCount":15,"integrity":"sha512-FjJiemGN9iH12dcrxLv16FPtJJBKqW95ErEvGTmouWOeKO77UGhqZJ3MsBeyhIMA14dlaa62vl8u7HI0NkRlrA==","signatures":[{"sig":"MEUCIQC2myXIpAKq7KidqWLj0PkCdEt18B7B/L/3nEnxPrz5VQIgSBkd2Gf+ZjOYTvWmvZoli8TppxPFqyzAoGY7An05sWs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIEs92eyVsqkSYhiGw2YIsvfeA/7jZYW90BYT5GufXbDZAiAoYdA+dtWY7STeUCMvA3XqqDtaAgsKDkVY21mxEw2vdA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":261921},"type":"module","_from":"file:portabletext-html-2.0.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check","clean":"del .turbo && del dist && del node_modules","test:unit":"vitest --run --project unit","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"_resolved":"/tmp/1ee9ffc00a29afa101778b42dd3e6f1e/portabletext-html-2.0.1.tgz","_integrity":"sha512-FjJiemGN9iH12dcrxLv16FPtJJBKqW95ErEvGTmouWOeKO77UGhqZJ3MsBeyhIMA14dlaa62vl8u7HI0NkRlrA==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.21.0","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0","jsdom":"^27.2.0","vitest":"^4.1.11","typescript":"^7.0.2","@types/node":"^20","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^12.3.0","@portabletext/test":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/html_2.0.1_1791548729859_0.22392723648581891","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"_id":"@portabletext/html@2.0.2","bugs":{"url":"https://github.com/portabletext/editor/issues"},"dist":{"shasum":"f2f517e471b69077c273acf0e3e0078fd059acb3","tarball":"https://registry.npmjs.org/@portabletext/html/-/html-2.0.2.tgz","fileCount":15,"integrity":"sha512-9s69Dd2F5QjSHeiM11w+vnuYSjSDatXK3W033rpVCOG5AItVglFUmZzKh7UqAFeV6T9sTSjCfaX7lo2UesK6Uw==","signatures":[{"sig":"MEYCIQDLzvda7sNTu5C55LV/DdluhcZIYvBRALnPjcmd4zIYKQIhANG+gplLmeHeuZeSNbUkFEdrBph7mnv1usn9kFVvGh0E","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIELTjuBbVWlT/MEyNaY0twO/MQB5AAG/dtuYS22Nd0r9AiANxu7K/LvSY+Bq6geuWlHbIIiwUzmUo5X5Bcdt9Zc7zA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@portabletext%2fhtml@2.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":261920},"name":"@portabletext/html","type":"module","_from":"file:portabletext-html-2.0.2.tgz","types":"./dist/index.d.ts","author":{"name":"Sanity.io","email":"hello@sanity.io"},"engines":{"node":">=22.12"},"exports":{".":"./dist/index.js","./rules":"./dist/rules/index.js","./package.json":"./package.json"},"license":"MIT","scripts":{"dev":"pkg-utils watch","test":"vitest --run","build":"pkg-utils build --strict --check","clean":"del .turbo && del dist && del node_modules","test:unit":"vitest --run --project unit","test:watch":"vitest","check:types":"tsc","test:unit:watch":"vitest --project unit","check:types:watch":"tsc --watch"},"version":"2.0.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"7afeabfa-496d-43cf-b79b-c2f38e82c578"}},"homepage":"https://portabletext.org","keywords":["html","portable-text"],"_resolved":"/tmp/8a1d03ebff7827f9b1d3232f0281ebf9/portabletext-html-2.0.2.tgz","_integrity":"sha512-9s69Dd2F5QjSHeiM11w+vnuYSjSDatXK3W033rpVCOG5AItVglFUmZzKh7UqAFeV6T9sTSjCfaX7lo2UesK6Uw==","repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"_npmVersion":"11.21.1","description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","directories":{},"maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"sideEffects":false,"_nodeVersion":"24.22.0","dependencies":{"@vercel/stega":"^1.1.0","@portabletext/schema":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^8.2.0","jsdom":"^27.2.0","vitest":"^5.0.4","typescript":"^7.0.2","@types/node":"^24","@types/jsdom":"^27.0.0","@sanity/tsconfig":"^2.1.0","@sanity/pkg-utils":"^12.3.0","@portabletext/test":"^2.1.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/html_2.0.2_1792485984004_0.5219633786141828"}}},"time":{"created":"2026-03-04T10:51:06.395Z","modified":"2026-10-20T08:46:24.675Z","1.0.0":"2026-03-04T10:51:06.740Z","1.0.1":"2026-03-19T15:40:07.292Z","1.0.2":"2026-05-20T12:30:16.510Z","1.0.3":"2026-06-19T08:15:25.672Z","1.1.0":"2026-06-24T09:41:42.411Z","1.1.1":"2026-07-10T12:36:33.440Z","1.1.2":"2026-08-10T06:35:34.960Z","1.2.0":"2026-08-17T13:09:09.219Z","2.0.0":"2026-08-25T09:03:27.685Z","2.0.1":"2026-10-09T12:25:29.961Z","2.0.2":"2026-10-20T08:46:24.098Z"},"bugs":{"url":"https://github.com/portabletext/editor/issues"},"author":{"name":"Sanity.io","email":"hello@sanity.io"},"license":"MIT","homepage":"https://portabletext.org","keywords":["html","portable-text"],"repository":{"url":"git+https://github.com/portabletext/editor.git","type":"git","directory":"packages/html"},"description":"Convert HTML to Portable Text with built-in support for Google Docs, Word, and Notion","maintainers":[{"name":"kmelve","email":"knut.melvaer@gmail.com"},{"name":"rexxars","email":"espen@hovlandsdal.com"},{"name":"skogsmaskin","email":"per.kristian.nordnes@gmail.com"},{"name":"mariuslundgard","email":"studio@mariuslundgard.com"},{"name":"bjoerge","email":"bjoerge@gmail.com"},{"name":"rbotten","email":"rbotten@gmail.com"},{"name":"sanity-io","email":"developers@sanity.io"},{"name":"snorreeb","email":"snorre.e.brekke@gmail.com"},{"name":"josef-sanity","email":"josef.hlavacek@sanity.io"},{"name":"stipsan","email":"stipsan@gmail.com"},{"name":"christianhg","email":"services@groengaard.dk"}],"readme":"# `@portabletext/html`\n\n> Convert HTML to Portable Text\n\n> **Using Sanity?** [`@portabletext/block-tools`](../block-tools) wraps this package with Sanity schema support - use that if you already have a compiled Sanity schema.\n\n## Installation\n\n```bash\nnpm install @portabletext/html\n```\n\n## Quick start\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\n\nconst blocks = htmlToPortableText('<h1>Hello <strong>world</strong></h1>')\n```\n\n```json\n[\n  {\n    \"_type\": \"block\",\n    \"_key\": \"f4s8k2\",\n    \"style\": \"h1\",\n    \"children\": [\n      {\"_type\": \"span\", \"_key\": \"a9c3x1\", \"text\": \"Hello \", \"marks\": []},\n      {\"_type\": \"span\", \"_key\": \"b7d2m5\", \"text\": \"world\", \"marks\": [\"strong\"]}\n    ],\n    \"markDefs\": []\n  }\n]\n```\n\n## Supported features\n\n| Feature              | HTML to Portable Text |\n| -------------------- | --------------------- |\n| Headings (h1-h6)     | Yes                   |\n| Paragraphs           | Yes                   |\n| Bold                 | Yes                   |\n| Italic               | Yes                   |\n| Underline            | Yes                   |\n| Strikethrough        | Yes                   |\n| Inline code          | Yes                   |\n| Code blocks          | Yes\\*                 |\n| Links                | Yes                   |\n| Blockquotes          | Yes                   |\n| Ordered lists        | Yes                   |\n| Unordered lists      | Yes                   |\n| Nested lists         | Yes                   |\n| Images               | Yes\\*                 |\n| Tables               | Yes\\*                 |\n| Google Docs paste    | Yes                   |\n| Microsoft Word paste | Yes                   |\n| Word Online paste    | Yes                   |\n| Notion paste         | Yes                   |\n\n\\* Requires custom configuration (see usage below)\n\n## Usage\n\n### `htmlToPortableText`\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\n\nconst blocks = htmlToPortableText(`\n  <h1>Hello World</h1>\n  <p>This is <strong>bold</strong> and <em>italic</em> text with a <a href=\"https://example.com\">link</a>.</p>\n  <ul>\n    <li>First item</li>\n    <li>Second item</li>\n  </ul>\n`)\n```\n\n### Custom schema\n\nBy default, `htmlToPortableText` uses a schema with common styles, decorators, and annotations. You can provide your own schema to control what types are produced:\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\nimport {compileSchema, defineSchema} from '@portabletext/schema'\n\nconst schema = compileSchema(\n  defineSchema({\n    decorators: [{name: 'strong'}, {name: 'em'}],\n    styles: [{name: 'normal'}, {name: 'h1'}, {name: 'h2'}],\n    annotations: [{name: 'link'}],\n    blockObjects: [{name: 'image', fields: [{name: 'src', type: 'string'}]}],\n  }),\n)\n\nconst blocks = htmlToPortableText(html, {schema})\n```\n\n### Custom rules\n\nRules give you full control over how HTML elements are converted to Portable Text. Custom rules are checked before the built-in rules - the first rule that returns a value wins.\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\n\nconst blocks = htmlToPortableText(html, {\n  rules: [\n    {\n      deserialize(el, _next, createBlock) {\n        // Convert <aside class=\"callout\"> to a custom callout block type\n        if (\n          el.tagName?.toLowerCase() !== 'aside' ||\n          !el.classList?.contains('callout')\n        ) {\n          return undefined\n        }\n        return createBlock({\n          _type: 'callout',\n          tone: el.getAttribute('data-tone') ?? 'info',\n          text: el.textContent ?? '',\n        })\n      },\n    },\n  ],\n})\n```\n\n### Whitespace handling\n\nThe `whitespaceMode` option controls how whitespace is handled during deserialization:\n\n```ts\nconst blocks = htmlToPortableText(html, {\n  whitespaceMode: 'normalize', // 'preserve' | 'remove' | 'normalize'\n})\n```\n\n- `'preserve'` (default) - keep whitespace as-is\n- `'remove'` - strip extra whitespace\n- `'normalize'` - normalize whitespace (useful for Google Docs paste)\n\n### HTML parsing\n\nIn the browser, `htmlToPortableText` uses the native `DOMParser`. In Node.js, you need to provide a parser:\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\nimport {JSDOM} from 'jsdom'\n\nconst blocks = htmlToPortableText(html, {\n  parseHtml: (html) => new JSDOM(html).window.document,\n})\n```\n\n### Image handling\n\nImages require a custom matcher since there's no universal way to represent them in Portable Text. The `types.image` option receives an `ObjectMatcher` that's called for every `<img>` element:\n\n```ts\nimport {htmlToPortableText, type ObjectMatcher} from '@portabletext/html'\nimport {compileSchema, defineSchema} from '@portabletext/schema'\n\nconst schema = compileSchema(\n  defineSchema({\n    blockObjects: [{name: 'image', fields: [{name: 'src', type: 'string'}]}],\n    inlineObjects: [{name: 'image', fields: [{name: 'src', type: 'string'}]}],\n  }),\n)\n\nconst imageMatcher: ObjectMatcher<{src?: string; alt?: string}> = ({\n  context,\n  value,\n  isInline,\n}) => {\n  const collection = isInline\n    ? context.schema.inlineObjects\n    : context.schema.blockObjects\n\n  if (!collection.some((obj) => obj.name === 'image')) {\n    return undefined\n  }\n\n  return {\n    _key: context.keyGenerator(),\n    _type: 'image',\n    ...(value.src ? {src: value.src} : {}),\n  }\n}\n\nconst blocks = htmlToPortableText(html, {\n  schema,\n  types: {image: imageMatcher},\n})\n```\n\nThe matcher is called with `isInline: false` for block-level images and `isInline: true` for inline images. Return `undefined` to skip the image.\n\n### Code block handling\n\n`<pre>` elements and runs of monospace paragraphs pasted from Google Docs are deserialized into a code block object via the `types.code` matcher. The default matcher resolves against the schema's `code` block object when it declares a `code` string field (the shape of the default schema's code object, and of [`@sanity/code-input`](https://www.npmjs.com/package/@sanity/code-input)). Schemas without such an object fall through to a `code`-decorated text block when the schema defines the decorator, or to plain text otherwise.\n\nConsumers with a different shape can pass their own matcher:\n\n```ts\nimport {htmlToPortableText, type ObjectMatcher} from '@portabletext/html'\nimport {compileSchema, defineSchema} from '@portabletext/schema'\n\nconst schema = compileSchema(\n  defineSchema({\n    blockObjects: [\n      {\n        name: 'codeSnippet',\n        fields: [\n          {name: 'source', type: 'string'},\n          {name: 'lang', type: 'string'},\n        ],\n      },\n    ],\n  }),\n)\n\nconst codeMatcher: ObjectMatcher<{\n  language: string | undefined\n  code: string\n}> = ({context, value}) => ({\n  _key: context.keyGenerator(),\n  _type: 'codeSnippet',\n  source: value.code,\n  lang: value.language,\n})\n\nconst blocks = htmlToPortableText(html, {\n  schema,\n  types: {code: codeMatcher},\n})\n```\n\nThe matcher receives `{language: string | undefined, code: string}` and returns the Portable Text Object to emit, or `undefined` to fall through to a `code`-decorated text block.\n\n### Table flattening\n\nThe `createFlattenTableRule` helper converts tables into a flat list of blocks:\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\nimport {createFlattenTableRule} from '@portabletext/html/rules'\n\nconst blocks = htmlToPortableText(html, {\n  rules: [\n    createFlattenTableRule({\n      schema,\n      separator: () => ({_type: 'span', text: ': '}),\n    }),\n  ],\n})\n```\n\n### Table deserialization\n\nThe `createTableRule` helper converts `<table>` elements into a nested table shape (`table` → `rows` → `cells` → `value`), the shape `@portabletext/plugin-table`'s `defineTable` produces:\n\n```ts\nimport {htmlToPortableText} from '@portabletext/html'\nimport {createTableRule} from '@portabletext/html/rules'\n\nconst blocks = htmlToPortableText(html, {\n  schema,\n  rules: [createTableRule({schema})],\n})\n```\n\n`headerRows` is set to the count of leading rows inside `<thead>`, or whose cells are all `<th>`, and omitted when there are none. Rows shorter than the widest row are padded with empty cells; `colspan`/`rowspan` are ignored, so a spanning cell contributes one cell and the padding fills the rest. Pass `containers` to match a `defineTable` call whose container names were renamed; it is role-keyed like `defineTable`'s own option, and only `type` and `arrayField` are read, so the container definitions given to `defineTable` can be passed through unchanged:\n\n```ts\ncreateTableRule({\n  schema,\n  containers: {\n    table: {type: 'richTable', arrayField: 'tableRows'},\n    row: {type: 'tableRow', arrayField: 'rowCells'},\n    cell: {type: 'tableCell', arrayField: 'content'},\n  },\n})\n```\n\nRows are read in the DOM's table row order, which places `<thead>` rows first and `<tfoot>` rows last regardless of where they appear in the source markup, so a `<thead>` written after `<tbody>` still counts toward `headerRows`.\n\n### Key generation\n\nBy default, random keys are generated for each block and span. You can provide your own key generator for deterministic output:\n\n```ts\nlet i = 0\nconst blocks = htmlToPortableText(html, {\n  keyGenerator: () => `key${i++}`,\n})\n```\n\n## Paste source support\n\nThe package includes built-in preprocessors that detect and handle paste from:\n\n- **Google Docs** - handles inline styles, checkmark lists, and whitespace quirks\n- **Microsoft Word** - handles mso-list CSS, heading styles, and list numbering\n- **Word Online** - handles WACImage containers, TextRun formatting, and paragraph styles\n- **Notion** - handles inline style formatting for single-block copies\n\nThese preprocessors run automatically - no configuration needed.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}