{"_id":"remark-directive-sugar","_rev":"8-198a2d681c769191d52d80547f276c10","name":"remark-directive-sugar","dist-tags":{"latest":"2.0.1"},"versions":{"0.0.1":{"name":"remark-directive-sugar","version":"0.0.1","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@0.0.1","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"./types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"dc2e27ca2188401b3a5bc2bd93b80dc5132c1508","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-0.0.1.tgz","fileCount":12,"integrity":"sha512-U4AhgVD71aPfkLn7JpmQf66VJ4c5TvM2qsBDFaVFLk8DXLIWyIq+c5iR5ohk4fAS0mINs5FNsDMvir4QU7uV1Q==","signatures":[{"sig":"MEUCIQCAsMqhs9NSIqW2LJlitcWCGKC/WjDQaSPKWnbB4Tb4qwIgSnzyaRhwJjF12ygBaNKHCuSSMqi5SOf5CT0PsMd5tng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":37970},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d565bbd042c78512d5efc9249e97cee8890c5329","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.8.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badge markers, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"20.17.0","dependencies":{"hastscript":"^9.0.0","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.59.3","rimraf":"^6.0.1","vitest":"^2.0.2","unified":"^11.0.5","prettier":"^3.3.2","to-vfile":"^8.0.0","typescript":"^5.6.3","lint-staged":"^15.2.7","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.1","rehype-stringify":"^10.0.0","remark-directive":"^3.0.0","simple-git-hooks":"^2.11.1","@vitest/coverage-v8":"^2.0.2","rehype-minify-whitespace":"^6.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_0.0.1_1728487305069_0.6128893039828975","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"remark-directive-sugar","version":"0.0.2","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@0.0.2","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"./types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"5ca70f1e1b8525bb47b68e60046a736eb0f6faa1","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-0.0.2.tgz","fileCount":12,"integrity":"sha512-vpduAxmuewg/kRA2n24oTo5qo2OXbngL7m67++3Ubx2PI6PE4LXSE/iE6iOY6flKfJBTTcK/XT9H4O+MJVw2Eg==","signatures":[{"sig":"MEUCIDuoDq+VcBQ10czHFPr354J5pVMFx5CPlByjEkmgtggSAiEAhEf6GlKiQfjwWfmoD6TxPi+kc7nx3brjVW4OkBddL/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":40359},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f97ce2bf42b36f5a4fec56a57ab687e7987b4bbe","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.9.0","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"22.11.0","dependencies":{"hastscript":"^9.0.0","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.59.3","rimraf":"^6.0.1","vitest":"^2.0.2","unified":"^11.0.5","prettier":"^3.3.2","to-vfile":"^8.0.0","typescript":"^5.6.3","lint-staged":"^15.2.7","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.1","rehype-stringify":"^10.0.0","remark-directive":"^3.0.0","simple-git-hooks":"^2.11.1","@vitest/coverage-v8":"^2.0.2","rehype-minify-whitespace":"^6.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_0.0.2_1732464046367_0.13699077154452244","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"remark-directive-sugar","version":"1.0.0","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@1.0.0","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"{.,..}/types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/ban-types":"off","unicorn/prevent-abbreviations":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"e19b310494d58af687de8ebef36a6de8031a3834","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-1.0.0.tgz","fileCount":17,"integrity":"sha512-6XQqQHmNcPOlx4ZUnj+OdfUQSMRHBiWNRUH9p757bmg50Y4pQnOb6Hxd9B8f6ggSGGIPZ5vCxspgg3e21MMyeg==","signatures":[{"sig":"MEUCIGzu9ri5t0PPGKx+Tqhr+QXJ+cFFSphQI9kKOmlF9bW7AiEAnT7D5+X5XJqGy+xW43tBP3KKWBGoQPaFe7aQErDQIaA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":48782},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"69e2e43a0ff8f0dadd9f7d8e576dc43dec75db82","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.9.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"22.13.1","dependencies":{"hastscript":"^9.0.0","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","rimraf":"^6.0.1","vitest":"^3.0.4","unified":"^11.0.5","prettier":"^3.4.2","to-vfile":"^8.0.0","typescript":"^5.7.3","lint-staged":"^15.4.3","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.7","rehype-stringify":"^10.0.0","remark-directive":"^3.0.1","simple-git-hooks":"^2.11.1","@vitest/coverage-v8":"^3.0.4","rehype-minify-whitespace":"^6.0.0"},"peerDependencies":{"remark-directive":"^3.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_1.0.0_1738259403454_0.02822346766208028","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"remark-directive-sugar","version":"1.1.0","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@1.1.0","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"{.,..}/types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/ban-types":"off","unicorn/prevent-abbreviations":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"a94b63c031f0de5f2836c7fdab0eb2f6396f78d0","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-1.1.0.tgz","fileCount":17,"integrity":"sha512-luqj5//nLLtH1RJWIJVlatXqblnwNszOACKYWvtsy9CgZi5pwOcUjz8aTpfW2a8pXbBq7z6EhJpzNspJVXyrUQ==","signatures":[{"sig":"MEUCIQCixpXy297R/JgxfbLu6m6JPkJ/Jpi+jjdZbRr/i+HeLAIgZImS8GyO32/R1Iu2W2yJfoLv9ojtr/bwhC9J5C1QilE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50092},"main":"dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild","simple-git-hooks"]},"type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"fe65a53be579a581e77b92f0cda9c01607c42f10","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.9.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"22.14.0","dependencies":{"hastscript":"^9.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","rimraf":"^6.0.1","vitest":"^3.0.9","unified":"^11.0.5","prettier":"^3.5.3","to-vfile":"^8.0.0","typescript":"^5.8.2","lint-staged":"^15.5.0","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.7","rehype-stringify":"^10.0.0","remark-directive":"^4.0.0","simple-git-hooks":"^2.12.1","@vitest/coverage-v8":"^3.0.9","rehype-minify-whitespace":"^6.0.0"},"peerDependencies":{"remark-directive":"^3.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_1.1.0_1742973726265_0.8401435224965867","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"remark-directive-sugar","version":"1.1.1","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@1.1.1","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"{.,..}/types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/ban-types":"off","unicorn/prevent-abbreviations":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"9f564fe2c7270f7e23b338746ff263a7c54f2768","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-1.1.1.tgz","fileCount":17,"integrity":"sha512-QAVwO3T/7biIvw8IHcI/LgkwwIzUST5HTiUV6XywdinNr9PS/G1q7+x+1D3tLnK7b6yuDXrTMtcxMhz08uOfwQ==","signatures":[{"sig":"MEQCIDvePeka9k6h5J8DqEAyPUYEixFEREjiwhTc6G2cFY4xAiAHhE3hMIK9F/AwerXEOjSfueQWo/WbRikS3bqqlz0fmQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50406},"main":"dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild","simple-git-hooks"]},"type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"cea9cce4fc292d00edee703da9ac7f0872b08b10","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.9.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"22.14.0","dependencies":{"hastscript":"^9.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","rimraf":"^6.0.1","vitest":"^3.0.9","unified":"^11.0.5","prettier":"^3.5.3","to-vfile":"^8.0.0","typescript":"^5.8.2","lint-staged":"^15.5.0","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.7","remark-imgattr":"^1.0.5","rehype-stringify":"^10.0.0","remark-directive":"^4.0.0","simple-git-hooks":"^2.12.1","@vitest/coverage-v8":"^3.0.9","rehype-minify-whitespace":"^6.0.0"},"peerDependencies":{"remark-directive":"^3.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_1.1.1_1743005435083_0.673486258072588","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"remark-directive-sugar","version":"1.1.2","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@1.1.2","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"{.,..}/types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/ban-types":"off","unicorn/prevent-abbreviations":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"semicolon":false},"dist":{"shasum":"78a82e7af916ae211b28d27d75d7bb767c209893","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-1.1.2.tgz","fileCount":17,"integrity":"sha512-SwWAr3hm40qeanq9gHYyeuaUETl3cmQGUPB4cg51Br0HX16HKL2b/kUlpwtKy0UZrApnmZ66rj2P+LJHnsbUSA==","signatures":[{"sig":"MEUCIQD4v65cLGnk0fxPUVkQXz4KOLXnaheqwZSEFe2IbVTNcAIgGdRrRgLM2C6Si23dV43/kCBGTZZOaAWbZYuOqjs1XKY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50412},"main":"dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild","simple-git-hooks"]},"type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^16.0.0 || ^18.0.0 || >=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"3da1c1d94c1ad1d98110e682a21ba6d2604e986a","scripts":{"lint":"xo --prettier","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --prettier --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"10.9.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo --prettier"},"_nodeVersion":"22.14.0","dependencies":{"hastscript":"^9.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","rimraf":"^6.0.1","vitest":"^3.0.9","unified":"^11.0.5","prettier":"^3.5.3","to-vfile":"^8.0.0","typescript":"^5.8.2","lint-staged":"^15.5.0","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.0","type-coverage":"^2.29.7","remark-imgattr":"^1.0.5","rehype-stringify":"^10.0.0","remark-directive":"^4.0.0","simple-git-hooks":"^2.12.1","@vitest/coverage-v8":"^3.0.9","rehype-minify-whitespace":"^6.0.0"},"peerDependencies":{"remark-directive":"^4.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_1.1.2_1743407444307_0.954125222313341","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"remark-directive-sugar","version":"2.0.0","keywords":["remark-plugin","remark-directive","directive","remark","mast"],"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","_id":"remark-directive-sugar@2.0.0","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"xo":{"rules":{"complexity":"off","import-x/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"group":"type","pattern":"{.,..}/types.js","position":"after"}],"alphabetize":{"order":"asc"},"distinctGroup":false,"newlines-between":"always"}],"no-multi-assign":"off","capitalized-comments":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-restricted-types":"off","@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]},"space":true,"prettier":true,"semicolon":false},"dist":{"shasum":"86855b4fd96e63fa0dce6f504264376dc4e63e3f","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-2.0.0.tgz","fileCount":17,"integrity":"sha512-BGcBxYAEVhssOu3PBW91jEMwK739O7lfIhHP/voYKUDwYCA9k9F9GKp6O4UEhGL6dOjxi9KlmLkLee1A6lEgWQ==","signatures":[{"sig":"MEUCIQCxD3tVCt7atqiBDG2aySwlw1NpnhSCl+eLHDH5ia1CYQIgTp6figGe8JSFMVe9V2lgwac1FmAOcD/LgQX95l4Xi2E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50648},"main":"dist/index.js","pnpm":{"onlyBuiltDependencies":["esbuild","simple-git-hooks","unrs-resolver"]},"type":"module","types":"./dist/index.d.ts","module":"dist/index.js","engines":{"node":"^18.0.0 || ^20.0.0 || >=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"90c0a8c26fe95cad4b4ebe216861b732d57f2d38","scripts":{"lint":"xo","test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all","lint:fix":"xo --fix","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:41e454b5-4aaa-4e4b-b40c-589b2f78a382"}},"repository":{"url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git","type":"git"},"_npmVersion":"11.6.2","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","directories":{},"lint-staged":{"*":"xo"},"_nodeVersion":"24.11.0","dependencies":{"hastscript":"^9.0.1","@types/hast":"^3.0.4","@types/mdast":"^4.0.4","unist-util-visit":"^5.0.0","mdast-util-to-hast":"^13.2.0","mdast-util-directive":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^1.2.3","rimraf":"^6.1.0","vitest":"^4.0.7","unified":"^11.0.5","prettier":"^3.6.2","to-vfile":"^8.0.0","typescript":"^5.9.3","lint-staged":"^16.2.6","rehype-parse":"^9.0.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","type-coverage":"^2.29.7","remark-imgattr":"^1.0.5","rehype-stringify":"^10.0.0","remark-directive":"^4.0.0","simple-git-hooks":"^2.13.1","@vitest/coverage-v8":"^4.0.7","rehype-minify-whitespace":"^6.0.0"},"peerDependencies":{"remark-directive":"^4.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/remark-directive-sugar_2.0.0_1762617875816_0.805844147233499","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"remark-directive-sugar","version":"2.0.1","description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","keywords":["remark-plugin","remark-directive","directive","remark","unified","mast"],"repository":{"type":"git","url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git"},"homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"type":"module","main":"dist/index.js","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"types":"./dist/index.d.ts","scripts":{"test":"vitest && vitest run --coverage","build":"rimraf dist && tsc","typecheck":"tsc --noEmit","typecheck:coverage":"type-coverage --strict --detail --min=100","lint":"xo","lint:fix":"xo --fix","prepare":"simple-git-hooks","release":"npx bumpp --tag %s --commit 'chore: release %s' --all"},"peerDependencies":{"remark-directive":"^4.0.0"},"dependencies":{"@types/hast":"^3.0.4","@types/mdast":"^4.0.4","hastscript":"^9.0.1","mdast-util-directive":"^3.1.0","mdast-util-to-hast":"^13.2.1","unist-util-visit":"^5.1.0"},"devDependencies":{"@types/node":"^25.9.3","@vitest/coverage-v8":"^4.1.8","lint-staged":"^17.0.7","prettier":"^3.8.4","rehype-minify-whitespace":"^6.0.0","rehype-parse":"^9.0.1","rehype-stringify":"^10.0.0","remark-directive":"^4.0.0","remark-imgattr":"^1.1.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","rimraf":"^6.1.3","simple-git-hooks":"^2.13.1","to-vfile":"^8.0.0","type-coverage":"^2.29.7","typescript":"^5.9.3","unified":"^11.0.5","vitest":"^4.1.8","xo":"^1.2.3"},"xo":[{"prettier":true,"space":true,"semicolon":false,"rules":{"complexity":"off","no-multi-assign":"off","capitalized-comments":"off","import-x/order":["warn",{"groups":["builtin","external",["internal","parent","sibling"],"index","type","object","unknown"],"pathGroups":[{"pattern":"{.,..}/types.js","group":"type","position":"after"}],"distinctGroup":false,"newlines-between":"always","alphabetize":{"order":"asc"}}]}},{"files":["**/*.{ts,tsx,cts,mts}"],"languageOptions":{"parserOptions":{"projectService":false,"project":"./tsconfig.eslint.json"}},"rules":{"@typescript-eslint/no-restricted-types":"off","@typescript-eslint/triple-slash-reference":"off","@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/consistent-type-definitions":["error","interface"]}}],"simple-git-hooks":{"pre-commit":"npx lint-staged"},"lint-staged":{"*":"xo"},"pnpm":{"onlyBuiltDependencies":["esbuild","simple-git-hooks","unrs-resolver"]},"engines":{"node":">=18.0.0"},"gitHead":"cb298a344a5f84de7bb0acc1abeee95e4500e499","_id":"remark-directive-sugar@2.0.1","_nodeVersion":"24.16.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-JlBNHdQVD6z53HaHBHE9hn/jd6+XUwjBSdxNRMbKWbjOdJFTq6pjwbgRmSVLbK6XkC8Iwl5K8h6e9tt/vUI1RA==","shasum":"56367673291e8e0ffa6336dc60e13c958fc38fef","tarball":"https://registry.npmjs.org/remark-directive-sugar/-/remark-directive-sugar-2.0.1.tgz","fileCount":17,"unpackedSize":51512,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/remark-directive-sugar@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA+jX6GpSXQuckDLmhQ/o6ABUIjL9HVzFjbykOl00QuXAiBT66LvtuTFz8j7KSO5m2hoqcvKIqe/zui4rNshkwIs5g=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:41e454b5-4aaa-4e4b-b40c-589b2f78a382"}},"directories":{},"maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remark-directive-sugar_2.0.1_1781279814824_0.3889247945157226"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-09T15:21:44.975Z","modified":"2026-06-12T15:56:55.337Z","0.0.1":"2024-10-09T15:21:45.361Z","0.0.2":"2024-11-24T16:00:46.534Z","1.0.0":"2025-01-30T17:50:03.648Z","1.1.0":"2025-03-26T07:22:06.585Z","1.1.1":"2025-03-26T16:10:35.256Z","1.1.2":"2025-03-31T07:50:44.465Z","2.0.0":"2025-11-08T16:04:36.018Z","2.0.1":"2026-06-12T15:56:54.972Z"},"bugs":{"url":"https://github.com/lin-stephanie/remark-directive-sugar/issues"},"author":{"name":"Stephanie Lin","email":"norwaywoods047@gmail.com"},"license":"MIT","homepage":"https://github.com/lin-stephanie/remark-directive-sugar#readme","keywords":["remark-plugin","remark-directive","directive","remark","unified","mast"],"repository":{"type":"git","url":"git+https://github.com/lin-stephanie/remark-directive-sugar.git"},"description":"Remark plugin built on remark-directive, providing predefined directives for image captions, video embedding, styled GitHub links, badges, and more.","maintainers":[{"name":"lin-stephanie","email":"norwaywoods047@gmail.com"}],"readme":"\n# remark-directive-sugar\n\n[![version][version-badge]][version-link]\n[![codecov][coverage-badge]][coverage]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![jsDocs.io][jsdocs-src]][jsdocs-href]\n\nA [remark](https://github.com/remarkjs/remark) plugin provides predefined directives for customizable badges, links, video embeds, enhanced image formatting, and more.\n\n## What is this?\n\nThis plugin is built on top of [remark-directive](https://github.com/remarkjs/remark-directive), supporting [regular usage](https://github.com/remarkjs/remark-directive?tab=readme-ov-file#use) and providing the following predefined directives:\n\n- [`:badge[-*]`](#badge-): Generates customizable badges.  \n- [`:link`](#link): Creates links to GitHub, npm, or custom URLs.  \n- [`::video[-*]`](#video-): Embeds videos from platforms like YouTube, Bilibili, Vimeo, or custom sources.  \n- [`:::image-*`](#image-): Wraps an image inside valid HTML tags, such as a `<figure>` element to allow adding a descriptive `<figcaption>`, or a hyperlink to make it clickable, and more.\n\n## When should I use this?\n\nIf you're using `remark-directive`, this plugin provides ready-to-use directives, saving you from writing custom code. If you're building a blog with frameworks like Astro or Next.js, it helps enhance your Markdown / MDX content without repetitive HTML.\n\n> [!NOTE]  \n> This plugin requires `remark-directive`, so make sure to install it as well. Check out the [Remark Directive Syntax](https://github.com/micromark/micromark-extension-directive?tab=readme-ov-file#syntax) for a quick and easy overview!\n\n## Installation\n\nThis package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). In Node.js (version 18+), install with your package manager:\n\n```sh\nnpm install remark-directive-sugar\nyarn add remark-directive-sugar\npnpm add remark-directive-sugar\n```\n\nIn Deno with [`esm.sh`](https://esm.sh/):\n\n```js\nimport remarkDirectiveSugar from 'https://esm.sh/remark-directive-sugar'\n```\n\nIn browsers with [`esm.sh`](https://esm.sh/):\n\n```html\n<script type=\"module\">\n  import remarkDirectiveSugar from 'https://esm.sh/remark-directive-sugar?bundle'\n</script>\n```\n\n## Usage\n\nImport and configure the plugin based on your target environment.\n\nFor vanilla JS：\n\n```js\n// example.js\nimport { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkDirective from 'remark-directive'\nimport remarkDirectiveSugar from 'remark-directive-sugar'\nimport remarkRehype from 'remark-rehype'\nimport rehypeStringify from 'rehype-stringify'\nimport { readSync } from 'to-vfile'\n\nconst file = unified()\n  .use(remarkParse)\n  .use(remarkDirective)\n  .use(remarkDirectiveSugar)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .processSync(readSync('example.md'))\n\nconsole.log(String(file))\n```\n\nFor Astro projects:\n\n```ts\n// astro.config.ts\nimport { defineConfig } from 'astro/config'\nimport remarkDirective from 'remark-directive'\nimport remarkDirectiveSugar from 'remark-directive-sugar'\n\n// https://docs.astro.build/en/reference/configuration-reference/\nexport default defineConfig({\n  markdown: {\n    remarkPlugins: [remarkDirective, remarkDirectiveSugar],\n  },\n})\n```\n\nFor Next.js projects:\n\n```ts\n// next.config.ts\nimport createMDX from '@next/mdx'\nimport remarkDirective from 'remark-directive'\nimport remarkDirectiveSugar from 'remark-directive-sugar'\nimport type { NextConfig } from 'next'\n\n// https://nextjs.org/docs/app/api-reference/config/next-config-js\nconst nextConfig: NextConfig = {\n  pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],\n}\n\nconst withMDX = createMDX({\n  options: {\n    remarkPlugins: [remarkDirective, remarkDirectiveSugar],\n    // With Turbopack, specify plugin names as strings\n    // remarkPlugins: [['remark-directive'],['remark-directive-sugar']],\n  },\n})\n\nexport default withMDX(nextConfig)\n```\n\nAll predefined directives generate only the HTML structure, allowing you to style them with class names or attributes.\n\n### `:badge[-*]`\n\nUse `:badge[-*]` directive to display small pieces of information, such as status or category. Say `example.md` contains: \n\n```md\n<!-- Direct usage with text in `[]` -->\n\nExample 1: :badge[New]\nExample 2: :badge[Success]{style=\"color: black; background-color: #aaf233\"}\n\n<!-- Using presets: `presets: {a: { text: 'ARTICLE' }, v: { text: 'VIDEO', props: { className: ['custom'] } }}` -->\n\nExample 3: :badge-a\nExample 4: :badge-v\n```\n\nRun `node example.js` (`pnpm dev`) to get:\n\n```html\n<p>\n  Example 1: <span class=\"rds-badge\">New</span>\n  Example 2: <span style=\"color: black; background-color: #aaf233\" class=\"rds-badge\">Success</span>\n</p>\n<p>\n  Example 3: <span data-badge=\"a\" class=\"rds-badge\">ARTICLE</span>\n  Example 4: <span data-badge=\"v\" class=\"rds-badge custom\">VIDEO</span>\n</p>\n```\n\n### `:link`\n\nUse `:link` directive to create links with avatars or favicons for GitHub, npm, or custom URLs. Say `example.md` contains: \n\n```md\n<!-- Link to a GitHub user or organization (prepend `id` or `#` with `@`) -->\n<!-- Use `tab` to navigate sections: -->\n<!-- for users: 'repositories', 'projects', 'packages', 'stars', 'sponsoring', 'sponsors' -->\n<!-- for orgs: 'org-repositories', 'org-projects', 'org-packages', 'org-sponsoring', 'org-people' -->\n\nExample 1: :link{#@lin-stephanie}\nExample 2: :link{#@lin-stephanie tab=repositories}\nExample 3: :link[Vite]{id=@vitejs}\nExample 4: :link[Vite]{id=@vitejs tab=org-people}\n\n<!-- Link to a GitHub repository -->\n\nExample 5: :link{#lin-stephanie/remark-directive-sugar}\nExample 6: :link[Astro]{id=withastro/astro}\n\n<!-- Link to an npm package -->\n<!-- Use `tab` to navigate sections: 'readme', 'code', 'dependencies', 'dependents', 'versions' -->\n\nExample 7: :link{#remark-directive-sugar}\nExample 8: :link{id=remark-directive-sugar tab=dependencies}\n\n<!-- Link to a custom URL (must use `id`, not `#`) -->\n\nExample 9: :link{id=https://developer.mozilla.org/en-US/docs/Web/JavaScript}\nExample 10: :link[Google]{id=https://www.google.com/}\n\n<!-- Use `url` to override the default link -->\n<!-- Use `img` to set a custom display image -->\n\nExample 11: :link[Vite]{id=@vitejs url=https://vite.dev/}\nExample 12: :link[Vite]{id=@vitejs img=https://vitejs.dev/logo.svg}\n```\n\nRun `node example.js` (`pnpm dev`) to get:\n\n```html\n<p>\n  Example 1:\n  <a href=\"https://github.com/lin-stephanie\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://github.com/lin-stephanie.png\" alt=\"\" />\n    lin-stephanie\n  </a>\n  Example 2:\n  <a href=\"https://github.com/lin-stephanie?tab=repositories\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://github.com/lin-stephanie.png\" alt=\"\" />\n    lin-stephanie\n  </a>\n  Example 3:\n  <a href=\"https://github.com/vitejs\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://github.com/vitejs.png\" alt=\"\" />\n    Vite\n  </a>\n  Example 4:\n  <a href=\"https://github.com/orgs/vitejs/people\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://github.com/vitejs.png\" alt=\"\" />\n    Vite\n  </a>\n</p>\n\n<p>\n  Example 5:\n  <a href=\"https://github.com/lin-stephanie/remark-directive-sugar\" data-link=\"github-repo\" class=\"rds-link\">\n    <img src=\"https://github.com/lin-stephanie.png\" alt=\"\"/>\n    lin-stephanie/remark-directive-sugar\n  </a>\n  Example 6:\n  <a href=\"https://github.com/withastro/astro\" data-link=\"github-repo\" class=\"rds-link\">\n    <img src=\"https://github.com/withastro.png\" alt=\"\" />\n    Astro\n  </a>\n</p>\n\n<p>\n  Example 7:\n  <a href=\"https://www.npmjs.com/package/remark-directive-sugar\" data-link=\"npm-pkg\" class=\"rds-link\">\n    <img src=\"https://raw.githubusercontent.com/npm/logos/refs/heads/master/npm%20square/n.svg\" alt=\"\">\n    remark-directive-sugar\n  </a>\n  Example 8:\n  <a href=\"https://www.npmjs.com/package/remark-directive-sugar?activeTab=dependencies\" data-link=\"npm-pkg\" class=\"rds-link\">\n    <img src=\"https://raw.githubusercontent.com/npm/logos/refs/heads/master/npm%20square/n.svg\" alt=\"\">\n    remark-directive-sugar\n  </a>\n</p>\n\n<p>\n  Example 9:\n  <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\" data-link=\"custom-url\" class=\"rds-link\">\n    <img src=\"https://icons.duckduckgo.com/ip3/developer.mozilla.org.ico\" alt=\"\">\n    developer.mozilla.org/en-US/docs/Web...\n  </a>\n  Example 10:\n  <a href=\"https://www.google.com/\" data-link=\"custom-url\" class=\"rds-link\">\n    <img src=\"https://icons.duckduckgo.com/ip3/www.google.com.ico\" alt=\"\">\n    Google\n  </a>\n</p>\n\n<p>\n  Example 11:\n  <a href=\"https://vite.dev/\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://github.com/vitejs.png\" alt=\"\">\n    Vite\n  </a>\n  Example 12:\n  <a href=\"https://github.com/vitejs\" data-link=\"github-acct\" class=\"rds-link\">\n    <img src=\"https://vitejs.dev/logo.svg\" alt=\"\">\n    Vite\n  </a>\n</p>\n```\n\n### `::video[-*]`\n\nUse `::video[-*]` for consistent video embedding across different platforms. Say `example.md` contains: \n\n```md\n<!-- Embed a YouTube video -->\n\n::video-youtube{#gxBkghlglTg}\n\n<!-- Embed a Bilibili video -->\n\n::video-bilibili{id=BV1MC4y1c7Kv}\n\n<!-- Embed a Vimeo video with a custom `title` attr -->\n\n::video-vimeo[custom title]{id=912831806}\n\n<!-- Embed a custom video URL (must use `id`, not `#`) -->\n\n::video{id=https://www.youtube-nocookie.com/embed/gxBkghlglTg}\n```\n\nRun `node example.js` (`pnpm dev`) to get:\n\n```html\n<iframe\n  src=\"https://www.youtube-nocookie.com/embed/gxBkghlglTg\"\n  title=\"Video Player\"\n  data-video=\"youtube\"\n  class=\"rds-video\"\n></iframe>\n\n<iframe\n  src=\"https://player.bilibili.com/player.html?bvid=BV1MC4y1c7Kv\"\n  title=\"Video Player\"\n  data-video=\"bilibili\"\n  class=\"rds-video\"\n></iframe>\n\n<iframe\n  src=\"https://player.vimeo.com/video/912831806\"\n  title=\"custom title\"\n  data-video=\"vimeo\"\n  class=\"rds-video\"\n></iframe>\n\n<iframe\n  src=\"https://www.youtube-nocookie.com/embed/gxBkghlglTg\"\n  title=\"Video Player\"\n  data-video=\"url\"\n  class=\"rds-video\"\n></iframe>\n```\n\n### `:::image-*`\n\nUse `:::image-*` to wrap images in a container for captions, clickable links, and more (`*` must be a [valid HTML tag](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/src/directives/image.ts#L14)). Say `example.md` contains: \n\n```md\n<!-- `:::image-figure[caption]{<figcaption> attrs}` -->\n<!-- `[]` hold the figcaption，if not set, the alt text from `![]()` will be used as the default -->\n\n:::image-figure[Figcaption text]\n![Alt text](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n\n:::image-figure{style=\"text-align:center; color:orange\"}\n![Text for both alt and figcaption](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n\n<!-- `:::image-a{<a> attrs}` -->\n\n:::image-a{href=\"https://github.com/lin-stephanie/remark-directive-sugar\"}\n![](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n\n<!-- `:::image-*{<*> attrs}` -->\n\n:::image-div\n![](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n\n<!-- Setting `stripParagraph: false` keeps `<p>` to prevent parsing issues with other remark plugins like `remark-imgattr` -->\n\n:::image-figure[Figcaption text]\n![Alt text](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n\n:::image-a{href=\"https://github.com/lin-stephanie/remark-directive-sugar\"}\n![](https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg)\n:::\n```\n\nRun `node example.js` (`pnpm dev`) to get:\n\n```html\n<figure>\n  <img src=\"https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg\" alt=\"Alt text\">\n  <figcaption>Figcaption text</figcaption>\n</figure>\n\n<figure>\n  <img src=\"https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg\" alt=\"Text for both alt and figcaption\">\n  <figcaption style=\"text-align:center; color:orange\">Text for both alt and figcaption</figcaption>\n</figure>\n\n<a href=\"https://github.com/lin-stephanie/remark-directive-sugar\">\n  <img src=\"https://images.pexels.com/photos/237272/pexels-photo-237273.jpeg\" alt=\"\">\n</a>\n\n<div>\n  <img src=\"https://images.pexels.com/photos/237272/pexels-photo-237273.jpeg\" alt=\"\">\n</div>\n\n<figure>\n  <p>\n    <img src=\"https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg\" alt=\"Alt text\">\n  </p>\n  <figcaption>Figcaption text</figcaption>\n</figure>\n\n<a href=\"https://github.com/lin-stephanie/remark-directive-sugar\">\n  <p>\n    <img src=\"https://images.pexels.com/photos/237273/pexels-photo-237273.jpeg\" alt=\"\">\n  </p>\n</a>\n```\n\n## API\n\nThis package exports no identifiers. The default export is [`remarkDirectiveSugar`](#unifieduseremarkdirectivesugar-options).\n\n### `unified().use(remarkDirectiveSugar[, options])`\n\nUsed to provid predefined directives.\n\n###### Parameters\n\n* `options` ([`Options`](#options), optional) — configuration\n\n###### Returns\n\nTransform ([`Transformer`](https://github.com/unifiedjs/unified#transformer)).\n\n### `Options`\n\nConfiguration (TypeScript type). All options are optional.\n\n###### Fields\n\n- `badge` ([`BadgeDirectiveConfig`](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/src/types.ts#L29)) — `:badge[-*]` configuration options.\n- `link` ([`LinkDirectiveConfig`](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/src/types.ts#L78)) — `:link` configuration options.\n- `video` ([`VideoDirectiveConfig`](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/src/types.ts#L118)) — `::video[-*]` configuration options.\n- `image` ([`ImageDirectiveConfig`](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/src/types.ts#L153)) — `:::image-*` configuration options.\n\n## Types\n\nThis package is fully typed with [TypeScript](https://www.typescriptlang.org/). It exports the additional types `Options`, `BadgeDirectiveConfig`, `LinkDirectiveConfig`, `VideoDirectiveConfig`, `ImageDirectiveConfig`, `PropertiesFromContainerDirective`, `PropertiesFromLeafDirective` and `PropertiesFromTextDirective`. See [jsDocs.io](https://www.jsdocs.io/package/remark-directive-sugar) for type details.\n\n## Contribution\n\nIf you see any errors or room for improvement on this plugin, feel free to open an [issues](https://github.com/lin-stephanie/remark-directive-sugar/issues) or [pull request](https://github.com/lin-stephanie/remark-directive-sugar/pulls) . Thank you in advance for contributing!\n\n## License\n\n[MIT](https://github.com/lin-stephanie/remark-directive-sugar/blob/main/LICENSE) © 2024-PRESENT [Stephanie Lin](https://github.com/lin-stephanie)\n\n<!-- Badges -->\n\n[version-badge]: https://img.shields.io/github/v/release/lin-stephanie/remark-directive-sugar?label=release&style=flat&colorA=080f12&colorB=f87171\n[version-link]: https://github.com/lin-stephanie/remark-directive-sugar/releases\n[coverage-badge]: https://img.shields.io/codecov/c/github/lin-stephanie/remark-directive-sugar?style=flat&colorA=080f12&colorB=ef7575\n[coverage]: https://codecov.io/github/lin-stephanie/remark-directive-sugar\n[npm-downloads-src]: https://img.shields.io/npm/dm/remark-directive-sugar?style=flat&colorA=080f12&colorB=ef7575\n[npm-downloads-href]: https://npmjs.com/package/remark-directive-sugar\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=ef7575\n[jsdocs-href]: https://www.jsdocs.io/package/remark-directive-sugar\n","readmeFilename":"README.md"}