forge-server 0.1.0
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/.claude/hooks/worktree-create.sh +64 -0
- package/.claude/hooks/worktree-remove.sh +57 -0
- package/.claude/settings.local.json +29 -0
- package/.forge/knowledge/conventions.yaml +1 -0
- package/.forge/knowledge/decisions.yaml +1 -0
- package/.forge/knowledge/gotchas.yaml +1 -0
- package/.forge/knowledge/patterns.yaml +1 -0
- package/.forge/manifest.yaml +6 -0
- package/CLAUDE.md +144 -0
- package/bin/setup-forge.sh +132 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +553 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/codebase.d.ts +57 -0
- package/dist/context/codebase.d.ts.map +1 -0
- package/dist/context/codebase.js +301 -0
- package/dist/context/codebase.js.map +1 -0
- package/dist/context/injector.d.ts +147 -0
- package/dist/context/injector.d.ts.map +1 -0
- package/dist/context/injector.js +533 -0
- package/dist/context/injector.js.map +1 -0
- package/dist/context/memory.d.ts +32 -0
- package/dist/context/memory.d.ts.map +1 -0
- package/dist/context/memory.js +140 -0
- package/dist/context/memory.js.map +1 -0
- package/dist/context/session-index.d.ts +54 -0
- package/dist/context/session-index.d.ts.map +1 -0
- package/dist/context/session-index.js +265 -0
- package/dist/context/session-index.js.map +1 -0
- package/dist/context/session.d.ts +42 -0
- package/dist/context/session.d.ts.map +1 -0
- package/dist/context/session.js +121 -0
- package/dist/context/session.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +19 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +189 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/embedder.d.ts +45 -0
- package/dist/ingestion/embedder.d.ts.map +1 -0
- package/dist/ingestion/embedder.js +152 -0
- package/dist/ingestion/embedder.js.map +1 -0
- package/dist/ingestion/git-analyzer.d.ts +77 -0
- package/dist/ingestion/git-analyzer.d.ts.map +1 -0
- package/dist/ingestion/git-analyzer.js +437 -0
- package/dist/ingestion/git-analyzer.js.map +1 -0
- package/dist/ingestion/indexer.d.ts +79 -0
- package/dist/ingestion/indexer.d.ts.map +1 -0
- package/dist/ingestion/indexer.js +766 -0
- package/dist/ingestion/indexer.js.map +1 -0
- package/dist/ingestion/markdown-chunker.d.ts +19 -0
- package/dist/ingestion/markdown-chunker.d.ts.map +1 -0
- package/dist/ingestion/markdown-chunker.js +243 -0
- package/dist/ingestion/markdown-chunker.js.map +1 -0
- package/dist/ingestion/markdown-knowledge.d.ts +21 -0
- package/dist/ingestion/markdown-knowledge.d.ts.map +1 -0
- package/dist/ingestion/markdown-knowledge.js +129 -0
- package/dist/ingestion/markdown-knowledge.js.map +1 -0
- package/dist/ingestion/parser.d.ts +20 -0
- package/dist/ingestion/parser.d.ts.map +1 -0
- package/dist/ingestion/parser.js +429 -0
- package/dist/ingestion/parser.js.map +1 -0
- package/dist/ingestion/watcher.d.ts +28 -0
- package/dist/ingestion/watcher.d.ts.map +1 -0
- package/dist/ingestion/watcher.js +147 -0
- package/dist/ingestion/watcher.js.map +1 -0
- package/dist/knowledge/hydrator.d.ts +37 -0
- package/dist/knowledge/hydrator.d.ts.map +1 -0
- package/dist/knowledge/hydrator.js +220 -0
- package/dist/knowledge/hydrator.js.map +1 -0
- package/dist/knowledge/registry.d.ts +129 -0
- package/dist/knowledge/registry.d.ts.map +1 -0
- package/dist/knowledge/registry.js +361 -0
- package/dist/knowledge/registry.js.map +1 -0
- package/dist/knowledge/search.d.ts +114 -0
- package/dist/knowledge/search.d.ts.map +1 -0
- package/dist/knowledge/search.js +428 -0
- package/dist/knowledge/search.js.map +1 -0
- package/dist/knowledge/store.d.ts +76 -0
- package/dist/knowledge/store.d.ts.map +1 -0
- package/dist/knowledge/store.js +230 -0
- package/dist/knowledge/store.js.map +1 -0
- package/dist/learning/confidence.d.ts +30 -0
- package/dist/learning/confidence.d.ts.map +1 -0
- package/dist/learning/confidence.js +165 -0
- package/dist/learning/confidence.js.map +1 -0
- package/dist/learning/patterns.d.ts +52 -0
- package/dist/learning/patterns.d.ts.map +1 -0
- package/dist/learning/patterns.js +290 -0
- package/dist/learning/patterns.js.map +1 -0
- package/dist/learning/trajectory.d.ts +55 -0
- package/dist/learning/trajectory.d.ts.map +1 -0
- package/dist/learning/trajectory.js +200 -0
- package/dist/learning/trajectory.js.map +1 -0
- package/dist/memory/memory-compat.d.ts +100 -0
- package/dist/memory/memory-compat.d.ts.map +1 -0
- package/dist/memory/memory-compat.js +146 -0
- package/dist/memory/memory-compat.js.map +1 -0
- package/dist/memory/observation-store.d.ts +57 -0
- package/dist/memory/observation-store.d.ts.map +1 -0
- package/dist/memory/observation-store.js +154 -0
- package/dist/memory/observation-store.js.map +1 -0
- package/dist/memory/session-tracker.d.ts +81 -0
- package/dist/memory/session-tracker.d.ts.map +1 -0
- package/dist/memory/session-tracker.js +262 -0
- package/dist/memory/session-tracker.js.map +1 -0
- package/dist/pipeline/engine.d.ts +179 -0
- package/dist/pipeline/engine.d.ts.map +1 -0
- package/dist/pipeline/engine.js +691 -0
- package/dist/pipeline/engine.js.map +1 -0
- package/dist/pipeline/events.d.ts +54 -0
- package/dist/pipeline/events.d.ts.map +1 -0
- package/dist/pipeline/events.js +157 -0
- package/dist/pipeline/events.js.map +1 -0
- package/dist/pipeline/parallel.d.ts +83 -0
- package/dist/pipeline/parallel.d.ts.map +1 -0
- package/dist/pipeline/parallel.js +277 -0
- package/dist/pipeline/parallel.js.map +1 -0
- package/dist/pipeline/state-machine.d.ts +65 -0
- package/dist/pipeline/state-machine.d.ts.map +1 -0
- package/dist/pipeline/state-machine.js +176 -0
- package/dist/pipeline/state-machine.js.map +1 -0
- package/dist/query/graph-queries.d.ts +84 -0
- package/dist/query/graph-queries.d.ts.map +1 -0
- package/dist/query/graph-queries.js +216 -0
- package/dist/query/graph-queries.js.map +1 -0
- package/dist/query/hybrid-search.d.ts +34 -0
- package/dist/query/hybrid-search.d.ts.map +1 -0
- package/dist/query/hybrid-search.js +263 -0
- package/dist/query/hybrid-search.js.map +1 -0
- package/dist/query/intent-detector.d.ts +35 -0
- package/dist/query/intent-detector.d.ts.map +1 -0
- package/dist/query/intent-detector.js +115 -0
- package/dist/query/intent-detector.js.map +1 -0
- package/dist/query/ranking.d.ts +57 -0
- package/dist/query/ranking.d.ts.map +1 -0
- package/dist/query/ranking.js +109 -0
- package/dist/query/ranking.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +291 -0
- package/dist/server.js.map +1 -0
- package/dist/storage/falkordb-store.d.ts +73 -0
- package/dist/storage/falkordb-store.d.ts.map +1 -0
- package/dist/storage/falkordb-store.js +346 -0
- package/dist/storage/falkordb-store.js.map +1 -0
- package/dist/storage/file-cache.d.ts +32 -0
- package/dist/storage/file-cache.d.ts.map +1 -0
- package/dist/storage/file-cache.js +115 -0
- package/dist/storage/file-cache.js.map +1 -0
- package/dist/storage/interfaces.d.ts +151 -0
- package/dist/storage/interfaces.d.ts.map +1 -0
- package/dist/storage/interfaces.js +7 -0
- package/dist/storage/interfaces.js.map +1 -0
- package/dist/storage/qdrant-store.d.ts +110 -0
- package/dist/storage/qdrant-store.d.ts.map +1 -0
- package/dist/storage/qdrant-store.js +467 -0
- package/dist/storage/qdrant-store.js.map +1 -0
- package/dist/storage/schema.d.ts +4 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage/schema.js +136 -0
- package/dist/storage/schema.js.map +1 -0
- package/dist/storage/sqlite.d.ts +35 -0
- package/dist/storage/sqlite.d.ts.map +1 -0
- package/dist/storage/sqlite.js +132 -0
- package/dist/storage/sqlite.js.map +1 -0
- package/dist/tools/collaboration-tools.d.ts +111 -0
- package/dist/tools/collaboration-tools.d.ts.map +1 -0
- package/dist/tools/collaboration-tools.js +174 -0
- package/dist/tools/collaboration-tools.js.map +1 -0
- package/dist/tools/context-tools.d.ts +293 -0
- package/dist/tools/context-tools.d.ts.map +1 -0
- package/dist/tools/context-tools.js +437 -0
- package/dist/tools/context-tools.js.map +1 -0
- package/dist/tools/graph-tools.d.ts +129 -0
- package/dist/tools/graph-tools.d.ts.map +1 -0
- package/dist/tools/graph-tools.js +237 -0
- package/dist/tools/graph-tools.js.map +1 -0
- package/dist/tools/ingestion-tools.d.ts +96 -0
- package/dist/tools/ingestion-tools.d.ts.map +1 -0
- package/dist/tools/ingestion-tools.js +90 -0
- package/dist/tools/ingestion-tools.js.map +1 -0
- package/dist/tools/learning-tools.d.ts +168 -0
- package/dist/tools/learning-tools.d.ts.map +1 -0
- package/dist/tools/learning-tools.js +158 -0
- package/dist/tools/learning-tools.js.map +1 -0
- package/dist/tools/memory-tools.d.ts +183 -0
- package/dist/tools/memory-tools.d.ts.map +1 -0
- package/dist/tools/memory-tools.js +197 -0
- package/dist/tools/memory-tools.js.map +1 -0
- package/dist/tools/phase-tools.d.ts +954 -0
- package/dist/tools/phase-tools.d.ts.map +1 -0
- package/dist/tools/phase-tools.js +1215 -0
- package/dist/tools/phase-tools.js.map +1 -0
- package/dist/tools/pipeline-tools.d.ts +140 -0
- package/dist/tools/pipeline-tools.d.ts.map +1 -0
- package/dist/tools/pipeline-tools.js +162 -0
- package/dist/tools/pipeline-tools.js.map +1 -0
- package/dist/tools/registration-tools.d.ts +220 -0
- package/dist/tools/registration-tools.d.ts.map +1 -0
- package/dist/tools/registration-tools.js +391 -0
- package/dist/tools/registration-tools.js.map +1 -0
- package/dist/util/circuit-breaker.d.ts +75 -0
- package/dist/util/circuit-breaker.d.ts.map +1 -0
- package/dist/util/circuit-breaker.js +159 -0
- package/dist/util/circuit-breaker.js.map +1 -0
- package/dist/util/config.d.ts +23 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js +164 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/logger.d.ts +13 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +45 -0
- package/dist/util/logger.js.map +1 -0
- package/dist/util/token-counter.d.ts +24 -0
- package/dist/util/token-counter.d.ts.map +1 -0
- package/dist/util/token-counter.js +48 -0
- package/dist/util/token-counter.js.map +1 -0
- package/dist/util/types.d.ts +525 -0
- package/dist/util/types.d.ts.map +1 -0
- package/dist/util/types.js +5 -0
- package/dist/util/types.js.map +1 -0
- package/docker-compose.yml +20 -0
- package/docs/plans/2026-02-27-swarm-coordination/architecture.md +203 -0
- package/docs/plans/2026-02-27-swarm-coordination/vision.md +57 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/architecture.md +1 -0
- package/docs/plans/completed/2026-02-26-forge-plugin-bundling/vision.md +300 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/architecture.md +480 -0
- package/docs/plans/completed/2026-02-27-forge-swarm-learning/verification-checklist.md +462 -0
- package/docs/plans/completed/2026-02-27-git-history-atlassian/git-jira-plan.md +181 -0
- package/package.json +39 -0
- package/plugin/.claude-plugin/plugin.json +8 -0
- package/plugin/.mcp.json +15 -0
- package/plugin/README.md +134 -0
- package/plugin/agents/architect.md +367 -0
- package/plugin/agents/backend-specialist.md +263 -0
- package/plugin/agents/brainstormer.md +122 -0
- package/plugin/agents/data-specialist.md +266 -0
- package/plugin/agents/designer.md +408 -0
- package/plugin/agents/frontend-specialist.md +241 -0
- package/plugin/agents/inspector.md +406 -0
- package/plugin/agents/knowledge-keeper.md +443 -0
- package/plugin/agents/platform-engineer.md +326 -0
- package/plugin/agents/product-manager.md +268 -0
- package/plugin/agents/product-owner.md +438 -0
- package/plugin/agents/pulse-checker.md +73 -0
- package/plugin/agents/qa-strategist.md +500 -0
- package/plugin/agents/self-improver.md +310 -0
- package/plugin/agents/strategist.md +360 -0
- package/plugin/agents/supervisor.md +380 -0
- package/plugin/commands/brainstorm.md +25 -0
- package/plugin/commands/forge.md +88 -0
- package/plugin/docs/atlassian-integration.md +110 -0
- package/plugin/docs/workflow.md +126 -0
- package/plugin/skills/agent-development/.skillfish.json +10 -0
- package/plugin/skills/agent-development/SKILL.md +415 -0
- package/plugin/skills/agent-development/examples/agent-creation-prompt.md +238 -0
- package/plugin/skills/agent-development/examples/complete-agent-examples.md +427 -0
- package/plugin/skills/agent-development/references/agent-creation-system-prompt.md +207 -0
- package/plugin/skills/agent-development/references/system-prompt-design.md +411 -0
- package/plugin/skills/agent-development/references/triggering-examples.md +491 -0
- package/plugin/skills/agent-development/scripts/validate-agent.sh +217 -0
- package/plugin/skills/agent-handoff/SKILL.md +335 -0
- package/plugin/skills/anti-stub/SKILL.md +317 -0
- package/plugin/skills/brainstorm/SKILL.md +31 -0
- package/plugin/skills/debugging/SKILL.md +276 -0
- package/plugin/skills/fix/SKILL.md +62 -0
- package/plugin/skills/frontend-design/.skillfish.json +10 -0
- package/plugin/skills/frontend-design/SKILL.md +42 -0
- package/plugin/skills/gotchas/SKILL.md +61 -0
- package/plugin/skills/graph-orchestrator/SKILL.md +38 -0
- package/plugin/skills/history/SKILL.md +58 -0
- package/plugin/skills/impact/SKILL.md +59 -0
- package/plugin/skills/implementation-execution/SKILL.md +291 -0
- package/plugin/skills/index-repo/SKILL.md +55 -0
- package/plugin/skills/interviewing/SKILL.md +225 -0
- package/plugin/skills/knowledge-curation/SKILL.md +393 -0
- package/plugin/skills/learn/SKILL.md +69 -0
- package/plugin/skills/mcp-integration/.skillfish.json +10 -0
- package/plugin/skills/mcp-integration/SKILL.md +554 -0
- package/plugin/skills/mcp-integration/examples/http-server.json +20 -0
- package/plugin/skills/mcp-integration/examples/sse-server.json +19 -0
- package/plugin/skills/mcp-integration/examples/stdio-server.json +26 -0
- package/plugin/skills/mcp-integration/references/authentication.md +549 -0
- package/plugin/skills/mcp-integration/references/server-types.md +536 -0
- package/plugin/skills/mcp-integration/references/tool-usage.md +538 -0
- package/plugin/skills/nestjs/.skillfish.json +10 -0
- package/plugin/skills/nestjs/SKILL.md +669 -0
- package/plugin/skills/nestjs/drizzle-reference.md +1894 -0
- package/plugin/skills/nestjs/reference.md +1447 -0
- package/plugin/skills/nestjs/workflow-optimization.md +229 -0
- package/plugin/skills/parallel-dispatch/SKILL.md +308 -0
- package/plugin/skills/project-discovery/SKILL.md +304 -0
- package/plugin/skills/search/SKILL.md +56 -0
- package/plugin/skills/security-audit/SKILL.md +362 -0
- package/plugin/skills/skill-development/.skillfish.json +10 -0
- package/plugin/skills/skill-development/SKILL.md +637 -0
- package/plugin/skills/skill-development/references/skill-creator-original.md +209 -0
- package/plugin/skills/tdd/SKILL.md +273 -0
- package/plugin/skills/terminal-presentation/SKILL.md +395 -0
- package/plugin/skills/test-strategy/SKILL.md +365 -0
- package/plugin/skills/verification-protocol/SKILL.md +256 -0
- package/plugin/skills/visual-explainer/CHANGELOG.md +97 -0
- package/plugin/skills/visual-explainer/LICENSE +21 -0
- package/plugin/skills/visual-explainer/README.md +137 -0
- package/plugin/skills/visual-explainer/SKILL.md +352 -0
- package/plugin/skills/visual-explainer/banner.png +0 -0
- package/plugin/skills/visual-explainer/package.json +11 -0
- package/plugin/skills/visual-explainer/prompts/diff-review.md +68 -0
- package/plugin/skills/visual-explainer/prompts/fact-check.md +63 -0
- package/plugin/skills/visual-explainer/prompts/generate-slides.md +18 -0
- package/plugin/skills/visual-explainer/prompts/generate-web-diagram.md +10 -0
- package/plugin/skills/visual-explainer/prompts/plan-review.md +86 -0
- package/plugin/skills/visual-explainer/prompts/project-recap.md +61 -0
- package/plugin/skills/visual-explainer/references/css-patterns.md +1188 -0
- package/plugin/skills/visual-explainer/references/libraries.md +470 -0
- package/plugin/skills/visual-explainer/references/responsive-nav.md +212 -0
- package/plugin/skills/visual-explainer/references/slide-patterns.md +1403 -0
- package/plugin/skills/visual-explainer/templates/architecture.html +596 -0
- package/plugin/skills/visual-explainer/templates/data-table.html +540 -0
- package/plugin/skills/visual-explainer/templates/mermaid-flowchart.html +435 -0
- package/plugin/skills/visual-explainer/templates/slide-deck.html +913 -0
- package/src/cli.ts +655 -0
- package/src/context/.gitkeep +0 -0
- package/src/context/codebase.ts +393 -0
- package/src/context/injector.ts +797 -0
- package/src/context/memory.ts +187 -0
- package/src/context/session-index.ts +327 -0
- package/src/context/session.ts +152 -0
- package/src/index.ts +47 -0
- package/src/ingestion/.gitkeep +0 -0
- package/src/ingestion/chunker.ts +277 -0
- package/src/ingestion/embedder.ts +167 -0
- package/src/ingestion/git-analyzer.ts +545 -0
- package/src/ingestion/indexer.ts +984 -0
- package/src/ingestion/markdown-chunker.ts +337 -0
- package/src/ingestion/markdown-knowledge.ts +175 -0
- package/src/ingestion/parser.ts +475 -0
- package/src/ingestion/watcher.ts +182 -0
- package/src/knowledge/.gitkeep +0 -0
- package/src/knowledge/hydrator.ts +246 -0
- package/src/knowledge/registry.ts +463 -0
- package/src/knowledge/search.ts +565 -0
- package/src/knowledge/store.ts +262 -0
- package/src/learning/.gitkeep +0 -0
- package/src/learning/confidence.ts +193 -0
- package/src/learning/patterns.ts +360 -0
- package/src/learning/trajectory.ts +268 -0
- package/src/memory/.gitkeep +0 -0
- package/src/memory/memory-compat.ts +233 -0
- package/src/memory/observation-store.ts +224 -0
- package/src/memory/session-tracker.ts +332 -0
- package/src/pipeline/.gitkeep +0 -0
- package/src/pipeline/engine.ts +1139 -0
- package/src/pipeline/events.ts +253 -0
- package/src/pipeline/parallel.ts +394 -0
- package/src/pipeline/state-machine.ts +199 -0
- package/src/query/.gitkeep +0 -0
- package/src/query/graph-queries.ts +262 -0
- package/src/query/hybrid-search.ts +337 -0
- package/src/query/intent-detector.ts +131 -0
- package/src/query/ranking.ts +161 -0
- package/src/server.ts +352 -0
- package/src/storage/.gitkeep +0 -0
- package/src/storage/falkordb-store.ts +388 -0
- package/src/storage/file-cache.ts +141 -0
- package/src/storage/interfaces.ts +201 -0
- package/src/storage/qdrant-store.ts +557 -0
- package/src/storage/schema.ts +139 -0
- package/src/storage/sqlite.ts +168 -0
- package/src/tools/.gitkeep +0 -0
- package/src/tools/collaboration-tools.ts +208 -0
- package/src/tools/context-tools.ts +493 -0
- package/src/tools/graph-tools.ts +295 -0
- package/src/tools/ingestion-tools.ts +122 -0
- package/src/tools/learning-tools.ts +181 -0
- package/src/tools/memory-tools.ts +234 -0
- package/src/tools/phase-tools.ts +1452 -0
- package/src/tools/pipeline-tools.ts +188 -0
- package/src/tools/registration-tools.ts +450 -0
- package/src/util/.gitkeep +0 -0
- package/src/util/circuit-breaker.ts +193 -0
- package/src/util/config.ts +177 -0
- package/src/util/logger.ts +53 -0
- package/src/util/token-counter.ts +52 -0
- package/src/util/types.ts +710 -0
- package/tests/context/.gitkeep +0 -0
- package/tests/integration/.gitkeep +0 -0
- package/tests/knowledge/.gitkeep +0 -0
- package/tests/learning/.gitkeep +0 -0
- package/tests/pipeline/.gitkeep +0 -0
- package/tests/tools/.gitkeep +0 -0
- package/tsconfig.json +21 -0
- package/vitest.config.ts +10 -0
- package/vscode-extension/.vscodeignore +7 -0
- package/vscode-extension/README.md +43 -0
- package/vscode-extension/out/edge-collector.js +274 -0
- package/vscode-extension/out/edge-collector.js.map +1 -0
- package/vscode-extension/out/extension.js +264 -0
- package/vscode-extension/out/extension.js.map +1 -0
- package/vscode-extension/out/forge-client.js +318 -0
- package/vscode-extension/out/forge-client.js.map +1 -0
- package/vscode-extension/package-lock.json +59 -0
- package/vscode-extension/package.json +71 -0
- package/vscode-extension/src/edge-collector.ts +320 -0
- package/vscode-extension/src/extension.ts +269 -0
- package/vscode-extension/src/forge-client.ts +364 -0
- package/vscode-extension/tsconfig.json +19 -0
|
@@ -0,0 +1,913 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>API Gateway Redesign — Reference Slide Deck</title>
|
|
7
|
+
<!--
|
|
8
|
+
Reference template for the visual-explainer skill: slide decks.
|
|
9
|
+
Midnight Editorial preset — deep navy, serif display, warm gold accents.
|
|
10
|
+
Distinctly different from the terracotta (architecture), teal (mermaid),
|
|
11
|
+
and rose (data-table) templates so agents absorb variety.
|
|
12
|
+
Key patterns demonstrated:
|
|
13
|
+
- All 10 slide types in a cohesive narrative
|
|
14
|
+
- SlideEngine JS: keyboard/touch/wheel nav, progress bar, dots, counter, hints
|
|
15
|
+
- Cinematic transitions: fade + translateY + scale, staggered child reveals
|
|
16
|
+
- Per-slide background variation (gradient direction, accent glow position)
|
|
17
|
+
- Decorative SVG accents (corner marks, quote mark, divider)
|
|
18
|
+
- Typography scale: 120px display → 48px heading → 22px body → 14px label
|
|
19
|
+
- Compositional variety: centered, left-heavy, split, full-bleed
|
|
20
|
+
- Mermaid at presentation scale (18px labels, 2px edges, 8 nodes)
|
|
21
|
+
- Dark-first with light mode via prefers-color-scheme
|
|
22
|
+
- Responsive height breakpoints for projection and small viewports
|
|
23
|
+
- Nav chrome with backdrop blur for mixed-background visibility
|
|
24
|
+
- Event delegation: Mermaid zoom and table scroll don't trigger slide nav
|
|
25
|
+
- prefers-reduced-motion respected
|
|
26
|
+
-->
|
|
27
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
28
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
29
|
+
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
30
|
+
<style>
|
|
31
|
+
/* ============ THEME: Midnight Editorial ============ */
|
|
32
|
+
:root {
|
|
33
|
+
--font-body: 'Instrument Serif', Georgia, serif;
|
|
34
|
+
--font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
|
|
35
|
+
--bg: #0f1729;
|
|
36
|
+
--surface: #162040;
|
|
37
|
+
--surface2: #1d2b52;
|
|
38
|
+
--surface-elevated: #243362;
|
|
39
|
+
--border: rgba(200, 180, 140, 0.08);
|
|
40
|
+
--border-bright: rgba(200, 180, 140, 0.16);
|
|
41
|
+
--text: #e8e4d8;
|
|
42
|
+
--text-dim: #9a9484;
|
|
43
|
+
--accent: #d4a73a;
|
|
44
|
+
--accent-dim: rgba(212, 167, 58, 0.1);
|
|
45
|
+
--code-bg: #0a0f1e;
|
|
46
|
+
--code-text: #d4d0c4;
|
|
47
|
+
--green: #4ade80;
|
|
48
|
+
--green-dim: rgba(74, 222, 128, 0.1);
|
|
49
|
+
--red: #f87171;
|
|
50
|
+
--red-dim: rgba(248, 113, 113, 0.1);
|
|
51
|
+
--blue: #60a5fa;
|
|
52
|
+
--blue-dim: rgba(96, 165, 250, 0.1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-color-scheme: light) {
|
|
56
|
+
:root {
|
|
57
|
+
--bg: #faf8f2;
|
|
58
|
+
--surface: #ffffff;
|
|
59
|
+
--surface2: #f5f0e6;
|
|
60
|
+
--surface-elevated: #fffdf5;
|
|
61
|
+
--border: rgba(30, 30, 50, 0.08);
|
|
62
|
+
--border-bright: rgba(30, 30, 50, 0.16);
|
|
63
|
+
--text: #1a1814;
|
|
64
|
+
--text-dim: #7a7468;
|
|
65
|
+
--accent: #b8860b;
|
|
66
|
+
--accent-dim: rgba(184, 134, 11, 0.08);
|
|
67
|
+
--code-bg: #2a2520;
|
|
68
|
+
--code-text: #e8e4d8;
|
|
69
|
+
--green: #16a34a;
|
|
70
|
+
--green-dim: rgba(22, 163, 74, 0.08);
|
|
71
|
+
--red: #dc2626;
|
|
72
|
+
--red-dim: rgba(220, 38, 38, 0.08);
|
|
73
|
+
--blue: #2563eb;
|
|
74
|
+
--blue-dim: rgba(37, 99, 235, 0.08);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
79
|
+
|
|
80
|
+
body {
|
|
81
|
+
font-family: var(--font-body);
|
|
82
|
+
color: var(--text);
|
|
83
|
+
background: var(--bg);
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ============ DECK ENGINE ============ */
|
|
88
|
+
.deck {
|
|
89
|
+
height: 100dvh;
|
|
90
|
+
overflow-y: auto;
|
|
91
|
+
scroll-snap-type: y mandatory;
|
|
92
|
+
scroll-behavior: smooth;
|
|
93
|
+
-webkit-overflow-scrolling: touch;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.slide {
|
|
97
|
+
height: 100dvh;
|
|
98
|
+
scroll-snap-align: start;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
position: relative;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
padding: clamp(40px, 6vh, 80px) clamp(40px, 8vw, 120px);
|
|
105
|
+
isolation: isolate;
|
|
106
|
+
opacity: 0;
|
|
107
|
+
transform: translateY(40px) scale(0.98);
|
|
108
|
+
transition:
|
|
109
|
+
opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
|
|
110
|
+
transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.slide.visible {
|
|
114
|
+
opacity: 1;
|
|
115
|
+
transform: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.slide .reveal {
|
|
119
|
+
opacity: 0;
|
|
120
|
+
transform: translateY(20px);
|
|
121
|
+
transition:
|
|
122
|
+
opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
|
|
123
|
+
transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.slide.visible .reveal { opacity: 1; transform: none; }
|
|
127
|
+
.slide.visible .reveal:nth-child(1) { transition-delay: 0.1s; }
|
|
128
|
+
.slide.visible .reveal:nth-child(2) { transition-delay: 0.2s; }
|
|
129
|
+
.slide.visible .reveal:nth-child(3) { transition-delay: 0.3s; }
|
|
130
|
+
.slide.visible .reveal:nth-child(4) { transition-delay: 0.4s; }
|
|
131
|
+
.slide.visible .reveal:nth-child(5) { transition-delay: 0.5s; }
|
|
132
|
+
.slide.visible .reveal:nth-child(6) { transition-delay: 0.6s; }
|
|
133
|
+
|
|
134
|
+
@media (prefers-reduced-motion: reduce) {
|
|
135
|
+
.slide, .slide .reveal {
|
|
136
|
+
opacity: 1 !important;
|
|
137
|
+
transform: none !important;
|
|
138
|
+
transition: none !important;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* ============ NAV CHROME ============ */
|
|
143
|
+
.deck-progress {
|
|
144
|
+
position: fixed; top: 0; left: 0; height: 3px;
|
|
145
|
+
background: var(--accent); z-index: 100;
|
|
146
|
+
transition: width 0.3s ease; pointer-events: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.deck-dots {
|
|
150
|
+
position: fixed; right: clamp(12px, 2vw, 24px); top: 50%;
|
|
151
|
+
transform: translateY(-50%); display: flex; flex-direction: column;
|
|
152
|
+
gap: 8px; z-index: 100; padding: 8px;
|
|
153
|
+
background: color-mix(in srgb, var(--bg) 60%, transparent 40%);
|
|
154
|
+
border-radius: 20px;
|
|
155
|
+
backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.deck-dot {
|
|
159
|
+
width: 8px; height: 8px; border-radius: 50%;
|
|
160
|
+
background: var(--text-dim); opacity: 0.3; border: none; padding: 0;
|
|
161
|
+
cursor: pointer; transition: opacity 0.2s ease, transform 0.2s ease;
|
|
162
|
+
}
|
|
163
|
+
.deck-dot:hover { opacity: 0.6; }
|
|
164
|
+
.deck-dot.active { opacity: 1; transform: scale(1.5); background: var(--accent); }
|
|
165
|
+
|
|
166
|
+
.deck-counter {
|
|
167
|
+
position: fixed; bottom: clamp(12px, 2vh, 24px); right: clamp(12px, 2vw, 24px);
|
|
168
|
+
font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
|
|
169
|
+
z-index: 100; font-variant-numeric: tabular-nums;
|
|
170
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.deck-hints {
|
|
174
|
+
position: fixed; bottom: clamp(12px, 2vh, 24px); left: 50%;
|
|
175
|
+
transform: translateX(-50%); font-family: var(--font-mono);
|
|
176
|
+
font-size: 11px; color: var(--text-dim); opacity: 0.6; z-index: 100;
|
|
177
|
+
transition: opacity 0.5s ease; white-space: nowrap;
|
|
178
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
179
|
+
}
|
|
180
|
+
.deck-hints.faded { opacity: 0; pointer-events: none; }
|
|
181
|
+
|
|
182
|
+
/* ============ SHARED SLIDE ELEMENTS ============ */
|
|
183
|
+
.slide__display {
|
|
184
|
+
font-size: clamp(48px, 10vw, 120px);
|
|
185
|
+
font-weight: 400;
|
|
186
|
+
letter-spacing: -2px;
|
|
187
|
+
line-height: 0.95;
|
|
188
|
+
text-wrap: balance;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.slide__heading {
|
|
192
|
+
font-size: clamp(28px, 5vw, 48px);
|
|
193
|
+
font-weight: 400;
|
|
194
|
+
letter-spacing: -0.5px;
|
|
195
|
+
line-height: 1.15;
|
|
196
|
+
text-wrap: balance;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.slide__body {
|
|
200
|
+
font-size: clamp(16px, 2.2vw, 22px);
|
|
201
|
+
line-height: 1.6;
|
|
202
|
+
color: var(--text-dim);
|
|
203
|
+
text-wrap: pretty;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.slide__subtitle {
|
|
207
|
+
font-family: var(--font-mono);
|
|
208
|
+
font-size: clamp(12px, 1.5vw, 18px);
|
|
209
|
+
color: var(--text-dim);
|
|
210
|
+
letter-spacing: 1px;
|
|
211
|
+
text-transform: uppercase;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.slide__label {
|
|
215
|
+
font-family: var(--font-mono);
|
|
216
|
+
font-size: clamp(10px, 1.2vw, 13px);
|
|
217
|
+
font-weight: 600;
|
|
218
|
+
text-transform: uppercase;
|
|
219
|
+
letter-spacing: 1.5px;
|
|
220
|
+
color: var(--accent);
|
|
221
|
+
margin-bottom: 12px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* ============ DECORATIVE SVG ============ */
|
|
225
|
+
.slide__decor {
|
|
226
|
+
position: absolute;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
z-index: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* ============ SLIDE TYPE: TITLE ============ */
|
|
232
|
+
.slide--title {
|
|
233
|
+
justify-content: center;
|
|
234
|
+
align-items: center;
|
|
235
|
+
text-align: center;
|
|
236
|
+
background-image: radial-gradient(ellipse at 50% 30%, var(--accent-dim) 0%, transparent 50%);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.slide--title .slide__display { color: var(--accent); }
|
|
240
|
+
|
|
241
|
+
/* ============ SLIDE TYPE: DIVIDER ============ */
|
|
242
|
+
.slide--divider { justify-content: center; }
|
|
243
|
+
|
|
244
|
+
.slide--divider .slide__number {
|
|
245
|
+
font-size: clamp(100px, 22vw, 260px);
|
|
246
|
+
font-weight: 200;
|
|
247
|
+
line-height: 0.85;
|
|
248
|
+
opacity: 0.06;
|
|
249
|
+
position: absolute;
|
|
250
|
+
top: 50%; left: 50%;
|
|
251
|
+
transform: translate(-50%, -55%);
|
|
252
|
+
pointer-events: none;
|
|
253
|
+
font-variant-numeric: tabular-nums;
|
|
254
|
+
color: var(--accent);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* ============ SLIDE TYPE: CONTENT ============ */
|
|
258
|
+
.slide--content .slide__inner {
|
|
259
|
+
display: grid;
|
|
260
|
+
grid-template-columns: 3fr 2fr;
|
|
261
|
+
gap: clamp(24px, 4vw, 60px);
|
|
262
|
+
align-items: center;
|
|
263
|
+
width: 100%;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.slide__bullets {
|
|
267
|
+
list-style: none;
|
|
268
|
+
padding: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.slide__bullets li {
|
|
272
|
+
padding: 10px 0 10px 24px;
|
|
273
|
+
position: relative;
|
|
274
|
+
font-size: clamp(16px, 2vw, 22px);
|
|
275
|
+
line-height: 1.5;
|
|
276
|
+
color: var(--text-dim);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.slide__bullets li::before {
|
|
280
|
+
content: '';
|
|
281
|
+
position: absolute;
|
|
282
|
+
left: 0; top: 20px;
|
|
283
|
+
width: 6px; height: 6px;
|
|
284
|
+
border-radius: 50%;
|
|
285
|
+
background: var(--accent);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.slide__aside {
|
|
289
|
+
display: flex;
|
|
290
|
+
align-items: center;
|
|
291
|
+
justify-content: center;
|
|
292
|
+
min-height: 200px;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/* ============ SLIDE TYPE: SPLIT ============ */
|
|
296
|
+
.slide--split { padding: 0; }
|
|
297
|
+
|
|
298
|
+
.slide--split .slide__panels {
|
|
299
|
+
display: grid;
|
|
300
|
+
grid-template-columns: 3fr 2fr;
|
|
301
|
+
height: 100%;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.slide--split .slide__panel {
|
|
305
|
+
padding: clamp(40px, 6vh, 80px) clamp(32px, 4vw, 60px);
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: column;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.slide--split .slide__panel--primary { background: var(--surface); }
|
|
312
|
+
.slide--split .slide__panel--secondary {
|
|
313
|
+
background: var(--surface2);
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-direction: column;
|
|
316
|
+
gap: 12px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/* ============ SLIDE TYPE: DIAGRAM ============ */
|
|
320
|
+
.slide--diagram {
|
|
321
|
+
padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 60px);
|
|
322
|
+
}
|
|
323
|
+
.slide--diagram .slide__heading { margin-bottom: clamp(8px, 1.5vh, 20px); }
|
|
324
|
+
|
|
325
|
+
.mermaid-wrap {
|
|
326
|
+
position: relative;
|
|
327
|
+
background: var(--surface);
|
|
328
|
+
border: 1px solid var(--border);
|
|
329
|
+
border-radius: 12px;
|
|
330
|
+
padding: 24px;
|
|
331
|
+
overflow: auto;
|
|
332
|
+
flex: 1;
|
|
333
|
+
min-height: 0;
|
|
334
|
+
scrollbar-width: thin;
|
|
335
|
+
scrollbar-color: var(--border) transparent;
|
|
336
|
+
}
|
|
337
|
+
.mermaid-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
338
|
+
.mermaid-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
|
339
|
+
|
|
340
|
+
.mermaid-wrap .mermaid {
|
|
341
|
+
transition: transform 0.2s ease;
|
|
342
|
+
transform-origin: top center;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.zoom-controls {
|
|
346
|
+
position: absolute; top: 8px; right: 8px;
|
|
347
|
+
display: flex; gap: 2px; z-index: 10;
|
|
348
|
+
background: var(--surface); border: 1px solid var(--border);
|
|
349
|
+
border-radius: 6px; padding: 2px;
|
|
350
|
+
}
|
|
351
|
+
.zoom-controls button {
|
|
352
|
+
width: 28px; height: 28px; border: none; background: transparent;
|
|
353
|
+
color: var(--text-dim); font-family: var(--font-mono); font-size: 14px;
|
|
354
|
+
cursor: pointer; border-radius: 4px;
|
|
355
|
+
display: flex; align-items: center; justify-content: center;
|
|
356
|
+
transition: background 0.15s, color 0.15s;
|
|
357
|
+
}
|
|
358
|
+
.zoom-controls button:hover { background: var(--border); color: var(--text); }
|
|
359
|
+
.mermaid-wrap.is-zoomed { cursor: grab; }
|
|
360
|
+
.mermaid-wrap.is-panning { cursor: grabbing; user-select: none; }
|
|
361
|
+
|
|
362
|
+
.mermaid .nodeLabel { color: var(--text) !important; }
|
|
363
|
+
.mermaid .edgeLabel { color: var(--text-dim) !important; background-color: var(--bg) !important; }
|
|
364
|
+
.mermaid .edgeLabel rect { fill: var(--bg) !important; }
|
|
365
|
+
.slide--diagram .mermaid svg {
|
|
366
|
+
width: 100% !important;
|
|
367
|
+
height: auto !important;
|
|
368
|
+
max-width: 100% !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.slide--diagram .mermaid .nodeLabel { font-size: 18px !important; }
|
|
372
|
+
.slide--diagram .mermaid .edgeLabel { font-family: var(--font-mono) !important; font-size: 14px !important; }
|
|
373
|
+
.slide--diagram .mermaid .node rect,
|
|
374
|
+
.slide--diagram .mermaid .node circle,
|
|
375
|
+
.slide--diagram .mermaid .node polygon { stroke-width: 2px; }
|
|
376
|
+
.slide--diagram .mermaid .edge-pattern-solid { stroke-width: 2px; }
|
|
377
|
+
|
|
378
|
+
/* ============ SLIDE TYPE: DASHBOARD ============ */
|
|
379
|
+
.slide--dashboard .slide__kpis {
|
|
380
|
+
display: grid;
|
|
381
|
+
grid-template-columns: repeat(auto-fit, minmax(clamp(140px, 20vw, 220px), 1fr));
|
|
382
|
+
gap: clamp(12px, 2vw, 24px);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.slide__kpi {
|
|
386
|
+
background: var(--surface);
|
|
387
|
+
border: 1px solid var(--border);
|
|
388
|
+
border-radius: 12px;
|
|
389
|
+
padding: clamp(16px, 3vh, 32px) clamp(16px, 2vw, 24px);
|
|
390
|
+
min-width: 0;
|
|
391
|
+
overflow: hidden;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.slide__kpi-val {
|
|
395
|
+
font-size: clamp(36px, 6vw, 64px);
|
|
396
|
+
font-weight: 400;
|
|
397
|
+
letter-spacing: -1.5px;
|
|
398
|
+
line-height: 1.1;
|
|
399
|
+
font-variant-numeric: tabular-nums;
|
|
400
|
+
white-space: nowrap;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.slide__kpi-label {
|
|
404
|
+
font-family: var(--font-mono);
|
|
405
|
+
font-size: clamp(9px, 1.2vw, 13px);
|
|
406
|
+
font-weight: 600;
|
|
407
|
+
text-transform: uppercase;
|
|
408
|
+
letter-spacing: 1.5px;
|
|
409
|
+
color: var(--text-dim);
|
|
410
|
+
margin-top: 8px;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.slide__kpi-trend {
|
|
414
|
+
font-family: var(--font-mono);
|
|
415
|
+
font-size: 12px;
|
|
416
|
+
margin-top: 4px;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* ============ SLIDE TYPE: TABLE ============ */
|
|
420
|
+
.slide--table { padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 60px); }
|
|
421
|
+
|
|
422
|
+
.table-wrap {
|
|
423
|
+
background: var(--surface);
|
|
424
|
+
border: 1px solid var(--border);
|
|
425
|
+
border-radius: 12px;
|
|
426
|
+
overflow: hidden;
|
|
427
|
+
flex: 1;
|
|
428
|
+
min-height: 0;
|
|
429
|
+
}
|
|
430
|
+
.table-scroll { overflow-x: auto; }
|
|
431
|
+
|
|
432
|
+
.data-table { width: 100%; border-collapse: collapse; }
|
|
433
|
+
|
|
434
|
+
.data-table th {
|
|
435
|
+
background: var(--surface2);
|
|
436
|
+
font-family: var(--font-mono);
|
|
437
|
+
font-size: clamp(10px, 1.3vw, 14px);
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
text-transform: uppercase;
|
|
440
|
+
letter-spacing: 1px;
|
|
441
|
+
color: var(--text-dim);
|
|
442
|
+
text-align: left;
|
|
443
|
+
padding: clamp(10px, 1.5vh, 16px) clamp(14px, 2vw, 24px);
|
|
444
|
+
border-bottom: 2px solid var(--border-bright);
|
|
445
|
+
white-space: nowrap;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.data-table td {
|
|
449
|
+
padding: clamp(10px, 1.5vh, 16px) clamp(14px, 2vw, 24px);
|
|
450
|
+
border-bottom: 1px solid var(--border);
|
|
451
|
+
font-size: clamp(14px, 1.8vw, 20px);
|
|
452
|
+
vertical-align: top;
|
|
453
|
+
}
|
|
454
|
+
.data-table tbody tr:last-child td { border-bottom: none; }
|
|
455
|
+
.data-table tbody tr:nth-child(even) { background: var(--surface2); }
|
|
456
|
+
.data-table tbody tr { transition: background 0.15s; }
|
|
457
|
+
.data-table tbody tr:hover { background: var(--accent-dim); }
|
|
458
|
+
.data-table code {
|
|
459
|
+
font-family: var(--font-mono); font-size: 0.85em;
|
|
460
|
+
background: var(--accent-dim); color: var(--accent);
|
|
461
|
+
padding: 1px 5px; border-radius: 3px;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* ============ SLIDE TYPE: CODE ============ */
|
|
465
|
+
.slide--code { align-items: center; }
|
|
466
|
+
|
|
467
|
+
.slide__code-block {
|
|
468
|
+
background: var(--code-bg);
|
|
469
|
+
border: 1px solid var(--border);
|
|
470
|
+
border-radius: 12px;
|
|
471
|
+
padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 48px);
|
|
472
|
+
max-width: 900px;
|
|
473
|
+
width: 100%;
|
|
474
|
+
position: relative;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.slide__code-filename {
|
|
478
|
+
position: absolute;
|
|
479
|
+
top: -12px; left: 24px;
|
|
480
|
+
font-family: var(--font-mono);
|
|
481
|
+
font-size: 11px; font-weight: 600;
|
|
482
|
+
padding: 4px 12px; border-radius: 4px;
|
|
483
|
+
background: var(--accent); color: var(--bg);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.slide__code-block pre { margin: 0; overflow-x: auto; }
|
|
487
|
+
.slide__code-block code {
|
|
488
|
+
font-family: var(--font-mono);
|
|
489
|
+
font-size: clamp(14px, 1.6vw, 18px);
|
|
490
|
+
line-height: 1.7;
|
|
491
|
+
color: var(--code-text);
|
|
492
|
+
}
|
|
493
|
+
.slide__code-block .hl { color: var(--accent); }
|
|
494
|
+
.slide__code-block .cm { color: var(--text-dim); }
|
|
495
|
+
|
|
496
|
+
/* ============ SLIDE TYPE: QUOTE ============ */
|
|
497
|
+
.slide--quote {
|
|
498
|
+
justify-content: center;
|
|
499
|
+
align-items: center;
|
|
500
|
+
text-align: center;
|
|
501
|
+
padding: clamp(60px, 10vh, 120px) clamp(60px, 12vw, 200px);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.slide__quote-mark {
|
|
505
|
+
font-size: clamp(80px, 14vw, 180px);
|
|
506
|
+
line-height: 0.5;
|
|
507
|
+
opacity: 0.06;
|
|
508
|
+
font-family: Georgia, serif;
|
|
509
|
+
pointer-events: none;
|
|
510
|
+
margin-bottom: -20px;
|
|
511
|
+
color: var(--accent);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.slide--quote blockquote {
|
|
515
|
+
font-size: clamp(24px, 4vw, 48px);
|
|
516
|
+
font-weight: 400;
|
|
517
|
+
line-height: 1.35;
|
|
518
|
+
font-style: italic;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.slide--quote cite {
|
|
522
|
+
font-family: var(--font-mono);
|
|
523
|
+
font-size: clamp(11px, 1.4vw, 14px);
|
|
524
|
+
font-style: normal;
|
|
525
|
+
margin-top: clamp(16px, 3vh, 32px);
|
|
526
|
+
display: block;
|
|
527
|
+
letter-spacing: 1.5px;
|
|
528
|
+
text-transform: uppercase;
|
|
529
|
+
color: var(--text-dim);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* ============ SLIDE TYPE: FULL-BLEED ============ */
|
|
533
|
+
.slide--bleed {
|
|
534
|
+
padding: 0;
|
|
535
|
+
justify-content: flex-end;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.slide__bg {
|
|
539
|
+
position: absolute; inset: 0;
|
|
540
|
+
background-size: cover; background-position: center;
|
|
541
|
+
z-index: 0;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.slide__bg--gradient {
|
|
545
|
+
background: linear-gradient(135deg, #1a0f3c 0%, #0f1729 40%, #162040 100%);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.slide__scrim {
|
|
549
|
+
position: absolute; inset: 0;
|
|
550
|
+
background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
|
|
551
|
+
z-index: 1;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.slide--bleed .slide__content {
|
|
555
|
+
position: relative; z-index: 2;
|
|
556
|
+
padding: clamp(40px, 6vh, 80px) clamp(40px, 8vw, 120px);
|
|
557
|
+
color: #ffffff;
|
|
558
|
+
}
|
|
559
|
+
.slide--bleed .slide__heading { color: #ffffff; }
|
|
560
|
+
.slide--bleed .slide__subtitle { color: rgba(255,255,255,0.7); }
|
|
561
|
+
|
|
562
|
+
/* ============ RESPONSIVE ============ */
|
|
563
|
+
@media (max-height: 700px) {
|
|
564
|
+
.slide { padding: clamp(24px, 4vh, 40px) clamp(32px, 6vw, 80px); }
|
|
565
|
+
.slide__display { font-size: clamp(36px, 8vw, 72px); }
|
|
566
|
+
.slide--divider .slide__number { font-size: clamp(80px, 16vw, 160px); }
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
@media (max-height: 600px) {
|
|
570
|
+
.slide__decor { display: none; }
|
|
571
|
+
.slide--quote { padding: clamp(32px, 6vh, 60px) clamp(40px, 8vw, 100px); }
|
|
572
|
+
.slide__quote-mark { display: none; }
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@media (max-height: 500px) {
|
|
576
|
+
.slide { padding: clamp(16px, 3vh, 24px) clamp(24px, 5vw, 48px); }
|
|
577
|
+
.deck-dots { display: none; }
|
|
578
|
+
.slide__display { font-size: clamp(28px, 7vw, 48px); }
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
@media (max-width: 768px) {
|
|
582
|
+
.slide--content .slide__inner { grid-template-columns: 1fr; }
|
|
583
|
+
.slide--content .slide__aside { display: none; }
|
|
584
|
+
.slide--split .slide__panels { grid-template-columns: 1fr; }
|
|
585
|
+
.slide--dashboard .slide__kpis { grid-template-columns: repeat(2, 1fr); }
|
|
586
|
+
}
|
|
587
|
+
</style>
|
|
588
|
+
</head>
|
|
589
|
+
<body>
|
|
590
|
+
|
|
591
|
+
<div class="deck">
|
|
592
|
+
|
|
593
|
+
<!-- SLIDE 1: TITLE -->
|
|
594
|
+
<section class="slide slide--title">
|
|
595
|
+
<svg class="slide__decor" style="top:0;right:0;" width="120" height="120" viewBox="0 0 120 120">
|
|
596
|
+
<line x1="120" y1="0" x2="120" y2="40" stroke="var(--accent)" stroke-width="2" opacity="0.15"/>
|
|
597
|
+
<line x1="80" y1="0" x2="120" y2="0" stroke="var(--accent)" stroke-width="2" opacity="0.15"/>
|
|
598
|
+
</svg>
|
|
599
|
+
<svg class="slide__decor" style="bottom:0;left:0;" width="120" height="120" viewBox="0 0 120 120">
|
|
600
|
+
<line x1="0" y1="80" x2="0" y2="120" stroke="var(--accent)" stroke-width="2" opacity="0.15"/>
|
|
601
|
+
<line x1="0" y1="120" x2="40" y2="120" stroke="var(--accent)" stroke-width="2" opacity="0.15"/>
|
|
602
|
+
</svg>
|
|
603
|
+
<div class="reveal">
|
|
604
|
+
<p class="slide__subtitle" style="margin-bottom:clamp(16px,2vh,32px);">Engineering Review — Q1 2026</p>
|
|
605
|
+
</div>
|
|
606
|
+
<h1 class="slide__display reveal">API Gateway Redesign</h1>
|
|
607
|
+
<div class="reveal">
|
|
608
|
+
<p class="slide__subtitle" style="margin-top:clamp(16px,2vh,32px);">From monolith proxy to edge-native routing</p>
|
|
609
|
+
</div>
|
|
610
|
+
</section>
|
|
611
|
+
|
|
612
|
+
<!-- SLIDE 2: SECTION DIVIDER -->
|
|
613
|
+
<section class="slide slide--divider" style="background-image:radial-gradient(ellipse at 80% 60%, var(--accent-dim) 0%, transparent 40%);">
|
|
614
|
+
<span class="slide__number">01</span>
|
|
615
|
+
<div>
|
|
616
|
+
<h2 class="slide__heading reveal">The Problem</h2>
|
|
617
|
+
<p class="slide__subtitle reveal" style="margin-top:12px;">Why the current gateway can't scale</p>
|
|
618
|
+
</div>
|
|
619
|
+
</section>
|
|
620
|
+
|
|
621
|
+
<!-- SLIDE 3: CONTENT (left-heavy asymmetric) -->
|
|
622
|
+
<section class="slide slide--content" style="background-image:radial-gradient(ellipse at 20% 80%, var(--accent-dim) 0%, transparent 45%);">
|
|
623
|
+
<div class="slide__inner">
|
|
624
|
+
<div>
|
|
625
|
+
<p class="slide__label reveal">Current State</p>
|
|
626
|
+
<h2 class="slide__heading reveal">Single Point of Failure</h2>
|
|
627
|
+
<ul class="slide__bullets">
|
|
628
|
+
<li class="reveal">All traffic routes through one Node.js process</li>
|
|
629
|
+
<li class="reveal">Rate limiting is per-instance, not distributed</li>
|
|
630
|
+
<li class="reveal">Auth validation adds 40ms per request</li>
|
|
631
|
+
<li class="reveal">No circuit breaking — cascade failures hit everything</li>
|
|
632
|
+
</ul>
|
|
633
|
+
</div>
|
|
634
|
+
<div class="slide__aside reveal">
|
|
635
|
+
<svg viewBox="0 0 160 160" width="160" height="160">
|
|
636
|
+
<circle cx="80" cy="80" r="60" fill="none" stroke="var(--red)" stroke-width="2" opacity="0.3"/>
|
|
637
|
+
<circle cx="80" cy="80" r="40" fill="none" stroke="var(--red)" stroke-width="1.5" opacity="0.2" stroke-dasharray="4 4"/>
|
|
638
|
+
<circle cx="80" cy="80" r="8" fill="var(--red)" opacity="0.4"/>
|
|
639
|
+
<text x="80" y="130" text-anchor="middle" font-family="var(--font-mono)" font-size="11" fill="var(--text-dim)">SINGLE PROCESS</text>
|
|
640
|
+
</svg>
|
|
641
|
+
</div>
|
|
642
|
+
</div>
|
|
643
|
+
</section>
|
|
644
|
+
|
|
645
|
+
<!-- SLIDE 4: SPLIT (before/after) -->
|
|
646
|
+
<section class="slide slide--split">
|
|
647
|
+
<div class="slide__panels">
|
|
648
|
+
<div class="slide__panel slide__panel--primary">
|
|
649
|
+
<p class="slide__label reveal" style="color:var(--red);">Before</p>
|
|
650
|
+
<h2 class="slide__heading reveal" style="font-size:clamp(22px,3.5vw,36px);">Monolith Proxy</h2>
|
|
651
|
+
<ul class="slide__bullets" style="margin-top:16px;">
|
|
652
|
+
<li class="reveal">Express.js middleware chain</li>
|
|
653
|
+
<li class="reveal">In-memory rate limit counters</li>
|
|
654
|
+
<li class="reveal">Synchronous JWT validation</li>
|
|
655
|
+
<li class="reveal">Manual upstream health checks</li>
|
|
656
|
+
</ul>
|
|
657
|
+
</div>
|
|
658
|
+
<div class="slide__panel slide__panel--secondary">
|
|
659
|
+
<p class="slide__label reveal" style="color:var(--green);">After</p>
|
|
660
|
+
<h2 class="slide__heading reveal" style="font-size:clamp(22px,3.5vw,36px);">Edge-Native</h2>
|
|
661
|
+
<ul class="slide__bullets" style="margin-top:16px;">
|
|
662
|
+
<li class="reveal">Cloudflare Workers at the edge</li>
|
|
663
|
+
<li class="reveal">Durable Objects for distributed state</li>
|
|
664
|
+
<li class="reveal">Async JWT with key caching</li>
|
|
665
|
+
<li class="reveal">Automatic circuit breakers</li>
|
|
666
|
+
</ul>
|
|
667
|
+
</div>
|
|
668
|
+
</div>
|
|
669
|
+
</section>
|
|
670
|
+
|
|
671
|
+
<!-- SLIDE 5: SECTION DIVIDER -->
|
|
672
|
+
<section class="slide slide--divider" style="background-image:radial-gradient(ellipse at 30% 40%, var(--accent-dim) 0%, transparent 40%);">
|
|
673
|
+
<span class="slide__number">02</span>
|
|
674
|
+
<div>
|
|
675
|
+
<h2 class="slide__heading reveal">Architecture</h2>
|
|
676
|
+
<p class="slide__subtitle reveal" style="margin-top:12px;">How the new system works</p>
|
|
677
|
+
</div>
|
|
678
|
+
</section>
|
|
679
|
+
|
|
680
|
+
<!-- SLIDE 6: DIAGRAM -->
|
|
681
|
+
<section class="slide slide--diagram">
|
|
682
|
+
<h2 class="slide__heading reveal">Request Flow</h2>
|
|
683
|
+
<div class="mermaid-wrap reveal">
|
|
684
|
+
<div class="zoom-controls">
|
|
685
|
+
<button onclick="zoomDiagram(this,1.2)" title="Zoom in">+</button>
|
|
686
|
+
<button onclick="zoomDiagram(this,0.8)" title="Zoom out">−</button>
|
|
687
|
+
<button onclick="resetZoom(this)" title="Reset">↺</button>
|
|
688
|
+
</div>
|
|
689
|
+
<pre class="mermaid">
|
|
690
|
+
graph LR
|
|
691
|
+
Client["Client"] --> Edge["Edge Worker"]
|
|
692
|
+
Edge --> Auth["Auth Cache"]
|
|
693
|
+
Edge --> RL["Rate Limiter<br/>Durable Object"]
|
|
694
|
+
Edge --> Router["Route Resolver"]
|
|
695
|
+
Router --> API["API Service"]
|
|
696
|
+
Router --> Static["Static Assets"]
|
|
697
|
+
API --> DB["Database"]
|
|
698
|
+
|
|
699
|
+
classDef primary fill:#d4a73a22,stroke:#d4a73a,stroke-width:2px
|
|
700
|
+
classDef secondary fill:#60a5fa22,stroke:#60a5fa,stroke-width:2px
|
|
701
|
+
classDef storage fill:#4ade8022,stroke:#4ade80,stroke-width:2px
|
|
702
|
+
|
|
703
|
+
class Client,Edge primary
|
|
704
|
+
class Auth,RL,Router secondary
|
|
705
|
+
class API,Static,DB storage
|
|
706
|
+
</pre>
|
|
707
|
+
</div>
|
|
708
|
+
</section>
|
|
709
|
+
|
|
710
|
+
<!-- SLIDE 7: DASHBOARD -->
|
|
711
|
+
<section class="slide slide--dashboard" style="background-image:radial-gradient(ellipse at 70% 30%, var(--accent-dim) 0%, transparent 40%);">
|
|
712
|
+
<h2 class="slide__heading reveal">Performance Impact</h2>
|
|
713
|
+
<div class="slide__kpis">
|
|
714
|
+
<div class="slide__kpi reveal">
|
|
715
|
+
<div class="slide__kpi-val" style="color:var(--accent);">12ms</div>
|
|
716
|
+
<div class="slide__kpi-label">P99 Latency</div>
|
|
717
|
+
<div class="slide__kpi-trend" style="color:var(--green);">↓ from 142ms</div>
|
|
718
|
+
</div>
|
|
719
|
+
<div class="slide__kpi reveal">
|
|
720
|
+
<div class="slide__kpi-val" style="color:var(--green);">99.97%</div>
|
|
721
|
+
<div class="slide__kpi-label">Uptime</div>
|
|
722
|
+
<div class="slide__kpi-trend" style="color:var(--green);">↑ from 99.2%</div>
|
|
723
|
+
</div>
|
|
724
|
+
<div class="slide__kpi reveal">
|
|
725
|
+
<div class="slide__kpi-val" style="color:var(--blue);">340</div>
|
|
726
|
+
<div class="slide__kpi-label">Edge Locations</div>
|
|
727
|
+
<div class="slide__kpi-trend" style="color:var(--text-dim);">global coverage</div>
|
|
728
|
+
</div>
|
|
729
|
+
<div class="slide__kpi reveal">
|
|
730
|
+
<div class="slide__kpi-val" style="color:var(--accent);">$0.02</div>
|
|
731
|
+
<div class="slide__kpi-label">Per 10K Requests</div>
|
|
732
|
+
<div class="slide__kpi-trend" style="color:var(--green);">↓ 68% cost reduction</div>
|
|
733
|
+
</div>
|
|
734
|
+
</div>
|
|
735
|
+
</section>
|
|
736
|
+
|
|
737
|
+
<!-- SLIDE 8: TABLE -->
|
|
738
|
+
<section class="slide slide--table">
|
|
739
|
+
<h2 class="slide__heading reveal">Migration Phases</h2>
|
|
740
|
+
<div class="table-wrap reveal" style="flex:1; min-height:0; margin-top:clamp(8px,1.5vh,20px);">
|
|
741
|
+
<div class="table-scroll">
|
|
742
|
+
<table class="data-table">
|
|
743
|
+
<thead><tr><th>Phase</th><th>Scope</th><th>Timeline</th><th>Risk</th></tr></thead>
|
|
744
|
+
<tbody>
|
|
745
|
+
<tr><td>1. Shadow mode</td><td>Mirror traffic to edge, compare responses</td><td>Week 1–2</td><td style="color:var(--green);">Low</td></tr>
|
|
746
|
+
<tr><td>2. Canary rollout</td><td>5% traffic to edge, monitor errors</td><td>Week 3</td><td style="color:var(--green);">Low</td></tr>
|
|
747
|
+
<tr><td>3. Gradual shift</td><td>25% → 50% → 75% traffic</td><td>Week 4–5</td><td style="color:var(--accent);">Medium</td></tr>
|
|
748
|
+
<tr><td>4. Full cutover</td><td>100% traffic, decommission old proxy</td><td>Week 6</td><td style="color:var(--accent);">Medium</td></tr>
|
|
749
|
+
<tr><td>5. Cleanup</td><td>Remove feature flags, archive old code</td><td>Week 7</td><td style="color:var(--green);">Low</td></tr>
|
|
750
|
+
</tbody>
|
|
751
|
+
</table>
|
|
752
|
+
</div>
|
|
753
|
+
</div>
|
|
754
|
+
</section>
|
|
755
|
+
|
|
756
|
+
<!-- SLIDE 9: CODE -->
|
|
757
|
+
<section class="slide slide--code" style="background-image:radial-gradient(ellipse at 50% 80%, var(--accent-dim) 0%, transparent 40%);">
|
|
758
|
+
<h2 class="slide__heading reveal" style="text-align:center;">Edge Worker Entry Point</h2>
|
|
759
|
+
<div class="slide__code-block reveal" style="margin-top:clamp(12px,2vh,24px);">
|
|
760
|
+
<span class="slide__code-filename">gateway.ts</span>
|
|
761
|
+
<pre><code><span class="hl">export default</span> {
|
|
762
|
+
<span class="hl">async fetch</span>(req: Request, env: Env) {
|
|
763
|
+
<span class="cm">// Auth check with edge-cached keys</span>
|
|
764
|
+
const identity = <span class="hl">await</span> verifyAuth(req, env);
|
|
765
|
+
<span class="cm">// Distributed rate limiting</span>
|
|
766
|
+
const limit = env.RATE_LIMITER.get(identity.id);
|
|
767
|
+
<span class="hl">if</span> (<span class="hl">await</span> limit.check()) <span class="hl">return</span> tooMany();
|
|
768
|
+
<span class="cm">// Route to upstream</span>
|
|
769
|
+
<span class="hl">return</span> route(req, env.SERVICES);
|
|
770
|
+
}
|
|
771
|
+
};</code></pre>
|
|
772
|
+
</div>
|
|
773
|
+
</section>
|
|
774
|
+
|
|
775
|
+
<!-- SLIDE 10: QUOTE -->
|
|
776
|
+
<section class="slide slide--quote" style="background-image:radial-gradient(ellipse at 50% 50%, var(--accent-dim) 0%, transparent 35%);">
|
|
777
|
+
<div class="slide__quote-mark reveal">“</div>
|
|
778
|
+
<blockquote class="reveal">
|
|
779
|
+
The fastest request is the one that never leaves the edge.
|
|
780
|
+
</blockquote>
|
|
781
|
+
<cite class="reveal">— Edge Computing Principle</cite>
|
|
782
|
+
</section>
|
|
783
|
+
|
|
784
|
+
<!-- SLIDE 11: FULL-BLEED -->
|
|
785
|
+
<section class="slide slide--bleed">
|
|
786
|
+
<div class="slide__bg slide__bg--gradient"></div>
|
|
787
|
+
<div class="slide__scrim"></div>
|
|
788
|
+
<div class="slide__content">
|
|
789
|
+
<p class="slide__label reveal" style="color:rgba(255,255,255,0.6);">Next Steps</p>
|
|
790
|
+
<h2 class="slide__heading reveal">Ship Shadow Mode This Week</h2>
|
|
791
|
+
<p class="slide__subtitle reveal" style="color:rgba(255,255,255,0.6); margin-top:12px;">Full cutover targeted for end of Q1</p>
|
|
792
|
+
</div>
|
|
793
|
+
</section>
|
|
794
|
+
|
|
795
|
+
</div><!-- /deck -->
|
|
796
|
+
|
|
797
|
+
<script type="module">
|
|
798
|
+
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
|
799
|
+
|
|
800
|
+
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
801
|
+
mermaid.initialize({
|
|
802
|
+
startOnLoad: true,
|
|
803
|
+
theme: 'base',
|
|
804
|
+
look: 'classic',
|
|
805
|
+
themeVariables: {
|
|
806
|
+
primaryColor: isDark ? '#1d2b52' : '#fef3e0',
|
|
807
|
+
primaryBorderColor: isDark ? '#d4a73a' : '#b8860b',
|
|
808
|
+
primaryTextColor: isDark ? '#e8e4d8' : '#1a1814',
|
|
809
|
+
secondaryColor: isDark ? '#162040' : '#eff6ff',
|
|
810
|
+
secondaryBorderColor: isDark ? '#60a5fa' : '#2563eb',
|
|
811
|
+
secondaryTextColor: isDark ? '#e8e4d8' : '#1a1814',
|
|
812
|
+
tertiaryColor: isDark ? '#0f2620' : '#f0fdf4',
|
|
813
|
+
tertiaryBorderColor: isDark ? '#4ade80' : '#16a34a',
|
|
814
|
+
tertiaryTextColor: isDark ? '#e8e4d8' : '#1a1814',
|
|
815
|
+
lineColor: isDark ? '#9a9484' : '#7a7468',
|
|
816
|
+
fontSize: '18px',
|
|
817
|
+
fontFamily: 'var(--font-body)',
|
|
818
|
+
noteBkgColor: isDark ? '#1d2b52' : '#fef3e0',
|
|
819
|
+
noteTextColor: isDark ? '#e8e4d8' : '#1a1814',
|
|
820
|
+
noteBorderColor: isDark ? '#d4a73a' : '#b8860b',
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
function autoFit() {
|
|
825
|
+
document.querySelectorAll('.mermaid svg').forEach(function(svg) {
|
|
826
|
+
svg.removeAttribute('height');
|
|
827
|
+
svg.style.width = '100%';
|
|
828
|
+
svg.style.maxWidth = '100%';
|
|
829
|
+
svg.style.height = 'auto';
|
|
830
|
+
svg.parentElement.style.width = '100%';
|
|
831
|
+
});
|
|
832
|
+
document.querySelectorAll('.slide__kpi-val').forEach(function(el) {
|
|
833
|
+
if (el.scrollWidth > el.clientWidth) {
|
|
834
|
+
var s = el.clientWidth / el.scrollWidth;
|
|
835
|
+
el.style.transform = 'scale(' + s + ')';
|
|
836
|
+
el.style.transformOrigin = 'left top';
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
document.querySelectorAll('.slide--quote blockquote').forEach(function(el) {
|
|
840
|
+
var len = el.textContent.trim().length;
|
|
841
|
+
if (len > 100) {
|
|
842
|
+
var scale = Math.max(0.5, 100 / len);
|
|
843
|
+
var fs = parseFloat(getComputedStyle(el).fontSize);
|
|
844
|
+
el.style.fontSize = Math.max(16, Math.round(fs * scale)) + 'px';
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
mermaid.run().then(function() {
|
|
850
|
+
autoFit();
|
|
851
|
+
new SlideEngine();
|
|
852
|
+
});
|
|
853
|
+
</script>
|
|
854
|
+
|
|
855
|
+
<script>
|
|
856
|
+
// Mermaid zoom controls
|
|
857
|
+
function updateZoomState(w){var t=w.querySelector('.mermaid');var z=parseFloat(t.dataset.zoom||'1');w.classList.toggle('is-zoomed',z>1);}
|
|
858
|
+
function zoomDiagram(b,f){var w=b.closest('.mermaid-wrap');var t=w.querySelector('.mermaid');var c=parseFloat(t.dataset.zoom||'1');var n=Math.min(Math.max(c*f,0.3),5);t.dataset.zoom=n;t.style.transform='scale('+n+')';updateZoomState(w);}
|
|
859
|
+
function resetZoom(b){var w=b.closest('.mermaid-wrap');var t=w.querySelector('.mermaid');t.dataset.zoom='1';t.style.transform='scale(1)';updateZoomState(w);}
|
|
860
|
+
document.querySelectorAll('.mermaid-wrap').forEach(function(w){w.addEventListener('wheel',function(e){if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();var t=w.querySelector('.mermaid');var c=parseFloat(t.dataset.zoom||'1');var f=e.deltaY<0?1.1:0.9;var n=Math.min(Math.max(c*f,0.3),5);t.dataset.zoom=n;t.style.transform='scale('+n+')';updateZoomState(w);},{passive:false});var sX,sY,sL,sT;w.addEventListener('mousedown',function(e){if(e.target.closest('.zoom-controls'))return;var t=w.querySelector('.mermaid');if(parseFloat(t.dataset.zoom||'1')<=1)return;w.classList.add('is-panning');sX=e.clientX;sY=e.clientY;sL=w.scrollLeft;sT=w.scrollTop;});window.addEventListener('mousemove',function(e){if(!w.classList.contains('is-panning'))return;w.scrollLeft=sL-(e.clientX-sX);w.scrollTop=sT-(e.clientY-sY);});window.addEventListener('mouseup',function(){w.classList.remove('is-panning');});});
|
|
861
|
+
|
|
862
|
+
// SlideEngine
|
|
863
|
+
function SlideEngine(){
|
|
864
|
+
this.deck=document.querySelector('.deck');
|
|
865
|
+
this.slides=[].slice.call(document.querySelectorAll('.slide'));
|
|
866
|
+
this.current=0;
|
|
867
|
+
this.total=this.slides.length;
|
|
868
|
+
this.buildChrome();
|
|
869
|
+
this.bindEvents();
|
|
870
|
+
this.observe();
|
|
871
|
+
this.update();
|
|
872
|
+
}
|
|
873
|
+
SlideEngine.prototype.buildChrome=function(){
|
|
874
|
+
var bar=document.createElement('div');bar.className='deck-progress';document.body.appendChild(bar);this.bar=bar;
|
|
875
|
+
var dots=document.createElement('div');dots.className='deck-dots';var self=this;
|
|
876
|
+
this.slides.forEach(function(_,i){var d=document.createElement('button');d.className='deck-dot';d.title='Slide '+(i+1);d.onclick=function(){self.goTo(i);};dots.appendChild(d);});
|
|
877
|
+
document.body.appendChild(dots);this.dots=[].slice.call(dots.children);
|
|
878
|
+
var ctr=document.createElement('div');ctr.className='deck-counter';document.body.appendChild(ctr);this.counter=ctr;
|
|
879
|
+
var hints=document.createElement('div');hints.className='deck-hints';hints.textContent='\u2190 \u2192 or scroll to navigate';document.body.appendChild(hints);this.hints=hints;
|
|
880
|
+
this.hintTimer=setTimeout(function(){hints.classList.add('faded');},4000);
|
|
881
|
+
};
|
|
882
|
+
SlideEngine.prototype.bindEvents=function(){
|
|
883
|
+
var self=this;
|
|
884
|
+
document.addEventListener('keydown',function(e){
|
|
885
|
+
if(e.target.closest('.mermaid-wrap,.table-scroll,.code-scroll,input,textarea,[contenteditable]'))return;
|
|
886
|
+
if(['ArrowDown','ArrowRight',' ','PageDown'].indexOf(e.key)>-1){e.preventDefault();self.next();}
|
|
887
|
+
else if(['ArrowUp','ArrowLeft','PageUp'].indexOf(e.key)>-1){e.preventDefault();self.prev();}
|
|
888
|
+
else if(e.key==='Home'){e.preventDefault();self.goTo(0);}
|
|
889
|
+
else if(e.key==='End'){e.preventDefault();self.goTo(self.total-1);}
|
|
890
|
+
self.fadeHints();
|
|
891
|
+
});
|
|
892
|
+
var tY;
|
|
893
|
+
this.deck.addEventListener('touchstart',function(e){tY=e.touches[0].clientY;},{passive:true});
|
|
894
|
+
this.deck.addEventListener('touchend',function(e){var dy=tY-e.changedTouches[0].clientY;if(Math.abs(dy)>50){dy>0?self.next():self.prev();}});
|
|
895
|
+
};
|
|
896
|
+
SlideEngine.prototype.observe=function(){
|
|
897
|
+
var self=this;
|
|
898
|
+
var obs=new IntersectionObserver(function(entries){entries.forEach(function(entry){if(entry.isIntersecting){entry.target.classList.add('visible');self.current=self.slides.indexOf(entry.target);self.update();}});},{threshold:0.5});
|
|
899
|
+
this.slides.forEach(function(s){obs.observe(s);});
|
|
900
|
+
};
|
|
901
|
+
SlideEngine.prototype.goTo=function(i){this.slides[Math.max(0,Math.min(i,this.total-1))].scrollIntoView({behavior:'smooth'});};
|
|
902
|
+
SlideEngine.prototype.next=function(){if(this.current<this.total-1)this.goTo(this.current+1);};
|
|
903
|
+
SlideEngine.prototype.prev=function(){if(this.current>0)this.goTo(this.current-1);};
|
|
904
|
+
SlideEngine.prototype.update=function(){
|
|
905
|
+
this.bar.style.width=((this.current+1)/this.total*100)+'%';
|
|
906
|
+
var c=this.current;this.dots.forEach(function(d,i){d.classList.toggle('active',i===c);});
|
|
907
|
+
this.counter.textContent=(this.current+1)+' / '+this.total;
|
|
908
|
+
};
|
|
909
|
+
SlideEngine.prototype.fadeHints=function(){clearTimeout(this.hintTimer);this.hints.classList.add('faded');};
|
|
910
|
+
</script>
|
|
911
|
+
|
|
912
|
+
</body>
|
|
913
|
+
</html>
|