@litfamily/litcodex 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (827) hide show
  1. package/README.md +361 -23
  2. package/dist/cli.js +42 -0
  3. package/dist/config-migration/config-paths.js +9 -2
  4. package/dist/install/doctor-render.js +1 -0
  5. package/dist/install/doctor.js +8 -0
  6. package/dist/install/execute.d.ts +2 -0
  7. package/dist/install/execute.js +8 -3
  8. package/dist/install/generated-skill-payload-hashes.d.ts +617 -21
  9. package/dist/install/generated-skill-payload-hashes.js +617 -21
  10. package/dist/install/index.js +13 -2
  11. package/dist/install/marketplace-payload.d.ts +1 -0
  12. package/dist/install/marketplace-payload.js +73 -2
  13. package/dist/install/motion-runtime.d.ts +36 -0
  14. package/dist/install/motion-runtime.js +82 -0
  15. package/dist/install/office-runtime.d.ts +20 -0
  16. package/dist/install/office-runtime.js +37 -0
  17. package/dist/install/skill-catalog.d.ts +1 -1
  18. package/dist/install/skill-catalog.js +26 -2
  19. package/dist/install/skill-resource-hashes.d.ts +1 -1
  20. package/dist/install/skill-resource-hashes.js +1 -1
  21. package/dist/install/types.d.ts +3 -0
  22. package/dist/postinstall.js +14 -2
  23. package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
  24. package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
  25. package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
  26. package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
  27. package/marketplace/plugins/litcodex/components/lit-loop/directive.md +90 -5
  28. package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-comprehend.md +13 -17
  29. package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +8 -0
  30. package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -1
  31. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -1
  32. package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +36 -4
  33. package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.d.ts +112 -0
  34. package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.js +522 -0
  35. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.d.ts +18 -0
  36. package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +95 -0
  37. package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.d.ts +3 -1
  38. package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.js +10 -5
  39. package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
  40. package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
  41. package/marketplace/plugins/litcodex/components/rules/bundled-rules/lit-humanizer.md +12 -0
  42. package/marketplace/plugins/litcodex/components/rules/dist/cli.js +22 -10
  43. package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.d.ts +23 -34
  44. package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.js +420 -388
  45. package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
  46. package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
  47. package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
  48. package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
  49. package/marketplace/plugins/litcodex/hooks/hooks.json +32 -21
  50. package/marketplace/plugins/litcodex/skills/autoconference/assets/report_template.md +1 -1
  51. package/marketplace/plugins/litcodex/skills/browser-drive/SKILL.md +4 -0
  52. package/marketplace/plugins/litcodex/skills/browser-drive/scripts/capability-probe.mjs +25 -2
  53. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +14 -15
  54. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/THIRD-PARTY-NOTICE.txt +7 -0
  55. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/examples/readme-ab/README.md +13 -0
  56. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/adaptive-layout.md +12 -83
  57. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +17 -65
  58. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +44 -13
  59. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/composition.md +14 -80
  60. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +103 -0
  61. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/creative-directions.md +13 -82
  62. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/evidence-review.md +14 -112
  63. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/implementation-platforms.md +16 -68
  64. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/inclusive-interface.md +12 -86
  65. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/interaction-motion.md +13 -82
  66. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +123 -0
  67. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/operating-lanes.md +12 -100
  68. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/performance-delivery.md +12 -78
  69. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +41 -0
  70. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/product-direction.md +10 -88
  71. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +10 -12
  72. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/redesign-playbook.md +12 -74
  73. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +98 -0
  74. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/system-foundations.md +13 -100
  75. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-language.md +11 -74
  76. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-reconstruction.md +9 -78
  77. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/hover-probe.mjs +28 -0
  78. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +423 -0
  79. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +261 -0
  80. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/route-mode.mjs +19 -0
  81. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +115 -0
  82. package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/serve-static.mjs +24 -0
  83. package/marketplace/plugins/litcodex/skills/lit-comprehend/SKILL.md +45 -53
  84. package/marketplace/plugins/litcodex/skills/lit-comprehend/references/artifact-template.md +10 -44
  85. package/marketplace/plugins/litcodex/skills/lit-comprehend/scripts/verify-explainer.ts +0 -18
  86. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/NOTICE +33 -0
  87. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +167 -0
  88. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/agents/openai.yaml +6 -0
  89. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
  90. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
  91. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
  92. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
  93. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
  94. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
  95. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
  96. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
  97. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
  98. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
  99. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
  100. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
  101. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
  102. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
  103. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
  104. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
  105. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
  106. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
  107. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
  108. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
  109. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
  110. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
  111. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
  112. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
  113. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
  114. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
  115. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
  116. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
  117. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
  118. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
  119. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
  120. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
  121. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
  122. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
  123. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
  124. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
  125. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
  126. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
  127. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
  128. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
  129. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
  130. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
  131. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
  132. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
  133. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
  134. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
  135. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
  136. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
  137. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
  138. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
  139. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
  140. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
  141. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
  142. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
  143. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
  144. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
  145. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
  146. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
  147. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
  148. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
  149. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
  150. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
  151. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
  152. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
  153. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
  154. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
  155. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
  156. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
  157. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
  158. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
  159. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
  160. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
  161. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
  162. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
  163. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
  164. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
  165. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
  166. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
  167. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
  168. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
  169. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
  170. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
  171. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
  172. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
  173. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
  174. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
  175. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
  176. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
  177. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
  178. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
  179. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
  180. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
  181. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
  182. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
  183. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
  184. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
  185. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
  186. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
  187. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
  188. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
  189. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
  190. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
  191. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
  192. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
  193. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
  194. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
  195. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
  196. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
  197. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
  198. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
  199. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
  200. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
  201. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
  202. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
  203. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
  204. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
  205. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
  206. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
  207. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
  208. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
  209. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
  210. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
  211. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
  212. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
  213. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
  214. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
  215. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
  216. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
  217. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
  218. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
  219. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
  220. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
  221. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
  222. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
  223. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
  224. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
  225. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
  226. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
  227. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
  228. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
  229. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
  230. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
  231. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
  232. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
  233. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
  234. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
  235. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
  236. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
  237. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
  238. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
  239. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
  240. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
  241. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
  242. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
  243. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
  244. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
  245. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
  246. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
  247. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
  248. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
  249. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
  250. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
  251. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
  252. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
  253. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
  254. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
  255. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
  256. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
  257. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
  258. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
  259. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
  260. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
  261. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
  262. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
  263. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
  264. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
  265. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
  266. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
  267. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
  268. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
  269. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
  270. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
  271. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
  272. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
  273. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
  274. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
  275. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/icons.html +231 -0
  276. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/index.html +1 -0
  277. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
  278. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
  279. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
  280. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
  281. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
  282. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
  283. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
  284. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/constructed-naive-foil.html +1 -0
  285. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
  286. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
  287. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/constructed-naive-foil.html +1 -0
  288. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
  289. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
  290. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/constructed-naive-foil.html +1 -0
  291. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
  292. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
  293. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/constructed-naive-foil.html +1 -0
  294. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
  295. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
  296. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/constructed-naive-foil.html +1 -0
  297. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
  298. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
  299. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/constructed-naive-foil.html +1 -0
  300. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
  301. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
  302. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/constructed-naive-foil.html +1 -0
  303. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
  304. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
  305. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/constructed-naive-foil.html +1 -0
  306. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/accessibility.md +37 -0
  307. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/export.md +29 -0
  308. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
  309. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
  310. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
  311. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-schema.md +28 -0
  312. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
  313. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/motion.md +29 -0
  314. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
  315. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/output-spec.md +48 -0
  316. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
  317. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
  318. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
  319. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
  320. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/profiles.md +24 -0
  321. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
  322. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +67 -0
  323. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
  324. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bar.md +51 -0
  325. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
  326. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
  327. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bump.md +49 -0
  328. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
  329. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
  330. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
  331. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
  332. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
  333. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
  334. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
  335. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
  336. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-er.md +49 -0
  337. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
  338. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
  339. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
  340. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
  341. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
  342. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
  343. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
  344. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
  345. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
  346. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
  347. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-journey.md +54 -0
  348. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
  349. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-layers.md +54 -0
  350. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-line.md +54 -0
  351. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
  352. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop.md +54 -0
  353. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
  354. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
  355. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-nested.md +59 -0
  356. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
  357. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
  358. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-polar.md +67 -0
  359. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
  360. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-process.md +58 -0
  361. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
  362. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
  363. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
  364. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
  365. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-radar.md +57 -0
  366. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
  367. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
  368. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
  369. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
  370. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
  371. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
  372. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
  373. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state.md +59 -0
  374. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
  375. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
  376. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
  377. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
  378. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
  379. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +54 -0
  380. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
  381. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
  382. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-venn.md +51 -0
  383. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
  384. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
  385. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +59 -0
  386. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
  387. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
  388. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
  389. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +14 -0
  390. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +219 -0
  391. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/doctor.mjs +28 -0
  392. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-model.mjs +162 -0
  393. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-source.mjs +147 -0
  394. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-xml.mjs +148 -0
  395. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/export.mjs +122 -0
  396. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-common.mjs +85 -0
  397. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-drawio.mjs +48 -0
  398. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-excalidraw.mjs +234 -0
  399. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-mermaid.mjs +104 -0
  400. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-common.mjs +115 -0
  401. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-er.mjs +70 -0
  402. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-flowchart.mjs +178 -0
  403. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-sequence.mjs +137 -0
  404. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-state.mjs +80 -0
  405. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
  406. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/runtime-probes.mjs +11 -0
  407. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-all.mjs +85 -0
  408. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-brief.mjs +16 -0
  409. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
  410. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
  411. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
  412. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality-geometry.mjs +226 -0
  413. package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +147 -0
  414. package/marketplace/plugins/litcodex/skills/lit-docx/LICENSE +21 -0
  415. package/marketplace/plugins/litcodex/skills/lit-docx/NOTICE +3 -0
  416. package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +102 -0
  417. package/marketplace/plugins/litcodex/skills/lit-docx/agents/openai.yaml +14 -0
  418. package/marketplace/plugins/litcodex/skills/lit-docx/references/frontmatter_schema.md +42 -0
  419. package/marketplace/plugins/litcodex/skills/lit-docx/references/journal_style_spec.md +17 -0
  420. package/marketplace/plugins/litcodex/skills/lit-docx/references/markdown_quality_checklist.md +37 -0
  421. package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
  422. package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_rules.md +35 -0
  423. package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.in +5 -0
  424. package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.lock +20 -0
  425. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/clean_markdown.py +95 -0
  426. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_docx.py +1046 -0
  427. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_pdf.py +281 -0
  428. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_pdf.py +130 -0
  429. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/docx_craft.py +95 -0
  430. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/edit_docx.py +297 -0
  431. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/embed_images.py +78 -0
  432. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/generate_docx_templates.py +491 -0
  433. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/slop_lint.py +473 -0
  434. package/marketplace/plugins/litcodex/skills/lit-docx/scripts/visual_audit.py +41 -0
  435. package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/acs.docx +0 -0
  436. package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/elsevier.docx +0 -0
  437. package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/ieee.docx +0 -0
  438. package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
  439. package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/nature.docx +0 -0
  440. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/README.md +5 -0
  441. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/template.tex +37 -0
  442. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
  443. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/template.tex +38 -0
  444. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/README.md +5 -0
  445. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/template.tex +37 -0
  446. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
  447. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/template.tex +37 -0
  448. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/README.md +5 -0
  449. package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/template.tex +37 -0
  450. package/marketplace/plugins/litcodex/skills/lit-docx/templates/registry.yaml +1366 -0
  451. package/marketplace/plugins/litcodex/skills/lit-humanizer/NOTICE +160 -0
  452. package/marketplace/plugins/litcodex/skills/lit-humanizer/SKILL.md +146 -0
  453. package/marketplace/plugins/litcodex/skills/lit-humanizer/always-on-rule.md +9 -0
  454. package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/always-on-rule.md +9 -0
  455. package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/report-skeleton.md +25 -0
  456. package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
  457. package/marketplace/plugins/litcodex/skills/lit-humanizer/bench/prompts.md +73 -0
  458. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
  459. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
  460. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/after.md +9 -0
  461. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/before.md +15 -0
  462. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/after.md +5 -0
  463. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/before.md +12 -0
  464. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/after.md +10 -0
  465. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/before.md +19 -0
  466. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/after.md +5 -0
  467. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/before.md +7 -0
  468. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/after.md +7 -0
  469. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/before.md +9 -0
  470. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/after.md +5 -0
  471. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/before.md +5 -0
  472. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/after.md +7 -0
  473. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/before.md +7 -0
  474. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
  475. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
  476. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/after.md +9 -0
  477. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/before.md +13 -0
  478. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
  479. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
  480. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
  481. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
  482. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
  483. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
  484. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/after.md +15 -0
  485. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/before.md +17 -0
  486. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/after.md +7 -0
  487. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/before.md +9 -0
  488. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/after.md +12 -0
  489. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/before.md +14 -0
  490. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/after.md +13 -0
  491. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/before.md +11 -0
  492. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
  493. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
  494. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/after.md +19 -0
  495. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/before.md +19 -0
  496. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
  497. package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
  498. package/marketplace/plugins/litcodex/skills/lit-humanizer/motion-guide.md +123 -0
  499. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/code-patterns.md +468 -0
  500. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/deliverable-channels.md +111 -0
  501. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
  502. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-content.md +243 -0
  503. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
  504. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns.md +57 -0
  505. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-metrics.md +33 -0
  506. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
  507. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
  508. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns.md +31 -0
  509. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
  510. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
  511. package/marketplace/plugins/litcodex/skills/lit-humanizer/references/taxonomy.md +153 -0
  512. package/marketplace/plugins/litcodex/skills/lit-humanizer/rules.json +884 -0
  513. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/core.mjs +208 -0
  514. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/detect.mjs +83 -0
  515. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
  516. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
  517. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
  518. package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
  519. package/marketplace/plugins/litcodex/skills/lit-init/references/deep-repository-map.md +6 -10
  520. package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +95 -12
  521. package/marketplace/plugins/litcodex/skills/lit-loop/agents/openai.yaml +3 -2
  522. package/marketplace/plugins/litcodex/skills/lit-loop/references/full-workflow.md +10 -3
  523. package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +7 -0
  524. package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +102 -0
  525. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/analyst.md +49 -0
  526. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/antithesis.md +59 -0
  527. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/architect.md +44 -0
  528. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/critic.md +42 -0
  529. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/openai.yaml +14 -0
  530. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/synthesizer.md +47 -0
  531. package/marketplace/plugins/litcodex/skills/lit-pptx/agents/thesis.md +33 -0
  532. package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
  533. package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-md.png +0 -0
  534. package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
  535. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Black.otf +0 -0
  536. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Bold.otf +0 -0
  537. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Light.otf +0 -0
  538. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Medium.otf +0 -0
  539. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Regular.otf +0 -0
  540. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/OFL.txt +94 -0
  541. package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/SOURCE.md +29 -0
  542. package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/LICENSE.txt +94 -0
  543. package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Bold.otf +0 -0
  544. package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Regular.otf +0 -0
  545. package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +71 -0
  546. package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +141 -0
  547. package/marketplace/plugins/litcodex/skills/lit-pptx/references/consensus-protocol.md +125 -0
  548. package/marketplace/plugins/litcodex/skills/lit-pptx/references/data-display-cookbook.md +45 -0
  549. package/marketplace/plugins/litcodex/skills/lit-pptx/references/design-system-azure.md +58 -0
  550. package/marketplace/plugins/litcodex/skills/lit-pptx/references/interview-protocol.md +113 -0
  551. package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package-lock.json +747 -0
  552. package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package.json +13 -0
  553. package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.in +2 -0
  554. package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.lock +14 -0
  555. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/check_ooxml.py +40 -0
  556. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +399 -0
  557. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +246 -0
  558. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +201 -0
  559. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/inventory.py +95 -0
  560. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/learn_template.py +433 -0
  561. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
  562. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
  563. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/font-map.js +79 -0
  564. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-bg.js +85 -0
  565. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +36 -0
  566. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +734 -0
  567. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/markdown-loader.js +136 -0
  568. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-html.js +358 -0
  569. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +1885 -0
  570. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-ast.js +517 -0
  571. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
  572. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +355 -0
  573. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +137 -0
  574. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/package.json +1 -0
  575. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +795 -0
  576. package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/validate_pptx.py +206 -0
  577. package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v1.md +251 -0
  578. package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v2.md +207 -0
  579. package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
  580. package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
  581. package/marketplace/plugins/litcodex/skills/lit-pptx/specs/template-enrollment-contract.md +379 -0
  582. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/bauhaus_light.css +4 -0
  583. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/boilerplate_professional.css +508 -0
  584. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
  585. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
  586. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +37 -0
  587. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
  588. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +464 -0
  589. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +37 -0
  590. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
  591. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
  592. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
  593. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
  594. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
  595. package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
  596. package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +2 -0
  597. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +73 -0
  598. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/agents/openai.yaml +15 -0
  599. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/NOTICE +23 -0
  600. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +32 -0
  601. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/browser-app.js +735 -0
  602. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/completion.mjs +9 -0
  603. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/compose.mjs +255 -0
  604. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +264 -0
  605. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +169 -0
  606. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/encode.mjs +163 -0
  607. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/flash.mjs +251 -0
  608. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/fonts.mjs +169 -0
  609. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gate.mjs +466 -0
  610. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +267 -0
  611. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +182 -0
  612. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/passes.mjs +181 -0
  613. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/presets.mjs +110 -0
  614. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/report.mjs +56 -0
  615. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +287 -0
  616. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scenes.mjs +309 -0
  617. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +463 -0
  618. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +155 -0
  619. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-init.js +215 -0
  620. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +515 -0
  621. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +147 -0
  622. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +243 -0
  623. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +335 -0
  624. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +26 -0
  625. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +311 -0
  626. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stroke.mjs +264 -0
  627. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/timeline.mjs +153 -0
  628. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +280 -0
  629. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/type.mjs +234 -0
  630. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/util.mjs +198 -0
  631. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt400.ttf +0 -0
  632. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt700.ttf +0 -0
  633. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt900.ttf +0 -0
  634. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt400.ttf +0 -0
  635. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt700.ttf +0 -0
  636. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt900.ttf +0 -0
  637. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt400.ttf +0 -0
  638. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt700.ttf +0 -0
  639. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt900.ttf +0 -0
  640. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
  641. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/SHA256SUMS +16 -0
  642. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/CREDITS +6 -0
  643. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
  644. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
  645. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
  646. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
  647. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
  648. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/OFL.txt +86 -0
  649. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
  650. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
  651. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +137 -0
  652. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +68 -0
  653. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/scene-author.md +57 -0
  654. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +175 -0
  655. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +103 -0
  656. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +119 -0
  657. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/type-and-timing.md +83 -0
  658. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package-lock.json +59 -0
  659. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package.json +1 -0
  660. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/requirements-audio.txt +1082 -0
  661. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/word-timing-models.json +11 -0
  662. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/beat-grid.py +50 -0
  663. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +807 -0
  664. package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/runtime.mjs +43 -0
  665. package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +28 -41
  666. package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +8 -0
  667. package/marketplace/plugins/litcodex/skills/litwork/references/delivery-playbook.md +6 -0
  668. package/node_modules/@litcodex/lit-loop/directive.md +90 -5
  669. package/node_modules/@litcodex/lit-loop/directives/lit-comprehend.md +13 -17
  670. package/node_modules/@litcodex/lit-loop/directives/litwork.md +8 -0
  671. package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -1
  672. package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -1
  673. package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +36 -4
  674. package/node_modules/@litcodex/lit-loop/dist/jev-hint.d.ts +112 -0
  675. package/node_modules/@litcodex/lit-loop/dist/jev-hint.js +522 -0
  676. package/node_modules/@litcodex/lit-loop/dist/motion-route.d.ts +18 -0
  677. package/node_modules/@litcodex/lit-loop/dist/motion-route.js +95 -0
  678. package/node_modules/@litcodex/lit-loop/dist/skill-renames.d.ts +3 -1
  679. package/node_modules/@litcodex/lit-loop/dist/skill-renames.js +10 -5
  680. package/node_modules/@litcodex/lit-loop/package.json +1 -1
  681. package/node_modules/@litcodex/lit-loop/skills/browser-drive/SKILL.md +4 -0
  682. package/node_modules/@litcodex/lit-loop/skills/browser-drive/scripts/capability-probe.mjs +25 -2
  683. package/node_modules/@litcodex/lit-loop/skills/lit-comprehend/SKILL.md +45 -53
  684. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/NOTICE +160 -0
  685. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/SKILL.md +146 -0
  686. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/always-on-rule.md +9 -0
  687. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/always-on-rule.md +9 -0
  688. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/report-skeleton.md +25 -0
  689. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
  690. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/bench/prompts.md +73 -0
  691. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
  692. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
  693. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/after.md +9 -0
  694. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/before.md +15 -0
  695. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/after.md +5 -0
  696. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/before.md +12 -0
  697. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/after.md +10 -0
  698. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/before.md +19 -0
  699. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/after.md +5 -0
  700. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/before.md +7 -0
  701. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/after.md +7 -0
  702. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/before.md +9 -0
  703. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/after.md +5 -0
  704. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/before.md +5 -0
  705. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/after.md +7 -0
  706. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/before.md +7 -0
  707. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
  708. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
  709. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/after.md +9 -0
  710. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/before.md +13 -0
  711. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
  712. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
  713. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
  714. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
  715. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
  716. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
  717. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/after.md +15 -0
  718. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/before.md +17 -0
  719. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/after.md +7 -0
  720. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/before.md +9 -0
  721. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/after.md +12 -0
  722. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/before.md +14 -0
  723. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/after.md +13 -0
  724. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/before.md +11 -0
  725. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
  726. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
  727. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/after.md +19 -0
  728. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/before.md +19 -0
  729. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
  730. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
  731. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/motion-guide.md +123 -0
  732. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/code-patterns.md +468 -0
  733. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/deliverable-channels.md +111 -0
  734. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
  735. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-content.md +243 -0
  736. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
  737. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns.md +57 -0
  738. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-metrics.md +33 -0
  739. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
  740. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
  741. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns.md +31 -0
  742. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
  743. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
  744. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/taxonomy.md +153 -0
  745. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/rules.json +884 -0
  746. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/core.mjs +208 -0
  747. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/detect.mjs +83 -0
  748. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
  749. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
  750. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
  751. package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
  752. package/node_modules/@litcodex/lit-loop/skills/lit-init/references/deep-repository-map.md +6 -10
  753. package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +95 -12
  754. package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +2 -0
  755. package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +28 -41
  756. package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +8 -0
  757. package/package.json +2 -2
  758. package/readme-assets/ab-simple/assets/s11-baseline-desktop.webp +0 -0
  759. package/readme-assets/ab-simple/assets/s11-baseline-phone.webp +0 -0
  760. package/readme-assets/ab-simple/assets/s11-lit-desktop.webp +0 -0
  761. package/readme-assets/ab-simple/assets/s11-lit-phone.webp +0 -0
  762. package/readme-assets/ab-simple/assets/s3-baseline-desktop.webp +0 -0
  763. package/readme-assets/ab-simple/assets/s3-baseline-phone.webp +0 -0
  764. package/readme-assets/ab-simple/assets/s3-lit-desktop.webp +0 -0
  765. package/readme-assets/ab-simple/assets/s3-lit-phone.webp +0 -0
  766. package/readme-assets/ab-simple/assets/s4-baseline-desktop.webp +0 -0
  767. package/readme-assets/ab-simple/assets/s4-baseline-phone.webp +0 -0
  768. package/readme-assets/ab-simple/assets/s4-lit-desktop.webp +0 -0
  769. package/readme-assets/ab-simple/assets/s4-lit-phone.webp +0 -0
  770. package/readme-assets/ab-simple/assets/s5-baseline-slides.webp +0 -0
  771. package/readme-assets/ab-simple/assets/s5-lit-slides.webp +0 -0
  772. package/readme-assets/ab-simple/assets/s7-lit-diagram.webp +0 -0
  773. package/readme-assets/ab-simple/assets/s8-baseline-slides.webp +0 -0
  774. package/readme-assets/ab-simple/assets/s8-lit-slides.webp +0 -0
  775. package/readme-assets/ab-simple/assets/s9-lit-pages.webp +0 -0
  776. package/readme-assets/badge-version.svg +1 -1
  777. package/readme-assets/cover-motion-still.webp +0 -0
  778. package/readme-assets/cover-motion.webp +0 -0
  779. package/readme-assets/skills/autoconference.webp +0 -0
  780. package/readme-assets/skills/automatic-checks.webp +0 -0
  781. package/readme-assets/skills/autoresearch.webp +0 -0
  782. package/readme-assets/skills/browser-drive.webp +0 -0
  783. package/readme-assets/skills/coding-session-audit.webp +0 -0
  784. package/readme-assets/skills/debugging.webp +0 -0
  785. package/readme-assets/skills/deep-interview.webp +0 -0
  786. package/readme-assets/skills/frontend-ui-ux.webp +0 -0
  787. package/readme-assets/skills/lit-burnoff-file.webp +0 -0
  788. package/readme-assets/skills/lit-burnoff.webp +0 -0
  789. package/readme-assets/skills/lit-code.webp +0 -0
  790. package/readme-assets/skills/lit-commit.webp +0 -0
  791. package/readme-assets/skills/lit-comprehend.webp +0 -0
  792. package/readme-assets/skills/lit-crucible.webp +0 -0
  793. package/readme-assets/skills/lit-diagram-drawer.webp +0 -0
  794. package/readme-assets/skills/lit-docx.webp +0 -0
  795. package/readme-assets/skills/lit-fetch.webp +0 -0
  796. package/readme-assets/skills/lit-handoff.webp +0 -0
  797. package/readme-assets/skills/lit-humanizer.webp +0 -0
  798. package/readme-assets/skills/lit-init.webp +0 -0
  799. package/readme-assets/skills/lit-loop.webp +0 -0
  800. package/readme-assets/skills/lit-plan.webp +0 -0
  801. package/readme-assets/skills/lit-pptx.webp +0 -0
  802. package/readme-assets/skills/lit-recap.webp +0 -0
  803. package/readme-assets/skills/lit-scientific-visualization.webp +0 -0
  804. package/readme-assets/skills/lit-team.webp +0 -0
  805. package/readme-assets/skills/lit-typographic-motion.webp +0 -0
  806. package/readme-assets/skills/litcodex-contribute-bug-fix.webp +0 -0
  807. package/readme-assets/skills/litcodex-doctor.webp +0 -0
  808. package/readme-assets/skills/litcodex-report-bug.webp +0 -0
  809. package/readme-assets/skills/litgoal.webp +0 -0
  810. package/readme-assets/skills/litresearch.webp +0 -0
  811. package/readme-assets/skills/litwork.webp +0 -0
  812. package/readme-assets/skills/lsp-setup.webp +0 -0
  813. package/readme-assets/skills/readme-studio.webp +0 -0
  814. package/readme-assets/skills/refactor.webp +0 -0
  815. package/readme-assets/skills/review-work.webp +0 -0
  816. package/readme-assets/skills/start-approved-plan.webp +0 -0
  817. package/readme-assets/skills/structural-search.webp +0 -0
  818. package/readme-assets/skills/visual-qa.webp +0 -0
  819. package/readme-assets/skills/wikify.webp +0 -0
  820. package/marketplace/plugins/litcodex/skills/lit-korean/SKILL.md +0 -206
  821. package/marketplace/plugins/litcodex/skills/lit-korean/references/prompt-injection-handling.md +0 -23
  822. package/marketplace/plugins/litcodex/skills/lit-korean/references/quick-rules.md +0 -38
  823. package/marketplace/plugins/litcodex/skills/lit-korean/references/safety-checklist.md +0 -38
  824. package/node_modules/@litcodex/lit-loop/skills/lit-korean/SKILL.md +0 -206
  825. package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/prompt-injection-handling.md +0 -23
  826. package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/quick-rules.md +0 -38
  827. package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/safety-checklist.md +0 -38
