@litfamily/litcodex 1.0.6 → 1.0.7
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.
- package/README.md +327 -23
- package/dist/cli.js +42 -0
- package/dist/config-migration/config-paths.js +9 -2
- package/dist/install/execute.d.ts +2 -0
- package/dist/install/execute.js +8 -3
- package/dist/install/generated-skill-payload-hashes.d.ts +617 -21
- package/dist/install/generated-skill-payload-hashes.js +617 -21
- package/dist/install/index.js +13 -2
- package/dist/install/marketplace-payload.d.ts +1 -0
- package/dist/install/marketplace-payload.js +73 -2
- package/dist/install/motion-runtime.d.ts +36 -0
- package/dist/install/motion-runtime.js +82 -0
- package/dist/install/office-runtime.d.ts +20 -0
- package/dist/install/office-runtime.js +37 -0
- package/dist/install/skill-catalog.d.ts +1 -1
- package/dist/install/skill-catalog.js +26 -2
- package/dist/install/skill-resource-hashes.d.ts +1 -1
- package/dist/install/skill-resource-hashes.js +1 -1
- package/dist/postinstall.js +14 -2
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directive.md +90 -5
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-comprehend.md +13 -17
- package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.d.ts +18 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +95 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.d.ts +3 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.js +10 -5
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/bundled-rules/lit-humanizer.md +12 -0
- package/marketplace/plugins/litcodex/components/rules/dist/cli.js +22 -10
- package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.d.ts +23 -34
- package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.js +420 -388
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/hooks/hooks.json +32 -21
- package/marketplace/plugins/litcodex/skills/autoconference/assets/report_template.md +1 -1
- package/marketplace/plugins/litcodex/skills/browser-drive/SKILL.md +4 -0
- package/marketplace/plugins/litcodex/skills/browser-drive/scripts/capability-probe.mjs +25 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +14 -15
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/THIRD-PARTY-NOTICE.txt +7 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/examples/readme-ab/README.md +13 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/adaptive-layout.md +12 -83
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +17 -65
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +44 -13
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/composition.md +14 -80
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +103 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/creative-directions.md +13 -82
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/evidence-review.md +14 -112
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/implementation-platforms.md +16 -68
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/inclusive-interface.md +12 -86
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/interaction-motion.md +13 -82
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +123 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/operating-lanes.md +12 -100
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/performance-delivery.md +12 -78
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +41 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/product-direction.md +10 -88
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +10 -12
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/redesign-playbook.md +12 -74
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +98 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/system-foundations.md +13 -100
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-language.md +11 -74
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-reconstruction.md +9 -78
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/hover-probe.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +423 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +261 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/route-mode.mjs +19 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/serve-static.mjs +24 -0
- package/marketplace/plugins/litcodex/skills/lit-comprehend/SKILL.md +45 -53
- package/marketplace/plugins/litcodex/skills/lit-comprehend/references/artifact-template.md +10 -44
- package/marketplace/plugins/litcodex/skills/lit-comprehend/scripts/verify-explainer.ts +0 -18
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/NOTICE +33 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +167 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/icons.html +231 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/index.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/accessibility.md +37 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/export.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-schema.md +28 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/motion.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/output-spec.md +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/profiles.md +24 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +67 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bar.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bump.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-er.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-journey.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-layers.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-line.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-nested.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-polar.md +67 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-process.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-radar.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-venn.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +14 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +219 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/doctor.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-model.mjs +162 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-source.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-xml.mjs +148 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/export.mjs +122 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-common.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-drawio.mjs +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-excalidraw.mjs +234 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-mermaid.mjs +104 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-common.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-er.mjs +70 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-flowchart.mjs +178 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-sequence.mjs +137 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-state.mjs +80 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/runtime-probes.mjs +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-all.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-brief.mjs +16 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality-geometry.mjs +226 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/LICENSE +21 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/NOTICE +3 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/agents/openai.yaml +14 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/frontmatter_schema.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/journal_style_spec.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/markdown_quality_checklist.md +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_rules.md +35 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.in +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.lock +20 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/clean_markdown.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_docx.py +1046 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_pdf.py +281 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_pdf.py +130 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/docx_craft.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/edit_docx.py +297 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/embed_images.py +78 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/generate_docx_templates.py +491 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/slop_lint.py +473 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/visual_audit.py +41 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/acs.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/elsevier.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/ieee.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/nature.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/template.tex +38 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/registry.yaml +1366 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/NOTICE +160 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/SKILL.md +146 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/always-on-rule.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/bench/prompts.md +73 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/after.md +13 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/motion-guide.md +123 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/rules.json +884 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/core.mjs +208 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/detect.mjs +83 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
- package/marketplace/plugins/litcodex/skills/lit-init/references/deep-repository-map.md +6 -10
- package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +95 -12
- package/marketplace/plugins/litcodex/skills/lit-loop/agents/openai.yaml +3 -2
- package/marketplace/plugins/litcodex/skills/lit-loop/references/full-workflow.md +10 -3
- package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +7 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/analyst.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/antithesis.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/architect.md +44 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/critic.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/openai.yaml +14 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/synthesizer.md +47 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/thesis.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-md.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Black.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Bold.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Light.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Medium.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Regular.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/OFL.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/SOURCE.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/LICENSE.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Bold.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Regular.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +71 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +141 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/consensus-protocol.md +125 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/data-display-cookbook.md +45 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/design-system-azure.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/interview-protocol.md +113 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package-lock.json +747 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package.json +13 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.in +2 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.lock +14 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/check_ooxml.py +40 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +399 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +246 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +201 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/inventory.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/learn_template.py +433 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/font-map.js +79 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-bg.js +85 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +36 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +734 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/markdown-loader.js +136 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-html.js +358 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +1885 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-ast.js +517 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +355 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +137 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/package.json +1 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +795 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/validate_pptx.py +206 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v1.md +251 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v2.md +207 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/template-enrollment-contract.md +379 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/bauhaus_light.css +4 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/boilerplate_professional.css +508 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +37 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +464 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +37 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +2 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +73 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/agents/openai.yaml +15 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/NOTICE +23 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +32 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/browser-app.js +735 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/completion.mjs +9 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/compose.mjs +255 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +264 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +169 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/encode.mjs +163 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/flash.mjs +251 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/fonts.mjs +169 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gate.mjs +466 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +267 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +182 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/passes.mjs +181 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/presets.mjs +110 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/report.mjs +56 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +287 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scenes.mjs +309 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +463 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +155 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-init.js +215 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +515 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +147 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +243 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +335 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +26 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +311 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stroke.mjs +264 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/timeline.mjs +153 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +280 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/type.mjs +234 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/util.mjs +198 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/SHA256SUMS +16 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/CREDITS +6 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/OFL.txt +86 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +137 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +68 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/scene-author.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +175 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +103 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +119 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/type-and-timing.md +83 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package-lock.json +59 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package.json +1 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/requirements-audio.txt +1082 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/word-timing-models.json +11 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/beat-grid.py +50 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +807 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/runtime.mjs +43 -0
- package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +28 -41
- package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +8 -0
- package/marketplace/plugins/litcodex/skills/litwork/references/delivery-playbook.md +6 -0
- package/node_modules/@litcodex/lit-loop/directive.md +90 -5
- package/node_modules/@litcodex/lit-loop/directives/lit-comprehend.md +13 -17
- package/node_modules/@litcodex/lit-loop/directives/litwork.md +8 -0
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -1
- package/node_modules/@litcodex/lit-loop/dist/motion-route.d.ts +18 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-route.js +95 -0
- package/node_modules/@litcodex/lit-loop/dist/skill-renames.d.ts +3 -1
- package/node_modules/@litcodex/lit-loop/dist/skill-renames.js +10 -5
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/browser-drive/SKILL.md +4 -0
- package/node_modules/@litcodex/lit-loop/skills/browser-drive/scripts/capability-probe.mjs +25 -2
- package/node_modules/@litcodex/lit-loop/skills/lit-comprehend/SKILL.md +45 -53
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/NOTICE +160 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/SKILL.md +146 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/always-on-rule.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/bench/prompts.md +73 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/after.md +13 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/motion-guide.md +123 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/rules.json +884 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/core.mjs +208 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/detect.mjs +83 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-init/references/deep-repository-map.md +6 -10
- package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +95 -12
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +2 -0
- package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +28 -41
- package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +8 -0
- package/package.json +3 -3
- package/readme-assets/ab-simple/assets/s11-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s7-lit-diagram.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s9-lit-pages.webp +0 -0
- package/readme-assets/badge-version.svg +1 -1
- package/readme-assets/cover-motion-still.webp +0 -0
- package/readme-assets/cover-motion.webp +0 -0
- package/readme-assets/skills/autoconference.webp +0 -0
- package/readme-assets/skills/automatic-checks.webp +0 -0
- package/readme-assets/skills/autoresearch.webp +0 -0
- package/readme-assets/skills/browser-drive.webp +0 -0
- package/readme-assets/skills/coding-session-audit.webp +0 -0
- package/readme-assets/skills/debugging.webp +0 -0
- package/readme-assets/skills/deep-interview.webp +0 -0
- package/readme-assets/skills/frontend-ui-ux.webp +0 -0
- package/readme-assets/skills/lit-burnoff-file.webp +0 -0
- package/readme-assets/skills/lit-burnoff.webp +0 -0
- package/readme-assets/skills/lit-code.webp +0 -0
- package/readme-assets/skills/lit-commit.webp +0 -0
- package/readme-assets/skills/lit-comprehend.webp +0 -0
- package/readme-assets/skills/lit-crucible.webp +0 -0
- package/readme-assets/skills/lit-diagram-drawer.webp +0 -0
- package/readme-assets/skills/lit-docx.webp +0 -0
- package/readme-assets/skills/lit-fetch.webp +0 -0
- package/readme-assets/skills/lit-handoff.webp +0 -0
- package/readme-assets/skills/lit-humanizer.webp +0 -0
- package/readme-assets/skills/lit-init.webp +0 -0
- package/readme-assets/skills/lit-loop.webp +0 -0
- package/readme-assets/skills/lit-plan.webp +0 -0
- package/readme-assets/skills/lit-pptx.webp +0 -0
- package/readme-assets/skills/lit-recap.webp +0 -0
- package/readme-assets/skills/lit-scientific-visualization.webp +0 -0
- package/readme-assets/skills/lit-team.webp +0 -0
- package/readme-assets/skills/lit-typographic-motion.webp +0 -0
- package/readme-assets/skills/litcodex-contribute-bug-fix.webp +0 -0
- package/readme-assets/skills/litcodex-doctor.webp +0 -0
- package/readme-assets/skills/litcodex-report-bug.webp +0 -0
- package/readme-assets/skills/litgoal.webp +0 -0
- package/readme-assets/skills/litresearch.webp +0 -0
- package/readme-assets/skills/litwork.webp +0 -0
- package/readme-assets/skills/lsp-setup.webp +0 -0
- package/readme-assets/skills/readme-studio.webp +0 -0
- package/readme-assets/skills/refactor.webp +0 -0
- package/readme-assets/skills/review-work.webp +0 -0
- package/readme-assets/skills/start-approved-plan.webp +0 -0
- package/readme-assets/skills/structural-search.webp +0 -0
- package/readme-assets/skills/visual-qa.webp +0 -0
- package/readme-assets/skills/wikify.webp +0 -0
- package/marketplace/plugins/litcodex/skills/lit-korean/SKILL.md +0 -206
- package/marketplace/plugins/litcodex/skills/lit-korean/references/prompt-injection-handling.md +0 -23
- package/marketplace/plugins/litcodex/skills/lit-korean/references/quick-rules.md +0 -38
- package/marketplace/plugins/litcodex/skills/lit-korean/references/safety-checklist.md +0 -38
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/SKILL.md +0 -206
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/prompt-injection-handling.md +0 -23
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/quick-rules.md +0 -38
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/safety-checklist.md +0 -38
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { extname, resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { ImportFailure, readBoundedFile, reject, sha256, strictUtf8 } from './import-common.mjs';
|
|
5
|
+
import { MAX_DIAGRAMS, MAX_SOURCE_CHARS } from './mermaid-common.mjs';
|
|
6
|
+
import { parseFlowchart } from './mermaid-flowchart.mjs';
|
|
7
|
+
import { parseSequence } from './mermaid-sequence.mjs';
|
|
8
|
+
import { parseStateDiagram } from './mermaid-state.mjs';
|
|
9
|
+
import { parseErDiagram } from './mermaid-er.mjs';
|
|
10
|
+
|
|
11
|
+
const SUPPORTED_EXTENSIONS = new Set(['.mmd', '.mermaid', '.md', '.markdown']);
|
|
12
|
+
|
|
13
|
+
function markdownBlocks(source) {
|
|
14
|
+
const blocks = [];
|
|
15
|
+
let fence;
|
|
16
|
+
let body = [];
|
|
17
|
+
let mermaid = false;
|
|
18
|
+
for (const line of source.replace(/\r\n?/gu, '\n').split('\n')) {
|
|
19
|
+
if (fence) {
|
|
20
|
+
const closing = new RegExp(`^ {0,3}${fence.char}{${fence.length},}\\s*$`, 'u');
|
|
21
|
+
if (closing.test(line)) {
|
|
22
|
+
if (mermaid) blocks.push(body.join('\n'));
|
|
23
|
+
fence = undefined;
|
|
24
|
+
body = [];
|
|
25
|
+
mermaid = false;
|
|
26
|
+
} else if (mermaid) body.push(line);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const opening = /^ {0,3}(`{3,}|~{3,})(.*)$/u.exec(line);
|
|
30
|
+
if (!opening) continue;
|
|
31
|
+
const info = opening[2].trim().split(/\s+/u)[0]?.toLowerCase() ?? '';
|
|
32
|
+
fence = { char: opening[1][0], length: opening[1].length };
|
|
33
|
+
mermaid = info === 'mermaid';
|
|
34
|
+
body = [];
|
|
35
|
+
}
|
|
36
|
+
if (fence && mermaid) reject('Markdown Mermaid fence is missing a closing fence');
|
|
37
|
+
return blocks;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function parseDiagram(source, index) {
|
|
41
|
+
const header = source.split(/\r?\n/u).find((line) => line.trim() && !line.trim().startsWith('%%'))?.trim() ?? '';
|
|
42
|
+
if (/^(?:flowchart|graph)\b/iu.test(header)) return parseFlowchart(source, index);
|
|
43
|
+
if (/^sequenceDiagram\b/iu.test(header)) return parseSequence(source, index);
|
|
44
|
+
if (/^stateDiagram-v2\b/iu.test(header)) return parseStateDiagram(source, index);
|
|
45
|
+
if (/^erDiagram\b/iu.test(header)) return parseErDiagram(source, index);
|
|
46
|
+
reject(`unsupported Mermaid grammar: ${header || '(empty)'}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function extractMermaid(file, diagramIndex) {
|
|
50
|
+
if (!SUPPORTED_EXTENSIONS.has(extname(file).toLowerCase())) reject('unsupported form; provide .mmd, .mermaid, or Markdown with Mermaid fences');
|
|
51
|
+
const bytes = readBoundedFile(file, MAX_SOURCE_CHARS, 'Mermaid input');
|
|
52
|
+
const source = strictUtf8(bytes, 'Mermaid input is not valid UTF-8');
|
|
53
|
+
if (!source.trim()) reject('Mermaid input is empty');
|
|
54
|
+
const blocks = ['.md', '.markdown'].includes(extname(file).toLowerCase()) ? markdownBlocks(source) : [source];
|
|
55
|
+
if (!blocks.length) reject('Markdown contains no Mermaid fenced blocks');
|
|
56
|
+
if (blocks.length > MAX_DIAGRAMS) reject('Mermaid block limit exceeded (max 100)');
|
|
57
|
+
if (diagramIndex !== undefined && (!Number.isInteger(diagramIndex) || diagramIndex < 0 || diagramIndex >= blocks.length)) {
|
|
58
|
+
reject(`diagram index must be between 0 and ${blocks.length - 1}`);
|
|
59
|
+
}
|
|
60
|
+
const selected = diagramIndex === undefined ? blocks.map((block, index) => ({ block, index })) : [{ block: blocks[diagramIndex], index: diagramIndex }];
|
|
61
|
+
const diagrams = selected.map(({ block, index }) => parseDiagram(block, index));
|
|
62
|
+
return {
|
|
63
|
+
schemaVersion: 1,
|
|
64
|
+
sourceFormat: 'mermaid',
|
|
65
|
+
sourceDigest: sha256(bytes),
|
|
66
|
+
title: diagrams[0].title || `Mermaid ${diagrams[0].grammar} diagram`,
|
|
67
|
+
suggestedType: diagrams[0].suggestedType,
|
|
68
|
+
diagramCount: blocks.length,
|
|
69
|
+
diagrams,
|
|
70
|
+
warnings: ['Source layout, themes, and renderer positions are omitted; source text is inert data.'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function parseArgs(argv) {
|
|
75
|
+
const [file, ...rest] = argv;
|
|
76
|
+
if (!file) return { error: 'Usage: node scripts/import-mermaid.mjs <file.mmd|file.md> [--diagram <index>]' };
|
|
77
|
+
let diagramIndex;
|
|
78
|
+
for (let index = 0; index < rest.length; index += 1) {
|
|
79
|
+
if (rest[index] !== '--diagram' || diagramIndex !== undefined || !/^\d+$/u.test(rest[index + 1] ?? '')) {
|
|
80
|
+
return { error: 'Usage: node scripts/import-mermaid.mjs <file.mmd|file.md> [--diagram <index>]' };
|
|
81
|
+
}
|
|
82
|
+
diagramIndex = Number(rest[index + 1]);
|
|
83
|
+
index += 1;
|
|
84
|
+
}
|
|
85
|
+
return { file, diagramIndex };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function main(argv) {
|
|
89
|
+
const options = parseArgs(argv);
|
|
90
|
+
if ('error' in options) {
|
|
91
|
+
process.stderr.write(`${options.error}\n`);
|
|
92
|
+
return 2;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
process.stdout.write(`${JSON.stringify(extractMermaid(options.file, options.diagramIndex), null, 2)}\n`);
|
|
96
|
+
return 0;
|
|
97
|
+
} catch (error) {
|
|
98
|
+
if (!(error instanceof ImportFailure)) throw error;
|
|
99
|
+
process.stderr.write(`import-mermaid: ${error.message}\n`);
|
|
100
|
+
return 2;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (process.argv[1] && resolve(fileURLToPath(import.meta.url)) === resolve(process.argv[1])) process.exitCode = main(process.argv.slice(2));
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { cleanLabel, reject, safeId } from './import-common.mjs';
|
|
2
|
+
|
|
3
|
+
export const MAX_SOURCE_CHARS = 2 * 1024 * 1024;
|
|
4
|
+
export const MAX_DIAGRAMS = 100;
|
|
5
|
+
export const MAX_NODES = 2_000;
|
|
6
|
+
export const MAX_RELATIONSHIPS = 5_000;
|
|
7
|
+
|
|
8
|
+
export function normalizeLabel(value) {
|
|
9
|
+
return cleanLabel(value, { html: true, markdown: true, removeControls: true });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function createDiagram(grammar, index) {
|
|
13
|
+
return {
|
|
14
|
+
grammar,
|
|
15
|
+
index,
|
|
16
|
+
title: '',
|
|
17
|
+
suggestedType: ({ flowchart: 'flowchart', sequence: 'sequence', state: 'state', er: 'er' })[grammar],
|
|
18
|
+
nodes: [],
|
|
19
|
+
relationships: [],
|
|
20
|
+
groups: [],
|
|
21
|
+
discarded: { directives: 0, comments: 0, links: 0, urls: 0, unsupportedStatements: 0 },
|
|
22
|
+
fragments: [],
|
|
23
|
+
activations: [],
|
|
24
|
+
notes: [],
|
|
25
|
+
nodeBySourceId: new Map(),
|
|
26
|
+
usedIds: new Set(),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function addNode(diagram, sourceId, label = '', shape = 'box', kind = 'process', properties = {}) {
|
|
31
|
+
if (!sourceId) reject('Mermaid node identifier is empty');
|
|
32
|
+
const normalized = normalizeLabel(label);
|
|
33
|
+
diagram.discarded.urls += normalized.urls;
|
|
34
|
+
const current = diagram.nodeBySourceId.get(sourceId);
|
|
35
|
+
if (current) {
|
|
36
|
+
if (normalized.text && normalized.text !== sourceId) {
|
|
37
|
+
if (current.label !== sourceId && current.label !== normalized.text) reject(`Mermaid node ${sourceId} has conflicting labels`);
|
|
38
|
+
current.label = normalized.text;
|
|
39
|
+
}
|
|
40
|
+
if (properties.parentId) current.parentId = properties.parentId;
|
|
41
|
+
Object.assign(current, properties);
|
|
42
|
+
return current;
|
|
43
|
+
}
|
|
44
|
+
if (diagram.nodes.length >= MAX_NODES) reject('Mermaid node limit exceeded (max 2,000)');
|
|
45
|
+
const node = {
|
|
46
|
+
id: safeId(sourceId, diagram.usedIds, 'Mermaid diagram'),
|
|
47
|
+
sourceId,
|
|
48
|
+
label: normalized.text || sourceId,
|
|
49
|
+
kind,
|
|
50
|
+
shape,
|
|
51
|
+
...properties,
|
|
52
|
+
};
|
|
53
|
+
diagram.nodes.push(node);
|
|
54
|
+
diagram.nodeBySourceId.set(sourceId, node);
|
|
55
|
+
return node;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function addGroup(diagram, sourceId, label, kind = 'subgraph') {
|
|
59
|
+
const id = safeId(`group-${sourceId}`, diagram.usedIds, 'Mermaid diagram');
|
|
60
|
+
const normalized = normalizeLabel(label || sourceId);
|
|
61
|
+
diagram.discarded.urls += normalized.urls;
|
|
62
|
+
const group = { id, sourceId, label: normalized.text || sourceId, kind, nodeIds: [] };
|
|
63
|
+
diagram.groups.push(group);
|
|
64
|
+
return group;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function addRelationship(diagram, from, to, label = '', kind = 'flow', direction = 'forward', properties = {}) {
|
|
68
|
+
const source = diagram.nodeBySourceId.get(from);
|
|
69
|
+
const target = diagram.nodeBySourceId.get(to);
|
|
70
|
+
if (!source || !target) reject(`Mermaid relationship refers to an unknown node (${from} → ${to})`);
|
|
71
|
+
const normalized = normalizeLabel(label);
|
|
72
|
+
diagram.discarded.urls += normalized.urls;
|
|
73
|
+
if (diagram.relationships.length >= MAX_RELATIONSHIPS) reject('Mermaid relationship limit exceeded (max 5,000)');
|
|
74
|
+
const relationship = { from: source.id, to: target.id, label: normalized.text, kind, direction, ...properties };
|
|
75
|
+
diagram.relationships.push(relationship);
|
|
76
|
+
return relationship;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function finalizeDiagram(diagram) {
|
|
80
|
+
for (const group of diagram.groups) {
|
|
81
|
+
if (group.nodeIds.length === 0) group.nodeIds = diagram.nodes.filter(({ parentId }) => parentId === group.id).map(({ id }) => id);
|
|
82
|
+
group.nodeIds = [...new Set(group.nodeIds)];
|
|
83
|
+
delete group.sourceId;
|
|
84
|
+
}
|
|
85
|
+
if (!diagram.nodes.length) reject(`Mermaid ${diagram.grammar} diagram contains no supported nodes`);
|
|
86
|
+
const { nodeBySourceId, usedIds, index, ...result } = diagram;
|
|
87
|
+
result.nodes = result.nodes.map(({ sourceId, ...node }) => node);
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function parseDelimitedLabel(line, start, opener, closer) {
|
|
92
|
+
if (!line.startsWith(opener, start)) return undefined;
|
|
93
|
+
let depth = 0;
|
|
94
|
+
let quote = '';
|
|
95
|
+
for (let index = start; index < line.length; index += 1) {
|
|
96
|
+
const char = line[index];
|
|
97
|
+
if (quote) {
|
|
98
|
+
if (char === quote && line[index - 1] !== '\\') quote = '';
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (char === '"' || char === "'") {
|
|
102
|
+
quote = char;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (line.startsWith(opener, index)) {
|
|
106
|
+
depth += 1;
|
|
107
|
+
index += opener.length - 1;
|
|
108
|
+
} else if (line.startsWith(closer, index)) {
|
|
109
|
+
depth -= 1;
|
|
110
|
+
if (depth === 0) return { value: line.slice(start + opener.length, index), end: index + closer.length };
|
|
111
|
+
index += closer.length - 1;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
reject('Mermaid node label has an unmatched delimiter');
|
|
115
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { reject } from './import-common.mjs';
|
|
2
|
+
import { addNode, addRelationship, createDiagram, finalizeDiagram, normalizeLabel } from './mermaid-common.mjs';
|
|
3
|
+
|
|
4
|
+
function entity(diagram, id) {
|
|
5
|
+
const current = diagram.nodeBySourceId.get(id);
|
|
6
|
+
if (current) {
|
|
7
|
+
current.kind = 'entity';
|
|
8
|
+
current.shape = 'entity';
|
|
9
|
+
current.fields ??= [];
|
|
10
|
+
return current;
|
|
11
|
+
}
|
|
12
|
+
return addNode(diagram, id, id, 'entity', 'entity', { fields: [] });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function relation(line, diagram) {
|
|
16
|
+
const match = /^([A-Za-z0-9_][A-Za-z0-9_-]*)\s+([|o{}]+--[|o{}]+)\s+([A-Za-z0-9_][A-Za-z0-9_-]*)\s*:\s*(.+)$/u.exec(line);
|
|
17
|
+
if (!match) return false;
|
|
18
|
+
const [, fromId, cardinality, toId, label] = match;
|
|
19
|
+
entity(diagram, fromId);
|
|
20
|
+
entity(diagram, toId);
|
|
21
|
+
const [left, right] = cardinality.split('--');
|
|
22
|
+
addRelationship(diagram, fromId, toId, label, 'association', 'none', { cardinality: { left, right, source: cardinality } });
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function addField(line, current, diagram) {
|
|
27
|
+
const match = /^([^\s]+)\s+([A-Za-z0-9_][A-Za-z0-9_-]*)(?:\s+(PK|FK|UK))?(?:\s+"([^"]*)")?\s*$/iu.exec(line);
|
|
28
|
+
if (!match) reject(`unsupported Mermaid ER field: ${line.slice(0, 80)}`);
|
|
29
|
+
const [, type, name, key, comment = ''] = match;
|
|
30
|
+
if (current.fields.some((field) => field.name === name)) reject(`Mermaid ER entity has duplicate field ${name}`);
|
|
31
|
+
const normalized = normalizeLabel(comment);
|
|
32
|
+
diagram.discarded.urls += normalized.urls;
|
|
33
|
+
current.fields.push({ type, name, key: key?.toUpperCase() ?? '', comment: normalized.text });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function parseErDiagram(source, index = 0) {
|
|
37
|
+
const lines = source.replace(/\r\n?/gu, '\n').split('\n');
|
|
38
|
+
const headerIndex = lines.findIndex((line) => line.trim() && !line.trim().startsWith('%%'));
|
|
39
|
+
if (headerIndex < 0 || !/^erDiagram\s*$/iu.test(lines[headerIndex].trim())) reject('Mermaid ER diagram must start with erDiagram');
|
|
40
|
+
const diagram = createDiagram('er', index);
|
|
41
|
+
let current;
|
|
42
|
+
for (let row = headerIndex + 1; row < lines.length; row += 1) {
|
|
43
|
+
const line = lines[row].trim();
|
|
44
|
+
if (!line) continue;
|
|
45
|
+
if (line.startsWith('%%')) {
|
|
46
|
+
diagram.discarded.comments += 1;
|
|
47
|
+
if (line.startsWith('%%{')) diagram.discarded.directives += 1;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (line === '}') {
|
|
51
|
+
if (!current) reject('Mermaid ER entity has an unmatched closing brace');
|
|
52
|
+
current = undefined;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const start = /^([A-Za-z0-9_][A-Za-z0-9_-]*)\s*\{\s*$/u.exec(line);
|
|
56
|
+
if (start) {
|
|
57
|
+
if (current) reject('Mermaid ER entities cannot be nested');
|
|
58
|
+
current = entity(diagram, start[1]);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (current) {
|
|
62
|
+
addField(line, current, diagram);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (relation(line, diagram)) continue;
|
|
66
|
+
reject(`unsupported Mermaid ER statement: ${line.slice(0, 80)}`);
|
|
67
|
+
}
|
|
68
|
+
if (current) reject('Mermaid ER entity is missing a closing brace');
|
|
69
|
+
return finalizeDiagram(diagram);
|
|
70
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { reject } from './import-common.mjs';
|
|
2
|
+
import { addGroup, addNode, addRelationship, createDiagram, finalizeDiagram, MAX_NODES, normalizeLabel, parseDelimitedLabel } from './mermaid-common.mjs';
|
|
3
|
+
|
|
4
|
+
const OPERATORS = ['<-->', '<-.->', '<--', '<==', '==>', '-->', '-.->', '---', '--o', '--x', 'o-->', 'x-->', '==', '--'];
|
|
5
|
+
|
|
6
|
+
function skipSpace(line, index) {
|
|
7
|
+
while (/\s/u.test(line[index] ?? '')) index += 1;
|
|
8
|
+
return index;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function readNode(line, start) {
|
|
12
|
+
let index = skipSpace(line, start);
|
|
13
|
+
if (!/[A-Za-z0-9_]/u.test(line[index] ?? '')) return undefined;
|
|
14
|
+
const idStart = index;
|
|
15
|
+
index += 1;
|
|
16
|
+
while (/[A-Za-z0-9_-]/u.test(line[index] ?? '')) {
|
|
17
|
+
if (line[index] === '-' && OPERATORS.some((operator) => line.startsWith(operator, index))) break;
|
|
18
|
+
index += 1;
|
|
19
|
+
}
|
|
20
|
+
const id = line.slice(idStart, index);
|
|
21
|
+
index = skipSpace(line, index);
|
|
22
|
+
const shapes = [
|
|
23
|
+
{ opener: '[(', closer: ')]', shape: 'cylinder' },
|
|
24
|
+
{ opener: '[[', closer: ']]', shape: 'subroutine' },
|
|
25
|
+
{ opener: '((', closer: '))', shape: 'circle' },
|
|
26
|
+
{ opener: '{{', closer: '}}', shape: 'hexagon' },
|
|
27
|
+
{ opener: '([', closer: '])', shape: 'stadium' },
|
|
28
|
+
{ opener: '[', closer: ']', shape: 'box' },
|
|
29
|
+
{ opener: '(', closer: ')', shape: 'rounded' },
|
|
30
|
+
{ opener: '{', closer: '}', shape: 'diamond' },
|
|
31
|
+
];
|
|
32
|
+
const delimiter = shapes.find(({ opener }) => line.startsWith(opener, index));
|
|
33
|
+
if (!delimiter) return { id, label: '', shape: 'box', end: index };
|
|
34
|
+
const content = parseDelimitedLabel(line, index, delimiter.opener, delimiter.closer);
|
|
35
|
+
if (!content) return undefined;
|
|
36
|
+
let label = content.value.trim();
|
|
37
|
+
if ((label.startsWith('"') && label.endsWith('"')) || (label.startsWith("'") && label.endsWith("'"))) label = label.slice(1, -1);
|
|
38
|
+
return { id, label, shape: delimiter.shape, end: content.end };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function readOperator(line, start) {
|
|
42
|
+
const index = skipSpace(line, start);
|
|
43
|
+
for (const operator of OPERATORS) if (line.startsWith(operator, index)) return { operator, end: index + operator.length };
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function readEdge(line, start) {
|
|
48
|
+
const parsed = readOperator(line, start);
|
|
49
|
+
if (!parsed) return undefined;
|
|
50
|
+
let index = parsed.end;
|
|
51
|
+
let operator = parsed.operator;
|
|
52
|
+
let label = '';
|
|
53
|
+
if (line[index] === '|') {
|
|
54
|
+
const end = line.indexOf('|', index + 1);
|
|
55
|
+
if (end < 0) reject('Mermaid edge label has an unmatched pipe');
|
|
56
|
+
label = line.slice(index + 1, end);
|
|
57
|
+
index = end + 1;
|
|
58
|
+
} else if (parsed.operator === '--') {
|
|
59
|
+
const labeled = /^\s+([^|;]+?)\s+(-->|==>|-\.->)/u.exec(line.slice(index));
|
|
60
|
+
if (labeled) {
|
|
61
|
+
label = labeled[1];
|
|
62
|
+
operator = labeled[2];
|
|
63
|
+
index += labeled[0].length;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const direction = operator === '<-->' ? 'both'
|
|
67
|
+
: operator.startsWith('<') ? 'reverse'
|
|
68
|
+
: /(?:>|o|x)$/u.test(operator) ? 'forward'
|
|
69
|
+
: 'none';
|
|
70
|
+
return { label, direction, end: index };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function addFlowNode(diagram, parsed, groups) {
|
|
74
|
+
const current = addNode(diagram, parsed.id, parsed.label, parsed.shape, 'process', groups.length ? { parentId: groups.at(-1).id } : {});
|
|
75
|
+
for (const group of groups) if (!group.nodeIds.includes(current.id)) group.nodeIds.push(current.id);
|
|
76
|
+
return current;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function directive(diagram, line) {
|
|
80
|
+
if (/^(?:click|href)\b/iu.test(line)) diagram.discarded.links += 1;
|
|
81
|
+
else diagram.discarded.directives += 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function stripInlineComment(line) {
|
|
85
|
+
const closers = [];
|
|
86
|
+
let quote = '';
|
|
87
|
+
let pipeLabel = false;
|
|
88
|
+
for (let index = 0; index < line.length; index += 1) {
|
|
89
|
+
const char = line[index];
|
|
90
|
+
if (quote) {
|
|
91
|
+
if (char === quote && line[index - 1] !== '\\') quote = '';
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (char === '"' || char === "'") {
|
|
95
|
+
quote = char;
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (char === '|' && closers.length === 0) {
|
|
99
|
+
pipeLabel = !pipeLabel;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (line.startsWith('%%', index) && closers.length === 0 && !pipeLabel) {
|
|
103
|
+
return { text: line.slice(0, index).trimEnd(), hasComment: true };
|
|
104
|
+
}
|
|
105
|
+
if (pipeLabel) continue;
|
|
106
|
+
if (char === '[' || char === '(' || char === '{') closers.push(char === '[' ? ']' : char === '(' ? ')' : '}');
|
|
107
|
+
else if (char === ']' || char === ')' || char === '}') closers.pop();
|
|
108
|
+
}
|
|
109
|
+
return { text: line, hasComment: false };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function parseFlowchart(source, index = 0) {
|
|
113
|
+
const lines = source.replace(/\r\n?/gu, '\n').split('\n');
|
|
114
|
+
const headerIndex = lines.findIndex((line) => line.trim() && !line.trim().startsWith('%%'));
|
|
115
|
+
if (headerIndex < 0 || !/^(?:flowchart|graph)\s+(?:TD|TB|BT|RL|LR)\s*$/iu.test(lines[headerIndex].trim())) {
|
|
116
|
+
reject('Mermaid flowchart must start with flowchart or graph and a direction');
|
|
117
|
+
}
|
|
118
|
+
const diagram = createDiagram('flowchart', index);
|
|
119
|
+
const groups = [];
|
|
120
|
+
for (let row = headerIndex + 1; row < lines.length; row += 1) {
|
|
121
|
+
let line = lines[row].trim();
|
|
122
|
+
if (!line) continue;
|
|
123
|
+
if (line.startsWith('%%')) {
|
|
124
|
+
diagram.discarded.comments += 1;
|
|
125
|
+
if (line.startsWith('%%{')) diagram.discarded.directives += 1;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
const uncommented = stripInlineComment(line);
|
|
129
|
+
line = uncommented.text.trim();
|
|
130
|
+
if (uncommented.hasComment) diagram.discarded.comments += 1;
|
|
131
|
+
if (!line) continue;
|
|
132
|
+
if (line.endsWith(';')) line = line.slice(0, -1).trim();
|
|
133
|
+
if (/^(?:classDef|class|style|linkStyle|click|href)\b/iu.test(line)) {
|
|
134
|
+
directive(diagram, line);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const subgraph = /^subgraph\s+([A-Za-z0-9_][A-Za-z0-9_-]*)(?:\s*(?:\[([^\]]*)\]|\(([^)]*)\)|\{([^}]*)\}))?\s*$/iu.exec(line);
|
|
138
|
+
if (subgraph) {
|
|
139
|
+
if (groups.length >= 16) reject('Mermaid subgraph nesting exceeds the depth limit (16)');
|
|
140
|
+
const group = addGroup(diagram, subgraph[1], subgraph[2] ?? subgraph[3] ?? subgraph[4] ?? subgraph[1]);
|
|
141
|
+
groups.push(group);
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
if (/^end\s*$/iu.test(line)) {
|
|
145
|
+
if (!groups.length) reject('Mermaid subgraph has an unmatched end');
|
|
146
|
+
groups.pop();
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
if (/^(?:direction|title)\b/iu.test(line)) {
|
|
150
|
+
if (/^title\s+/iu.test(line)) diagram.title = normalizeLabel(line.replace(/^title\s+/iu, '')).text;
|
|
151
|
+
else diagram.discarded.directives += 1;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const first = readNode(line, 0);
|
|
155
|
+
if (!first) reject(`unsupported Mermaid flowchart statement: ${line.slice(0, 80)}`);
|
|
156
|
+
let current = addFlowNode(diagram, first, groups);
|
|
157
|
+
let cursor = first.end;
|
|
158
|
+
let foundEdge = false;
|
|
159
|
+
while (cursor < line.length) {
|
|
160
|
+
const edge = readEdge(line, cursor);
|
|
161
|
+
if (!edge) {
|
|
162
|
+
if (!line.slice(cursor).trim()) break;
|
|
163
|
+
reject(`unsupported Mermaid flowchart syntax near ${line.slice(cursor, cursor + 40)}`);
|
|
164
|
+
}
|
|
165
|
+
const next = readNode(line, edge.end);
|
|
166
|
+
if (!next) reject('Mermaid flowchart edge has no target node');
|
|
167
|
+
const target = addFlowNode(diagram, next, groups);
|
|
168
|
+
addRelationship(diagram, current.sourceId, target.sourceId, edge.label, 'flow', edge.direction);
|
|
169
|
+
current = target;
|
|
170
|
+
cursor = next.end;
|
|
171
|
+
foundEdge = true;
|
|
172
|
+
if (diagram.nodes.length > MAX_NODES) reject('Mermaid node limit exceeded (max 2,000)');
|
|
173
|
+
}
|
|
174
|
+
if (!foundEdge && cursor < line.length && line.slice(cursor).trim()) reject(`unsupported Mermaid flowchart syntax: ${line.slice(cursor, cursor + 40)}`);
|
|
175
|
+
}
|
|
176
|
+
if (groups.length) reject('Mermaid subgraph is missing end');
|
|
177
|
+
return finalizeDiagram(diagram);
|
|
178
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { reject } from './import-common.mjs';
|
|
2
|
+
import { addNode, addRelationship, createDiagram, finalizeDiagram, normalizeLabel } from './mermaid-common.mjs';
|
|
3
|
+
|
|
4
|
+
const MESSAGE = /^([A-Za-z0-9_][A-Za-z0-9_-]*?)\s*(-->>|->>|--x|->x|-->|->|-\))\s*([+-]?)([A-Za-z0-9_][A-Za-z0-9_-]*)\s*(?::\s*(.*))?$/u;
|
|
5
|
+
const FRAGMENT_START = /^(alt|opt|loop|par|critical|break|rect|par_over)\b(?:\s+(.+))?$/iu;
|
|
6
|
+
|
|
7
|
+
function cleanAlias(value) {
|
|
8
|
+
const alias = value.trim();
|
|
9
|
+
return (alias.startsWith('"') && alias.endsWith('"')) || (alias.startsWith("'") && alias.endsWith("'"))
|
|
10
|
+
? alias.slice(1, -1)
|
|
11
|
+
: alias;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function participant(diagram, id, alias = '') {
|
|
15
|
+
return addNode(diagram, id, alias || id, 'lifeline', 'participant');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function openActivation(diagram, activations, sourceId) {
|
|
19
|
+
const current = activations.get(sourceId) ?? [];
|
|
20
|
+
current.push(diagram.relationships.length);
|
|
21
|
+
activations.set(sourceId, current);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function closeActivation(diagram, activations, sourceId) {
|
|
25
|
+
const stack = activations.get(sourceId) ?? [];
|
|
26
|
+
if (!stack.length) reject(`deactivate has no matching activation for ${sourceId}`);
|
|
27
|
+
const startMessageIndex = stack.pop();
|
|
28
|
+
diagram.activations.push({ participantId: diagram.nodeBySourceId.get(sourceId).id, startMessageIndex, endMessageIndex: diagram.relationships.length });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function recordMessage(diagram, activations, fragments, line, order) {
|
|
32
|
+
const match = MESSAGE.exec(line);
|
|
33
|
+
if (!match) reject(`unsupported Mermaid sequence statement: ${line.slice(0, 80)}`);
|
|
34
|
+
const [, from, arrow, activation, to, label = ''] = match;
|
|
35
|
+
participant(diagram, from);
|
|
36
|
+
participant(diagram, to);
|
|
37
|
+
const fragment = fragments.at(-1);
|
|
38
|
+
const messageMode = arrow === '-)' ? 'async' : 'message';
|
|
39
|
+
const relationship = addRelationship(diagram, from, to, label, 'message', 'forward', {
|
|
40
|
+
order,
|
|
41
|
+
mode: messageMode,
|
|
42
|
+
...(arrow.endsWith('x') ? { endMarker: 'cross' } : {}),
|
|
43
|
+
...(fragment ? { fragmentId: fragment.id } : {}),
|
|
44
|
+
});
|
|
45
|
+
if (activation === '+') openActivation(diagram, activations, to);
|
|
46
|
+
if (activation === '-') closeActivation(diagram, activations, to);
|
|
47
|
+
return relationship;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function parseSequence(source, index = 0) {
|
|
51
|
+
const lines = source.replace(/\r\n?/gu, '\n').split('\n');
|
|
52
|
+
const headerIndex = lines.findIndex((line) => line.trim() && !line.trim().startsWith('%%'));
|
|
53
|
+
if (headerIndex < 0 || !/^sequenceDiagram\s*$/iu.test(lines[headerIndex].trim())) reject('Mermaid sequence diagram must start with sequenceDiagram');
|
|
54
|
+
const diagram = createDiagram('sequence', index);
|
|
55
|
+
const fragments = [];
|
|
56
|
+
const activations = new Map();
|
|
57
|
+
for (let row = headerIndex + 1; row < lines.length; row += 1) {
|
|
58
|
+
const line = lines[row].trim();
|
|
59
|
+
if (!line) continue;
|
|
60
|
+
if (line.startsWith('%%')) {
|
|
61
|
+
diagram.discarded.comments += 1;
|
|
62
|
+
if (line.startsWith('%%{')) diagram.discarded.directives += 1;
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const title = /^title\s*:\s*(.*)$/iu.exec(line);
|
|
66
|
+
if (title) {
|
|
67
|
+
diagram.title = normalizeLabel(title[1]).text;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const declaration = /^(participant|actor)\s+([A-Za-z0-9_][A-Za-z0-9_-]*)(?:\s+as\s+(.+))?$/iu.exec(line);
|
|
71
|
+
if (declaration) {
|
|
72
|
+
participant(diagram, declaration[2], cleanAlias(declaration[3] ?? ''));
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (/^(?:autonumber|hide\s+footbox|show\s+footbox)\b/iu.test(line)) {
|
|
76
|
+
diagram.discarded.directives += 1;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const fragmentMatch = FRAGMENT_START.exec(line);
|
|
80
|
+
if (fragmentMatch) {
|
|
81
|
+
const id = `fragment-${diagram.fragments.length + 1}`;
|
|
82
|
+
const normalized = normalizeLabel(fragmentMatch[2] ?? '');
|
|
83
|
+
diagram.discarded.urls += normalized.urls;
|
|
84
|
+
const fragment = { id, type: fragmentMatch[1].toLowerCase(), label: normalized.text, branches: [] };
|
|
85
|
+
diagram.fragments.push(fragment);
|
|
86
|
+
fragments.push(fragment);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const branch = /^(else|and|option)\b(?:\s+(.+))?$/iu.exec(line);
|
|
90
|
+
if (branch) {
|
|
91
|
+
const current = fragments.at(-1);
|
|
92
|
+
if (!current) reject(`${branch[1]} has no open sequence fragment`);
|
|
93
|
+
const normalized = normalizeLabel(branch[2] ?? '');
|
|
94
|
+
diagram.discarded.urls += normalized.urls;
|
|
95
|
+
current.branches.push({ type: branch[1].toLowerCase(), label: normalized.text });
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (/^end\s*$/iu.test(line)) {
|
|
99
|
+
if (!fragments.length) reject('sequence fragment has an unmatched end');
|
|
100
|
+
fragments.pop();
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const control = /^(activate|deactivate)\s+([A-Za-z0-9_][A-Za-z0-9_-]*)$/iu.exec(line);
|
|
104
|
+
if (control) {
|
|
105
|
+
participant(diagram, control[2]);
|
|
106
|
+
if (control[1].toLowerCase() === 'activate') openActivation(diagram, activations, control[2]);
|
|
107
|
+
else closeActivation(diagram, activations, control[2]);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const lifecycle = /^(create|destroy)\s+(?:participant\s+)?([A-Za-z0-9_][A-Za-z0-9_-]*)$/iu.exec(line);
|
|
111
|
+
if (lifecycle) {
|
|
112
|
+
const actor = participant(diagram, lifecycle[2]);
|
|
113
|
+
diagram.notes.push({ kind: lifecycle[1].toLowerCase(), participantId: actor.id, order: diagram.relationships.length });
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const note = /^Note\s+(left|right)\s+of\s+([A-Za-z0-9_][A-Za-z0-9_-]*)\s*:\s*(.+)$/iu.exec(line)
|
|
117
|
+
?? /^Note\s+over\s+([A-Za-z0-9_][A-Za-z0-9_-]*(?:\s*,\s*[A-Za-z0-9_][A-Za-z0-9_-]*)?)\s*:\s*(.+)$/iu.exec(line);
|
|
118
|
+
if (note) {
|
|
119
|
+
const actorList = /^Note\s+over/iu.test(line) ? note[1].split(',') : [note[2]];
|
|
120
|
+
const text = /^Note\s+over/iu.test(line) ? note[2] : note[3];
|
|
121
|
+
const actors = actorList.map((actorId) => participant(diagram, actorId.trim()).id);
|
|
122
|
+
const normalized = normalizeLabel(text);
|
|
123
|
+
diagram.discarded.urls += normalized.urls;
|
|
124
|
+
diagram.notes.push({ participantIds: actors, label: normalized.text, order: diagram.relationships.length });
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
recordMessage(diagram, activations, fragments, line, diagram.relationships.length);
|
|
128
|
+
}
|
|
129
|
+
if (fragments.length) reject('sequence fragment is missing end');
|
|
130
|
+
for (const [sourceId, starts] of activations) {
|
|
131
|
+
for (const startMessageIndex of starts) {
|
|
132
|
+
diagram.activations.push({ participantId: diagram.nodeBySourceId.get(sourceId).id, startMessageIndex, endMessageIndex: null });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
for (const node of diagram.nodes) delete node.sourceId;
|
|
136
|
+
return finalizeDiagram(diagram);
|
|
137
|
+
}
|