{"_id":"@arcsin1/pptx-ooxml-geometry","_rev":"2-29683af231c8b1d0a0e108cd89e9d707","name":"@arcsin1/pptx-ooxml-geometry","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@arcsin1/pptx-ooxml-geometry","version":"0.0.1","keywords":["pptx","ooxml","geometry","svg"],"license":"UNLICENSED","_id":"@arcsin1/pptx-ooxml-geometry@0.0.1","maintainers":[{"name":"arcsin1","email":"13896226203@163.com"}],"dist":{"shasum":"ade79a8e5c05db6cd136f50e0c59d99ebbb328ee","tarball":"https://registry.npmjs.org/@arcsin1/pptx-ooxml-geometry/-/pptx-ooxml-geometry-0.0.1.tgz","fileCount":9,"integrity":"sha512-5oeoPXxk25LKo4V787Wtyn9uqOJwNQ1wPrRrAnWycuXNX/l+R2ChKC35oC3QibI5vgwCUMleL9KwUi6Nf5QexA==","signatures":[{"sig":"MEQCIHerIXM3KrLX0s0oBDaJoaFY5Of9Pd6db9GiVIcZGlgNAiBJmDglNxLFgu7p6fFpyPVrjf6Rf757BZnTTyOEUv8BOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74815},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"rollup -c -w","test":"vitest run","build":"rollup -c","prepack":"npm run build:release","typecheck":"tsc --noEmit","pack:check":"npm pack --dry-run","build:release":"cross-env OOXML_GEOMETRY_OBFUSCATE=1 rollup -c"},"_npmUser":{"name":"arcsin1","email":"13896226203@163.com"},"_npmVersion":"10.9.8","description":"OOXML geometry runtime primitives for PPTX import and rendering","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.44.2","vitest":"^4.1.10","cross-env":"^7.0.3","typescript":"^5.8.3","@types/node":"^26.1.1","@rollup/plugin-terser":"^0.4.4","javascript-obfuscator":"^4.1.1","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/pptx-ooxml-geometry_0.0.1_1785298388517_0.5558113410488545","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@arcsin1/pptx-ooxml-geometry","version":"0.0.2","description":"OOXML geometry runtime primitives for PPTX import and rendering","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"publishConfig":{"access":"public"},"scripts":{"dev":"rollup -c -w","typecheck":"tsc --noEmit","test":"vitest run","build":"rollup -c","build:release":"cross-env OOXML_GEOMETRY_OBFUSCATE=1 rollup -c","pack:check":"npm pack --dry-run","prepack":"npm run build:release"},"keywords":["pptx","ooxml","geometry","svg"],"license":"Apache-2.0","devDependencies":{"@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.4","@types/node":"^26.1.1","cross-env":"^7.0.3","javascript-obfuscator":"^4.1.1","rollup":"^4.44.2","tslib":"^2.8.1","typescript":"^5.8.3","vitest":"^4.1.10"},"_id":"@arcsin1/pptx-ooxml-geometry@0.0.2","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-KOqbDTY6hFgxHyhW2Euist7t0HmrUZlw0HaHfWMNobXQu5hD6iDu4yfwqy9kuYVR4E7SVbH64pdwyt+AuiDT/w==","shasum":"8c54de61b04b5f7c736589c6134cac2df0281a00","tarball":"https://registry.npmjs.org/@arcsin1/pptx-ooxml-geometry/-/pptx-ooxml-geometry-0.0.2.tgz","fileCount":10,"unpackedSize":84186,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC60W0DYwwmSfshfFeuDtSkG6HAGwsqFm+/SI3PgjOt1gIgdmf3prQDbW4GckJfAnQHYGFhcNVeSfSu/beG6qEG5UQ="}]},"_npmUser":{"name":"arcsin1","email":"13896226203@163.com"},"directories":{},"maintainers":[{"name":"arcsin1","email":"13896226203@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pptx-ooxml-geometry_0.0.2_1785298789966_0.06927196675362124"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-29T04:13:08.314Z","modified":"2026-07-29T04:19:50.259Z","0.0.1":"2026-07-29T04:13:08.667Z","0.0.2":"2026-07-29T04:19:50.131Z"},"license":"Apache-2.0","keywords":["pptx","ooxml","geometry","svg"],"description":"OOXML geometry runtime primitives for PPTX import and rendering","maintainers":[{"name":"arcsin1","email":"13896226203@163.com"}],"readme":"# @arcsin1/pptx-ooxml-geometry\n\nOOXML / DrawingML 图形几何工具库，用于将 PPTX 中的形状几何转换为可渲染的 SVG 路径。\n\n## 功能\n\n- 解析 `a:custGeom` 自定义几何路径。\n- 按目标宽高缩放并渲染自定义几何为 SVG path。\n- 渲染常见 `a:prstGeom` 预设形状。\n- 计算 SVG path 的包围盒，支持直线、二次/三次贝塞尔曲线、平滑曲线与旋转椭圆弧。\n- 导出 OOXML 角度与 adjustment 的单位常量。\n\n已覆盖矩形、圆角矩形、椭圆、三角形、梯形、平行四边形、菱形、五边形、六边形、五角星、箭头、弧形、圆环、饼图、圆柱、常用流程图、连接线、切角矩形与数学符号等预设形状。\n\n## API\n\n```ts\nimport {\n  parseOoxmlCustomGeometryXml,\n  renderOoxmlCustomGeometryPath,\n  renderOoxmlCustomGeometryXml,\n  renderOoxmlPresetShapePath,\n  getSvgPathBounds,\n  supportedOoxmlPresetShapes\n} from '@arcsin1/pptx-ooxml-geometry'\n```\n\n### 自定义几何\n\n```ts\nconst geometry = parseOoxmlCustomGeometryXml(customGeometryXml)\nconst path = geometry\n  ? renderOoxmlCustomGeometryPath(geometry, width, height)\n  : ''\n\nconst pathFromXml = renderOoxmlCustomGeometryXml(customGeometryXml, width, height)\n```\n\n### 预设形状\n\n```ts\nconst path = renderOoxmlPresetShapePath('hexagon', 320, 180)\nconst shapes = supportedOoxmlPresetShapes()\n```\n\n### SVG 包围盒\n\n```ts\nconst bounds = getSvgPathBounds(path)\n// { minX, minY, width, height }\n```\n","readmeFilename":"README.md"}