@@ -0,0 +1,148 @@
1
+ import { inflateRawSync } from 'node:zlib';
2
+ import { decodeEntities, reject, strictUtf8 } from './import-common.mjs';
3
+
4
+ const MAX_XML_CHARS = 24 * 1024 * 1024;
5
+ const MAX_XML_NODES = 50_000;
6
+ const MAX_XML_DEPTH = 64;
7
+ const MAX_INFLATED_BYTES = 32 * 1024 * 1024;
8
+ const NAME = /^[A-Za-z_][A-Za-z0-9_.:-]*/u;
9
+
10
+ function appendText(node, value) {
11
+ if (value) node.text.push(value);
12
+ }
13
+
14
+ function decodeXmlText(value) {
15
+ if (/&(?!(?:#(?:x[\da-f]+|\d+)|amp|lt|gt|quot|apos|nbsp);)/iu.test(value)) {
16
+ reject('XML contains an unsupported entity reference');
17
+ }
18
+ return decodeEntities(value);
19
+ }
20
+
21
+ function tagEnd(source, start) {
22
+ let quote = '';
23
+ for (let index = start; index < source.length; index += 1) {
24
+ const char = source[index];
25
+ if (quote) {
26
+ if (char === quote) quote = '';
27
+ } else if (char === '"' || char === "'") quote = char;
28
+ else if (char === '>') return index;
29
+ }
30
+ reject('XML contains an unterminated tag');
31
+ }
32
+
33
+ function parseOpeningTag(raw) {
34
+ const match = NAME.exec(raw);
35
+ if (!match) reject('XML contains an invalid element name');
36
+ const name = match[0];
37
+ const attributes = Object.create(null);
38
+ let rest = raw.slice(name.length).trim();
39
+ const selfClosing = rest.endsWith('/');
40
+ if (selfClosing) rest = rest.slice(0, -1).trim();
41
+ while (rest) {
42
+ const attribute = /^([A-Za-z_][A-Za-z0-9_.:-]*)\s*=\s*(["'])([\s\S]*?)\2/u.exec(rest);
43
+ if (!attribute) reject('XML contains a malformed attribute');
44
+ const [, key, , value] = attribute;
45
+ if (Object.hasOwn(attributes, key)) reject(`XML contains duplicate attribute ${key}`);
46
+ attributes[key] = decodeXmlText(value);
47
+ rest = rest.slice(attribute[0].length).trim();
48
+ }
49
+ return { name, attributes, selfClosing };
50
+ }
51
+
52
+ export function parseXml(source) {
53
+ if (source.length > MAX_XML_CHARS) reject('XML exceeds the 24 MiB decoded limit');
54
+ if (/<!\s*(?:DOCTYPE|ENTITY)\b/iu.test(source)) reject('DOCTYPE and entity declarations are unsupported');
55
+ const document = { name: '#document', attributes: Object.create(null), children: [], text: [] };
56
+ const stack = [document];
57
+ let count = 0;
58
+ let cursor = 0;
59
+ while (cursor < source.length) {
60
+ if (source[cursor] !== '<') {
61
+ const end = source.indexOf('<', cursor);
62
+ const next = end < 0 ? source.length : end;
63
+ const text = source.slice(cursor, next);
64
+ if (stack.length === 1 && text.trim()) reject('XML has text outside the root element');
65
+ appendText(stack.at(-1), decodeXmlText(text));
66
+ cursor = next;
67
+ continue;
68
+ }
69
+ if (source.startsWith('<!--', cursor)) {
70
+ const end = source.indexOf('-->', cursor + 4);
71
+ if (end < 0) reject('XML contains an unterminated comment');
72
+ cursor = end + 3;
73
+ continue;
74
+ }
75
+ if (source.startsWith('<![CDATA[', cursor)) {
76
+ const end = source.indexOf(']]>', cursor + 9);
77
+ if (end < 0) reject('XML contains an unterminated CDATA section');
78
+ appendText(stack.at(-1), source.slice(cursor + 9, end));
79
+ cursor = end + 3;
80
+ continue;
81
+ }
82
+ if (source.startsWith('<?', cursor)) {
83
+ const end = source.indexOf('?>', cursor + 2);
84
+ if (end < 0) reject('XML contains an unterminated processing instruction');
85
+ cursor = end + 2;
86
+ continue;
87
+ }
88
+ if (source.startsWith('<!', cursor)) reject('unsupported XML declaration');
89
+ const end = tagEnd(source, cursor + 1);
90
+ const raw = source.slice(cursor + 1, end).trim();
91
+ if (raw.startsWith('/')) {
92
+ const closing = raw.slice(1).trim();
93
+ if (stack.length === 1 || stack.at(-1).name !== closing) reject('XML has mismatched closing tags');
94
+ stack.pop();
95
+ } else {
96
+ const parsed = parseOpeningTag(raw);
97
+ const parent = stack.at(-1);
98
+ const node = { name: parsed.name, attributes: parsed.attributes, children: [], text: [], parent };
99
+ parent.children.push(node);
100
+ count += 1;
101
+ if (count > MAX_XML_NODES) reject('XML element limit exceeded (max 50,000)');
102
+ if (!parsed.selfClosing) {
103
+ stack.push(node);
104
+ if (stack.length - 1 > MAX_XML_DEPTH) reject('XML nesting exceeds the depth limit (64)');
105
+ }
106
+ }
107
+ cursor = end + 1;
108
+ }
109
+ if (stack.length !== 1 || document.children.length !== 1) reject('XML is incomplete or has multiple root elements');
110
+ return document.children[0];
111
+ }
112
+
113
+ export function descendants(node, name) {
114
+ const found = [];
115
+ const pending = [...node.children].reverse();
116
+ while (pending.length) {
117
+ const current = pending.pop();
118
+ if (current.name === name) found.push(current);
119
+ for (let index = current.children.length - 1; index >= 0; index -= 1) pending.push(current.children[index]);
120
+ }
121
+ return found;
122
+ }
123
+
124
+ export function xmlText(node) {
125
+ return node.text.join('');
126
+ }
127
+
128
+ export function inflateDiagram(text) {
129
+ const compact = text.replace(/\s+/gu, '');
130
+ if (!compact || compact.length % 4 === 1 || !/^[A-Za-z0-9+/]*={0,2}$/u.test(compact)) reject('compressed diagram payload is not valid base64');
131
+ const compressed = Buffer.from(compact, 'base64');
132
+ let inflated;
133
+ try {
134
+ inflated = inflateRawSync(compressed, { maxOutputLength: MAX_INFLATED_BYTES });
135
+ } catch {
136
+ reject('compressed diagram payload is invalid or exceeds the 32 MiB limit');
137
+ }
138
+ const textPayload = strictUtf8(inflated, 'compressed diagram is not valid UTF-8');
139
+ if (textPayload.startsWith('<')) return textPayload;
140
+ try {
141
+ const decoded = decodeURIComponent(textPayload);
142
+ if (!decoded.startsWith('<')) reject('compressed diagram does not contain XML');
143
+ return decoded;
144
+ } catch (error) {
145
+ if (error instanceof Error && error.message.includes('does not contain XML')) throw error;
146
+ reject('compressed diagram URI encoding is malformed');
147
+ }
148
+ }
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { spawnSync } from 'node:child_process';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { buildBlockRegistry } from './block-registry.mjs';
7
+ import { decodeXmlCharacterReferences, officeCssUrlsAreSafe, officeHrefRefsAreSafe } from './office-safety.mjs';
8
+ import { supportsAgentBrowserVersion } from './runtime-probes.mjs';
9
+
10
+ const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
11
+ const args=process.argv.slice(2);
12
+ const value=(flag,fallback)=>{const i=args.indexOf(flag);if(i<0)return fallback;const candidate=args[i+1];return candidate&&!candidate.startsWith('--')?candidate:undefined;};
13
+ const input=value('--input',args.find((x)=>!x.startsWith('--')));
14
+ const outputValue=value('--out',path.join(root,'.work','exports'));
15
+ const all=args.includes('--all-scales');
16
+ const office=args.includes('--office-safe');
17
+ const registry=args.includes('--registry');
18
+ const allowFontFallback=args.includes('--allow-font-fallback');
19
+ const selected=Number(value('--scale','3'));
20
+ if(!input||!outputValue||(!all&&![1,2,3].includes(selected))){console.error('Usage: node scripts/export.mjs --input <file.html|file.svg> [--out DIR] [--scale 1|2|3|--all-scales] [--office-safe] [--registry] [--allow-font-fallback]');process.exit(2);}
21
+ const output=path.resolve(outputValue);
22
+ if(path.basename(input)==='index.html'){console.error('EXPORT_SOURCE_REJECTED gallery pages are not diagram sources');process.exit(2);}
23
+ const resolved=path.resolve(input);
24
+ if(!fs.existsSync(resolved)){console.error('INPUT_MISSING '+resolved);process.exit(2);}
25
+ const browserVersion=spawnSync('agent-browser',['--version'],{encoding:'utf8'});
26
+ if(browserVersion.status!==0||!supportsAgentBrowserVersion(browserVersion.stdout)){console.error('RENDERER_REQUIRED agent-browser >= 0.38.1 is required; install or update it yourself with: npm install -g agent-browser');process.exit(2);}
27
+ const doctor=spawnSync('agent-browser',['doctor','--json'],{encoding:'utf8'});
28
+ let doctorJson;
29
+ try{doctorJson=JSON.parse(doctor.stdout);}catch{doctorJson=null;}
30
+ const chrome=doctorJson?.checks?.find((x)=>x.id==='chrome.installed')?.message||'';
31
+ if(!doctorJson?.success||!chrome.includes('154.')){console.error('CHROME_REQUIRED Chrome for Testing 154 must already be installed; user-run step: agent-browser install');process.exit(2);}
32
+ let source=fs.readFileSync(resolved,'utf8');
33
+ const svgMatch=source.match(/<svg\b[^>]*>[\s\S]*?<\/svg>/i);
34
+ if(!svgMatch){console.error('SVG_MISSING '+resolved);process.exit(2);}
35
+ const svg=svgMatch[0];
36
+ let registryData=null;
37
+ if(registry){try{registryData=buildBlockRegistry(svg,resolved);}catch(e){console.error('REGISTRY_FAILED '+e.message);process.exit(2);}}
38
+ const view=svg.match(/\bviewBox\s*=\s*["']([^"']+)["']/i)?.[1]?.trim().split(/[\s,]+/).map(Number);
39
+ if(!view||view.length!==4||view.some((x)=>!Number.isFinite(x))){console.error('VIEWBOX_REQUIRED '+resolved);process.exit(2);}
40
+ let officeSvg=null;
41
+ if(office){
42
+ const font=path.join(root,'assets/fonts/PretendardVariable.woff2');
43
+ if(!fs.existsSync(font)){console.error('FONT_MISSING '+font);process.exit(2);}
44
+ const normalizedOfficeSource=decodeXmlCharacterReferences(svg);
45
+ if(normalizedOfficeSource===null){console.error('OFFICE_UNSAFE_ACTIVE_OR_EXTERNAL_CONTENT');process.exit(2);}
46
+ officeSvg=svg.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,'');
47
+ if(/<foreignObject\b|\bon[a-z]+\s*=|<script\b/i.test(normalizedOfficeSource)||!officeHrefRefsAreSafe(normalizedOfficeSource)){console.error('OFFICE_UNSAFE_ACTIVE_OR_EXTERNAL_CONTENT');process.exit(2);}
48
+ if(/\bvar\s*\(|@import/i.test(normalizedOfficeSource)||!officeCssUrlsAreSafe(normalizedOfficeSource)){console.error('OFFICE_UNSUPPORTED_CSS_URL_OR_VARIABLE');process.exit(2);}
49
+ officeSvg=officeSvg.replace(/<filter\b[^>]*>[\s\S]*?<\/filter>/gi,'');
50
+ officeSvg=officeSvg.replace(/\s+(?:filter|mask)\s*=\s*(["'])url\(#.*?\)\1/gi,'');
51
+ officeSvg=officeSvg.replace(/<(rect|circle|ellipse|line|path|polygon|polyline|text)\b([^>]*)>/gi,(tag,name,attributes)=>{
52
+ let extra='';
53
+ const converted=attributes.replace(/(\b(?:fill|stroke)\s*=\s*)(["'])(.*?)\2/gi,(whole,prefix,quote,value)=>{
54
+ if(value.toLowerCase()==='transparent')return prefix+quote+'none'+quote;
55
+ const rgba=value.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*([\d.]+))?\s*\)$/i);
56
+ if(!rgba)return whole;
57
+ const channels=rgba.slice(1,4).map((n)=>Math.max(0,Math.min(255,Number(n))).toString(16).padStart(2,'0'));
58
+ const alpha=rgba[4]===undefined?1:Math.max(0,Math.min(1,Number(rgba[4])));
59
+ if(alpha<1)extra+=' '+prefix.trim().split('=')[0]+'-opacity="'+alpha+'"';
60
+ return prefix+quote+'#'+channels.join('')+quote;
61
+ });
62
+ return '<'+name+converted+extra+'>';
63
+ });
64
+ const rootOpen=officeSvg.match(/<svg\b[^>]*>/i)?.[0];
65
+ if(!rootOpen){console.error('OFFICE_SVG_ROOT_MISSING');process.exit(2);}
66
+ let nextRoot=rootOpen;
67
+ if(!/\bxmlns\s*=/.test(nextRoot))nextRoot=nextRoot.replace(/<svg\b/,'<svg xmlns="http://www.w3.org/2000/svg"');
68
+ if(!/\bwidth\s*=/.test(nextRoot))nextRoot=nextRoot.replace(/>$/,' width="'+view[2]+'" height="'+view[3]+'">');
69
+ officeSvg=officeSvg.replace(rootOpen,nextRoot);
70
+ const fontData=fs.readFileSync(font).toString('base64');
71
+ const style='<style>@font-face{font-family:Pretendard;src:url(data:font/woff2;base64,'+fontData+') format("woff2");font-weight:100 900}text{font-family:Pretendard,Arial,sans-serif}</style>';
72
+ officeSvg=officeSvg.replace(/(<svg\b[^>]*>)/i,'$1'+style);
73
+ }
74
+ function run(commandArgs, env={}) {
75
+ const r=spawnSync('agent-browser',commandArgs,{encoding:'utf8',env:{...process.env,AGENT_BROWSER_ALLOW_FILE_ACCESS:'true',...env},maxBuffer:2*1024*1024});
76
+ if(r.status!==0) throw new Error((r.stderr||r.stdout||'agent-browser failed').trim());
77
+ return (r.stdout||'').trim();
78
+ }
79
+ fs.mkdirSync(output,{recursive:true});
80
+ const session='lit-diagram-export-'+process.pid+'-'+Date.now();
81
+ const url=resolved.endsWith('.svg')?'file://'+resolved:'file://'+resolved;
82
+ let opened=false;
83
+ try{
84
+ run(['--session',session,'open',url]);opened=true;
85
+ run(['--session',session,'set','media','light','reduced-motion']);
86
+ const outputs=[];
87
+ const scales=all?[1,2,3]:[selected];
88
+ for(const scale of scales){
89
+ const width=Math.round(view[2]*scale), height=Math.round(view[3]*scale);
90
+ run(['--session',session,'set','viewport',String(Math.max(width+8,640)),String(Math.max(height+8,480))]);
91
+ run(['--session',session,'eval','document.fonts.ready.then(()=>true)']);
92
+ const script='(async()=>{const s=document.querySelector("svg");if(!s)throw new Error("SVG missing");document.documentElement.style.margin="0";document.body.style.margin="0";document.body.style.padding="0";const main=s.closest("main");if(main){main.style.width="'+width+'px";main.style.maxWidth="none";main.style.margin="0";main.style.padding="0"}s.style.width="'+width+'px";s.style.height="'+height+'px";s.style.maxWidth="none";s.style.display="block";await document.fonts.ready;const t=s.querySelector("text"),family=t?getComputedStyle(t).fontFamily:"",size=t?getComputedStyle(t).fontSize:"16px",face=[...document.fonts].find(f=>f.family.replace(/[\"\']/g,"").toLowerCase()==="pretendard"),r=s.getBoundingClientRect();const font=Boolean(t&&/Pretendard/i.test(family)&&face?.status==="loaded"&&document.fonts.check(size+" Pretendard"));return JSON.stringify({width:r.width,height:r.height,x:r.x,y:r.y,viewportWidth:innerWidth,viewportHeight:innerHeight,font,family,fontFaceStatus:face?.status||"missing"})})()';
93
+ const dimensions=run(['--session',session,'eval',script]);
94
+ let measurement;
95
+ try{const outer=JSON.parse(dimensions);measurement=typeof outer==='string'?JSON.parse(outer):outer;}catch{throw new Error('FONT_PROOF_INVALID '+dimensions);}
96
+ if(Math.abs(measurement.width-width)>0.5||Math.abs(measurement.height-height)>0.5)throw new Error('SVG_DIMENSIONS_MISMATCH '+JSON.stringify(measurement));
97
+ if(measurement.x<0||measurement.y<0||measurement.x+measurement.width>measurement.viewportWidth||measurement.y+measurement.height>measurement.viewportHeight)throw new Error('SVG_OUTSIDE_VIEWPORT '+JSON.stringify(measurement));
98
+ if(!measurement.font&&!allowFontFallback)throw new Error('PRETENDARD_NOT_LOADED_OR_COMPUTED '+JSON.stringify(measurement));
99
+ const filename=path.join(output,path.basename(resolved).replace(/\.(?:html|svg)$/i,'')+'-'+scale+'x.png');
100
+ run(['--session',session,'screenshot','svg',filename]);
101
+ if(!fs.existsSync(filename)||fs.statSync(filename).size===0) throw new Error('PNG_WRITE_FAILED '+filename+' '+dimensions);
102
+ outputs.push({file:filename,bytes:fs.statSync(filename).size,scale,dimensions});
103
+ }
104
+ for(const out of outputs) console.log('PNG '+out.scale+'x '+out.bytes+' bytes '+out.file+' '+out.dimensions);
105
+ } catch(e) {
106
+ console.error('EXPORT_FAILED '+e.message);
107
+ process.exitCode=1;
108
+ } finally {
109
+ if(opened) {
110
+ const close=spawnSync('agent-browser',['--session',session,'close'],{encoding:'utf8'});
111
+ if(close.status!==0) console.error('BROWSER_CLOSE_WARNING '+(close.stderr||''));
112
+ }
113
+ }
114
+ if(officeSvg){
115
+ const target=path.join(output,path.basename(resolved).replace(/\.(?:html|svg)$/i,'')+'-office.svg');
116
+ fs.writeFileSync(target,'<?xml version="1.0" encoding="UTF-8"?>\n'+officeSvg);
117
+ console.log('OFFICE_SVG '+fs.statSync(target).size+' bytes '+target+' text=live font=embedded-woff2');
118
+ }
119
+ if(registry) {
120
+ const target=path.join(output,path.basename(resolved).replace(/\.(?:html|svg)$/i,'')+'.registry.json');
121
+ if(!process.exitCode){fs.writeFileSync(target,JSON.stringify(registryData,null,2)+'\n');console.log('REGISTRY '+registryData.blocks.length+' blocks '+target);}
122
+ }
@@ -0,0 +1,85 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { closeSync, openSync, readSync } from 'node:fs';
3
+
4
+ export class ImportFailure extends Error {}
5
+
6
+ export function reject(message) {
7
+ throw new ImportFailure(message);
8
+ }
9
+
10
+ export function readBoundedFile(file, limit, description) {
11
+ let fd;
12
+ try {
13
+ fd = openSync(file, 'r');
14
+ const chunks = [];
15
+ let total = 0;
16
+ while (total <= limit) {
17
+ const buffer = Buffer.alloc(Math.min(64 * 1024, limit + 1 - total));
18
+ const count = readSync(fd, buffer, 0, buffer.length, null);
19
+ if (count === 0) break;
20
+ chunks.push(buffer.subarray(0, count));
21
+ total += count;
22
+ }
23
+ if (total > limit) reject(`${description} exceeds the ${Math.floor(limit / (1024 * 1024))} MiB limit`);
24
+ return Buffer.concat(chunks, total);
25
+ } catch (error) {
26
+ if (error instanceof ImportFailure) throw error;
27
+ reject(`cannot read input: ${error instanceof Error ? error.message : 'I/O error'}`);
28
+ } finally {
29
+ if (fd !== undefined) closeSync(fd);
30
+ }
31
+ }
32
+
33
+ export function safeId(sourceId, used, description = 'diagram') {
34
+ if (!sourceId) reject(`${description} contains an element without an id`);
35
+ const candidate = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/u.test(sourceId)
36
+ ? sourceId
37
+ : `n-${createHash('sha256').update(sourceId).digest('hex').slice(0, 16)}`;
38
+ if (used.has(candidate)) reject(`${description} contains duplicate or colliding ids`);
39
+ used.add(candidate);
40
+ return candidate;
41
+ }
42
+
43
+ export function sha256(data) {
44
+ return `sha256:${createHash('sha256').update(data).digest('hex')}`;
45
+ }
46
+
47
+ export function decodeEntities(text) {
48
+ return text.replace(/&(#(?:x[\da-f]+|\d+)|amp|lt|gt|quot|apos|nbsp);/giu, (entity, name) => {
49
+ if (name[0] === '#') {
50
+ const hex = name[1]?.toLowerCase() === 'x';
51
+ const point = Number.parseInt(name.slice(hex ? 2 : 1), hex ? 16 : 10);
52
+ if (!Number.isFinite(point) || point < 0 || point > 0x10ffff || (point >= 0xd800 && point <= 0xdfff)) {
53
+ reject('label contains an invalid character reference');
54
+ }
55
+ return String.fromCodePoint(point);
56
+ }
57
+ return ({ amp: '&', lt: '<', gt: '>', quot: '"', apos: "'", nbsp: '\u00a0' })[name.toLowerCase()] ?? entity;
58
+ });
59
+ }
60
+
61
+ export function cleanLabel(raw, { html = false, markdown = false, removeControls = false } = {}) {
62
+ let text = html ? decodeEntities(raw) : raw;
63
+ if (/<\s*(?:script|iframe|object|embed)\b|\bon[a-z]+\s*=/isu.test(text)) {
64
+ reject('executable markup or event attributes in labels are unsupported');
65
+ }
66
+ const urls = text.match(/\b(?:https?|ftp|file|javascript|data):[^\s<>"']+/giu)?.length ?? 0;
67
+ text = text.replace(/\b(?:https?|ftp|file|javascript|data):[^\s<>"']+/giu, '');
68
+ if (html) {
69
+ text = text.replace(/<br\s*\/?>|<\/(?:p|div)\s*>/giu, '\n').replace(/<[^>]*>/gu, ' ');
70
+ text = text.replaceAll('\u00a0', ' ');
71
+ }
72
+ if (markdown) text = text.replace(/\*\*(.*?)\*\*|__(.*?)__/gu, (_all, a, b) => a || b);
73
+ text = text.replace(/\r\n?/gu, '\n');
74
+ if (removeControls) text = [...text].filter((char) => char === '\n' || char === '\t' || char.codePointAt(0) >= 32).join('');
75
+ const lines = text.split('\n').map((line) => line.replace(/[ \t]+/gu, ' ').trim()).filter(Boolean);
76
+ return { text: lines.join('\n').slice(0, 2_000), urls };
77
+ }
78
+
79
+ export function strictUtf8(data, message) {
80
+ try {
81
+ return new TextDecoder('utf-8', { fatal: true }).decode(data);
82
+ } catch {
83
+ reject(message);
84
+ }
85
+ }
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ import { basename, extname, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { ImportFailure, reject } from './import-common.mjs';
5
+ import { extractDrawio } from './drawio-model.mjs';
6
+ import { readDrawioRoot } from './drawio-source.mjs';
7
+
8
+ const SUPPORTED_EXTENSIONS = new Set(['.drawio', '.xml', '.mxfile', '.svg', '.png']);
9
+
10
+ export function extractDrawioFile(file, pageIndex) {
11
+ if (!SUPPORTED_EXTENSIONS.has(extname(file).toLowerCase())) reject('unsupported form; provide draw.io XML, SVG, or PNG with embedded mxfile metadata');
12
+ const { root, bytes } = readDrawioRoot(file);
13
+ const result = extractDrawio(root, bytes, pageIndex);
14
+ result.title = basename(file, extname(file)) || result.title;
15
+ return result;
16
+ }
17
+
18
+ function parseArgs(argv) {
19
+ const [file, ...rest] = argv;
20
+ if (!file) return { error: 'Usage: node scripts/import-drawio.mjs <file> [--page <index>]' };
21
+ let pageIndex;
22
+ for (let index = 0; index < rest.length; index += 1) {
23
+ if (rest[index] !== '--page' || pageIndex !== undefined || !/^\d+$/u.test(rest[index + 1] ?? '')) {
24
+ return { error: 'Usage: node scripts/import-drawio.mjs <file> [--page <index>]' };
25
+ }
26
+ pageIndex = Number(rest[index + 1]);
27
+ index += 1;
28
+ }
29
+ return { file, pageIndex };
30
+ }
31
+
32
+ function main(argv) {
33
+ const options = parseArgs(argv);
34
+ if ('error' in options) {
35
+ process.stderr.write(`${options.error}\n`);
36
+ return 2;
37
+ }
38
+ try {
39
+ process.stdout.write(`${JSON.stringify(extractDrawioFile(options.file, options.pageIndex), null, 2)}\n`);
40
+ return 0;
41
+ } catch (error) {
42
+ if (!(error instanceof ImportFailure)) throw error;
43
+ process.stderr.write(`import-drawio: ${error.message}\n`);
44
+ return 2;
45
+ }
46
+ }
47
+
48
+ if (process.argv[1] && resolve(fileURLToPath(import.meta.url)) === resolve(process.argv[1])) process.exitCode = main(process.argv.slice(2));
@@ -0,0 +1,234 @@
1
+ #!/usr/bin/env node
2
+ import { basename, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { cleanLabel, ImportFailure, readBoundedFile, reject, safeId, sha256, strictUtf8 } from './import-common.mjs';
5
+
6
+ const MAX_INPUT = 16 * 1024 * 1024;
7
+ const MAX_ELEMENTS = 10_000;
8
+ const MAX_NODES = 2_000;
9
+ const MAX_RELATIONSHIPS = 5_000;
10
+ const MAX_DEPTH = 64;
11
+ const NODE_SHAPES = new Map([
12
+ ['rectangle', 'rectangle'], ['ellipse', 'ellipse'], ['diamond', 'diamond'],
13
+ ['image', 'image'], ['embeddable', 'embed'], ['iframe', 'embed'],
14
+ ]);
15
+ const EDGE_TYPES = new Set(['arrow', 'line']);
16
+ const CONTAINER_TYPES = new Set(['frame', 'magicframe']);
17
+ const URL_RE = /\b(?:https?|ftp|file|javascript|data):[^\s<>"']+/giu;
18
+ const EXEC_RE = /<\s*(?:script|iframe|object|embed)\b|\bon[a-z]+\s*=/isu;
19
+
20
+ function checkJsonDepth(text) {
21
+ let depth = 0;
22
+ let quoted = false;
23
+ let escaped = false;
24
+ for (const char of text) {
25
+ if (quoted) {
26
+ if (escaped) escaped = false;
27
+ else if (char === '\\') escaped = true;
28
+ else if (char === '"') quoted = false;
29
+ } else if (char === '"') quoted = true;
30
+ else if (char === '[' || char === '{') {
31
+ depth += 1;
32
+ if (depth > MAX_DEPTH) reject('scene nesting exceeds the depth limit (64)');
33
+ } else if (char === ']' || char === '}') depth -= 1;
34
+ }
35
+ }
36
+
37
+ function finiteGeometry(element) {
38
+ for (const key of ['x', 'y', 'width', 'height']) {
39
+ const value = element[key];
40
+ if (value === undefined || value === null) continue;
41
+ if (typeof value !== 'number' || !Number.isFinite(value)) reject(`element geometry field ${key} must be numeric`);
42
+ if (Math.abs(value) > 10_000_000) reject(`element geometry field ${key} is outside the supported range`);
43
+ }
44
+ }
45
+
46
+ export function extractExcalidraw(file) {
47
+ const name = basename(file).toLowerCase();
48
+ if (!(name.endsWith('.excalidraw') || name.endsWith('.excalidraw.json'))) {
49
+ reject('unsupported form; provide a saved .excalidraw scene');
50
+ }
51
+ const data = readBoundedFile(file, MAX_INPUT, 'input');
52
+ const text = strictUtf8(data, 'scene is not valid UTF-8 JSON');
53
+ checkJsonDepth(text);
54
+ let document;
55
+ try {
56
+ document = JSON.parse(text);
57
+ } catch {
58
+ reject('scene is malformed JSON');
59
+ }
60
+ if (!document || Array.isArray(document) || typeof document !== 'object' || document.type !== 'excalidraw') {
61
+ reject('input is not an Excalidraw scene');
62
+ }
63
+ if (!Array.isArray(document.elements)) reject('scene has no elements array');
64
+ if (document.elements.length > MAX_ELEMENTS) reject('element limit exceeded (max 10,000)');
65
+
66
+ const discarded = {
67
+ styles: 0, links: 0, urls: 0, scripts: 0, assets: 0, unsupportedElements: 0,
68
+ deletedElements: 0, freehandStrokes: 0, danglingRelationships: 0,
69
+ };
70
+ const live = [];
71
+ const used = new Set();
72
+ const idMap = new Map();
73
+ for (const item of document.elements) {
74
+ if (!item || Array.isArray(item) || typeof item !== 'object') reject('scene element must be an object');
75
+ if (typeof item.id !== 'string' || typeof item.type !== 'string') reject('scene elements require string id and type fields');
76
+ if (idMap.has(item.id)) reject('scene contains duplicate element ids');
77
+ idMap.set(item.id, safeId(item.id, used, 'scene'));
78
+ finiteGeometry(item);
79
+ if (item.isDeleted === true) {
80
+ discarded.deletedElements += 1;
81
+ continue;
82
+ }
83
+ live.push(item);
84
+ }
85
+
86
+ const frameIds = new Set(live.filter((item) => CONTAINER_TYPES.has(item.type)).map((item) => item.id));
87
+ const labels = new Map();
88
+ for (const item of live) {
89
+ if (item.type !== 'text') continue;
90
+ if (item.text !== undefined && typeof item.text !== 'string') reject('text element content must be a string');
91
+ const normalized = cleanLabel(item.text ?? '', { removeControls: true });
92
+ discarded.urls += normalized.urls;
93
+ if (typeof item.containerId === 'string' && idMap.has(item.containerId) && normalized.text) {
94
+ const current = labels.get(item.containerId) ?? [];
95
+ current.push(normalized.text);
96
+ labels.set(item.containerId, current);
97
+ }
98
+ }
99
+
100
+ const nodes = [];
101
+ const nodeSourceIds = new Set();
102
+ for (const item of live) {
103
+ const sourceId = item.id;
104
+ const type = item.type;
105
+ if (EDGE_TYPES.has(type) || (type === 'text' && typeof item.containerId === 'string')) continue;
106
+ if (type === 'selection' || type === 'laser') continue;
107
+ if (type === 'freedraw') {
108
+ discarded.freehandStrokes += 1;
109
+ continue;
110
+ }
111
+
112
+ let shape;
113
+ let kind;
114
+ let rawLabel;
115
+ if (CONTAINER_TYPES.has(type)) {
116
+ shape = 'container';
117
+ kind = 'container';
118
+ rawLabel = typeof item.name === 'string' ? item.name : '';
119
+ } else if (type === 'text') {
120
+ shape = 'text';
121
+ kind = 'annotation';
122
+ rawLabel = typeof item.text === 'string' ? item.text : '';
123
+ } else if (NODE_SHAPES.has(type)) {
124
+ shape = NODE_SHAPES.get(type);
125
+ kind = 'component';
126
+ rawLabel = '';
127
+ if (type === 'image' || type === 'embeddable' || type === 'iframe') discarded.assets += 1;
128
+ } else {
129
+ discarded.unsupportedElements += 1;
130
+ continue;
131
+ }
132
+ const normalized = cleanLabel(rawLabel, { removeControls: true });
133
+ discarded.urls += normalized.urls;
134
+ let label = normalized.text;
135
+ const boundLabels = labels.get(sourceId) ?? [];
136
+ if (boundLabels.length) label = boundLabels.join('\n').slice(0, 2_000);
137
+ if (typeof item.link === 'string' && item.link) {
138
+ discarded.links += 1;
139
+ if (URL_RE.test(item.link)) discarded.urls += 1;
140
+ URL_RE.lastIndex = 0;
141
+ }
142
+ if (nodes.length >= MAX_NODES) reject('node limit exceeded (max 2,000)');
143
+ const node = { id: idMap.get(sourceId), label, kind, shape };
144
+ if (typeof item.frameId === 'string' && frameIds.has(item.frameId)) node.parentId = idMap.get(item.frameId);
145
+ nodes.push(node);
146
+ nodeSourceIds.add(sourceId);
147
+ }
148
+
149
+ const relationships = [];
150
+ for (const item of live) {
151
+ if (!EDGE_TYPES.has(item.type)) continue;
152
+ const startId = item.startBinding?.elementId;
153
+ const endId = item.endBinding?.elementId;
154
+ if (typeof startId !== 'string' || typeof endId !== 'string' || !nodeSourceIds.has(startId) || !nodeSourceIds.has(endId)) {
155
+ discarded.danglingRelationships += 1;
156
+ continue;
157
+ }
158
+ const normalized = cleanLabel((labels.get(item.id) ?? []).join('\n'), { removeControls: true });
159
+ discarded.urls += normalized.urls;
160
+ const startHead = typeof item.startArrowhead === 'string' && !['', 'none'].includes(item.startArrowhead);
161
+ const endHead = typeof item.endArrowhead === 'string' && !['', 'none'].includes(item.endArrowhead);
162
+ const direction = startHead && endHead ? 'both' : startHead ? 'reverse' : endHead || item.type === 'arrow' ? 'forward' : 'none';
163
+ relationships.push({
164
+ from: idMap.get(startId), to: idMap.get(endId), label: normalized.text,
165
+ kind: item.type === 'arrow' ? 'flow' : 'association', direction,
166
+ });
167
+ if (relationships.length > MAX_RELATIONSHIPS) reject('relationship limit exceeded (max 5,000)');
168
+ }
169
+
170
+ const groups = [];
171
+ for (const frameId of [...frameIds].sort()) {
172
+ const members = live
173
+ .filter((item) => item.frameId === frameId && typeof item.id === 'string' && nodeSourceIds.has(item.id))
174
+ .map((item) => idMap.get(item.id));
175
+ if (members.length) {
176
+ const frameLabel = nodes.find((node) => node.id === idMap.get(frameId))?.label || 'Frame';
177
+ groups.push({ id: idMap.get(frameId), label: frameLabel, nodeIds: members });
178
+ }
179
+ }
180
+ const sourceGroups = new Map();
181
+ for (const item of live) {
182
+ if (typeof item.id !== 'string' || !nodeSourceIds.has(item.id) || !Array.isArray(item.groupIds)) continue;
183
+ for (const groupId of item.groupIds.slice(0, 64)) {
184
+ if (typeof groupId !== 'string') continue;
185
+ if (!sourceGroups.has(groupId) && sourceGroups.size >= MAX_NODES) reject('group limit exceeded (max 2,000)');
186
+ const members = sourceGroups.get(groupId) ?? [];
187
+ members.push(item.id);
188
+ sourceGroups.set(groupId, members);
189
+ }
190
+ }
191
+ for (const [groupId, members] of sourceGroups) {
192
+ const safeGroupId = `g-${sha256(groupId).slice(7, 23)}`;
193
+ if (used.has(safeGroupId)) reject('group id collides with an element id');
194
+ used.add(safeGroupId);
195
+ groups.push({ id: safeGroupId, label: 'Group', nodeIds: members.map((id) => idMap.get(id)) });
196
+ }
197
+
198
+ if (!nodes.length) reject('scene contains no supported diagram elements');
199
+ discarded.styles = live.filter((item) => ['backgroundColor', 'strokeColor', 'strokeStyle', 'roughness'].some((key) => key in item)).length;
200
+ if (document.files && typeof document.files === 'object' && !Array.isArray(document.files)) {
201
+ discarded.assets += Object.keys(document.files).length;
202
+ }
203
+ const title = basename(file).replace(/\.excalidraw(?:\.json)?$/iu, '') || 'Imported diagram';
204
+ return {
205
+ schemaVersion: 1,
206
+ sourceFormat: 'excalidraw',
207
+ sourceDigest: sha256(data),
208
+ title,
209
+ suggestedType: relationships.length ? 'flowchart' : 'architecture',
210
+ nodes,
211
+ relationships,
212
+ groups,
213
+ discarded,
214
+ warnings: ['Source coordinates and styling are omitted; label text is inert data.'],
215
+ };
216
+ }
217
+
218
+ function main(argv) {
219
+ const [file, ...rest] = argv;
220
+ if (!file || rest.length) {
221
+ process.stderr.write('Usage: node scripts/import-excalidraw.mjs <file.excalidraw>\n');
222
+ return 2;
223
+ }
224
+ try {
225
+ process.stdout.write(`${JSON.stringify(extractExcalidraw(file), null, 2)}\n`);
226
+ return 0;
227
+ } catch (error) {
228
+ if (!(error instanceof ImportFailure)) throw error;
229
+ process.stderr.write(`import-excalidraw: ${error.message}\n`);
230
+ return 2;
231
+ }
232
+ }
233
+
234
+ if (process.argv[1] && resolve(fileURLToPath(import.meta.url)) === resolve(process.argv[1])) process.exitCode = main(process.argv.slice(2));