{"_id":"carta-plugin-video","_rev":"4-8ee08b398318341785fba12f226ae608","name":"carta-plugin-video","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"carta-plugin-video","version":"1.0.0","keywords":["carta","markdown","editor","marked","text editor","marked editor","syntax highlighting","video"],"author":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"license":"MIT","_id":"carta-plugin-video@1.0.0","maintainers":[{"name":"maisonsmd","email":"maisonsmd@gmail.com"}],"homepage":"https://github.com/maisonsmd/carta-plugin-video#readme","bugs":{"url":"https://github.com/maisonsmd/carta-plugin-video/issues"},"dist":{"shasum":"1f630c2c86a1b6b2a0d99c8ee683538f57786836","tarball":"https://registry.npmjs.org/carta-plugin-video/-/carta-plugin-video-1.0.0.tgz","fileCount":18,"integrity":"sha512-tnwaS7G6kbGuajtBCucpr03Aww4cNKXSToj1jCCt9usVQKHCk67g3Rb8SNa2HKuZpoHJ0x879w5/Z0+HX2Lp/g==","signatures":[{"sig":"MEUCIQDDOVjEwaNPYv0fdm97tE3B0NW5/sjBoYPDyN2qQ6MZPAIgeYckxs5GRdq9U/JHZOe3mJK0I/d9jNEvmtgKC4D0FGg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15428},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"},"./default.css":"./dist/default.css","./default-theme.css":"./dist/default.css"},"gitHead":"81dce1f0ffdadcfee4bf3382d4784dfe902f8fb7","scripts":{"dev":"vite dev","lint":"prettier --plugin-search-dir . --check . && eslint .","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --plugin-search-dir . --write .","package":"svelte-kit sync && svelte-package && publint","prepare":"husky install","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"repository":{"url":"git+https://github.com/maisonsmd/carta-plugin-video.git","type":"git"},"_npmVersion":"9.5.0","description":"This plugin adds ability to render online video from Youtube or Vimeo.","directories":{},"lint-staged":{"*.{js,ts,svelte}":"eslint --cache --fix --no-error-on-unmatched-pattern","*.{js,ts,css,md,svelte,html,yml,json,cjs}":"prettier --write"},"_nodeVersion":"18.15.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^4.3.9","husky":"^8.0.3","tslib":"^2.4.1","marked":"^9.1.5","svelte":"^3.54.0 || ^4.0.0","publint":"^0.2.7","carta-md":"^3.1.0","prettier":"^3.1.1","typescript":"^5.0.0","lint-staged":"^15.2.0","svelte-check":"^3.0.1","@sveltejs/kit":"^1.5.0","@sveltejs/package":"^2.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-svelte":"^2.35.1","@sveltejs/adapter-auto":"^2.0.0","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.1.2","@typescript-eslint/eslint-plugin":"^6.19.0"},"peerDependencies":{"marked":"^9.1.5","svelte":"^3.54.0 || ^4.0.0","carta-md":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-plugin-video_1.0.0_1705838053788_0.05614469376623221","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"carta-plugin-video","version":"2.0.0","keywords":["carta","markdown","editor","marked","text editor","marked editor","syntax highlighting","video"],"author":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"license":"MIT","_id":"carta-plugin-video@2.0.0","maintainers":[{"name":"maisonsmd","email":"maisonsmd@gmail.com"}],"homepage":"https://github.com/maisonsmd/carta-plugin-video#readme","bugs":{"url":"https://github.com/maisonsmd/carta-plugin-video/issues"},"dist":{"shasum":"db560b26fa5a21b579bd66e0b7df3d756d4be5e8","tarball":"https://registry.npmjs.org/carta-plugin-video/-/carta-plugin-video-2.0.0.tgz","fileCount":18,"integrity":"sha512-a3VAwSSMXpJfKmOYXLkPofkTWGEl3MUcEuDCjA+cpXLkgezHxiNqL8eoZpc7jmU/SJqZhBPsBNTJ7/rCfnER1w==","signatures":[{"sig":"MEUCIQDZexhazNJSNEobvhb25jt8w5YFauKIpDOzwPedqzokPQIgYwNL970S7vUW4Szq6uNqWltoepg8oZfL+KwDepPKvxk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16116},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"},"./default.css":"./dist/default.css","./default-theme.css":"./dist/default.css"},"gitHead":"96d5e5d74bb433a6d7c0bdd8378d514c7ed86cf9","scripts":{"dev":"vite dev","lint":"prettier --plugin-search-dir . --check . && eslint .","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --plugin-search-dir . --write .","package":"svelte-kit sync && svelte-package && publint","prepare":"husky install","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"repository":{"url":"git+https://github.com/maisonsmd/carta-plugin-video.git","type":"git"},"_npmVersion":"10.7.0","description":"This plugin adds ability to render online video from Youtube or Vimeo.","directories":{},"lint-staged":{"*.{js,ts,svelte}":"eslint --cache --fix --no-error-on-unmatched-pattern","*.{js,ts,css,md,svelte,html,yml,json,cjs}":"prettier --write"},"_nodeVersion":"20.14.0","dependencies":{"mdast":"^3.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0","unist-util-find-before":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","husky":"^8.0.3","tslib":"^2.4.1","svelte":"^4.2.12","publint":"^0.1.9","unified":"^11.0.4","carta-md":"^4.0.0","prettier":"^3.1.1","typescript":"^5.0.0","lint-staged":"^15.2.0","@types/mdast":"^4.0.4","svelte-check":"^3.6.7","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","eslint-plugin-import":"^2.29.1","eslint-plugin-svelte":"^2.35.1","@sveltejs/adapter-auto":"^3.1.1","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.1.2","@sveltejs/vite-plugin-svelte":"^3.0.2","@typescript-eslint/eslint-plugin":"^6.19.0"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0","unified":"^11.0.4","carta-md":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-plugin-video_2.0.0_1723818396484_0.8543230136008206","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"carta-plugin-video","version":"2.0.1","keywords":["carta","markdown","editor","marked","text editor","marked editor","syntax highlighting","video"],"author":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"license":"MIT","_id":"carta-plugin-video@2.0.1","maintainers":[{"name":"maisonsmd","email":"maisonsmd@gmail.com"}],"homepage":"https://github.com/maisonsmd/carta-plugin-video#readme","bugs":{"url":"https://github.com/maisonsmd/carta-plugin-video/issues"},"dist":{"shasum":"d403715a93078817451a812f71f0410f69c099d6","tarball":"https://registry.npmjs.org/carta-plugin-video/-/carta-plugin-video-2.0.1.tgz","fileCount":18,"integrity":"sha512-1HqxBbFvQiPM++VXi0+X4dSagbzrnUBMoI1o7y+Pnw4FZZbIiY4Wm4KAiTt47GdxUu8uaqHrA5LbYgo577+fzA==","signatures":[{"sig":"MEYCIQDL6kHjFre2NyxhMb0tbmv6+aBjnCW7ZUerzbFYeGCw1AIhAM5KYq7LiG+CUqUkWW2gw0pEiH4V0iHDLvzUptfQ3pYI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16571},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"},"./default.css":"./dist/default.css","./default-theme.css":"./dist/default.css"},"gitHead":"ecb621a5b8931c3e4e0a1a605e7292e6bde2e60e","scripts":{"dev":"vite dev","lint":"prettier --plugin-search-dir . --check . && eslint .","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --plugin-search-dir . --write .","package":"svelte-kit sync && svelte-package && publint","prepare":"husky install","preview":"vite preview","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"repository":{"url":"git+https://github.com/maisonsmd/carta-plugin-video.git","type":"git"},"_npmVersion":"10.7.0","description":"This plugin adds ability to render online video from Youtube or Vimeo.","directories":{},"lint-staged":{"*.{js,ts,svelte}":"eslint --cache --fix --no-error-on-unmatched-pattern","*.{js,ts,css,md,svelte,html,yml,json,cjs}":"prettier --write"},"_nodeVersion":"20.14.0","dependencies":{"mdast":"^3.0.0","unist-util-visit":"^5.0.0","mdast-util-to-string":"^4.0.0","unist-util-find-before":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","husky":"^8.0.3","tslib":"^2.4.1","svelte":"^4.2.12","publint":"^0.1.9","unified":"^11.0.4","carta-md":"^4.0.0","prettier":"^3.1.1","typescript":"^5.0.0","lint-staged":"^15.2.0","@types/mdast":"^4.0.4","svelte-check":"^3.6.7","@sveltejs/kit":"^2.5.4","@sveltejs/package":"^2.3.0","eslint-plugin-import":"^2.29.1","eslint-plugin-svelte":"^2.35.1","@sveltejs/adapter-auto":"^3.1.1","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.1.2","@sveltejs/vite-plugin-svelte":"^3.0.2","@typescript-eslint/eslint-plugin":"^6.19.0"},"peerDependencies":{"svelte":"^3.54.0 || ^4.0.0","unified":"^11.0.4","carta-md":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/carta-plugin-video_2.0.1_1724001438438_0.4032841512368601","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"carta-plugin-video","version":"2.1.0","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","license":"MIT","author":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"scripts":{"dev":"vite dev","build":"vite build && npm run package","preview":"vite preview","package":"svelte-kit sync && svelte-package && publint","prepublishOnly":"npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepare":"husky install","lint":"prettier --plugin-search-dir . --check . && eslint .","format":"prettier --plugin-search-dir . --write ."},"repository":{"type":"git","url":"git+https://github.com/maisonsmd/carta-plugin-video.git"},"exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"},"./default.css":"./dist/default.css","./default-theme.css":"./dist/default.css"},"peerDependencies":{"carta-md":"^4.0.0","svelte":"^4.0.0 || ^5.0.0","unified":"^11.0.4"},"devDependencies":{"@sveltejs/adapter-auto":"^6.0.0","@sveltejs/kit":"^2.20.4","@sveltejs/package":"^2.3.10","@sveltejs/vite-plugin-svelte":"^3.0.2","@types/mdast":"^4.0.4","@typescript-eslint/eslint-plugin":"^6.19.0","carta-md":"^4.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-svelte":"^2.35.1","husky":"^8.0.3","lint-staged":"^15.2.0","prettier":"^3.1.1","prettier-plugin-svelte":"^3.1.2","publint":"^0.1.9","svelte":"^5.25.9","svelte-check":"^4.1.5","tslib":"^2.4.1","typescript":"^5.0.0","unified":"^11.0.4","vite":"^5.4.0"},"lint-staged":{"*.{js,ts,svelte}":"eslint --cache --fix --no-error-on-unmatched-pattern","*.{js,ts,css,md,svelte,html,yml,json,cjs}":"prettier --write"},"svelte":"./dist/index.js","keywords":["carta","markdown","editor","marked","text editor","marked editor","syntax highlighting","video"],"description":"This plugin adds ability to render online video from Youtube or Vimeo.","bugs":{"url":"https://github.com/maisonsmd/carta-plugin-video/issues"},"homepage":"https://github.com/maisonsmd/carta-plugin-video#readme","dependencies":{"mdast":"^3.0.0","mdast-util-to-string":"^4.0.0","unist-util-find-before":"^4.0.0","unist-util-visit":"^5.0.0"},"_id":"carta-plugin-video@2.1.0","gitHead":"048cf51fed3997771319123358f409faf80d3177","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-9OvP4dZ2jgetPJmnk+QqpTsyiJD081Ajvc7ElbKMEesHqNJ4JeD2cTK0BztrxVEqtj1YCrDYVW5O4vUR90yqTA==","shasum":"627d201de57b05651a29d02d302bc6d1155398b0","tarball":"https://registry.npmjs.org/carta-plugin-video/-/carta-plugin-video-2.1.0.tgz","fileCount":18,"unpackedSize":16453,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCU8NuEMd9E/4bX05mnxVKpThYuvoNAZ8T1X+M3brRG4QIgJYQAFYRmPqeG3e6hVTd7PfivLIoPNozXp0rJ7eZN6t4="}]},"_npmUser":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"directories":{},"maintainers":[{"name":"maisonsmd","email":"maisonsmd@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/carta-plugin-video_2.1.0_1744172776776_0.8863247356395298"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-21T11:54:13.719Z","modified":"2025-04-09T04:26:17.153Z","1.0.0":"2024-01-21T11:54:13.941Z","2.0.0":"2024-08-16T14:26:36.643Z","2.0.1":"2024-08-18T17:17:18.617Z","2.1.0":"2025-04-09T04:26:16.982Z"},"bugs":{"url":"https://github.com/maisonsmd/carta-plugin-video/issues"},"author":{"name":"maisonsmd","email":"maisonsmd@gmail.com"},"license":"MIT","homepage":"https://github.com/maisonsmd/carta-plugin-video#readme","keywords":["carta","markdown","editor","marked","text editor","marked editor","syntax highlighting","video"],"repository":{"type":"git","url":"git+https://github.com/maisonsmd/carta-plugin-video.git"},"description":"This plugin adds ability to render online video from Youtube or Vimeo.","maintainers":[{"name":"maisonsmd","email":"maisonsmd@gmail.com"}],"readme":"![plugin-video](https://img.shields.io/npm/v/carta-plugin-video)\n\n# carta-plugin-video\n\nThis plugin adds ability to render online video from Youtube or Vimeo.\n\nInspired by [markdown-it-video](https://github.com/CenterForOpenScience/markdown-it-video)\n\n## Installation\n\n```shell\nnpm i carta-plugin-video\n```\n\n## Setup\n\n### Styles\n\nImport the default theme, or create you own:\n\n```ts\nimport 'carta-plugin-video/default.css';\n```\n\nNote that the `align` function needs the default css to work properly.\n\nFor custom styles, this is an example of the generated HTML:\n\n```HTML\n<div class=\"video-container center\">\n\t<iframe\n\t\twidth=\"640\"\n\t\theight=\"390\"\n\t\tsrc=\"<the URL>\"\n\t\tframeborder=\"0\"\n\t\tallow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n\t\tallowfullscreen>\n\t</iframe>\n</div>\n```\n\n### Extension\n\n```svelte\n<script>\n\timport { Carta, MarkdownEditor } from 'carta-md';\n\timport { video } from 'carta-plugin-video';\n\timport 'carta-plugin-video/default.css';\n\n\tconst carta = new Carta({\n\t\textensions: [\n\t\t\tvideo({\n\t\t\t\t// Optional options\n\t\t\t}),\n\t\t],\n\t});\n</script>\n\n<MarkdownEditor {carta} />\n```\n\n## Usage\n\nYou can use either video ID (e.g: `dQw4w9WgXcQ`) or video URL (e.g: `https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley`)\n\nFor Youtube:\n\n```markdown\n@[youtube](dQw4w9WgXcQ)\n@[youtube](https://www.youtube.com/watch?v=dQw4w9WgXcQ)\n```\n\nFor Vimeo:\n\n```markdown\n@[vimeo](347119375)\n@[vimeo](https://vimeo.com/347119375)\n```\n\n## Options\n\nHere are the options you can pass to `video()`:\n\n```ts\nexport interface VideoExtensionOptions {\n\t/**\n\t * Width of the video (in pixels or percentage string), defaults to 640.\n\t */\n\twidth?: number | string;\n\t/**\n\t * Height of the video (in pixel or percentage string), defaults to 360.\n\t */\n\theight?: number | string;\n\t/**\n\t * Horizontal alignment of the video, defaults to 'center'.\n\t */\n\talign?: 'left' | 'center' | 'right';\n\t/**\n\t * Allow fullscreen, defaults to true.\n\t */\n\tallowFullscreen?: boolean;\n\t/**\n\t * Use youtube-nocookie.com domain, defaults to false.\n\t */\n\tnoCookie?: boolean;\n}\n```\n","readmeFilename":"README.md"}