@litfamily/litclaude 1.0.10 → 1.0.13
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/CHANGELOG.md +36 -0
- package/README.md +436 -45
- package/README_ko-KR.md +403 -17
- package/bin/install-ownership.mjs +155 -18
- package/bin/litclaude-ai.js +91 -9
- package/docs/ab/S11-baseline-desktop.webp +0 -0
- package/docs/ab/S11-baseline-phone.webp +0 -0
- package/docs/ab/S11-litclaude-desktop.webp +0 -0
- package/docs/ab/S11-litclaude-phone.webp +0 -0
- package/docs/ab/S3-baseline-desktop.webp +0 -0
- package/docs/ab/S3-baseline-phone.webp +0 -0
- package/docs/ab/S3-litclaude-desktop.webp +0 -0
- package/docs/ab/S3-litclaude-phone.webp +0 -0
- package/docs/ab/S4-baseline-desktop.webp +0 -0
- package/docs/ab/S4-baseline-phone.webp +0 -0
- package/docs/ab/S4-litclaude-desktop.webp +0 -0
- package/docs/ab/S4-litclaude-phone.webp +0 -0
- package/docs/ab/S5-baseline-pages.webp +0 -0
- package/docs/ab/S5-baseline-slides.webp +0 -0
- package/docs/ab/S5-litclaude-pages.webp +0 -0
- package/docs/ab/S5-litclaude-slides.webp +0 -0
- package/docs/ab/S7-litclaude-diagram.webp +0 -0
- package/docs/ab/S8-baseline-slides.webp +0 -0
- package/docs/ab/S8-litclaude-slides.webp +0 -0
- package/docs/ab/S9-litclaude-pages.webp +0 -0
- package/docs/agents.md +10 -7
- package/docs/assets/cover-motion-still.webp +0 -0
- package/docs/assets/cover-motion.webp +0 -0
- package/docs/assets/readme/badge-version.svg +1 -1
- package/docs/assets/skills/autoconference.webp +0 -0
- package/docs/assets/skills/automatic-checks.webp +0 -0
- package/docs/assets/skills/autoresearch.webp +0 -0
- package/docs/assets/skills/browser-drive.webp +0 -0
- package/docs/assets/skills/debugging.webp +0 -0
- package/docs/assets/skills/deep-interview.webp +0 -0
- package/docs/assets/skills/frontend-ui-ux.webp +0 -0
- package/docs/assets/skills/lit-burnoff-file.webp +0 -0
- package/docs/assets/skills/lit-burnoff.webp +0 -0
- package/docs/assets/skills/lit-code.webp +0 -0
- package/docs/assets/skills/lit-commit.webp +0 -0
- package/docs/assets/skills/lit-comprehend.webp +0 -0
- package/docs/assets/skills/lit-crucible.webp +0 -0
- package/docs/assets/skills/lit-diagram-drawer.webp +0 -0
- package/docs/assets/skills/lit-docx.webp +0 -0
- package/docs/assets/skills/lit-handoff.webp +0 -0
- package/docs/assets/skills/lit-humanizer.webp +0 -0
- package/docs/assets/skills/lit-init.webp +0 -0
- package/docs/assets/skills/lit-loop.webp +0 -0
- package/docs/assets/skills/lit-plan.webp +0 -0
- package/docs/assets/skills/lit-pptx.webp +0 -0
- package/docs/assets/skills/lit-recap.webp +0 -0
- package/docs/assets/skills/lit-scientific-visualization.webp +0 -0
- package/docs/assets/skills/lit-team.webp +0 -0
- package/docs/assets/skills/lit-typographic-motion.webp +0 -0
- package/docs/assets/skills/litgoal.webp +0 -0
- package/docs/assets/skills/litresearch.webp +0 -0
- package/docs/assets/skills/litwork.webp +0 -0
- package/docs/assets/skills/lsp-setup.webp +0 -0
- package/docs/assets/skills/readme-studio.webp +0 -0
- package/docs/assets/skills/refactor.webp +0 -0
- package/docs/assets/skills/review-work.webp +0 -0
- package/docs/assets/skills/start-work.webp +0 -0
- package/docs/assets/skills/structural-search.webp +0 -0
- package/docs/assets/skills/visual-qa.webp +0 -0
- package/docs/assets/skills/wikify.webp +0 -0
- package/docs/hooks.md +185 -41
- package/docs/migration.md +6 -3
- package/docs/privacy.md +6 -1
- package/package.json +4 -2
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/agents/korean-prose-editor.md +1 -0
- package/plugins/litclaude/agents/korean-style-analyzer.md +1 -0
- package/plugins/litclaude/agents/meaning-preservation-auditor.md +1 -0
- package/plugins/litclaude/agents/native-flow-reviewer.md +1 -0
- package/plugins/litclaude/agents/polish-orchestrator.md +1 -0
- package/plugins/litclaude/bin/litclaude-hook.js +347 -35
- package/plugins/litclaude/bin/litclaude-hud.js +29 -1
- package/plugins/litclaude/bin/litclaude-mcp.js +1 -1
- package/plugins/litclaude/bundled-rules/lit-humanizer.md +14 -0
- package/plugins/litclaude/commands/korean-ai-slop-remover.md +2 -2
- package/plugins/litclaude/commands/lit-comprehend.md +11 -11
- package/plugins/litclaude/commands/lit-humanizer.md +75 -0
- package/plugins/litclaude/commands/lit-korean.md +4 -130
- package/plugins/litclaude/commands/litresearch.md +12 -10
- package/plugins/litclaude/hooks/hooks.json +1 -1
- package/plugins/litclaude/lib/canonical-runtime-commitments.mjs +2 -2
- package/plugins/litclaude/lib/canonical-skill-catalog.mjs +5 -1
- package/plugins/litclaude/lib/canonical-skill-resources.mjs +618 -13
- package/plugins/litclaude/lib/deliverable-hedge-guard.mjs +256 -350
- package/plugins/litclaude/lib/hud-accent-palette.mjs +33 -0
- package/plugins/litclaude/lib/interface-mode.mjs +33 -0
- package/plugins/litclaude/lib/interface-probe-gate.mjs +125 -0
- package/plugins/litclaude/lib/jev-skill-hint.mjs +445 -0
- package/plugins/litclaude/lib/motion-render-gate.mjs +164 -0
- package/plugins/litclaude/lib/mutated-file-paths.mjs +32 -1
- package/plugins/litclaude/lib/office-runtime-lock/package-lock.json +745 -0
- package/plugins/litclaude/lib/office-runtime-lock/package.json +12 -0
- package/plugins/litclaude/lib/office-runtime-lock/requirements.lock +15 -0
- package/plugins/litclaude/lib/office-runtime.mjs +255 -0
- package/plugins/litclaude/lib/office_data.py +493 -0
- package/plugins/litclaude/lib/office_runtime_bootstrap.py +61 -0
- package/plugins/litclaude/lib/ooxml_integrity.py +199 -0
- package/plugins/litclaude/lib/rename-aliases.mjs +3 -1
- package/plugins/litclaude/lib/render_pages.py +105 -0
- package/plugins/litclaude/skills/autoconference/SKILL.md +2 -0
- package/plugins/litclaude/skills/browser-drive/SKILL.md +19 -6
- package/plugins/litclaude/skills/browser-drive/scripts/capability-probe.mjs +44 -8
- package/plugins/litclaude/skills/frontend-ui-ux/ATTRIBUTION.md +26 -0
- package/plugins/litclaude/skills/frontend-ui-ux/SKILL.md +50 -16
- package/plugins/litclaude/skills/frontend-ui-ux/examples/phase-3-readme-ab/README.md +9 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/complete-contract.md +32 -6
- package/plugins/litclaude/skills/frontend-ui-ux/references/craft-floor.md +257 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/default-editorial-pixel.json +6 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/interaction-motion.md +34 -88
- package/plugins/litclaude/skills/frontend-ui-ux/references/motion-guide.md +130 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/slop-register.md +150 -0
- package/plugins/litclaude/skills/frontend-ui-ux/references/visual-reconstruction.md +39 -85
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-page.mjs +1534 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-rules.mjs +141 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-server.mjs +57 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe-static.mjs +129 -0
- package/plugins/litclaude/skills/frontend-ui-ux/scripts/interface-probe.mjs +316 -0
- package/plugins/litclaude/skills/lit-comprehend/SKILL.md +34 -43
- package/plugins/litclaude/skills/lit-comprehend/references/artifact-template.md +5 -44
- package/plugins/litclaude/skills/lit-comprehend/scripts/verify-explainer.mjs +6 -16
- package/plugins/litclaude/skills/lit-diagram-drawer/NOTICE +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/SKILL.md +123 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-architecture-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-beeswarm-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bubble-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-bump-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-data-flow-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-datalake-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-db-schema-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dependency-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-deployment-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-integration-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-dp-security-matrix-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-er-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-fishbone-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-flowchart-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-gantt-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-heatmap-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-high-level-vertical-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-drawio-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-excalidraw-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-import-mermaid-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-it-state-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-journey-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-kanban-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-layers-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-line-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-loop-terminal-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-marimekko-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-medallion-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-nested-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-org-chart-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-paved-road-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-polar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-policy-trace-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-process-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-pyramid-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-consultant-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-quadrant-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-queue-animated-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-radar-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-ridgeline-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sankey-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-scatter-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-sequence-oauth-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-slopegraph-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-lifecycle-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-state-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-story-map-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-streamgraph-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-swimlane-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-timeline-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-block-decomposition-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-tree-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-treemap-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-uml-class-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-venn-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-wardley-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-dark.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-full.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/examples/type-waterfall-light.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/PretendardVariable.woff2 +0 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/fonts/provenance.json +22 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/icons.html +231 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/index.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/devicon-MIT.txt +20 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/diagram-design-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/log-z-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/simple-icons-CC0.md +30 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/assets/licenses/tabler-MIT.txt +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/01-service-architecture/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/01-service-architecture/brief.md +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/02-release-decision/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/02-release-decision/brief.md +18 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/03-data-retention/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/03-data-retention/brief.md +19 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/04-oauth-sequence/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/04-oauth-sequence/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/05-review-lanes/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/05-review-lanes/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/06-rollout-gates/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/06-rollout-gates/brief.md +17 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/07-deployment-boundary/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/07-deployment-boundary/brief.md +19 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/08-policy-traces/after.html +1 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/examples/08-policy-traces/brief.md +20 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/accessibility.md +37 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/export.md +29 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-drawio.md +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-excalidraw.md +14 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-mermaid.md +18 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/import-schema.md +28 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/korean-typography.md +34 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/motion.md +29 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/office-pptx-docx.md +42 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/output-spec.md +48 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-annotation.md +12 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-icons.md +21 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-sketchy.md +11 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/primitive-terminal.md +11 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/profiles.md +24 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/semantic-patterns.md +27 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/style-guide.md +67 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-architecture.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bar.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-beeswarm.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bubble.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-bump.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-catalog.json +1433 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-data-flow.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-datalake.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-db-schema.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dependency.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-deployment.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dp-integration.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-dp-security-matrix.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-er.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-fishbone.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-flowchart.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-gantt.md +49 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-heatmap.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-high-level-vertical.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-high-level.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-drawio.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-excalidraw.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-import-mermaid.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-it-state.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-journey.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-kanban.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-layers.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-line.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-loop-terminal.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-loop.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-marimekko.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-medallion.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-nested.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-org-chart.md +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-paved-road-animated.md +72 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-polar.md +67 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-policy-trace-animated.md +69 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-process.md +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-pyramid.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-quadrant-consultant.md +60 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-quadrant.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-queue-animated.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-radar.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-ridgeline.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sankey.md +68 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-scatter.md +60 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sequence-oauth.md +66 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-sequence.md +63 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-slopegraph.md +65 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-state-lifecycle.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-state.md +59 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-story-map.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-streamgraph.md +53 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-swimlane.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-timeline.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-tree-block-decomposition.md +57 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-tree.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-treemap.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-uml-class.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-venn.md +51 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-wardley.md +52 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/type-waterfall.md +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/references/verifier-guide.md +66 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/block-registry.mjs +43 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/brief-contract.mjs +94 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/check-visible-text.mjs +15 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/diagram-metrics.mjs +223 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/doctor.mjs +35 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/drawio-extract.mjs +635 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/excalidraw-extract.mjs +319 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/export.mjs +116 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/mermaid-extract.mjs +438 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/office-safety.mjs +54 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/renderer.mjs +33 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-all.mjs +58 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-brief.mjs +22 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-coverage.mjs +56 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-diagram.mjs +27 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-motion.mjs +12 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/verify-type.mjs +48 -0
- package/plugins/litclaude/skills/lit-diagram-drawer/scripts/visual-quality.mjs +376 -0
- package/plugins/litclaude/skills/lit-docx/NOTICE +33 -0
- package/plugins/litclaude/skills/lit-docx/SKILL.md +170 -0
- package/plugins/litclaude/skills/lit-docx/references/frontmatter_schema.md +42 -0
- package/plugins/litclaude/skills/lit-docx/references/journal_style_spec.md +17 -0
- package/plugins/litclaude/skills/lit-docx/references/markdown_quality_checklist.md +37 -0
- package/plugins/litclaude/skills/lit-docx/references/slop_phrase_list.yaml +58 -0
- package/plugins/litclaude/skills/lit-docx/references/slop_rules.md +35 -0
- package/plugins/litclaude/skills/lit-docx/scripts/clean_markdown.py +95 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_docx.py +1194 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_md_to_pdf.py +290 -0
- package/plugins/litclaude/skills/lit-docx/scripts/convert_pdf.py +139 -0
- package/plugins/litclaude/skills/lit-docx/scripts/edit_docx.py +306 -0
- package/plugins/litclaude/skills/lit-docx/scripts/embed_images.py +78 -0
- package/plugins/litclaude/skills/lit-docx/scripts/generate_docx_templates.py +500 -0
- package/plugins/litclaude/skills/lit-docx/scripts/qa_docx.py +177 -0
- package/plugins/litclaude/skills/lit-docx/scripts/slop_lint.py +561 -0
- package/plugins/litclaude/skills/lit-docx/scripts/visual_audit.py +48 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/acs.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/elsevier.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/ieee.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/korean-generic.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/docx/nature.docx +0 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/acs/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/acs/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/elsevier/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/elsevier/template.tex +38 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/ieee/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/ieee/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/korean-generic/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/korean-generic/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/nature/README.md +5 -0
- package/plugins/litclaude/skills/lit-docx/templates/latex/nature/template.tex +37 -0
- package/plugins/litclaude/skills/lit-docx/templates/registry.yaml +1366 -0
- package/plugins/litclaude/skills/lit-humanizer/NOTICE +160 -0
- package/plugins/litclaude/skills/lit-humanizer/SKILL.md +164 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/always-on-rule.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/report-skeleton.md +25 -0
- package/plugins/litclaude/skills/lit-humanizer/assets/slide-text-skeleton.md +28 -0
- package/plugins/litclaude/skills/lit-humanizer/bench/prompts.md +73 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/accessibility-note/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/accessibility-note/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/api-reference/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/api-reference/before.md +15 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/changelog/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/changelog/before.md +12 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/code-comments/after.md +10 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/code-comments/before.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/commit/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/commit/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/data-release/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/data-release/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/english-essay/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/english-essay/before.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/incident-update/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/incident-update/before.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-essay/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-essay/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-report/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-report/before.md +13 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-slide/after.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/ko-slide/before.md +21 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/meeting-brief/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/meeting-brief/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/policy-faq/after.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/policy-faq/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/pr/after.md +15 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/pr/before.md +17 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/project-update/after.md +7 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/project-update/before.md +9 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/readme/after.md +12 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/readme/before.md +14 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/report/after.md +13 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/report/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/research-abstract/after.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/research-abstract/before.md +5 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/slides/after.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/slides/before.md +19 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/troubleshooting/after.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/examples/troubleshooting/before.md +11 -0
- package/plugins/litclaude/skills/lit-humanizer/motion-guide.md +123 -0
- package/plugins/litclaude/skills/lit-humanizer/references/code-patterns.md +468 -0
- package/plugins/litclaude/skills/lit-humanizer/references/deliverable-channels.md +111 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-checklist.md +43 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-content.md +243 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns-structure.md +375 -0
- package/plugins/litclaude/skills/lit-humanizer/references/en-patterns.md +57 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-metrics.md +33 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns-a-d.md +659 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns-e-j.md +387 -0
- package/plugins/litclaude/skills/lit-humanizer/references/ko-patterns.md +31 -0
- package/plugins/litclaude/skills/lit-humanizer/references/rewrite-playbook.md +54 -0
- package/plugins/litclaude/skills/lit-humanizer/references/taxonomy.md +153 -0
- package/plugins/litclaude/skills/lit-humanizer/rules.json +884 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/artifact-text.mjs +38 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/core.mjs +207 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/detect.mjs +64 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/extract_office_text.py +112 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/ko-metrics.mjs +124 -0
- package/plugins/litclaude/skills/lit-humanizer/scripts/scan-input.mjs +29 -0
- package/plugins/litclaude/skills/lit-loop/SKILL.md +30 -1
- package/plugins/litclaude/skills/lit-plan/SKILL.md +4 -1
- package/plugins/litclaude/skills/lit-pptx/NOTICE +38 -0
- package/plugins/litclaude/skills/lit-pptx/SKILL.md +207 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-lg.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-md.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/assets/azure/circle-sm.png +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Black.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Bold.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Light.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Medium.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/A2Z-Regular.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/a2z/SOURCE.md +29 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/OFL.txt +94 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/Pretendard-Bold.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/pretendard/Pretendard-Regular.otf +0 -0
- package/plugins/litclaude/skills/lit-pptx/fonts/provenance.json +78 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/analyst.md +49 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/antithesis.md +59 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/architect.md +44 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/critic.md +42 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/synthesizer.md +47 -0
- package/plugins/litclaude/skills/lit-pptx/references/agents/thesis.md +33 -0
- package/plugins/litclaude/skills/lit-pptx/references/anti-slop-checklist.md +81 -0
- package/plugins/litclaude/skills/lit-pptx/references/authoring-guide.md +173 -0
- package/plugins/litclaude/skills/lit-pptx/references/consensus-protocol.md +125 -0
- package/plugins/litclaude/skills/lit-pptx/references/data-display-cookbook.md +45 -0
- package/plugins/litclaude/skills/lit-pptx/references/design-system-azure.md +58 -0
- package/plugins/litclaude/skills/lit-pptx/references/interview-protocol.md +113 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/autopilot.md +48 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/interview.md +52 -0
- package/plugins/litclaude/skills/lit-pptx/references/stages/plan.md +42 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/compile-deck.js +414 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/craft_extras.py +373 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/deck_craft.py +321 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/embed_fonts.py +215 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/forbidden-terms.json +55 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/layout_inventory.py +418 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/learn_template.py +446 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/derive-palette.js +176 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/directive-parser.js +244 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/font-map.js +79 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/gen-bg.js +86 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/gen-gradient-assets.js +37 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/layout-resolver.js +768 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/markdown-loader.js +136 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-html.js +356 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/render-adapter-pptx.js +2094 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/runtime-require.js +28 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/slide-ast.js +561 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/spec-validator.js +94 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/lib/template-registry.js +394 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/package.json +4 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/qa_deck.py +766 -0
- package/plugins/litclaude/skills/lit-pptx/scripts/validate_pptx.py +215 -0
- package/plugins/litclaude/skills/lit-pptx/specs/markdown-slide-spec-v1.md +251 -0
- package/plugins/litclaude/skills/lit-pptx/specs/markdown-slide-spec-v2.md +214 -0
- package/plugins/litclaude/skills/lit-pptx/specs/slide-ast-v1.schema.json +229 -0
- package/plugins/litclaude/skills/lit-pptx/specs/slide-ast-v2.schema.json +144 -0
- package/plugins/litclaude/skills/lit-pptx/specs/template-enrollment-contract.md +382 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/capabilities.yaml +146 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/layout-mapping.yaml +454 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-A2Z/template.yaml +37 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/capabilities.yaml +154 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/layout-mapping.yaml +475 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/AZURE-PRO/template.yaml +37 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/capabilities.yaml +179 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/layout-mapping.yaml +299 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-A2Z/template.yaml +45 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/capabilities.yaml +181 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/layout-mapping.yaml +299 -0
- package/plugins/litclaude/skills/lit-pptx/templates/enrolled/BOILERPLATE-PRETENDARD/template.yaml +44 -0
- package/plugins/litclaude/skills/lit-scientific-visualization/SKILL.md +1 -0
- package/plugins/litclaude/skills/lit-typographic-motion/SKILL.md +131 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/NOTICE +23 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/THIRD_PARTY_NOTICES +56 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/audio/beat_grid.py +56 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/audio/requirements.lock +1084 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/constants.mjs +211 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/contrast.mjs +90 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/events.mjs +46 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/flash.mjs +211 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/gate-rules.mjs +550 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/presets.mjs +123 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/text.mjs +100 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/timeline.mjs +142 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/util.mjs +167 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/core/voices.mjs +19 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/models/word-timing.json +198 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/analysis.mjs +108 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/brief.mjs +158 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/chrome.mjs +330 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/coverage.mjs +83 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/done.mjs +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/encode.mjs +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/frame-worker.mjs +36 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/look.mjs +128 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/pipeline.mjs +592 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/png.mjs +112 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/report.mjs +66 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/runtime.mjs +330 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/session.mjs +145 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/sound-cli.mjs +60 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/sound.mjs +641 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-capture.mjs +178 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-gate.mjs +122 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-qa.mjs +295 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage-serve.mjs +278 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stage.mjs +503 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/stills.mjs +100 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/treatment.mjs +343 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/node/ws-server.mjs +132 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/package-lock.json +25 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/package.json +10 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/init.js +288 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/qa.js +157 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/stage/stage-kit.js +701 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/boot.mjs +123 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/engine.mjs +281 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/gl.mjs +319 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/glsl-common.mjs +78 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/index.html +6 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/lines.mjs +112 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/crt.mjs +98 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/dither.mjs +49 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/glitch.mjs +77 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/swiss-grid.mjs +61 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/terminal-ui.mjs +88 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/passes/tidal-gradient.mjs +86 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/post.mjs +165 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scale.mjs +15 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scene.mjs +82 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/end-card.mjs +30 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/index.mjs +16 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/karaoke-line.mjs +47 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/kinetic-list.mjs +45 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/number-counter.mjs +29 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/signature.mjs +73 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/scenes/title-slam.mjs +73 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/stroke.mjs +236 -0
- package/plugins/litclaude/skills/lit-typographic-motion/engine/web/type.mjs +180 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w100-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w125-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-400.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-700.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/Archivo-w75-900.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/archivo/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/manifest.json +437 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Bold.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/silkscreen/Silkscreen-Regular.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/CREDITS +42 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSAllure.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSFelix.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSOsmotron.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSReadability.svg +216 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/EMSTech.svg +217 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/stroke/OFL.txt +91 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/vt323/OFL.txt +93 -0
- package/plugins/litclaude/skills/lit-typographic-motion/fonts/vt323/VT323-Regular.ttf +0 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/brief-schema.md +91 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/craft-loop.md +69 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/engine-contract.md +104 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/look.md +106 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/runtime.md +65 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/sound.md +83 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/stage.md +192 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/style-bibles.md +117 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/treatment.md +114 -0
- package/plugins/litclaude/skills/lit-typographic-motion/references/type-craft.md +79 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion-doctor.mjs +78 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion-runtime.mjs +67 -0
- package/plugins/litclaude/skills/lit-typographic-motion/scripts/motion.mjs +132 -0
- package/plugins/litclaude/skills/litresearch/SKILL.md +54 -18
- package/scripts/doctor.mjs +5 -0
- package/scripts/postinstall.mjs +1 -0
- package/plugins/litclaude/skills/lit-korean/SKILL.md +0 -327
- /package/plugins/litclaude/skills/{lit-korean/references/fidelity-checklist.md → lit-humanizer/references/litclaude-fidelity-checklist.md} +0 -0
- /package/plugins/litclaude/skills/{lit-korean/references/rewrite-rules.md → lit-humanizer/references/litclaude-rewrite-rules.md} +0 -0
- /package/plugins/litclaude/skills/{lit-korean/references/style-patterns.md → lit-humanizer/references/litclaude-style-patterns.md} +0 -0
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
// LitStage kit: motion primitives for a model-authored stage page (the stage path of
|
|
2
|
+
// lit-typographic-motion). A classic script served by the renderer at /lit/stage-kit.js. It holds
|
|
3
|
+
// primitives only, never a scene, an object, a layout or copy. Everything here is a pure function
|
|
4
|
+
// of its inputs: the renderer owns the clock (it calls render(t) frame by frame and virtualizes the
|
|
5
|
+
// page's timers), so the kit never reads a clock or unseeded entropy. Randomness is `rand(seed)`.
|
|
6
|
+
(function (root) {
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
// ---- small math ----
|
|
10
|
+
const clamp = (x, a = 0, b = 1) => (x < a ? a : x > b ? b : x);
|
|
11
|
+
const lerp = (a, b, t) => a + (b - a) * t;
|
|
12
|
+
const invLerp = (a, b, x) => (a === b ? 0 : (x - a) / (b - a));
|
|
13
|
+
const remap = (x, a, b, c, d, clamped = true) => {
|
|
14
|
+
const t = invLerp(a, b, x);
|
|
15
|
+
return lerp(c, d, clamped ? clamp(t) : t);
|
|
16
|
+
};
|
|
17
|
+
const smoothstep = (a, b, x) => {
|
|
18
|
+
const t = clamp(invLerp(a, b, x));
|
|
19
|
+
return t * t * (3 - 2 * t);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// ---- easing ----
|
|
23
|
+
// cubic-bezier as CSS defines it: solve x(u) = x for u (Newton, then bisection), return y(u).
|
|
24
|
+
function cubicBezier(x1, y1, x2, y2) {
|
|
25
|
+
if (![x1, y1, x2, y2].every(Number.isFinite) || x1 < 0 || x1 > 1 || x2 < 0 || x2 > 1) {
|
|
26
|
+
throw new Error("cubicBezier: x1 and x2 must lie in [0, 1]");
|
|
27
|
+
}
|
|
28
|
+
const cx = 3 * x1;
|
|
29
|
+
const bx = 3 * (x2 - x1) - cx;
|
|
30
|
+
const ax = 1 - cx - bx;
|
|
31
|
+
const cy = 3 * y1;
|
|
32
|
+
const by = 3 * (y2 - y1) - cy;
|
|
33
|
+
const ay = 1 - cy - by;
|
|
34
|
+
const sx = (u) => ((ax * u + bx) * u + cx) * u;
|
|
35
|
+
const sy = (u) => ((ay * u + by) * u + cy) * u;
|
|
36
|
+
const dx = (u) => (3 * ax * u + 2 * bx) * u + cx;
|
|
37
|
+
const solve = (x) => {
|
|
38
|
+
let u = x;
|
|
39
|
+
for (let i = 0; i < 8; i++) {
|
|
40
|
+
const err = sx(u) - x;
|
|
41
|
+
if (Math.abs(err) < 1e-7) return u;
|
|
42
|
+
const d = dx(u);
|
|
43
|
+
if (Math.abs(d) < 1e-6) break;
|
|
44
|
+
u -= err / d;
|
|
45
|
+
}
|
|
46
|
+
let lo = 0;
|
|
47
|
+
let hi = 1;
|
|
48
|
+
u = x;
|
|
49
|
+
for (let i = 0; i < 60; i++) {
|
|
50
|
+
const v = sx(u);
|
|
51
|
+
if (Math.abs(v - x) < 1e-7) return u;
|
|
52
|
+
if (v < x) lo = u;
|
|
53
|
+
else hi = u;
|
|
54
|
+
u = (lo + hi) / 2;
|
|
55
|
+
}
|
|
56
|
+
return u;
|
|
57
|
+
};
|
|
58
|
+
// Exact endpoints: a film that ends on ease(1) must land exactly, not 0.9999999.
|
|
59
|
+
return (x) => (x <= 0 ? 0 : x >= 1 ? 1 : sy(solve(x)));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const BACK = 1.70158;
|
|
63
|
+
const inOut = (f) => (t) => (t < 0.5 ? f(2 * t) / 2 : 1 - f(2 - 2 * t) / 2);
|
|
64
|
+
const out = (f) => (t) => 1 - f(1 - t);
|
|
65
|
+
const pow = (n) => (t) => t ** n;
|
|
66
|
+
const sine = (t) => 1 - Math.cos((t * Math.PI) / 2);
|
|
67
|
+
const expo = (t) => (t <= 0 ? 0 : 2 ** (10 * t - 10));
|
|
68
|
+
const circ = (t) => 1 - Math.sqrt(1 - t * t);
|
|
69
|
+
const back = (t) => (BACK + 1) * t * t * t - BACK * t * t;
|
|
70
|
+
const guard = (f) => (t) => (t <= 0 ? 0 : t >= 1 ? 1 : f(t));
|
|
71
|
+
|
|
72
|
+
const ease = Object.freeze({
|
|
73
|
+
linear: (t) => clamp(t),
|
|
74
|
+
inQuad: guard(pow(2)), outQuad: guard(out(pow(2))), inOutQuad: guard(inOut(pow(2))),
|
|
75
|
+
inCubic: guard(pow(3)), outCubic: guard(out(pow(3))), inOutCubic: guard(inOut(pow(3))),
|
|
76
|
+
inQuart: guard(pow(4)), outQuart: guard(out(pow(4))), inOutQuart: guard(inOut(pow(4))),
|
|
77
|
+
inQuint: guard(pow(5)), outQuint: guard(out(pow(5))), inOutQuint: guard(inOut(pow(5))),
|
|
78
|
+
inSine: guard(sine), outSine: guard(out(sine)), inOutSine: guard(inOut(sine)),
|
|
79
|
+
inExpo: guard(expo), outExpo: guard(out(expo)), inOutExpo: guard(inOut(expo)),
|
|
80
|
+
inCirc: guard(circ), outCirc: guard(out(circ)), inOutCirc: guard(inOut(circ)),
|
|
81
|
+
inBack: guard(back), outBack: guard(out(back)), inOutBack: guard(inOut(back)),
|
|
82
|
+
// Motion-design curves: settle-heavy decelerations for arrivals, a quick start for exits.
|
|
83
|
+
standard: cubicBezier(0.2, 0, 0, 1),
|
|
84
|
+
emphasized: cubicBezier(0.05, 0.7, 0.1, 1),
|
|
85
|
+
decelerate: cubicBezier(0, 0, 0, 1),
|
|
86
|
+
accelerate: cubicBezier(0.3, 0, 1, 1),
|
|
87
|
+
css: cubicBezier(0.25, 0.1, 0.25, 1),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const easeOf = (e) => {
|
|
91
|
+
if (typeof e === "function") return e;
|
|
92
|
+
if (e === undefined || e === null) return ease.linear;
|
|
93
|
+
if (typeof e === "string" && ease[e]) return ease[e];
|
|
94
|
+
if (Array.isArray(e) && e.length === 4) return cubicBezier(...e);
|
|
95
|
+
throw new Error(`unknown ease: ${String(e)}`);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// ---- analytic spring ----
|
|
99
|
+
// Position of a damped spring released at 0 with target 1 (x = displacement from the target).
|
|
100
|
+
function springFn({ stiffness = 170, damping = 26, mass = 1, velocity = 0 } = {}) {
|
|
101
|
+
if (!(stiffness > 0 && damping >= 0 && mass > 0)) throw new Error("spring: stiffness and mass must be > 0, damping >= 0");
|
|
102
|
+
const w0 = Math.sqrt(stiffness / mass);
|
|
103
|
+
const zeta = damping / (2 * Math.sqrt(stiffness * mass));
|
|
104
|
+
const x0 = -1;
|
|
105
|
+
const v0 = velocity;
|
|
106
|
+
let x;
|
|
107
|
+
if (Math.abs(zeta - 1) < 1e-6) {
|
|
108
|
+
x = (t) => Math.exp(-w0 * t) * (x0 + (v0 + w0 * x0) * t);
|
|
109
|
+
} else if (zeta < 1) {
|
|
110
|
+
const wd = w0 * Math.sqrt(1 - zeta * zeta);
|
|
111
|
+
const b = (v0 + zeta * w0 * x0) / wd;
|
|
112
|
+
x = (t) => Math.exp(-zeta * w0 * t) * (x0 * Math.cos(wd * t) + b * Math.sin(wd * t));
|
|
113
|
+
} else {
|
|
114
|
+
const s = Math.sqrt(zeta * zeta - 1);
|
|
115
|
+
const r1 = -w0 * (zeta - s);
|
|
116
|
+
const r2 = -w0 * (zeta + s);
|
|
117
|
+
const a = (v0 - r2 * x0) / (r1 - r2);
|
|
118
|
+
const b = x0 - a;
|
|
119
|
+
x = (t) => a * Math.exp(r1 * t) + b * Math.exp(r2 * t);
|
|
120
|
+
}
|
|
121
|
+
return (t) => (t <= 0 ? 0 : 1 + x(t));
|
|
122
|
+
}
|
|
123
|
+
const spring = (opts) => springFn(opts);
|
|
124
|
+
// Settle time: the last moment the spring is more than 0.1 % away from its target.
|
|
125
|
+
spring.settle = (opts, { tolerance = 0.001, limit = 60 } = {}) => {
|
|
126
|
+
const p = springFn(opts);
|
|
127
|
+
const step = 1 / 600;
|
|
128
|
+
let last = 0;
|
|
129
|
+
for (let t = 0; t <= limit; t += step) if (Math.abs(p(t) - 1) > tolerance) last = t;
|
|
130
|
+
return +(last + step).toFixed(4);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// ---- colour ----
|
|
134
|
+
const NAMED = { black: "#000000", white: "#ffffff", transparent: "#00000000" };
|
|
135
|
+
function parseColor(input) {
|
|
136
|
+
const c = String(input).trim().toLowerCase();
|
|
137
|
+
const s = NAMED[c] ?? c;
|
|
138
|
+
let m = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/u.exec(s);
|
|
139
|
+
if (m) {
|
|
140
|
+
let h = m[1];
|
|
141
|
+
if (h.length <= 4) h = [...h].map((ch) => ch + ch).join("");
|
|
142
|
+
const n = (i) => parseInt(h.slice(i, i + 2), 16);
|
|
143
|
+
return [n(0), n(2), n(4), h.length === 8 ? n(6) / 255 : 1];
|
|
144
|
+
}
|
|
145
|
+
m = /^rgba?\(([^)]*)\)$/u.exec(s);
|
|
146
|
+
if (m) {
|
|
147
|
+
const parts = m[1].split(/[\s,/]+/u).filter(Boolean);
|
|
148
|
+
const ch = (v) => (v.endsWith("%") ? (parseFloat(v) * 255) / 100 : parseFloat(v));
|
|
149
|
+
const a = parts[3] === undefined ? 1 : parts[3].endsWith("%") ? parseFloat(parts[3]) / 100 : parseFloat(parts[3]);
|
|
150
|
+
const out3 = [ch(parts[0]), ch(parts[1]), ch(parts[2]), a];
|
|
151
|
+
if (out3.every(Number.isFinite)) return out3;
|
|
152
|
+
}
|
|
153
|
+
throw new Error(`unsupported colour: ${String(input)}`);
|
|
154
|
+
}
|
|
155
|
+
const toLinear = (v) => {
|
|
156
|
+
const s = v / 255;
|
|
157
|
+
return s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
158
|
+
};
|
|
159
|
+
const toSrgb = (l) => 255 * (l <= 0.0031308 ? 12.92 * l : 1.055 * Math.max(0, l) ** (1 / 2.4) - 0.055);
|
|
160
|
+
function toOklab([r, g, b]) {
|
|
161
|
+
const R = toLinear(r);
|
|
162
|
+
const G = toLinear(g);
|
|
163
|
+
const B = toLinear(b);
|
|
164
|
+
const l = Math.cbrt(0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B);
|
|
165
|
+
const m = Math.cbrt(0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B);
|
|
166
|
+
const s = Math.cbrt(0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B);
|
|
167
|
+
return [
|
|
168
|
+
0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
|
|
169
|
+
1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
|
|
170
|
+
0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
function fromOklab([L, a, b]) {
|
|
174
|
+
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
175
|
+
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
176
|
+
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
177
|
+
return [
|
|
178
|
+
toSrgb(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s),
|
|
179
|
+
toSrgb(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s),
|
|
180
|
+
toSrgb(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s),
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
const fmt = (rgb, a) => {
|
|
184
|
+
const [r, g, b] = rgb.map((v) => Math.round(clamp(v, 0, 255)));
|
|
185
|
+
return a >= 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${+clamp(a).toFixed(4)})`;
|
|
186
|
+
};
|
|
187
|
+
function mix(a, b, t, { space = "oklab" } = {}) {
|
|
188
|
+
const A = parseColor(a);
|
|
189
|
+
const B = parseColor(b);
|
|
190
|
+
const k = clamp(t);
|
|
191
|
+
const alpha = lerp(A[3], B[3], k);
|
|
192
|
+
if (space === "srgb") return fmt([0, 1, 2].map((i) => lerp(A[i], B[i], k)), alpha);
|
|
193
|
+
if (space !== "oklab") throw new Error(`mix: unknown space ${space}`);
|
|
194
|
+
const la = toOklab(A);
|
|
195
|
+
const lb = toOklab(B);
|
|
196
|
+
return fmt(fromOklab([0, 1, 2].map((i) => lerp(la[i], lb[i], k))), alpha);
|
|
197
|
+
}
|
|
198
|
+
const rgba = (color, alpha) => {
|
|
199
|
+
const c = parseColor(color);
|
|
200
|
+
return fmt(c.slice(0, 3), clamp(alpha) * c[3]);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// ---- keyframes ----
|
|
204
|
+
// keys: [{ t, v, ease? }], sorted by t. `ease` on key k shapes the segment from key k to key k+1.
|
|
205
|
+
function kf(t, keys) {
|
|
206
|
+
if (!Array.isArray(keys) || keys.length === 0) throw new Error("kf: keys must be a non-empty array");
|
|
207
|
+
// Colours always come back as rgb() strings, clamped ends included.
|
|
208
|
+
const norm = (v) => (typeof v === "string" ? mix(v, v, 0) : v);
|
|
209
|
+
if (t <= keys[0].t) return norm(keys[0].v);
|
|
210
|
+
const last = keys[keys.length - 1];
|
|
211
|
+
if (t >= last.t) return norm(last.v);
|
|
212
|
+
let i = 0;
|
|
213
|
+
while (i < keys.length - 2 && t >= keys[i + 1].t) i += 1;
|
|
214
|
+
const a = keys[i];
|
|
215
|
+
const b = keys[i + 1];
|
|
216
|
+
const e = easeOf(a.ease)(invLerp(a.t, b.t, t));
|
|
217
|
+
if (typeof a.v === "number") return lerp(a.v, b.v, e);
|
|
218
|
+
if (Array.isArray(a.v)) return a.v.map((x, j) => lerp(x, b.v[j], e));
|
|
219
|
+
if (typeof a.v === "string") return mix(a.v, b.v, e);
|
|
220
|
+
throw new Error("kf: values must be numbers, number arrays or colour strings");
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// ---- timing ----
|
|
224
|
+
// stagger(i, each, { from, count }): the delay of item i. `from` is an index, "center" or "end".
|
|
225
|
+
function stagger(i, each, { from = 0, count } = {}) {
|
|
226
|
+
if (from === "center" || from === "end") {
|
|
227
|
+
if (!Number.isInteger(count) || count < 1) throw new Error(`stagger: from "${from}" needs count`);
|
|
228
|
+
return (from === "end" ? count - 1 - i : Math.abs(i - (count - 1) / 2)) * each;
|
|
229
|
+
}
|
|
230
|
+
return Math.abs(i - from) * each;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Local progress of a window [start, start + dur), eased, clamped to 0..1.
|
|
234
|
+
const at = (t, start, dur, e) => easeOf(e)(dur > 0 ? clamp((t - start) / dur) : t >= start ? 1 : 0);
|
|
235
|
+
|
|
236
|
+
// seq(["name", dur, offset?], ...): segments laid end to end; a negative offset overlaps the
|
|
237
|
+
// previous one. tl.p(name, t, ease?) -> 0..1, tl.local(name, t) -> seconds since its start,
|
|
238
|
+
// tl.active(name, t) -> boolean, tl.seg[name] -> { start, dur, end }, tl.duration.
|
|
239
|
+
function seq(...steps) {
|
|
240
|
+
const seg = {};
|
|
241
|
+
let cursor = 0;
|
|
242
|
+
let duration = 0;
|
|
243
|
+
for (const step of steps) {
|
|
244
|
+
const [name, dur, offset = 0] = step;
|
|
245
|
+
if (typeof name !== "string" || !(dur >= 0)) throw new Error("seq: each step is [name, seconds, offset?]");
|
|
246
|
+
if (seg[name]) throw new Error(`seq: duplicate step ${name}`);
|
|
247
|
+
const start = Math.max(0, cursor + offset);
|
|
248
|
+
seg[name] = Object.freeze({ start, dur, end: start + dur });
|
|
249
|
+
cursor = start + dur;
|
|
250
|
+
duration = Math.max(duration, cursor);
|
|
251
|
+
}
|
|
252
|
+
const get = (name) => {
|
|
253
|
+
if (!seg[name]) throw new Error(`seq: no step ${name}`);
|
|
254
|
+
return seg[name];
|
|
255
|
+
};
|
|
256
|
+
return Object.freeze({
|
|
257
|
+
seg: Object.freeze(seg),
|
|
258
|
+
duration,
|
|
259
|
+
p: (name, t, e) => at(t, get(name).start, get(name).dur, e),
|
|
260
|
+
local: (name, t) => t - get(name).start,
|
|
261
|
+
active: (name, t) => t >= get(name).start && t < get(name).end,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// ---- seeded randomness (mulberry32) ----
|
|
266
|
+
function rand(seed = 1) {
|
|
267
|
+
let a = (Number(seed) >>> 0) || 0x9e3779b9;
|
|
268
|
+
return () => {
|
|
269
|
+
a = (a + 0x6d2b79f5) >>> 0;
|
|
270
|
+
let t = a;
|
|
271
|
+
t = Math.imul(t ^ (t >>> 15), t | 1);
|
|
272
|
+
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
|
|
273
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
rand.int = (seed) => {
|
|
277
|
+
const r = rand(seed);
|
|
278
|
+
return (a, b) => a + Math.floor(r() * (b - a + 1));
|
|
279
|
+
};
|
|
280
|
+
rand.range = (seed) => {
|
|
281
|
+
const r = rand(seed);
|
|
282
|
+
return (a, b) => a + r() * (b - a);
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
// ---- text ----
|
|
286
|
+
const segmenter = (granularity) => (typeof Intl !== "undefined" && Intl.Segmenter ? new Intl.Segmenter(undefined, { granularity }) : null);
|
|
287
|
+
|
|
288
|
+
// Segments of a string as { text, part } where `part` marks a unit and whitespace stays between.
|
|
289
|
+
function segments(str, by) {
|
|
290
|
+
if (by === "line") return str.split(/(\n)/u).filter((s) => s.length).map((s) => ({ text: s, part: s !== "\n" }));
|
|
291
|
+
if (by === "eojeol") return str.split(/(\s+)/u).filter((s) => s.length).map((s) => ({ text: s, part: !/^\s+$/u.test(s) }));
|
|
292
|
+
if (by === "grapheme" || by === "word") {
|
|
293
|
+
const seg = segmenter(by);
|
|
294
|
+
// Without Intl.Segmenter, code points are the fallback; a precomposed syllable is one code point.
|
|
295
|
+
const pieces = seg ? [...seg.segment(str)].map((s) => s.segment) : Array.from(str);
|
|
296
|
+
return pieces.map((s) => ({ text: s, part: !/^\s+$/u.test(s) }));
|
|
297
|
+
}
|
|
298
|
+
throw new Error(`splitText: by must be grapheme, word, eojeol or line (got ${by})`);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// splitText(string, opts) -> unit strings; splitText(element, opts) -> the new span elements. The
|
|
302
|
+
// element keeps its own attributes (its data-lit-text mark included); only its children change.
|
|
303
|
+
function splitText(target, { by = "grapheme" } = {}) {
|
|
304
|
+
if (typeof target === "string") return segments(target, by).filter((s) => s.part).map((s) => s.text);
|
|
305
|
+
if (!target || typeof target.textContent !== "string" || !target.ownerDocument) throw new Error("splitText: pass a string or an element");
|
|
306
|
+
const doc = target.ownerDocument;
|
|
307
|
+
const spans = [];
|
|
308
|
+
const pieces = segments(target.textContent, by);
|
|
309
|
+
while (target.firstChild) target.removeChild(target.firstChild);
|
|
310
|
+
for (const s of pieces) {
|
|
311
|
+
if (!s.part) {
|
|
312
|
+
if (s.text !== "\n") target.appendChild(doc.createTextNode(s.text));
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
const span = doc.createElement("span");
|
|
316
|
+
span.setAttribute("data-lit-part", String(spans.length));
|
|
317
|
+
// Transforms do not apply to inline boxes; units must be inline-block (lines are blocks).
|
|
318
|
+
span.style.display = by === "line" ? "block" : "inline-block";
|
|
319
|
+
span.textContent = s.text;
|
|
320
|
+
target.appendChild(span);
|
|
321
|
+
spans.push(span);
|
|
322
|
+
}
|
|
323
|
+
return spans;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// text(el, { decor }) marks one DOM/SVG text run; text({ content, x, y, w, h }) registers canvas or
|
|
327
|
+
// WebGL text for the current frame (the renderer empties the list before every frame).
|
|
328
|
+
function text(target, opts = {}) {
|
|
329
|
+
if (target && typeof target === "object" && typeof target.nodeType === "number") {
|
|
330
|
+
target.setAttribute("data-lit-text", "1");
|
|
331
|
+
if (opts.decor) target.setAttribute("data-lit-decor", "1");
|
|
332
|
+
else target.removeAttribute("data-lit-decor");
|
|
333
|
+
return target;
|
|
334
|
+
}
|
|
335
|
+
const { content, x, y, w, h, decor = false } = target ?? {};
|
|
336
|
+
if (typeof content !== "string" || ![x, y, w, h].every(Number.isFinite) || !(w > 0 && h > 0)) {
|
|
337
|
+
throw new Error("LitStage.text: pass an element, or { content, x, y, w, h } for canvas text");
|
|
338
|
+
}
|
|
339
|
+
if (!Array.isArray(root.__litStageTexts)) root.__litStageTexts = [];
|
|
340
|
+
const entry = { content, x, y, w, h, decor: Boolean(decor) };
|
|
341
|
+
root.__litStageTexts.push(entry);
|
|
342
|
+
return entry;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// ---- SVG stroke draw ----
|
|
346
|
+
function drawPath(el, progress) {
|
|
347
|
+
const len = el.getTotalLength();
|
|
348
|
+
el.style.strokeDasharray = `${len} ${len}`;
|
|
349
|
+
el.style.strokeDashoffset = String(len * (1 - clamp(progress)));
|
|
350
|
+
return len;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// ---- path parsing (single subpath) to cubic segments [x0, y0, c1x, c1y, c2x, c2y, x, y] ----
|
|
354
|
+
function parsePath(d) {
|
|
355
|
+
const src = String(d);
|
|
356
|
+
let i = 0;
|
|
357
|
+
const skip = () => {
|
|
358
|
+
while (i < src.length && /[\s,]/u.test(src[i])) i += 1;
|
|
359
|
+
};
|
|
360
|
+
const number = () => {
|
|
361
|
+
skip();
|
|
362
|
+
const m = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/u.exec(src.slice(i));
|
|
363
|
+
if (!m) throw new Error(`morph: bad number at ${i} in path`);
|
|
364
|
+
i += m[0].length;
|
|
365
|
+
return parseFloat(m[0]);
|
|
366
|
+
};
|
|
367
|
+
const flag = () => {
|
|
368
|
+
skip();
|
|
369
|
+
const ch = src[i];
|
|
370
|
+
if (ch !== "0" && ch !== "1") throw new Error(`morph: bad arc flag at ${i}`);
|
|
371
|
+
i += 1;
|
|
372
|
+
return ch === "1";
|
|
373
|
+
};
|
|
374
|
+
const hasNumber = () => {
|
|
375
|
+
skip();
|
|
376
|
+
return i < src.length && /[-+.\d]/u.test(src[i]);
|
|
377
|
+
};
|
|
378
|
+
const segs = [];
|
|
379
|
+
let x = 0;
|
|
380
|
+
let y = 0;
|
|
381
|
+
let sx = 0;
|
|
382
|
+
let sy = 0;
|
|
383
|
+
let started = false;
|
|
384
|
+
let closed = false;
|
|
385
|
+
let prevCmd = "";
|
|
386
|
+
let lastC = null; // reflected control for S
|
|
387
|
+
let lastQ = null; // reflected control for T
|
|
388
|
+
const line = (nx, ny) => {
|
|
389
|
+
segs.push([x, y, x + (nx - x) / 3, y + (ny - y) / 3, x + (2 * (nx - x)) / 3, y + (2 * (ny - y)) / 3, nx, ny]);
|
|
390
|
+
x = nx;
|
|
391
|
+
y = ny;
|
|
392
|
+
};
|
|
393
|
+
const cubic = (c1x, c1y, c2x, c2y, nx, ny) => {
|
|
394
|
+
segs.push([x, y, c1x, c1y, c2x, c2y, nx, ny]);
|
|
395
|
+
x = nx;
|
|
396
|
+
y = ny;
|
|
397
|
+
};
|
|
398
|
+
const quad = (qx, qy, nx, ny) => cubic(x + (2 / 3) * (qx - x), y + (2 / 3) * (qy - y), nx + (2 / 3) * (qx - nx), ny + (2 / 3) * (qy - ny), nx, ny);
|
|
399
|
+
for (;;) {
|
|
400
|
+
skip();
|
|
401
|
+
if (i >= src.length) break;
|
|
402
|
+
let cmd = src[i];
|
|
403
|
+
if (/[a-z]/iu.test(cmd)) i += 1;
|
|
404
|
+
else if (prevCmd) cmd = prevCmd === "M" ? "L" : prevCmd === "m" ? "l" : prevCmd;
|
|
405
|
+
else throw new Error("morph: path must start with M");
|
|
406
|
+
const rel = cmd === cmd.toLowerCase();
|
|
407
|
+
const C = cmd.toUpperCase();
|
|
408
|
+
const ox = rel ? x : 0;
|
|
409
|
+
const oy = rel ? y : 0;
|
|
410
|
+
if (C === "M") {
|
|
411
|
+
if (started) throw new Error("morph: multi-subpath paths are unsupported");
|
|
412
|
+
x = ox + number();
|
|
413
|
+
y = oy + number();
|
|
414
|
+
sx = x;
|
|
415
|
+
sy = y;
|
|
416
|
+
started = true;
|
|
417
|
+
} else if (!started) {
|
|
418
|
+
throw new Error("morph: path must start with M");
|
|
419
|
+
} else if (closed && C !== "Z") {
|
|
420
|
+
throw new Error("morph: multi-subpath paths are unsupported");
|
|
421
|
+
} else if (C === "Z") {
|
|
422
|
+
if (Math.hypot(x - sx, y - sy) > 1e-9) line(sx, sy);
|
|
423
|
+
closed = true;
|
|
424
|
+
} else if (C === "L") line(ox + number(), oy + number());
|
|
425
|
+
else if (C === "H") line(ox + number(), y);
|
|
426
|
+
else if (C === "V") line(x, oy + number());
|
|
427
|
+
else if (C === "C") {
|
|
428
|
+
const c1x = ox + number();
|
|
429
|
+
const c1y = oy + number();
|
|
430
|
+
const c2x = ox + number();
|
|
431
|
+
const c2y = oy + number();
|
|
432
|
+
cubic(c1x, c1y, c2x, c2y, ox + number(), oy + number());
|
|
433
|
+
} else if (C === "S") {
|
|
434
|
+
const r = /[CS]/u.test(prevCmd.toUpperCase()) && lastC ? [2 * x - lastC[0], 2 * y - lastC[1]] : [x, y];
|
|
435
|
+
const c2x = ox + number();
|
|
436
|
+
const c2y = oy + number();
|
|
437
|
+
cubic(r[0], r[1], c2x, c2y, ox + number(), oy + number());
|
|
438
|
+
} else if (C === "Q") {
|
|
439
|
+
const qx = ox + number();
|
|
440
|
+
const qy = oy + number();
|
|
441
|
+
quad(qx, qy, ox + number(), oy + number());
|
|
442
|
+
lastQ = [qx, qy];
|
|
443
|
+
} else if (C === "T") {
|
|
444
|
+
const q = /[QT]/u.test(prevCmd.toUpperCase()) && lastQ ? [2 * x - lastQ[0], 2 * y - lastQ[1]] : [x, y];
|
|
445
|
+
quad(q[0], q[1], ox + number(), oy + number());
|
|
446
|
+
lastQ = q;
|
|
447
|
+
} else if (C === "A") {
|
|
448
|
+
const rx = number();
|
|
449
|
+
const ry = number();
|
|
450
|
+
const rot = number();
|
|
451
|
+
const large = flag();
|
|
452
|
+
const sweep = flag();
|
|
453
|
+
arc(x, y, rx, ry, rot, large, sweep, ox + number(), oy + number(), cubic);
|
|
454
|
+
} else throw new Error(`morph: unknown command ${cmd}`);
|
|
455
|
+
if (C === "C" || C === "S") {
|
|
456
|
+
const s = segs[segs.length - 1];
|
|
457
|
+
lastC = [s[4], s[5]];
|
|
458
|
+
}
|
|
459
|
+
prevCmd = cmd;
|
|
460
|
+
// A command letter may repeat its arguments; loop back without a new letter.
|
|
461
|
+
if (C !== "Z" && hasNumber()) continue;
|
|
462
|
+
}
|
|
463
|
+
if (!segs.length) throw new Error("morph: path has no drawable segment");
|
|
464
|
+
return { segs: segs.filter((s) => segLength(s) > 1e-9), closed };
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// SVG arc (endpoint form) to cubic pieces of at most 90 degrees (SVG 1.1 F.6.5).
|
|
468
|
+
function arc(x1, y1, rx, ry, rotDeg, large, sweep, x2, y2, cubic) {
|
|
469
|
+
if (Math.hypot(x2 - x1, y2 - y1) < 1e-12) return;
|
|
470
|
+
rx = Math.abs(rx);
|
|
471
|
+
ry = Math.abs(ry);
|
|
472
|
+
if (rx < 1e-12 || ry < 1e-12) {
|
|
473
|
+
cubic(x1 + (x2 - x1) / 3, y1 + (y2 - y1) / 3, x1 + (2 * (x2 - x1)) / 3, y1 + (2 * (y2 - y1)) / 3, x2, y2);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
const phi = (rotDeg * Math.PI) / 180;
|
|
477
|
+
const cos = Math.cos(phi);
|
|
478
|
+
const sin = Math.sin(phi);
|
|
479
|
+
const dx = (x1 - x2) / 2;
|
|
480
|
+
const dy = (y1 - y2) / 2;
|
|
481
|
+
const xp = cos * dx + sin * dy;
|
|
482
|
+
const yp = -sin * dx + cos * dy;
|
|
483
|
+
const lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);
|
|
484
|
+
if (lambda > 1) {
|
|
485
|
+
rx *= Math.sqrt(lambda);
|
|
486
|
+
ry *= Math.sqrt(lambda);
|
|
487
|
+
}
|
|
488
|
+
const num = rx * rx * ry * ry - rx * rx * yp * yp - ry * ry * xp * xp;
|
|
489
|
+
const den = rx * rx * yp * yp + ry * ry * xp * xp;
|
|
490
|
+
let co = Math.sqrt(Math.max(0, num / den));
|
|
491
|
+
if (large === sweep) co = -co;
|
|
492
|
+
const cxp = (co * rx * yp) / ry;
|
|
493
|
+
const cyp = (-co * ry * xp) / rx;
|
|
494
|
+
const cx = cos * cxp - sin * cyp + (x1 + x2) / 2;
|
|
495
|
+
const cy = sin * cxp + cos * cyp + (y1 + y2) / 2;
|
|
496
|
+
const angle = (ux, uy, vx, vy) => {
|
|
497
|
+
const a = Math.atan2(ux * vy - uy * vx, ux * vx + uy * vy);
|
|
498
|
+
return a;
|
|
499
|
+
};
|
|
500
|
+
const t1 = angle(1, 0, (xp - cxp) / rx, (yp - cyp) / ry);
|
|
501
|
+
let dt = angle((xp - cxp) / rx, (yp - cyp) / ry, (-xp - cxp) / rx, (-yp - cyp) / ry);
|
|
502
|
+
if (!sweep && dt > 0) dt -= 2 * Math.PI;
|
|
503
|
+
else if (sweep && dt < 0) dt += 2 * Math.PI;
|
|
504
|
+
const n = Math.max(1, Math.ceil(Math.abs(dt) / (Math.PI / 2) - 1e-9));
|
|
505
|
+
const step = dt / n;
|
|
506
|
+
const k = (4 / 3) * Math.tan(step / 4);
|
|
507
|
+
const pt = (a) => [cx + rx * Math.cos(a) * cos - ry * Math.sin(a) * sin, cy + rx * Math.cos(a) * sin + ry * Math.sin(a) * cos];
|
|
508
|
+
const der = (a) => [-rx * Math.sin(a) * cos - ry * Math.cos(a) * sin, -rx * Math.sin(a) * sin + ry * Math.cos(a) * cos];
|
|
509
|
+
let a0 = t1;
|
|
510
|
+
for (let j = 0; j < n; j++) {
|
|
511
|
+
const a1 = a0 + step;
|
|
512
|
+
const p0 = pt(a0);
|
|
513
|
+
const p1 = j === n - 1 ? [x2, y2] : pt(a1);
|
|
514
|
+
const d0 = der(a0);
|
|
515
|
+
const d1 = der(a1);
|
|
516
|
+
cubic(p0[0] + k * d0[0], p0[1] + k * d0[1], p1[0] - k * d1[0], p1[1] - k * d1[1], p1[0], p1[1]);
|
|
517
|
+
a0 = a1;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const bez = (s, u) => {
|
|
522
|
+
const v = 1 - u;
|
|
523
|
+
const a = v * v * v;
|
|
524
|
+
const b = 3 * v * v * u;
|
|
525
|
+
const c = 3 * v * u * u;
|
|
526
|
+
const d = u * u * u;
|
|
527
|
+
return [a * s[0] + b * s[2] + c * s[4] + d * s[6], a * s[1] + b * s[3] + c * s[5] + d * s[7]];
|
|
528
|
+
};
|
|
529
|
+
const LUT_STEPS = 32;
|
|
530
|
+
function segLut(s) {
|
|
531
|
+
const lut = [0];
|
|
532
|
+
let prev = [s[0], s[1]];
|
|
533
|
+
for (let k = 1; k <= LUT_STEPS; k++) {
|
|
534
|
+
const p = bez(s, k / LUT_STEPS);
|
|
535
|
+
lut.push(lut[k - 1] + Math.hypot(p[0] - prev[0], p[1] - prev[1]));
|
|
536
|
+
prev = p;
|
|
537
|
+
}
|
|
538
|
+
return lut;
|
|
539
|
+
}
|
|
540
|
+
const segLength = (s) => segLut(s)[LUT_STEPS];
|
|
541
|
+
// Parameter u at arc length `len` along the segment (linear inside the lookup table).
|
|
542
|
+
function paramAt(lut, len) {
|
|
543
|
+
const total = lut[LUT_STEPS];
|
|
544
|
+
if (len <= 0) return 0;
|
|
545
|
+
if (len >= total) return 1;
|
|
546
|
+
let k = 1;
|
|
547
|
+
while (lut[k] < len) k += 1;
|
|
548
|
+
return (k - 1 + invLerp(lut[k - 1], lut[k], len)) / LUT_STEPS;
|
|
549
|
+
}
|
|
550
|
+
// de Casteljau split at u: [left, right].
|
|
551
|
+
function split(s, u) {
|
|
552
|
+
const L = (a, b) => [lerp(a[0], b[0], u), lerp(a[1], b[1], u)];
|
|
553
|
+
const p0 = [s[0], s[1]];
|
|
554
|
+
const p1 = [s[2], s[3]];
|
|
555
|
+
const p2 = [s[4], s[5]];
|
|
556
|
+
const p3 = [s[6], s[7]];
|
|
557
|
+
const a = L(p0, p1);
|
|
558
|
+
const b = L(p1, p2);
|
|
559
|
+
const c = L(p2, p3);
|
|
560
|
+
const d = L(a, b);
|
|
561
|
+
const e = L(b, c);
|
|
562
|
+
const m = L(d, e);
|
|
563
|
+
return [[...p0, ...a, ...d, ...m], [...m, ...e, ...c, ...p3]];
|
|
564
|
+
}
|
|
565
|
+
function subSegment(s, u0, u1) {
|
|
566
|
+
if (u1 >= 1 - 1e-12 && u0 <= 1e-12) return s.slice();
|
|
567
|
+
const right = u0 > 1e-12 ? split(s, u0)[1] : s;
|
|
568
|
+
const local = (u1 - u0) / (1 - u0);
|
|
569
|
+
return local >= 1 - 1e-12 ? right : split(right, local)[0];
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// Split each segment into pieces of equal arc length; piece counts follow segment lengths
|
|
573
|
+
// (largest remainder, at least one each) so every output cubic stays inside one input segment.
|
|
574
|
+
function resample(segs, n) {
|
|
575
|
+
const luts = segs.map(segLut);
|
|
576
|
+
const lens = luts.map((l) => l[LUT_STEPS]);
|
|
577
|
+
const total = lens.reduce((a, b) => a + b, 0);
|
|
578
|
+
const raw = lens.map((l) => (l / total) * n);
|
|
579
|
+
const counts = raw.map((r) => Math.max(1, Math.floor(r)));
|
|
580
|
+
let sum = counts.reduce((a, b) => a + b, 0);
|
|
581
|
+
const order = raw.map((r, k) => [r - Math.floor(r), k]).sort((a, b) => b[0] - a[0] || a[1] - b[1]);
|
|
582
|
+
for (let j = 0; sum < n; j = (j + 1) % order.length) {
|
|
583
|
+
counts[order[j][1]] += 1;
|
|
584
|
+
sum += 1;
|
|
585
|
+
}
|
|
586
|
+
while (sum > n) {
|
|
587
|
+
let big = 0;
|
|
588
|
+
for (let k = 1; k < counts.length; k++) if (counts[k] > counts[big]) big = k;
|
|
589
|
+
counts[big] -= 1;
|
|
590
|
+
sum -= 1;
|
|
591
|
+
}
|
|
592
|
+
const outSegs = [];
|
|
593
|
+
segs.forEach((s, k) => {
|
|
594
|
+
for (let j = 0; j < counts[k]; j++) {
|
|
595
|
+
const u0 = paramAt(luts[k], (lens[k] * j) / counts[k]);
|
|
596
|
+
const u1 = j === counts[k] - 1 ? 1 : paramAt(luts[k], (lens[k] * (j + 1)) / counts[k]);
|
|
597
|
+
outSegs.push(subSegment(s, u0, u1));
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
return outSegs;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
const reverseSegs = (segs) => segs.slice().reverse().map((s) => [s[6], s[7], s[4], s[5], s[2], s[3], s[0], s[1]]);
|
|
604
|
+
const signedArea = (segs) => segs.reduce((a, s) => a + (s[0] * s[7] - s[6] * s[1]), 0);
|
|
605
|
+
const cost = (a, b) => a.reduce((sum, s, k) => sum + (s[0] - b[k][0]) ** 2 + (s[1] - b[k][1]) ** 2 + (s[6] - b[k][6]) ** 2 + (s[7] - b[k][7]) ** 2, 0);
|
|
606
|
+
const num = (v) => {
|
|
607
|
+
const r = Math.round(v * 1000) / 1000;
|
|
608
|
+
return String(Object.is(r, -0) ? 0 : r);
|
|
609
|
+
};
|
|
610
|
+
const pathD = (segs, closed) => `M${num(segs[0][0])} ${num(segs[0][1])}${segs.map((s) => `C${s.slice(2).map(num).join(" ")}`).join("")}${closed ? "Z" : ""}`;
|
|
611
|
+
|
|
612
|
+
// morph(fromD, toD, { samples }) -> fn(p) returning a `d` string. Single subpath only.
|
|
613
|
+
function morph(fromD, toD, { samples = 64 } = {}) {
|
|
614
|
+
const A = parsePath(fromD);
|
|
615
|
+
const B = parsePath(toD);
|
|
616
|
+
const closed = A.closed && B.closed;
|
|
617
|
+
const n = Math.max(samples, A.segs.length, B.segs.length);
|
|
618
|
+
const a = resample(A.segs, n);
|
|
619
|
+
let b = resample(B.segs, n);
|
|
620
|
+
if (closed) {
|
|
621
|
+
if (Math.sign(signedArea(a)) !== Math.sign(signedArea(b))) b = reverseSegs(b);
|
|
622
|
+
// Best rotation: the start index of the target ring that minimizes the summed squared distance.
|
|
623
|
+
let best = { k: 0, c: Infinity };
|
|
624
|
+
for (let k = 0; k < n; k++) {
|
|
625
|
+
const rot = b.slice(k).concat(b.slice(0, k));
|
|
626
|
+
const c = cost(a, rot);
|
|
627
|
+
if (c < best.c) best = { k, c };
|
|
628
|
+
}
|
|
629
|
+
b = b.slice(best.k).concat(b.slice(0, best.k));
|
|
630
|
+
} else {
|
|
631
|
+
const rev = reverseSegs(b);
|
|
632
|
+
if (cost(a, rev) < cost(a, b)) b = rev;
|
|
633
|
+
}
|
|
634
|
+
const fn = (p) => {
|
|
635
|
+
const t = clamp(p);
|
|
636
|
+
return pathD(a.map((s, k) => s.map((v, j) => lerp(v, b[k][j], t))), closed);
|
|
637
|
+
};
|
|
638
|
+
fn.from = a;
|
|
639
|
+
fn.to = b;
|
|
640
|
+
fn.closed = closed;
|
|
641
|
+
return fn;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// ---- masks and clips (styles only) ----
|
|
645
|
+
const pct = (v) => `${+(v * 100).toFixed(4)}%`;
|
|
646
|
+
function setStyle(el, prop, value) {
|
|
647
|
+
el.style[prop] = value;
|
|
648
|
+
const webkit = `webkit${prop[0].toUpperCase()}${prop.slice(1)}`;
|
|
649
|
+
if (webkit in el.style) el.style[webkit] = value;
|
|
650
|
+
}
|
|
651
|
+
// clipRect(el, p, { from }): p = 0 hidden, p = 1 fully shown, revealed from that edge.
|
|
652
|
+
function clipRect(el, p, { from = "left" } = {}) {
|
|
653
|
+
const h = 1 - clamp(p);
|
|
654
|
+
const inset = {
|
|
655
|
+
left: `inset(0 ${pct(h)} 0 0)`,
|
|
656
|
+
right: `inset(0 0 0 ${pct(h)})`,
|
|
657
|
+
top: `inset(0 0 ${pct(h)} 0)`,
|
|
658
|
+
bottom: `inset(${pct(h)} 0 0 0)`,
|
|
659
|
+
center: `inset(${pct(h / 2)} ${pct(h / 2)})`,
|
|
660
|
+
}[from];
|
|
661
|
+
if (!inset) throw new Error(`clipRect: from must be left, right, top, bottom or center (got ${from})`);
|
|
662
|
+
setStyle(el, "clipPath", inset);
|
|
663
|
+
return inset;
|
|
664
|
+
}
|
|
665
|
+
// clipCircle(el, p, { x, y }): an iris from (x%, y%); p = 1 covers the box from any corner.
|
|
666
|
+
function clipCircle(el, p, { x = 50, y = 50 } = {}) {
|
|
667
|
+
const value = `circle(${+(clamp(p) * 142).toFixed(4)}% at ${x}% ${y}%)`;
|
|
668
|
+
setStyle(el, "clipPath", value);
|
|
669
|
+
return value;
|
|
670
|
+
}
|
|
671
|
+
// maskLinear(el, p, { angle, feather }): a soft-edged reveal along `angle` degrees.
|
|
672
|
+
function maskLinear(el, p, { angle = 90, feather = 0.1 } = {}) {
|
|
673
|
+
const edge = clamp(p) * (1 + feather);
|
|
674
|
+
const value = `linear-gradient(${angle}deg, #000 ${pct(edge - feather)}, transparent ${pct(edge)})`;
|
|
675
|
+
setStyle(el, "maskImage", value);
|
|
676
|
+
return value;
|
|
677
|
+
}
|
|
678
|
+
const wipe = (el, p, opts) => clipRect(el, p, opts);
|
|
679
|
+
|
|
680
|
+
// ---- the page contract ----
|
|
681
|
+
const FORMATS = [[1920, 1080], [1080, 1920]];
|
|
682
|
+
function define(spec) {
|
|
683
|
+
const { width, height, fps = 60, duration, render } = spec ?? {};
|
|
684
|
+
if (!FORMATS.some(([w, h]) => w === width && h === height)) throw new Error(`LitStage.define: size must be 1920x1080 or 1080x1920 (got ${width}x${height})`);
|
|
685
|
+
if (fps !== 60 && fps !== 30) throw new Error(`LitStage.define: fps must be 60 or 30 (got ${fps})`);
|
|
686
|
+
if (!(Number.isFinite(duration) && duration > 0)) throw new Error("LitStage.define: duration must be a positive number of seconds");
|
|
687
|
+
if (typeof render !== "function") throw new Error("LitStage.define: render(t) must be a function");
|
|
688
|
+
const frozen = Object.freeze({ width, height, fps, duration, render });
|
|
689
|
+
root.litStage = frozen;
|
|
690
|
+
return frozen;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
root.LitStage = Object.freeze({
|
|
694
|
+
define, text,
|
|
695
|
+
ease, cubicBezier, spring, kf, stagger, seq, at, rand,
|
|
696
|
+
splitText, drawPath, morph,
|
|
697
|
+
clipRect, clipCircle, maskLinear, wipe,
|
|
698
|
+
mix, rgba,
|
|
699
|
+
clamp, lerp, invLerp, remap, smoothstep,
|
|
700
|
+
});
|
|
701
|
+
})(typeof window !== "undefined" ? window : globalThis);
|