@litfamily/litcodex 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +361 -23
- package/dist/cli.js +42 -0
- package/dist/config-migration/config-paths.js +9 -2
- package/dist/install/doctor-render.js +1 -0
- package/dist/install/doctor.js +8 -0
- package/dist/install/execute.d.ts +2 -0
- package/dist/install/execute.js +8 -3
- package/dist/install/generated-skill-payload-hashes.d.ts +617 -21
- package/dist/install/generated-skill-payload-hashes.js +617 -21
- package/dist/install/index.js +13 -2
- package/dist/install/marketplace-payload.d.ts +1 -0
- package/dist/install/marketplace-payload.js +73 -2
- package/dist/install/motion-runtime.d.ts +36 -0
- package/dist/install/motion-runtime.js +82 -0
- package/dist/install/office-runtime.d.ts +20 -0
- package/dist/install/office-runtime.js +37 -0
- package/dist/install/skill-catalog.d.ts +1 -1
- package/dist/install/skill-catalog.js +26 -2
- package/dist/install/skill-resource-hashes.d.ts +1 -1
- package/dist/install/skill-resource-hashes.js +1 -1
- package/dist/install/types.d.ts +3 -0
- package/dist/postinstall.js +14 -2
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directive.md +90 -5
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-comprehend.md +13 -17
- package/marketplace/plugins/litcodex/components/lit-loop/directives/litwork.md +8 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/codex-hook.js +8 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.d.ts +8 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +36 -4
- package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.d.ts +112 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/jev-hint.js +522 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.d.ts +18 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/motion-route.js +95 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.d.ts +3 -1
- package/marketplace/plugins/litcodex/components/lit-loop/dist/skill-renames.js +10 -5
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/bundled-rules/lit-humanizer.md +12 -0
- package/marketplace/plugins/litcodex/components/rules/dist/cli.js +22 -10
- package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.d.ts +23 -34
- package/marketplace/plugins/litcodex/components/rules/dist/deliverable-hedge-guard.js +420 -388
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/hooks/hooks.json +32 -21
- package/marketplace/plugins/litcodex/skills/autoconference/assets/report_template.md +1 -1
- package/marketplace/plugins/litcodex/skills/browser-drive/SKILL.md +4 -0
- package/marketplace/plugins/litcodex/skills/browser-drive/scripts/capability-probe.mjs +25 -2
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +14 -15
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/THIRD-PARTY-NOTICE.txt +7 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/examples/readme-ab/README.md +13 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/adaptive-layout.md +12 -83
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/brand-and-imagery.md +17 -65
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/complete-contract.md +44 -13
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/composition.md +14 -80
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/craft-floor.md +103 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/creative-directions.md +13 -82
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/evidence-review.md +14 -112
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/implementation-platforms.md +16 -68
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/inclusive-interface.md +12 -86
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/interaction-motion.md +13 -82
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/motion-guide.md +123 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/operating-lanes.md +12 -100
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/performance-delivery.md +12 -78
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/probe-and-review.md +41 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/product-direction.md +10 -88
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/production-interview.md +10 -12
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/redesign-playbook.md +12 -74
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/slop-register.md +98 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/system-foundations.md +13 -100
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-language.md +11 -74
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/references/visual-reconstruction.md +9 -78
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/hover-probe.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/page-probe.mjs +423 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/probe.mjs +261 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/route-mode.mjs +19 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/rule-data.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/scripts/serve-static.mjs +24 -0
- package/marketplace/plugins/litcodex/skills/lit-comprehend/SKILL.md +45 -53
- package/marketplace/plugins/litcodex/skills/lit-comprehend/references/artifact-template.md +10 -44
- package/marketplace/plugins/litcodex/skills/lit-comprehend/scripts/verify-explainer.ts +0 -18
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/NOTICE +33 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +167 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/agents/openai.yaml +6 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/icons.html +231 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/index.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/01-service-architecture/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/02-release-decision/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/03-data-retention/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/04-oauth-sequence/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/05-review-lanes/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/06-rollout-gates/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/07-deployment-boundary/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/examples/08-policy-traces/constructed-naive-foil.html +1 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/accessibility.md +37 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/export.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/import-schema.md +28 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/motion.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/output-spec.md +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/profiles.md +24 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/style-guide.md +67 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bar.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-bump.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-er.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-journey.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-layers.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-line.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-loop.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-nested.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-polar.md +67 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-process.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-radar.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-state.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-tree.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-venn.md +51 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/references/verifier-guide.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-craft-rules.mjs +14 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +219 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/doctor.mjs +28 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-model.mjs +162 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-source.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/drawio-xml.mjs +148 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/export.mjs +122 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-common.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-drawio.mjs +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-excalidraw.mjs +234 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/import-mermaid.mjs +104 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-common.mjs +115 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-er.mjs +70 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-flowchart.mjs +178 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-sequence.mjs +137 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/mermaid-state.mjs +80 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/runtime-probes.mjs +11 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-all.mjs +85 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-brief.mjs +16 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality-geometry.mjs +226 -0
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/scripts/visual-quality.mjs +147 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/LICENSE +21 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/NOTICE +3 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/agents/openai.yaml +14 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/frontmatter_schema.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/journal_style_spec.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/markdown_quality_checklist.md +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/references/slop_rules.md +35 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.in +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/runtime/requirements.lock +20 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/clean_markdown.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_docx.py +1046 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_md_to_pdf.py +281 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/convert_pdf.py +130 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/docx_craft.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/edit_docx.py +297 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/embed_images.py +78 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/generate_docx_templates.py +491 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/slop_lint.py +473 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/scripts/visual_audit.py +41 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/acs.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/elsevier.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/ieee.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/docx/nature.docx +0 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/acs/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/elsevier/template.tex +38 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/ieee/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/korean-generic/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/README.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/latex/nature/template.tex +37 -0
- package/marketplace/plugins/litcodex/skills/lit-docx/templates/registry.yaml +1366 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/NOTICE +160 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/SKILL.md +146 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/always-on-rule.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/bench/prompts.md +73 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/after.md +13 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/report/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/motion-guide.md +123 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/rules.json +884 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/core.mjs +208 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/detect.mjs +83 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
- package/marketplace/plugins/litcodex/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
- package/marketplace/plugins/litcodex/skills/lit-init/references/deep-repository-map.md +6 -10
- package/marketplace/plugins/litcodex/skills/lit-loop/SKILL.md +95 -12
- package/marketplace/plugins/litcodex/skills/lit-loop/agents/openai.yaml +3 -2
- package/marketplace/plugins/litcodex/skills/lit-loop/references/full-workflow.md +10 -3
- package/marketplace/plugins/litcodex/skills/lit-pptx/NOTICE +7 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +102 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/analyst.md +49 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/antithesis.md +59 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/architect.md +44 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/critic.md +42 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/openai.yaml +14 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/synthesizer.md +47 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/agents/thesis.md +33 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-md.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Black.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Bold.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Light.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Medium.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/A2Z-Regular.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/OFL.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/fonts/a2z-font/SOURCE.md +29 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/LICENSE.txt +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Bold.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/pretendard-font/public/static/PretendardGOV-Regular.otf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/anti-slop-checklist.md +71 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/authoring-guide.md +141 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/consensus-protocol.md +125 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/data-display-cookbook.md +45 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/design-system-azure.md +58 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/references/interview-protocol.md +113 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package-lock.json +747 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/package.json +13 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.in +2 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/runtime/requirements.lock +14 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/check_ooxml.py +40 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/compile-deck.js +399 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/craft_extras.py +246 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/embed_fonts.py +201 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/inventory.py +95 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/learn_template.py +433 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/font-map.js +79 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-bg.js +85 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +36 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/layout-resolver.js +734 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/markdown-loader.js +136 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-html.js +358 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +1885 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/slide-ast.js +517 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/lib/template-registry.js +355 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/office-run.mjs +137 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/package.json +1 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/qa_deck.py +795 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/scripts/validate_pptx.py +206 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v1.md +251 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/markdown-slide-spec-v2.md +207 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/specs/template-enrollment-contract.md +379 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/bauhaus_light.css +4 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/boilerplate_professional.css +508 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +37 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +464 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +37 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
- package/marketplace/plugins/litcodex/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +2 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +73 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/agents/openai.yaml +15 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/NOTICE +23 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +32 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/browser-app.js +735 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/completion.mjs +9 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/compose.mjs +255 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/constants.mjs +264 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/driver.mjs +169 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/encode.mjs +163 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/flash.mjs +251 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/fonts.mjs +169 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/gate.mjs +466 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/image.mjs +267 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/look.mjs +182 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/passes.mjs +181 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/presets.mjs +110 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/report.mjs +56 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/runtime.mjs +287 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/scenes.mjs +309 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/sound.mjs +463 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-gate.mjs +155 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-init.js +215 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-kit.js +515 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.js +147 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-qa.mjs +243 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-render.mjs +335 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage-worker.mjs +26 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stage.mjs +311 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/stroke.mjs +264 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/timeline.mjs +153 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/treatment.mjs +280 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/type.mjs +234 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/engine/util.mjs +198 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt400.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt700.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-wt900.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/archivo/SHA256SUMS +16 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/CREDITS +6 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/stroke/OFL.txt +86 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/quality-gate.md +137 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/runtime.md +68 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/scene-author.md +57 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/stage.md +175 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/style-bibles.md +103 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/treatment.md +119 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/references/type-and-timing.md +83 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package-lock.json +59 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/package.json +1 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/requirements-audio.txt +1082 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/runtime/word-timing-models.json +11 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/beat-grid.py +50 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/render.mjs +807 -0
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/scripts/runtime.mjs +43 -0
- package/marketplace/plugins/litcodex/skills/litresearch/SKILL.md +28 -41
- package/marketplace/plugins/litcodex/skills/litwork/SKILL.md +8 -0
- package/marketplace/plugins/litcodex/skills/litwork/references/delivery-playbook.md +6 -0
- package/node_modules/@litcodex/lit-loop/directive.md +90 -5
- package/node_modules/@litcodex/lit-loop/directives/lit-comprehend.md +13 -17
- package/node_modules/@litcodex/lit-loop/directives/litwork.md +8 -0
- package/node_modules/@litcodex/lit-loop/dist/codex-hook.js +8 -1
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.d.ts +8 -1
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +36 -4
- package/node_modules/@litcodex/lit-loop/dist/jev-hint.d.ts +112 -0
- package/node_modules/@litcodex/lit-loop/dist/jev-hint.js +522 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-route.d.ts +18 -0
- package/node_modules/@litcodex/lit-loop/dist/motion-route.js +95 -0
- package/node_modules/@litcodex/lit-loop/dist/skill-renames.d.ts +3 -1
- package/node_modules/@litcodex/lit-loop/dist/skill-renames.js +10 -5
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/browser-drive/SKILL.md +4 -0
- package/node_modules/@litcodex/lit-loop/skills/browser-drive/scripts/capability-probe.mjs +25 -2
- package/node_modules/@litcodex/lit-loop/skills/lit-comprehend/SKILL.md +45 -53
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/NOTICE +160 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/SKILL.md +146 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/always-on-rule.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/bench/prompts.md +73 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/after.md +13 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/report/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/motion-guide.md +123 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/prompt-injection-handling.md +7 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/rules.json +884 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/core.mjs +208 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/detect.mjs +83 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/extract_office_text.py +89 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-fixtures.mjs +155 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-humanizer/scripts/test-ko-metrics.mjs +27 -0
- package/node_modules/@litcodex/lit-loop/skills/lit-init/references/deep-repository-map.md +6 -10
- package/node_modules/@litcodex/lit-loop/skills/lit-loop/SKILL.md +95 -12
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +2 -0
- package/node_modules/@litcodex/lit-loop/skills/litresearch/SKILL.md +28 -41
- package/node_modules/@litcodex/lit-loop/skills/litwork/SKILL.md +8 -0
- package/package.json +2 -2
- package/readme-assets/ab-simple/assets/s11-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s11-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s3-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-baseline-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-desktop.webp +0 -0
- package/readme-assets/ab-simple/assets/s4-lit-phone.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s5-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s7-lit-diagram.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-baseline-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s8-lit-slides.webp +0 -0
- package/readme-assets/ab-simple/assets/s9-lit-pages.webp +0 -0
- package/readme-assets/badge-version.svg +1 -1
- package/readme-assets/cover-motion-still.webp +0 -0
- package/readme-assets/cover-motion.webp +0 -0
- package/readme-assets/skills/autoconference.webp +0 -0
- package/readme-assets/skills/automatic-checks.webp +0 -0
- package/readme-assets/skills/autoresearch.webp +0 -0
- package/readme-assets/skills/browser-drive.webp +0 -0
- package/readme-assets/skills/coding-session-audit.webp +0 -0
- package/readme-assets/skills/debugging.webp +0 -0
- package/readme-assets/skills/deep-interview.webp +0 -0
- package/readme-assets/skills/frontend-ui-ux.webp +0 -0
- package/readme-assets/skills/lit-burnoff-file.webp +0 -0
- package/readme-assets/skills/lit-burnoff.webp +0 -0
- package/readme-assets/skills/lit-code.webp +0 -0
- package/readme-assets/skills/lit-commit.webp +0 -0
- package/readme-assets/skills/lit-comprehend.webp +0 -0
- package/readme-assets/skills/lit-crucible.webp +0 -0
- package/readme-assets/skills/lit-diagram-drawer.webp +0 -0
- package/readme-assets/skills/lit-docx.webp +0 -0
- package/readme-assets/skills/lit-fetch.webp +0 -0
- package/readme-assets/skills/lit-handoff.webp +0 -0
- package/readme-assets/skills/lit-humanizer.webp +0 -0
- package/readme-assets/skills/lit-init.webp +0 -0
- package/readme-assets/skills/lit-loop.webp +0 -0
- package/readme-assets/skills/lit-plan.webp +0 -0
- package/readme-assets/skills/lit-pptx.webp +0 -0
- package/readme-assets/skills/lit-recap.webp +0 -0
- package/readme-assets/skills/lit-scientific-visualization.webp +0 -0
- package/readme-assets/skills/lit-team.webp +0 -0
- package/readme-assets/skills/lit-typographic-motion.webp +0 -0
- package/readme-assets/skills/litcodex-contribute-bug-fix.webp +0 -0
- package/readme-assets/skills/litcodex-doctor.webp +0 -0
- package/readme-assets/skills/litcodex-report-bug.webp +0 -0
- package/readme-assets/skills/litgoal.webp +0 -0
- package/readme-assets/skills/litresearch.webp +0 -0
- package/readme-assets/skills/litwork.webp +0 -0
- package/readme-assets/skills/lsp-setup.webp +0 -0
- package/readme-assets/skills/readme-studio.webp +0 -0
- package/readme-assets/skills/refactor.webp +0 -0
- package/readme-assets/skills/review-work.webp +0 -0
- package/readme-assets/skills/start-approved-plan.webp +0 -0
- package/readme-assets/skills/structural-search.webp +0 -0
- package/readme-assets/skills/visual-qa.webp +0 -0
- package/readme-assets/skills/wikify.webp +0 -0
- package/marketplace/plugins/litcodex/skills/lit-korean/SKILL.md +0 -206
- package/marketplace/plugins/litcodex/skills/lit-korean/references/prompt-injection-handling.md +0 -23
- package/marketplace/plugins/litcodex/skills/lit-korean/references/quick-rules.md +0 -38
- package/marketplace/plugins/litcodex/skills/lit-korean/references/safety-checklist.md +0 -38
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/SKILL.md +0 -206
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/prompt-injection-handling.md +0 -23
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/quick-rules.md +0 -38
- package/node_modules/@litcodex/lit-loop/skills/lit-korean/references/safety-checklist.md +0 -38
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
// Stage path, the browser side: the pre-flight scan of the model-authored stage folder, serving it
|
|
2
|
+
// on a synthetic origin with no listening socket, the product's font and kit routes, the capture
|
|
3
|
+
// session with the virtual-clock init script, and a worker pool that decodes and analyses frames
|
|
4
|
+
// while the next one is stepped. The orchestration (master, stills, determinism) is stage-render.mjs.
|
|
5
|
+
import { existsSync, lstatSync, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
6
|
+
import { availableParallelism } from "node:os";
|
|
7
|
+
import { extname, join, relative, sep } from "node:path";
|
|
8
|
+
import { Worker } from "node:worker_threads";
|
|
9
|
+
import { EXIT, Exit, INSTALL_COMMAND, STAGE_ORIGIN } from "./constants.mjs";
|
|
10
|
+
import { launchStage } from "./driver.mjs";
|
|
11
|
+
import { FONTS, fontPath, SKILL_ROOT } from "./fonts.mjs";
|
|
12
|
+
|
|
13
|
+
export const CONTENT_TYPES = Object.freeze({
|
|
14
|
+
".html": "text/html; charset=utf-8",
|
|
15
|
+
".js": "text/javascript; charset=utf-8",
|
|
16
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
17
|
+
".css": "text/css; charset=utf-8",
|
|
18
|
+
".svg": "image/svg+xml",
|
|
19
|
+
".png": "image/png",
|
|
20
|
+
".jpg": "image/jpeg",
|
|
21
|
+
".jpeg": "image/jpeg",
|
|
22
|
+
".webp": "image/webp",
|
|
23
|
+
".gif": "image/gif",
|
|
24
|
+
".wav": "audio/wav",
|
|
25
|
+
".woff": "font/woff",
|
|
26
|
+
".woff2": "font/woff2",
|
|
27
|
+
".ttf": "font/ttf",
|
|
28
|
+
".otf": "font/otf",
|
|
29
|
+
".json": "application/json",
|
|
30
|
+
});
|
|
31
|
+
const TEXT_TYPES = new Set([".html", ".js", ".mjs", ".css", ".svg", ".json"]);
|
|
32
|
+
const RASTER_TYPES = new Set([".png", ".jpg", ".jpeg", ".webp", ".gif"]);
|
|
33
|
+
export const RASTER_LIMITS = Object.freeze({ count: 24, bytes: 8 * 1024 * 1024, flipbook: 10 });
|
|
34
|
+
const NAMESPACES = /^https?:\/\/www\.w3\.org\/(?:2000\/svg|1999\/xlink|1999\/xhtml|XML\/1998\/namespace|2000\/xmlns\/?)$/u;
|
|
35
|
+
const ABSOLUTE_URL = /\bhttps?:\/\/[^\s"'()<>`]+/giu;
|
|
36
|
+
const PROTOCOL_RELATIVE = /(?:["'(=]\s*)(\/\/[a-z0-9-]+(?:\.[a-z0-9-]+)+[^\s"')]*)/giu;
|
|
37
|
+
const PREFETCH = /\brel\s*=\s*["']?\s*(?:preconnect|prefetch|dns-prefetch|prerender)\b/iu;
|
|
38
|
+
const FORBIDDEN_ELEMENT = /<\s*(video|audio|iframe|object|embed|frame)\b/iu;
|
|
39
|
+
const FORBIDDEN_API = /\bnew\s+Audio\s*\(|\b(?:webkit)?AudioContext\b|\bOfflineAudioContext\b|\bnew\s+(?:Shared)?Worker\s*\(|\bSharedWorker\b|\bserviceWorker\b/u;
|
|
40
|
+
const NETWORK_API = /\bWebSocket\b|\bWebTransport\b|\bRTCPeerConnection\b|\bEventSource\b/u;
|
|
41
|
+
|
|
42
|
+
const inside = (root, path) => path === root || path.startsWith(root + sep);
|
|
43
|
+
|
|
44
|
+
/** Pixel size of a PNG, JPEG, WebP or GIF, and whether it is animated; null when unreadable. */
|
|
45
|
+
export function rasterInfo(bytes, ext) {
|
|
46
|
+
if (ext === ".png" && bytes.length > 24) {
|
|
47
|
+
let animated = false;
|
|
48
|
+
for (let o = 8; o + 8 <= bytes.length; ) {
|
|
49
|
+
const length = bytes.readUInt32BE(o);
|
|
50
|
+
const type = bytes.toString("ascii", o + 4, o + 8);
|
|
51
|
+
if (type === "acTL") animated = true;
|
|
52
|
+
if (type === "IDAT") break;
|
|
53
|
+
o += 12 + length;
|
|
54
|
+
}
|
|
55
|
+
return { width: bytes.readUInt32BE(16), height: bytes.readUInt32BE(20), animated };
|
|
56
|
+
}
|
|
57
|
+
if (ext === ".gif" && bytes.length > 10) {
|
|
58
|
+
let frames = 0;
|
|
59
|
+
for (let i = 13; i < bytes.length - 1; i++) if (bytes[i] === 0x21 && bytes[i + 1] === 0xf9) frames++;
|
|
60
|
+
return { width: bytes.readUInt16LE(6), height: bytes.readUInt16LE(8), animated: frames > 1 || bytes.includes(Buffer.from("NETSCAPE2.0")) };
|
|
61
|
+
}
|
|
62
|
+
if (ext === ".webp" && bytes.length > 30) {
|
|
63
|
+
const kind = bytes.toString("ascii", 12, 16);
|
|
64
|
+
const animated = bytes.includes(Buffer.from("ANIM")) || (kind === "VP8X" && (bytes[20] & 0x02) !== 0);
|
|
65
|
+
if (kind === "VP8X") return { width: 1 + bytes.readUIntLE(24, 3), height: 1 + bytes.readUIntLE(27, 3), animated };
|
|
66
|
+
if (kind === "VP8L") {
|
|
67
|
+
const b = bytes.readUInt32LE(21);
|
|
68
|
+
return { width: (b & 0x3fff) + 1, height: ((b >> 14) & 0x3fff) + 1, animated };
|
|
69
|
+
}
|
|
70
|
+
return { width: bytes.readUInt16LE(26) & 0x3fff, height: bytes.readUInt16LE(28) & 0x3fff, animated };
|
|
71
|
+
}
|
|
72
|
+
if ((ext === ".jpg" || ext === ".jpeg") && bytes.length > 4) {
|
|
73
|
+
for (let o = 2; o + 9 < bytes.length; ) {
|
|
74
|
+
if (bytes[o] !== 0xff) return null;
|
|
75
|
+
const marker = bytes[o + 1];
|
|
76
|
+
const length = bytes.readUInt16BE(o + 2);
|
|
77
|
+
if (marker >= 0xc0 && marker <= 0xcf && ![0xc4, 0xc8, 0xcc].includes(marker)) return { width: bytes.readUInt16BE(o + 7), height: bytes.readUInt16BE(o + 5), animated: false };
|
|
78
|
+
o += 2 + length;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Pre-flight scan of the stage folder before any browser starts. Returns the file list and the
|
|
86
|
+
* raster URLs to decode; throws Exit 17 (contract) or 19 (network) naming the file and the reason.
|
|
87
|
+
*/
|
|
88
|
+
export function scanStage(stageDir) {
|
|
89
|
+
if (!existsSync(join(stageDir, "index.html"))) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: no stage/index.html in ${stageDir}; author the page first (references/stage.md)`);
|
|
90
|
+
const root = realpathSync(stageDir);
|
|
91
|
+
const files = [];
|
|
92
|
+
const pending = [root];
|
|
93
|
+
while (pending.length) {
|
|
94
|
+
const dir = pending.pop();
|
|
95
|
+
for (const name of readdirSync(dir).sort()) {
|
|
96
|
+
const path = join(dir, name);
|
|
97
|
+
const rel = relative(root, path);
|
|
98
|
+
const link = lstatSync(path);
|
|
99
|
+
const real = realpathSync(path);
|
|
100
|
+
if (!inside(root, real)) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${rel} is a link that leaves the stage folder`);
|
|
101
|
+
if (name === "node_modules") throw new Exit(EXIT.STAGE_CONTRACT_ERROR, "STAGE_CONTRACT_ERROR: stage/node_modules found; the page uses the kit and its own code, never installed or copied libraries");
|
|
102
|
+
if (statSync(real).isDirectory()) {
|
|
103
|
+
if (!link.isSymbolicLink()) pending.push(path);
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const ext = extname(name).toLowerCase();
|
|
107
|
+
if (!CONTENT_TYPES[ext]) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${rel} is not an allowed stage asset (${Object.keys(CONTENT_TYPES).join(" ")})`);
|
|
108
|
+
files.push({ rel, path: real, ext, bytes: statSync(real).size });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const rasters = [];
|
|
112
|
+
for (const file of files) {
|
|
113
|
+
if (TEXT_TYPES.has(file.ext)) {
|
|
114
|
+
const text = readFileSync(file.path, "utf8");
|
|
115
|
+
for (const match of text.matchAll(ABSOLUTE_URL)) {
|
|
116
|
+
const url = match[0].replace(/[.,;:]+$/u, "");
|
|
117
|
+
if (!NAMESPACES.test(url)) throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: ${file.rel} names an external URL (${url}); every asset must be a local file in stage/`);
|
|
118
|
+
}
|
|
119
|
+
const relativeUrl = PROTOCOL_RELATIVE.exec(text);
|
|
120
|
+
PROTOCOL_RELATIVE.lastIndex = 0;
|
|
121
|
+
if (relativeUrl) throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: ${file.rel} names a protocol-relative URL (${relativeUrl[1]})`);
|
|
122
|
+
if (PREFETCH.test(text)) throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: ${file.rel} has a preconnect or prefetch link`);
|
|
123
|
+
const element = FORBIDDEN_ELEMENT.exec(text);
|
|
124
|
+
if (element && (file.ext === ".html" || file.ext === ".svg")) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${file.rel} uses <${element[1].toLowerCase()}>; draw the film on the page instead`);
|
|
125
|
+
const socket = NETWORK_API.exec(text);
|
|
126
|
+
if (socket && file.ext !== ".css" && file.ext !== ".json") throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: ${file.rel} uses ${socket[0]}; a stage page never opens a connection`);
|
|
127
|
+
const api = FORBIDDEN_API.exec(text);
|
|
128
|
+
if (api && file.ext !== ".css" && file.ext !== ".json") throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${file.rel} uses ${api[0].trim()}, which a stage page may not use (sound comes from the treatment's sound plan)`);
|
|
129
|
+
}
|
|
130
|
+
if (RASTER_TYPES.has(file.ext)) {
|
|
131
|
+
const info = rasterInfo(readFileSync(file.path), file.ext);
|
|
132
|
+
if (info?.animated) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${file.rel} is an animated raster; rasters are textures and stills, never a frame sequence`);
|
|
133
|
+
rasters.push({ ...file, size: info ? `${info.width}x${info.height}` : "unknown" });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (rasters.length > RASTER_LIMITS.count) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${rasters.length} raster images; at most ${RASTER_LIMITS.count}`);
|
|
137
|
+
const rasterBytes = rasters.reduce((sum, r) => sum + r.bytes, 0);
|
|
138
|
+
if (rasterBytes > RASTER_LIMITS.bytes) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: raster images total ${rasterBytes} bytes; at most 8 MB`);
|
|
139
|
+
const bySize = new Map();
|
|
140
|
+
for (const r of rasters) bySize.set(r.size, (bySize.get(r.size) ?? 0) + 1);
|
|
141
|
+
for (const [size, count] of bySize) if (size !== "unknown" && count >= RASTER_LIMITS.flipbook) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: ${count} rasters of ${size} look like a flipbook; animate with the page, not a frame sequence`);
|
|
142
|
+
return { root, files, rasters: rasters.map((r) => `/${r.rel.split(sep).join("/")}`) };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const FONT_FORMAT = { ".ttf": "truetype", ".otf": "opentype", ".woff": "woff", ".woff2": "woff2" };
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The product's verified faces as @font-face rules (font-display: block) plus a route table. Every
|
|
149
|
+
* face is sha256-checked by the caller first; an unwarmed cache exits 14 before this runs.
|
|
150
|
+
*/
|
|
151
|
+
export function fontRoutes(cacheDir) {
|
|
152
|
+
const routes = new Map();
|
|
153
|
+
const rules = [];
|
|
154
|
+
for (const entry of FONTS) {
|
|
155
|
+
const ext = extname(entry.path).toLowerCase();
|
|
156
|
+
const url = `/lit/fonts/${entry.key}${ext}`;
|
|
157
|
+
routes.set(url, { file: fontPath(entry, cacheDir), type: CONTENT_TYPES[ext] });
|
|
158
|
+
const stretch = entry.width ? `\n\tfont-stretch: ${entry.width}%;` : "";
|
|
159
|
+
rules.push(`@font-face {\n\tfont-family: "${entry.family}";\n\tsrc: url("${url}") format("${FONT_FORMAT[ext]}");\n\tfont-weight: ${entry.weight};${stretch}\n\tfont-style: normal;\n\tfont-display: block;\n}`);
|
|
160
|
+
}
|
|
161
|
+
return { css: `${rules.join("\n")}\n`, routes, families: [...new Set(FONTS.map((f) => f.family))] };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** The product's faces a stage render needs: missing files exit 14, a mismatched pin exits 15. */
|
|
165
|
+
export function stageFontFaults(faults) {
|
|
166
|
+
const missing = faults.filter((f) => f.fault === "missing" || f.fault === "licence file missing");
|
|
167
|
+
if (missing.length) throw new Exit(EXIT.BLOCKED_DEPS_NOT_PREWARMED, `BLOCKED_DEPS_NOT_PREWARMED: ${missing.map((f) => `${f.key} ${f.fault}`).join("; ")}. Run \`${INSTALL_COMMAND}\` outside the sandboxed session, then rerun.`);
|
|
168
|
+
if (faults.length) throw new Exit(EXIT.BLOCKED_FONT_FETCH, `BLOCKED_FONT_FETCH: ${faults.map((f) => `${f.key} ${f.fault}`).join("; ")}. Run \`${INSTALL_COMMAND}\` outside the sandboxed session; a mismatched font is never re-fetched mid-render.`);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Route every request. Only the synthetic origin is served: the kit, fonts.css, the faces, and
|
|
173
|
+
* files whose realpath lies inside the stage folder. Anything else is refused and recorded.
|
|
174
|
+
*/
|
|
175
|
+
export function stageRouter({ root, fonts, record }) {
|
|
176
|
+
const kit = readFileSync(join(SKILL_ROOT, "engine", "stage-kit.js"));
|
|
177
|
+
return async (route) => {
|
|
178
|
+
const url = route.request().url();
|
|
179
|
+
if (!url.startsWith(`${STAGE_ORIGIN}/`)) {
|
|
180
|
+
record.blocked.push(url);
|
|
181
|
+
return route.abort("blockedbyclient");
|
|
182
|
+
}
|
|
183
|
+
const raw = new URL(url).pathname;
|
|
184
|
+
let path;
|
|
185
|
+
try {
|
|
186
|
+
path = decodeURIComponent(raw);
|
|
187
|
+
} catch {
|
|
188
|
+
record.rejected.push(raw);
|
|
189
|
+
return route.fulfill({ status: 400, body: "" });
|
|
190
|
+
}
|
|
191
|
+
if (path === "/lit/stage-kit.js") return route.fulfill({ status: 200, contentType: CONTENT_TYPES[".js"], body: kit });
|
|
192
|
+
if (path === "/lit/fonts.css") return route.fulfill({ status: 200, contentType: CONTENT_TYPES[".css"], body: fonts.css });
|
|
193
|
+
const font = fonts.routes.get(path);
|
|
194
|
+
if (font) return route.fulfill({ status: 200, contentType: font.type, body: readFileSync(font.file) });
|
|
195
|
+
const rel = path === "/" ? "index.html" : path.replace(/^\/+/u, "");
|
|
196
|
+
if (rel.split("/").some((part) => part === "..")) {
|
|
197
|
+
record.rejected.push(path);
|
|
198
|
+
return route.fulfill({ status: 403, body: "" });
|
|
199
|
+
}
|
|
200
|
+
const target = join(root, ...rel.split("/"));
|
|
201
|
+
if (!existsSync(target)) {
|
|
202
|
+
if (rel !== "favicon.ico") record.missing.push(path);
|
|
203
|
+
return route.fulfill({ status: 404, body: "" });
|
|
204
|
+
}
|
|
205
|
+
const real = realpathSync(target);
|
|
206
|
+
if (!inside(root, real) || !statSync(real).isFile()) {
|
|
207
|
+
record.rejected.push(path);
|
|
208
|
+
return route.fulfill({ status: 403, body: "" });
|
|
209
|
+
}
|
|
210
|
+
const type = CONTENT_TYPES[extname(real).toLowerCase()];
|
|
211
|
+
if (!type) {
|
|
212
|
+
record.rejected.push(path);
|
|
213
|
+
return route.fulfill({ status: 403, body: "" });
|
|
214
|
+
}
|
|
215
|
+
return route.fulfill({ status: 200, contentType: type, body: readFileSync(real) });
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const INIT = () => readFileSync(join(SKILL_ROOT, "engine", "stage-init.js"), "utf8");
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Open one stage session: launch, route, inject the clock, load the page, load every face and
|
|
223
|
+
* decode every raster. Returns the session and the page's declared contract.
|
|
224
|
+
*/
|
|
225
|
+
export async function openStage({ runtime, outDir, scan, fonts, width, height, fps, seed, extraInit = null }) {
|
|
226
|
+
const session = await launchStage({ runtime, outDir, width, height });
|
|
227
|
+
const record = { blocked: [], rejected: [], missing: [], pageErrors: [], console: [] };
|
|
228
|
+
session.record = record;
|
|
229
|
+
try {
|
|
230
|
+
await session.context.route("**/*", stageRouter({ root: scan.root, fonts, record }));
|
|
231
|
+
await session.context.addInitScript({ content: INIT().replaceAll("__LIT_STAGE_CONFIG__", JSON.stringify({ fps, seed })) });
|
|
232
|
+
if (extraInit) await session.context.addInitScript({ content: extraInit });
|
|
233
|
+
session.page.on("pageerror", (error) => record.pageErrors.push(error.message));
|
|
234
|
+
session.page.on("console", (message) => {
|
|
235
|
+
if (message.type() === "error") record.console.push(message.text());
|
|
236
|
+
});
|
|
237
|
+
await session.page.goto(`${STAGE_ORIGIN}/index.html`, { waitUntil: "load", timeout: 60000 });
|
|
238
|
+
session.cdp = await session.context.newCDPSession(session.page);
|
|
239
|
+
session.contract = await session.page.evaluate(async (images) => {
|
|
240
|
+
await Promise.all([...document.fonts].map((face) => face.load().catch(() => {})));
|
|
241
|
+
return window.__litClock.prepare({ images });
|
|
242
|
+
}, scan.rasters);
|
|
243
|
+
return session;
|
|
244
|
+
} catch (error) {
|
|
245
|
+
await closeStage(session);
|
|
246
|
+
throw error;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export async function closeStage(session) {
|
|
251
|
+
await session?.context?.close().catch(() => {});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** Raise the named exit for anything the page did that the contract forbids. */
|
|
255
|
+
export async function assertClean(session) {
|
|
256
|
+
const { record } = session;
|
|
257
|
+
if (record.blocked.length) throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: the page requested ${record.blocked[0]}${record.blocked.length > 1 ? ` and ${record.blocked.length - 1} more` : ""}; every asset must be a local file in stage/`);
|
|
258
|
+
if (record.rejected.length) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: the page requested ${record.rejected[0]}, which is outside the stage folder or not an allowed asset`);
|
|
259
|
+
const report = await session.page.evaluate(() => window.__litClock.report());
|
|
260
|
+
const network = report.violations.filter((v) => v.kind === "network");
|
|
261
|
+
if (network.length) throw new Exit(EXIT.STAGE_NETWORK_REQUEST, `STAGE_NETWORK_REQUEST: the page used ${network.map((v) => v.name).join(", ")}; a stage page never opens a connection`);
|
|
262
|
+
if (report.violations.length) throw new Exit(EXIT.STAGE_CONTRACT_ERROR, `STAGE_CONTRACT_ERROR: the page used ${report.violations.map((v) => v.name).join(", ")}, which a stage page may not use`);
|
|
263
|
+
if (report.webgl && !report.webgl.ok) throw new Exit(EXIT.BLOCKED_NO_WEBGL2, "BLOCKED_NO_WEBGL2: the page requested a WebGL context and the software rung returned none");
|
|
264
|
+
return report;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** Step the clock to output frame f (settle waits two native frames before a capture). */
|
|
268
|
+
export async function stepFrame(session, f, settle = true) {
|
|
269
|
+
return session.page.evaluate(({ frame, wait }) => window.__litClock.frame(frame, { settle: wait }), { frame: f, wait: settle });
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** Capture the viewport exactly as composited: PNG, from the surface, clipped at scale 1. */
|
|
273
|
+
export async function capture(session, width, height) {
|
|
274
|
+
const shot = await session.cdp.send("Page.captureScreenshot", { format: "png", optimizeForSpeed: true, captureBeyondViewport: false, fromSurface: true, clip: { x: 0, y: 0, width, height, scale: 1 } });
|
|
275
|
+
return Buffer.from(shot.data, "base64");
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** Worker threads that decode and analyse captured PNGs; results come back in submission order. */
|
|
279
|
+
export class DecodePool {
|
|
280
|
+
constructor(size = Math.max(2, Math.min(6, availableParallelism() - 2))) {
|
|
281
|
+
this.workers = Array.from({ length: size }, () => new Worker(new URL("./stage-worker.mjs", import.meta.url)));
|
|
282
|
+
this.next = 0;
|
|
283
|
+
this.id = 0;
|
|
284
|
+
this.waiting = new Map();
|
|
285
|
+
for (const worker of this.workers) {
|
|
286
|
+
worker.on("message", (message) => {
|
|
287
|
+
const waiter = this.waiting.get(message.id);
|
|
288
|
+
this.waiting.delete(message.id);
|
|
289
|
+
if (message.error) waiter.reject(new Error(message.error));
|
|
290
|
+
else waiter.resolve(message);
|
|
291
|
+
});
|
|
292
|
+
worker.on("error", (error) => {
|
|
293
|
+
for (const waiter of this.waiting.values()) waiter.reject(error);
|
|
294
|
+
this.waiting.clear();
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
decode(png, { analyze = false, preview = null } = {}) {
|
|
300
|
+
const id = this.id++;
|
|
301
|
+
const worker = this.workers[this.next++ % this.workers.length];
|
|
302
|
+
return new Promise((resolve, reject) => {
|
|
303
|
+
this.waiting.set(id, { resolve, reject });
|
|
304
|
+
worker.postMessage({ id, png, analyze, preview });
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
async close() {
|
|
309
|
+
await Promise.all(this.workers.map((worker) => worker.terminate()));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
// Single-stroke plotter type from the five EMS SVG fonts (MO-FT-08), written progressively by a
|
|
2
|
+
// pen whose travel follows the timeline's own character timing. Method adapted from the credited
|
|
3
|
+
// engine's stroke module; the Hershey faces are excluded and never loaded.
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { SKILL_ROOT, STROKE_FONTS } from "./fonts.mjs";
|
|
7
|
+
|
|
8
|
+
const ENTITY = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'" };
|
|
9
|
+
const decode = (value) =>
|
|
10
|
+
value.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/giu, (_, name) =>
|
|
11
|
+
name[0] === "#"
|
|
12
|
+
? String.fromCodePoint(name[1].toLowerCase() === "x" ? Number.parseInt(name.slice(2), 16) : Number(name.slice(1)))
|
|
13
|
+
: (ENTITY[name] ?? `&${name};`),
|
|
14
|
+
);
|
|
15
|
+
const attr = (tag, name) => new RegExp(`\\s${name}="([^"]*)"`, "u").exec(tag)?.[1];
|
|
16
|
+
|
|
17
|
+
/** Flatten an SVG path (absolute M, L, C) into polylines in font units, y up. */
|
|
18
|
+
export function flattenPath(d, curveSteps = 8) {
|
|
19
|
+
const tokens = d.match(/[MLCmlc]|-?\d*\.?\d+(?:e[-+]?\d+)?/giu) ?? [];
|
|
20
|
+
const strokes = [];
|
|
21
|
+
let current = null;
|
|
22
|
+
let command = "M";
|
|
23
|
+
let x = 0;
|
|
24
|
+
let y = 0;
|
|
25
|
+
let i = 0;
|
|
26
|
+
const num = () => Number.parseFloat(tokens[i++]);
|
|
27
|
+
while (i < tokens.length) {
|
|
28
|
+
if (/^[MLC]$/iu.test(tokens[i])) {
|
|
29
|
+
command = tokens[i++].toUpperCase();
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (command === "M") {
|
|
33
|
+
x = num();
|
|
34
|
+
y = num();
|
|
35
|
+
current = [[x, y]];
|
|
36
|
+
strokes.push(current);
|
|
37
|
+
command = "L";
|
|
38
|
+
} else if (command === "L") {
|
|
39
|
+
x = num();
|
|
40
|
+
y = num();
|
|
41
|
+
current?.push([x, y]);
|
|
42
|
+
} else {
|
|
43
|
+
const [x1, y1, x2, y2, x3, y3] = [num(), num(), num(), num(), num(), num()];
|
|
44
|
+
for (let s = 1; s <= curveSteps; s++) {
|
|
45
|
+
const t = s / curveSteps;
|
|
46
|
+
const u = 1 - t;
|
|
47
|
+
current?.push([
|
|
48
|
+
u * u * u * x + 3 * u * u * t * x1 + 3 * u * t * t * x2 + t * t * t * x3,
|
|
49
|
+
u * u * u * y + 3 * u * u * t * y1 + 3 * u * t * t * y2 + t * t * t * y3,
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
x = x3;
|
|
53
|
+
y = y3;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return strokes.filter((stroke) => stroke.length > 0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function parseStrokeFont(svg) {
|
|
60
|
+
const face = /<font-face[^>]*>/u.exec(svg)?.[0] ?? "";
|
|
61
|
+
const fontTag = /<font\s[^>]*>/u.exec(svg)?.[0] ?? "";
|
|
62
|
+
const defaultAdvance = Number(attr(fontTag, "horiz-adv-x") ?? 500);
|
|
63
|
+
const glyphs = new Map();
|
|
64
|
+
for (const match of svg.matchAll(/<glyph\b[^>]*>/gu)) {
|
|
65
|
+
const tag = match[0];
|
|
66
|
+
const unicode = attr(tag, "unicode");
|
|
67
|
+
if (unicode === undefined) continue;
|
|
68
|
+
glyphs.set(decode(unicode), {
|
|
69
|
+
advance: Number(attr(tag, "horiz-adv-x") ?? defaultAdvance),
|
|
70
|
+
strokes: flattenPath(attr(tag, "d") ?? ""),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const font = { upm: Number(attr(face, "units-per-em") ?? 1000), defaultAdvance, glyphs, kern: new Map() };
|
|
74
|
+
addTypographicGlyphs(font);
|
|
75
|
+
const H = inkBox(glyphs.get("H")?.strokes ?? [[[0, 0], [0, 700]]]);
|
|
76
|
+
const xg = inkBox(glyphs.get("x")?.strokes ?? [[[0, 0], [0, 450]]]);
|
|
77
|
+
font.capTop = H[3];
|
|
78
|
+
font.xTop = xg[3];
|
|
79
|
+
font.baseline = H[1];
|
|
80
|
+
return font;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function inkBox(strokes) {
|
|
84
|
+
let box = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY];
|
|
85
|
+
for (const stroke of strokes)
|
|
86
|
+
for (const [x, y] of stroke) box = [Math.min(box[0], x), Math.min(box[1], y), Math.max(box[2], x), Math.max(box[3], y)];
|
|
87
|
+
return box;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** Curly quotes and an ellipsis built from the face's own ' and . glyphs. */
|
|
91
|
+
function addTypographicGlyphs(font) {
|
|
92
|
+
const quote = font.glyphs.get("'");
|
|
93
|
+
const dot = font.glyphs.get(".");
|
|
94
|
+
if (quote?.strokes.length) {
|
|
95
|
+
const b = inkBox(quote.strokes);
|
|
96
|
+
const cx = (b[0] + b[2]) / 2;
|
|
97
|
+
const cy = (b[1] + b[3]) / 2;
|
|
98
|
+
const turned = { advance: quote.advance, strokes: quote.strokes.map((s) => s.map(([x, y]) => [2 * cx - x, 2 * cy - y])) };
|
|
99
|
+
const double = (g) => {
|
|
100
|
+
const shift = b[2] - b[0] + 0.07 * font.upm;
|
|
101
|
+
return { advance: g.advance + shift, strokes: [...g.strokes, ...g.strokes.map((s) => s.map(([x, y]) => [x + shift, y]))] };
|
|
102
|
+
};
|
|
103
|
+
if (!font.glyphs.has("’")) font.glyphs.set("’", quote);
|
|
104
|
+
if (!font.glyphs.has("‘")) font.glyphs.set("‘", turned);
|
|
105
|
+
if (!font.glyphs.has("”")) font.glyphs.set("”", double(quote));
|
|
106
|
+
if (!font.glyphs.has("“")) font.glyphs.set("“", double(turned));
|
|
107
|
+
}
|
|
108
|
+
if (dot && !font.glyphs.has("…")) {
|
|
109
|
+
const step = dot.advance * 0.72;
|
|
110
|
+
font.glyphs.set("…", {
|
|
111
|
+
advance: dot.advance + 2 * step,
|
|
112
|
+
strokes: [0, 1, 2].flatMap((k) => dot.strokes.map((s) => s.map(([x, y]) => [x + k * step, y]))),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Optical pair kerning for the disconnected faces: shapes that leave a hole (overhangs, diagonals)
|
|
118
|
+
// move in part of the way toward the face's own n/o spacing over the shared x-height or cap zone,
|
|
119
|
+
// never by more than 0.12 em. Connected scripts are never kerned.
|
|
120
|
+
const OPEN_RIGHT = new Set("AFLPTVWYKXfrvwyk7'\"’”");
|
|
121
|
+
const OPEN_LEFT = new Set("AJTVWYXvwyj.,'\"’”…");
|
|
122
|
+
const BANDS = 60;
|
|
123
|
+
|
|
124
|
+
function profile(font, char) {
|
|
125
|
+
const glyph = font.glyphs.get(char);
|
|
126
|
+
if (!glyph?.strokes.length) return null;
|
|
127
|
+
const lo = -0.3 * font.upm;
|
|
128
|
+
const dy = (1.3 * font.upm) / BANDS;
|
|
129
|
+
const left = new Float64Array(BANDS).fill(Number.NaN);
|
|
130
|
+
const right = new Float64Array(BANDS).fill(Number.NaN);
|
|
131
|
+
const put = (x, y) => {
|
|
132
|
+
const band = Math.floor((y - lo) / dy);
|
|
133
|
+
if (band < 0 || band >= BANDS) return;
|
|
134
|
+
if (!(left[band] <= x)) left[band] = x;
|
|
135
|
+
if (!(right[band] >= x)) right[band] = x;
|
|
136
|
+
};
|
|
137
|
+
for (const stroke of glyph.strokes)
|
|
138
|
+
for (let k = 0; k < stroke.length; k++) {
|
|
139
|
+
put(stroke[k][0], stroke[k][1]);
|
|
140
|
+
if (k === 0) continue;
|
|
141
|
+
const [ax, ay] = stroke[k - 1];
|
|
142
|
+
const [bx, by] = stroke[k];
|
|
143
|
+
const n = Math.max(1, Math.ceil(Math.hypot(bx - ax, by - ay) / (dy * 0.4)));
|
|
144
|
+
for (let j = 1; j < n; j++) put(ax + ((bx - ax) * j) / n, ay + ((by - ay) * j) / n);
|
|
145
|
+
}
|
|
146
|
+
return { left, right, lo, dy };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function approach(font, a, b, top) {
|
|
150
|
+
const pa = profile(font, a);
|
|
151
|
+
const pb = profile(font, b);
|
|
152
|
+
if (!pa || !pb) return null;
|
|
153
|
+
const advance = font.glyphs.get(a).advance;
|
|
154
|
+
let min = Number.POSITIVE_INFINITY;
|
|
155
|
+
const from = Math.max(0, Math.floor((font.baseline - pa.lo) / pa.dy));
|
|
156
|
+
const to = Math.min(BANDS - 1, Math.floor((top - pa.lo) / pa.dy));
|
|
157
|
+
for (let band = from; band <= to; band++) {
|
|
158
|
+
if (!Number.isNaN(pa.right[band]) && !Number.isNaN(pb.left[band])) min = Math.min(min, advance + pb.left[band] - pa.right[band]);
|
|
159
|
+
}
|
|
160
|
+
return Number.isFinite(min) ? min : null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function pairKern(font, a, b) {
|
|
164
|
+
if (a === " " || b === " " || !(OPEN_RIGHT.has(a) || OPEN_LEFT.has(b))) return 0;
|
|
165
|
+
const key = a + b;
|
|
166
|
+
if (font.kern.has(key)) return font.kern.get(key);
|
|
167
|
+
const lower = a !== a.toUpperCase() || b !== b.toUpperCase();
|
|
168
|
+
const top = lower ? font.xTop : font.capTop;
|
|
169
|
+
const reference = ["no", "on", "nn", "oo"].map((p) => approach(font, p[0], p[1], font.xTop) ?? 0);
|
|
170
|
+
const target = reference.reduce((s, v) => s + v, 0) / reference.length;
|
|
171
|
+
const gap = approach(font, a, b, top);
|
|
172
|
+
const kern = gap === null ? 0 : Math.max(-0.12 * font.upm, Math.min(0, 0.6 * (target - gap)));
|
|
173
|
+
font.kern.set(key, kern);
|
|
174
|
+
return kern;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const cache = new Map();
|
|
178
|
+
export function loadStrokeFont(key) {
|
|
179
|
+
if (!cache.has(key)) {
|
|
180
|
+
const entry = STROKE_FONTS.find((item) => item.key === key);
|
|
181
|
+
if (!entry) throw new Error(`unknown stroke font: ${key}`);
|
|
182
|
+
cache.set(key, { ...parseStrokeFont(readFileSync(join(SKILL_ROOT, entry.file), "utf8")), key, connected: entry.connected, file: entry.file });
|
|
183
|
+
}
|
|
184
|
+
return cache.get(key);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Lay out text in a stroke face at `sizePx` (em size). Returns polylines in px (origin left
|
|
189
|
+
* baseline, y down), per-character length ranges for pen timing, and the ink box.
|
|
190
|
+
*/
|
|
191
|
+
export function strokeText(font, text, sizePx, trackingPx = 0) {
|
|
192
|
+
const scale = sizePx / font.upm;
|
|
193
|
+
const chars = Array.from(text);
|
|
194
|
+
const strokes = [];
|
|
195
|
+
const owner = [];
|
|
196
|
+
let x = 0;
|
|
197
|
+
for (let i = 0; i < chars.length; i++) {
|
|
198
|
+
const glyph = font.glyphs.get(chars[i]);
|
|
199
|
+
for (const stroke of glyph?.strokes ?? []) {
|
|
200
|
+
strokes.push(stroke.map(([gx, gy]) => [x + gx * scale, -gy * scale]));
|
|
201
|
+
owner.push(i);
|
|
202
|
+
}
|
|
203
|
+
x += (glyph?.advance ?? font.defaultAdvance) * scale + trackingPx;
|
|
204
|
+
if (!font.connected && i + 1 < chars.length) x += pairKern(font, chars[i], chars[i + 1]) * scale;
|
|
205
|
+
}
|
|
206
|
+
const lengths = strokes.map((stroke) => {
|
|
207
|
+
const acc = [0];
|
|
208
|
+
for (let k = 1; k < stroke.length; k++) acc.push(acc[k - 1] + Math.hypot(stroke[k][0] - stroke[k - 1][0], stroke[k][1] - stroke[k - 1][1]));
|
|
209
|
+
return acc;
|
|
210
|
+
});
|
|
211
|
+
const starts = [];
|
|
212
|
+
let total = 0;
|
|
213
|
+
for (const acc of lengths) {
|
|
214
|
+
starts.push(total);
|
|
215
|
+
total += acc[acc.length - 1];
|
|
216
|
+
}
|
|
217
|
+
const charRange = chars.map(() => [Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]);
|
|
218
|
+
strokes.forEach((_, k) => {
|
|
219
|
+
const range = charRange[owner[k]];
|
|
220
|
+
range[0] = Math.min(range[0], starts[k]);
|
|
221
|
+
range[1] = Math.max(range[1], starts[k] + lengths[k][lengths[k].length - 1]);
|
|
222
|
+
});
|
|
223
|
+
let last = 0;
|
|
224
|
+
for (const range of charRange) {
|
|
225
|
+
if (!Number.isFinite(range[0])) range.splice(0, 2, last, last);
|
|
226
|
+
last = range[1];
|
|
227
|
+
}
|
|
228
|
+
const box = strokes.length ? inkBox(strokes) : [0, 0, 0, 0];
|
|
229
|
+
return { text, sizePx, strokes, starts, lengths, total, charRange, width: x - trackingPx, ink: box, capHeight: font.capTop * scale, missing: chars.filter((c) => c !== " " && !font.glyphs.has(c)) };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Pen travel at time t from per-character [start, end] times (MO-A-08 method, any timing tier). */
|
|
233
|
+
export function writtenLength(layout, charTimes, t) {
|
|
234
|
+
let length = 0;
|
|
235
|
+
for (let i = 0; i < layout.charRange.length; i++) {
|
|
236
|
+
const [a, b] = layout.charRange[i];
|
|
237
|
+
const [t0, t1] = charTimes[i] ?? [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY];
|
|
238
|
+
if (t >= t1) length = b;
|
|
239
|
+
else if (t > t0) return a + (b - a) * ((t - t0) / Math.max(1e-3, t1 - t0));
|
|
240
|
+
else break;
|
|
241
|
+
}
|
|
242
|
+
return length;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/** The first `length` px of every stroke, as flat [x, y, x, y, ...] arrays offset by (ox, oy). */
|
|
246
|
+
export function partialStrokes(layout, length, ox, oy) {
|
|
247
|
+
const out = [];
|
|
248
|
+
for (let k = 0; k < layout.strokes.length; k++) {
|
|
249
|
+
const start = layout.starts[k];
|
|
250
|
+
if (start >= length) break;
|
|
251
|
+
const stroke = layout.strokes[k];
|
|
252
|
+
const acc = layout.lengths[k];
|
|
253
|
+
const remain = length - start;
|
|
254
|
+
const flat = [ox + stroke[0][0], oy + stroke[0][1]];
|
|
255
|
+
let j = 1;
|
|
256
|
+
for (; j < stroke.length && acc[j] <= remain; j++) flat.push(ox + stroke[j][0], oy + stroke[j][1]);
|
|
257
|
+
if (j < stroke.length) {
|
|
258
|
+
const u = (remain - acc[j - 1]) / Math.max(1e-6, acc[j] - acc[j - 1]);
|
|
259
|
+
flat.push(ox + stroke[j - 1][0] + (stroke[j][0] - stroke[j - 1][0]) * u, oy + stroke[j - 1][1] + (stroke[j][1] - stroke[j - 1][1]) * u);
|
|
260
|
+
}
|
|
261
|
+
out.push(flat);
|
|
262
|
+
}
|
|
263
|
+
return out;
|
|
264
|
+
}
|