create-yss-spec 2.1.4 → 2.1.6
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 +1 -1
- package/package.json +1 -1
- package/template/.agents/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.agents/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.agents/skills/prototype-review/SKILL.md +6 -2
- package/template/.agents/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.agents/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.agents/skills/yss-cache/references/source-index.md +4 -3
- package/template/.agents/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.agents/skills/yss-design-system/SKILL.md +6 -5
- package/template/.agents/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.agents/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.agents/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.agents/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.agents/skills/yss-dto/references/source-index.md +7 -4
- package/template/.agents/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.agents/skills/yss-exception/references/source-index.md +3 -3
- package/template/.agents/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.agents/skills/yss-log/references/source-index.md +3 -3
- package/template/.agents/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.agents/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.agents/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.agents/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.agents/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.agents/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.agents/skills/yss-source-index/SKILL.md +3 -3
- package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.agents/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.agents/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.agents/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.agents/skills/yss-validation/references/source-index.md +5 -24
- package/template/.agents/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.agents/skills/yss-variable/references/source-index.md +6 -34
- package/template/.agents/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.claude/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.claude/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.claude/skills/prototype-review/SKILL.md +6 -2
- package/template/.claude/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.claude/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.claude/skills/yss-cache/references/source-index.md +4 -3
- package/template/.claude/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.claude/skills/yss-design-system/SKILL.md +6 -5
- package/template/.claude/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.claude/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.claude/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.claude/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.claude/skills/yss-dto/references/source-index.md +7 -4
- package/template/.claude/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.claude/skills/yss-exception/references/source-index.md +3 -3
- package/template/.claude/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.claude/skills/yss-log/references/source-index.md +3 -3
- package/template/.claude/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.claude/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.claude/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.claude/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.claude/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.claude/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.claude/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.claude/skills/yss-source-index/SKILL.md +3 -3
- package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.claude/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.claude/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.claude/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.claude/skills/yss-validation/references/source-index.md +5 -24
- package/template/.claude/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.claude/skills/yss-variable/references/source-index.md +6 -34
- package/template/.claude/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.codex/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.codex/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.codex/skills/prototype-review/SKILL.md +6 -2
- package/template/.codex/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.codex/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.codex/skills/yss-cache/references/source-index.md +4 -3
- package/template/.codex/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.codex/skills/yss-design-system/SKILL.md +6 -5
- package/template/.codex/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.codex/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.codex/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.codex/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.codex/skills/yss-dto/references/source-index.md +7 -4
- package/template/.codex/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.codex/skills/yss-exception/references/source-index.md +3 -3
- package/template/.codex/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.codex/skills/yss-log/references/source-index.md +3 -3
- package/template/.codex/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.codex/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.codex/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.codex/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.codex/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.codex/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.codex/skills/yss-source-index/SKILL.md +3 -3
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.codex/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.codex/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.codex/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.codex/skills/yss-validation/references/source-index.md +5 -24
- package/template/.codex/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.codex/skills/yss-variable/references/source-index.md +6 -34
- package/template/.codex/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.github/workflows/template-node-tooling.yml +59 -0
- package/template/.hermes/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.hermes/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.hermes/skills/prototype-review/SKILL.md +6 -2
- package/template/.hermes/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.hermes/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.hermes/skills/yss-cache/references/source-index.md +4 -3
- package/template/.hermes/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.hermes/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.hermes/skills/yss-design-system/SKILL.md +6 -5
- package/template/.hermes/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.hermes/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.hermes/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.hermes/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.hermes/skills/yss-dto/references/source-index.md +7 -4
- package/template/.hermes/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-exception/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-log/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.hermes/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.hermes/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.hermes/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.hermes/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-source-index/SKILL.md +3 -3
- package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.hermes/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.hermes/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-validation/references/source-index.md +5 -24
- package/template/.hermes/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.hermes/skills/yss-variable/references/source-index.md +6 -34
- package/template/.hermes/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.nvmrc +1 -0
- package/template/.pi/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.pi/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.pi/skills/prototype-review/SKILL.md +6 -2
- package/template/.pi/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.pi/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.pi/skills/yss-cache/references/source-index.md +4 -3
- package/template/.pi/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.pi/skills/yss-design-system/SKILL.md +6 -5
- package/template/.pi/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.pi/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.pi/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.pi/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.pi/skills/yss-dto/references/source-index.md +7 -4
- package/template/.pi/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.pi/skills/yss-exception/references/source-index.md +3 -3
- package/template/.pi/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.pi/skills/yss-log/references/source-index.md +3 -3
- package/template/.pi/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.pi/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.pi/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.pi/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.pi/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.pi/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.pi/skills/yss-source-index/SKILL.md +3 -3
- package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.pi/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.pi/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.pi/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.pi/skills/yss-validation/references/source-index.md +5 -24
- package/template/.pi/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.pi/skills/yss-variable/references/source-index.md +6 -34
- package/template/.pi/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.qoder/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.qoder/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.qoder/skills/prototype-review/SKILL.md +6 -2
- package/template/.qoder/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.qoder/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.qoder/skills/yss-cache/references/source-index.md +4 -3
- package/template/.qoder/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.qoder/skills/yss-design-system/SKILL.md +6 -5
- package/template/.qoder/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.qoder/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.qoder/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.qoder/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.qoder/skills/yss-dto/references/source-index.md +7 -4
- package/template/.qoder/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-exception/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-log/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.qoder/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.qoder/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.qoder/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.qoder/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-source-index/SKILL.md +3 -3
- package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.qoder/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.qoder/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-validation/references/source-index.md +5 -24
- package/template/.qoder/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.qoder/skills/yss-variable/references/source-index.md +6 -34
- package/template/.qoder/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/.trae/skills/high-fidelity-html-prototype/SKILL.md +16 -12
- package/template/.trae/skills/product-design-prototype/SKILL.md +6 -2
- package/template/.trae/skills/prototype-review/SKILL.md +6 -2
- package/template/.trae/skills/wireframe-prototype/SKILL.md +5 -1
- package/template/.trae/skills/yss-audit-log/references/source-index.md +4 -3
- package/template/.trae/skills/yss-cache/references/source-index.md +4 -3
- package/template/.trae/skills/yss-components/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-db2mybatis/SKILL.md +6 -5
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.mjs +145 -0
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +32 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +5 -5
- package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +2 -2
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +225 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +32 -0
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +26 -0
- package/template/.trae/skills/yss-design-system/SKILL.md +6 -5
- package/template/.trae/skills/yss-design-system/scripts/validate-frontmatter.mjs +36 -0
- package/template/.trae/skills/yss-design-system/scripts/validate-frontmatter.test.mjs +12 -0
- package/template/.trae/skills/yss-dictionary/references/source-index.md +25 -25
- package/template/.trae/skills/yss-distributed-id/references/source-index.md +6 -6
- package/template/.trae/skills/yss-dto/references/source-index.md +7 -4
- package/template/.trae/skills/yss-excel-mvc/references/source-index.md +3 -3
- package/template/.trae/skills/yss-exception/references/source-index.md +3 -3
- package/template/.trae/skills/yss-hook/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-jdbc/references/source-index.md +3 -3
- package/template/.trae/skills/yss-log/references/source-index.md +3 -3
- package/template/.trae/skills/yss-mybatis/references/source-index.md +3 -3
- package/template/.trae/skills/yss-page-module-development/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-product-lifecycle/SKILL.md +4 -2
- package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +2 -2
- package/template/.trae/skills/yss-prototype-stage/SKILL.md +40 -0
- package/template/.trae/skills/yss-resilience4j/references/source-index.md +3 -3
- package/template/.trae/skills/yss-router/references/router-contract.yaml +5 -2
- package/template/.trae/skills/yss-router/references/slice-implementation-contract.md +3 -0
- package/template/.trae/skills/yss-security-algorithm/references/source-index.md +3 -3
- package/template/.trae/skills/yss-source-index/SKILL.md +3 -3
- package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +24 -0
- package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.test.mjs +15 -0
- package/template/.trae/skills/yss-taskflow/references/source-index.md +3 -3
- package/template/.trae/skills/yss-ui/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-use-table-height/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-use-tree-height/references/frontend-docs.md +1 -1
- package/template/.trae/skills/yss-userinfo/references/source-index.md +3 -3
- package/template/.trae/skills/yss-validation/references/source-index.md +5 -24
- package/template/.trae/skills/yss-valuation/references/source-index.md +3 -3
- package/template/.trae/skills/yss-variable/references/source-index.md +6 -34
- package/template/.trae/skills/yss-web-controller/SKILL.md +4 -4
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +77 -0
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +19 -0
- package/template/AGENTS.md +1 -1
- package/template/CONTEXT.md +2 -0
- package/template/README.md +0 -2
- package/template/__yss_dotfile__.gitignore +2 -17
- package/template/docs/adr/0001-product-design-prototype-entrypoint.md +1 -1
- package/template/docs/agents/skills-maintenance.md +2 -0
- package/template/docs/architecture/README.md +1 -18
- package/template/docs/design/README.md +5 -4
- package/template/docs/design/design.md +4 -0
- package/template/docs/design/templates/interaction-spec-template.md +3 -3
- package/template/docs/design/templates/prototype-confirmation-template.md +9 -6
- package/template/docs/design/templates/prototype-evidence-template.yaml +46 -0
- package/template/docs/design/templates/prototype-review-checklist.md +4 -4
- package/template/docs/process/lifecycle-artifact-map.md +10 -1
- package/template/docs/process/lifecycle-registry-baseline.json +10 -1
- package/template/docs/process/lifecycle-registry.yaml +35 -1
- package/template/docs/user-guide//345/244/226/351/203/250/345/221/275/344/273/244/350/241/214/345/267/245/345/205/267/345/256/236/350/267/265/346/214/207/345/215/227.md +1 -1
- package/template/docs/user-guide//350/247/204/346/240/274/344/270/216/344/273/273/345/212/241/350/277/201/347/247/273/346/214/207/345/215/227.md +4 -0
- package/template/scripts/export-yss-skills +3 -385
- package/template/scripts/generate-lifecycle-artifacts +2 -26
- package/template/scripts/implementation-path-policy +6 -0
- package/template/scripts/lib/export-skills.mjs +186 -0
- package/template/scripts/lib/implementation-path-policy.mjs +32 -0
- package/template/scripts/lib/lifecycle-registry.mjs +175 -0
- package/template/scripts/lib/repository-mode.mjs +39 -0
- package/template/scripts/lib/scenario-checks.mjs +54 -0
- package/template/scripts/lib/skill-supply-chain.mjs +124 -0
- package/template/scripts/node-generate-lifecycle-artifacts.mjs +33 -0
- package/template/scripts/node-verify-lifecycle-registry.mjs +61 -0
- package/template/scripts/repository-mode +9 -0
- package/template/scripts/sync-skills +9 -154
- package/template/scripts/update-skill-lock +8 -254
- package/template/scripts/vendor/NOTICES.md +45 -0
- package/template/scripts/vendor/manifest.json +563 -0
- package/template/scripts/vendor/xml.mjs +4103 -0
- package/template/scripts/vendor/yaml.mjs +6311 -0
- package/template/scripts/verify-governance-release +37 -38
- package/template/scripts/verify-implementation-path-scenarios +36 -39
- package/template/scripts/verify-lifecycle-registry +2 -67
- package/template/scripts/verify-lifecycle-scenarios +4 -621
- package/template/scripts/verify-matt-yss-integration-scenarios +3 -801
- package/template/scripts/verify-openapi-json-handoff-scenarios +3 -270
- package/template/scripts/verify-openapi-yaml-first-scenarios +3 -120
- package/template/scripts/verify-prototype-backend-scaffold-scenarios +3 -239
- package/template/scripts/verify-scaffold-generator-scenarios +4 -4
- package/template/scripts/verify-template +18 -277
- package/template/scripts/verify-yss-router-scenarios +3 -933
- package/template/scripts/verify-yss-ui-scenarios +54 -65
- package/template/skills-lock.json +103 -163
- package/template/wiki/raw/README.md +0 -2
- package/template/wiki/raw/skills-lock.json +0 -75
- package/template/yss-public-skills.json +2 -0
- package/template.manifest.json +1 -0
- package/template.snapshot.json +5 -26
- package/template/.agents/skills/beautiful-article/README.md +0 -450
- package/template/.agents/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.agents/skills/beautiful-article/SKILL.md +0 -466
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.agents/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.agents/skills/beautiful-article/manifest.json +0 -15
- package/template/.agents/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.agents/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.agents/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.agents/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.agents/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.agents/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.agents/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.agents/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.agents/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.agents/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.agents/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.agents/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.agents/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.agents/skills/beautiful-article/references/cover.md +0 -208
- package/template/.agents/skills/beautiful-article/references/harness.md +0 -35
- package/template/.agents/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.agents/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.agents/skills/beautiful-article/references/layout.md +0 -46
- package/template/.agents/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.agents/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.agents/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.agents/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.agents/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.agents/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.agents/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.agents/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.agents/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.agents/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.agents/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.agents/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.agents/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.agents/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.agents/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.agents/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.agents/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.agents/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.agents/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.agents/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.agents/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.agents/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.agents/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.agents/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.agents/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.agents/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.agents/skills/drawio/.mcp.json +0 -8
- package/template/.agents/skills/drawio/CHANGELOG.md +0 -216
- package/template/.agents/skills/drawio/SKILL.md +0 -157
- package/template/.agents/skills/drawio/agents/interface.yaml +0 -26
- package/template/.agents/skills/drawio/agents/openai.yaml +0 -26
- package/template/.agents/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.agents/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.agents/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.agents/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.agents/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.agents/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.agents/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.agents/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.agents/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.agents/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.agents/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.agents/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.agents/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.agents/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.agents/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.agents/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.agents/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.agents/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.agents/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.agents/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.agents/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.agents/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.agents/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.agents/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.agents/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.agents/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.agents/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.agents/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.agents/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.agents/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.agents/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.agents/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.agents/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.agents/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.agents/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.agents/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.agents/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.agents/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.agents/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.agents/skills/drawio/evals/README.md +0 -17
- package/template/.agents/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.agents/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.agents/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.agents/skills/drawio/evals/evals.json +0 -223
- package/template/.agents/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.agents/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.agents/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.agents/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.agents/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.agents/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.agents/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.agents/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.agents/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.agents/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.agents/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.agents/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.agents/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.agents/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.agents/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.agents/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.agents/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.agents/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.agents/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.agents/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.agents/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.agents/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.agents/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.agents/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.agents/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.agents/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.agents/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.agents/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.agents/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.agents/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.agents/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.agents/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.agents/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.agents/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.agents/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.agents/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.agents/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.agents/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.agents/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.agents/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.agents/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.agents/skills/drawio/references/examples/README.md +0 -33
- package/template/.agents/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.agents/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.agents/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.agents/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.agents/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.agents/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.agents/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.agents/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.agents/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.agents/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.agents/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.agents/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.agents/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.agents/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.agents/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.agents/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.agents/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.agents/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.agents/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.agents/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.agents/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.agents/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.agents/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.agents/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.agents/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.agents/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.agents/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.agents/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.agents/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.agents/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.agents/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.agents/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.agents/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.agents/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.agents/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.agents/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.agents/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.agents/skills/drawio/references/palette.schema.json +0 -59
- package/template/.agents/skills/drawio/references/theme.schema.json +0 -249
- package/template/.agents/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.agents/skills/drawio/references/workflows/create.md +0 -195
- package/template/.agents/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.agents/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.agents/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.agents/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.agents/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.agents/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.agents/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.agents/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.agents/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.agents/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.agents/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.agents/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.agents/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.agents/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.agents/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.agents/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.agents/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.agents/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.agents/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.agents/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.agents/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.agents/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.agents/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.agents/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.agents/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.agents/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.agents/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.agents/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.agents/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.agents/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.agents/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.agents/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.agents/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.agents/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.agents/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.agents/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.agents/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.agents/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.agents/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.agents/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.agents/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.agents/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.agents/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.agents/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.agents/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.agents/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.agents/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.agents/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.agents/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.agents/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.agents/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.agents/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.agents/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.agents/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.agents/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.agents/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.agents/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.agents/skills/drawio/scripts/cli.js +0 -700
- package/template/.agents/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.agents/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.agents/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.agents/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.agents/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.agents/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.agents/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.agents/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.agents/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.agents/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.agents/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.agents/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.agents/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.agents/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.agents/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.agents/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.agents/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.agents/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.agents/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.agents/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.agents/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.agents/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.agents/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.agents/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.agents/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.agents/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.agents/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.agents/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.agents/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.agents/skills/drawio/scripts/install.bat +0 -64
- package/template/.agents/skills/drawio/scripts/install.sh +0 -44
- package/template/.agents/skills/drawio/scripts/math/index.js +0 -317
- package/template/.agents/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.agents/skills/drawio/scripts/package.json +0 -1
- package/template/.agents/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.agents/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.agents/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.agents/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.agents/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.agents/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.agents/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.agents/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.agents/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.agents/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.agents/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.agents/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.agents/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.agents/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.agents/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.agents/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.agents/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.agents/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.agents/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.agents/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.agents/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.agents/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.agents/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.agents/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.agents/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.agents/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.agents/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.agents/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.agents/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.agents/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.agents/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.agents/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.agents/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.agents/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.agents/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.agents/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.agents/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.agents/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.agents/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.agents/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.agents/skills/drawio/styles/schema.json +0 -112
- package/template/.agents/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.agents/skills/drawio-academic-skills/README.md +0 -103
- package/template/.agents/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.agents/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.agents/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.agents/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.agents/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.agents/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.agents/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.agents/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.agents/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.agents/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.agents/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.agents/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.agents/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.agents/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.agents/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.agents/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.agents/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.agents/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.agents/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.agents/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.agents/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.agents/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.agents/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.agents/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.agents/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.agents/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.agents/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.agents/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.agents/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.agents/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.agents/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.agents/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.agents/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.agents/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.agents/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.agents/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.agents/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.agents/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.agents/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.agents/skills/kb-retriever/README.md +0 -197
- package/template/.agents/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.agents/skills/kb-retriever/SKILL.md +0 -250
- package/template/.agents/skills/kb-retriever/manifest.json +0 -15
- package/template/.agents/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.agents/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.agents/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.agents/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.agents/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.agents/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.agents/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.claude/skills/beautiful-article/README.md +0 -450
- package/template/.claude/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.claude/skills/beautiful-article/SKILL.md +0 -466
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.claude/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.claude/skills/beautiful-article/manifest.json +0 -15
- package/template/.claude/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.claude/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.claude/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.claude/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.claude/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.claude/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.claude/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.claude/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.claude/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.claude/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.claude/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.claude/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.claude/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.claude/skills/beautiful-article/references/cover.md +0 -208
- package/template/.claude/skills/beautiful-article/references/harness.md +0 -35
- package/template/.claude/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.claude/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.claude/skills/beautiful-article/references/layout.md +0 -46
- package/template/.claude/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.claude/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.claude/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.claude/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.claude/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.claude/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.claude/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.claude/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.claude/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.claude/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.claude/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.claude/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.claude/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.claude/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.claude/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.claude/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.claude/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.claude/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.claude/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.claude/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.claude/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.claude/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.claude/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.claude/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.claude/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.claude/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.claude/skills/drawio/.mcp.json +0 -8
- package/template/.claude/skills/drawio/CHANGELOG.md +0 -216
- package/template/.claude/skills/drawio/SKILL.md +0 -157
- package/template/.claude/skills/drawio/agents/interface.yaml +0 -26
- package/template/.claude/skills/drawio/agents/openai.yaml +0 -26
- package/template/.claude/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.claude/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.claude/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.claude/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.claude/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.claude/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.claude/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.claude/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.claude/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.claude/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.claude/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.claude/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.claude/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.claude/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.claude/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.claude/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.claude/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.claude/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.claude/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.claude/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.claude/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.claude/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.claude/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.claude/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.claude/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.claude/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.claude/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.claude/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.claude/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.claude/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.claude/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.claude/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.claude/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.claude/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.claude/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.claude/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.claude/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.claude/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.claude/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.claude/skills/drawio/evals/README.md +0 -17
- package/template/.claude/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.claude/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.claude/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.claude/skills/drawio/evals/evals.json +0 -223
- package/template/.claude/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.claude/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.claude/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.claude/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.claude/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.claude/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.claude/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.claude/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.claude/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.claude/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.claude/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.claude/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.claude/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.claude/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.claude/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.claude/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.claude/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.claude/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.claude/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.claude/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.claude/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.claude/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.claude/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.claude/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.claude/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.claude/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.claude/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.claude/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.claude/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.claude/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.claude/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.claude/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.claude/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.claude/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.claude/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.claude/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.claude/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.claude/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.claude/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.claude/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.claude/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.claude/skills/drawio/references/examples/README.md +0 -33
- package/template/.claude/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.claude/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.claude/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.claude/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.claude/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.claude/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.claude/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.claude/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.claude/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.claude/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.claude/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.claude/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.claude/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.claude/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.claude/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.claude/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.claude/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.claude/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.claude/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.claude/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.claude/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.claude/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.claude/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.claude/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.claude/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.claude/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.claude/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.claude/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.claude/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.claude/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.claude/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.claude/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.claude/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.claude/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.claude/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.claude/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.claude/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.claude/skills/drawio/references/palette.schema.json +0 -59
- package/template/.claude/skills/drawio/references/theme.schema.json +0 -249
- package/template/.claude/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.claude/skills/drawio/references/workflows/create.md +0 -195
- package/template/.claude/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.claude/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.claude/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.claude/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.claude/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.claude/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.claude/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.claude/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.claude/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.claude/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.claude/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.claude/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.claude/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.claude/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.claude/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.claude/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.claude/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.claude/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.claude/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.claude/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.claude/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.claude/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.claude/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.claude/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.claude/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.claude/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.claude/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.claude/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.claude/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.claude/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.claude/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.claude/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.claude/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.claude/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.claude/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.claude/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.claude/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.claude/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.claude/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.claude/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.claude/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.claude/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.claude/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.claude/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.claude/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.claude/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.claude/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.claude/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.claude/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.claude/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.claude/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.claude/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.claude/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.claude/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.claude/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.claude/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.claude/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.claude/skills/drawio/scripts/cli.js +0 -700
- package/template/.claude/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.claude/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.claude/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.claude/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.claude/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.claude/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.claude/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.claude/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.claude/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.claude/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.claude/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.claude/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.claude/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.claude/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.claude/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.claude/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.claude/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.claude/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.claude/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.claude/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.claude/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.claude/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.claude/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.claude/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.claude/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.claude/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.claude/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.claude/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.claude/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.claude/skills/drawio/scripts/install.bat +0 -64
- package/template/.claude/skills/drawio/scripts/install.sh +0 -44
- package/template/.claude/skills/drawio/scripts/math/index.js +0 -317
- package/template/.claude/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.claude/skills/drawio/scripts/package.json +0 -1
- package/template/.claude/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.claude/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.claude/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.claude/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.claude/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.claude/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.claude/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.claude/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.claude/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.claude/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.claude/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.claude/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.claude/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.claude/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.claude/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.claude/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.claude/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.claude/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.claude/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.claude/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.claude/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.claude/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.claude/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.claude/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.claude/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.claude/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.claude/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.claude/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.claude/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.claude/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.claude/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.claude/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.claude/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.claude/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.claude/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.claude/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.claude/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.claude/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.claude/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.claude/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.claude/skills/drawio/styles/schema.json +0 -112
- package/template/.claude/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.claude/skills/drawio-academic-skills/README.md +0 -103
- package/template/.claude/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.claude/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.claude/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.claude/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.claude/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.claude/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.claude/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.claude/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.claude/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.claude/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.claude/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.claude/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.claude/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.claude/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.claude/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.claude/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.claude/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.claude/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.claude/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.claude/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.claude/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.claude/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.claude/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.claude/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.claude/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.claude/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.claude/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.claude/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.claude/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.claude/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.claude/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.claude/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.claude/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.claude/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.claude/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.claude/skills/kb-retriever/README.md +0 -197
- package/template/.claude/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.claude/skills/kb-retriever/SKILL.md +0 -250
- package/template/.claude/skills/kb-retriever/manifest.json +0 -15
- package/template/.claude/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.claude/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.claude/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.claude/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.claude/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.claude/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.claude/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.claude/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.codex/skills/beautiful-article/README.md +0 -450
- package/template/.codex/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.codex/skills/beautiful-article/SKILL.md +0 -466
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.codex/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.codex/skills/beautiful-article/manifest.json +0 -15
- package/template/.codex/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.codex/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.codex/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.codex/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.codex/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.codex/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.codex/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.codex/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.codex/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.codex/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.codex/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.codex/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.codex/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.codex/skills/beautiful-article/references/cover.md +0 -208
- package/template/.codex/skills/beautiful-article/references/harness.md +0 -35
- package/template/.codex/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.codex/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.codex/skills/beautiful-article/references/layout.md +0 -46
- package/template/.codex/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.codex/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.codex/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.codex/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.codex/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.codex/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.codex/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.codex/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.codex/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.codex/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.codex/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.codex/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.codex/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.codex/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.codex/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.codex/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.codex/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.codex/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.codex/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.codex/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.codex/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.codex/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.codex/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.codex/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.codex/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.codex/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.codex/skills/drawio/.mcp.json +0 -8
- package/template/.codex/skills/drawio/CHANGELOG.md +0 -216
- package/template/.codex/skills/drawio/SKILL.md +0 -157
- package/template/.codex/skills/drawio/agents/interface.yaml +0 -26
- package/template/.codex/skills/drawio/agents/openai.yaml +0 -26
- package/template/.codex/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.codex/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.codex/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.codex/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.codex/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.codex/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.codex/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.codex/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.codex/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.codex/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.codex/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.codex/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.codex/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.codex/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.codex/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.codex/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.codex/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.codex/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.codex/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.codex/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.codex/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.codex/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.codex/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.codex/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.codex/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.codex/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.codex/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.codex/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.codex/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.codex/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.codex/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.codex/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.codex/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.codex/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.codex/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.codex/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.codex/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.codex/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.codex/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.codex/skills/drawio/evals/README.md +0 -17
- package/template/.codex/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.codex/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.codex/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.codex/skills/drawio/evals/evals.json +0 -223
- package/template/.codex/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.codex/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.codex/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.codex/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.codex/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.codex/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.codex/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.codex/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.codex/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.codex/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.codex/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.codex/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.codex/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.codex/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.codex/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.codex/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.codex/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.codex/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.codex/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.codex/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.codex/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.codex/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.codex/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.codex/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.codex/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.codex/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.codex/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.codex/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.codex/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.codex/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.codex/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.codex/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.codex/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.codex/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.codex/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.codex/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.codex/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.codex/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.codex/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.codex/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.codex/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.codex/skills/drawio/references/examples/README.md +0 -33
- package/template/.codex/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.codex/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.codex/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.codex/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.codex/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.codex/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.codex/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.codex/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.codex/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.codex/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.codex/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.codex/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.codex/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.codex/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.codex/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.codex/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.codex/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.codex/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.codex/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.codex/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.codex/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.codex/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.codex/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.codex/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.codex/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.codex/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.codex/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.codex/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.codex/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.codex/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.codex/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.codex/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.codex/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.codex/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.codex/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.codex/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.codex/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.codex/skills/drawio/references/palette.schema.json +0 -59
- package/template/.codex/skills/drawio/references/theme.schema.json +0 -249
- package/template/.codex/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.codex/skills/drawio/references/workflows/create.md +0 -195
- package/template/.codex/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.codex/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.codex/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.codex/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.codex/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.codex/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.codex/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.codex/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.codex/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.codex/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.codex/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.codex/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.codex/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.codex/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.codex/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.codex/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.codex/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.codex/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.codex/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.codex/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.codex/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.codex/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.codex/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.codex/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.codex/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.codex/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.codex/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.codex/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.codex/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.codex/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.codex/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.codex/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.codex/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.codex/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.codex/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.codex/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.codex/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.codex/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.codex/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.codex/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.codex/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.codex/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.codex/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.codex/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.codex/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.codex/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.codex/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.codex/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.codex/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.codex/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.codex/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.codex/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.codex/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.codex/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.codex/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.codex/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.codex/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.codex/skills/drawio/scripts/cli.js +0 -700
- package/template/.codex/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.codex/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.codex/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.codex/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.codex/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.codex/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.codex/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.codex/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.codex/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.codex/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.codex/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.codex/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.codex/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.codex/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.codex/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.codex/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.codex/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.codex/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.codex/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.codex/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.codex/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.codex/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.codex/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.codex/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.codex/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.codex/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.codex/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.codex/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.codex/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.codex/skills/drawio/scripts/install.bat +0 -64
- package/template/.codex/skills/drawio/scripts/install.sh +0 -44
- package/template/.codex/skills/drawio/scripts/math/index.js +0 -317
- package/template/.codex/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.codex/skills/drawio/scripts/package.json +0 -1
- package/template/.codex/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.codex/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.codex/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.codex/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.codex/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.codex/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.codex/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.codex/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.codex/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.codex/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.codex/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.codex/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.codex/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.codex/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.codex/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.codex/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.codex/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.codex/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.codex/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.codex/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.codex/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.codex/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.codex/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.codex/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.codex/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.codex/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.codex/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.codex/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.codex/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.codex/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.codex/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.codex/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.codex/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.codex/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.codex/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.codex/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.codex/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.codex/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.codex/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.codex/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.codex/skills/drawio/styles/schema.json +0 -112
- package/template/.codex/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.codex/skills/drawio-academic-skills/README.md +0 -103
- package/template/.codex/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.codex/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.codex/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.codex/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.codex/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.codex/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.codex/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.codex/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.codex/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.codex/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.codex/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.codex/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.codex/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.codex/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.codex/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.codex/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.codex/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.codex/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.codex/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.codex/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.codex/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.codex/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.codex/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.codex/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.codex/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.codex/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.codex/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.codex/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.codex/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.codex/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.codex/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.codex/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.codex/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.codex/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.codex/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.codex/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.codex/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.codex/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.codex/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.codex/skills/kb-retriever/README.md +0 -197
- package/template/.codex/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.codex/skills/kb-retriever/SKILL.md +0 -250
- package/template/.codex/skills/kb-retriever/manifest.json +0 -15
- package/template/.codex/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.codex/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.codex/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.codex/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.codex/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.codex/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.codex/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.hermes/skills/beautiful-article/README.md +0 -450
- package/template/.hermes/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.hermes/skills/beautiful-article/SKILL.md +0 -466
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.hermes/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.hermes/skills/beautiful-article/manifest.json +0 -15
- package/template/.hermes/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.hermes/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.hermes/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.hermes/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.hermes/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.hermes/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.hermes/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.hermes/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.hermes/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.hermes/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.hermes/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.hermes/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.hermes/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.hermes/skills/beautiful-article/references/cover.md +0 -208
- package/template/.hermes/skills/beautiful-article/references/harness.md +0 -35
- package/template/.hermes/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.hermes/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.hermes/skills/beautiful-article/references/layout.md +0 -46
- package/template/.hermes/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.hermes/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.hermes/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.hermes/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.hermes/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.hermes/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.hermes/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.hermes/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.hermes/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.hermes/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.hermes/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.hermes/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.hermes/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.hermes/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.hermes/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.hermes/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.hermes/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.hermes/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.hermes/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.hermes/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.hermes/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.hermes/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.hermes/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.hermes/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.hermes/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.hermes/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.hermes/skills/drawio/.mcp.json +0 -8
- package/template/.hermes/skills/drawio/CHANGELOG.md +0 -216
- package/template/.hermes/skills/drawio/SKILL.md +0 -157
- package/template/.hermes/skills/drawio/agents/interface.yaml +0 -26
- package/template/.hermes/skills/drawio/agents/openai.yaml +0 -26
- package/template/.hermes/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.hermes/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.hermes/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.hermes/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.hermes/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.hermes/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.hermes/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.hermes/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.hermes/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.hermes/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.hermes/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.hermes/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.hermes/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.hermes/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.hermes/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.hermes/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.hermes/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.hermes/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.hermes/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.hermes/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.hermes/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.hermes/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.hermes/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.hermes/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.hermes/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.hermes/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.hermes/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.hermes/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.hermes/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.hermes/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.hermes/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.hermes/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.hermes/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.hermes/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.hermes/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.hermes/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.hermes/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.hermes/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.hermes/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.hermes/skills/drawio/evals/README.md +0 -17
- package/template/.hermes/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.hermes/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.hermes/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.hermes/skills/drawio/evals/evals.json +0 -223
- package/template/.hermes/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.hermes/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.hermes/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.hermes/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.hermes/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.hermes/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.hermes/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.hermes/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.hermes/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.hermes/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.hermes/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.hermes/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.hermes/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.hermes/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.hermes/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.hermes/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.hermes/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.hermes/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.hermes/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.hermes/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.hermes/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.hermes/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.hermes/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.hermes/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.hermes/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.hermes/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.hermes/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.hermes/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.hermes/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.hermes/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.hermes/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.hermes/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.hermes/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.hermes/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.hermes/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.hermes/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.hermes/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.hermes/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.hermes/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.hermes/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.hermes/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.hermes/skills/drawio/references/examples/README.md +0 -33
- package/template/.hermes/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.hermes/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.hermes/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.hermes/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.hermes/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.hermes/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.hermes/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.hermes/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.hermes/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.hermes/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.hermes/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.hermes/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.hermes/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.hermes/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.hermes/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.hermes/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.hermes/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.hermes/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.hermes/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.hermes/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.hermes/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.hermes/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.hermes/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.hermes/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.hermes/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.hermes/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.hermes/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.hermes/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.hermes/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.hermes/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.hermes/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.hermes/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.hermes/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.hermes/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.hermes/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.hermes/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.hermes/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.hermes/skills/drawio/references/palette.schema.json +0 -59
- package/template/.hermes/skills/drawio/references/theme.schema.json +0 -249
- package/template/.hermes/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.hermes/skills/drawio/references/workflows/create.md +0 -195
- package/template/.hermes/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.hermes/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.hermes/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.hermes/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.hermes/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.hermes/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.hermes/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.hermes/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.hermes/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.hermes/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.hermes/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.hermes/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.hermes/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.hermes/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.hermes/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.hermes/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.hermes/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.hermes/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.hermes/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.hermes/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.hermes/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.hermes/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.hermes/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.hermes/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.hermes/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.hermes/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.hermes/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.hermes/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.hermes/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.hermes/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.hermes/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.hermes/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.hermes/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.hermes/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.hermes/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.hermes/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.hermes/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.hermes/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.hermes/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.hermes/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.hermes/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.hermes/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.hermes/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.hermes/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.hermes/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.hermes/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.hermes/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.hermes/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.hermes/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.hermes/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.hermes/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.hermes/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.hermes/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.hermes/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.hermes/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.hermes/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.hermes/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.hermes/skills/drawio/scripts/cli.js +0 -700
- package/template/.hermes/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.hermes/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.hermes/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.hermes/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.hermes/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.hermes/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.hermes/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.hermes/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.hermes/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.hermes/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.hermes/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.hermes/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.hermes/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.hermes/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.hermes/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.hermes/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.hermes/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.hermes/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.hermes/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.hermes/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.hermes/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.hermes/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.hermes/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.hermes/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.hermes/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.hermes/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.hermes/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.hermes/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.hermes/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.hermes/skills/drawio/scripts/install.bat +0 -64
- package/template/.hermes/skills/drawio/scripts/install.sh +0 -44
- package/template/.hermes/skills/drawio/scripts/math/index.js +0 -317
- package/template/.hermes/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.hermes/skills/drawio/scripts/package.json +0 -1
- package/template/.hermes/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.hermes/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.hermes/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.hermes/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.hermes/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.hermes/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.hermes/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.hermes/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.hermes/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.hermes/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.hermes/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.hermes/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.hermes/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.hermes/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.hermes/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.hermes/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.hermes/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.hermes/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.hermes/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.hermes/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.hermes/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.hermes/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.hermes/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.hermes/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.hermes/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.hermes/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.hermes/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.hermes/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.hermes/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.hermes/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.hermes/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.hermes/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.hermes/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.hermes/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.hermes/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.hermes/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.hermes/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.hermes/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.hermes/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.hermes/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.hermes/skills/drawio/styles/schema.json +0 -112
- package/template/.hermes/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.hermes/skills/drawio-academic-skills/README.md +0 -103
- package/template/.hermes/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.hermes/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.hermes/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.hermes/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.hermes/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.hermes/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.hermes/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.hermes/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.hermes/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.hermes/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.hermes/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.hermes/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.hermes/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.hermes/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.hermes/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.hermes/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.hermes/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.hermes/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.hermes/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.hermes/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.hermes/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.hermes/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.hermes/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.hermes/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.hermes/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.hermes/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.hermes/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.hermes/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.hermes/skills/kb-retriever/README.md +0 -197
- package/template/.hermes/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.hermes/skills/kb-retriever/SKILL.md +0 -250
- package/template/.hermes/skills/kb-retriever/manifest.json +0 -15
- package/template/.hermes/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.hermes/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.hermes/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.hermes/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.hermes/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.hermes/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.hermes/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.pi/skills/beautiful-article/README.md +0 -450
- package/template/.pi/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.pi/skills/beautiful-article/SKILL.md +0 -466
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.pi/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.pi/skills/beautiful-article/manifest.json +0 -15
- package/template/.pi/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.pi/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.pi/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.pi/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.pi/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.pi/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.pi/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.pi/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.pi/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.pi/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.pi/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.pi/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.pi/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.pi/skills/beautiful-article/references/cover.md +0 -208
- package/template/.pi/skills/beautiful-article/references/harness.md +0 -35
- package/template/.pi/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.pi/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.pi/skills/beautiful-article/references/layout.md +0 -46
- package/template/.pi/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.pi/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.pi/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.pi/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.pi/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.pi/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.pi/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.pi/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.pi/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.pi/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.pi/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.pi/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.pi/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.pi/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.pi/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.pi/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.pi/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.pi/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.pi/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.pi/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.pi/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.pi/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.pi/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.pi/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.pi/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.pi/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.pi/skills/drawio/.mcp.json +0 -8
- package/template/.pi/skills/drawio/CHANGELOG.md +0 -216
- package/template/.pi/skills/drawio/SKILL.md +0 -157
- package/template/.pi/skills/drawio/agents/interface.yaml +0 -26
- package/template/.pi/skills/drawio/agents/openai.yaml +0 -26
- package/template/.pi/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.pi/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.pi/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.pi/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.pi/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.pi/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.pi/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.pi/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.pi/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.pi/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.pi/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.pi/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.pi/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.pi/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.pi/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.pi/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.pi/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.pi/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.pi/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.pi/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.pi/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.pi/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.pi/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.pi/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.pi/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.pi/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.pi/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.pi/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.pi/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.pi/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.pi/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.pi/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.pi/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.pi/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.pi/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.pi/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.pi/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.pi/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.pi/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.pi/skills/drawio/evals/README.md +0 -17
- package/template/.pi/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.pi/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.pi/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.pi/skills/drawio/evals/evals.json +0 -223
- package/template/.pi/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.pi/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.pi/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.pi/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.pi/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.pi/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.pi/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.pi/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.pi/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.pi/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.pi/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.pi/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.pi/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.pi/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.pi/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.pi/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.pi/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.pi/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.pi/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.pi/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.pi/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.pi/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.pi/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.pi/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.pi/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.pi/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.pi/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.pi/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.pi/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.pi/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.pi/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.pi/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.pi/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.pi/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.pi/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.pi/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.pi/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.pi/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.pi/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.pi/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.pi/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.pi/skills/drawio/references/examples/README.md +0 -33
- package/template/.pi/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.pi/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.pi/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.pi/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.pi/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.pi/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.pi/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.pi/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.pi/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.pi/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.pi/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.pi/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.pi/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.pi/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.pi/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.pi/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.pi/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.pi/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.pi/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.pi/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.pi/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.pi/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.pi/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.pi/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.pi/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.pi/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.pi/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.pi/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.pi/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.pi/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.pi/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.pi/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.pi/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.pi/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.pi/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.pi/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.pi/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.pi/skills/drawio/references/palette.schema.json +0 -59
- package/template/.pi/skills/drawio/references/theme.schema.json +0 -249
- package/template/.pi/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.pi/skills/drawio/references/workflows/create.md +0 -195
- package/template/.pi/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.pi/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.pi/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.pi/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.pi/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.pi/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.pi/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.pi/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.pi/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.pi/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.pi/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.pi/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.pi/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.pi/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.pi/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.pi/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.pi/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.pi/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.pi/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.pi/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.pi/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.pi/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.pi/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.pi/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.pi/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.pi/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.pi/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.pi/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.pi/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.pi/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.pi/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.pi/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.pi/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.pi/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.pi/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.pi/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.pi/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.pi/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.pi/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.pi/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.pi/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.pi/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.pi/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.pi/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.pi/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.pi/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.pi/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.pi/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.pi/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.pi/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.pi/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.pi/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.pi/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.pi/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.pi/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.pi/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.pi/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.pi/skills/drawio/scripts/cli.js +0 -700
- package/template/.pi/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.pi/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.pi/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.pi/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.pi/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.pi/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.pi/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.pi/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.pi/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.pi/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.pi/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.pi/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.pi/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.pi/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.pi/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.pi/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.pi/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.pi/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.pi/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.pi/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.pi/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.pi/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.pi/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.pi/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.pi/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.pi/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.pi/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.pi/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.pi/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.pi/skills/drawio/scripts/install.bat +0 -64
- package/template/.pi/skills/drawio/scripts/install.sh +0 -44
- package/template/.pi/skills/drawio/scripts/math/index.js +0 -317
- package/template/.pi/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.pi/skills/drawio/scripts/package.json +0 -1
- package/template/.pi/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.pi/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.pi/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.pi/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.pi/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.pi/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.pi/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.pi/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.pi/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.pi/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.pi/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.pi/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.pi/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.pi/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.pi/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.pi/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.pi/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.pi/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.pi/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.pi/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.pi/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.pi/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.pi/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.pi/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.pi/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.pi/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.pi/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.pi/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.pi/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.pi/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.pi/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.pi/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.pi/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.pi/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.pi/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.pi/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.pi/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.pi/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.pi/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.pi/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.pi/skills/drawio/styles/schema.json +0 -112
- package/template/.pi/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.pi/skills/drawio-academic-skills/README.md +0 -103
- package/template/.pi/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.pi/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.pi/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.pi/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.pi/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.pi/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.pi/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.pi/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.pi/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.pi/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.pi/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.pi/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.pi/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.pi/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.pi/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.pi/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.pi/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.pi/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.pi/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.pi/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.pi/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.pi/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.pi/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.pi/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.pi/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.pi/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.pi/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.pi/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.pi/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.pi/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.pi/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.pi/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.pi/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.pi/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.pi/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.pi/skills/kb-retriever/README.md +0 -197
- package/template/.pi/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.pi/skills/kb-retriever/SKILL.md +0 -250
- package/template/.pi/skills/kb-retriever/manifest.json +0 -15
- package/template/.pi/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.pi/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.pi/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.pi/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.pi/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.pi/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.pi/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.qoder/skills/beautiful-article/README.md +0 -450
- package/template/.qoder/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.qoder/skills/beautiful-article/SKILL.md +0 -466
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.qoder/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.qoder/skills/beautiful-article/manifest.json +0 -15
- package/template/.qoder/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.qoder/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.qoder/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.qoder/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.qoder/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.qoder/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.qoder/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.qoder/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.qoder/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.qoder/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.qoder/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.qoder/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.qoder/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.qoder/skills/beautiful-article/references/cover.md +0 -208
- package/template/.qoder/skills/beautiful-article/references/harness.md +0 -35
- package/template/.qoder/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.qoder/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.qoder/skills/beautiful-article/references/layout.md +0 -46
- package/template/.qoder/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.qoder/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.qoder/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.qoder/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.qoder/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.qoder/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.qoder/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.qoder/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.qoder/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.qoder/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.qoder/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.qoder/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.qoder/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.qoder/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.qoder/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.qoder/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.qoder/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.qoder/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.qoder/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.qoder/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.qoder/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.qoder/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.qoder/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.qoder/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.qoder/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.qoder/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.qoder/skills/drawio/.mcp.json +0 -8
- package/template/.qoder/skills/drawio/CHANGELOG.md +0 -216
- package/template/.qoder/skills/drawio/SKILL.md +0 -157
- package/template/.qoder/skills/drawio/agents/interface.yaml +0 -26
- package/template/.qoder/skills/drawio/agents/openai.yaml +0 -26
- package/template/.qoder/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.qoder/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.qoder/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.qoder/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.qoder/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.qoder/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.qoder/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.qoder/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.qoder/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.qoder/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.qoder/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.qoder/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.qoder/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.qoder/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.qoder/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.qoder/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.qoder/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.qoder/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.qoder/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.qoder/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.qoder/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.qoder/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.qoder/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.qoder/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.qoder/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.qoder/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.qoder/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.qoder/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.qoder/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.qoder/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.qoder/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.qoder/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.qoder/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.qoder/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.qoder/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.qoder/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.qoder/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.qoder/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.qoder/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.qoder/skills/drawio/evals/README.md +0 -17
- package/template/.qoder/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.qoder/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.qoder/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.qoder/skills/drawio/evals/evals.json +0 -223
- package/template/.qoder/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.qoder/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.qoder/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.qoder/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.qoder/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.qoder/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.qoder/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.qoder/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.qoder/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.qoder/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.qoder/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.qoder/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.qoder/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.qoder/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.qoder/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.qoder/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.qoder/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.qoder/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.qoder/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.qoder/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.qoder/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.qoder/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.qoder/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.qoder/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.qoder/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.qoder/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.qoder/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.qoder/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.qoder/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.qoder/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.qoder/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.qoder/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.qoder/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.qoder/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.qoder/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.qoder/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.qoder/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.qoder/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.qoder/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.qoder/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.qoder/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.qoder/skills/drawio/references/examples/README.md +0 -33
- package/template/.qoder/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.qoder/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.qoder/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.qoder/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.qoder/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.qoder/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.qoder/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.qoder/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.qoder/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.qoder/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.qoder/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.qoder/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.qoder/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.qoder/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.qoder/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.qoder/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.qoder/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.qoder/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.qoder/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.qoder/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.qoder/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.qoder/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.qoder/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.qoder/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.qoder/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.qoder/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.qoder/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.qoder/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.qoder/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.qoder/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.qoder/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.qoder/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.qoder/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.qoder/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.qoder/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.qoder/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.qoder/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.qoder/skills/drawio/references/palette.schema.json +0 -59
- package/template/.qoder/skills/drawio/references/theme.schema.json +0 -249
- package/template/.qoder/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.qoder/skills/drawio/references/workflows/create.md +0 -195
- package/template/.qoder/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.qoder/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.qoder/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.qoder/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.qoder/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.qoder/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.qoder/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.qoder/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.qoder/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.qoder/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.qoder/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.qoder/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.qoder/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.qoder/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.qoder/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.qoder/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.qoder/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.qoder/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.qoder/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.qoder/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.qoder/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.qoder/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.qoder/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.qoder/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.qoder/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.qoder/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.qoder/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.qoder/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.qoder/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.qoder/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.qoder/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.qoder/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.qoder/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.qoder/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.qoder/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.qoder/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.qoder/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.qoder/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.qoder/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.qoder/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.qoder/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.qoder/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.qoder/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.qoder/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.qoder/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.qoder/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.qoder/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.qoder/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.qoder/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.qoder/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.qoder/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.qoder/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.qoder/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.qoder/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.qoder/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.qoder/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.qoder/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.qoder/skills/drawio/scripts/cli.js +0 -700
- package/template/.qoder/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.qoder/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.qoder/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.qoder/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.qoder/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.qoder/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.qoder/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.qoder/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.qoder/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.qoder/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.qoder/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.qoder/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.qoder/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.qoder/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.qoder/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.qoder/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.qoder/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.qoder/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.qoder/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.qoder/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.qoder/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.qoder/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.qoder/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.qoder/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.qoder/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.qoder/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.qoder/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.qoder/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.qoder/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.qoder/skills/drawio/scripts/install.bat +0 -64
- package/template/.qoder/skills/drawio/scripts/install.sh +0 -44
- package/template/.qoder/skills/drawio/scripts/math/index.js +0 -317
- package/template/.qoder/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.qoder/skills/drawio/scripts/package.json +0 -1
- package/template/.qoder/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.qoder/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.qoder/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.qoder/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.qoder/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.qoder/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.qoder/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.qoder/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.qoder/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.qoder/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.qoder/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.qoder/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.qoder/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.qoder/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.qoder/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.qoder/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.qoder/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.qoder/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.qoder/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.qoder/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.qoder/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.qoder/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.qoder/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.qoder/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.qoder/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.qoder/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.qoder/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.qoder/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.qoder/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.qoder/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.qoder/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.qoder/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.qoder/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.qoder/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.qoder/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.qoder/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.qoder/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.qoder/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.qoder/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.qoder/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.qoder/skills/drawio/styles/schema.json +0 -112
- package/template/.qoder/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.qoder/skills/drawio-academic-skills/README.md +0 -103
- package/template/.qoder/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.qoder/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.qoder/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.qoder/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.qoder/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.qoder/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.qoder/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.qoder/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.qoder/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.qoder/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.qoder/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.qoder/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.qoder/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.qoder/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.qoder/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.qoder/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.qoder/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.qoder/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.qoder/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.qoder/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.qoder/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.qoder/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.qoder/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.qoder/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.qoder/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.qoder/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.qoder/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.qoder/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.qoder/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.qoder/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.qoder/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.qoder/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.qoder/skills/kb-retriever/README.md +0 -197
- package/template/.qoder/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.qoder/skills/kb-retriever/SKILL.md +0 -250
- package/template/.qoder/skills/kb-retriever/manifest.json +0 -15
- package/template/.qoder/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.qoder/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.qoder/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.qoder/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.qoder/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.qoder/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.qoder/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/.trae/skills/beautiful-article/README.md +0 -450
- package/template/.trae/skills/beautiful-article/README.zh-CN.md +0 -450
- package/template/.trae/skills/beautiful-article/SKILL.md +0 -466
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/__yss_dotfile__.npmrc +0 -1
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/article/Article.tsx +0 -69
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/article/Cover.tsx +0 -172
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/article/main.tsx +0 -26
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/article/sections/01-opening.tsx +0 -30
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/index.html +0 -19
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/package.json +0 -26
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/tsconfig.json +0 -20
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/tsconfig.node.json +0 -11
- package/template/.trae/skills/beautiful-article/assets/scaffold-template/vite.config.ts +0 -18
- package/template/.trae/skills/beautiful-article/manifest.json +0 -15
- package/template/.trae/skills/beautiful-article/references/article-types/briefing.md +0 -32
- package/template/.trae/skills/beautiful-article/references/article-types/dialogue.md +0 -30
- package/template/.trae/skills/beautiful-article/references/article-types/essay.md +0 -31
- package/template/.trae/skills/beautiful-article/references/article-types/explainer.md +0 -32
- package/template/.trae/skills/beautiful-article/references/article-types/full-report.md +0 -32
- package/template/.trae/skills/beautiful-article/references/article-types/interactive-explainer.md +0 -66
- package/template/.trae/skills/beautiful-article/references/article-types/longform.md +0 -32
- package/template/.trae/skills/beautiful-article/references/article-types/review.md +0 -32
- package/template/.trae/skills/beautiful-article/references/article-types/tutorial.md +0 -30
- package/template/.trae/skills/beautiful-article/references/article-types/visual-essay.md +0 -33
- package/template/.trae/skills/beautiful-article/references/article-types.md +0 -42
- package/template/.trae/skills/beautiful-article/references/asset-policy.md +0 -71
- package/template/.trae/skills/beautiful-article/references/component-policy.md +0 -103
- package/template/.trae/skills/beautiful-article/references/cover.md +0 -208
- package/template/.trae/skills/beautiful-article/references/harness.md +0 -35
- package/template/.trae/skills/beautiful-article/references/html-output.md +0 -42
- package/template/.trae/skills/beautiful-article/references/information-density.md +0 -50
- package/template/.trae/skills/beautiful-article/references/layout.md +0 -46
- package/template/.trae/skills/beautiful-article/references/pdf-output.md +0 -208
- package/template/.trae/skills/beautiful-article/references/plan-template.md +0 -109
- package/template/.trae/skills/beautiful-article/references/raw-policy.md +0 -86
- package/template/.trae/skills/beautiful-article/references/repair-policy.md +0 -35
- package/template/.trae/skills/beautiful-article/references/review-checklist.md +0 -133
- package/template/.trae/skills/beautiful-article/references/scaffold.md +0 -77
- package/template/.trae/skills/beautiful-article/references/section-build.md +0 -100
- package/template/.trae/skills/beautiful-article/references/source-to-markdown.md +0 -118
- package/template/.trae/skills/beautiful-article/references/theme-selection.md +0 -48
- package/template/.trae/skills/beautiful-article/scripts/html-to-pdf.sh +0 -160
- package/template/.trae/skills/beautiful-article/scripts/pdf-print-overrides.css +0 -192
- package/template/.trae/skills/beautiful-article/scripts/scaffold.sh +0 -172
- package/template/.trae/skills/beautiful-article/scripts/source-to-markdown-markitdown.py +0 -100
- package/template/.trae/skills/beautiful-article/scripts/source-to-markdown.py +0 -174
- package/template/.trae/skills/beautiful-article/theme-profiles/andy.md +0 -57
- package/template/.trae/skills/beautiful-article/theme-profiles/bayer.md +0 -57
- package/template/.trae/skills/beautiful-article/theme-profiles/bodoni.md +0 -57
- package/template/.trae/skills/beautiful-article/theme-profiles/freddie.md +0 -57
- package/template/.trae/skills/beautiful-article/theme-profiles/fuller.md +0 -56
- package/template/.trae/skills/beautiful-article/theme-profiles/index.json +0 -112
- package/template/.trae/skills/beautiful-article/theme-profiles/knuth.md +0 -60
- package/template/.trae/skills/beautiful-article/theme-profiles/press.md +0 -61
- package/template/.trae/skills/beautiful-article/theme-profiles/shannon.md +0 -64
- package/template/.trae/skills/beautiful-article/theme-profiles/sottsass.md +0 -57
- package/template/.trae/skills/beautiful-article/theme-profiles/tufte.md +0 -64
- package/template/.trae/skills/beautiful-article/theme-profiles/vignelli.md +0 -63
- package/template/.trae/skills/drawio/.mcp.json +0 -8
- package/template/.trae/skills/drawio/CHANGELOG.md +0 -216
- package/template/.trae/skills/drawio/SKILL.md +0 -157
- package/template/.trae/skills/drawio/agents/interface.yaml +0 -26
- package/template/.trae/skills/drawio/agents/openai.yaml +0 -26
- package/template/.trae/skills/drawio/assets/catalog/ai-icons.json.gz +0 -0
- package/template/.trae/skills/drawio/assets/catalog/shape-catalog.json.gz +0 -0
- package/template/.trae/skills/drawio/assets/catalog/shape-index.json.gz +0 -0
- package/template/.trae/skills/drawio/assets/examples/login-flow-test.drawio +0 -6
- package/template/.trae/skills/drawio/assets/examples/login-flow.drawio +0 -6
- package/template/.trae/skills/drawio/assets/examples/microservices.drawio +0 -6
- package/template/.trae/skills/drawio/assets/examples/neural-network.drawio +0 -6
- package/template/.trae/skills/drawio/assets/licenses/architecture-diagram-generator-MIT.txt +0 -26
- package/template/.trae/skills/drawio/assets/licenses/drawio-mcp-shape-index-Apache-2.0.txt +0 -8
- package/template/.trae/skills/drawio/assets/licenses/lobe-icons-MIT.txt +0 -26
- package/template/.trae/skills/drawio/assets/licenses/lucide-ISC.txt +0 -41
- package/template/.trae/skills/drawio/assets/palettes/c4-blue.json +0 -29
- package/template/.trae/skills/drawio/assets/palettes/cloud-aws.json +0 -30
- package/template/.trae/skills/drawio/assets/palettes/drawio-classic.json +0 -21
- package/template/.trae/skills/drawio/assets/palettes/ieee-bw.json +0 -26
- package/template/.trae/skills/drawio/assets/palettes/ieee-color.json +0 -17
- package/template/.trae/skills/drawio/assets/palettes/journal-jama.json +0 -20
- package/template/.trae/skills/drawio/assets/palettes/journal-npg.json +0 -23
- package/template/.trae/skills/drawio/assets/palettes/matlab-lines.json +0 -20
- package/template/.trae/skills/drawio/assets/palettes/morandi.json +0 -21
- package/template/.trae/skills/drawio/assets/palettes/okabe-ito.json +0 -21
- package/template/.trae/skills/drawio/assets/palettes/seaborn-colorblind.json +0 -23
- package/template/.trae/skills/drawio/assets/palettes/tol-bright.json +0 -20
- package/template/.trae/skills/drawio/assets/palettes/tol-high-contrast.json +0 -18
- package/template/.trae/skills/drawio/assets/palettes/tol-light-fill.json +0 -22
- package/template/.trae/skills/drawio/assets/palettes/tol-muted.json +0 -22
- package/template/.trae/skills/drawio/assets/schemas/graph-projection.schema.json +0 -135
- package/template/.trae/skills/drawio/assets/schemas/spec.schema.json +0 -620
- package/template/.trae/skills/drawio/assets/themes/academic-color.json +0 -299
- package/template/.trae/skills/drawio/assets/themes/academic.json +0 -245
- package/template/.trae/skills/drawio/assets/themes/arch-dark.json +0 -253
- package/template/.trae/skills/drawio/assets/themes/blueprint.json +0 -246
- package/template/.trae/skills/drawio/assets/themes/dark-luxury.json +0 -246
- package/template/.trae/skills/drawio/assets/themes/dark-terminal.json +0 -244
- package/template/.trae/skills/drawio/assets/themes/dark.json +0 -220
- package/template/.trae/skills/drawio/assets/themes/high-contrast.json +0 -220
- package/template/.trae/skills/drawio/assets/themes/nature.json +0 -220
- package/template/.trae/skills/drawio/assets/themes/notion-clean.json +0 -246
- package/template/.trae/skills/drawio/assets/themes/tech-blue.json +0 -220
- package/template/.trae/skills/drawio/evals/README.md +0 -17
- package/template/.trae/skills/drawio/evals/ai-icon-catalog-cases.json +0 -89
- package/template/.trae/skills/drawio/evals/baseline-prompts.json +0 -122
- package/template/.trae/skills/drawio/evals/darwin-results.tsv +0 -4
- package/template/.trae/skills/drawio/evals/evals.json +0 -223
- package/template/.trae/skills/drawio/evals/evidence/ai-icon-catalog-desktop.json +0 -134
- package/template/.trae/skills/drawio/evals/fixtures/ai-icons-advanced-svg.yaml +0 -25
- package/template/.trae/skills/drawio/evals/fixtures/ai-icons-cjk-agent-rag.yaml +0 -55
- package/template/.trae/skills/drawio/evals/fixtures/ai-icons-core-aliases.yaml +0 -50
- package/template/.trae/skills/drawio/evals/fixtures/ai-icons-current-color.yaml +0 -25
- package/template/.trae/skills/drawio/evals/fixtures/ai-icons-gradients.yaml +0 -25
- package/template/.trae/skills/drawio/evals/fixtures/import-simple-compressed.drawio +0 -5
- package/template/.trae/skills/drawio/evals/fixtures/import-simple.drawio +0 -28
- package/template/.trae/skills/drawio/evals/fixtures/industrial-architecture.yaml +0 -239
- package/template/.trae/skills/drawio/evals/fixtures/replicate-academic-highlight.svg +0 -13
- package/template/.trae/skills/drawio/evals/fixtures/replicate-brand-architecture.svg +0 -14
- package/template/.trae/skills/drawio/evals/fixtures/replicate-warm-approval.svg +0 -13
- package/template/.trae/skills/drawio/evals/fixtures/vision-tall-workflow.yaml +0 -47
- package/template/.trae/skills/drawio/evals/upstream-integration-cases.json +0 -78
- package/template/.trae/skills/drawio/evals/vision-preview-cases.json +0 -147
- package/template/.trae/skills/drawio/references/docs/agent-diagrams.md +0 -164
- package/template/.trae/skills/drawio/references/docs/ah-format.md +0 -322
- package/template/.trae/skills/drawio/references/docs/architecture-diagrams.md +0 -159
- package/template/.trae/skills/drawio/references/docs/canonical-graph-projection.md +0 -54
- package/template/.trae/skills/drawio/references/docs/code-importers.md +0 -53
- package/template/.trae/skills/drawio/references/docs/config-importers.md +0 -68
- package/template/.trae/skills/drawio/references/docs/design-system/README.md +0 -204
- package/template/.trae/skills/drawio/references/docs/design-system/color-guide.md +0 -255
- package/template/.trae/skills/drawio/references/docs/design-system/connectors.md +0 -388
- package/template/.trae/skills/drawio/references/docs/design-system/formulas.md +0 -196
- package/template/.trae/skills/drawio/references/docs/design-system/icons.md +0 -332
- package/template/.trae/skills/drawio/references/docs/design-system/shapes.md +0 -269
- package/template/.trae/skills/drawio/references/docs/design-system/specification.md +0 -754
- package/template/.trae/skills/drawio/references/docs/design-system/themes.md +0 -441
- package/template/.trae/skills/drawio/references/docs/design-system/tokens.md +0 -232
- package/template/.trae/skills/drawio/references/docs/edge-quality-rules.md +0 -65
- package/template/.trae/skills/drawio/references/docs/ieee-network-diagrams.md +0 -145
- package/template/.trae/skills/drawio/references/docs/live-snapshots-drift.md +0 -72
- package/template/.trae/skills/drawio/references/docs/math-typesetting.md +0 -258
- package/template/.trae/skills/drawio/references/docs/mcp-tools.md +0 -85
- package/template/.trae/skills/drawio/references/docs/migration-readiness.md +0 -73
- package/template/.trae/skills/drawio/references/docs/stencil-library-guide.md +0 -97
- package/template/.trae/skills/drawio/references/docs/style-extraction.md +0 -261
- package/template/.trae/skills/drawio/references/docs/style-presets.md +0 -126
- package/template/.trae/skills/drawio/references/docs/upstream-capability-compatibility.md +0 -61
- package/template/.trae/skills/drawio/references/docs/xml-format.md +0 -53
- package/template/.trae/skills/drawio/references/examples/README.md +0 -33
- package/template/.trae/skills/drawio/references/examples/agentic-rag.yaml +0 -71
- package/template/.trae/skills/drawio/references/examples/arch-dark-aws-serverless.yaml +0 -103
- package/template/.trae/skills/drawio/references/examples/arch-dark-microservices.yaml +0 -146
- package/template/.trae/skills/drawio/references/examples/arch-dark-web-app.yaml +0 -62
- package/template/.trae/skills/drawio/references/examples/auto-layout-workflow.yaml +0 -81
- package/template/.trae/skills/drawio/references/examples/aws-vpc-topology.yaml +0 -66
- package/template/.trae/skills/drawio/references/examples/campus-lan-topology.yaml +0 -89
- package/template/.trae/skills/drawio/references/examples/cloud-reference-architecture.yaml +0 -34
- package/template/.trae/skills/drawio/references/examples/e-commerce.yaml +0 -141
- package/template/.trae/skills/drawio/references/examples/importers/README.md +0 -10
- package/template/.trae/skills/drawio/references/examples/importers/live/compose-drift-evidence.json +0 -49
- package/template/.trae/skills/drawio/references/examples/importers/live/compose-drift-report.json +0 -300
- package/template/.trae/skills/drawio/references/examples/importers/live/compose-drift.spec.yaml +0 -75
- package/template/.trae/skills/drawio/references/examples/importers/live/docker-inspect.json +0 -55
- package/template/.trae/skills/drawio/references/examples/importers/live/drift-declared-compose.yaml +0 -13
- package/template/.trae/skills/drawio/references/examples/importers/live/kubernetes-live.json +0 -71
- package/template/.trae/skills/drawio/references/examples/importers/live/terraform-state.json +0 -70
- package/template/.trae/skills/drawio/references/examples/importers/schema.sql +0 -10
- package/template/.trae/skills/drawio/references/examples/importers/terraform.tf +0 -9
- package/template/.trae/skills/drawio/references/examples/login-flow.yaml +0 -65
- package/template/.trae/skills/drawio/references/examples/mem0-memory-layer.yaml +0 -63
- package/template/.trae/skills/drawio/references/examples/microservices.yaml +0 -58
- package/template/.trae/skills/drawio/references/examples/multi-agent-orchestration.yaml +0 -67
- package/template/.trae/skills/drawio/references/examples/neural-network.yaml +0 -66
- package/template/.trae/skills/drawio/references/examples/onprem-dmz-topology.yaml +0 -62
- package/template/.trae/skills/drawio/references/examples/palettes/README.md +0 -29
- package/template/.trae/skills/drawio/references/examples/palettes/c4-blue.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/c4-blue.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/cloud-aws.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/cloud-aws.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/drawio-classic.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/drawio-classic.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/ieee-bw.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/ieee-bw.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/ieee-color.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/ieee-color.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/journal-jama.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/journal-jama.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/journal-npg.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/journal-npg.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/matlab-lines.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/matlab-lines.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/morandi.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/morandi.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/okabe-ito.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/okabe-ito.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/palette-swatch.template.yaml +0 -56
- package/template/.trae/skills/drawio/references/examples/palettes/seaborn-colorblind.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/seaborn-colorblind.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/tol-bright.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/tol-bright.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/tol-high-contrast.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/tol-high-contrast.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/tol-light-fill.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/tol-light-fill.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/palettes/tol-muted.drawio +0 -6
- package/template/.trae/skills/drawio/references/examples/palettes/tol-muted.svg +0 -36
- package/template/.trae/skills/drawio/references/examples/rag-pipeline.yaml +0 -67
- package/template/.trae/skills/drawio/references/examples/replicated-brand-flow.yaml +0 -89
- package/template/.trae/skills/drawio/references/examples/swimlane-engineering-review.yaml +0 -44
- package/template/.trae/skills/drawio/references/examples/tiered-network-topology.yaml +0 -59
- package/template/.trae/skills/drawio/references/examples/tool-call-loop.yaml +0 -63
- package/template/.trae/skills/drawio/references/examples/vendor-device-mapping.yaml +0 -46
- package/template/.trae/skills/drawio/references/official/style-reference.md +0 -936
- package/template/.trae/skills/drawio/references/official/xml-reference.md +0 -262
- package/template/.trae/skills/drawio/references/palette.schema.json +0 -59
- package/template/.trae/skills/drawio/references/theme.schema.json +0 -249
- package/template/.trae/skills/drawio/references/upstream/pure-drawio-skill.md +0 -615
- package/template/.trae/skills/drawio/references/workflows/create.md +0 -195
- package/template/.trae/skills/drawio/references/workflows/edit.md +0 -174
- package/template/.trae/skills/drawio/references/workflows/replicate.md +0 -239
- package/template/.trae/skills/drawio/references/workflows/visual-review.md +0 -108
- package/template/.trae/skills/drawio/reports/output_quality_scorecard.md +0 -106
- package/template/.trae/skills/drawio/reports/upstream-port-release-evidence.md +0 -43
- package/template/.trae/skills/drawio/scripts/adapters/ci.js +0 -139
- package/template/.trae/skills/drawio/scripts/adapters/ci.test.js +0 -41
- package/template/.trae/skills/drawio/scripts/adapters/code-common.js +0 -171
- package/template/.trae/skills/drawio/scripts/adapters/code-imports.test.js +0 -80
- package/template/.trae/skills/drawio/scripts/adapters/code-parsers.integration.test.js +0 -71
- package/template/.trae/skills/drawio/scripts/adapters/compose.js +0 -134
- package/template/.trae/skills/drawio/scripts/adapters/compose.test.js +0 -54
- package/template/.trae/skills/drawio/scripts/adapters/config-adapters.integration.test.js +0 -58
- package/template/.trae/skills/drawio/scripts/adapters/config-common.js +0 -131
- package/template/.trae/skills/drawio/scripts/adapters/config-common.test.js +0 -32
- package/template/.trae/skills/drawio/scripts/adapters/docker-inspect.js +0 -127
- package/template/.trae/skills/drawio/scripts/adapters/docker-inspect.test.js +0 -62
- package/template/.trae/skills/drawio/scripts/adapters/fixtures/raster-extraction.json +0 -31
- package/template/.trae/skills/drawio/scripts/adapters/go-code-adapter.test.js +0 -59
- package/template/.trae/skills/drawio/scripts/adapters/go-code.js +0 -168
- package/template/.trae/skills/drawio/scripts/adapters/graph-drift.file.test.js +0 -67
- package/template/.trae/skills/drawio/scripts/adapters/graph-drift.js +0 -358
- package/template/.trae/skills/drawio/scripts/adapters/graph-drift.test.js +0 -272
- package/template/.trae/skills/drawio/scripts/adapters/graph-projection.js +0 -335
- package/template/.trae/skills/drawio/scripts/adapters/graph-projection.test.js +0 -141
- package/template/.trae/skills/drawio/scripts/adapters/identity.js +0 -244
- package/template/.trae/skills/drawio/scripts/adapters/identity.test.js +0 -123
- package/template/.trae/skills/drawio/scripts/adapters/index.js +0 -489
- package/template/.trae/skills/drawio/scripts/adapters/index.test.js +0 -152
- package/template/.trae/skills/drawio/scripts/adapters/js-code-adapter.test.js +0 -42
- package/template/.trae/skills/drawio/scripts/adapters/js-code.js +0 -141
- package/template/.trae/skills/drawio/scripts/adapters/kubernetes-live.test.js +0 -46
- package/template/.trae/skills/drawio/scripts/adapters/kubernetes.js +0 -258
- package/template/.trae/skills/drawio/scripts/adapters/kubernetes.test.js +0 -81
- package/template/.trae/skills/drawio/scripts/adapters/openapi.js +0 -98
- package/template/.trae/skills/drawio/scripts/adapters/openapi.test.js +0 -46
- package/template/.trae/skills/drawio/scripts/adapters/optional-python-code.js +0 -16
- package/template/.trae/skills/drawio/scripts/adapters/optional-python.integration.test.js +0 -32
- package/template/.trae/skills/drawio/scripts/adapters/optional-python.js +0 -127
- package/template/.trae/skills/drawio/scripts/adapters/optional-python.test.js +0 -55
- package/template/.trae/skills/drawio/scripts/adapters/projection-to-spec.js +0 -116
- package/template/.trae/skills/drawio/scripts/adapters/projection-to-spec.test.js +0 -139
- package/template/.trae/skills/drawio/scripts/adapters/python/code-parser-worker.py +0 -93
- package/template/.trae/skills/drawio/scripts/adapters/python/config-parser-worker.py +0 -237
- package/template/.trae/skills/drawio/scripts/adapters/python/requirements.txt +0 -2
- package/template/.trae/skills/drawio/scripts/adapters/python-code-adapter.test.js +0 -127
- package/template/.trae/skills/drawio/scripts/adapters/python-code.js +0 -246
- package/template/.trae/skills/drawio/scripts/adapters/raster-extraction.js +0 -258
- package/template/.trae/skills/drawio/scripts/adapters/raster-extraction.test.js +0 -308
- package/template/.trae/skills/drawio/scripts/adapters/rust-code-adapter.test.js +0 -64
- package/template/.trae/skills/drawio/scripts/adapters/rust-code.js +0 -207
- package/template/.trae/skills/drawio/scripts/adapters/sql-ddl.js +0 -118
- package/template/.trae/skills/drawio/scripts/adapters/sql-ddl.test.js +0 -56
- package/template/.trae/skills/drawio/scripts/adapters/terraform-config.js +0 -141
- package/template/.trae/skills/drawio/scripts/adapters/terraform-config.test.js +0 -67
- package/template/.trae/skills/drawio/scripts/adapters/terraform-state.js +0 -157
- package/template/.trae/skills/drawio/scripts/adapters/terraform-state.test.js +0 -69
- package/template/.trae/skills/drawio/scripts/cli.js +0 -700
- package/template/.trae/skills/drawio/scripts/dsl/ah-to-drawio.js +0 -276
- package/template/.trae/skills/drawio/scripts/dsl/ah-to-drawio.test.js +0 -77
- package/template/.trae/skills/drawio/scripts/dsl/ai-icon-catalog.js +0 -126
- package/template/.trae/skills/drawio/scripts/dsl/ai-icon-catalog.test.js +0 -86
- package/template/.trae/skills/drawio/scripts/dsl/auto-layout.js +0 -206
- package/template/.trae/skills/drawio/scripts/dsl/auto-layout.test.js +0 -249
- package/template/.trae/skills/drawio/scripts/dsl/catalog-ranking.js +0 -54
- package/template/.trae/skills/drawio/scripts/dsl/catalog-search.js +0 -58
- package/template/.trae/skills/drawio/scripts/dsl/catalog-search.test.js +0 -44
- package/template/.trae/skills/drawio/scripts/dsl/document-spec.js +0 -256
- package/template/.trae/skills/drawio/scripts/dsl/document-spec.test.js +0 -147
- package/template/.trae/skills/drawio/scripts/dsl/drawio-to-spec.js +0 -497
- package/template/.trae/skills/drawio/scripts/dsl/examples-baseline.test.js +0 -30
- package/template/.trae/skills/drawio/scripts/dsl/icon-mappings.js +0 -65
- package/template/.trae/skills/drawio/scripts/dsl/icon-mappings.test.js +0 -19
- package/template/.trae/skills/drawio/scripts/dsl/icon-resolver.js +0 -153
- package/template/.trae/skills/drawio/scripts/dsl/icon-resolver.test.js +0 -62
- package/template/.trae/skills/drawio/scripts/dsl/multi-page.js +0 -224
- package/template/.trae/skills/drawio/scripts/dsl/multi-page.test.js +0 -107
- package/template/.trae/skills/drawio/scripts/dsl/palette-catalog.test.js +0 -138
- package/template/.trae/skills/drawio/scripts/dsl/palette-integration.test.js +0 -182
- package/template/.trae/skills/drawio/scripts/dsl/palette-validate.js +0 -91
- package/template/.trae/skills/drawio/scripts/dsl/palette.js +0 -302
- package/template/.trae/skills/drawio/scripts/dsl/palette.test.js +0 -197
- package/template/.trae/skills/drawio/scripts/dsl/shape-catalog.js +0 -89
- package/template/.trae/skills/drawio/scripts/dsl/shape-catalog.test.js +0 -21
- package/template/.trae/skills/drawio/scripts/dsl/spec-to-drawio.js +0 -3739
- package/template/.trae/skills/drawio/scripts/dsl/spec-to-drawio.test.js +0 -3022
- package/template/.trae/skills/drawio/scripts/generate-palette-swatches.js +0 -87
- package/template/.trae/skills/drawio/scripts/install.bat +0 -64
- package/template/.trae/skills/drawio/scripts/install.sh +0 -44
- package/template/.trae/skills/drawio/scripts/math/index.js +0 -317
- package/template/.trae/skills/drawio/scripts/math/index.test.js +0 -62
- package/template/.trae/skills/drawio/scripts/package.json +0 -1
- package/template/.trae/skills/drawio/scripts/postprocess/artifacts.js +0 -142
- package/template/.trae/skills/drawio/scripts/postprocess/artifacts.test.js +0 -86
- package/template/.trae/skills/drawio/scripts/postprocess/cli.js +0 -228
- package/template/.trae/skills/drawio/scripts/postprocess/cli.test.js +0 -129
- package/template/.trae/skills/drawio/scripts/postprocess/fixtures/bundle.yaml +0 -75
- package/template/.trae/skills/drawio/scripts/postprocess/fixtures/legacy.yaml +0 -21
- package/template/.trae/skills/drawio/scripts/postprocess/html.js +0 -197
- package/template/.trae/skills/drawio/scripts/postprocess/html.test.js +0 -50
- package/template/.trae/skills/drawio/scripts/postprocess/index.js +0 -5
- package/template/.trae/skills/drawio/scripts/postprocess/input.js +0 -112
- package/template/.trae/skills/drawio/scripts/postprocess/input.test.js +0 -73
- package/template/.trae/skills/drawio/scripts/postprocess/mutate.js +0 -584
- package/template/.trae/skills/drawio/scripts/postprocess/mutate.test.js +0 -193
- package/template/.trae/skills/drawio/scripts/postprocess/projection.js +0 -178
- package/template/.trae/skills/drawio/scripts/postprocess/projection.test.js +0 -67
- package/template/.trae/skills/drawio/scripts/runtime/artifacts.js +0 -283
- package/template/.trae/skills/drawio/scripts/runtime/desktop.js +0 -204
- package/template/.trae/skills/drawio/scripts/runtime/desktop.test.js +0 -121
- package/template/.trae/skills/drawio/scripts/runtime/diagrams-net-url.js +0 -122
- package/template/.trae/skills/drawio/scripts/runtime/export-stability.js +0 -75
- package/template/.trae/skills/drawio/scripts/runtime/export-stability.test.js +0 -81
- package/template/.trae/skills/drawio/scripts/runtime/png-inspection.js +0 -157
- package/template/.trae/skills/drawio/scripts/runtime/png-inspection.test.js +0 -120
- package/template/.trae/skills/drawio/scripts/runtime/vision-preview.js +0 -77
- package/template/.trae/skills/drawio/scripts/runtime/vision-preview.test.js +0 -103
- package/template/.trae/skills/drawio/scripts/shared/ai-icon-contract.js +0 -13
- package/template/.trae/skills/drawio/scripts/shared/xml-utils.js +0 -241
- package/template/.trae/skills/drawio/scripts/svg/drawio-to-svg.js +0 -918
- package/template/.trae/skills/drawio/scripts/svg/drawio-to-svg.test.js +0 -763
- package/template/.trae/skills/drawio/scripts/tools/build-ai-icon-catalog.js +0 -208
- package/template/.trae/skills/drawio/scripts/tools/build-ai-icon-catalog.test.js +0 -107
- package/template/.trae/skills/drawio/scripts/tools/build-shape-catalog.js +0 -84
- package/template/.trae/skills/drawio/scripts/tools/build-shape-catalog.test.js +0 -43
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha-color.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/alpha.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta-brand-color.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/beta.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai-text-color.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/icons/civitai.svg +0 -1
- package/template/.trae/skills/drawio/scripts/tools/fixtures/ai-icons-package/package.json +0 -5
- package/template/.trae/skills/drawio/scripts/vendor/elkjs/LICENSE.md +0 -264
- package/template/.trae/skills/drawio/scripts/vendor/elkjs/README.md +0 -18
- package/template/.trae/skills/drawio/scripts/vendor/elkjs/elk.bundled.cjs +0 -6589
- package/template/.trae/skills/drawio/styles/built-in/corporate.json +0 -49
- package/template/.trae/skills/drawio/styles/built-in/default.json +0 -49
- package/template/.trae/skills/drawio/styles/built-in/handdrawn.json +0 -49
- package/template/.trae/skills/drawio/styles/schema.json +0 -112
- package/template/.trae/skills/drawio-academic-skills/CHANGELOG.md +0 -67
- package/template/.trae/skills/drawio-academic-skills/README.md +0 -103
- package/template/.trae/skills/drawio-academic-skills/README_CN.md +0 -103
- package/template/.trae/skills/drawio-academic-skills/SKILL.md +0 -161
- package/template/.trae/skills/drawio-academic-skills/__yss_dotfile__.gitignore +0 -12
- package/template/.trae/skills/drawio-academic-skills/agents/interface.yaml +0 -25
- package/template/.trae/skills/drawio-academic-skills/agents/openai.yaml +0 -24
- package/template/.trae/skills/drawio-academic-skills/evals/README.md +0 -13
- package/template/.trae/skills/drawio-academic-skills/evals/baseline-prompts.json +0 -52
- package/template/.trae/skills/drawio-academic-skills/evals/darwin-results.tsv +0 -3
- package/template/.trae/skills/drawio-academic-skills/evals/evals.json +0 -228
- package/template/.trae/skills/drawio-academic-skills/evals/test-prompts.json +0 -17
- package/template/.trae/skills/drawio-academic-skills/references/docs/academic-export-checklist.md +0 -45
- package/template/.trae/skills/drawio-academic-skills/references/docs/academic-figure-playbook.md +0 -349
- package/template/.trae/skills/drawio-academic-skills/references/docs/publication-overlay.md +0 -206
- package/template/.trae/skills/drawio-academic-skills/references/examples/ablation-study-pipeline.yaml +0 -39
- package/template/.trae/skills/drawio-academic-skills/references/examples/ieee-network-paper.yaml +0 -44
- package/template/.trae/skills/drawio-academic-skills/references/examples/industrial-architecture-cn-paper.yaml +0 -106
- package/template/.trae/skills/drawio-academic-skills/references/examples/max-pooling-operation-paper.yaml +0 -75
- package/template/.trae/skills/drawio-academic-skills/references/examples/research-pipeline.yaml +0 -54
- package/template/.trae/skills/drawio-academic-skills/references/examples/system-architecture-paper.yaml +0 -45
- package/template/.trae/skills/drawio-academic-skills/references/examples/technical-roadmap-paper.yaml +0 -54
- package/template/.trae/skills/drawio-academic-skills/references/examples/yolo-model-architecture-paper.yaml +0 -118
- package/template/.trae/skills/drawio-academic-skills/references/templates/multi-module-system-compact.yaml +0 -251
- package/template/.trae/skills/drawio-academic-skills/references/templates/neural-network-architecture-compact.yaml +0 -267
- package/template/.trae/skills/excalidraw-diagram-generator/SKILL.md +0 -634
- package/template/.trae/skills/excalidraw-diagram-generator/references/element-types.md +0 -497
- package/template/.trae/skills/excalidraw-diagram-generator/references/excalidraw-schema.md +0 -350
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/README.md +0 -193
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/__yss_dotfile__.gitignore +0 -34
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-arrow.py +0 -315
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/add-icon-to-diagram.py +0 -406
- package/template/.trae/skills/excalidraw-diagram-generator/scripts/split-excalidraw-library.py +0 -183
- package/template/.trae/skills/excalidraw-diagram-generator/templates/business-flow-swimlane-template.excalidraw +0 -334
- package/template/.trae/skills/excalidraw-diagram-generator/templates/class-diagram-template.excalidraw +0 -558
- package/template/.trae/skills/excalidraw-diagram-generator/templates/data-flow-diagram-template.excalidraw +0 -279
- package/template/.trae/skills/excalidraw-diagram-generator/templates/er-diagram-template.excalidraw +0 -662
- package/template/.trae/skills/excalidraw-diagram-generator/templates/flowchart-template.excalidraw +0 -179
- package/template/.trae/skills/excalidraw-diagram-generator/templates/mindmap-template.excalidraw +0 -244
- package/template/.trae/skills/excalidraw-diagram-generator/templates/relationship-template.excalidraw +0 -145
- package/template/.trae/skills/excalidraw-diagram-generator/templates/sequence-diagram-template.excalidraw +0 -509
- package/template/.trae/skills/kb-retriever/README.md +0 -197
- package/template/.trae/skills/kb-retriever/README.zh-CN.md +0 -197
- package/template/.trae/skills/kb-retriever/SKILL.md +0 -250
- package/template/.trae/skills/kb-retriever/manifest.json +0 -15
- package/template/.trae/skills/kb-retriever/references/excel_analysis.md +0 -129
- package/template/.trae/skills/kb-retriever/references/excel_reading.md +0 -72
- package/template/.trae/skills/kb-retriever/references/pdf_reading.md +0 -362
- package/template/.trae/skills/kb-retriever/scripts/convert_pdf_to_images.py +0 -35
- package/template/.trae/skills/yss-db2mybatis/requirements.txt +0 -4
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.py +0 -1494
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.py +0 -728
- package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.py +0 -155
- package/template/.trae/skills/yss-design-system/scripts/validate-frontmatter.py +0 -50
- package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.py +0 -371
- package/template/.trae/skills/yss-web-controller/scripts/generate_controller.py +0 -293
- package/template/.trae/skills/yss-web-controller/scripts/test_generate_controller.py +0 -68
- package/template/docs/adr/0004-split-lifecycle-and-router-registry-domains.md +0 -5
- package/template/docs/adr/0005-cross-repository-ecosystem-release-manifest.md +0 -5
- package/template/docs/adr/0007-separate-skill-routing-registry-from-integrity-lock.md +0 -5
- package/template/docs/implementation/create-yss-spec-repository-mode-contract.md +0 -90
- package/template/docs/process/harness-optimization-backlog.md +0 -9
- package/template/docs/process/harness-work-unit-map.md +0 -16
- package/template/docs/releases/next-major-template-governance.md +0 -32
- package/template/docs/reviews/lifecycle-registry-phase0-1-red-green-2026-08-17.md +0 -61
- package/template/docs/reviews/matt-yss-p0-ticket-review-git-red-green-2026-08-17.md +0 -91
- package/template/docs/reviews/openapi-skill-primary-source-research-2026-08-16.md +0 -76
- package/template/docs/reviews/openapi-yaml-first-independent-review-2026-08-16.md +0 -121
- package/template/docs/reviews/openapi-yaml-first-pressure-scenarios-2026-08-16.md +0 -191
- package/template/docs/reviews/openapi-yaml-first-red-green-2026-08-16.md +0 -76
- package/template/docs/reviews/openapi-yaml-json-output-independent-review-2026-08-16.md +0 -30
- package/template/docs/reviews/openapi-yaml-json-output-scope-red-green-2026-08-16.md +0 -154
- package/template/docs/reviews/research-create-yss-spec-2026-08-10.md +0 -141
- package/template/docs/reviews/research-create-yss-spec-refresh-2026-08-16.md +0 -164
- package/template/docs/reviews/security-permission-lifecycle-simplification-red-green-2026-08-16.md +0 -43
- package/template/docs/reviews/template-release-review-remediation-red-green-2026-08-17.md +0 -41
- package/template/docs/reviews/yss-local-tracker-red-green-2026-08-10.md +0 -50
- package/template/docs/user-guide//345/233/276/347/244/272/347/224/237/346/210/220/345/231/250/344/275/277/347/224/250/346/214/207/345/215/227.md +0 -143
- package/template/scripts/implementation-path-policy.rb +0 -50
- package/template/scripts/lifecycle-registry.rb +0 -194
- package/template/scripts/test-export-yss-skills.rb +0 -130
- package/template/scripts/test-lifecycle-registry.rb +0 -74
|
@@ -1,3739 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* spec-to-drawio.js
|
|
3
|
-
* Converts YAML/JSON specification to draw.io XML with Design System support
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { isLikelyStandaloneMathLabel, prepareMathLabel } from '../math/index.js'
|
|
7
|
-
import { normalizeIdentity } from '../adapters/identity.js'
|
|
8
|
-
import { resolveImageIconStyle } from './icon-resolver.js'
|
|
9
|
-
import { resolveShapeNameKind } from './shape-catalog.js'
|
|
10
|
-
import { resolveIconShape } from './icon-mappings.js'
|
|
11
|
-
import { searchShapeCatalog } from './catalog-search.js'
|
|
12
|
-
import { searchAiIcons } from './ai-icon-catalog.js'
|
|
13
|
-
import { applyPalette, loadPalette, paletteTokenIndex, resolvePaletteToken } from './palette.js'
|
|
14
|
-
import { validatePaletteUsage } from './palette-validate.js'
|
|
15
|
-
import yaml from 'js-yaml'
|
|
16
|
-
import { readFileSync } from 'node:fs'
|
|
17
|
-
import { resolve, dirname } from 'node:path'
|
|
18
|
-
import { fileURLToPath } from 'node:url'
|
|
19
|
-
import { escapeXml } from '../shared/xml-utils.js'
|
|
20
|
-
|
|
21
|
-
// ============================================================================
|
|
22
|
-
// Theme Loading
|
|
23
|
-
// ============================================================================
|
|
24
|
-
|
|
25
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
26
|
-
const __dirname = dirname(__filename)
|
|
27
|
-
const THEMES_DIR = resolve(__dirname, '../../assets/themes')
|
|
28
|
-
|
|
29
|
-
let DEFAULT_THEME
|
|
30
|
-
try {
|
|
31
|
-
DEFAULT_THEME = JSON.parse(readFileSync(resolve(THEMES_DIR, 'tech-blue.json'), 'utf-8'))
|
|
32
|
-
} catch {
|
|
33
|
-
DEFAULT_THEME = {
|
|
34
|
-
name: 'tech-blue',
|
|
35
|
-
colors: {
|
|
36
|
-
primary: '#2563EB',
|
|
37
|
-
primaryLight: '#DBEAFE',
|
|
38
|
-
secondary: '#059669',
|
|
39
|
-
secondaryLight: '#D1FAE5',
|
|
40
|
-
accent: '#7C3AED',
|
|
41
|
-
accentLight: '#EDE9FE',
|
|
42
|
-
background: '#FFFFFF',
|
|
43
|
-
surface: '#F8FAFC',
|
|
44
|
-
text: '#1E293B',
|
|
45
|
-
textMuted: '#64748B',
|
|
46
|
-
border: '#E2E8F0'
|
|
47
|
-
},
|
|
48
|
-
spacing: { unit: 8 },
|
|
49
|
-
typography: {
|
|
50
|
-
fontFamily: {
|
|
51
|
-
primary: 'Inter, Roboto, system-ui, sans-serif',
|
|
52
|
-
monospace: 'JetBrains Mono, Fira Code, Consolas, monospace'
|
|
53
|
-
},
|
|
54
|
-
fontSize: { md: 20, sm: 18 }
|
|
55
|
-
},
|
|
56
|
-
borderRadius: { md: 8, lg: 12 },
|
|
57
|
-
node: {
|
|
58
|
-
default: {
|
|
59
|
-
fillColor: '#DBEAFE',
|
|
60
|
-
strokeColor: '#2563EB',
|
|
61
|
-
strokeWidth: 1.5,
|
|
62
|
-
fontColor: '#1E293B',
|
|
63
|
-
fontSize: 20,
|
|
64
|
-
rounded: 8
|
|
65
|
-
},
|
|
66
|
-
service: { fillColor: '#DBEAFE', strokeColor: '#2563EB' },
|
|
67
|
-
database: { fillColor: '#D1FAE5', strokeColor: '#059669' },
|
|
68
|
-
decision: { fillColor: '#FEF3C7', strokeColor: '#D97706' },
|
|
69
|
-
terminal: { fillColor: '#F1F5F9', strokeColor: '#64748B' },
|
|
70
|
-
queue: { fillColor: '#EDE9FE', strokeColor: '#7C3AED' },
|
|
71
|
-
user: { fillColor: '#E0F2FE', strokeColor: '#0284C7' },
|
|
72
|
-
document: { fillColor: '#FFFFFF', strokeColor: '#CBD5E1' },
|
|
73
|
-
formula: { fillColor: '#FFFFFF', strokeColor: '#2563EB', strokeWidth: 1 },
|
|
74
|
-
input: { fillColor: '#FFCDD2', strokeColor: '#E57373' },
|
|
75
|
-
output: { fillColor: '#CFD8DC', strokeColor: '#78909C' },
|
|
76
|
-
loss: { fillColor: '#FFCCBC', strokeColor: '#FF7043' },
|
|
77
|
-
feature: { fillColor: '#BBDEFB', strokeColor: '#42A5F5' },
|
|
78
|
-
conv: { fillColor: '#BBDEFB', strokeColor: '#1E88E5' },
|
|
79
|
-
pool: { fillColor: '#B3E5FC', strokeColor: '#039BE5' },
|
|
80
|
-
embed: { fillColor: '#D1C4E9', strokeColor: '#7E57C2' },
|
|
81
|
-
temporal: { fillColor: '#E1BEE7', strokeColor: '#AB47BC' },
|
|
82
|
-
attention: { fillColor: '#C8E6C9', strokeColor: '#66BB6A' },
|
|
83
|
-
gate: { fillColor: '#FFE0B2', strokeColor: '#FFA726' },
|
|
84
|
-
norm: { fillColor: '#DCEDC8', strokeColor: '#8BC34A' },
|
|
85
|
-
graph: { fillColor: '#B2EBF2', strokeColor: '#26C6DA' },
|
|
86
|
-
matrix: { fillColor: '#E8EAF6', strokeColor: '#7986CB' },
|
|
87
|
-
operator: { fillColor: '#FFFFFF', strokeColor: '#424242' },
|
|
88
|
-
llm: { fillColor: '#EDE9FE', strokeColor: '#7C3AED' },
|
|
89
|
-
agent: { fillColor: '#DBEAFE', strokeColor: '#2563EB' },
|
|
90
|
-
vector_store: { fillColor: '#D1FAE5', strokeColor: '#059669' },
|
|
91
|
-
memory: { fillColor: '#FEF9C3', strokeColor: '#CA8A04' },
|
|
92
|
-
tool: { fillColor: '#F1F5F9', strokeColor: '#475569' },
|
|
93
|
-
gateway: { fillColor: '#FFEDD5', strokeColor: '#EA580C' }
|
|
94
|
-
},
|
|
95
|
-
connector: {
|
|
96
|
-
primary: { strokeColor: '#1E293B', strokeWidth: 2, dashed: false, endArrow: 'open', endFill: false },
|
|
97
|
-
data: {
|
|
98
|
-
strokeColor: '#1E293B',
|
|
99
|
-
strokeWidth: 2,
|
|
100
|
-
dashed: true,
|
|
101
|
-
dashPattern: '6 4',
|
|
102
|
-
endArrow: 'open',
|
|
103
|
-
endFill: false
|
|
104
|
-
},
|
|
105
|
-
optional: {
|
|
106
|
-
strokeColor: '#64748B',
|
|
107
|
-
strokeWidth: 1,
|
|
108
|
-
dashed: true,
|
|
109
|
-
dashPattern: '2 2',
|
|
110
|
-
endArrow: 'open',
|
|
111
|
-
endFill: false
|
|
112
|
-
},
|
|
113
|
-
dependency: { strokeColor: '#1E293B', strokeWidth: 1, dashed: false, endArrow: 'diamond', endFill: true },
|
|
114
|
-
bidirectional: { strokeColor: '#64748B', strokeWidth: 1.5, dashed: false, endArrow: 'none', endFill: false },
|
|
115
|
-
control: { strokeColor: '#EA580C', strokeWidth: 1.5, dashed: false, endArrow: 'open', endFill: false },
|
|
116
|
-
memory_read: { strokeColor: '#059669', strokeWidth: 1.5, dashed: false, endArrow: 'open', endFill: false },
|
|
117
|
-
memory_write: {
|
|
118
|
-
strokeColor: '#059669',
|
|
119
|
-
strokeWidth: 1.5,
|
|
120
|
-
dashed: true,
|
|
121
|
-
dashPattern: '5 3',
|
|
122
|
-
endArrow: 'open',
|
|
123
|
-
endFill: false
|
|
124
|
-
},
|
|
125
|
-
async: {
|
|
126
|
-
strokeColor: '#6B7280',
|
|
127
|
-
strokeWidth: 1.5,
|
|
128
|
-
dashed: true,
|
|
129
|
-
dashPattern: '4 2',
|
|
130
|
-
endArrow: 'open',
|
|
131
|
-
endFill: false
|
|
132
|
-
},
|
|
133
|
-
feedback: { strokeColor: '#7C3AED', strokeWidth: 1.5, dashed: false, endArrow: 'open', endFill: false }
|
|
134
|
-
},
|
|
135
|
-
module: {
|
|
136
|
-
fillColor: '#F8FAFC',
|
|
137
|
-
strokeColor: '#E2E8F0',
|
|
138
|
-
strokeWidth: 1,
|
|
139
|
-
rounded: 12,
|
|
140
|
-
padding: 24,
|
|
141
|
-
labelFontSize: 14,
|
|
142
|
-
labelFontWeight: 600,
|
|
143
|
-
labelFontColor: '#1E293B',
|
|
144
|
-
dashed: false,
|
|
145
|
-
dashPattern: '8 4'
|
|
146
|
-
},
|
|
147
|
-
canvas: {
|
|
148
|
-
background: '#FFFFFF',
|
|
149
|
-
gridSize: 8
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const _themeCache = new Map()
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Load theme by name (returns default if not found)
|
|
158
|
-
*/
|
|
159
|
-
export function loadTheme(themeName) {
|
|
160
|
-
if (!themeName || themeName === 'tech-blue') return DEFAULT_THEME
|
|
161
|
-
if (_themeCache.has(themeName)) return _themeCache.get(themeName)
|
|
162
|
-
|
|
163
|
-
// Security: reject invalid theme names (path traversal prevention)
|
|
164
|
-
if (!/^[a-z][a-z0-9-]*$/.test(themeName)) {
|
|
165
|
-
console.warn(`[loadTheme] Invalid theme name '${themeName}'. Falling back to default.`)
|
|
166
|
-
return DEFAULT_THEME
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
try {
|
|
170
|
-
const themePath = resolve(THEMES_DIR, `${themeName}.json`)
|
|
171
|
-
// Security: verify resolved path stays within THEMES_DIR
|
|
172
|
-
if (!themePath.startsWith(THEMES_DIR)) {
|
|
173
|
-
console.warn(`[loadTheme] Theme path escapes themes directory. Falling back to default.`)
|
|
174
|
-
return DEFAULT_THEME
|
|
175
|
-
}
|
|
176
|
-
const raw = readFileSync(themePath, 'utf8')
|
|
177
|
-
const theme = JSON.parse(raw)
|
|
178
|
-
_themeCache.set(themeName, theme)
|
|
179
|
-
return theme
|
|
180
|
-
} catch (err) {
|
|
181
|
-
console.warn(`[loadTheme] Could not load theme '${themeName}': ${err.message}. Falling back to default.`)
|
|
182
|
-
return DEFAULT_THEME
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// ============================================================================
|
|
187
|
-
// Semantic Shape Mapping
|
|
188
|
-
// ============================================================================
|
|
189
|
-
|
|
190
|
-
const SHAPE_KEYWORDS = {
|
|
191
|
-
// Network topology
|
|
192
|
-
router: ['router', 'core router', 'edge router', 'gateway router'],
|
|
193
|
-
switch: ['core switch', 'distribution switch', 'access switch'],
|
|
194
|
-
firewall: ['firewall', 'fw', 'security gateway', 'ngfw'],
|
|
195
|
-
server: ['server', 'app server', 'web server', 'host', 'vm server'],
|
|
196
|
-
load_balancer: ['load balancer', 'lb', 'alb', 'nlb', 'reverse proxy'],
|
|
197
|
-
subnet: ['subnet', 'cidr', 'segment', 'lan segment', 'network segment'],
|
|
198
|
-
internet: ['internet', 'wan', 'isp', 'public network'],
|
|
199
|
-
ap: ['wireless ap', 'access point', 'wifi ap', 'wap'],
|
|
200
|
-
|
|
201
|
-
// Traditional types (check first for backward compatibility)
|
|
202
|
-
database: ['database', 'db', 'sql', 'storage', 'redis', 'mongo', 'postgresql', 'mysql', 'cache'],
|
|
203
|
-
decision: ['decision', 'condition', 'branch', 'switch', 'route'],
|
|
204
|
-
terminal: ['start', 'begin', 'end', 'finish', 'stop', 'terminate'],
|
|
205
|
-
queue: ['queue', 'buffer', 'kafka', 'rabbitmq', 'stream', 'sqs', 'message'],
|
|
206
|
-
user: ['user', 'user icon', 'client', 'person', 'customer', 'human'],
|
|
207
|
-
document: ['document', 'doc', 'file', 'report', 'log'],
|
|
208
|
-
formula: ['formula', 'equation', 'math', '$$'],
|
|
209
|
-
text: ['standalone text', 'annotation', 'caption', 'legend note', 'title text'],
|
|
210
|
-
cloud: ['cloud', 'internet', 'external', 'web'],
|
|
211
|
-
|
|
212
|
-
// Deep learning - Input/Output
|
|
213
|
-
input: ['input_', 'input layer', 'inputdata', 'x_train', 'x_test', 'sample batch', 'input data', 'input signal'],
|
|
214
|
-
output: ['output_', 'output layer', 'prediction', 'y_hat', 'logits', 'probs', 'output data', 'reconstructed'],
|
|
215
|
-
loss: ['loss', 'criterion', 'objective', 'mse loss', 'cross_entropy', 'bceloss', 'loss function', 'error'],
|
|
216
|
-
|
|
217
|
-
// Deep learning - Feature extraction & Encoding/Decoding
|
|
218
|
-
feature: ['feature extractor', 'backbone', 'encoder block', 'feature extraction'],
|
|
219
|
-
conv: ['conv1d', 'conv2d', 'conv3d', 'convolution', 'convolutional', 'tcn', '1d conv', '2d conv', '3d conv'],
|
|
220
|
-
pool: ['pooling', 'maxpool', 'avgpool', 'adaptive pool', 'max pooling', 'avg pooling', 'global pool'],
|
|
221
|
-
embed: ['embedding', 'embeddings', 'lookup', 'token embed', 'word embed', 'positional'],
|
|
222
|
-
|
|
223
|
-
// Deep learning - Decoder (separate from encoder for different colors if needed)
|
|
224
|
-
// Using feature type for decoder as it's semantically similar
|
|
225
|
-
|
|
226
|
-
// Deep learning - Temporal/Sequential
|
|
227
|
-
temporal: ['lstm', 'rnn', 'gru', 'temporal', 'recurrent', 'sequence', 'seq2seq', 'bilstm', 'bigru', 'hidden state'],
|
|
228
|
-
|
|
229
|
-
// Deep learning - Attention & Transformer
|
|
230
|
-
attention: [
|
|
231
|
-
'attention',
|
|
232
|
-
'attn',
|
|
233
|
-
'softmax',
|
|
234
|
-
'transformer',
|
|
235
|
-
'self-attention',
|
|
236
|
-
'multi-head',
|
|
237
|
-
'mha',
|
|
238
|
-
'cross-attention',
|
|
239
|
-
'qkv'
|
|
240
|
-
],
|
|
241
|
-
|
|
242
|
-
// Deep learning - Normalization & Regularization
|
|
243
|
-
norm: ['batchnorm', 'layernorm', 'groupnorm', 'instancenorm', 'normalization', 'batch norm', 'layer norm', 'dropout'],
|
|
244
|
-
|
|
245
|
-
// Deep learning - Gate & Activation
|
|
246
|
-
gate: [
|
|
247
|
-
'gating',
|
|
248
|
-
'gate mechanism',
|
|
249
|
-
'multiply gate',
|
|
250
|
-
'sigmoid gate',
|
|
251
|
-
'tanh gate',
|
|
252
|
-
'forget gate',
|
|
253
|
-
'input gate',
|
|
254
|
-
'output gate'
|
|
255
|
-
],
|
|
256
|
-
|
|
257
|
-
// Deep learning - Graph Neural Network
|
|
258
|
-
graph: [
|
|
259
|
-
'graph conv',
|
|
260
|
-
'gcn',
|
|
261
|
-
'gnn',
|
|
262
|
-
'graph attention',
|
|
263
|
-
'adjacency',
|
|
264
|
-
'node feature',
|
|
265
|
-
'edge feature',
|
|
266
|
-
'message passing',
|
|
267
|
-
'aggregation'
|
|
268
|
-
],
|
|
269
|
-
|
|
270
|
-
// Deep learning - Matrix operations & Linear layers
|
|
271
|
-
matrix: [
|
|
272
|
-
'matmul',
|
|
273
|
-
'linear layer',
|
|
274
|
-
'fc layer',
|
|
275
|
-
'dense layer',
|
|
276
|
-
'mlp',
|
|
277
|
-
'weight matrix',
|
|
278
|
-
'fully connected',
|
|
279
|
-
'projection'
|
|
280
|
-
],
|
|
281
|
-
|
|
282
|
-
// Deep learning - Operators (for small circular nodes)
|
|
283
|
-
operator: ['⊕', '⊗', '⊙', 'concat', 'element-wise', 'hadamard', 'residual add', 'skip add', '⊞'],
|
|
284
|
-
|
|
285
|
-
// Deep learning - 3D Feature Maps / Tensors (for CNN visualizations)
|
|
286
|
-
tensor3d: [
|
|
287
|
-
'tensor',
|
|
288
|
-
'feature map',
|
|
289
|
-
'3d feature',
|
|
290
|
-
'activation map',
|
|
291
|
-
'channel',
|
|
292
|
-
'h×w×c',
|
|
293
|
-
'hwc',
|
|
294
|
-
'chw',
|
|
295
|
-
'nchw',
|
|
296
|
-
'nhwc',
|
|
297
|
-
'cube',
|
|
298
|
-
'3d block',
|
|
299
|
-
'volume'
|
|
300
|
-
]
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export const SHAPE_STYLES = {
|
|
304
|
-
// Traditional shapes
|
|
305
|
-
service: 'rounded=1;arcSize=20',
|
|
306
|
-
database: 'shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=15',
|
|
307
|
-
decision: 'rhombus',
|
|
308
|
-
terminal: 'rounded=1;arcSize=50',
|
|
309
|
-
queue: 'shape=parallelogram;perimeter=parallelogramPerimeter;fixedSize=1',
|
|
310
|
-
user: 'ellipse',
|
|
311
|
-
document: 'shape=document;boundedLbl=1',
|
|
312
|
-
formula: 'rounded=1',
|
|
313
|
-
text: 'text',
|
|
314
|
-
cloud: 'ellipse;shape=cloud',
|
|
315
|
-
process: 'rounded=1;arcSize=20',
|
|
316
|
-
router: 'ellipse',
|
|
317
|
-
switch: 'shape=switch',
|
|
318
|
-
firewall: 'shape=mxgraph.cisco.security.firewall;sketch=0',
|
|
319
|
-
server: 'rounded=1;arcSize=12',
|
|
320
|
-
load_balancer: 'shape=hexagon;perimeter=hexagonPerimeter2',
|
|
321
|
-
subnet: 'swimlane;startSize=24',
|
|
322
|
-
internet: 'ellipse;shape=cloud',
|
|
323
|
-
ap: 'shape=mxgraph.cisco.misc.access_point;sketch=0',
|
|
324
|
-
|
|
325
|
-
// Deep learning shapes
|
|
326
|
-
input: 'rounded=1;arcSize=15',
|
|
327
|
-
output: 'rounded=1;arcSize=15',
|
|
328
|
-
loss: 'rounded=1;arcSize=15',
|
|
329
|
-
feature: 'rounded=1;arcSize=15',
|
|
330
|
-
conv: 'rounded=1;arcSize=10',
|
|
331
|
-
pool: 'rounded=1;arcSize=10',
|
|
332
|
-
embed: 'rounded=1;arcSize=15',
|
|
333
|
-
temporal: 'rounded=1;arcSize=15',
|
|
334
|
-
attention: 'rounded=1;arcSize=15',
|
|
335
|
-
gate: 'rounded=1;arcSize=10',
|
|
336
|
-
norm: 'rounded=1;arcSize=10',
|
|
337
|
-
graph: 'rounded=1;arcSize=15',
|
|
338
|
-
matrix: 'rounded=1;arcSize=5',
|
|
339
|
-
operator: 'ellipse',
|
|
340
|
-
tensor3d: 'shape=cube;size=10;direction=south',
|
|
341
|
-
|
|
342
|
-
// Agentic / LLM system shapes (fireworks vocabulary) -- reuse existing
|
|
343
|
-
// primitives, distinguished by theme color; no new drawing code paths.
|
|
344
|
-
llm: 'rounded=1;arcSize=20',
|
|
345
|
-
agent: 'shape=hexagon;perimeter=hexagonPerimeter2',
|
|
346
|
-
vector_store: 'shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=15',
|
|
347
|
-
memory: 'rounded=1;arcSize=20;dashed=1',
|
|
348
|
-
tool: 'rounded=1;arcSize=20',
|
|
349
|
-
gateway: 'shape=hexagon;perimeter=hexagonPerimeter2'
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Detect semantic type from label if not explicitly specified
|
|
354
|
-
*/
|
|
355
|
-
export function detectSemanticType(label, explicitType, network = null) {
|
|
356
|
-
if (explicitType && SHAPE_STYLES[explicitType]) {
|
|
357
|
-
return explicitType
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
if (network?.device && SHAPE_STYLES[network.device]) {
|
|
361
|
-
return network.device
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
const lowerLabel = label.toLowerCase()
|
|
365
|
-
|
|
366
|
-
// Check for officially supported math delimiters first (highest priority)
|
|
367
|
-
if (label.includes('$$') || label.includes('\\(') || /`[^`]+`/.test(label)) {
|
|
368
|
-
return 'formula'
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// Detect unlabeled standalone equations so they receive formula styling too.
|
|
372
|
-
if (isLikelyStandaloneMathLabel(label)) {
|
|
373
|
-
return 'formula'
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// Check for decision patterns: questions ending with ? or containing check/if
|
|
377
|
-
if (label.includes('?') || /\b(check|if|valid)\b/i.test(label)) {
|
|
378
|
-
return 'decision'
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Check keywords by type
|
|
382
|
-
for (const [type, keywords] of Object.entries(SHAPE_KEYWORDS)) {
|
|
383
|
-
if (keywords.some((kw) => lowerLabel.includes(kw))) {
|
|
384
|
-
return type
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
return 'service' // Default
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// ============================================================================
|
|
392
|
-
// Size Presets
|
|
393
|
-
// ============================================================================
|
|
394
|
-
|
|
395
|
-
// Font-size ladder: create-flow defaults per text class. Labels should fill
|
|
396
|
-
// their boxes (paper-readable) instead of floating in oversized containers.
|
|
397
|
-
// Explicit style.fontSize always wins; explicit-bounds boxes (replicate flow)
|
|
398
|
-
// shrink a class uniformly, never below FONT_SIZE_FLOOR.
|
|
399
|
-
export const FONT_LADDER = {
|
|
400
|
-
moduleTitle: 22,
|
|
401
|
-
node: 20,
|
|
402
|
-
edgeLabel: 18,
|
|
403
|
-
text: 16
|
|
404
|
-
}
|
|
405
|
-
export const FONT_SIZE_FLOOR = 12
|
|
406
|
-
|
|
407
|
-
// Shapes whose size encodes meaning (operators, 3D tensors) or whose label is
|
|
408
|
-
// not plain text (formula) keep preset sizes instead of growing with content.
|
|
409
|
-
const CONTENT_SIZE_EXEMPT_TYPES = new Set(['operator', 'tensor3d', 'formula'])
|
|
410
|
-
|
|
411
|
-
const SIZE_PRESETS = {
|
|
412
|
-
tiny: { width: 32, height: 32 }, // For operators (⊕⊗)
|
|
413
|
-
small: { width: 80, height: 40 },
|
|
414
|
-
medium: { width: 120, height: 60 },
|
|
415
|
-
large: { width: 160, height: 80 },
|
|
416
|
-
xl: { width: 200, height: 100 },
|
|
417
|
-
// 3D Feature Map sizes (cube-like proportions)
|
|
418
|
-
tensor_sm: { width: 40, height: 48 }, // Small feature map
|
|
419
|
-
tensor_md: { width: 60, height: 72 }, // Medium feature map
|
|
420
|
-
tensor_lg: { width: 80, height: 96 }, // Large feature map
|
|
421
|
-
tensor_xl: { width: 100, height: 120 } // Extra large feature map
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// Default sizes for specific node types
|
|
425
|
-
const TYPE_DEFAULT_SIZES = {
|
|
426
|
-
operator: 'tiny',
|
|
427
|
-
decision: 'medium',
|
|
428
|
-
terminal: 'small',
|
|
429
|
-
user: 'small',
|
|
430
|
-
text: 'medium',
|
|
431
|
-
router: 'small',
|
|
432
|
-
switch: 'small',
|
|
433
|
-
firewall: 'small',
|
|
434
|
-
server: 'medium',
|
|
435
|
-
load_balancer: 'medium',
|
|
436
|
-
subnet: 'large',
|
|
437
|
-
internet: 'small',
|
|
438
|
-
ap: 'small',
|
|
439
|
-
tensor3d: 'tensor_md'
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Estimate a content-fitted size for a standalone text node so the box hugs the
|
|
444
|
-
* text instead of stretching to a container width. Oversized text boxes overlap
|
|
445
|
-
* neighbors and are hard to select and move, so we keep the box just wider than
|
|
446
|
-
* the longest line. Latin glyphs are roughly 0.6em wide and CJK glyphs roughly
|
|
447
|
-
* 1.05em; width adds horizontal padding and is clamped so an unusually long
|
|
448
|
-
* label wraps via whiteSpace=wrap instead of overflowing the canvas.
|
|
449
|
-
*/
|
|
450
|
-
function estimateTextSize(label, fontSize = FONT_LADDER.text) {
|
|
451
|
-
const lines = String(label).split(/\n|<br\s*\/?>/i)
|
|
452
|
-
let maxLineWidth = 0
|
|
453
|
-
for (const line of lines) {
|
|
454
|
-
let lineWidth = 0
|
|
455
|
-
for (const ch of line) {
|
|
456
|
-
lineWidth += /[\u3000-\u9fff\uff00-\uffef]/.test(ch) ? fontSize * 1.05 : fontSize * 0.6
|
|
457
|
-
}
|
|
458
|
-
maxLineWidth = Math.max(maxLineWidth, lineWidth)
|
|
459
|
-
}
|
|
460
|
-
const width = Math.min(Math.max(Math.ceil(maxLineWidth) + 20, 48), 320)
|
|
461
|
-
const height = Math.max(Math.ceil(lines.length * fontSize * 1.4) + 12, 24)
|
|
462
|
-
return { width, height }
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Raw text extent without the usability floors of estimateTextSize. Used by
|
|
467
|
-
* lint passes that compare declared bounds or label boxes against content.
|
|
468
|
-
*/
|
|
469
|
-
function measureLabelExtent(label, fontSize = FONT_LADDER.text, padding = 8) {
|
|
470
|
-
const lines = String(label).split(/\n|<br\s*\/?>/i)
|
|
471
|
-
let maxLineWidth = 0
|
|
472
|
-
for (const line of lines) {
|
|
473
|
-
let lineWidth = 0
|
|
474
|
-
for (const ch of line) {
|
|
475
|
-
lineWidth += /[\u3000-\u9fff\uff00-\uffef]/.test(ch) ? fontSize * 1.05 : fontSize * 0.6
|
|
476
|
-
}
|
|
477
|
-
maxLineWidth = Math.max(maxLineWidth, lineWidth)
|
|
478
|
-
}
|
|
479
|
-
return {
|
|
480
|
-
width: Math.ceil(maxLineWidth) + padding,
|
|
481
|
-
height: Math.ceil(lines.length * fontSize * 1.4) + padding
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Get node dimensions based on size preset or node type
|
|
487
|
-
*/
|
|
488
|
-
export function getNodeSize(size, nodeType = null, label = null, options = null) {
|
|
489
|
-
// Text nodes without an explicit size fit their content so the box stays just
|
|
490
|
-
// wider than the text and remains easy to select, move, and transform.
|
|
491
|
-
if (!(size && SIZE_PRESETS[size]) && nodeType === 'text' && label) {
|
|
492
|
-
return estimateTextSize(label, options?.fontSize ?? FONT_LADDER.text)
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
const preset =
|
|
496
|
-
size && SIZE_PRESETS[size]
|
|
497
|
-
? SIZE_PRESETS[size]
|
|
498
|
-
: nodeType && TYPE_DEFAULT_SIZES[nodeType]
|
|
499
|
-
? SIZE_PRESETS[TYPE_DEFAULT_SIZES[nodeType]]
|
|
500
|
-
: SIZE_PRESETS.medium
|
|
501
|
-
|
|
502
|
-
// Presets act as minimums once a label is present: the box grows so the
|
|
503
|
-
// label never paints outside the shape. Icon labels render below the shape,
|
|
504
|
-
// and size-coded shapes (operators, tensors, formulas) keep their preset.
|
|
505
|
-
if (
|
|
506
|
-
options?.contentAware &&
|
|
507
|
-
label &&
|
|
508
|
-
nodeType !== 'text' &&
|
|
509
|
-
!CONTENT_SIZE_EXEMPT_TYPES.has(nodeType) &&
|
|
510
|
-
!hasMathMarkers(label)
|
|
511
|
-
) {
|
|
512
|
-
const extent = measureLabelExtent(label, options.fontSize ?? FONT_LADDER.node, 0)
|
|
513
|
-
const snapUp = (value) => Math.ceil(value / 8) * 8
|
|
514
|
-
return {
|
|
515
|
-
width: Math.max(preset.width, snapUp(extent.width + 28)),
|
|
516
|
-
height: Math.max(preset.height, snapUp(extent.height + 20))
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
return preset
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// ============================================================================
|
|
524
|
-
// Grid Snapping
|
|
525
|
-
// ============================================================================
|
|
526
|
-
|
|
527
|
-
/**
|
|
528
|
-
* Snap value to 8px grid
|
|
529
|
-
*/
|
|
530
|
-
export function snapToGrid(value, gridSize = 8) {
|
|
531
|
-
return Math.round(value / gridSize) * gridSize
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
function isFiniteNumber(value) {
|
|
535
|
-
return typeof value === 'number' && Number.isFinite(value)
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
function parseCanvasSize(canvas) {
|
|
539
|
-
if (canvas == null || canvas === 'auto') return null
|
|
540
|
-
if (typeof canvas !== 'string') {
|
|
541
|
-
throw new Error('Invalid meta.canvas: use "auto" or WIDTHxHEIGHT')
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
const match = /^(\d+)x(\d+)$/.exec(canvas)
|
|
545
|
-
if (!match) {
|
|
546
|
-
throw new Error(`Invalid meta.canvas "${canvas}": use "auto" or WIDTHxHEIGHT`)
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
const width = Number(match[1])
|
|
550
|
-
const height = Number(match[2])
|
|
551
|
-
if (!Number.isSafeInteger(width) || !Number.isSafeInteger(height) || width <= 0 || height <= 0) {
|
|
552
|
-
throw new Error(`Invalid meta.canvas "${canvas}": width and height must be positive integers`)
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
return { width, height }
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function resolveCanvasSize(canvas, autoWidth, autoHeight) {
|
|
559
|
-
const explicit = parseCanvasSize(canvas)
|
|
560
|
-
if (!explicit) return { width: autoWidth, height: autoHeight }
|
|
561
|
-
return {
|
|
562
|
-
width: Math.max(autoWidth, explicit.width),
|
|
563
|
-
height: Math.max(autoHeight, explicit.height)
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
function normalizeNodeBounds(node) {
|
|
568
|
-
const bounds = node?.bounds
|
|
569
|
-
if (!bounds) return null
|
|
570
|
-
if (
|
|
571
|
-
!isFiniteNumber(bounds.x) ||
|
|
572
|
-
!isFiniteNumber(bounds.y) ||
|
|
573
|
-
!isFiniteNumber(bounds.width) ||
|
|
574
|
-
!isFiniteNumber(bounds.height)
|
|
575
|
-
) {
|
|
576
|
-
return null
|
|
577
|
-
}
|
|
578
|
-
return {
|
|
579
|
-
x: bounds.x,
|
|
580
|
-
y: bounds.y,
|
|
581
|
-
width: bounds.width,
|
|
582
|
-
height: bounds.height
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
// ============================================================================
|
|
587
|
-
// Layout Engine
|
|
588
|
-
// ============================================================================
|
|
589
|
-
|
|
590
|
-
// North-South tiers for layout: tiered — external systems on top, endpoints at
|
|
591
|
-
// the bottom. Explicit node.network.tier wins, then role, then semantic type.
|
|
592
|
-
const NETWORK_ROLE_TIERS = {
|
|
593
|
-
internet: 0,
|
|
594
|
-
wan: 0,
|
|
595
|
-
isp: 0,
|
|
596
|
-
external: 0,
|
|
597
|
-
firewall: 1,
|
|
598
|
-
dmz: 1,
|
|
599
|
-
router: 1,
|
|
600
|
-
core: 2,
|
|
601
|
-
distribution: 3,
|
|
602
|
-
aggregation: 3,
|
|
603
|
-
access: 4,
|
|
604
|
-
switch: 4,
|
|
605
|
-
wireless: 4,
|
|
606
|
-
server: 5,
|
|
607
|
-
endpoint: 5,
|
|
608
|
-
host: 5,
|
|
609
|
-
storage: 5,
|
|
610
|
-
database: 5
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
const NETWORK_TYPE_TIERS = {
|
|
614
|
-
cloud: 0,
|
|
615
|
-
internet: 0,
|
|
616
|
-
firewall: 1,
|
|
617
|
-
router: 1,
|
|
618
|
-
load_balancer: 2,
|
|
619
|
-
switch: 4,
|
|
620
|
-
server: 5,
|
|
621
|
-
database: 5,
|
|
622
|
-
storage: 5,
|
|
623
|
-
user: 5,
|
|
624
|
-
terminal: 5
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
function resolveNetworkTier(node) {
|
|
628
|
-
const explicit = node.network?.tier
|
|
629
|
-
if (typeof explicit === 'number' && Number.isFinite(explicit)) return explicit
|
|
630
|
-
const role = typeof node.network?.role === 'string' ? node.network.role.toLowerCase() : null
|
|
631
|
-
if (role && NETWORK_ROLE_TIERS[role] !== undefined) return NETWORK_ROLE_TIERS[role]
|
|
632
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
633
|
-
if (NETWORK_TYPE_TIERS[semanticType] !== undefined) return NETWORK_TYPE_TIERS[semanticType]
|
|
634
|
-
return 2.5
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Calculate positions for nodes based on layout type
|
|
639
|
-
*/
|
|
640
|
-
export function calculateLayout(spec, theme) {
|
|
641
|
-
const layout = spec.meta?.layout || 'horizontal'
|
|
642
|
-
const normalizedLayout = layout === 'star' || layout === 'mesh' ? 'hierarchical' : layout
|
|
643
|
-
const gridSize = theme.canvas?.gridSize || 8
|
|
644
|
-
const nodeMargin = 32 // Minimum space between nodes
|
|
645
|
-
const containerPadding = theme.module?.padding || 24
|
|
646
|
-
const moduleHeaderHeight = 40
|
|
647
|
-
|
|
648
|
-
const nodes = spec.nodes || []
|
|
649
|
-
const modules = spec.modules || []
|
|
650
|
-
const positions = new Map()
|
|
651
|
-
|
|
652
|
-
const sizeOptions = (node) => ({
|
|
653
|
-
fontSize: node.style?.fontSize,
|
|
654
|
-
contentAware: !(node.icon || deriveNodeIcon(node))
|
|
655
|
-
})
|
|
656
|
-
|
|
657
|
-
const placeNode = (node, x, y) => {
|
|
658
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
659
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
660
|
-
positions.set(node.id, {
|
|
661
|
-
x: snapToGrid(x, gridSize),
|
|
662
|
-
y: snapToGrid(y, gridSize),
|
|
663
|
-
width: size.width,
|
|
664
|
-
height: size.height
|
|
665
|
-
})
|
|
666
|
-
return size
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
const getNodeMetrics = (node) => {
|
|
670
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
671
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
672
|
-
return { semanticType, size }
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
// Handle manually positioned nodes first
|
|
676
|
-
const manuallyPositioned = new Set()
|
|
677
|
-
for (const node of nodes) {
|
|
678
|
-
const explicitBounds = normalizeNodeBounds(node)
|
|
679
|
-
if (explicitBounds) {
|
|
680
|
-
positions.set(node.id, explicitBounds)
|
|
681
|
-
manuallyPositioned.add(node.id)
|
|
682
|
-
} else if (node.position && typeof node.position.x === 'number' && typeof node.position.y === 'number') {
|
|
683
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
684
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
685
|
-
positions.set(node.id, {
|
|
686
|
-
x: snapToGrid(node.position.x - size.width / 2, gridSize),
|
|
687
|
-
y: snapToGrid(node.position.y - size.height / 2, gridSize),
|
|
688
|
-
width: size.width,
|
|
689
|
-
height: size.height
|
|
690
|
-
})
|
|
691
|
-
manuallyPositioned.add(node.id)
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
// Group nodes by module
|
|
696
|
-
const moduleGroups = new Map()
|
|
697
|
-
moduleGroups.set('__default__', [])
|
|
698
|
-
|
|
699
|
-
for (const mod of modules) {
|
|
700
|
-
moduleGroups.set(mod.id, [])
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
for (const node of nodes) {
|
|
704
|
-
const moduleId = node.module || '__default__'
|
|
705
|
-
if (!moduleGroups.has(moduleId)) {
|
|
706
|
-
moduleGroups.set(moduleId, [])
|
|
707
|
-
}
|
|
708
|
-
moduleGroups.get(moduleId).push(node)
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
let currentX = 40
|
|
712
|
-
let currentY = 40
|
|
713
|
-
|
|
714
|
-
if (normalizedLayout === 'horizontal') {
|
|
715
|
-
// Horizontal: modules side by side, nodes stacked vertically
|
|
716
|
-
for (const [moduleId, moduleNodes] of moduleGroups) {
|
|
717
|
-
if (moduleNodes.length === 0) continue
|
|
718
|
-
|
|
719
|
-
const moduleX = snapToGrid(currentX, gridSize)
|
|
720
|
-
const moduleY = snapToGrid(40, gridSize)
|
|
721
|
-
let maxWidth = 0
|
|
722
|
-
let nodeY = moduleY + containerPadding + moduleHeaderHeight
|
|
723
|
-
|
|
724
|
-
for (const node of moduleNodes) {
|
|
725
|
-
if (manuallyPositioned.has(node.id)) continue
|
|
726
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
727
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
728
|
-
const nodeX = snapToGrid(moduleX + containerPadding, gridSize)
|
|
729
|
-
positions.set(node.id, {
|
|
730
|
-
x: nodeX,
|
|
731
|
-
y: snapToGrid(nodeY, gridSize),
|
|
732
|
-
width: size.width,
|
|
733
|
-
height: size.height
|
|
734
|
-
})
|
|
735
|
-
maxWidth = Math.max(maxWidth, size.width)
|
|
736
|
-
nodeY += size.height + nodeMargin
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
currentX += maxWidth + containerPadding * 2 + nodeMargin
|
|
740
|
-
}
|
|
741
|
-
} else if (normalizedLayout === 'vertical') {
|
|
742
|
-
// Vertical: modules stacked, nodes side by side
|
|
743
|
-
for (const [moduleId, moduleNodes] of moduleGroups) {
|
|
744
|
-
if (moduleNodes.length === 0) continue
|
|
745
|
-
|
|
746
|
-
const moduleX = snapToGrid(40, gridSize)
|
|
747
|
-
const moduleY = snapToGrid(currentY, gridSize)
|
|
748
|
-
let nodeX = moduleX + containerPadding
|
|
749
|
-
let maxHeight = 0
|
|
750
|
-
|
|
751
|
-
for (const node of moduleNodes) {
|
|
752
|
-
if (manuallyPositioned.has(node.id)) continue
|
|
753
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
754
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
755
|
-
positions.set(node.id, {
|
|
756
|
-
x: snapToGrid(nodeX, gridSize),
|
|
757
|
-
y: snapToGrid(moduleY + containerPadding + moduleHeaderHeight, gridSize),
|
|
758
|
-
width: size.width,
|
|
759
|
-
height: size.height
|
|
760
|
-
})
|
|
761
|
-
maxHeight = Math.max(maxHeight, size.height)
|
|
762
|
-
nodeX += size.width + nodeMargin
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
currentY += maxHeight + containerPadding * 2 + moduleHeaderHeight + nodeMargin
|
|
766
|
-
}
|
|
767
|
-
} else if (layout === 'star') {
|
|
768
|
-
const autoNodes = nodes.filter((node) => !manuallyPositioned.has(node.id))
|
|
769
|
-
if (autoNodes.length > 0) {
|
|
770
|
-
const centerNode =
|
|
771
|
-
autoNodes.find((node) => {
|
|
772
|
-
const type = detectSemanticType(node.label, node.type, node.network)
|
|
773
|
-
return ['router', 'switch', 'load_balancer', 'firewall'].includes(type)
|
|
774
|
-
}) || autoNodes[0]
|
|
775
|
-
|
|
776
|
-
const centerX = 360
|
|
777
|
-
const centerY = 180
|
|
778
|
-
placeNode(centerNode, centerX, centerY)
|
|
779
|
-
|
|
780
|
-
const spokes = autoNodes.filter((node) => node.id !== centerNode.id)
|
|
781
|
-
const radiusX = 220
|
|
782
|
-
const radiusY = 140
|
|
783
|
-
spokes.forEach((node, index) => {
|
|
784
|
-
const angle = (Math.PI * 2 * index) / Math.max(spokes.length, 1) - Math.PI / 2
|
|
785
|
-
const { size } = getNodeMetrics(node)
|
|
786
|
-
placeNode(
|
|
787
|
-
node,
|
|
788
|
-
centerX + Math.cos(angle) * radiusX - size.width / 2,
|
|
789
|
-
centerY + Math.sin(angle) * radiusY - size.height / 2
|
|
790
|
-
)
|
|
791
|
-
})
|
|
792
|
-
}
|
|
793
|
-
} else if (layout === 'mesh') {
|
|
794
|
-
const autoNodes = nodes.filter((node) => !manuallyPositioned.has(node.id))
|
|
795
|
-
const centerX = 340
|
|
796
|
-
const centerY = 180
|
|
797
|
-
const radius = Math.max(140, autoNodes.length * 18)
|
|
798
|
-
|
|
799
|
-
autoNodes.forEach((node, index) => {
|
|
800
|
-
const { size } = getNodeMetrics(node)
|
|
801
|
-
const angle = (Math.PI * 2 * index) / Math.max(autoNodes.length, 1) - Math.PI / 2
|
|
802
|
-
placeNode(
|
|
803
|
-
node,
|
|
804
|
-
centerX + Math.cos(angle) * radius - size.width / 2,
|
|
805
|
-
centerY + Math.sin(angle) * radius - size.height / 2
|
|
806
|
-
)
|
|
807
|
-
})
|
|
808
|
-
} else if (layout === 'tiered') {
|
|
809
|
-
// North-South rows: sort tiers ascending, center each row horizontally.
|
|
810
|
-
const autoNodes = nodes.filter((node) => !manuallyPositioned.has(node.id))
|
|
811
|
-
const tierBuckets = new Map()
|
|
812
|
-
for (const node of autoNodes) {
|
|
813
|
-
const tier = resolveNetworkTier(node)
|
|
814
|
-
if (!tierBuckets.has(tier)) tierBuckets.set(tier, [])
|
|
815
|
-
tierBuckets.get(tier).push(node)
|
|
816
|
-
}
|
|
817
|
-
const rowGap = 96
|
|
818
|
-
const nodeGap = 48
|
|
819
|
-
const rowMetrics = [...tierBuckets.keys()]
|
|
820
|
-
.sort((a, b) => a - b)
|
|
821
|
-
.map((tier) => {
|
|
822
|
-
const rowNodes = tierBuckets.get(tier)
|
|
823
|
-
const moduleOrder = new Map()
|
|
824
|
-
for (const node of rowNodes) {
|
|
825
|
-
const key = node.module || ''
|
|
826
|
-
if (!moduleOrder.has(key)) moduleOrder.set(key, moduleOrder.size)
|
|
827
|
-
}
|
|
828
|
-
rowNodes.sort((a, b) => moduleOrder.get(a.module || '') - moduleOrder.get(b.module || ''))
|
|
829
|
-
const sizes = rowNodes.map((node) => getNodeMetrics(node).size)
|
|
830
|
-
const width = sizes.reduce((sum, size) => sum + size.width, 0) + nodeGap * Math.max(rowNodes.length - 1, 0)
|
|
831
|
-
const height = Math.max(...sizes.map((size) => size.height))
|
|
832
|
-
return { rowNodes, sizes, width, height }
|
|
833
|
-
})
|
|
834
|
-
const maxRowWidth = rowMetrics.reduce((max, row) => Math.max(max, row.width), 0)
|
|
835
|
-
let rowY = 40
|
|
836
|
-
for (const row of rowMetrics) {
|
|
837
|
-
let nodeX = 40 + (maxRowWidth - row.width) / 2
|
|
838
|
-
row.rowNodes.forEach((node, index) => {
|
|
839
|
-
placeNode(node, nodeX, rowY)
|
|
840
|
-
nodeX += row.sizes[index].width + nodeGap
|
|
841
|
-
})
|
|
842
|
-
rowY += row.height + rowGap
|
|
843
|
-
}
|
|
844
|
-
} else {
|
|
845
|
-
// Hierarchical or other: simple grid layout
|
|
846
|
-
let row = 0
|
|
847
|
-
let col = 0
|
|
848
|
-
const maxCols = 4
|
|
849
|
-
|
|
850
|
-
for (const node of nodes) {
|
|
851
|
-
if (manuallyPositioned.has(node.id)) continue
|
|
852
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
853
|
-
const size = getNodeSize(node.size, semanticType, node.label, sizeOptions(node))
|
|
854
|
-
positions.set(node.id, {
|
|
855
|
-
x: snapToGrid(40 + col * (size.width + nodeMargin), gridSize),
|
|
856
|
-
y: snapToGrid(40 + row * (size.height + nodeMargin), gridSize),
|
|
857
|
-
width: size.width,
|
|
858
|
-
height: size.height
|
|
859
|
-
})
|
|
860
|
-
col++
|
|
861
|
-
if (col >= maxCols) {
|
|
862
|
-
col = 0
|
|
863
|
-
row++
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
const snapDown = (value) => Math.floor(value / gridSize) * gridSize
|
|
869
|
-
const snapUp = (value) => Math.ceil(value / gridSize) * gridSize
|
|
870
|
-
const modulePositions = new Map()
|
|
871
|
-
|
|
872
|
-
for (const [moduleId, moduleNodes] of moduleGroups) {
|
|
873
|
-
if (moduleId === '__default__' || moduleNodes.length === 0) continue
|
|
874
|
-
|
|
875
|
-
const nodePositions = moduleNodes.map((node) => positions.get(node.id)).filter(Boolean)
|
|
876
|
-
|
|
877
|
-
if (nodePositions.length === 0) continue
|
|
878
|
-
|
|
879
|
-
const minX = Math.min(...nodePositions.map((pos) => pos.x))
|
|
880
|
-
const minY = Math.min(...nodePositions.map((pos) => pos.y))
|
|
881
|
-
const maxX = Math.max(...nodePositions.map((pos) => pos.x + pos.width))
|
|
882
|
-
const maxY = Math.max(...nodePositions.map((pos) => pos.y + pos.height))
|
|
883
|
-
|
|
884
|
-
const x = snapDown(minX - containerPadding)
|
|
885
|
-
const y = snapDown(minY - containerPadding - moduleHeaderHeight)
|
|
886
|
-
const width = snapUp(maxX + containerPadding) - x
|
|
887
|
-
const height = snapUp(maxY + containerPadding) - y
|
|
888
|
-
|
|
889
|
-
modulePositions.set(moduleId, { x, y, width, height })
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
return { positions, modulePositions }
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
// ============================================================================
|
|
896
|
-
// Icon Support
|
|
897
|
-
// ============================================================================
|
|
898
|
-
|
|
899
|
-
const NETWORK_VENDOR_DEVICE_ICONS = {
|
|
900
|
-
aws: {
|
|
901
|
-
internet: 'aws.internet_gateway',
|
|
902
|
-
internet_gateway: 'aws.internet_gateway',
|
|
903
|
-
load_balancer: 'aws.application_load_balancer',
|
|
904
|
-
application_load_balancer: 'aws.application_load_balancer',
|
|
905
|
-
// aws4 has no plain ec2_instance stencil; aws.ec2 resolves via the aws4 resourceIcon style
|
|
906
|
-
server: 'aws.ec2',
|
|
907
|
-
ec2: 'aws.ec2',
|
|
908
|
-
ec2_instance: 'aws.ec2',
|
|
909
|
-
// subnet intentionally unmapped: the subnet semantic type renders as a swimlane group box
|
|
910
|
-
rds: 'aws.rds_instance',
|
|
911
|
-
rds_instance: 'aws.rds_instance'
|
|
912
|
-
},
|
|
913
|
-
cisco: {
|
|
914
|
-
firewall: 'mxgraph.cisco.security.firewall',
|
|
915
|
-
ap: 'mxgraph.cisco.misc.access_point',
|
|
916
|
-
access_point: 'mxgraph.cisco.misc.access_point'
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* Resolve a theme token (e.g. $primary) or return the original value.
|
|
922
|
-
*/
|
|
923
|
-
function resolveThemeColor(value, theme, fallback) {
|
|
924
|
-
if (!value) return fallback
|
|
925
|
-
if (typeof value === 'string' && value.startsWith('$')) {
|
|
926
|
-
// $paletteN tokens beyond the selected palette warn in color validation
|
|
927
|
-
// and render with the theme primary fallback.
|
|
928
|
-
const paletteFallback = theme.palette ? theme.colors?.primary || fallback : fallback
|
|
929
|
-
const paletteColor = resolvePaletteToken(value, theme.palette, paletteFallback)
|
|
930
|
-
if (paletteColor != null) return paletteColor
|
|
931
|
-
const tokenName = value.slice(1)
|
|
932
|
-
return theme.colors?.[tokenName] || fallback
|
|
933
|
-
}
|
|
934
|
-
return value
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
function safeStyleText(value, fallback) {
|
|
938
|
-
if (typeof value !== 'string') return fallback
|
|
939
|
-
const trimmed = value.trim()
|
|
940
|
-
if (trimmed === '' || /[;<>"\r\n]/.test(trimmed)) return fallback
|
|
941
|
-
return trimmed
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
function containsCjk(text) {
|
|
945
|
-
return typeof text === 'string' && /[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]/.test(text)
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
// Latin glyphs resolve from Times New Roman and CJK glyphs fall through to
|
|
949
|
-
// SimSun (per-glyph CSS fallback), matching the thesis convention of Times New
|
|
950
|
-
// Roman for Western text and SimSun for Chinese text inside one label.
|
|
951
|
-
function getDefaultFontPolicy() {
|
|
952
|
-
return {
|
|
953
|
-
primary: 'Times New Roman',
|
|
954
|
-
cjk: 'Times New Roman,SimSun',
|
|
955
|
-
formula: 'Times New Roman'
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
function resolveFontBucket({ text, semanticType, treatAsFormula = false }) {
|
|
960
|
-
if (semanticType === 'formula' || treatAsFormula) return 'formula'
|
|
961
|
-
if (containsCjk(text)) return 'cjk'
|
|
962
|
-
return 'primary'
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
function resolveFontFamily(spec, theme, { text, semanticType, styleFontFamily = null, treatAsFormula = false }) {
|
|
966
|
-
const bucket = resolveFontBucket({ text, semanticType, treatAsFormula })
|
|
967
|
-
const forcedFontFamily = safeStyleText(spec.meta?.font?.[bucket], null)
|
|
968
|
-
if (forcedFontFamily) return forcedFontFamily
|
|
969
|
-
|
|
970
|
-
const themeFontFamily = safeStyleText(theme?.typography?.fontFamily?.[bucket], null)
|
|
971
|
-
const fallbackFontFamily = themeFontFamily || safeStyleText(getDefaultFontPolicy()[bucket], 'Times New Roman')
|
|
972
|
-
return safeStyleText(styleFontFamily, fallbackFontFamily)
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
function resolveFontStyle(style = {}) {
|
|
976
|
-
let bits = Number.isInteger(style.fontStyle) ? style.fontStyle : 0
|
|
977
|
-
if (style.bold || style.fontWeight >= 600) bits |= 1
|
|
978
|
-
if (style.italic) bits |= 2
|
|
979
|
-
return bits
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
function pushNumberStyle(parts, name, value) {
|
|
983
|
-
if (isFiniteNumber(value)) parts.push(`${name}=${value}`)
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
function pushTextSpacing(parts, style = {}) {
|
|
987
|
-
pushNumberStyle(parts, 'spacingLeft', style.spacingLeft)
|
|
988
|
-
pushNumberStyle(parts, 'spacingRight', style.spacingRight)
|
|
989
|
-
pushNumberStyle(parts, 'spacingTop', style.spacingTop)
|
|
990
|
-
pushNumberStyle(parts, 'spacingBottom', style.spacingBottom)
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Apply a theme-declared corner radius to a SHAPE_STYLES base style.
|
|
995
|
-
* Only rectangle-family styles (carrying a rounded= token) are affected, and
|
|
996
|
-
* stadium shapes (arcSize>=50, e.g. terminal) keep their semantic rounding.
|
|
997
|
-
* themeRounded=0 emits square corners (rounded=0, no arcSize).
|
|
998
|
-
*/
|
|
999
|
-
function applyThemeRounding(shapeStyle, themeRounded) {
|
|
1000
|
-
if (!isFiniteNumber(themeRounded)) return shapeStyle
|
|
1001
|
-
if (!/(^|;)rounded=/.test(shapeStyle)) return shapeStyle
|
|
1002
|
-
const arcMatch = /(?:^|;)arcSize=(\d+)/.exec(shapeStyle)
|
|
1003
|
-
if (arcMatch && Number(arcMatch[1]) >= 50) return shapeStyle
|
|
1004
|
-
const tokens = shapeStyle.split(';').filter((t) => t && !t.startsWith('rounded=') && !t.startsWith('arcSize='))
|
|
1005
|
-
const rounding = themeRounded > 0 ? ['rounded=1', `arcSize=${Math.min(themeRounded, 50)}`] : ['rounded=0']
|
|
1006
|
-
return [...rounding, ...tokens].join(';')
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
export { resolveIconShape }
|
|
1010
|
-
|
|
1011
|
-
export function deriveNodeIcon(node) {
|
|
1012
|
-
if (node.icon) return node.icon
|
|
1013
|
-
|
|
1014
|
-
const vendor = node.network?.vendor?.toLowerCase()
|
|
1015
|
-
const device = node.network?.device?.toLowerCase()
|
|
1016
|
-
if (!vendor || !device) return null
|
|
1017
|
-
|
|
1018
|
-
return NETWORK_VENDOR_DEVICE_ICONS[vendor]?.[device] || null
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// ============================================================================
|
|
1022
|
-
// Style Generation
|
|
1023
|
-
// ============================================================================
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Generate mxCell style string for a node
|
|
1027
|
-
*/
|
|
1028
|
-
export function generateNodeStyle(node, theme) {
|
|
1029
|
-
return generateNodeStyleWithSpec(node, theme, { meta: {} })
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
function generateNodeStyleWithSpec(node, theme, spec) {
|
|
1033
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
1034
|
-
const shapeStyle = SHAPE_STYLES[semanticType] || SHAPE_STYLES.service
|
|
1035
|
-
|
|
1036
|
-
// Get colors from theme
|
|
1037
|
-
const nodeTheme = theme.node?.[semanticType] || theme.node?.default || {}
|
|
1038
|
-
const defaultTheme = theme.node?.default || {}
|
|
1039
|
-
const isTextNode = semanticType === 'text'
|
|
1040
|
-
|
|
1041
|
-
// Plain text boxes always render transparent: captions, callouts, and
|
|
1042
|
-
// vertical labels must never mask the grid or connectors behind them.
|
|
1043
|
-
// Explicit fills on type "text" are ignored (use a shape node or formula
|
|
1044
|
-
// type for a filled label); validateTextNodeStyles reports the override.
|
|
1045
|
-
const fillColor = isTextNode
|
|
1046
|
-
? 'none'
|
|
1047
|
-
: resolveThemeColor(node.style?.fillColor, theme, nodeTheme.fillColor || defaultTheme.fillColor || '#DBEAFE')
|
|
1048
|
-
const strokeColor = isTextNode
|
|
1049
|
-
? 'none'
|
|
1050
|
-
: resolveThemeColor(node.style?.strokeColor, theme, nodeTheme.strokeColor || defaultTheme.strokeColor || '#2563EB')
|
|
1051
|
-
const strokeWidth =
|
|
1052
|
-
node.style?.strokeWidth ?? (isTextNode ? 0 : (nodeTheme.strokeWidth ?? defaultTheme.strokeWidth ?? 1.5))
|
|
1053
|
-
const fontColor = resolveThemeColor(
|
|
1054
|
-
node.style?.fontColor,
|
|
1055
|
-
theme,
|
|
1056
|
-
nodeTheme.fontColor || defaultTheme.fontColor || '#1E293B'
|
|
1057
|
-
)
|
|
1058
|
-
const fontSize = node.style?.fontSize ?? nodeTheme.fontSize ?? defaultTheme.fontSize ?? FONT_LADDER.node
|
|
1059
|
-
const fontFamily = resolveFontFamily(spec, theme, {
|
|
1060
|
-
text: node.label,
|
|
1061
|
-
semanticType,
|
|
1062
|
-
styleFontFamily: node.style?.fontFamily
|
|
1063
|
-
})
|
|
1064
|
-
const align = safeStyleText(node.style?.align, isTextNode ? 'left' : 'center')
|
|
1065
|
-
const verticalAlign = safeStyleText(node.style?.verticalAlign, isTextNode ? 'top' : 'middle')
|
|
1066
|
-
const fontStyle = resolveFontStyle(node.style)
|
|
1067
|
-
|
|
1068
|
-
if (isTextNode) {
|
|
1069
|
-
const parts = [
|
|
1070
|
-
shapeStyle,
|
|
1071
|
-
'html=1',
|
|
1072
|
-
'whiteSpace=wrap',
|
|
1073
|
-
'labelBackgroundColor=none',
|
|
1074
|
-
`fillColor=${fillColor}`,
|
|
1075
|
-
`strokeColor=${strokeColor}`,
|
|
1076
|
-
`strokeWidth=${strokeWidth}`,
|
|
1077
|
-
`fontColor=${fontColor}`,
|
|
1078
|
-
`fontSize=${fontSize}`,
|
|
1079
|
-
`fontFamily=${fontFamily}`,
|
|
1080
|
-
`align=${align}`,
|
|
1081
|
-
`verticalAlign=${verticalAlign}`
|
|
1082
|
-
]
|
|
1083
|
-
if (fontStyle) parts.push(`fontStyle=${fontStyle}`)
|
|
1084
|
-
pushTextSpacing(parts, node.style)
|
|
1085
|
-
return parts.join(';')
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
// If node has an icon, override shape to use the icon
|
|
1089
|
-
const iconName = node.icon || deriveNodeIcon(node)
|
|
1090
|
-
const imageIconStyle = resolveImageIconStyle(iconName)
|
|
1091
|
-
const iconShape = imageIconStyle ? null : resolveIconShape(iconName)
|
|
1092
|
-
let effectiveShapeStyle = applyThemeRounding(shapeStyle, nodeTheme.rounded ?? defaultTheme.rounded)
|
|
1093
|
-
const parts = []
|
|
1094
|
-
if (imageIconStyle) {
|
|
1095
|
-
effectiveShapeStyle = imageIconStyle
|
|
1096
|
-
parts.push(effectiveShapeStyle)
|
|
1097
|
-
parts.push('whiteSpace=wrap')
|
|
1098
|
-
parts.push(`fillColor=${fillColor}`)
|
|
1099
|
-
parts.push(`strokeColor=${strokeColor}`)
|
|
1100
|
-
parts.push(`strokeWidth=${strokeWidth}`)
|
|
1101
|
-
parts.push(`fontColor=${fontColor}`)
|
|
1102
|
-
parts.push(`fontSize=${fontSize}`)
|
|
1103
|
-
parts.push(`fontFamily=${fontFamily}`)
|
|
1104
|
-
parts.push('labelBackgroundColor=none')
|
|
1105
|
-
parts.push(`align=${align}`)
|
|
1106
|
-
} else if (iconShape) {
|
|
1107
|
-
// aws4 service icons that only exist as resource icons need the compound style
|
|
1108
|
-
const iconKind = resolveShapeNameKind(iconShape)
|
|
1109
|
-
effectiveShapeStyle =
|
|
1110
|
-
iconKind === 'aws4ResourceIcon'
|
|
1111
|
-
? `shape=mxgraph.aws4.resourceIcon;resIcon=${iconShape};aspect=fixed`
|
|
1112
|
-
: iconKind === 'k8sParamIcon'
|
|
1113
|
-
? `shape=${iconShape.replace(/:prIcon=/, ';prIcon=')};aspect=fixed`
|
|
1114
|
-
: `shape=${iconShape}`
|
|
1115
|
-
parts.push(effectiveShapeStyle)
|
|
1116
|
-
parts.push('html=1')
|
|
1117
|
-
parts.push('whiteSpace=wrap')
|
|
1118
|
-
parts.push(`fillColor=${fillColor}`)
|
|
1119
|
-
parts.push(`strokeColor=${strokeColor}`)
|
|
1120
|
-
parts.push(`strokeWidth=${strokeWidth}`)
|
|
1121
|
-
parts.push(`fontColor=${fontColor}`)
|
|
1122
|
-
parts.push(`fontSize=${fontSize}`)
|
|
1123
|
-
parts.push(`fontFamily=${fontFamily}`)
|
|
1124
|
-
parts.push('verticalLabelPosition=bottom')
|
|
1125
|
-
parts.push('labelBackgroundColor=none')
|
|
1126
|
-
parts.push(`align=${align}`)
|
|
1127
|
-
} else {
|
|
1128
|
-
parts.push(
|
|
1129
|
-
effectiveShapeStyle,
|
|
1130
|
-
'html=1',
|
|
1131
|
-
'whiteSpace=wrap',
|
|
1132
|
-
`fillColor=${fillColor}`,
|
|
1133
|
-
`strokeColor=${strokeColor}`,
|
|
1134
|
-
`strokeWidth=${strokeWidth}`,
|
|
1135
|
-
`fontColor=${fontColor}`,
|
|
1136
|
-
`fontSize=${fontSize}`,
|
|
1137
|
-
`fontFamily=${fontFamily}`,
|
|
1138
|
-
`verticalAlign=${verticalAlign}`,
|
|
1139
|
-
`align=${align}`
|
|
1140
|
-
)
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
if (fontStyle) parts.push(`fontStyle=${fontStyle}`)
|
|
1144
|
-
pushTextSpacing(parts, node.style)
|
|
1145
|
-
|
|
1146
|
-
return parts.join(';')
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
const DEFAULT_ARROW_HEAD_SIZE = 12
|
|
1150
|
-
// Open/none arrowheads render unfilled; block/classic/diamond render filled by convention.
|
|
1151
|
-
const UNFILLED_ARROWS = new Set(['open', 'openThin', 'none'])
|
|
1152
|
-
const defaultArrowFill = (arrow) => !UNFILLED_ARROWS.has(arrow)
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* Generate mxCell style string for a connector
|
|
1156
|
-
*/
|
|
1157
|
-
export function generateConnectorStyle(edge, theme, routing = 'orthogonal') {
|
|
1158
|
-
const connectorType = edge.type || 'primary'
|
|
1159
|
-
const connectorTheme = theme.connector?.[connectorType] || theme.connector?.primary || {}
|
|
1160
|
-
|
|
1161
|
-
const strokeColor = resolveThemeColor(edge.style?.strokeColor, theme, connectorTheme.strokeColor || '#1E293B')
|
|
1162
|
-
const strokeWidth = edge.style?.strokeWidth ?? connectorTheme.strokeWidth ?? 2
|
|
1163
|
-
const dashed = edge.style?.dashed ?? connectorTheme.dashed ?? false
|
|
1164
|
-
const dashPattern = edge.style?.dashPattern || connectorTheme.dashPattern || '6 4'
|
|
1165
|
-
const endArrow = edge.style?.endArrow || connectorTheme.endArrow || 'open'
|
|
1166
|
-
const endFill =
|
|
1167
|
-
edge.style?.endFill ??
|
|
1168
|
-
(edge.style?.endArrow
|
|
1169
|
-
? defaultArrowFill(edge.style.endArrow)
|
|
1170
|
-
: (connectorTheme.endFill ?? defaultArrowFill(endArrow)))
|
|
1171
|
-
const startArrow = edge.style?.startArrow || connectorTheme.startArrow
|
|
1172
|
-
const startFill =
|
|
1173
|
-
edge.style?.startFill ??
|
|
1174
|
-
(edge.style?.startArrow
|
|
1175
|
-
? defaultArrowFill(edge.style.startArrow)
|
|
1176
|
-
: (connectorTheme.startFill ?? defaultArrowFill(startArrow)))
|
|
1177
|
-
|
|
1178
|
-
const parts = [
|
|
1179
|
-
'edgeStyle=orthogonalEdgeStyle',
|
|
1180
|
-
routing === 'rounded' ? 'rounded=1' : 'rounded=0',
|
|
1181
|
-
'orthogonalLoop=1',
|
|
1182
|
-
'jettySize=auto',
|
|
1183
|
-
'html=1',
|
|
1184
|
-
`strokeColor=${strokeColor}`,
|
|
1185
|
-
`strokeWidth=${strokeWidth}`,
|
|
1186
|
-
`endArrow=${endArrow}`,
|
|
1187
|
-
`endFill=${endFill ? 1 : 0}`
|
|
1188
|
-
]
|
|
1189
|
-
|
|
1190
|
-
// Bold arrowheads by default (block, classic, open): small stock arrowheads read as
|
|
1191
|
-
// afterthoughts on 2px architecture connectors.
|
|
1192
|
-
const endSize =
|
|
1193
|
-
edge.style?.endSize ??
|
|
1194
|
-
connectorTheme.endSize ??
|
|
1195
|
-
(endArrow === 'block' || endArrow === 'classic' || endArrow === 'open' ? DEFAULT_ARROW_HEAD_SIZE : undefined)
|
|
1196
|
-
if (endSize !== undefined) parts.push(`endSize=${endSize}`)
|
|
1197
|
-
|
|
1198
|
-
if (startArrow) {
|
|
1199
|
-
parts.push(`startArrow=${startArrow}`)
|
|
1200
|
-
parts.push(`startFill=${startFill ? 1 : 0}`)
|
|
1201
|
-
const startSize =
|
|
1202
|
-
edge.style?.startSize ??
|
|
1203
|
-
connectorTheme.startSize ??
|
|
1204
|
-
(startArrow === 'block' || startArrow === 'classic' || startArrow === 'open' ? DEFAULT_ARROW_HEAD_SIZE : undefined)
|
|
1205
|
-
if (startSize !== undefined) parts.push(`startSize=${startSize}`)
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
// Edge entry/exit routing
|
|
1209
|
-
if (edge.style?.exitX !== undefined) parts.push(`exitX=${edge.style.exitX}`)
|
|
1210
|
-
if (edge.style?.exitY !== undefined) parts.push(`exitY=${edge.style.exitY}`)
|
|
1211
|
-
if (edge.style?.exitDx !== undefined) parts.push(`exitDx=${edge.style.exitDx}`)
|
|
1212
|
-
if (edge.style?.exitDy !== undefined) parts.push(`exitDy=${edge.style.exitDy}`)
|
|
1213
|
-
if (edge.style?.entryX !== undefined) parts.push(`entryX=${edge.style.entryX}`)
|
|
1214
|
-
if (edge.style?.entryY !== undefined) parts.push(`entryY=${edge.style.entryY}`)
|
|
1215
|
-
if (edge.style?.entryDx !== undefined) parts.push(`entryDx=${edge.style.entryDx}`)
|
|
1216
|
-
if (edge.style?.entryDy !== undefined) parts.push(`entryDy=${edge.style.entryDy}`)
|
|
1217
|
-
|
|
1218
|
-
if (dashed) {
|
|
1219
|
-
parts.push('dashed=1')
|
|
1220
|
-
parts.push(`dashPattern=${dashPattern}`)
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
// Add jump style for crossings
|
|
1224
|
-
parts.push('jumpStyle=arc')
|
|
1225
|
-
parts.push('jumpSize=8')
|
|
1226
|
-
|
|
1227
|
-
return parts.join(';')
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* Generate mxCell style string for a module container
|
|
1232
|
-
*/
|
|
1233
|
-
export function generateModuleStyle(module, theme) {
|
|
1234
|
-
return generateModuleStyleWithSpec(module, theme, { meta: {} })
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
function generateModuleStyleWithSpec(module, theme, spec) {
|
|
1238
|
-
const moduleTheme = theme.module || {}
|
|
1239
|
-
|
|
1240
|
-
const fillColor = resolveThemeColor(
|
|
1241
|
-
module.style?.fillColor || module.color,
|
|
1242
|
-
theme,
|
|
1243
|
-
moduleTheme.fillColor || '#F8FAFC'
|
|
1244
|
-
)
|
|
1245
|
-
const strokeColor = resolveThemeColor(module.style?.strokeColor, theme, moduleTheme.strokeColor || '#E2E8F0')
|
|
1246
|
-
const strokeWidth = moduleTheme.strokeWidth ?? 1
|
|
1247
|
-
const rounded = moduleTheme.rounded ?? 12
|
|
1248
|
-
const fontColor = resolveThemeColor(module.style?.fontColor, theme, moduleTheme.labelFontColor || '#1E293B')
|
|
1249
|
-
const fontSize = moduleTheme.labelFontSize ?? FONT_LADDER.moduleTitle
|
|
1250
|
-
const fontWeight = moduleTheme.labelFontWeight ?? 600
|
|
1251
|
-
const fontFamily = resolveFontFamily(spec, theme, {
|
|
1252
|
-
text: module.label,
|
|
1253
|
-
semanticType: 'text',
|
|
1254
|
-
styleFontFamily: module.style?.fontFamily
|
|
1255
|
-
})
|
|
1256
|
-
|
|
1257
|
-
// IEEE style dashed border support
|
|
1258
|
-
const dashed = module.style?.dashed ?? moduleTheme.dashed ?? false
|
|
1259
|
-
const dashPattern = module.style?.dashPattern || moduleTheme.dashPattern || '8 4'
|
|
1260
|
-
|
|
1261
|
-
const parts = [
|
|
1262
|
-
rounded > 0 ? `rounded=1` : `rounded=0`,
|
|
1263
|
-
rounded > 0 ? `arcSize=${Math.min(rounded, 20)}` : '',
|
|
1264
|
-
'html=1',
|
|
1265
|
-
'whiteSpace=wrap',
|
|
1266
|
-
`fillColor=${fillColor}`,
|
|
1267
|
-
`strokeColor=${strokeColor}`,
|
|
1268
|
-
`strokeWidth=${strokeWidth}`,
|
|
1269
|
-
`fontColor=${fontColor}`,
|
|
1270
|
-
`fontSize=${fontSize}`,
|
|
1271
|
-
`fontFamily=${fontFamily}`,
|
|
1272
|
-
fontWeight >= 600 ? 'fontStyle=1' : '',
|
|
1273
|
-
'verticalAlign=top',
|
|
1274
|
-
'align=left',
|
|
1275
|
-
'spacingLeft=12',
|
|
1276
|
-
'spacingTop=10',
|
|
1277
|
-
dashed ? 'dashed=1' : '',
|
|
1278
|
-
dashed ? `dashPattern=${dashPattern}` : ''
|
|
1279
|
-
].filter(Boolean)
|
|
1280
|
-
|
|
1281
|
-
return parts.join(';')
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
function resolveEdgeLabelFontSize(edge) {
|
|
1285
|
-
return edge.style?.fontSize ?? FONT_LADDER.edgeLabel
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
function formatNetworkEdgeLabel(edge) {
|
|
1289
|
-
if (edge.label) return edge.label
|
|
1290
|
-
|
|
1291
|
-
const parts = []
|
|
1292
|
-
if (edge.srcInterface || edge.dstInterface) {
|
|
1293
|
-
const src = edge.srcInterface || '?'
|
|
1294
|
-
const dst = edge.dstInterface || '?'
|
|
1295
|
-
parts.push(`${src} ↔ ${dst}`)
|
|
1296
|
-
}
|
|
1297
|
-
if (edge.ip) parts.push(edge.ip)
|
|
1298
|
-
if (edge.vlan !== undefined) parts.push(`VLAN ${edge.vlan}`)
|
|
1299
|
-
if (edge.bandwidth) parts.push(edge.bandwidth)
|
|
1300
|
-
if (edge.linkType) parts.push(edge.linkType)
|
|
1301
|
-
|
|
1302
|
-
return parts.join('\n')
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
function defaultEdgeLabelOffset(edge) {
|
|
1306
|
-
// draw.io centers an edge label on the offset point, so the offset must
|
|
1307
|
-
// cover half the label extent plus clearance, or wide CJK labels will sit
|
|
1308
|
-
// right on top of the connector they annotate. A bent fallback edge anchors
|
|
1309
|
-
// its label on the middle segment, which runs perpendicular to the overall
|
|
1310
|
-
// orientation, so the clearing axis flips.
|
|
1311
|
-
const label = formatNetworkEdgeLabel(edge)
|
|
1312
|
-
const extent = label ? measureLabelExtent(label, resolveEdgeLabelFontSize(edge), 2) : { width: 0, height: 0 }
|
|
1313
|
-
const vertical = edge.__routing?.orientation === 'vertical'
|
|
1314
|
-
const clearHorizontally = edge.__bent ? !vertical : vertical
|
|
1315
|
-
if (clearHorizontally) {
|
|
1316
|
-
return { x: 8 + Math.ceil(extent.width / 2), y: 0 }
|
|
1317
|
-
}
|
|
1318
|
-
return { x: 0, y: -(8 + Math.ceil(extent.height / 2)) }
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
function resolveEdgeLabelOffset(edge) {
|
|
1322
|
-
const explicit = edge.labelOffset
|
|
1323
|
-
if (explicit && isFiniteNumber(explicit.x) && isFiniteNumber(explicit.y)) {
|
|
1324
|
-
return explicit
|
|
1325
|
-
}
|
|
1326
|
-
return defaultEdgeLabelOffset(edge)
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
// ============================================================================
|
|
1330
|
-
// XML Generation
|
|
1331
|
-
// ============================================================================
|
|
1332
|
-
|
|
1333
|
-
const MATH_DELIMITER_PATTERN = /\$\$|\\\(|\\\[|`/
|
|
1334
|
-
|
|
1335
|
-
/**
|
|
1336
|
-
* XML attribute-value normalization folds literal newlines into spaces, so
|
|
1337
|
-
* multi-line labels (including one-character-per-line vertical CJK labels)
|
|
1338
|
-
* must travel as <br> tags, which html=1 labels render as real line breaks.
|
|
1339
|
-
* Math labels keep their newlines: <br> inside $$...$$ breaks MathJax.
|
|
1340
|
-
*/
|
|
1341
|
-
function toHtmlLineBreaks(escapedLabel, rawLabel) {
|
|
1342
|
-
if (MATH_DELIMITER_PATTERN.test(String(rawLabel))) return escapedLabel
|
|
1343
|
-
return escapedLabel.replace(/\n/g, '<br>')
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
/**
|
|
1347
|
-
* Build draw.io XML from specification
|
|
1348
|
-
*/
|
|
1349
|
-
export function buildXml(spec, theme, layout, options = {}) {
|
|
1350
|
-
const { positions, modulePositions } = layout
|
|
1351
|
-
const routing = spec.meta?.routing || 'orthogonal'
|
|
1352
|
-
const routedEdges = buildRoutedEdges(spec, layout)
|
|
1353
|
-
|
|
1354
|
-
const cells = []
|
|
1355
|
-
let nextId = 2
|
|
1356
|
-
const allocId = () => String(nextId++)
|
|
1357
|
-
const nodeIdMap = new Map() // logical id -> cell id
|
|
1358
|
-
const canonical = options.canonicalMetadata
|
|
1359
|
-
const canonicalCell = (cellXml, kind, objectId, link) => {
|
|
1360
|
-
if (!canonical) return cellXml
|
|
1361
|
-
const attrs = [
|
|
1362
|
-
`label=""`,
|
|
1363
|
-
`dataPageId="${escapeXml(String(canonical.pageId))}"`,
|
|
1364
|
-
`dataObjectId="${escapeXml(String(objectId))}"`,
|
|
1365
|
-
`dataObjectKind="${kind}"`
|
|
1366
|
-
]
|
|
1367
|
-
if (link?.targetPageId) {
|
|
1368
|
-
attrs.push(`link="${escapeXml(String(link.href))}"`)
|
|
1369
|
-
if (link.targetObjectId) attrs.push(`dataTargetObjectId="${escapeXml(String(link.targetObjectId))}"`)
|
|
1370
|
-
}
|
|
1371
|
-
return `<UserObject ${attrs.join(' ')}>${cellXml}</UserObject>`
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
// Calculate canvas size
|
|
1375
|
-
let maxX = 0
|
|
1376
|
-
let maxY = 0
|
|
1377
|
-
for (const pos of positions.values()) {
|
|
1378
|
-
maxX = Math.max(maxX, pos.x + pos.width)
|
|
1379
|
-
maxY = Math.max(maxY, pos.y + pos.height)
|
|
1380
|
-
}
|
|
1381
|
-
for (const pos of modulePositions.values()) {
|
|
1382
|
-
maxX = Math.max(maxX, pos.x + pos.width)
|
|
1383
|
-
maxY = Math.max(maxY, pos.y + pos.height)
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
const autoCanvasWidth = snapToGrid(maxX + 80, 8)
|
|
1387
|
-
const autoCanvasHeight = snapToGrid(maxY + 80, 8)
|
|
1388
|
-
const canvas = resolveCanvasSize(spec.meta?.canvas, autoCanvasWidth, autoCanvasHeight)
|
|
1389
|
-
|
|
1390
|
-
// Generate module containers
|
|
1391
|
-
const moduleIdMap = new Map()
|
|
1392
|
-
for (const [moduleId, pos] of modulePositions) {
|
|
1393
|
-
if (moduleId === '__default__') continue
|
|
1394
|
-
|
|
1395
|
-
const module = spec.modules?.find((m) => m.id === moduleId)
|
|
1396
|
-
if (!module) continue
|
|
1397
|
-
|
|
1398
|
-
const cellId = allocId()
|
|
1399
|
-
moduleIdMap.set(moduleId, cellId)
|
|
1400
|
-
|
|
1401
|
-
const style = generateModuleStyleWithSpec(module, theme, spec)
|
|
1402
|
-
const label = toHtmlLineBreaks(prepareMathLabel(module.label || moduleId), module.label || moduleId)
|
|
1403
|
-
|
|
1404
|
-
cells.push(
|
|
1405
|
-
canonicalCell(
|
|
1406
|
-
`<mxCell id="${cellId}" value="${label}" style="${style}" vertex="1" parent="1">` +
|
|
1407
|
-
`<mxGeometry x="${pos.x}" y="${pos.y}" width="${pos.width}" height="${pos.height}" as="geometry"/>` +
|
|
1408
|
-
`</mxCell>`,
|
|
1409
|
-
'module',
|
|
1410
|
-
module.id,
|
|
1411
|
-
canonical?.links?.[module.id]
|
|
1412
|
-
)
|
|
1413
|
-
)
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
// Generate nodes
|
|
1417
|
-
for (const node of spec.nodes || []) {
|
|
1418
|
-
const pos = positions.get(node.id)
|
|
1419
|
-
if (!pos) continue
|
|
1420
|
-
|
|
1421
|
-
const cellId = allocId()
|
|
1422
|
-
nodeIdMap.set(node.id, cellId)
|
|
1423
|
-
|
|
1424
|
-
const style = generateNodeStyleWithSpec(node, theme, spec)
|
|
1425
|
-
const label = toHtmlLineBreaks(prepareMathLabel(node.label), node.label)
|
|
1426
|
-
const parentId = node.module && moduleIdMap.has(node.module) ? moduleIdMap.get(node.module) : '1'
|
|
1427
|
-
|
|
1428
|
-
// Adjust position relative to parent if in module
|
|
1429
|
-
let x = pos.x
|
|
1430
|
-
let y = pos.y
|
|
1431
|
-
if (parentId !== '1') {
|
|
1432
|
-
const modulePos = modulePositions.get(node.module)
|
|
1433
|
-
if (modulePos) {
|
|
1434
|
-
x = pos.x - modulePos.x
|
|
1435
|
-
y = pos.y - modulePos.y
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
cells.push(
|
|
1440
|
-
canonicalCell(
|
|
1441
|
-
`<mxCell id="${cellId}" value="${label}" style="${style}" vertex="1" parent="${parentId}">` +
|
|
1442
|
-
`<mxGeometry x="${x}" y="${y}" width="${pos.width}" height="${pos.height}" as="geometry"/>` +
|
|
1443
|
-
`</mxCell>`,
|
|
1444
|
-
'node',
|
|
1445
|
-
node.id,
|
|
1446
|
-
canonical?.links?.[node.id]
|
|
1447
|
-
)
|
|
1448
|
-
)
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
// Generate edges
|
|
1452
|
-
for (const edge of routedEdges) {
|
|
1453
|
-
const sourceId = nodeIdMap.get(edge.from)
|
|
1454
|
-
const targetId = nodeIdMap.get(edge.to)
|
|
1455
|
-
if (!sourceId || !targetId) continue
|
|
1456
|
-
|
|
1457
|
-
const cellId = allocId()
|
|
1458
|
-
const style = generateConnectorStyle(edge, theme, routing)
|
|
1459
|
-
const rawEdgeLabel = formatNetworkEdgeLabel(edge)
|
|
1460
|
-
const edgeLabel = rawEdgeLabel ? toHtmlLineBreaks(prepareMathLabel(rawEdgeLabel), rawEdgeLabel) : ''
|
|
1461
|
-
|
|
1462
|
-
const edgeCellValue = rawEdgeLabel ? '' : edgeLabel
|
|
1463
|
-
let edgeXml = `<mxCell id="${cellId}" value="${edgeCellValue}" style="${style}" edge="1" parent="1" source="${sourceId}" target="${targetId}">`
|
|
1464
|
-
edgeXml += `<mxGeometry relative="1" as="geometry">`
|
|
1465
|
-
if (edge.waypoints?.length) {
|
|
1466
|
-
edgeXml += '<Array as="points">'
|
|
1467
|
-
for (const point of edge.waypoints) {
|
|
1468
|
-
edgeXml += `<mxPoint x="${point.x}" y="${point.y}"/>`
|
|
1469
|
-
}
|
|
1470
|
-
edgeXml += '</Array>'
|
|
1471
|
-
}
|
|
1472
|
-
edgeXml += `</mxGeometry>`
|
|
1473
|
-
|
|
1474
|
-
// Add label if present
|
|
1475
|
-
if (rawEdgeLabel) {
|
|
1476
|
-
const labelId = allocId()
|
|
1477
|
-
const labelX = edge.labelPosition === 'start' ? '0.2' : edge.labelPosition === 'end' ? '0.8' : '0.5' // center (default)
|
|
1478
|
-
const offset = resolveEdgeLabelOffset(edge)
|
|
1479
|
-
const labelOffset = `<mxPoint x="${offset.x}" y="${offset.y}" as="offset"/>`
|
|
1480
|
-
const labelFontSize = resolveEdgeLabelFontSize(edge)
|
|
1481
|
-
const labelFontColor = resolveThemeColor(edge.style?.fontColor, theme, theme.colors?.textMuted || '#64748B')
|
|
1482
|
-
const labelFontFamily = resolveFontFamily(spec, theme, {
|
|
1483
|
-
text: rawEdgeLabel,
|
|
1484
|
-
semanticType: 'text',
|
|
1485
|
-
treatAsFormula: isLikelyStandaloneMathLabel(rawEdgeLabel)
|
|
1486
|
-
})
|
|
1487
|
-
edgeXml += `</mxCell>`
|
|
1488
|
-
edgeXml += `<mxCell id="${labelId}" value="${edgeLabel}" style="edgeLabel;html=1;align=center;verticalAlign=middle;fontSize=${labelFontSize};fontColor=${labelFontColor};fontFamily=${labelFontFamily};" vertex="1" connectable="0" parent="${cellId}">`
|
|
1489
|
-
edgeXml += `<mxGeometry x="${labelX}" relative="1" as="geometry">${labelOffset}</mxGeometry>`
|
|
1490
|
-
edgeXml += `</mxCell>`
|
|
1491
|
-
} else {
|
|
1492
|
-
edgeXml += `</mxCell>`
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
cells.push(canonicalCell(edgeXml, 'edge', edge.id, null))
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
// Build final XML
|
|
1499
|
-
const canvasBackground = resolveThemeColor(
|
|
1500
|
-
spec.meta?.replication?.background,
|
|
1501
|
-
theme,
|
|
1502
|
-
theme.canvas?.background || '#FFFFFF'
|
|
1503
|
-
)
|
|
1504
|
-
const xml =
|
|
1505
|
-
`<mxGraphModel dx="1120" dy="720" grid="1" gridSize="8" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="${canvas.width}" pageHeight="${canvas.height}" math="1" background="${canvasBackground}">` +
|
|
1506
|
-
`<root>` +
|
|
1507
|
-
`<mxCell id="0"/>` +
|
|
1508
|
-
`<mxCell id="1" parent="0"/>` +
|
|
1509
|
-
cells.join('') +
|
|
1510
|
-
`</root>` +
|
|
1511
|
-
`</mxGraphModel>`
|
|
1512
|
-
|
|
1513
|
-
return xml
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
// ============================================================================
|
|
1517
|
-
// Spec Validation Functions
|
|
1518
|
-
// ============================================================================
|
|
1519
|
-
|
|
1520
|
-
const HEX_COLOR_REGEX = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/
|
|
1521
|
-
const ACADEMIC_FIGURE_TYPES = ['architecture', 'roadmap', 'workflow']
|
|
1522
|
-
|
|
1523
|
-
function normalizeLabelText(label) {
|
|
1524
|
-
return String(label || '')
|
|
1525
|
-
.replace(/\s+/g, ' ')
|
|
1526
|
-
.trim()
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* Estimate the rendered length of a label: math delimiters vanish and each
|
|
1531
|
-
* TeX command renders as roughly one glyph, so counting raw source length
|
|
1532
|
-
* would flag legitimate tensor formulas as verbose.
|
|
1533
|
-
*/
|
|
1534
|
-
function estimateVisibleLabelLength(label) {
|
|
1535
|
-
return String(label || '')
|
|
1536
|
-
.replace(/\$\$|\\\(|\\\)/g, '')
|
|
1537
|
-
.replace(/\\[a-zA-Z]+/g, 'x')
|
|
1538
|
-
.replace(/[{}^_]/g, '')
|
|
1539
|
-
.replace(/\s+/g, ' ')
|
|
1540
|
-
.trim().length
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
function countManualLabelLines(label) {
|
|
1544
|
-
return String(label || '').split(/\r?\n/).length
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
function isHexColor(value) {
|
|
1548
|
-
return typeof value === 'string' && HEX_COLOR_REGEX.test(value)
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
function normalizeHexColor(value) {
|
|
1552
|
-
if (!isHexColor(value)) return null
|
|
1553
|
-
const hex = value.slice(1)
|
|
1554
|
-
if (hex.length === 3) {
|
|
1555
|
-
return `#${hex
|
|
1556
|
-
.split('')
|
|
1557
|
-
.map((char) => char + char)
|
|
1558
|
-
.join('')
|
|
1559
|
-
.toUpperCase()}`
|
|
1560
|
-
}
|
|
1561
|
-
return `#${hex.toUpperCase()}`
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
function isGrayscaleHex(value) {
|
|
1565
|
-
const hex = normalizeHexColor(value)
|
|
1566
|
-
if (!hex) return false
|
|
1567
|
-
return hex.slice(1, 3) === hex.slice(3, 5) && hex.slice(3, 5) === hex.slice(5, 7)
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
function collectAcademicColorOverrideWarnings(spec, theme) {
|
|
1571
|
-
const offenders = []
|
|
1572
|
-
|
|
1573
|
-
const checkColor = (value, context) => {
|
|
1574
|
-
if (!value) return
|
|
1575
|
-
const resolved = resolveThemeColor(value, theme, value)
|
|
1576
|
-
if (isHexColor(resolved) && !isGrayscaleHex(resolved)) {
|
|
1577
|
-
offenders.push(`${context}=${normalizeHexColor(resolved)}`)
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
spec.nodes?.forEach((node) => {
|
|
1582
|
-
checkColor(node.style?.fillColor, `node "${node.id}" fill`)
|
|
1583
|
-
checkColor(node.style?.strokeColor, `node "${node.id}" stroke`)
|
|
1584
|
-
checkColor(node.style?.fontColor, `node "${node.id}" text`)
|
|
1585
|
-
})
|
|
1586
|
-
|
|
1587
|
-
spec.edges?.forEach((edge) => {
|
|
1588
|
-
checkColor(edge.style?.strokeColor, `edge "${edge.from}->${edge.to}" stroke`)
|
|
1589
|
-
})
|
|
1590
|
-
|
|
1591
|
-
spec.modules?.forEach((module) => {
|
|
1592
|
-
checkColor(module.color, `module "${module.id}" color`)
|
|
1593
|
-
checkColor(module.style?.fillColor, `module "${module.id}" fill`)
|
|
1594
|
-
checkColor(module.style?.strokeColor, `module "${module.id}" stroke`)
|
|
1595
|
-
checkColor(module.style?.fontColor, `module "${module.id}" text`)
|
|
1596
|
-
})
|
|
1597
|
-
|
|
1598
|
-
return offenders
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
/**
|
|
1602
|
-
* Validate all color values in spec against theme tokens and hex format.
|
|
1603
|
-
* Warns on invalid values; does not throw by default.
|
|
1604
|
-
* @param {Object} spec - Parsed YAML spec
|
|
1605
|
-
* @param {Object} theme - Loaded theme object
|
|
1606
|
-
* @param {Object|null} palette - Materialized palette or null
|
|
1607
|
-
* @returns {Array<string>} Array of validation warning messages
|
|
1608
|
-
*/
|
|
1609
|
-
export function validateColorScheme(spec, theme, palette = null) {
|
|
1610
|
-
const warnings = []
|
|
1611
|
-
const validTokens = new Set(Object.keys(theme.colors || {}).map((k) => `$${k}`))
|
|
1612
|
-
palette?.entries?.forEach((entry, index) => {
|
|
1613
|
-
const prefix = `$palette${index + 1}`
|
|
1614
|
-
validTokens.add(prefix)
|
|
1615
|
-
for (const variant of ['fill', 'stroke', 'text']) validTokens.add(`${prefix}-${variant}`)
|
|
1616
|
-
})
|
|
1617
|
-
|
|
1618
|
-
const checkColor = (value, context) => {
|
|
1619
|
-
if (!value) return
|
|
1620
|
-
if (value === 'none' || value === 'transparent') return // explicit transparency
|
|
1621
|
-
if (validTokens.has(value)) return // valid theme token
|
|
1622
|
-
if (HEX_COLOR_REGEX.test(value)) return // valid hex color
|
|
1623
|
-
const tokenSamples = [...validTokens].slice(0, 3).join(', ')
|
|
1624
|
-
warnings.push(
|
|
1625
|
-
`Invalid color "${value}" in ${context}. ` +
|
|
1626
|
-
`Use a hex code (#RGB or #RRGGBB) or a theme token (${tokenSamples}...)`
|
|
1627
|
-
)
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
// Validate node style overrides
|
|
1631
|
-
spec.nodes?.forEach((node) => {
|
|
1632
|
-
const ctx = `node "${node.id}"`
|
|
1633
|
-
checkColor(node.style?.fillColor, `${ctx}.style.fillColor`)
|
|
1634
|
-
checkColor(node.style?.strokeColor, `${ctx}.style.strokeColor`)
|
|
1635
|
-
checkColor(node.style?.fontColor, `${ctx}.style.fontColor`)
|
|
1636
|
-
})
|
|
1637
|
-
|
|
1638
|
-
// Validate edge style overrides
|
|
1639
|
-
spec.edges?.forEach((edge) => {
|
|
1640
|
-
const ctx = `edge "${edge.from}→${edge.to}"`
|
|
1641
|
-
checkColor(edge.style?.strokeColor, `${ctx}.style.strokeColor`)
|
|
1642
|
-
})
|
|
1643
|
-
|
|
1644
|
-
// Validate module style overrides
|
|
1645
|
-
spec.modules?.forEach((mod) => {
|
|
1646
|
-
const ctx = `module "${mod.id}"`
|
|
1647
|
-
checkColor(mod.color, `${ctx}.color`)
|
|
1648
|
-
checkColor(mod.style?.fillColor, `${ctx}.style.fillColor`)
|
|
1649
|
-
checkColor(mod.style?.strokeColor, `${ctx}.style.strokeColor`)
|
|
1650
|
-
})
|
|
1651
|
-
|
|
1652
|
-
checkColor(spec.meta?.replication?.background, 'meta.replication.background')
|
|
1653
|
-
spec.meta?.replication?.palette?.forEach((entry, index) => {
|
|
1654
|
-
if (!entry?.hex) return
|
|
1655
|
-
if (HEX_COLOR_REGEX.test(entry.hex)) return
|
|
1656
|
-
warnings.push(
|
|
1657
|
-
`Invalid color "${entry.hex}" in meta.replication.palette[${index}].hex. ` +
|
|
1658
|
-
'Use a flat hex code (#RGB or #RRGGBB) for extracted source colors.'
|
|
1659
|
-
)
|
|
1660
|
-
})
|
|
1661
|
-
|
|
1662
|
-
return warnings
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
function collectPaletteTokenIndexes(spec) {
|
|
1666
|
-
const indexes = new Set()
|
|
1667
|
-
const add = (value) => {
|
|
1668
|
-
const index = paletteTokenIndex(value)
|
|
1669
|
-
if (index != null) indexes.add(index)
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
spec.nodes?.forEach((node) => {
|
|
1673
|
-
add(node.style?.fillColor)
|
|
1674
|
-
add(node.style?.strokeColor)
|
|
1675
|
-
add(node.style?.fontColor)
|
|
1676
|
-
})
|
|
1677
|
-
spec.edges?.forEach((edge) => {
|
|
1678
|
-
add(edge.style?.strokeColor)
|
|
1679
|
-
add(edge.style?.fontColor)
|
|
1680
|
-
})
|
|
1681
|
-
spec.modules?.forEach((module) => {
|
|
1682
|
-
add(module.color)
|
|
1683
|
-
add(module.style?.fillColor)
|
|
1684
|
-
add(module.style?.strokeColor)
|
|
1685
|
-
add(module.style?.fontColor)
|
|
1686
|
-
})
|
|
1687
|
-
add(spec.meta?.replication?.background)
|
|
1688
|
-
return [...indexes]
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* Detect conflicts between the declared layout direction and manual node
|
|
1693
|
-
* position coordinates. Also checks for node overlap.
|
|
1694
|
-
* @param {Object} spec - Parsed YAML spec
|
|
1695
|
-
* @returns {Array<string>} Array of layout consistency warning messages
|
|
1696
|
-
*/
|
|
1697
|
-
export function validateLayoutConsistency(spec) {
|
|
1698
|
-
const warnings = []
|
|
1699
|
-
const layout = spec.meta?.layout || 'horizontal'
|
|
1700
|
-
const nodesWithPos = (spec.nodes || []).filter(
|
|
1701
|
-
(n) => n.position && typeof n.position.x === 'number' && typeof n.position.y === 'number'
|
|
1702
|
-
)
|
|
1703
|
-
|
|
1704
|
-
if (nodesWithPos.length < 2) return warnings // not enough data
|
|
1705
|
-
|
|
1706
|
-
const xs = nodesWithPos.map((n) => n.position.x)
|
|
1707
|
-
const ys = nodesWithPos.map((n) => n.position.y)
|
|
1708
|
-
const xRange = Math.max(...xs) - Math.min(...xs)
|
|
1709
|
-
const yRange = Math.max(...ys) - Math.min(...ys)
|
|
1710
|
-
|
|
1711
|
-
if (layout === 'horizontal' && yRange > xRange * 1.5) {
|
|
1712
|
-
warnings.push(
|
|
1713
|
-
`Layout is "horizontal" but nodes span ${yRange}px vertically vs ${xRange}px horizontally. ` +
|
|
1714
|
-
`Consider switching meta.layout to "vertical", or recalculate node positions.`
|
|
1715
|
-
)
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
if (layout === 'vertical' && xRange > yRange * 1.5) {
|
|
1719
|
-
warnings.push(
|
|
1720
|
-
`Layout is "vertical" but nodes span ${xRange}px horizontally vs ${yRange}px vertically. ` +
|
|
1721
|
-
`Consider switching meta.layout to "horizontal", or recalculate node positions.`
|
|
1722
|
-
)
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
// Check for potential node overlap (skip if too many nodes — O(n²) cost)
|
|
1726
|
-
const MIN_CLEARANCE = 20
|
|
1727
|
-
if (nodesWithPos.length <= 30) {
|
|
1728
|
-
for (let i = 0; i < nodesWithPos.length; i++) {
|
|
1729
|
-
for (let j = i + 1; j < nodesWithPos.length; j++) {
|
|
1730
|
-
const a = nodesWithPos[i]
|
|
1731
|
-
const b = nodesWithPos[j]
|
|
1732
|
-
const dx = Math.abs(a.position.x - b.position.x)
|
|
1733
|
-
const dy = Math.abs(a.position.y - b.position.y)
|
|
1734
|
-
if (dx < MIN_CLEARANCE && dy < MIN_CLEARANCE) {
|
|
1735
|
-
const dist = Math.round(Math.hypot(dx, dy))
|
|
1736
|
-
warnings.push(
|
|
1737
|
-
`Nodes "${a.id}" and "${b.id}" may overlap ` +
|
|
1738
|
-
`(center distance ${dist}px < ${MIN_CLEARANCE}px minimum clearance)`
|
|
1739
|
-
)
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
return warnings
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
const TRANSPARENT_STYLE_VALUES = new Set(['none', 'transparent'])
|
|
1749
|
-
|
|
1750
|
-
/**
|
|
1751
|
-
* Plain text nodes must stay transparent, and their declared bounds must be
|
|
1752
|
-
* large enough for the content. The style generator already forces
|
|
1753
|
-
* fillColor=none/strokeColor=none for type "text"; this pass surfaces ignored
|
|
1754
|
-
* overrides and likely clipping so specs stay honest.
|
|
1755
|
-
*/
|
|
1756
|
-
export function validateTextNodeStyles(spec) {
|
|
1757
|
-
const warnings = []
|
|
1758
|
-
for (const node of spec.nodes || []) {
|
|
1759
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
1760
|
-
if (semanticType !== 'text') continue
|
|
1761
|
-
|
|
1762
|
-
for (const field of ['fillColor', 'strokeColor']) {
|
|
1763
|
-
const value = node.style?.[field]
|
|
1764
|
-
if (value !== undefined && !TRANSPARENT_STYLE_VALUES.has(String(value).toLowerCase())) {
|
|
1765
|
-
warnings.push(
|
|
1766
|
-
`Text node "${node.id}" declares style.${field}="${value}", but plain text boxes always render transparent ` +
|
|
1767
|
-
'(fillColor=none;strokeColor=none;labelBackgroundColor=none). Use a shape node or formula type for a filled label.'
|
|
1768
|
-
)
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
const bounds = node.bounds
|
|
1773
|
-
if (bounds && isFiniteNumber(bounds.width) && isFiniteNumber(bounds.height) && node.label) {
|
|
1774
|
-
const fontSize = node.style?.fontSize ?? FONT_LADDER.text
|
|
1775
|
-
const extent = measureLabelExtent(node.label, fontSize, 8)
|
|
1776
|
-
if (bounds.width + 2 < extent.width || bounds.height + 2 < extent.height) {
|
|
1777
|
-
warnings.push(
|
|
1778
|
-
`Text node "${node.id}" bounds ${bounds.width}x${bounds.height} are smaller than the estimated content size ` +
|
|
1779
|
-
`${extent.width}x${extent.height}; the label may clip or wrap badly. Enlarge bounds or shorten the text.`
|
|
1780
|
-
)
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
return warnings
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
const FACE_SLOTS = [0.25, 0.5, 0.75, 0.33, 0.66, 0.2, 0.8]
|
|
1788
|
-
|
|
1789
|
-
function resolveProfile(spec) {
|
|
1790
|
-
if (spec.meta?.profile) return spec.meta.profile
|
|
1791
|
-
const theme = spec.meta?.theme || ''
|
|
1792
|
-
if (theme === 'academic' || theme === 'academic-color') return 'academic-paper'
|
|
1793
|
-
return 'default'
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
function detectEdgeFaces(sourcePos, targetPos) {
|
|
1797
|
-
const sourceCenterX = sourcePos.x + sourcePos.width / 2
|
|
1798
|
-
const sourceCenterY = sourcePos.y + sourcePos.height / 2
|
|
1799
|
-
const targetCenterX = targetPos.x + targetPos.width / 2
|
|
1800
|
-
const targetCenterY = targetPos.y + targetPos.height / 2
|
|
1801
|
-
const dx = targetCenterX - sourceCenterX
|
|
1802
|
-
const dy = targetCenterY - sourceCenterY
|
|
1803
|
-
// Prefer the axis whose face-to-face gap is positive: a negative gap means
|
|
1804
|
-
// the shapes overlap on that axis, so routing along it would immediately
|
|
1805
|
-
// clash with the shapes themselves (wide bars above narrow boxes, etc.).
|
|
1806
|
-
const horizontalGap = Math.abs(dx) - (sourcePos.width + targetPos.width) / 2
|
|
1807
|
-
const verticalGap = Math.abs(dy) - (sourcePos.height + targetPos.height) / 2
|
|
1808
|
-
let horizontal
|
|
1809
|
-
if (verticalGap >= 0 && horizontalGap < 0) {
|
|
1810
|
-
horizontal = false
|
|
1811
|
-
} else if (horizontalGap >= 0 && verticalGap < 0) {
|
|
1812
|
-
horizontal = true
|
|
1813
|
-
} else {
|
|
1814
|
-
horizontal = Math.abs(dx) >= Math.abs(dy)
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
if (horizontal) {
|
|
1818
|
-
return {
|
|
1819
|
-
orientation: 'horizontal',
|
|
1820
|
-
sourceFace: dx >= 0 ? 'right' : 'left',
|
|
1821
|
-
targetFace: dx >= 0 ? 'left' : 'right'
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
return {
|
|
1826
|
-
orientation: 'vertical',
|
|
1827
|
-
sourceFace: dy >= 0 ? 'bottom' : 'top',
|
|
1828
|
-
targetFace: dy >= 0 ? 'top' : 'bottom'
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
function applyFaceSlot(style, face, slot) {
|
|
1833
|
-
if (face === 'left') {
|
|
1834
|
-
style.exitX = style.exitX ?? 0
|
|
1835
|
-
style.exitY = style.exitY ?? slot
|
|
1836
|
-
} else if (face === 'right') {
|
|
1837
|
-
style.exitX = style.exitX ?? 1
|
|
1838
|
-
style.exitY = style.exitY ?? slot
|
|
1839
|
-
} else if (face === 'top') {
|
|
1840
|
-
style.exitX = style.exitX ?? slot
|
|
1841
|
-
style.exitY = style.exitY ?? 0
|
|
1842
|
-
} else if (face === 'bottom') {
|
|
1843
|
-
style.exitX = style.exitX ?? slot
|
|
1844
|
-
style.exitY = style.exitY ?? 1
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
style.exitDx = style.exitDx ?? 0
|
|
1848
|
-
style.exitDy = style.exitDy ?? 0
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
function applyTargetFaceSlot(style, face, slot) {
|
|
1852
|
-
if (face === 'left') {
|
|
1853
|
-
style.entryX = style.entryX ?? 0
|
|
1854
|
-
style.entryY = style.entryY ?? slot
|
|
1855
|
-
} else if (face === 'right') {
|
|
1856
|
-
style.entryX = style.entryX ?? 1
|
|
1857
|
-
style.entryY = style.entryY ?? slot
|
|
1858
|
-
} else if (face === 'top') {
|
|
1859
|
-
style.entryX = style.entryX ?? slot
|
|
1860
|
-
style.entryY = style.entryY ?? 0
|
|
1861
|
-
} else if (face === 'bottom') {
|
|
1862
|
-
style.entryX = style.entryX ?? slot
|
|
1863
|
-
style.entryY = style.entryY ?? 1
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
style.entryDx = style.entryDx ?? 0
|
|
1867
|
-
style.entryDy = style.entryDy ?? 0
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
function getSlot(index) {
|
|
1871
|
-
return FACE_SLOTS[index % FACE_SLOTS.length]
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
const CONNECTION_CORNER_MARGIN = 8
|
|
1875
|
-
const CONNECTION_MIN_SEPARATION = 30
|
|
1876
|
-
|
|
1877
|
-
/**
|
|
1878
|
-
* Interval of absolute coordinates (X for vertical edges, Y for horizontal
|
|
1879
|
-
* edges) where both faces can host the same connection coordinate, keeping the
|
|
1880
|
-
* orthogonal edge a single straight segment. Null when the faces do not
|
|
1881
|
-
* overlap on the shared axis and a bend is genuinely required.
|
|
1882
|
-
*/
|
|
1883
|
-
function sharedAxisInterval(sourcePos, targetPos, orientation) {
|
|
1884
|
-
const vertical = orientation === 'vertical'
|
|
1885
|
-
const lo = vertical ? Math.max(sourcePos.x, targetPos.x) : Math.max(sourcePos.y, targetPos.y)
|
|
1886
|
-
const hi = vertical
|
|
1887
|
-
? Math.min(sourcePos.x + sourcePos.width, targetPos.x + targetPos.width)
|
|
1888
|
-
: Math.min(sourcePos.y + sourcePos.height, targetPos.y + targetPos.height)
|
|
1889
|
-
const min = lo + CONNECTION_CORNER_MARGIN
|
|
1890
|
-
const max = hi - CONNECTION_CORNER_MARGIN
|
|
1891
|
-
return min <= max ? { lo: min, hi: max } : null
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
* Straight edges anchor on the center of the narrower face: a small box
|
|
1896
|
-
* connects from its own center straight into the larger box, which is how
|
|
1897
|
-
* hand-drawn architecture diagrams keep their vertical arrows straight.
|
|
1898
|
-
*/
|
|
1899
|
-
function preferredSharedCoordinate(sourcePos, targetPos, orientation, interval) {
|
|
1900
|
-
const vertical = orientation === 'vertical'
|
|
1901
|
-
const sourceSpan = vertical ? sourcePos.width : sourcePos.height
|
|
1902
|
-
const targetSpan = vertical ? targetPos.width : targetPos.height
|
|
1903
|
-
const sourceCenter = vertical ? sourcePos.x + sourcePos.width / 2 : sourcePos.y + sourcePos.height / 2
|
|
1904
|
-
const targetCenter = vertical ? targetPos.x + targetPos.width / 2 : targetPos.y + targetPos.height / 2
|
|
1905
|
-
const preferred = sourceSpan <= targetSpan ? sourceCenter : targetCenter
|
|
1906
|
-
return Math.min(interval.hi, Math.max(interval.lo, preferred))
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
function roundFraction(value) {
|
|
1910
|
-
return Math.round(value * 10000) / 10000
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
/**
|
|
1914
|
-
* Spread straight edges that landed within CONNECTION_MIN_SEPARATION of each
|
|
1915
|
-
* other on the same physical face. Moving an edge moves both endpoints
|
|
1916
|
-
* together, so collinearity is preserved; clamping keeps every edge inside its
|
|
1917
|
-
* own shared interval.
|
|
1918
|
-
*/
|
|
1919
|
-
function spreadSharedCoordinates(edges) {
|
|
1920
|
-
const faceGroups = new Map()
|
|
1921
|
-
for (const edge of edges) {
|
|
1922
|
-
if (!edge.__shared) continue
|
|
1923
|
-
const keys = [`${edge.from}:${edge.__routing.sourceFace}`, `${edge.to}:${edge.__routing.targetFace}`]
|
|
1924
|
-
for (const key of keys) {
|
|
1925
|
-
if (!faceGroups.has(key)) faceGroups.set(key, [])
|
|
1926
|
-
faceGroups.get(key).push(edge)
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
const sortedKeys = [...faceGroups.keys()].sort()
|
|
1930
|
-
for (const key of sortedKeys) {
|
|
1931
|
-
const group = faceGroups
|
|
1932
|
-
.get(key)
|
|
1933
|
-
.slice()
|
|
1934
|
-
.sort((a, b) => a.__shared.coord - b.__shared.coord)
|
|
1935
|
-
let start = 0
|
|
1936
|
-
while (start < group.length) {
|
|
1937
|
-
let end = start
|
|
1938
|
-
while (
|
|
1939
|
-
end + 1 < group.length &&
|
|
1940
|
-
group[end + 1].__shared.coord - group[end].__shared.coord < CONNECTION_MIN_SEPARATION
|
|
1941
|
-
) {
|
|
1942
|
-
end++
|
|
1943
|
-
}
|
|
1944
|
-
if (end > start) {
|
|
1945
|
-
const cluster = group.slice(start, end + 1)
|
|
1946
|
-
const mean = cluster.reduce((sum, item) => sum + item.__shared.coord, 0) / cluster.length
|
|
1947
|
-
cluster.forEach((item, index) => {
|
|
1948
|
-
const desired = mean + (index - (cluster.length - 1) / 2) * CONNECTION_MIN_SEPARATION
|
|
1949
|
-
item.__shared.coord = Math.min(item.__shared.interval.hi, Math.max(item.__shared.interval.lo, desired))
|
|
1950
|
-
})
|
|
1951
|
-
}
|
|
1952
|
-
start = end + 1
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
function buildRoutedEdges(spec, layout) {
|
|
1958
|
-
const { positions } = layout
|
|
1959
|
-
const declaredLayout = spec.meta?.layout || 'horizontal'
|
|
1960
|
-
const edges = (spec.edges || []).map((edge) => ({
|
|
1961
|
-
...edge,
|
|
1962
|
-
style: { ...(edge.style || {}) },
|
|
1963
|
-
waypoints: edge.waypoints ? edge.waypoints.map((point) => ({ ...point })) : undefined
|
|
1964
|
-
}))
|
|
1965
|
-
|
|
1966
|
-
const sourceGroups = new Map()
|
|
1967
|
-
const targetGroups = new Map()
|
|
1968
|
-
|
|
1969
|
-
for (const edge of edges) {
|
|
1970
|
-
const sourcePos = positions.get(edge.from)
|
|
1971
|
-
const targetPos = positions.get(edge.to)
|
|
1972
|
-
if (!sourcePos || !targetPos) continue
|
|
1973
|
-
|
|
1974
|
-
const faces = detectEdgeFaces(sourcePos, targetPos)
|
|
1975
|
-
edge.__routing = faces
|
|
1976
|
-
|
|
1977
|
-
if (edge.waypoints?.length) continue
|
|
1978
|
-
|
|
1979
|
-
if (declaredLayout === 'star' && edge.__routing.orientation === 'horizontal') {
|
|
1980
|
-
const sourceCenterY = sourcePos.y + sourcePos.height / 2
|
|
1981
|
-
const targetCenterY = targetPos.y + targetPos.height / 2
|
|
1982
|
-
const midX = snapToGrid((sourcePos.x + sourcePos.width / 2 + targetPos.x + targetPos.width / 2) / 2, 8)
|
|
1983
|
-
const waypointCandidates = [
|
|
1984
|
-
{ x: midX, y: snapToGrid(sourceCenterY, 8) },
|
|
1985
|
-
{ x: midX, y: snapToGrid(targetCenterY, 8) }
|
|
1986
|
-
]
|
|
1987
|
-
const dedupedWaypoints = []
|
|
1988
|
-
for (const point of waypointCandidates) {
|
|
1989
|
-
const prev = dedupedWaypoints[dedupedWaypoints.length - 1]
|
|
1990
|
-
if (!prev || Math.abs(prev.x - point.x) >= 1 || Math.abs(prev.y - point.y) >= 1) {
|
|
1991
|
-
dedupedWaypoints.push(point)
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
edge.waypoints = dedupedWaypoints
|
|
1995
|
-
if (edge.waypoints.length > 0) {
|
|
1996
|
-
edge.__bent = true
|
|
1997
|
-
continue
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
if (declaredLayout === 'mesh') {
|
|
2002
|
-
const sourceCenterX = sourcePos.x + sourcePos.width / 2
|
|
2003
|
-
const sourceCenterY = sourcePos.y + sourcePos.height / 2
|
|
2004
|
-
const targetCenterX = targetPos.x + targetPos.width / 2
|
|
2005
|
-
const targetCenterY = targetPos.y + targetPos.height / 2
|
|
2006
|
-
const midX = snapToGrid((sourceCenterX + targetCenterX) / 2, 8)
|
|
2007
|
-
const midY = snapToGrid((sourceCenterY + targetCenterY) / 2, 8)
|
|
2008
|
-
if (Math.abs(sourceCenterX - targetCenterX) > 80 && Math.abs(sourceCenterY - targetCenterY) > 80) {
|
|
2009
|
-
const waypointCandidates = [
|
|
2010
|
-
{ x: midX, y: snapToGrid(sourceCenterY, 8) },
|
|
2011
|
-
{ x: midX, y: midY },
|
|
2012
|
-
{ x: midX, y: snapToGrid(targetCenterY, 8) }
|
|
2013
|
-
]
|
|
2014
|
-
const dedupedWaypoints = []
|
|
2015
|
-
for (const point of waypointCandidates) {
|
|
2016
|
-
const prev = dedupedWaypoints[dedupedWaypoints.length - 1]
|
|
2017
|
-
if (!prev || Math.abs(prev.x - point.x) >= 1 || Math.abs(prev.y - point.y) >= 1) {
|
|
2018
|
-
dedupedWaypoints.push(point)
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
edge.waypoints = dedupedWaypoints
|
|
2022
|
-
if (edge.waypoints.length > 0) {
|
|
2023
|
-
edge.__bent = true
|
|
2024
|
-
continue
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
const hasManualPoints =
|
|
2030
|
-
edge.style.exitX !== undefined ||
|
|
2031
|
-
edge.style.exitY !== undefined ||
|
|
2032
|
-
edge.style.entryX !== undefined ||
|
|
2033
|
-
edge.style.entryY !== undefined
|
|
2034
|
-
const interval = hasManualPoints ? null : sharedAxisInterval(sourcePos, targetPos, faces.orientation)
|
|
2035
|
-
if (interval) {
|
|
2036
|
-
edge.__shared = {
|
|
2037
|
-
interval,
|
|
2038
|
-
coord: preferredSharedCoordinate(sourcePos, targetPos, faces.orientation, interval)
|
|
2039
|
-
}
|
|
2040
|
-
continue
|
|
2041
|
-
}
|
|
2042
|
-
edge.__bent = !hasManualPoints
|
|
2043
|
-
|
|
2044
|
-
const sourceKey = `${edge.from}:${faces.sourceFace}`
|
|
2045
|
-
const targetKey = `${edge.to}:${faces.targetFace}`
|
|
2046
|
-
|
|
2047
|
-
if (!sourceGroups.has(sourceKey)) sourceGroups.set(sourceKey, [])
|
|
2048
|
-
if (!targetGroups.has(targetKey)) targetGroups.set(targetKey, [])
|
|
2049
|
-
sourceGroups.get(sourceKey).push(edge)
|
|
2050
|
-
targetGroups.get(targetKey).push(edge)
|
|
2051
|
-
}
|
|
2052
|
-
|
|
2053
|
-
spreadSharedCoordinates(edges)
|
|
2054
|
-
|
|
2055
|
-
const usedFaceCoords = new Map()
|
|
2056
|
-
const faceCoordsFor = (nodeId, face) => {
|
|
2057
|
-
const key = `${nodeId}:${face}`
|
|
2058
|
-
if (!usedFaceCoords.has(key)) usedFaceCoords.set(key, [])
|
|
2059
|
-
return usedFaceCoords.get(key)
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
for (const edge of edges) {
|
|
2063
|
-
if (!edge.__shared) continue
|
|
2064
|
-
const sourcePos = positions.get(edge.from)
|
|
2065
|
-
const targetPos = positions.get(edge.to)
|
|
2066
|
-
const { coord } = edge.__shared
|
|
2067
|
-
const style = edge.style
|
|
2068
|
-
if (edge.__routing.orientation === 'vertical') {
|
|
2069
|
-
style.exitX = roundFraction((coord - sourcePos.x) / sourcePos.width)
|
|
2070
|
-
style.exitY = edge.__routing.sourceFace === 'bottom' ? 1 : 0
|
|
2071
|
-
style.entryX = roundFraction((coord - targetPos.x) / targetPos.width)
|
|
2072
|
-
style.entryY = edge.__routing.targetFace === 'top' ? 0 : 1
|
|
2073
|
-
} else {
|
|
2074
|
-
style.exitX = edge.__routing.sourceFace === 'right' ? 1 : 0
|
|
2075
|
-
style.exitY = roundFraction((coord - sourcePos.y) / sourcePos.height)
|
|
2076
|
-
style.entryX = edge.__routing.targetFace === 'left' ? 0 : 1
|
|
2077
|
-
style.entryY = roundFraction((coord - targetPos.y) / targetPos.height)
|
|
2078
|
-
}
|
|
2079
|
-
style.exitDx = 0
|
|
2080
|
-
style.exitDy = 0
|
|
2081
|
-
style.entryDx = 0
|
|
2082
|
-
style.entryDy = 0
|
|
2083
|
-
faceCoordsFor(edge.from, edge.__routing.sourceFace).push(coord)
|
|
2084
|
-
faceCoordsFor(edge.to, edge.__routing.targetFace).push(coord)
|
|
2085
|
-
delete edge.__shared
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
assignFallbackFaceSlots(sourceGroups, positions, faceCoordsFor, true)
|
|
2089
|
-
assignFallbackFaceSlots(targetGroups, positions, faceCoordsFor, false)
|
|
2090
|
-
|
|
2091
|
-
return edges
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
function faceGeometry(pos, face) {
|
|
2095
|
-
const vertical = face === 'top' || face === 'bottom'
|
|
2096
|
-
return { vertical, base: vertical ? pos.x : pos.y, span: vertical ? pos.width : pos.height }
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
/**
|
|
2100
|
-
* Legacy slot distribution for edges without a collinear interval. Slots now
|
|
2101
|
-
* dodge coordinates already taken on the same physical face by straight edges
|
|
2102
|
-
* or manual connection points, so mixed faces stay CONNECTION_MIN_SEPARATION
|
|
2103
|
-
* apart instead of stacking at 0.5.
|
|
2104
|
-
*/
|
|
2105
|
-
function assignFallbackFaceSlots(groups, positions, faceCoordsFor, isSource) {
|
|
2106
|
-
for (const group of groups.values()) {
|
|
2107
|
-
const manualEdges = new Set()
|
|
2108
|
-
|
|
2109
|
-
for (const edge of group) {
|
|
2110
|
-
const face = isSource ? edge.__routing.sourceFace : edge.__routing.targetFace
|
|
2111
|
-
const nodeId = isSource ? edge.from : edge.to
|
|
2112
|
-
const pos = positions.get(nodeId)
|
|
2113
|
-
if (!pos) continue
|
|
2114
|
-
const { vertical, base, span } = faceGeometry(pos, face)
|
|
2115
|
-
const style = edge.style
|
|
2116
|
-
const manual = isSource ? (vertical ? style.exitX : style.exitY) : (vertical ? style.entryX : style.entryY)
|
|
2117
|
-
if (manual !== undefined) {
|
|
2118
|
-
faceCoordsFor(nodeId, face).push(base + manual * span)
|
|
2119
|
-
manualEdges.add(edge)
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
group.forEach((edge, index) => {
|
|
2124
|
-
const face = isSource ? edge.__routing.sourceFace : edge.__routing.targetFace
|
|
2125
|
-
const nodeId = isSource ? edge.from : edge.to
|
|
2126
|
-
const pos = positions.get(nodeId)
|
|
2127
|
-
const fallbackSlot = group.length === 1 ? 0.5 : getSlot(index)
|
|
2128
|
-
if (!pos || manualEdges.has(edge)) {
|
|
2129
|
-
if (isSource) applyFaceSlot(edge.style, face, fallbackSlot)
|
|
2130
|
-
else applyTargetFaceSlot(edge.style, face, fallbackSlot)
|
|
2131
|
-
return
|
|
2132
|
-
}
|
|
2133
|
-
const { base, span } = faceGeometry(pos, face)
|
|
2134
|
-
const used = faceCoordsFor(nodeId, face)
|
|
2135
|
-
// Prefer the legacy slot for this position in the group; only dodge to
|
|
2136
|
-
// another slot when a straight edge or manual point already occupies the
|
|
2137
|
-
// coordinate. Small faces cannot honor the separation at all, so the
|
|
2138
|
-
// exhausted case falls back to the legacy slot unchanged.
|
|
2139
|
-
let chosen
|
|
2140
|
-
for (const slot of [fallbackSlot, 0.5, ...FACE_SLOTS]) {
|
|
2141
|
-
const coord = base + slot * span
|
|
2142
|
-
if (used.every((taken) => Math.abs(taken - coord) >= CONNECTION_MIN_SEPARATION)) {
|
|
2143
|
-
chosen = slot
|
|
2144
|
-
break
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
if (chosen === undefined) {
|
|
2148
|
-
// The face is too small to honor the separation; take the slot that
|
|
2149
|
-
// keeps the largest distance to everything already connected instead
|
|
2150
|
-
// of stacking exactly onto an occupied coordinate.
|
|
2151
|
-
let bestDistance = -1
|
|
2152
|
-
for (const slot of [fallbackSlot, 0.5, ...FACE_SLOTS]) {
|
|
2153
|
-
const coord = base + slot * span
|
|
2154
|
-
const minDistance = used.length ? Math.min(...used.map((taken) => Math.abs(taken - coord))) : Infinity
|
|
2155
|
-
if (minDistance > bestDistance) {
|
|
2156
|
-
bestDistance = minDistance
|
|
2157
|
-
chosen = slot
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
used.push(base + chosen * span)
|
|
2162
|
-
if (isSource) applyFaceSlot(edge.style, face, chosen)
|
|
2163
|
-
else applyTargetFaceSlot(edge.style, face, chosen)
|
|
2164
|
-
})
|
|
2165
|
-
}
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
export function validateConnectionPointPolicy(spec) {
|
|
2169
|
-
const warnings = []
|
|
2170
|
-
for (const edge of spec.edges || []) {
|
|
2171
|
-
const style = edge.style || {}
|
|
2172
|
-
const hasWaypoints = Array.isArray(edge.waypoints) && edge.waypoints.length > 0
|
|
2173
|
-
const cpFields = ['exitX', 'exitY', 'entryX', 'entryY']
|
|
2174
|
-
const dxdyFields = ['exitDx', 'exitDy', 'entryDx', 'entryDy']
|
|
2175
|
-
const cpCount = cpFields.filter((field) => style[field] !== undefined).length
|
|
2176
|
-
const dxdyCount = dxdyFields.filter((field) => style[field] !== undefined).length
|
|
2177
|
-
|
|
2178
|
-
if (hasWaypoints && (cpCount > 0 || dxdyCount > 0)) {
|
|
2179
|
-
warnings.push(
|
|
2180
|
-
`Edge "${edge.from}->${edge.to}" mixes waypoints with explicit connection points. Remove exit/entry hints when waypoints are present.`
|
|
2181
|
-
)
|
|
2182
|
-
}
|
|
2183
|
-
if (!hasWaypoints && cpCount > 0 && cpCount < cpFields.length) {
|
|
2184
|
-
warnings.push(
|
|
2185
|
-
`Edge "${edge.from}->${edge.to}" defines partial connection points. Non-waypoint edges should set exitX/exitY/entryX/entryY together.`
|
|
2186
|
-
)
|
|
2187
|
-
}
|
|
2188
|
-
if (!hasWaypoints && dxdyCount > 0 && dxdyCount < dxdyFields.length) {
|
|
2189
|
-
warnings.push(
|
|
2190
|
-
`Edge "${edge.from}->${edge.to}" defines partial Dx/Dy offsets. Use all exitDx/exitDy/entryDx/entryDy fields or omit them.`
|
|
2191
|
-
)
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
return warnings
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
* Warn when a node resolves to a shape name absent from the draw.io shape
|
|
2199
|
-
* catalog: such names render as empty boxes in draw.io Desktop.
|
|
2200
|
-
* @param {Object} spec
|
|
2201
|
-
* @returns {{ errors: string[], warnings: string[] }}
|
|
2202
|
-
*/
|
|
2203
|
-
export function validateShapeReferences(spec) {
|
|
2204
|
-
const errors = []
|
|
2205
|
-
const warnings = []
|
|
2206
|
-
for (const node of spec.nodes || []) {
|
|
2207
|
-
const iconName = node.icon || deriveNodeIcon(node)
|
|
2208
|
-
if (resolveImageIconStyle(iconName)) continue
|
|
2209
|
-
const aiIdentifier = /^(?:lobe|ai)\.([a-z][a-z0-9._-]*)$/i.exec(String(iconName || ''))
|
|
2210
|
-
if (aiIdentifier) {
|
|
2211
|
-
const suggestions = searchAiIcons(aiIdentifier[1].split(/[._-]/).filter(Boolean).join(' '), { limit: 3 })
|
|
2212
|
-
.map((result) => result.spec)
|
|
2213
|
-
.join(', ')
|
|
2214
|
-
warnings.push(
|
|
2215
|
-
`Node "${node.id}" resolves to unknown AI icon "${iconName}"; ` +
|
|
2216
|
-
`it would render as an empty box in draw.io Desktop.${suggestions ? ` Did you mean: ${suggestions}?` : ''}`
|
|
2217
|
-
)
|
|
2218
|
-
continue
|
|
2219
|
-
}
|
|
2220
|
-
const iconShape = resolveIconShape(iconName)
|
|
2221
|
-
if (!iconShape) continue
|
|
2222
|
-
if (resolveShapeNameKind(iconShape) === 'unknown') {
|
|
2223
|
-
const library = /^mxgraph\.([^.]+)\./.exec(iconShape)?.[1] || null
|
|
2224
|
-
const paramValue = /:(?:prIcon|resIcon|grIcon)=([^;]+)$/.exec(iconShape)?.[1]
|
|
2225
|
-
const stem = paramValue || (library ? iconShape.replace(/^mxgraph\.[^.]+\./, '') : iconName)
|
|
2226
|
-
const query = stem.split(/[._-]/).filter(Boolean).join(' ')
|
|
2227
|
-
const suggestions = searchShapeCatalog(query, { limit: 3, prefix: library })
|
|
2228
|
-
.map((result) => result.spec || result.name)
|
|
2229
|
-
.join(', ')
|
|
2230
|
-
const message =
|
|
2231
|
-
`Node "${node.id}" resolves to unknown shape "${iconShape}" (not in the draw.io shape catalog); ` +
|
|
2232
|
-
`it would render as an empty box in draw.io Desktop.${suggestions ? ` Did you mean: ${suggestions}?` : ''}`
|
|
2233
|
-
if (iconShape.startsWith('mxgraph.')) errors.push(message)
|
|
2234
|
-
else warnings.push(message)
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
return { errors, warnings }
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
// Print-width targets for the paper-readability gate: `effective pt` =
|
|
2241
|
-
// fontSize x widthPt / canvas-width-px once the figure is scaled to the target
|
|
2242
|
-
// column. cn-thesis uses an A4 text block (~155mm = 440pt) with the CN
|
|
2243
|
-
// xiao-wu 9pt floor; IEEE columns follow the IEEE graphics guidelines (8pt).
|
|
2244
|
-
const PRINT_TARGETS = {
|
|
2245
|
-
'cn-thesis': { widthPt: 440, minPt: 9, label: 'CN thesis text width (155mm = 440pt)' },
|
|
2246
|
-
'ieee-single': { widthPt: 252, minPt: 8, label: 'IEEE single-column width (3.5in = 252pt)' },
|
|
2247
|
-
'ieee-double': { widthPt: 516, minPt: 8, label: 'IEEE double-column width (7.16in = 516pt)' }
|
|
2248
|
-
}
|
|
2249
|
-
const DEFAULT_PRINT_TARGET = 'ieee-single'
|
|
2250
|
-
const ACADEMIC_CANVAS_REVIEW_WIDTH = 1500
|
|
2251
|
-
|
|
2252
|
-
function resolvePrintTarget(print) {
|
|
2253
|
-
const base = PRINT_TARGETS[print?.target] || PRINT_TARGETS[DEFAULT_PRINT_TARGET]
|
|
2254
|
-
const widthPt = isFiniteNumber(print?.widthPt) && print.widthPt > 0 ? print.widthPt : base.widthPt
|
|
2255
|
-
const minPt = isFiniteNumber(print?.minPt) && print.minPt > 0 ? print.minPt : base.minPt
|
|
2256
|
-
const label = widthPt === base.widthPt ? base.label : `custom print width (${widthPt}pt)`
|
|
2257
|
-
return { widthPt, minPt, label }
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
/**
|
|
2261
|
-
* Warn when an academic canvas is so wide that labels drop below 8pt after
|
|
2262
|
-
* the figure is scaled to IEEE single-column width (3.5in = 252pt).
|
|
2263
|
-
* @param {Object} spec
|
|
2264
|
-
* @returns {string[]} warnings
|
|
2265
|
-
*/
|
|
2266
|
-
function collectAcademicLayoutSizeWarning(spec) {
|
|
2267
|
-
let canvasWidth = null
|
|
2268
|
-
try {
|
|
2269
|
-
const explicit = parseCanvasSize(spec.meta?.canvas)
|
|
2270
|
-
if (explicit) canvasWidth = explicit.width
|
|
2271
|
-
} catch {
|
|
2272
|
-
return []
|
|
2273
|
-
}
|
|
2274
|
-
if (canvasWidth == null) {
|
|
2275
|
-
let maxX = 0
|
|
2276
|
-
for (const node of spec.nodes || []) {
|
|
2277
|
-
const bounds = normalizeNodeBounds(node)
|
|
2278
|
-
if (bounds) maxX = Math.max(maxX, bounds.x + bounds.width)
|
|
2279
|
-
}
|
|
2280
|
-
if (maxX > 0) canvasWidth = maxX + 80
|
|
2281
|
-
}
|
|
2282
|
-
const print = spec.meta?.print
|
|
2283
|
-
if (canvasWidth == null) return []
|
|
2284
|
-
if (!print && canvasWidth <= ACADEMIC_CANVAS_REVIEW_WIDTH) return []
|
|
2285
|
-
const target = resolvePrintTarget(print)
|
|
2286
|
-
|
|
2287
|
-
let minFontSize = Infinity
|
|
2288
|
-
for (const node of spec.nodes || []) {
|
|
2289
|
-
const fontSize = node.style?.fontSize
|
|
2290
|
-
if (typeof fontSize === 'number') minFontSize = Math.min(minFontSize, fontSize)
|
|
2291
|
-
}
|
|
2292
|
-
if (!Number.isFinite(minFontSize)) minFontSize = FONT_LADDER.node
|
|
2293
|
-
|
|
2294
|
-
const effectivePt = (minFontSize * target.widthPt) / canvasWidth
|
|
2295
|
-
if (effectivePt >= target.minPt) return []
|
|
2296
|
-
|
|
2297
|
-
const requiredFontSize = Math.ceil((canvasWidth * target.minPt) / target.widthPt)
|
|
2298
|
-
return [
|
|
2299
|
-
`Academic figure canvas is ${canvasWidth}px wide. Scaled to ${target.label}, the smallest label font (${minFontSize}px) prints at ~${effectivePt.toFixed(1)}pt (fontSize x ${target.widthPt} / canvas width), below the ${target.minPt}pt floor. Raise label fontSize to >= ${requiredFontSize}, narrow the canvas, set meta.print to a wider target, or split the figure.`
|
|
2300
|
-
]
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
const KNOWN_META_KEYS = new Set([
|
|
2304
|
-
'title',
|
|
2305
|
-
'description',
|
|
2306
|
-
'theme',
|
|
2307
|
-
'palette',
|
|
2308
|
-
'layout',
|
|
2309
|
-
'routing',
|
|
2310
|
-
'profile',
|
|
2311
|
-
'figureType',
|
|
2312
|
-
'source',
|
|
2313
|
-
'canvas',
|
|
2314
|
-
'font',
|
|
2315
|
-
'print',
|
|
2316
|
-
'legend',
|
|
2317
|
-
'replication',
|
|
2318
|
-
'adapter',
|
|
2319
|
-
'template'
|
|
2320
|
-
])
|
|
2321
|
-
|
|
2322
|
-
const KNOWN_NODE_STYLE_KEYS = new Set([
|
|
2323
|
-
'fillColor',
|
|
2324
|
-
'strokeColor',
|
|
2325
|
-
'strokeWidth',
|
|
2326
|
-
'fontColor',
|
|
2327
|
-
'fontSize',
|
|
2328
|
-
'fontFamily',
|
|
2329
|
-
'fontStyle',
|
|
2330
|
-
'fontWeight',
|
|
2331
|
-
'bold',
|
|
2332
|
-
'italic',
|
|
2333
|
-
'align',
|
|
2334
|
-
'verticalAlign',
|
|
2335
|
-
'spacingLeft',
|
|
2336
|
-
'spacingRight',
|
|
2337
|
-
'spacingTop',
|
|
2338
|
-
'spacingBottom'
|
|
2339
|
-
])
|
|
2340
|
-
|
|
2341
|
-
const KNOWN_MODULE_KEYS = new Set(['id', 'label', 'identity', 'color', 'style'])
|
|
2342
|
-
|
|
2343
|
-
/**
|
|
2344
|
-
* Warn about spec keys the renderer silently ignores (schema drift):
|
|
2345
|
-
* unknown meta keys, unknown node.style keys, unknown module keys.
|
|
2346
|
-
* @param {Object} spec
|
|
2347
|
-
* @returns {string[]} warnings
|
|
2348
|
-
*/
|
|
2349
|
-
export function validateSchemaDrift(spec) {
|
|
2350
|
-
const warnings = []
|
|
2351
|
-
|
|
2352
|
-
const metaUnknown = Object.keys(spec.meta || {}).filter((key) => !KNOWN_META_KEYS.has(key))
|
|
2353
|
-
if (metaUnknown.length > 0) {
|
|
2354
|
-
warnings.push(
|
|
2355
|
-
`Unknown meta key(s) ${metaUnknown.map((key) => `"${key}"`).join(', ')} are ignored by the renderer. Supported keys: ${[...KNOWN_META_KEYS].join(', ')}.`
|
|
2356
|
-
)
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
for (const node of spec.nodes || []) {
|
|
2360
|
-
const unknown = Object.keys(node.style || {}).filter((key) => !KNOWN_NODE_STYLE_KEYS.has(key))
|
|
2361
|
-
if (unknown.length > 0) {
|
|
2362
|
-
warnings.push(
|
|
2363
|
-
`Node "${node.id}" style has unknown key(s) ${unknown.map((key) => `"${key}"`).join(', ')}; they are ignored. Use top-level node fields (e.g. type, icon) for shape selection.`
|
|
2364
|
-
)
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
for (const module of spec.modules || []) {
|
|
2369
|
-
const unknown = Object.keys(module || {}).filter((key) => !KNOWN_MODULE_KEYS.has(key))
|
|
2370
|
-
if (unknown.length > 0) {
|
|
2371
|
-
warnings.push(
|
|
2372
|
-
`Module "${module.id}" has unknown key(s) ${unknown.map((key) => `"${key}"`).join(', ')}; they are ignored (module bounds are computed from member nodes).`
|
|
2373
|
-
)
|
|
2374
|
-
}
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
return warnings
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
export function validateAcademicProfile(spec) {
|
|
2381
|
-
const warnings = []
|
|
2382
|
-
const profile = resolveProfile(spec)
|
|
2383
|
-
if (profile !== 'academic-paper') return warnings
|
|
2384
|
-
|
|
2385
|
-
const theme = spec.meta?.theme || 'academic'
|
|
2386
|
-
if (!['academic', 'academic-color'].includes(theme)) {
|
|
2387
|
-
warnings.push('Academic-paper profile should use academic or academic-color theme.')
|
|
2388
|
-
}
|
|
2389
|
-
if (!spec.meta?.figureType) {
|
|
2390
|
-
warnings.push(`Academic-paper profile should set meta.figureType to one of ${ACADEMIC_FIGURE_TYPES.join(', ')}.`)
|
|
2391
|
-
}
|
|
2392
|
-
if (!spec.meta?.title) {
|
|
2393
|
-
warnings.push('Academic-paper profile requires meta.title for figure captioning.')
|
|
2394
|
-
}
|
|
2395
|
-
if (!spec.meta?.description) {
|
|
2396
|
-
warnings.push('Academic-paper profile should include meta.description for figure context.')
|
|
2397
|
-
}
|
|
2398
|
-
|
|
2399
|
-
const usesIcons = (spec.nodes || []).some((node) => node.icon)
|
|
2400
|
-
const connectorTypes = new Set((spec.edges || []).map((edge) => edge.type || 'primary'))
|
|
2401
|
-
if ((usesIcons || connectorTypes.size > 1) && !spec.meta?.legend) {
|
|
2402
|
-
warnings.push('Academic-paper profile should include meta.legend when icons or multiple connector styles are used.')
|
|
2403
|
-
}
|
|
2404
|
-
|
|
2405
|
-
const verboseLabels = []
|
|
2406
|
-
for (const node of spec.nodes || []) {
|
|
2407
|
-
// Compact legends/callouts are single text nodes by design (see the
|
|
2408
|
-
// playbook's node-efficient patterns); they are exempt from this rule.
|
|
2409
|
-
if (node.type === 'text') continue
|
|
2410
|
-
const visibleLength = estimateVisibleLabelLength(node.label)
|
|
2411
|
-
const lineCount = countManualLabelLines(node.label)
|
|
2412
|
-
if (visibleLength > 40 || lineCount > 3) {
|
|
2413
|
-
verboseLabels.push(`node "${node.id}"`)
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
if (verboseLabels.length > 0) {
|
|
2417
|
-
warnings.push(
|
|
2418
|
-
`Academic-paper labels should stay concise. Labels longer than 40 visible characters or 3 manual lines were found on ${verboseLabels.join(', ')}.`
|
|
2419
|
-
)
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
if (theme === 'academic') {
|
|
2423
|
-
const colorOverrides = collectAcademicColorOverrideWarnings(spec, loadTheme(theme))
|
|
2424
|
-
if (colorOverrides.length > 0) {
|
|
2425
|
-
warnings.push(
|
|
2426
|
-
`Academic theme expects grayscale-safe explicit overrides. Non-grayscale color overrides found on ${colorOverrides.join(', ')}.`
|
|
2427
|
-
)
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
warnings.push(...collectAcademicLayoutSizeWarning(spec))
|
|
2432
|
-
|
|
2433
|
-
return warnings
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
export function validateEdgeQuality(spec, layout) {
|
|
2437
|
-
const warnings = []
|
|
2438
|
-
const routedEdges = buildRoutedEdges(spec, layout)
|
|
2439
|
-
const corridorMap = new Map()
|
|
2440
|
-
|
|
2441
|
-
for (const edge of routedEdges) {
|
|
2442
|
-
const style = edge.style || {}
|
|
2443
|
-
const sourcePos = layout.positions.get(edge.from)
|
|
2444
|
-
const targetPos = layout.positions.get(edge.to)
|
|
2445
|
-
if (!sourcePos || !targetPos) continue
|
|
2446
|
-
|
|
2447
|
-
const hasWaypoints = edge.waypoints?.length > 0
|
|
2448
|
-
const cpPairs = [
|
|
2449
|
-
['exitX', 'exitY'],
|
|
2450
|
-
['entryX', 'entryY']
|
|
2451
|
-
]
|
|
2452
|
-
for (const [xKey, yKey] of cpPairs) {
|
|
2453
|
-
const x = style[xKey]
|
|
2454
|
-
const y = style[yKey]
|
|
2455
|
-
if (x === undefined || y === undefined) continue
|
|
2456
|
-
const corner = (x === 0 || x === 1) && (y === 0 || y === 1)
|
|
2457
|
-
if (corner) {
|
|
2458
|
-
warnings.push(
|
|
2459
|
-
`Edge "${edge.from}->${edge.to}" uses corner connection point ${xKey}/${yKey}. Use face midpoints or distributed face slots.`
|
|
2460
|
-
)
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
if (!hasWaypoints && edge.__routing) {
|
|
2465
|
-
const orientation = edge.__routing.orientation
|
|
2466
|
-
const vertical = orientation === 'vertical'
|
|
2467
|
-
const exitFrac = vertical ? style.exitX : style.exitY
|
|
2468
|
-
const entryFrac = vertical ? style.entryX : style.entryY
|
|
2469
|
-
if (exitFrac !== undefined && entryFrac !== undefined) {
|
|
2470
|
-
const absExit = vertical
|
|
2471
|
-
? sourcePos.x + exitFrac * sourcePos.width
|
|
2472
|
-
: sourcePos.y + exitFrac * sourcePos.height
|
|
2473
|
-
const absEntry = vertical
|
|
2474
|
-
? targetPos.x + entryFrac * targetPos.width
|
|
2475
|
-
: targetPos.y + entryFrac * targetPos.height
|
|
2476
|
-
const delta = Math.abs(absExit - absEntry)
|
|
2477
|
-
if (delta > 0.5 && sharedAxisInterval(sourcePos, targetPos, orientation)) {
|
|
2478
|
-
warnings.push(
|
|
2479
|
-
`Edge "${edge.from}->${edge.to}" bends ${Math.round(delta)}px off a straight ${orientation} line. ` +
|
|
2480
|
-
'A collinear connection exists on this axis; use the same absolute exit/entry coordinate.'
|
|
2481
|
-
)
|
|
2482
|
-
}
|
|
2483
|
-
}
|
|
2484
|
-
}
|
|
2485
|
-
|
|
2486
|
-
if (!hasWaypoints) {
|
|
2487
|
-
const sourceCenterX = sourcePos.x + sourcePos.width / 2
|
|
2488
|
-
const sourceCenterY = sourcePos.y + sourcePos.height / 2
|
|
2489
|
-
const targetCenterX = targetPos.x + targetPos.width / 2
|
|
2490
|
-
const targetCenterY = targetPos.y + targetPos.height / 2
|
|
2491
|
-
const horizontalGap = Math.abs(targetCenterX - sourceCenterX) - sourcePos.width / 2 - targetPos.width / 2
|
|
2492
|
-
const verticalGap = Math.abs(targetCenterY - sourceCenterY) - sourcePos.height / 2 - targetPos.height / 2
|
|
2493
|
-
const finalSegment = edge.__routing?.orientation === 'horizontal' ? horizontalGap : verticalGap
|
|
2494
|
-
if (finalSegment < 30) {
|
|
2495
|
-
warnings.push(
|
|
2496
|
-
`Edge "${edge.from}->${edge.to}" has a short final segment (${Math.round(finalSegment)}px). Keep the last segment at least 30px.`
|
|
2497
|
-
)
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
if (hasWaypoints) {
|
|
2502
|
-
for (let i = 1; i < edge.waypoints.length; i++) {
|
|
2503
|
-
const prev = edge.waypoints[i - 1]
|
|
2504
|
-
const curr = edge.waypoints[i]
|
|
2505
|
-
if (Math.abs(prev.x - curr.x) < 1 && Math.abs(prev.y - curr.y) < 1) {
|
|
2506
|
-
warnings.push(
|
|
2507
|
-
`Edge "${edge.from}->${edge.to}" contains degenerate waypoint ${i}. Consecutive waypoints must differ by at least 1px.`
|
|
2508
|
-
)
|
|
2509
|
-
}
|
|
2510
|
-
}
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
|
-
if (edge.__routing) {
|
|
2514
|
-
const faceAxis =
|
|
2515
|
-
edge.__routing.orientation === 'horizontal'
|
|
2516
|
-
? `${edge.from}:${edge.__routing.sourceFace}:${style.exitY}`
|
|
2517
|
-
: `${edge.from}:${edge.__routing.sourceFace}:${style.exitX}`
|
|
2518
|
-
if (!corridorMap.has(faceAxis)) corridorMap.set(faceAxis, [])
|
|
2519
|
-
corridorMap.get(faceAxis).push(edge)
|
|
2520
|
-
}
|
|
2521
|
-
|
|
2522
|
-
if (edge.label && !hasWaypoints) {
|
|
2523
|
-
const gap =
|
|
2524
|
-
edge.__routing?.orientation === 'horizontal'
|
|
2525
|
-
? Math.abs(targetPos.x + targetPos.width / 2 - (sourcePos.x + sourcePos.width / 2))
|
|
2526
|
-
: Math.abs(targetPos.y + targetPos.height / 2 - (sourcePos.y + sourcePos.height / 2))
|
|
2527
|
-
if (gap < 60) {
|
|
2528
|
-
warnings.push(
|
|
2529
|
-
`Edge "${edge.from}->${edge.to}" is short for a labeled connector. Increase spacing or offset the label further from the line.`
|
|
2530
|
-
)
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
for (const [corridor, group] of corridorMap.entries()) {
|
|
2536
|
-
if (group.length < 2) continue
|
|
2537
|
-
const slots = group.map((edge) =>
|
|
2538
|
-
edge.__routing?.orientation === 'horizontal' ? edge.style.exitY : edge.style.exitX
|
|
2539
|
-
)
|
|
2540
|
-
const uniqueSlots = new Set(slots.map((slot) => Number(slot).toFixed(2)))
|
|
2541
|
-
if (uniqueSlots.size !== group.length) {
|
|
2542
|
-
warnings.push(
|
|
2543
|
-
`Edges sharing corridor "${corridor}" overlap on the same face position. Distribute them across 0.25/0.5/0.75 slots.`
|
|
2544
|
-
)
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
return warnings
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
const LABEL_COLLISION_WARNING_CAP = 12
|
|
2552
|
-
|
|
2553
|
-
function rectsOverlap(a, b) {
|
|
2554
|
-
return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
function polylineIntersectsRect(points, rect) {
|
|
2558
|
-
for (let i = 1; i < points.length; i++) {
|
|
2559
|
-
if (segmentIntersectsRect(points[i - 1], points[i], rect)) return true
|
|
2560
|
-
}
|
|
2561
|
-
return false
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
/**
|
|
2565
|
-
* Approximate the rendered polyline of a routed edge: waypoints when present,
|
|
2566
|
-
* otherwise the exit/entry points with the standard orthogonal mid-bend.
|
|
2567
|
-
*/
|
|
2568
|
-
function edgePolyline(edge, sourcePos, targetPos) {
|
|
2569
|
-
const style = edge.style || {}
|
|
2570
|
-
if (edge.waypoints?.length) {
|
|
2571
|
-
const first = edge.waypoints[0]
|
|
2572
|
-
const last = edge.waypoints[edge.waypoints.length - 1]
|
|
2573
|
-
return [
|
|
2574
|
-
clipPointToRect(sourcePos, first),
|
|
2575
|
-
...edge.waypoints.map((point) => ({ x: point.x, y: point.y })),
|
|
2576
|
-
clipPointToRect(targetPos, last)
|
|
2577
|
-
]
|
|
2578
|
-
}
|
|
2579
|
-
if (style.exitX === undefined || style.entryX === undefined) return null
|
|
2580
|
-
const start = { x: sourcePos.x + style.exitX * sourcePos.width, y: sourcePos.y + style.exitY * sourcePos.height }
|
|
2581
|
-
const end = { x: targetPos.x + style.entryX * targetPos.width, y: targetPos.y + style.entryY * targetPos.height }
|
|
2582
|
-
const vertical = edge.__routing?.orientation === 'vertical'
|
|
2583
|
-
const straight = vertical ? Math.abs(start.x - end.x) < 0.5 : Math.abs(start.y - end.y) < 0.5
|
|
2584
|
-
if (straight) return [start, end]
|
|
2585
|
-
if (vertical) {
|
|
2586
|
-
const midY = (start.y + end.y) / 2
|
|
2587
|
-
return [start, { x: start.x, y: midY }, { x: end.x, y: midY }, end]
|
|
2588
|
-
}
|
|
2589
|
-
const midX = (start.x + end.x) / 2
|
|
2590
|
-
return [start, { x: midX, y: start.y }, { x: midX, y: end.y }, end]
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
function pointAlongPolyline(points, fraction) {
|
|
2594
|
-
let total = 0
|
|
2595
|
-
for (let i = 1; i < points.length; i++) {
|
|
2596
|
-
total += Math.hypot(points[i].x - points[i - 1].x, points[i].y - points[i - 1].y)
|
|
2597
|
-
}
|
|
2598
|
-
let remaining = total * fraction
|
|
2599
|
-
for (let i = 1; i < points.length; i++) {
|
|
2600
|
-
const segment = Math.hypot(points[i].x - points[i - 1].x, points[i].y - points[i - 1].y)
|
|
2601
|
-
if (remaining <= segment) {
|
|
2602
|
-
const t = segment === 0 ? 0 : remaining / segment
|
|
2603
|
-
return {
|
|
2604
|
-
x: points[i - 1].x + (points[i].x - points[i - 1].x) * t,
|
|
2605
|
-
y: points[i - 1].y + (points[i].y - points[i - 1].y) * t
|
|
2606
|
-
}
|
|
2607
|
-
}
|
|
2608
|
-
remaining -= segment
|
|
2609
|
-
}
|
|
2610
|
-
return points[points.length - 1]
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
/**
|
|
2614
|
-
* Heuristic lint for label clashes: edge labels on their own line, labels
|
|
2615
|
-
* crossing other connectors, standalone text boxes crossed by connectors, and
|
|
2616
|
-
* label/label overlap. Extents are estimated, so treat results as warnings.
|
|
2617
|
-
*/
|
|
2618
|
-
export function validateLabelCollisions(spec, layout) {
|
|
2619
|
-
const warnings = []
|
|
2620
|
-
const routedEdges = buildRoutedEdges(spec, layout)
|
|
2621
|
-
const lines = []
|
|
2622
|
-
const labelRects = []
|
|
2623
|
-
|
|
2624
|
-
for (const edge of routedEdges) {
|
|
2625
|
-
const sourcePos = layout.positions.get(edge.from)
|
|
2626
|
-
const targetPos = layout.positions.get(edge.to)
|
|
2627
|
-
if (!sourcePos || !targetPos) continue
|
|
2628
|
-
const points = edgePolyline(edge, sourcePos, targetPos)
|
|
2629
|
-
if (!points) continue
|
|
2630
|
-
const key = `${edge.from}->${edge.to}`
|
|
2631
|
-
lines.push({ key, points })
|
|
2632
|
-
|
|
2633
|
-
const label = formatNetworkEdgeLabel(edge)
|
|
2634
|
-
if (!label) continue
|
|
2635
|
-
const fraction = edge.labelPosition === 'start' ? 0.2 : edge.labelPosition === 'end' ? 0.8 : 0.5
|
|
2636
|
-
const anchor = pointAlongPolyline(points, fraction)
|
|
2637
|
-
const offset = resolveEdgeLabelOffset(edge)
|
|
2638
|
-
const extent = measureLabelExtent(label, resolveEdgeLabelFontSize(edge), 2)
|
|
2639
|
-
labelRects.push({
|
|
2640
|
-
key,
|
|
2641
|
-
isTextNode: false,
|
|
2642
|
-
rect: {
|
|
2643
|
-
x: anchor.x + offset.x - extent.width / 2,
|
|
2644
|
-
y: anchor.y + offset.y - extent.height / 2,
|
|
2645
|
-
width: extent.width,
|
|
2646
|
-
height: extent.height
|
|
2647
|
-
}
|
|
2648
|
-
})
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
for (const node of spec.nodes || []) {
|
|
2652
|
-
if (detectSemanticType(node.label, node.type, node.network) !== 'text') continue
|
|
2653
|
-
const pos = layout.positions.get(node.id)
|
|
2654
|
-
if (!pos) continue
|
|
2655
|
-
labelRects.push({ key: `text "${node.id}"`, isTextNode: true, rect: pos })
|
|
2656
|
-
}
|
|
2657
|
-
|
|
2658
|
-
for (const label of labelRects) {
|
|
2659
|
-
for (const line of lines) {
|
|
2660
|
-
if (!label.isTextNode && label.key === line.key) {
|
|
2661
|
-
if (polylineIntersectsRect(line.points, label.rect)) {
|
|
2662
|
-
warnings.push(
|
|
2663
|
-
`Label of edge "${label.key}" sits on its own connector; offset it 12-20px away from the line via labelOffset.`
|
|
2664
|
-
)
|
|
2665
|
-
}
|
|
2666
|
-
continue
|
|
2667
|
-
}
|
|
2668
|
-
if (polylineIntersectsRect(line.points, label.rect)) {
|
|
2669
|
-
const subject = label.isTextNode ? `Text node ${label.key}` : `Label of edge "${label.key}"`
|
|
2670
|
-
warnings.push(`${subject} overlaps connector "${line.key}"; move the label or reroute the edge.`)
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
for (let i = 0; i < labelRects.length; i++) {
|
|
2676
|
-
for (let j = i + 1; j < labelRects.length; j++) {
|
|
2677
|
-
if (rectsOverlap(labelRects[i].rect, labelRects[j].rect)) {
|
|
2678
|
-
warnings.push(
|
|
2679
|
-
`Labels ${labelRects[i].key} and ${labelRects[j].key} overlap; separate them or shorten the text.`
|
|
2680
|
-
)
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
if (warnings.length > LABEL_COLLISION_WARNING_CAP) {
|
|
2686
|
-
const extra = warnings.length - LABEL_COLLISION_WARNING_CAP
|
|
2687
|
-
return warnings
|
|
2688
|
-
.slice(0, LABEL_COLLISION_WARNING_CAP)
|
|
2689
|
-
.concat([`(+${extra} more label-collision warnings truncated)`])
|
|
2690
|
-
}
|
|
2691
|
-
return warnings
|
|
2692
|
-
}
|
|
2693
|
-
|
|
2694
|
-
// ============================================================================
|
|
2695
|
-
// Layout Quality Metrics
|
|
2696
|
-
// ============================================================================
|
|
2697
|
-
|
|
2698
|
-
function rectCenter(rect) {
|
|
2699
|
-
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 }
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
|
-
function clipPointToRect(rect, toward) {
|
|
2703
|
-
const center = rectCenter(rect)
|
|
2704
|
-
const dx = toward.x - center.x
|
|
2705
|
-
const dy = toward.y - center.y
|
|
2706
|
-
if (dx === 0 && dy === 0) return center
|
|
2707
|
-
const halfW = rect.width / 2
|
|
2708
|
-
const halfH = rect.height / 2
|
|
2709
|
-
const scaleX = dx !== 0 ? halfW / Math.abs(dx) : Infinity
|
|
2710
|
-
const scaleY = dy !== 0 ? halfH / Math.abs(dy) : Infinity
|
|
2711
|
-
const t = Math.min(scaleX, scaleY, 1)
|
|
2712
|
-
return { x: center.x + dx * t, y: center.y + dy * t }
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
function orientationOf(a, b, c) {
|
|
2716
|
-
const value = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x)
|
|
2717
|
-
if (Math.abs(value) < 1e-9) return 0
|
|
2718
|
-
return value > 0 ? 1 : -1
|
|
2719
|
-
}
|
|
2720
|
-
|
|
2721
|
-
function segmentsProperlyIntersect(p1, p2, p3, p4) {
|
|
2722
|
-
const o1 = orientationOf(p1, p2, p3)
|
|
2723
|
-
const o2 = orientationOf(p1, p2, p4)
|
|
2724
|
-
const o3 = orientationOf(p3, p4, p1)
|
|
2725
|
-
const o4 = orientationOf(p3, p4, p2)
|
|
2726
|
-
return o1 !== o2 && o3 !== o4 && o1 !== 0 && o2 !== 0 && o3 !== 0 && o4 !== 0
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
|
-
function segmentIntersectsRect(p1, p2, rect) {
|
|
2730
|
-
const inside = (p) => p.x > rect.x && p.x < rect.x + rect.width && p.y > rect.y && p.y < rect.y + rect.height
|
|
2731
|
-
if (inside(p1) || inside(p2)) return true
|
|
2732
|
-
const corners = [
|
|
2733
|
-
{ x: rect.x, y: rect.y },
|
|
2734
|
-
{ x: rect.x + rect.width, y: rect.y },
|
|
2735
|
-
{ x: rect.x + rect.width, y: rect.y + rect.height },
|
|
2736
|
-
{ x: rect.x, y: rect.y + rect.height }
|
|
2737
|
-
]
|
|
2738
|
-
for (let i = 0; i < 4; i++) {
|
|
2739
|
-
if (segmentsProperlyIntersect(p1, p2, corners[i], corners[(i + 1) % 4])) return true
|
|
2740
|
-
}
|
|
2741
|
-
return false
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
/**
|
|
2745
|
-
* Readability metrics over the routed layout: how many edges cut through
|
|
2746
|
-
* unrelated nodes, how many edge pairs cross, and the total polyline length.
|
|
2747
|
-
* Edge endpoints are approximated by center-to-boundary clipping; waypoints
|
|
2748
|
-
* are honored, so orthogonal (elk) routes are measured on their real path.
|
|
2749
|
-
*/
|
|
2750
|
-
export function computeLayoutQualityMetrics(spec, options = {}) {
|
|
2751
|
-
const theme = options.theme || loadTheme(spec.meta?.theme || 'tech-blue')
|
|
2752
|
-
const layout = options.layout || calculateLayout(planFontSizes(spec, theme).planned, theme)
|
|
2753
|
-
const routedEdges = buildRoutedEdges(spec, layout)
|
|
2754
|
-
const { positions } = layout
|
|
2755
|
-
|
|
2756
|
-
let edgeNodeCrossings = 0
|
|
2757
|
-
let edgeEdgeCrossings = 0
|
|
2758
|
-
let totalEdgeLength = 0
|
|
2759
|
-
|
|
2760
|
-
const polylines = []
|
|
2761
|
-
for (const edge of routedEdges) {
|
|
2762
|
-
const sourceRect = positions.get(edge.from)
|
|
2763
|
-
const targetRect = positions.get(edge.to)
|
|
2764
|
-
if (!sourceRect || !targetRect) continue
|
|
2765
|
-
const waypoints = edge.waypoints || []
|
|
2766
|
-
const firstToward = waypoints[0] || rectCenter(targetRect)
|
|
2767
|
-
const lastToward = waypoints[waypoints.length - 1] || rectCenter(sourceRect)
|
|
2768
|
-
const points = [clipPointToRect(sourceRect, firstToward), ...waypoints, clipPointToRect(targetRect, lastToward)]
|
|
2769
|
-
polylines.push({ edge, points })
|
|
2770
|
-
for (let i = 1; i < points.length; i++) {
|
|
2771
|
-
totalEdgeLength += Math.hypot(points[i].x - points[i - 1].x, points[i].y - points[i - 1].y)
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
for (const { edge, points } of polylines) {
|
|
2776
|
-
for (const node of spec.nodes || []) {
|
|
2777
|
-
if (node.id === edge.from || node.id === edge.to) continue
|
|
2778
|
-
const rect = positions.get(node.id)
|
|
2779
|
-
if (!rect) continue
|
|
2780
|
-
let crosses = false
|
|
2781
|
-
for (let i = 1; i < points.length && !crosses; i++) {
|
|
2782
|
-
crosses = segmentIntersectsRect(points[i - 1], points[i], rect)
|
|
2783
|
-
}
|
|
2784
|
-
if (crosses) edgeNodeCrossings++
|
|
2785
|
-
}
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
for (let i = 0; i < polylines.length; i++) {
|
|
2789
|
-
for (let j = i + 1; j < polylines.length; j++) {
|
|
2790
|
-
const a = polylines[i]
|
|
2791
|
-
const b = polylines[j]
|
|
2792
|
-
const shared =
|
|
2793
|
-
a.edge.from === b.edge.from || a.edge.from === b.edge.to || a.edge.to === b.edge.from || a.edge.to === b.edge.to
|
|
2794
|
-
if (shared) continue
|
|
2795
|
-
let crosses = false
|
|
2796
|
-
for (let si = 1; si < a.points.length && !crosses; si++) {
|
|
2797
|
-
for (let sj = 1; sj < b.points.length && !crosses; sj++) {
|
|
2798
|
-
crosses = segmentsProperlyIntersect(a.points[si - 1], a.points[si], b.points[sj - 1], b.points[sj])
|
|
2799
|
-
}
|
|
2800
|
-
}
|
|
2801
|
-
if (crosses) edgeEdgeCrossings++
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
return { edgeNodeCrossings, edgeEdgeCrossings, totalEdgeLength: Math.round(totalEdgeLength) }
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
// ============================================================================
|
|
2809
|
-
// Main Export Functions
|
|
2810
|
-
// ============================================================================
|
|
2811
|
-
|
|
2812
|
-
/**
|
|
2813
|
-
* Convert specification to draw.io XML
|
|
2814
|
-
* @param {Object} spec - Parsed specification object
|
|
2815
|
-
* @param {Object} options - Optional settings
|
|
2816
|
-
* @returns {string} draw.io XML
|
|
2817
|
-
*/
|
|
2818
|
-
/**
|
|
2819
|
-
* Materialize the font-size ladder into a cloned spec so layout, style
|
|
2820
|
-
* assembly, and validators all see one consistent value per text surface.
|
|
2821
|
-
* Only fills sizes the author left blank; explicit style.fontSize wins.
|
|
2822
|
-
*/
|
|
2823
|
-
function planFontSizes(spec, theme) {
|
|
2824
|
-
const planned = structuredClone(spec)
|
|
2825
|
-
const autoNodes = new Set()
|
|
2826
|
-
for (const node of planned.nodes || []) {
|
|
2827
|
-
if (isFiniteNumber(node.style?.fontSize)) continue
|
|
2828
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
2829
|
-
const nodeTheme = theme.node?.[semanticType] || theme.node?.default || {}
|
|
2830
|
-
const fontSize =
|
|
2831
|
-
semanticType === 'text'
|
|
2832
|
-
? (theme.node?.text?.fontSize ?? FONT_LADDER.text)
|
|
2833
|
-
: (nodeTheme.fontSize ?? theme.node?.default?.fontSize ?? FONT_LADDER.node)
|
|
2834
|
-
node.style = { ...(node.style || {}), fontSize }
|
|
2835
|
-
autoNodes.add(node.id)
|
|
2836
|
-
}
|
|
2837
|
-
for (const edge of planned.edges || []) {
|
|
2838
|
-
if (isFiniteNumber(edge.style?.fontSize)) continue
|
|
2839
|
-
if (!formatNetworkEdgeLabel(edge)) continue
|
|
2840
|
-
edge.style = { ...(edge.style || {}), fontSize: FONT_LADDER.edgeLabel }
|
|
2841
|
-
}
|
|
2842
|
-
return { planned, autoNodes }
|
|
2843
|
-
}
|
|
2844
|
-
|
|
2845
|
-
// MathJax renders delimited math much narrower than its LaTeX source text,
|
|
2846
|
-
// so every per-glyph width estimate must skip math-bearing labels.
|
|
2847
|
-
function hasMathMarkers(label) {
|
|
2848
|
-
return /\$\$|\\\(|\\\)/.test(String(label || ''))
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
/** Largest font size whose estimated label extent stays inside bounds. */
|
|
2852
|
-
function maxFontSizeForBounds(label, bounds) {
|
|
2853
|
-
const lines = String(label).split(/\n|<br\s*\/?>/i)
|
|
2854
|
-
let maxUnits = 0
|
|
2855
|
-
for (const line of lines) {
|
|
2856
|
-
let units = 0
|
|
2857
|
-
for (const ch of line) {
|
|
2858
|
-
units += /[\u3000-\u9fff\uff00-\uffef]/.test(ch) ? 1.05 : 0.6
|
|
2859
|
-
}
|
|
2860
|
-
maxUnits = Math.max(maxUnits, units)
|
|
2861
|
-
}
|
|
2862
|
-
const widthFit = maxUnits > 0 ? (bounds.width - 8) / maxUnits : Infinity
|
|
2863
|
-
const heightFit = (bounds.height - 4) / (lines.length * 1.4)
|
|
2864
|
-
return Math.min(widthFit, heightFit)
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
|
-
/**
|
|
2868
|
-
* Uniformly shrink auto-assigned label fonts so explicit-bounds boxes
|
|
2869
|
-
* (replicate flow) contain their labels: per class (node/text), take the
|
|
2870
|
-
* largest size every box can hold, clamped to [FONT_SIZE_FLOOR, assigned].
|
|
2871
|
-
* Author-set fontSize values are never touched; leftover overflows are
|
|
2872
|
-
* reported by validateLabelFit.
|
|
2873
|
-
*/
|
|
2874
|
-
function shrinkFontsToBounds(spec, autoNodes) {
|
|
2875
|
-
const limits = { node: Infinity, text: Infinity }
|
|
2876
|
-
const members = []
|
|
2877
|
-
for (const node of spec.nodes || []) {
|
|
2878
|
-
if (!autoNodes.has(node.id) || !node.label) continue
|
|
2879
|
-
if (node.icon || deriveNodeIcon(node)) continue
|
|
2880
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
2881
|
-
if (CONTENT_SIZE_EXEMPT_TYPES.has(semanticType)) continue
|
|
2882
|
-
const cls = semanticType === 'text' ? 'text' : 'node'
|
|
2883
|
-
members.push({ node, cls })
|
|
2884
|
-
if (hasMathMarkers(node.label)) continue
|
|
2885
|
-
const bounds = normalizeNodeBounds(node)
|
|
2886
|
-
if (!bounds) continue
|
|
2887
|
-
limits[cls] = Math.min(limits[cls], maxFontSizeForBounds(node.label, bounds))
|
|
2888
|
-
}
|
|
2889
|
-
for (const { node, cls } of members) {
|
|
2890
|
-
const limit = limits[cls]
|
|
2891
|
-
if (!Number.isFinite(limit) || limit >= node.style.fontSize) continue
|
|
2892
|
-
node.style.fontSize = Math.max(FONT_SIZE_FLOOR, Math.floor(limit))
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
/**
|
|
2897
|
-
* Report labels that cannot fit their explicit bounds even after the class
|
|
2898
|
-
* shrink bottomed out at FONT_SIZE_FLOOR, or whose author-set fontSize is too
|
|
2899
|
-
* large for the declared box.
|
|
2900
|
-
*/
|
|
2901
|
-
export function validateLabelFit(spec) {
|
|
2902
|
-
const warnings = []
|
|
2903
|
-
for (const node of spec.nodes || []) {
|
|
2904
|
-
if (!node.label) continue
|
|
2905
|
-
if (node.icon || deriveNodeIcon(node)) continue
|
|
2906
|
-
const semanticType = detectSemanticType(node.label, node.type, node.network)
|
|
2907
|
-
if (semanticType === 'text' || CONTENT_SIZE_EXEMPT_TYPES.has(semanticType)) continue
|
|
2908
|
-
if (hasMathMarkers(node.label)) continue
|
|
2909
|
-
const bounds = normalizeNodeBounds(node)
|
|
2910
|
-
if (!bounds) continue
|
|
2911
|
-
const fontSize = node.style?.fontSize ?? FONT_LADDER.node
|
|
2912
|
-
const extent = measureLabelExtent(node.label, fontSize, 0)
|
|
2913
|
-
const neededWidth = extent.width + 8
|
|
2914
|
-
const neededHeight = extent.height + 4
|
|
2915
|
-
if (neededWidth > bounds.width || neededHeight > bounds.height) {
|
|
2916
|
-
warnings.push(
|
|
2917
|
-
`Node "${node.id}" label needs ~${neededWidth}x${neededHeight}px at fontSize ${fontSize} but bounds are ` +
|
|
2918
|
-
`${bounds.width}x${bounds.height}. Widen the box, shorten the label, or lower style.fontSize.`
|
|
2919
|
-
)
|
|
2920
|
-
}
|
|
2921
|
-
}
|
|
2922
|
-
return warnings
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
export function specToDrawioXml(spec, options = {}) {
|
|
2926
|
-
// Validate spec
|
|
2927
|
-
if (!spec || typeof spec !== 'object') {
|
|
2928
|
-
throw new TypeError('Specification must be a non-null object')
|
|
2929
|
-
}
|
|
2930
|
-
if (!spec.nodes || !Array.isArray(spec.nodes) || spec.nodes.length === 0) {
|
|
2931
|
-
throw new Error('Specification must contain at least one node')
|
|
2932
|
-
}
|
|
2933
|
-
|
|
2934
|
-
// Check complexity
|
|
2935
|
-
const warnings = checkComplexity(spec)
|
|
2936
|
-
|
|
2937
|
-
// Direct sync conversion cannot run the async elk pre-pass; surface it.
|
|
2938
|
-
if (
|
|
2939
|
-
spec.meta?.layout === 'hierarchical' &&
|
|
2940
|
-
(spec.nodes || []).some((node) => node.bounds == null && node.position == null)
|
|
2941
|
-
) {
|
|
2942
|
-
warnings.push({
|
|
2943
|
-
level: 'info',
|
|
2944
|
-
message:
|
|
2945
|
-
'Layout "hierarchical" placed auto nodes with the legacy grid. Convert via the CLI (or run applyAutoLayout first) for edge-aware layered layout.'
|
|
2946
|
-
})
|
|
2947
|
-
}
|
|
2948
|
-
|
|
2949
|
-
// Security: always throw on fatal-level warnings regardless of strict mode
|
|
2950
|
-
const fatals = warnings.filter((w) => w.level === 'fatal')
|
|
2951
|
-
if (fatals.length > 0) {
|
|
2952
|
-
throw new Error('Safety limit exceeded: ' + fatals.map((e) => e.message).join('; '))
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
// Strict mode: throw on error-level warnings
|
|
2956
|
-
if (options.strict) {
|
|
2957
|
-
const errors = warnings.filter((w) => w.level === 'error')
|
|
2958
|
-
if (errors.length > 0) {
|
|
2959
|
-
throw new Error('Complexity check failed: ' + errors.map((e) => e.message).join('; '))
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
|
|
2963
|
-
// Load theme
|
|
2964
|
-
const themeName = spec.meta?.theme || 'tech-blue'
|
|
2965
|
-
const baseTheme = options.theme || loadTheme(themeName)
|
|
2966
|
-
const loadedPalette = loadPalette(spec.meta?.palette, {
|
|
2967
|
-
theme: baseTheme,
|
|
2968
|
-
userDir: options.paletteDir
|
|
2969
|
-
})
|
|
2970
|
-
|
|
2971
|
-
// Materialize font sizes on an internal clone (author YAML stays untouched)
|
|
2972
|
-
// and shrink classes whose explicit-bounds boxes cannot hold the ladder, so
|
|
2973
|
-
// layout sizes boxes with the final per-class font.
|
|
2974
|
-
const { planned, autoNodes } = planFontSizes(spec, baseTheme)
|
|
2975
|
-
spec = planned
|
|
2976
|
-
shrinkFontsToBounds(spec, autoNodes)
|
|
2977
|
-
// Content-neutral semantic types never join palette mapping: plain text
|
|
2978
|
-
// boxes and formulas always inherit theme styling and must not consume or
|
|
2979
|
-
// recolor palette entries.
|
|
2980
|
-
const paletteNeutralTypes = new Set(['text', 'formula'])
|
|
2981
|
-
const paletteApplication = applyPalette(baseTheme, loadedPalette.palette, {
|
|
2982
|
-
semanticTypes: spec.nodes
|
|
2983
|
-
.map((node) => detectSemanticType(node.label, node.type, node.network))
|
|
2984
|
-
.filter((type) => !paletteNeutralTypes.has(type)),
|
|
2985
|
-
tokenIndexes: collectPaletteTokenIndexes(spec)
|
|
2986
|
-
})
|
|
2987
|
-
const theme = paletteApplication.theme
|
|
2988
|
-
const layout = calculateLayout(spec, theme)
|
|
2989
|
-
|
|
2990
|
-
// Run validation passes
|
|
2991
|
-
const colorWarnings = validateColorScheme(spec, theme, loadedPalette.palette)
|
|
2992
|
-
const layoutWarnings = validateLayoutConsistency(spec)
|
|
2993
|
-
const connectionPointWarnings = validateConnectionPointPolicy(spec)
|
|
2994
|
-
const edgeWarnings = validateEdgeQuality(spec, layout)
|
|
2995
|
-
const textNodeWarnings = validateTextNodeStyles(spec)
|
|
2996
|
-
const labelFitWarnings = validateLabelFit(spec)
|
|
2997
|
-
const labelCollisionWarnings = validateLabelCollisions(spec, layout)
|
|
2998
|
-
const academicWarnings = validateAcademicProfile(spec)
|
|
2999
|
-
const shapeValidation = validateShapeReferences(spec)
|
|
3000
|
-
const schemaDriftWarnings = validateSchemaDrift(spec)
|
|
3001
|
-
const legacyDiagnostics = [
|
|
3002
|
-
...colorWarnings,
|
|
3003
|
-
...layoutWarnings,
|
|
3004
|
-
...connectionPointWarnings,
|
|
3005
|
-
...edgeWarnings,
|
|
3006
|
-
...textNodeWarnings,
|
|
3007
|
-
...labelFitWarnings,
|
|
3008
|
-
...labelCollisionWarnings,
|
|
3009
|
-
...academicWarnings,
|
|
3010
|
-
...shapeValidation.warnings,
|
|
3011
|
-
...schemaDriftWarnings
|
|
3012
|
-
].map((message) => ({ level: 'warning', code: 'LEGACY', message }))
|
|
3013
|
-
|
|
3014
|
-
if (shapeValidation.errors.length > 0 && !options.allowUnknownShapes) {
|
|
3015
|
-
const error = new Error(
|
|
3016
|
-
`Spec validation failed: ${shapeValidation.errors.length} unknown stencil reference(s):\n` +
|
|
3017
|
-
shapeValidation.errors.map((message) => ` • ${message}`).join('\n') +
|
|
3018
|
-
'\nRun `node scripts/cli.js search <keyword>` to find real stencil names, or pass --allow-unknown-shapes to downgrade.'
|
|
3019
|
-
)
|
|
3020
|
-
error.validationErrors = shapeValidation.errors
|
|
3021
|
-
throw error
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
if (shapeValidation.errors.length > 0) {
|
|
3025
|
-
legacyDiagnostics.push(
|
|
3026
|
-
...shapeValidation.errors.map((message) => ({ level: 'warning', code: 'LEGACY', message }))
|
|
3027
|
-
)
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
const paletteDiagnostics = [
|
|
3031
|
-
...loadedPalette.diagnostics,
|
|
3032
|
-
...paletteApplication.diagnostics,
|
|
3033
|
-
...validatePaletteUsage(loadedPalette.palette, paletteApplication.usage, {
|
|
3034
|
-
canvasBackground: theme.canvas?.background || theme.colors?.background || '#FFFFFF',
|
|
3035
|
-
profile: spec.meta?.profile,
|
|
3036
|
-
printTarget: spec.meta?.print?.target,
|
|
3037
|
-
strict: Boolean(options.strict)
|
|
3038
|
-
})
|
|
3039
|
-
]
|
|
3040
|
-
const allDiagnostics = [...legacyDiagnostics, ...paletteDiagnostics]
|
|
3041
|
-
const formatDiagnostic = (item) => `[${item.code}] ${item.message}`
|
|
3042
|
-
|
|
3043
|
-
if (allDiagnostics.length > 0) {
|
|
3044
|
-
if (!options.silent) {
|
|
3045
|
-
console.warn('\n⚠️ drawio spec validation diagnostics:')
|
|
3046
|
-
allDiagnostics.forEach((item) => console.warn(` • [${item.level}] ${formatDiagnostic(item)}`))
|
|
3047
|
-
}
|
|
3048
|
-
const errors = allDiagnostics.filter((item) => item.level === 'error')
|
|
3049
|
-
const strictFailures = options.strict ? allDiagnostics.filter((item) => item.level !== 'info') : errors
|
|
3050
|
-
if (strictFailures.length > 0) {
|
|
3051
|
-
throw new Error(
|
|
3052
|
-
`Spec validation failed with ${strictFailures.length} diagnostic(s):\n` +
|
|
3053
|
-
strictFailures.map((item) => ` • ${formatDiagnostic(item)}`).join('\n')
|
|
3054
|
-
)
|
|
3055
|
-
}
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
// Merge all warnings for callers that requested them
|
|
3059
|
-
warnings.push(...allDiagnostics)
|
|
3060
|
-
|
|
3061
|
-
// Build XML
|
|
3062
|
-
const xml = buildXml(spec, theme, layout, options)
|
|
3063
|
-
|
|
3064
|
-
// Return with warnings if requested
|
|
3065
|
-
if (options.returnWarnings) {
|
|
3066
|
-
return { xml, warnings }
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
return xml
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
/**
|
|
3073
|
-
* Parse YAML string to specification object
|
|
3074
|
-
* @param {string} yamlText - YAML specification text
|
|
3075
|
-
* @returns {Object} Parsed specification
|
|
3076
|
-
*/
|
|
3077
|
-
export function parseSpecYaml(yamlText) {
|
|
3078
|
-
if (yamlText == null) {
|
|
3079
|
-
throw new TypeError('yamlText must be a string')
|
|
3080
|
-
}
|
|
3081
|
-
if (yamlText.trim() === '') {
|
|
3082
|
-
return { meta: {}, nodes: [], edges: [], modules: [] }
|
|
3083
|
-
}
|
|
3084
|
-
let parsed
|
|
3085
|
-
try {
|
|
3086
|
-
parsed = yaml.load(yamlText, { schema: yaml.DEFAULT_SCHEMA })
|
|
3087
|
-
} catch (err) {
|
|
3088
|
-
throw new Error(`Failed to parse YAML specification: ${err.message}`)
|
|
3089
|
-
}
|
|
3090
|
-
const spec = parsed || {}
|
|
3091
|
-
spec.meta = spec.meta || {}
|
|
3092
|
-
spec.nodes = spec.nodes || []
|
|
3093
|
-
spec.edges = spec.edges || []
|
|
3094
|
-
spec.modules = spec.modules || []
|
|
3095
|
-
validateSpec(spec)
|
|
3096
|
-
return spec
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
/**
|
|
3100
|
-
* Validate spec structure and values for safety and correctness.
|
|
3101
|
-
* Throws descriptive error on first validation failure.
|
|
3102
|
-
* @param {Object} spec - Parsed specification object
|
|
3103
|
-
*/
|
|
3104
|
-
export function validateSpec(spec) {
|
|
3105
|
-
const VALID_ID = /^[A-Za-z][A-Za-z0-9_-]*$/
|
|
3106
|
-
const VALID_THEME = /^[a-z][a-z0-9-]*$/
|
|
3107
|
-
const VALID_ICON = /^[a-zA-Z][a-zA-Z0-9._-]*$/
|
|
3108
|
-
const VALID_LAYOUTS = ['horizontal', 'vertical', 'hierarchical', 'star', 'mesh', 'tiered']
|
|
3109
|
-
const VALID_ROUTINGS = ['orthogonal', 'rounded']
|
|
3110
|
-
const VALID_PROFILES = ['default', 'academic-paper', 'engineering-review']
|
|
3111
|
-
const VALID_FIGURE_TYPES = ['architecture', 'roadmap', 'workflow']
|
|
3112
|
-
const VALID_SOURCES = ['generated', 'replicated', 'edited']
|
|
3113
|
-
const VALID_REPLICATION_MODES = ['preserve-original', 'theme-first']
|
|
3114
|
-
const VALID_REPLICATION_TARGETS = ['canvas', 'nodes', 'edges', 'modules', 'mixed']
|
|
3115
|
-
const VALID_CONFIDENCE_LEVELS = ['low', 'medium', 'high']
|
|
3116
|
-
const VALID_LABEL_POSITIONS = ['start', 'center', 'end']
|
|
3117
|
-
const VALID_ALIGN = ['left', 'center', 'right']
|
|
3118
|
-
const VALID_VERTICAL_ALIGN = ['top', 'middle', 'bottom']
|
|
3119
|
-
const SAFE_STYLE_TEXT = /^[^;<>"\r\n]{1,120}$/
|
|
3120
|
-
|
|
3121
|
-
const validateIdentityMetadata = (identity, context) => {
|
|
3122
|
-
if (identity == null) return null
|
|
3123
|
-
try {
|
|
3124
|
-
return normalizeIdentity(identity)
|
|
3125
|
-
} catch (error) {
|
|
3126
|
-
throw new Error(`${context} identity is invalid: ${error.message}`)
|
|
3127
|
-
}
|
|
3128
|
-
}
|
|
3129
|
-
|
|
3130
|
-
const validateBounds = (bounds, context) => {
|
|
3131
|
-
if (typeof bounds !== 'object' || bounds == null || Array.isArray(bounds)) {
|
|
3132
|
-
throw new Error(`${context} bounds must be an object when provided`)
|
|
3133
|
-
}
|
|
3134
|
-
for (const field of ['x', 'y', 'width', 'height']) {
|
|
3135
|
-
if (!isFiniteNumber(bounds[field])) {
|
|
3136
|
-
throw new Error(`${context} bounds.${field} must be a finite number`)
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
if (bounds.width <= 0 || bounds.height <= 0) {
|
|
3140
|
-
throw new Error(`${context} bounds width and height must be greater than 0`)
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
|
|
3144
|
-
const validateTextStyle = (style, context) => {
|
|
3145
|
-
if (style == null) return
|
|
3146
|
-
if (typeof style !== 'object' || Array.isArray(style)) {
|
|
3147
|
-
throw new Error(`${context} style must be an object when provided`)
|
|
3148
|
-
}
|
|
3149
|
-
if (style.fontFamily != null && (typeof style.fontFamily !== 'string' || !SAFE_STYLE_TEXT.test(style.fontFamily))) {
|
|
3150
|
-
throw new Error(`${context} style.fontFamily must be a safe font-family string`)
|
|
3151
|
-
}
|
|
3152
|
-
if (style.align != null && !VALID_ALIGN.includes(style.align)) {
|
|
3153
|
-
throw new Error(`${context} style.align must be one of ${VALID_ALIGN.join(', ')}`)
|
|
3154
|
-
}
|
|
3155
|
-
if (style.verticalAlign != null && !VALID_VERTICAL_ALIGN.includes(style.verticalAlign)) {
|
|
3156
|
-
throw new Error(`${context} style.verticalAlign must be one of ${VALID_VERTICAL_ALIGN.join(', ')}`)
|
|
3157
|
-
}
|
|
3158
|
-
if (style.fontStyle != null && (!Number.isInteger(style.fontStyle) || style.fontStyle < 0 || style.fontStyle > 7)) {
|
|
3159
|
-
throw new Error(`${context} style.fontStyle must be an integer between 0 and 7`)
|
|
3160
|
-
}
|
|
3161
|
-
if (style.italic != null && typeof style.italic !== 'boolean') {
|
|
3162
|
-
throw new Error(`${context} style.italic must be a boolean when provided`)
|
|
3163
|
-
}
|
|
3164
|
-
if (style.bold != null && typeof style.bold !== 'boolean') {
|
|
3165
|
-
throw new Error(`${context} style.bold must be a boolean when provided`)
|
|
3166
|
-
}
|
|
3167
|
-
for (const field of ['spacingLeft', 'spacingRight', 'spacingTop', 'spacingBottom']) {
|
|
3168
|
-
if (style[field] != null && !isFiniteNumber(style[field])) {
|
|
3169
|
-
throw new Error(`${context} style.${field} must be a finite number`)
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
// Hard limits
|
|
3175
|
-
const MAX_NODES = 100
|
|
3176
|
-
const MAX_EDGES = 200
|
|
3177
|
-
const MAX_MODULES = 20
|
|
3178
|
-
|
|
3179
|
-
// meta validation
|
|
3180
|
-
if (spec.meta?.theme != null && !VALID_THEME.test(spec.meta.theme)) {
|
|
3181
|
-
throw new Error(`Invalid meta.theme "${spec.meta.theme}": must match /^[a-z][a-z0-9-]*$/`)
|
|
3182
|
-
}
|
|
3183
|
-
if (spec.meta?.palette != null && !VALID_THEME.test(spec.meta.palette)) {
|
|
3184
|
-
throw new Error(`Invalid meta.palette "${spec.meta.palette}": must match /^[a-z][a-z0-9-]*$/`)
|
|
3185
|
-
}
|
|
3186
|
-
if (spec.meta?.layout != null && !VALID_LAYOUTS.includes(spec.meta.layout)) {
|
|
3187
|
-
throw new Error(`Invalid meta.layout "${spec.meta.layout}": must be one of ${VALID_LAYOUTS.join(', ')}`)
|
|
3188
|
-
}
|
|
3189
|
-
if (spec.meta?.routing != null && !VALID_ROUTINGS.includes(spec.meta.routing)) {
|
|
3190
|
-
throw new Error(`Invalid meta.routing "${spec.meta.routing}": must be one of ${VALID_ROUTINGS.join(', ')}`)
|
|
3191
|
-
}
|
|
3192
|
-
if (spec.meta?.profile != null && !VALID_PROFILES.includes(spec.meta.profile)) {
|
|
3193
|
-
throw new Error(`Invalid meta.profile "${spec.meta.profile}": must be one of ${VALID_PROFILES.join(', ')}`)
|
|
3194
|
-
}
|
|
3195
|
-
if (spec.meta?.figureType != null && !VALID_FIGURE_TYPES.includes(spec.meta.figureType)) {
|
|
3196
|
-
throw new Error(
|
|
3197
|
-
`Invalid meta.figureType "${spec.meta.figureType}": must be one of ${VALID_FIGURE_TYPES.join(', ')}`
|
|
3198
|
-
)
|
|
3199
|
-
}
|
|
3200
|
-
if (spec.meta?.source != null && !VALID_SOURCES.includes(spec.meta.source)) {
|
|
3201
|
-
throw new Error(`Invalid meta.source "${spec.meta.source}": must be one of ${VALID_SOURCES.join(', ')}`)
|
|
3202
|
-
}
|
|
3203
|
-
if (spec.meta?.adapter != null) {
|
|
3204
|
-
const adapter = spec.meta.adapter
|
|
3205
|
-
if (typeof adapter !== 'object' || adapter == null || Array.isArray(adapter)) {
|
|
3206
|
-
throw new Error('meta.adapter must be an object when provided')
|
|
3207
|
-
}
|
|
3208
|
-
const allowed = new Set(['projectionVersion', 'name', 'domain', 'mode', 'locator'])
|
|
3209
|
-
const unknown = Object.keys(adapter).filter((key) => !allowed.has(key))
|
|
3210
|
-
if (unknown.length > 0) throw new Error(`meta.adapter has unknown field "${unknown[0]}"`)
|
|
3211
|
-
if (adapter.projectionVersion !== 1) throw new Error('meta.adapter.projectionVersion must be 1')
|
|
3212
|
-
for (const field of ['name', 'domain']) {
|
|
3213
|
-
if (typeof adapter[field] !== 'string' || !/^[a-z][a-z0-9-]{0,63}$/.test(adapter[field])) {
|
|
3214
|
-
throw new Error(`meta.adapter.${field} must match /^[a-z][a-z0-9-]{0,63}$/`)
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
if (!['code', 'declared', 'live', 'drift'].includes(adapter.mode)) {
|
|
3218
|
-
throw new Error('meta.adapter.mode must be one of code, declared, live, drift')
|
|
3219
|
-
}
|
|
3220
|
-
const locatorParts = typeof adapter.locator === 'string' ? adapter.locator.replaceAll('\\', '/').split('/') : []
|
|
3221
|
-
let locatorDepth = 0
|
|
3222
|
-
let locatorEscapesRoot = false
|
|
3223
|
-
for (const part of locatorParts) {
|
|
3224
|
-
if (part === '' || part === '.') continue
|
|
3225
|
-
if (part === '..') {
|
|
3226
|
-
if (locatorDepth === 0) locatorEscapesRoot = true
|
|
3227
|
-
else locatorDepth--
|
|
3228
|
-
} else {
|
|
3229
|
-
locatorDepth++
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
if (
|
|
3233
|
-
typeof adapter.locator !== 'string' ||
|
|
3234
|
-
adapter.locator.length === 0 ||
|
|
3235
|
-
adapter.locator.length > 512 ||
|
|
3236
|
-
/^[A-Za-z]:/.test(adapter.locator) ||
|
|
3237
|
-
/^[\\/]/.test(adapter.locator) ||
|
|
3238
|
-
/[\u0000-\u001f\u007f]/.test(adapter.locator) ||
|
|
3239
|
-
locatorEscapesRoot
|
|
3240
|
-
) {
|
|
3241
|
-
throw new Error('meta.adapter.locator must be a safe relative path')
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
if (spec.meta?.canvas != null) {
|
|
3245
|
-
parseCanvasSize(spec.meta.canvas)
|
|
3246
|
-
}
|
|
3247
|
-
if (spec.meta?.font != null) {
|
|
3248
|
-
if (typeof spec.meta.font !== 'object' || spec.meta.font == null || Array.isArray(spec.meta.font)) {
|
|
3249
|
-
throw new Error('meta.font must be an object when provided')
|
|
3250
|
-
}
|
|
3251
|
-
for (const field of ['primary', 'cjk', 'formula']) {
|
|
3252
|
-
if (typeof spec.meta.font[field] !== 'string' || !SAFE_STYLE_TEXT.test(spec.meta.font[field])) {
|
|
3253
|
-
throw new Error(`meta.font.${field} must be a safe font-family string`)
|
|
3254
|
-
}
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
if (spec.meta?.print != null) {
|
|
3258
|
-
const print = spec.meta.print
|
|
3259
|
-
if (typeof print !== 'object' || Array.isArray(print)) {
|
|
3260
|
-
throw new Error('meta.print must be an object when provided')
|
|
3261
|
-
}
|
|
3262
|
-
if (print.target != null && !PRINT_TARGETS[print.target]) {
|
|
3263
|
-
throw new Error(
|
|
3264
|
-
`Invalid meta.print.target "${print.target}": must be one of ${Object.keys(PRINT_TARGETS).join(', ')}`
|
|
3265
|
-
)
|
|
3266
|
-
}
|
|
3267
|
-
for (const field of ['widthPt', 'minPt']) {
|
|
3268
|
-
if (print[field] != null && (!isFiniteNumber(print[field]) || print[field] <= 0)) {
|
|
3269
|
-
throw new Error(`meta.print.${field} must be a positive number when provided`)
|
|
3270
|
-
}
|
|
3271
|
-
}
|
|
3272
|
-
if (print.target == null && print.widthPt == null) {
|
|
3273
|
-
throw new Error('meta.print requires target or widthPt')
|
|
3274
|
-
}
|
|
3275
|
-
}
|
|
3276
|
-
if (spec.meta?.replication != null) {
|
|
3277
|
-
if (typeof spec.meta.replication !== 'object' || Array.isArray(spec.meta.replication)) {
|
|
3278
|
-
throw new Error('meta.replication must be an object when provided')
|
|
3279
|
-
}
|
|
3280
|
-
if (spec.meta.replication.colorMode != null && !VALID_REPLICATION_MODES.includes(spec.meta.replication.colorMode)) {
|
|
3281
|
-
throw new Error(
|
|
3282
|
-
`Invalid meta.replication.colorMode "${spec.meta.replication.colorMode}": ` +
|
|
3283
|
-
`must be one of ${VALID_REPLICATION_MODES.join(', ')}`
|
|
3284
|
-
)
|
|
3285
|
-
}
|
|
3286
|
-
if (spec.meta.replication.background != null && typeof spec.meta.replication.background !== 'string') {
|
|
3287
|
-
throw new Error('meta.replication.background must be a string when provided')
|
|
3288
|
-
}
|
|
3289
|
-
if (spec.meta.replication.palette != null) {
|
|
3290
|
-
if (!Array.isArray(spec.meta.replication.palette)) {
|
|
3291
|
-
throw new Error('meta.replication.palette must be an array when provided')
|
|
3292
|
-
}
|
|
3293
|
-
spec.meta.replication.palette.forEach((entry, index) => {
|
|
3294
|
-
if (typeof entry !== 'object' || entry == null || Array.isArray(entry)) {
|
|
3295
|
-
throw new Error(`meta.replication.palette[${index}] must be an object`)
|
|
3296
|
-
}
|
|
3297
|
-
if (entry.hex != null && typeof entry.hex !== 'string') {
|
|
3298
|
-
throw new Error(`meta.replication.palette[${index}].hex must be a string when provided`)
|
|
3299
|
-
}
|
|
3300
|
-
if (entry.role != null && typeof entry.role !== 'string') {
|
|
3301
|
-
throw new Error(`meta.replication.palette[${index}].role must be a string when provided`)
|
|
3302
|
-
}
|
|
3303
|
-
if (entry.appliesTo != null && !VALID_REPLICATION_TARGETS.includes(entry.appliesTo)) {
|
|
3304
|
-
throw new Error(
|
|
3305
|
-
`Invalid meta.replication.palette[${index}].appliesTo "${entry.appliesTo}": ` +
|
|
3306
|
-
`must be one of ${VALID_REPLICATION_TARGETS.join(', ')}`
|
|
3307
|
-
)
|
|
3308
|
-
}
|
|
3309
|
-
if (entry.confidence != null && !VALID_CONFIDENCE_LEVELS.includes(entry.confidence)) {
|
|
3310
|
-
throw new Error(
|
|
3311
|
-
`Invalid meta.replication.palette[${index}].confidence "${entry.confidence}": ` +
|
|
3312
|
-
`must be one of ${VALID_CONFIDENCE_LEVELS.join(', ')}`
|
|
3313
|
-
)
|
|
3314
|
-
}
|
|
3315
|
-
if (entry.notes != null && typeof entry.notes !== 'string') {
|
|
3316
|
-
throw new Error(`meta.replication.palette[${index}].notes must be a string when provided`)
|
|
3317
|
-
}
|
|
3318
|
-
})
|
|
3319
|
-
}
|
|
3320
|
-
if (spec.meta.replication.confidenceNotes != null) {
|
|
3321
|
-
if (!Array.isArray(spec.meta.replication.confidenceNotes)) {
|
|
3322
|
-
throw new Error('meta.replication.confidenceNotes must be an array when provided')
|
|
3323
|
-
}
|
|
3324
|
-
spec.meta.replication.confidenceNotes.forEach((note, index) => {
|
|
3325
|
-
if (typeof note !== 'string') {
|
|
3326
|
-
throw new Error(`meta.replication.confidenceNotes[${index}] must be a string`)
|
|
3327
|
-
}
|
|
3328
|
-
})
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
|
-
|
|
3332
|
-
// Hard limit checks
|
|
3333
|
-
if (spec.nodes.length > MAX_NODES) {
|
|
3334
|
-
throw new Error(`Too many nodes (${spec.nodes.length}): maximum is ${MAX_NODES}`)
|
|
3335
|
-
}
|
|
3336
|
-
if (spec.edges.length > MAX_EDGES) {
|
|
3337
|
-
throw new Error(`Too many edges (${spec.edges.length}): maximum is ${MAX_EDGES}`)
|
|
3338
|
-
}
|
|
3339
|
-
if (spec.modules.length > MAX_MODULES) {
|
|
3340
|
-
throw new Error(`Too many modules (${spec.modules.length}): maximum is ${MAX_MODULES}`)
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
|
-
// Node validation
|
|
3344
|
-
const nodeIdentityKeys = new Set()
|
|
3345
|
-
for (const node of spec.nodes) {
|
|
3346
|
-
if (!node.id || !VALID_ID.test(node.id)) {
|
|
3347
|
-
throw new Error(`Invalid node id "${node.id}": must match /^[A-Za-z][A-Za-z0-9_-]*$/`)
|
|
3348
|
-
}
|
|
3349
|
-
if (!node.label || typeof node.label !== 'string') {
|
|
3350
|
-
throw new Error(`Node "${node.id}" is missing a required string label`)
|
|
3351
|
-
}
|
|
3352
|
-
const nodeIdentity = validateIdentityMetadata(node.identity, `Node "${node.id}"`)
|
|
3353
|
-
if (nodeIdentity) {
|
|
3354
|
-
const key = `${nodeIdentity.scheme}\0${nodeIdentity.key}`
|
|
3355
|
-
if (nodeIdentityKeys.has(key))
|
|
3356
|
-
throw new Error(`Duplicate node identity "${nodeIdentity.scheme}:${nodeIdentity.key}"`)
|
|
3357
|
-
nodeIdentityKeys.add(key)
|
|
3358
|
-
} else if (spec.meta?.adapter) {
|
|
3359
|
-
throw new Error(`Node "${node.id}" requires identity when meta.adapter is present`)
|
|
3360
|
-
}
|
|
3361
|
-
if (node.type != null && !SHAPE_STYLES[node.type]) {
|
|
3362
|
-
throw new Error(
|
|
3363
|
-
`Node "${node.id}" has unknown type "${node.type}": must be one of ${Object.keys(SHAPE_STYLES).join(', ')}`
|
|
3364
|
-
)
|
|
3365
|
-
}
|
|
3366
|
-
if (node.icon != null && !VALID_ICON.test(node.icon)) {
|
|
3367
|
-
throw new Error(`Node "${node.id}" has invalid icon "${node.icon}": must match /^[a-zA-Z][a-zA-Z0-9._-]*$/`)
|
|
3368
|
-
}
|
|
3369
|
-
if (node.network != null) {
|
|
3370
|
-
if (typeof node.network !== 'object' || Array.isArray(node.network)) {
|
|
3371
|
-
throw new Error(`Node "${node.id}" network must be an object when provided`)
|
|
3372
|
-
}
|
|
3373
|
-
const networkStringFields = ['device', 'role', 'vendor', 'zone', 'ip', 'cidr']
|
|
3374
|
-
for (const field of networkStringFields) {
|
|
3375
|
-
if (node.network[field] != null && typeof node.network[field] !== 'string') {
|
|
3376
|
-
throw new Error(`Node "${node.id}" network.${field} must be a string when provided`)
|
|
3377
|
-
}
|
|
3378
|
-
}
|
|
3379
|
-
if (node.network.device != null && !VALID_ICON.test(node.network.device)) {
|
|
3380
|
-
throw new Error(
|
|
3381
|
-
`Node "${node.id}" has invalid network.device "${node.network.device}": must match /^[a-zA-Z][a-zA-Z0-9._-]*$/`
|
|
3382
|
-
)
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
if (node.position != null) {
|
|
3386
|
-
if (typeof node.position.x !== 'number' || typeof node.position.y !== 'number') {
|
|
3387
|
-
throw new Error(`Node "${node.id}" position must have numeric x and y`)
|
|
3388
|
-
}
|
|
3389
|
-
}
|
|
3390
|
-
if (node.bounds != null) {
|
|
3391
|
-
validateBounds(node.bounds, `Node "${node.id}"`)
|
|
3392
|
-
}
|
|
3393
|
-
validateTextStyle(node.style, `Node "${node.id}"`)
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
// Edge validation
|
|
3397
|
-
const edgeIds = new Set()
|
|
3398
|
-
const edgeIdentityKeys = new Set()
|
|
3399
|
-
for (const edge of spec.edges) {
|
|
3400
|
-
if (edge.id != null) {
|
|
3401
|
-
if (typeof edge.id !== 'string' || !VALID_ID.test(edge.id)) {
|
|
3402
|
-
throw new Error(`Invalid edge.id "${edge.id}": must match node ID pattern`)
|
|
3403
|
-
}
|
|
3404
|
-
if (edgeIds.has(edge.id)) throw new Error(`Duplicate edge id "${edge.id}"`)
|
|
3405
|
-
edgeIds.add(edge.id)
|
|
3406
|
-
}
|
|
3407
|
-
const edgeIdentity = validateIdentityMetadata(edge.identity, `Edge "${edge.from}->${edge.to}"`)
|
|
3408
|
-
if (edgeIdentity) {
|
|
3409
|
-
const key = `${edgeIdentity.scheme}\0${edgeIdentity.key}`
|
|
3410
|
-
if (edgeIdentityKeys.has(key)) {
|
|
3411
|
-
throw new Error(`Duplicate edge identity "${edgeIdentity.scheme}:${edgeIdentity.key}"`)
|
|
3412
|
-
}
|
|
3413
|
-
edgeIdentityKeys.add(key)
|
|
3414
|
-
} else if (spec.meta?.adapter) {
|
|
3415
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" requires identity when meta.adapter is present`)
|
|
3416
|
-
}
|
|
3417
|
-
if (!edge.from || !VALID_ID.test(edge.from)) {
|
|
3418
|
-
throw new Error(`Invalid edge.from "${edge.from}": must match node ID pattern`)
|
|
3419
|
-
}
|
|
3420
|
-
if (!edge.to || !VALID_ID.test(edge.to)) {
|
|
3421
|
-
throw new Error(`Invalid edge.to "${edge.to}": must match node ID pattern`)
|
|
3422
|
-
}
|
|
3423
|
-
if (edge.label != null && typeof edge.label !== 'string') {
|
|
3424
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" label must be a string`)
|
|
3425
|
-
}
|
|
3426
|
-
if (edge.labelPosition != null && !VALID_LABEL_POSITIONS.includes(edge.labelPosition)) {
|
|
3427
|
-
throw new Error(
|
|
3428
|
-
`Invalid edge.labelPosition "${edge.labelPosition}": must be one of ${VALID_LABEL_POSITIONS.join(', ')}`
|
|
3429
|
-
)
|
|
3430
|
-
}
|
|
3431
|
-
if (edge.labelOffset != null) {
|
|
3432
|
-
if (typeof edge.labelOffset !== 'object' || Array.isArray(edge.labelOffset)) {
|
|
3433
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" labelOffset must be an object when provided`)
|
|
3434
|
-
}
|
|
3435
|
-
if (!isFiniteNumber(edge.labelOffset.x) || !isFiniteNumber(edge.labelOffset.y)) {
|
|
3436
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" labelOffset must have numeric x and y`)
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
if (edge.srcInterface != null && typeof edge.srcInterface !== 'string') {
|
|
3440
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" srcInterface must be a string`)
|
|
3441
|
-
}
|
|
3442
|
-
if (edge.dstInterface != null && typeof edge.dstInterface !== 'string') {
|
|
3443
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" dstInterface must be a string`)
|
|
3444
|
-
}
|
|
3445
|
-
if (edge.ip != null && typeof edge.ip !== 'string') {
|
|
3446
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" ip must be a string`)
|
|
3447
|
-
}
|
|
3448
|
-
if (edge.vlan != null && typeof edge.vlan !== 'string' && !Number.isInteger(edge.vlan)) {
|
|
3449
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" vlan must be a string or integer`)
|
|
3450
|
-
}
|
|
3451
|
-
if (edge.bandwidth != null && typeof edge.bandwidth !== 'string') {
|
|
3452
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" bandwidth must be a string`)
|
|
3453
|
-
}
|
|
3454
|
-
if (edge.linkType != null && typeof edge.linkType !== 'string') {
|
|
3455
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" linkType must be a string`)
|
|
3456
|
-
}
|
|
3457
|
-
if (edge.waypoints != null) {
|
|
3458
|
-
if (!Array.isArray(edge.waypoints)) {
|
|
3459
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" waypoints must be an array`)
|
|
3460
|
-
}
|
|
3461
|
-
edge.waypoints.forEach((point, index) => {
|
|
3462
|
-
if (typeof point?.x !== 'number' || typeof point?.y !== 'number') {
|
|
3463
|
-
throw new Error(`Edge "${edge.from}->${edge.to}" waypoint ${index} must have numeric x and y`)
|
|
3464
|
-
}
|
|
3465
|
-
})
|
|
3466
|
-
}
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
// Module validation
|
|
3470
|
-
const moduleIdentityKeys = new Set()
|
|
3471
|
-
for (const mod of spec.modules) {
|
|
3472
|
-
if (!mod.id || !VALID_ID.test(mod.id)) {
|
|
3473
|
-
throw new Error(`Invalid module id "${mod.id}": must match /^[A-Za-z][A-Za-z0-9_-]*$/`)
|
|
3474
|
-
}
|
|
3475
|
-
if (!mod.label || typeof mod.label !== 'string') {
|
|
3476
|
-
throw new Error(`Module "${mod.id}" is missing a required string label`)
|
|
3477
|
-
}
|
|
3478
|
-
const moduleIdentity = validateIdentityMetadata(mod.identity, `Module "${mod.id}"`)
|
|
3479
|
-
if (moduleIdentity) {
|
|
3480
|
-
const key = `${moduleIdentity.scheme}\0${moduleIdentity.key}`
|
|
3481
|
-
if (moduleIdentityKeys.has(key)) {
|
|
3482
|
-
throw new Error(`Duplicate module identity "${moduleIdentity.scheme}:${moduleIdentity.key}"`)
|
|
3483
|
-
}
|
|
3484
|
-
moduleIdentityKeys.add(key)
|
|
3485
|
-
} else if (spec.meta?.adapter) {
|
|
3486
|
-
throw new Error(`Module "${mod.id}" requires identity when meta.adapter is present`)
|
|
3487
|
-
}
|
|
3488
|
-
}
|
|
3489
|
-
}
|
|
3490
|
-
|
|
3491
|
-
function getXmlAttribute(tagText, name) {
|
|
3492
|
-
const match = new RegExp(`\\b${name}="([^"]*)"`).exec(tagText)
|
|
3493
|
-
return match ? match[1] : null
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
function parseXmlNumber(value) {
|
|
3497
|
-
if (value == null || value === '') return null
|
|
3498
|
-
const number = Number(value)
|
|
3499
|
-
return Number.isFinite(number) ? number : null
|
|
3500
|
-
}
|
|
3501
|
-
|
|
3502
|
-
function isImageCell(cellAttrs) {
|
|
3503
|
-
const style = getXmlAttribute(cellAttrs, 'style') || ''
|
|
3504
|
-
return /\bshape=image\b/.test(style) || /\bimage=/.test(style) || style.includes('data:image')
|
|
3505
|
-
}
|
|
3506
|
-
|
|
3507
|
-
function collectFullPageImageErrors(xml) {
|
|
3508
|
-
const errors = []
|
|
3509
|
-
const graphMatch = /<mxGraphModel\s([^>]*)>/.exec(xml)
|
|
3510
|
-
if (!graphMatch) return errors
|
|
3511
|
-
|
|
3512
|
-
const pageWidth = parseXmlNumber(getXmlAttribute(graphMatch[1], 'pageWidth'))
|
|
3513
|
-
const pageHeight = parseXmlNumber(getXmlAttribute(graphMatch[1], 'pageHeight'))
|
|
3514
|
-
if (!pageWidth || !pageHeight || pageWidth <= 0 || pageHeight <= 0) return errors
|
|
3515
|
-
|
|
3516
|
-
const cellPattern = /<mxCell\s([^>]*?)(\/?)>/g
|
|
3517
|
-
let match
|
|
3518
|
-
while ((match = cellPattern.exec(xml)) !== null) {
|
|
3519
|
-
const cellAttrs = match[1]
|
|
3520
|
-
const isSelfClosing = match[2] === '/'
|
|
3521
|
-
if (isSelfClosing) continue
|
|
3522
|
-
if (!/\bvertex="1"/.test(cellAttrs) || !isImageCell(cellAttrs)) continue
|
|
3523
|
-
|
|
3524
|
-
const closeIndex = xml.indexOf('</mxCell>', cellPattern.lastIndex)
|
|
3525
|
-
if (closeIndex === -1) continue
|
|
3526
|
-
const cellBody = xml.slice(cellPattern.lastIndex, closeIndex)
|
|
3527
|
-
const geometryMatch = /<mxGeometry\s([^>]*)\/?>/.exec(cellBody)
|
|
3528
|
-
if (!geometryMatch) continue
|
|
3529
|
-
|
|
3530
|
-
const x = parseXmlNumber(getXmlAttribute(geometryMatch[1], 'x')) ?? 0
|
|
3531
|
-
const y = parseXmlNumber(getXmlAttribute(geometryMatch[1], 'y')) ?? 0
|
|
3532
|
-
const width = parseXmlNumber(getXmlAttribute(geometryMatch[1], 'width'))
|
|
3533
|
-
const height = parseXmlNumber(getXmlAttribute(geometryMatch[1], 'height'))
|
|
3534
|
-
if (!width || !height || width <= 0 || height <= 0) continue
|
|
3535
|
-
|
|
3536
|
-
const coversWidth = width >= pageWidth * 0.9
|
|
3537
|
-
const coversHeight = height >= pageHeight * 0.9
|
|
3538
|
-
const coversArea = width * height >= pageWidth * pageHeight * 0.8
|
|
3539
|
-
const nearOrigin = Math.abs(x) <= pageWidth * 0.05 && Math.abs(y) <= pageHeight * 0.05
|
|
3540
|
-
if (coversWidth && coversHeight && coversArea && nearOrigin) {
|
|
3541
|
-
const id = getXmlAttribute(cellAttrs, 'id') || '(unknown)'
|
|
3542
|
-
errors.push(
|
|
3543
|
-
`Cell "${id}" appears to be a full-page embedded image; rebuild the reference with native draw.io shapes instead.`
|
|
3544
|
-
)
|
|
3545
|
-
}
|
|
3546
|
-
}
|
|
3547
|
-
|
|
3548
|
-
return errors
|
|
3549
|
-
}
|
|
3550
|
-
|
|
3551
|
-
/**
|
|
3552
|
-
* Validate draw.io XML structure
|
|
3553
|
-
* @param {string} xml - draw.io XML string
|
|
3554
|
-
* @returns {{ valid: boolean, errors: string[] }}
|
|
3555
|
-
*/
|
|
3556
|
-
export function validateXml(xml) {
|
|
3557
|
-
const errors = []
|
|
3558
|
-
const warnings = []
|
|
3559
|
-
|
|
3560
|
-
if (typeof xml !== 'string' || xml.trim() === '') {
|
|
3561
|
-
return { valid: false, errors: ['XML must be a non-empty string'], warnings: [] }
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
|
-
// Check root structure
|
|
3565
|
-
if (!xml.includes('<mxGraphModel')) {
|
|
3566
|
-
errors.push('Missing <mxGraphModel element')
|
|
3567
|
-
}
|
|
3568
|
-
if (!xml.includes('<root>')) {
|
|
3569
|
-
errors.push('Missing <root> element')
|
|
3570
|
-
}
|
|
3571
|
-
if (!xml.includes('</root>')) {
|
|
3572
|
-
errors.push('Missing </root> closing tag')
|
|
3573
|
-
}
|
|
3574
|
-
if (!xml.includes('</mxGraphModel>')) {
|
|
3575
|
-
errors.push('Missing </mxGraphModel> closing tag')
|
|
3576
|
-
}
|
|
3577
|
-
|
|
3578
|
-
// Check required root cells
|
|
3579
|
-
if (!xml.includes('<mxCell id="0"/>')) {
|
|
3580
|
-
errors.push('Missing required <mxCell id="0"/>')
|
|
3581
|
-
}
|
|
3582
|
-
if (!xml.includes('<mxCell id="1" parent="0"/>')) {
|
|
3583
|
-
errors.push('Missing required <mxCell id="1" parent="0"/>')
|
|
3584
|
-
}
|
|
3585
|
-
|
|
3586
|
-
// Extract all mxCell id values
|
|
3587
|
-
const idPattern = /<mxCell\s[^>]*\bid="([^"]+)"/g
|
|
3588
|
-
const allIds = []
|
|
3589
|
-
let match
|
|
3590
|
-
while ((match = idPattern.exec(xml)) !== null) {
|
|
3591
|
-
allIds.push(match[1])
|
|
3592
|
-
}
|
|
3593
|
-
|
|
3594
|
-
// Check ID uniqueness
|
|
3595
|
-
const seen = new Set()
|
|
3596
|
-
const duplicates = new Set()
|
|
3597
|
-
for (const id of allIds) {
|
|
3598
|
-
if (seen.has(id)) {
|
|
3599
|
-
duplicates.add(id)
|
|
3600
|
-
}
|
|
3601
|
-
seen.add(id)
|
|
3602
|
-
}
|
|
3603
|
-
for (const dup of duplicates) {
|
|
3604
|
-
errors.push(`Duplicate cell ID: "${dup}"`)
|
|
3605
|
-
}
|
|
3606
|
-
|
|
3607
|
-
// Collect vertex cell IDs (cells with vertex="1")
|
|
3608
|
-
const vertexPattern = /<mxCell\s[^>]*\bid="([^"]+)"[^>]*\bvertex="1"/g
|
|
3609
|
-
const vertexIds = new Set()
|
|
3610
|
-
while ((match = vertexPattern.exec(xml)) !== null) {
|
|
3611
|
-
vertexIds.add(match[1])
|
|
3612
|
-
}
|
|
3613
|
-
// Also check alternate attribute order
|
|
3614
|
-
const vertexPattern2 = /<mxCell\s[^>]*\bvertex="1"[^>]*\bid="([^"]+)"/g
|
|
3615
|
-
while ((match = vertexPattern2.exec(xml)) !== null) {
|
|
3616
|
-
vertexIds.add(match[1])
|
|
3617
|
-
}
|
|
3618
|
-
|
|
3619
|
-
// Check edge source/target references
|
|
3620
|
-
const edgePattern = /<mxCell\s[^>]*\bedge="1"[^>]*/g
|
|
3621
|
-
while ((match = edgePattern.exec(xml)) !== null) {
|
|
3622
|
-
const edgeAttr = match[0]
|
|
3623
|
-
const srcMatch = /\bsource="([^"]+)"/.exec(edgeAttr)
|
|
3624
|
-
const tgtMatch = /\btarget="([^"]+)"/.exec(edgeAttr)
|
|
3625
|
-
const idMatch = /\bid="([^"]+)"/.exec(edgeAttr)
|
|
3626
|
-
const edgeId = idMatch ? idMatch[1] : '(unknown)'
|
|
3627
|
-
|
|
3628
|
-
if (!srcMatch || !tgtMatch) {
|
|
3629
|
-
const missing = !srcMatch && !tgtMatch ? 'source and target' : !srcMatch ? 'source' : 'target'
|
|
3630
|
-
warnings.push(
|
|
3631
|
-
`Edge "${edgeId}" is not bound to nodes (missing ${missing}). ` +
|
|
3632
|
-
'Connect modules with native bound edges (source/target node ids) instead of floating connectors.'
|
|
3633
|
-
)
|
|
3634
|
-
}
|
|
3635
|
-
if (srcMatch && !vertexIds.has(srcMatch[1])) {
|
|
3636
|
-
errors.push(`Edge "${edgeId}" references nonexistent source ID: "${srcMatch[1]}"`)
|
|
3637
|
-
}
|
|
3638
|
-
if (tgtMatch && !vertexIds.has(tgtMatch[1])) {
|
|
3639
|
-
errors.push(`Edge "${edgeId}" references nonexistent target ID: "${tgtMatch[1]}"`)
|
|
3640
|
-
}
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
|
-
// Arrow-look-alike vertices and opaque plain text boxes
|
|
3644
|
-
const cellTagPattern = /<mxCell\s[^>]*>/g
|
|
3645
|
-
while ((match = cellTagPattern.exec(xml)) !== null) {
|
|
3646
|
-
const tag = match[0]
|
|
3647
|
-
if (!/\bvertex="1"/.test(tag)) continue
|
|
3648
|
-
const styleMatch = /\bstyle="([^"]*)"/.exec(tag)
|
|
3649
|
-
if (!styleMatch) continue
|
|
3650
|
-
const style = styleMatch[1]
|
|
3651
|
-
const idMatch = /\bid="([^"]+)"/.exec(tag)
|
|
3652
|
-
const cellId = idMatch ? idMatch[1] : '(unknown)'
|
|
3653
|
-
|
|
3654
|
-
const arrowShape = /(?:^|;)shape=(singleArrow|doubleArrow|triangle|mxgraph\.arrows2\.[^;"]*)/.exec(style)
|
|
3655
|
-
if (arrowShape) {
|
|
3656
|
-
warnings.push(
|
|
3657
|
-
`Cell "${cellId}" uses arrow shape "${arrowShape[1]}" as a connector look-alike. ` +
|
|
3658
|
-
'Connect modules with a native bound edge (endArrow=open) instead of standalone arrow shapes.'
|
|
3659
|
-
)
|
|
3660
|
-
}
|
|
3661
|
-
|
|
3662
|
-
if (/^text;/.test(style) && /fillColor=(#fff(fff)?|white)\b/i.test(style)) {
|
|
3663
|
-
warnings.push(
|
|
3664
|
-
`Cell "${cellId}" is a plain text box with a white background. ` +
|
|
3665
|
-
'Plain text boxes must stay transparent: fillColor=none;strokeColor=none;labelBackgroundColor=none.'
|
|
3666
|
-
)
|
|
3667
|
-
}
|
|
3668
|
-
}
|
|
3669
|
-
|
|
3670
|
-
errors.push(...collectFullPageImageErrors(xml))
|
|
3671
|
-
|
|
3672
|
-
return { valid: errors.length === 0, errors, warnings }
|
|
3673
|
-
}
|
|
3674
|
-
|
|
3675
|
-
/**
|
|
3676
|
-
* Complexity check - warn if diagram is too complex
|
|
3677
|
-
*/
|
|
3678
|
-
export function checkComplexity(spec) {
|
|
3679
|
-
const warnings = []
|
|
3680
|
-
|
|
3681
|
-
const nodeCount = spec.nodes?.length || 0
|
|
3682
|
-
const edgeCount = spec.edges?.length || 0
|
|
3683
|
-
const moduleCount = spec.modules?.length || 0
|
|
3684
|
-
|
|
3685
|
-
// Fatal hard caps (security limits — always enforced)
|
|
3686
|
-
if (nodeCount > 100) {
|
|
3687
|
-
warnings.push({ level: 'fatal', message: `Node count (${nodeCount}) exceeds safety limit of 100` })
|
|
3688
|
-
} else if (nodeCount > 60) {
|
|
3689
|
-
warnings.push({
|
|
3690
|
-
level: 'error',
|
|
3691
|
-
message: `Too many nodes (${nodeCount}). Consider splitting into sub-diagrams. For academic figures, aim for 40 nodes or fewer.`
|
|
3692
|
-
})
|
|
3693
|
-
} else if (nodeCount > 40) {
|
|
3694
|
-
warnings.push({
|
|
3695
|
-
level: 'warning',
|
|
3696
|
-
message: `Many nodes (${nodeCount}). Consider splitting for clarity or using compact patterns (e.g., single-node legends).`
|
|
3697
|
-
})
|
|
3698
|
-
}
|
|
3699
|
-
|
|
3700
|
-
if (edgeCount > 200) {
|
|
3701
|
-
warnings.push({ level: 'fatal', message: `Edge count (${edgeCount}) exceeds safety limit of 200` })
|
|
3702
|
-
} else if (edgeCount > 50) {
|
|
3703
|
-
warnings.push({ level: 'error', message: `Too many edges (${edgeCount}). Consider hierarchical layout.` })
|
|
3704
|
-
} else if (edgeCount > 30) {
|
|
3705
|
-
warnings.push({ level: 'warning', message: `Many edges (${edgeCount}). Consider simplifying.` })
|
|
3706
|
-
}
|
|
3707
|
-
|
|
3708
|
-
if (moduleCount > 20) {
|
|
3709
|
-
warnings.push({ level: 'fatal', message: `Module count (${moduleCount}) exceeds safety limit of 20` })
|
|
3710
|
-
} else if (moduleCount > 5) {
|
|
3711
|
-
warnings.push({ level: 'warning', message: `Many modules (${moduleCount}). Consider zoom layers.` })
|
|
3712
|
-
}
|
|
3713
|
-
|
|
3714
|
-
// Check label lengths
|
|
3715
|
-
const longLabelIds = []
|
|
3716
|
-
for (const node of spec.nodes || []) {
|
|
3717
|
-
if (node.label && node.label.length > 200) {
|
|
3718
|
-
warnings.push({
|
|
3719
|
-
level: 'fatal',
|
|
3720
|
-
message: `Node "${node.id}" label exceeds 200 characters (${node.label.length} chars)`
|
|
3721
|
-
})
|
|
3722
|
-
} else if (node.label && node.label.length > 14) {
|
|
3723
|
-
longLabelIds.push(node.id)
|
|
3724
|
-
}
|
|
3725
|
-
}
|
|
3726
|
-
if (longLabelIds.length > 0) {
|
|
3727
|
-
const sample = longLabelIds
|
|
3728
|
-
.slice(0, 3)
|
|
3729
|
-
.map((id) => `"${id}"`)
|
|
3730
|
-
.join(', ')
|
|
3731
|
-
const suffix = longLabelIds.length > 3 ? ` +${longLabelIds.length - 3} more` : ''
|
|
3732
|
-
warnings.push({
|
|
3733
|
-
level: 'info',
|
|
3734
|
-
message: `${longLabelIds.length} node label(s) exceed 14 characters (${sample}${suffix}). Consider abbreviation.`
|
|
3735
|
-
})
|
|
3736
|
-
}
|
|
3737
|
-
|
|
3738
|
-
return warnings
|
|
3739
|
-
}
|