local-cli-agent 5.0.4
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/LICENSE +21 -0
- package/README.md +306 -0
- package/dist/agents/base/base-agent.d.ts +38 -0
- package/dist/agents/base/base-agent.d.ts.map +1 -0
- package/dist/agents/base/base-agent.js +69 -0
- package/dist/agents/base/base-agent.js.map +1 -0
- package/dist/agents/browser/browser-profile-manager.d.ts +16 -0
- package/dist/agents/browser/browser-profile-manager.d.ts.map +1 -0
- package/dist/agents/browser/browser-profile-manager.js +149 -0
- package/dist/agents/browser/browser-profile-manager.js.map +1 -0
- package/dist/agents/browser/browser-sub-agent.d.ts +22 -0
- package/dist/agents/browser/browser-sub-agent.d.ts.map +1 -0
- package/dist/agents/browser/browser-sub-agent.js +162 -0
- package/dist/agents/browser/browser-sub-agent.js.map +1 -0
- package/dist/agents/browser/confluence-agent.d.ts +3 -0
- package/dist/agents/browser/confluence-agent.d.ts.map +1 -0
- package/dist/agents/browser/confluence-agent.js +35 -0
- package/dist/agents/browser/confluence-agent.js.map +1 -0
- package/dist/agents/browser/index.d.ts +4 -0
- package/dist/agents/browser/index.d.ts.map +1 -0
- package/dist/agents/browser/index.js +4 -0
- package/dist/agents/browser/index.js.map +1 -0
- package/dist/agents/browser/jira-agent.d.ts +3 -0
- package/dist/agents/browser/jira-agent.d.ts.map +1 -0
- package/dist/agents/browser/jira-agent.js +35 -0
- package/dist/agents/browser/jira-agent.js.map +1 -0
- package/dist/agents/browser/prompts.d.ts +4 -0
- package/dist/agents/browser/prompts.d.ts.map +1 -0
- package/dist/agents/browser/prompts.js +241 -0
- package/dist/agents/browser/prompts.js.map +1 -0
- package/dist/agents/browser/search-agent.d.ts +3 -0
- package/dist/agents/browser/search-agent.d.ts.map +1 -0
- package/dist/agents/browser/search-agent.js +31 -0
- package/dist/agents/browser/search-agent.js.map +1 -0
- package/dist/agents/common/complete-tool.d.ts +3 -0
- package/dist/agents/common/complete-tool.d.ts.map +1 -0
- package/dist/agents/common/complete-tool.js +18 -0
- package/dist/agents/common/complete-tool.js.map +1 -0
- package/dist/agents/common/index.d.ts +3 -0
- package/dist/agents/common/index.d.ts.map +1 -0
- package/dist/agents/common/index.js +3 -0
- package/dist/agents/common/index.js.map +1 -0
- package/dist/agents/common/sub-agent.d.ts +40 -0
- package/dist/agents/common/sub-agent.d.ts.map +1 -0
- package/dist/agents/common/sub-agent.js +313 -0
- package/dist/agents/common/sub-agent.js.map +1 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +5 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/office/complete-tool.d.ts +3 -0
- package/dist/agents/office/complete-tool.d.ts.map +1 -0
- package/dist/agents/office/complete-tool.js +18 -0
- package/dist/agents/office/complete-tool.js.map +1 -0
- package/dist/agents/office/excel-agent.d.ts +3 -0
- package/dist/agents/office/excel-agent.d.ts.map +1 -0
- package/dist/agents/office/excel-agent.js +31 -0
- package/dist/agents/office/excel-agent.js.map +1 -0
- package/dist/agents/office/excel-create-agent.d.ts +3 -0
- package/dist/agents/office/excel-create-agent.d.ts.map +1 -0
- package/dist/agents/office/excel-create-agent.js +58 -0
- package/dist/agents/office/excel-create-agent.js.map +1 -0
- package/dist/agents/office/excel-create-prompts.d.ts +4 -0
- package/dist/agents/office/excel-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/excel-create-prompts.js +217 -0
- package/dist/agents/office/excel-create-prompts.js.map +1 -0
- package/dist/agents/office/index.d.ts +10 -0
- package/dist/agents/office/index.d.ts.map +1 -0
- package/dist/agents/office/index.js +10 -0
- package/dist/agents/office/index.js.map +1 -0
- package/dist/agents/office/office-sub-agent.d.ts +21 -0
- package/dist/agents/office/office-sub-agent.d.ts.map +1 -0
- package/dist/agents/office/office-sub-agent.js +127 -0
- package/dist/agents/office/office-sub-agent.js.map +1 -0
- package/dist/agents/office/powerpoint-agent.d.ts +3 -0
- package/dist/agents/office/powerpoint-agent.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-agent.js +37 -0
- package/dist/agents/office/powerpoint-agent.js.map +1 -0
- package/dist/agents/office/powerpoint-create-agent.d.ts +3 -0
- package/dist/agents/office/powerpoint-create-agent.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-create-agent.js +1124 -0
- package/dist/agents/office/powerpoint-create-agent.js.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts +116 -0
- package/dist/agents/office/powerpoint-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/powerpoint-create-prompts.js +1354 -0
- package/dist/agents/office/powerpoint-create-prompts.js.map +1 -0
- package/dist/agents/office/prompts.d.ts +11 -0
- package/dist/agents/office/prompts.d.ts.map +1 -0
- package/dist/agents/office/prompts.js +852 -0
- package/dist/agents/office/prompts.js.map +1 -0
- package/dist/agents/office/word-agent.d.ts +3 -0
- package/dist/agents/office/word-agent.d.ts.map +1 -0
- package/dist/agents/office/word-agent.js +31 -0
- package/dist/agents/office/word-agent.js.map +1 -0
- package/dist/agents/office/word-create-agent.d.ts +3 -0
- package/dist/agents/office/word-create-agent.d.ts.map +1 -0
- package/dist/agents/office/word-create-agent.js +36 -0
- package/dist/agents/office/word-create-agent.js.map +1 -0
- package/dist/agents/office/word-create-prompts.d.ts +4 -0
- package/dist/agents/office/word-create-prompts.d.ts.map +1 -0
- package/dist/agents/office/word-create-prompts.js +288 -0
- package/dist/agents/office/word-create-prompts.js.map +1 -0
- package/dist/agents/planner/index.d.ts +14 -0
- package/dist/agents/planner/index.d.ts.map +1 -0
- package/dist/agents/planner/index.js +334 -0
- package/dist/agents/planner/index.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +166 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/chat-command.d.ts +2 -0
- package/dist/commands/chat-command.d.ts.map +1 -0
- package/dist/commands/chat-command.js +90 -0
- package/dist/commands/chat-command.js.map +1 -0
- package/dist/commands/electron-client.d.ts +17 -0
- package/dist/commands/electron-client.d.ts.map +1 -0
- package/dist/commands/electron-client.js +180 -0
- package/dist/commands/electron-client.js.map +1 -0
- package/dist/commands/jarvis-command.d.ts +2 -0
- package/dist/commands/jarvis-command.d.ts.map +1 -0
- package/dist/commands/jarvis-command.js +66 -0
- package/dist/commands/jarvis-command.js.map +1 -0
- package/dist/constants.d.ts +11 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +13 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/compact/compact-manager.d.ts +22 -0
- package/dist/core/compact/compact-manager.d.ts.map +1 -0
- package/dist/core/compact/compact-manager.js +77 -0
- package/dist/core/compact/compact-manager.js.map +1 -0
- package/dist/core/compact/compact-prompts.d.ts +11 -0
- package/dist/core/compact/compact-prompts.d.ts.map +1 -0
- package/dist/core/compact/compact-prompts.js +90 -0
- package/dist/core/compact/compact-prompts.js.map +1 -0
- package/dist/core/compact/context-tracker.d.ts +28 -0
- package/dist/core/compact/context-tracker.d.ts.map +1 -0
- package/dist/core/compact/context-tracker.js +71 -0
- package/dist/core/compact/context-tracker.js.map +1 -0
- package/dist/core/compact/index.d.ts +4 -0
- package/dist/core/compact/index.d.ts.map +1 -0
- package/dist/core/compact/index.js +4 -0
- package/dist/core/compact/index.js.map +1 -0
- package/dist/core/config/config-manager.d.ts +43 -0
- package/dist/core/config/config-manager.d.ts.map +1 -0
- package/dist/core/config/config-manager.js +254 -0
- package/dist/core/config/config-manager.js.map +1 -0
- package/dist/core/config/index.d.ts +2 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +2 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/docs-manager.d.ts +46 -0
- package/dist/core/docs-manager.d.ts.map +1 -0
- package/dist/core/docs-manager.js +475 -0
- package/dist/core/docs-manager.js.map +1 -0
- package/dist/core/git-auto-updater.d.ts +58 -0
- package/dist/core/git-auto-updater.d.ts.map +1 -0
- package/dist/core/git-auto-updater.js +374 -0
- package/dist/core/git-auto-updater.js.map +1 -0
- package/dist/core/llm/index.d.ts +2 -0
- package/dist/core/llm/index.d.ts.map +1 -0
- package/dist/core/llm/index.js +2 -0
- package/dist/core/llm/index.js.map +1 -0
- package/dist/core/llm/llm-client.d.ts +110 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -0
- package/dist/core/llm/llm-client.js +1272 -0
- package/dist/core/llm/llm-client.js.map +1 -0
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -0
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -0
- package/dist/core/session/session-manager.d.ts +73 -0
- package/dist/core/session/session-manager.d.ts.map +1 -0
- package/dist/core/session/session-manager.js +260 -0
- package/dist/core/session/session-manager.js.map +1 -0
- package/dist/core/slash-command-handler.d.ts +31 -0
- package/dist/core/slash-command-handler.d.ts.map +1 -0
- package/dist/core/slash-command-handler.js +304 -0
- package/dist/core/slash-command-handler.js.map +1 -0
- package/dist/core/telemetry/error-reporter.d.ts +2 -0
- package/dist/core/telemetry/error-reporter.d.ts.map +1 -0
- package/dist/core/telemetry/error-reporter.js +3 -0
- package/dist/core/telemetry/error-reporter.js.map +1 -0
- package/dist/core/usage-tracker.d.ts +70 -0
- package/dist/core/usage-tracker.d.ts.map +1 -0
- package/dist/core/usage-tracker.js +251 -0
- package/dist/core/usage-tracker.js.map +1 -0
- package/dist/errors/base.d.ts +22 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +43 -0
- package/dist/errors/base.js.map +1 -0
- package/dist/errors/file.d.ts +31 -0
- package/dist/errors/file.d.ts.map +1 -0
- package/dist/errors/file.js +110 -0
- package/dist/errors/file.js.map +1 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +41 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/llm.d.ts +30 -0
- package/dist/errors/llm.d.ts.map +1 -0
- package/dist/errors/llm.js +97 -0
- package/dist/errors/llm.js.map +1 -0
- package/dist/errors/network.d.ts +19 -0
- package/dist/errors/network.d.ts.map +1 -0
- package/dist/errors/network.js +82 -0
- package/dist/errors/network.js.map +1 -0
- package/dist/errors/validation.d.ts +19 -0
- package/dist/errors/validation.d.ts.map +1 -0
- package/dist/errors/validation.js +62 -0
- package/dist/errors/validation.js.map +1 -0
- package/dist/eval/eval-runner.d.ts +24 -0
- package/dist/eval/eval-runner.d.ts.map +1 -0
- package/dist/eval/eval-runner.js +291 -0
- package/dist/eval/eval-runner.js.map +1 -0
- package/dist/eval/index.d.ts +3 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +3 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/eval/types.d.ts +77 -0
- package/dist/eval/types.d.ts.map +1 -0
- package/dist/eval/types.js +2 -0
- package/dist/eval/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestration/index.d.ts +4 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -0
- package/dist/orchestration/plan-executor.d.ts +27 -0
- package/dist/orchestration/plan-executor.d.ts.map +1 -0
- package/dist/orchestration/plan-executor.js +536 -0
- package/dist/orchestration/plan-executor.js.map +1 -0
- package/dist/orchestration/types.d.ts +69 -0
- package/dist/orchestration/types.d.ts.map +1 -0
- package/dist/orchestration/types.js +2 -0
- package/dist/orchestration/types.js.map +1 -0
- package/dist/orchestration/utils.d.ts +14 -0
- package/dist/orchestration/utils.d.ts.map +1 -0
- package/dist/orchestration/utils.js +105 -0
- package/dist/orchestration/utils.js.map +1 -0
- package/dist/pipe/index.d.ts +2 -0
- package/dist/pipe/index.d.ts.map +1 -0
- package/dist/pipe/index.js +2 -0
- package/dist/pipe/index.js.map +1 -0
- package/dist/pipe/pipe-runner.d.ts +15 -0
- package/dist/pipe/pipe-runner.d.ts.map +1 -0
- package/dist/pipe/pipe-runner.js +207 -0
- package/dist/pipe/pipe-runner.js.map +1 -0
- package/dist/prompts/agents/planning.d.ts +4 -0
- package/dist/prompts/agents/planning.d.ts.map +1 -0
- package/dist/prompts/agents/planning.js +318 -0
- package/dist/prompts/agents/planning.js.map +1 -0
- package/dist/prompts/index.d.ts +8 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +8 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/shared/codebase-rules.d.ts +4 -0
- package/dist/prompts/shared/codebase-rules.d.ts.map +1 -0
- package/dist/prompts/shared/codebase-rules.js +16 -0
- package/dist/prompts/shared/codebase-rules.js.map +1 -0
- package/dist/prompts/shared/git-rules.d.ts +2 -0
- package/dist/prompts/shared/git-rules.d.ts.map +1 -0
- package/dist/prompts/shared/git-rules.js +87 -0
- package/dist/prompts/shared/git-rules.js.map +1 -0
- package/dist/prompts/shared/language-rules.d.ts +4 -0
- package/dist/prompts/shared/language-rules.d.ts.map +1 -0
- package/dist/prompts/shared/language-rules.js +22 -0
- package/dist/prompts/shared/language-rules.js.map +1 -0
- package/dist/prompts/shared/tool-usage.d.ts +14 -0
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -0
- package/dist/prompts/shared/tool-usage.js +92 -0
- package/dist/prompts/shared/tool-usage.js.map +1 -0
- package/dist/prompts/system/compact.d.ts +3 -0
- package/dist/prompts/system/compact.d.ts.map +1 -0
- package/dist/prompts/system/compact.js +73 -0
- package/dist/prompts/system/compact.js.map +1 -0
- package/dist/prompts/system/plan-execute.d.ts +6 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -0
- package/dist/prompts/system/plan-execute.js +178 -0
- package/dist/prompts/system/plan-execute.js.map +1 -0
- package/dist/tools/browser/browser-client.d.ts +108 -0
- package/dist/tools/browser/browser-client.d.ts.map +1 -0
- package/dist/tools/browser/browser-client.js +965 -0
- package/dist/tools/browser/browser-client.js.map +1 -0
- package/dist/tools/browser/browser-tools.d.ts +18 -0
- package/dist/tools/browser/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser/browser-tools.js +983 -0
- package/dist/tools/browser/browser-tools.js.map +1 -0
- package/dist/tools/browser/index.d.ts +7 -0
- package/dist/tools/browser/index.d.ts.map +1 -0
- package/dist/tools/browser/index.js +17 -0
- package/dist/tools/browser/index.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/llm/index.d.ts +2 -0
- package/dist/tools/llm/index.d.ts.map +1 -0
- package/dist/tools/llm/index.js +2 -0
- package/dist/tools/llm/index.js.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts +5 -0
- package/dist/tools/llm/simple/ask-user-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/ask-user-tool.js +7 -0
- package/dist/tools/llm/simple/ask-user-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-bash-tool.js +320 -0
- package/dist/tools/llm/simple/background-bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts +30 -0
- package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/background-powershell-tool.js +302 -0
- package/dist/tools/llm/simple/background-powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/bash-tool.d.ts +4 -0
- package/dist/tools/llm/simple/bash-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/bash-tool.js +167 -0
- package/dist/tools/llm/simple/bash-tool.js.map +1 -0
- package/dist/tools/llm/simple/file-tools.d.ts +13 -0
- package/dist/tools/llm/simple/file-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/file-tools.js +814 -0
- package/dist/tools/llm/simple/file-tools.js.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts +12 -0
- package/dist/tools/llm/simple/final-response-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/final-response-tool.js +107 -0
- package/dist/tools/llm/simple/final-response-tool.js.map +1 -0
- package/dist/tools/llm/simple/index.d.ts +11 -0
- package/dist/tools/llm/simple/index.d.ts.map +1 -0
- package/dist/tools/llm/simple/index.js +20 -0
- package/dist/tools/llm/simple/index.js.map +1 -0
- package/dist/tools/llm/simple/planning-tools.d.ts +5 -0
- package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/planning-tools.js +121 -0
- package/dist/tools/llm/simple/planning-tools.js.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts +4 -0
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/powershell-tool.js +163 -0
- package/dist/tools/llm/simple/powershell-tool.js.map +1 -0
- package/dist/tools/llm/simple/read-image-tool.d.ts +8 -0
- package/dist/tools/llm/simple/read-image-tool.d.ts.map +1 -0
- package/dist/tools/llm/simple/read-image-tool.js +170 -0
- package/dist/tools/llm/simple/read-image-tool.js.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts +40 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -0
- package/dist/tools/llm/simple/simple-tool-executor.js +159 -0
- package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -0
- package/dist/tools/llm/simple/todo-tools.d.ts +15 -0
- package/dist/tools/llm/simple/todo-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/todo-tools.js +145 -0
- package/dist/tools/llm/simple/todo-tools.js.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts +22 -0
- package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/user-interaction-tools.js +168 -0
- package/dist/tools/llm/simple/user-interaction-tools.js.map +1 -0
- package/dist/tools/office/common/constants.d.ts +192 -0
- package/dist/tools/office/common/constants.d.ts.map +1 -0
- package/dist/tools/office/common/constants.js +165 -0
- package/dist/tools/office/common/constants.js.map +1 -0
- package/dist/tools/office/common/index.d.ts +4 -0
- package/dist/tools/office/common/index.d.ts.map +1 -0
- package/dist/tools/office/common/index.js +3 -0
- package/dist/tools/office/common/index.js.map +1 -0
- package/dist/tools/office/common/types.d.ts +82 -0
- package/dist/tools/office/common/types.d.ts.map +1 -0
- package/dist/tools/office/common/types.js +2 -0
- package/dist/tools/office/common/types.js.map +1 -0
- package/dist/tools/office/common/utils.d.ts +16 -0
- package/dist/tools/office/common/utils.d.ts.map +1 -0
- package/dist/tools/office/common/utils.js +60 -0
- package/dist/tools/office/common/utils.js.map +1 -0
- package/dist/tools/office/excel-client.d.ts +219 -0
- package/dist/tools/office/excel-client.d.ts.map +1 -0
- package/dist/tools/office/excel-client.js +2346 -0
- package/dist/tools/office/excel-client.js.map +1 -0
- package/dist/tools/office/excel-tools/cells.d.ts +10 -0
- package/dist/tools/office/excel-tools/cells.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/cells.js +283 -0
- package/dist/tools/office/excel-tools/cells.js.map +1 -0
- package/dist/tools/office/excel-tools/charts.d.ts +6 -0
- package/dist/tools/office/excel-tools/charts.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/charts.js +124 -0
- package/dist/tools/office/excel-tools/charts.js.map +1 -0
- package/dist/tools/office/excel-tools/comments.d.ts +6 -0
- package/dist/tools/office/excel-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/comments.js +114 -0
- package/dist/tools/office/excel-tools/comments.js.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts +10 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/data-ops.js +266 -0
- package/dist/tools/office/excel-tools/data-ops.js.map +1 -0
- package/dist/tools/office/excel-tools/export.d.ts +5 -0
- package/dist/tools/office/excel-tools/export.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/export.js +75 -0
- package/dist/tools/office/excel-tools/export.js.map +1 -0
- package/dist/tools/office/excel-tools/formatting.d.ts +10 -0
- package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/formatting.js +276 -0
- package/dist/tools/office/excel-tools/formatting.js.map +1 -0
- package/dist/tools/office/excel-tools/index.d.ts +18 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/index.js +54 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -0
- package/dist/tools/office/excel-tools/launch.d.ts +10 -0
- package/dist/tools/office/excel-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/launch.js +250 -0
- package/dist/tools/office/excel-tools/launch.js.map +1 -0
- package/dist/tools/office/excel-tools/media.d.ts +5 -0
- package/dist/tools/office/excel-tools/media.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/media.js +84 -0
- package/dist/tools/office/excel-tools/media.js.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts +6 -0
- package/dist/tools/office/excel-tools/named-ranges.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/named-ranges.js +113 -0
- package/dist/tools/office/excel-tools/named-ranges.js.map +1 -0
- package/dist/tools/office/excel-tools/protection.d.ts +5 -0
- package/dist/tools/office/excel-tools/protection.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/protection.js +75 -0
- package/dist/tools/office/excel-tools/protection.js.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts +11 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.js +293 -0
- package/dist/tools/office/excel-tools/rows-columns.js.map +1 -0
- package/dist/tools/office/excel-tools/sheet-builders.d.ts +9 -0
- package/dist/tools/office/excel-tools/sheet-builders.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheet-builders.js +483 -0
- package/dist/tools/office/excel-tools/sheet-builders.js.map +1 -0
- package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/sheets.js +182 -0
- package/dist/tools/office/excel-tools/sheets.js.map +1 -0
- package/dist/tools/office/excel-tools/validation.d.ts +7 -0
- package/dist/tools/office/excel-tools/validation.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/validation.js +175 -0
- package/dist/tools/office/excel-tools/validation.js.map +1 -0
- package/dist/tools/office/excel-tools.d.ts +3 -0
- package/dist/tools/office/excel-tools.d.ts.map +1 -0
- package/dist/tools/office/excel-tools.js +3 -0
- package/dist/tools/office/excel-tools.js.map +1 -0
- package/dist/tools/office/index.d.ts +6 -0
- package/dist/tools/office/index.d.ts.map +1 -0
- package/dist/tools/office/index.js +9 -0
- package/dist/tools/office/index.js.map +1 -0
- package/dist/tools/office/office-client-base.d.ts +33 -0
- package/dist/tools/office/office-client-base.d.ts.map +1 -0
- package/dist/tools/office/office-client-base.js +166 -0
- package/dist/tools/office/office-client-base.js.map +1 -0
- package/dist/tools/office/office-client.d.ts +196 -0
- package/dist/tools/office/office-client.d.ts.map +1 -0
- package/dist/tools/office/office-client.js +200 -0
- package/dist/tools/office/office-client.js.map +1 -0
- package/dist/tools/office/powerpoint-client.d.ts +148 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-client.js +1310 -0
- package/dist/tools/office/powerpoint-client.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/effects.js +246 -0
- package/dist/tools/office/powerpoint-tools/effects.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/export.js +123 -0
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts +15 -0
- package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/index.js +40 -0
- package/dist/tools/office/powerpoint-tools/index.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts +9 -0
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/launch.js +218 -0
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.js +785 -0
- package/dist/tools/office/powerpoint-tools/layout-builders.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/media.js +211 -0
- package/dist/tools/office/powerpoint-tools/media.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts +8 -0
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/notes.js +171 -0
- package/dist/tools/office/powerpoint-tools/notes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/sections.js +104 -0
- package/dist/tools/office/powerpoint-tools/sections.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts +22 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/shapes.js +681 -0
- package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts +11 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/slides.js +283 -0
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/tables.js +132 -0
- package/dist/tools/office/powerpoint-tools/tables.js.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts +12 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools/text.js +379 -0
- package/dist/tools/office/powerpoint-tools/text.js.map +1 -0
- package/dist/tools/office/powerpoint-tools.d.ts +3 -0
- package/dist/tools/office/powerpoint-tools.d.ts.map +1 -0
- package/dist/tools/office/powerpoint-tools.js +3 -0
- package/dist/tools/office/powerpoint-tools.js.map +1 -0
- package/dist/tools/office/word-client.d.ts +169 -0
- package/dist/tools/office/word-client.d.ts.map +1 -0
- package/dist/tools/office/word-client.js +1636 -0
- package/dist/tools/office/word-client.js.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts +7 -0
- package/dist/tools/office/word-tools/bookmarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/bookmarks.js +146 -0
- package/dist/tools/office/word-tools/bookmarks.js.map +1 -0
- package/dist/tools/office/word-tools/comments.d.ts +7 -0
- package/dist/tools/office/word-tools/comments.d.ts.map +1 -0
- package/dist/tools/office/word-tools/comments.js +146 -0
- package/dist/tools/office/word-tools/comments.js.map +1 -0
- package/dist/tools/office/word-tools/content.d.ts +7 -0
- package/dist/tools/office/word-tools/content.d.ts.map +1 -0
- package/dist/tools/office/word-tools/content.js +168 -0
- package/dist/tools/office/word-tools/content.js.map +1 -0
- package/dist/tools/office/word-tools/export.d.ts +5 -0
- package/dist/tools/office/word-tools/export.d.ts.map +1 -0
- package/dist/tools/office/word-tools/export.js +73 -0
- package/dist/tools/office/word-tools/export.js.map +1 -0
- package/dist/tools/office/word-tools/formatting.d.ts +6 -0
- package/dist/tools/office/word-tools/formatting.d.ts.map +1 -0
- package/dist/tools/office/word-tools/formatting.js +129 -0
- package/dist/tools/office/word-tools/formatting.js.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts +6 -0
- package/dist/tools/office/word-tools/headers-footers.d.ts.map +1 -0
- package/dist/tools/office/word-tools/headers-footers.js +117 -0
- package/dist/tools/office/word-tools/headers-footers.js.map +1 -0
- package/dist/tools/office/word-tools/index.d.ts +19 -0
- package/dist/tools/office/word-tools/index.d.ts.map +1 -0
- package/dist/tools/office/word-tools/index.js +60 -0
- package/dist/tools/office/word-tools/index.js.map +1 -0
- package/dist/tools/office/word-tools/launch.d.ts +10 -0
- package/dist/tools/office/word-tools/launch.d.ts.map +1 -0
- package/dist/tools/office/word-tools/launch.js +257 -0
- package/dist/tools/office/word-tools/launch.js.map +1 -0
- package/dist/tools/office/word-tools/lists.d.ts +5 -0
- package/dist/tools/office/word-tools/lists.d.ts.map +1 -0
- package/dist/tools/office/word-tools/lists.js +73 -0
- package/dist/tools/office/word-tools/lists.js.map +1 -0
- package/dist/tools/office/word-tools/navigation.d.ts +5 -0
- package/dist/tools/office/word-tools/navigation.d.ts.map +1 -0
- package/dist/tools/office/word-tools/navigation.js +85 -0
- package/dist/tools/office/word-tools/navigation.js.map +1 -0
- package/dist/tools/office/word-tools/page-setup.d.ts +7 -0
- package/dist/tools/office/word-tools/page-setup.d.ts.map +1 -0
- package/dist/tools/office/word-tools/page-setup.js +152 -0
- package/dist/tools/office/word-tools/page-setup.js.map +1 -0
- package/dist/tools/office/word-tools/section-builders.d.ts +12 -0
- package/dist/tools/office/word-tools/section-builders.d.ts.map +1 -0
- package/dist/tools/office/word-tools/section-builders.js +601 -0
- package/dist/tools/office/word-tools/section-builders.js.map +1 -0
- package/dist/tools/office/word-tools/tables.d.ts +8 -0
- package/dist/tools/office/word-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/word-tools/tables.js +197 -0
- package/dist/tools/office/word-tools/tables.js.map +1 -0
- package/dist/tools/office/word-tools/text.d.ts +9 -0
- package/dist/tools/office/word-tools/text.d.ts.map +1 -0
- package/dist/tools/office/word-tools/text.js +245 -0
- package/dist/tools/office/word-tools/text.js.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts +5 -0
- package/dist/tools/office/word-tools/undo-redo.d.ts.map +1 -0
- package/dist/tools/office/word-tools/undo-redo.js +73 -0
- package/dist/tools/office/word-tools/undo-redo.js.map +1 -0
- package/dist/tools/office/word-tools/watermarks.d.ts +5 -0
- package/dist/tools/office/word-tools/watermarks.d.ts.map +1 -0
- package/dist/tools/office/word-tools/watermarks.js +81 -0
- package/dist/tools/office/word-tools/watermarks.js.map +1 -0
- package/dist/tools/office/word-tools.d.ts +3 -0
- package/dist/tools/office/word-tools.d.ts.map +1 -0
- package/dist/tools/office/word-tools.js +3 -0
- package/dist/tools/office/word-tools.js.map +1 -0
- package/dist/tools/registry.d.ts +55 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +296 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +88 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +19 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/types/index.d.ts +132 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/PlanExecuteView.d.ts +11 -0
- package/dist/ui/PlanExecuteView.d.ts.map +1 -0
- package/dist/ui/PlanExecuteView.js +27 -0
- package/dist/ui/PlanExecuteView.js.map +1 -0
- package/dist/ui/TodoPanel.d.ts +13 -0
- package/dist/ui/TodoPanel.d.ts.map +1 -0
- package/dist/ui/TodoPanel.js +138 -0
- package/dist/ui/TodoPanel.js.map +1 -0
- package/dist/ui/UpdateNotification.d.ts +13 -0
- package/dist/ui/UpdateNotification.d.ts.map +1 -0
- package/dist/ui/UpdateNotification.js +42 -0
- package/dist/ui/UpdateNotification.js.map +1 -0
- package/dist/ui/components/ActivityIndicator.d.ts +25 -0
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/ui/components/ActivityIndicator.js +116 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -0
- package/dist/ui/components/CommandBrowser.d.ts +10 -0
- package/dist/ui/components/CommandBrowser.d.ts.map +1 -0
- package/dist/ui/components/CommandBrowser.js +57 -0
- package/dist/ui/components/CommandBrowser.js.map +1 -0
- package/dist/ui/components/CustomTextInput.d.ts +13 -0
- package/dist/ui/components/CustomTextInput.d.ts.map +1 -0
- package/dist/ui/components/CustomTextInput.js +246 -0
- package/dist/ui/components/CustomTextInput.js.map +1 -0
- package/dist/ui/components/FileBrowser.d.ts +11 -0
- package/dist/ui/components/FileBrowser.d.ts.map +1 -0
- package/dist/ui/components/FileBrowser.js +45 -0
- package/dist/ui/components/FileBrowser.js.map +1 -0
- package/dist/ui/components/LLMSetupWizard.d.ts +8 -0
- package/dist/ui/components/LLMSetupWizard.d.ts.map +1 -0
- package/dist/ui/components/LLMSetupWizard.js +197 -0
- package/dist/ui/components/LLMSetupWizard.js.map +1 -0
- package/dist/ui/components/Logo.d.ts +20 -0
- package/dist/ui/components/Logo.d.ts.map +1 -0
- package/dist/ui/components/Logo.js +100 -0
- package/dist/ui/components/Logo.js.map +1 -0
- package/dist/ui/components/MarkdownRenderer.d.ts +9 -0
- package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/ui/components/MarkdownRenderer.js +198 -0
- package/dist/ui/components/MarkdownRenderer.js.map +1 -0
- package/dist/ui/components/ModelSelector.d.ts +8 -0
- package/dist/ui/components/ModelSelector.d.ts.map +1 -0
- package/dist/ui/components/ModelSelector.js +111 -0
- package/dist/ui/components/ModelSelector.js.map +1 -0
- package/dist/ui/components/PlanExecuteApp.d.ts +23 -0
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -0
- package/dist/ui/components/PlanExecuteApp.js +1377 -0
- package/dist/ui/components/PlanExecuteApp.js.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +10 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.js +26 -0
- package/dist/ui/components/ProgressBar.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +23 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +162 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/ThinkingIndicator.d.ts +14 -0
- package/dist/ui/components/ThinkingIndicator.d.ts.map +1 -0
- package/dist/ui/components/ThinkingIndicator.js +63 -0
- package/dist/ui/components/ThinkingIndicator.js.map +1 -0
- package/dist/ui/components/TodoListView.d.ts +11 -0
- package/dist/ui/components/TodoListView.d.ts.map +1 -0
- package/dist/ui/components/TodoListView.js +69 -0
- package/dist/ui/components/TodoListView.js.map +1 -0
- package/dist/ui/components/ToolSelector.d.ts +7 -0
- package/dist/ui/components/ToolSelector.d.ts.map +1 -0
- package/dist/ui/components/ToolSelector.js +112 -0
- package/dist/ui/components/ToolSelector.js.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts +13 -0
- package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js +175 -0
- package/dist/ui/components/dialogs/ApprovalDialog.js.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts +9 -0
- package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/AskUserDialog.js +111 -0
- package/dist/ui/components/dialogs/AskUserDialog.js.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts +8 -0
- package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +1 -0
- package/dist/ui/components/dialogs/DocsBrowser.js +127 -0
- package/dist/ui/components/dialogs/DocsBrowser.js.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts +10 -0
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -0
- package/dist/ui/components/dialogs/SettingsDialog.js +586 -0
- package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -0
- package/dist/ui/components/dialogs/index.d.ts +3 -0
- package/dist/ui/components/dialogs/index.d.ts.map +1 -0
- package/dist/ui/components/dialogs/index.js +3 -0
- package/dist/ui/components/dialogs/index.js.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +9 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/panels/LogPanel.d.ts +7 -0
- package/dist/ui/components/panels/LogPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/LogPanel.js +280 -0
- package/dist/ui/components/panels/LogPanel.js.map +1 -0
- package/dist/ui/components/panels/SessionPanel.d.ts +8 -0
- package/dist/ui/components/panels/SessionPanel.d.ts.map +1 -0
- package/dist/ui/components/panels/SessionPanel.js +81 -0
- package/dist/ui/components/panels/SessionPanel.js.map +1 -0
- package/dist/ui/components/panels/index.d.ts +4 -0
- package/dist/ui/components/panels/index.d.ts.map +1 -0
- package/dist/ui/components/panels/index.js +4 -0
- package/dist/ui/components/panels/index.js.map +1 -0
- package/dist/ui/components/views/ChatView.d.ts +12 -0
- package/dist/ui/components/views/ChatView.d.ts.map +1 -0
- package/dist/ui/components/views/ChatView.js +289 -0
- package/dist/ui/components/views/ChatView.js.map +1 -0
- package/dist/ui/components/views/index.d.ts +2 -0
- package/dist/ui/components/views/index.d.ts.map +1 -0
- package/dist/ui/components/views/index.js +2 -0
- package/dist/ui/components/views/index.js.map +1 -0
- package/dist/ui/contexts/TokenContext.d.ts +29 -0
- package/dist/ui/contexts/TokenContext.d.ts.map +1 -0
- package/dist/ui/contexts/TokenContext.js +79 -0
- package/dist/ui/contexts/TokenContext.js.map +1 -0
- package/dist/ui/hooks/atFileProcessor.d.ts +15 -0
- package/dist/ui/hooks/atFileProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/atFileProcessor.js +88 -0
- package/dist/ui/hooks/atFileProcessor.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +9 -0
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +9 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts +21 -0
- package/dist/ui/hooks/slashCommandProcessor.d.ts.map +1 -0
- package/dist/ui/hooks/slashCommandProcessor.js +96 -0
- package/dist/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts +12 -0
- package/dist/ui/hooks/useCommandBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useCommandBrowserState.js +66 -0
- package/dist/ui/hooks/useCommandBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts +15 -0
- package/dist/ui/hooks/useFileBrowserState.d.ts.map +1 -0
- package/dist/ui/hooks/useFileBrowserState.js +80 -0
- package/dist/ui/hooks/useFileBrowserState.js.map +1 -0
- package/dist/ui/hooks/useFileList.d.ts +20 -0
- package/dist/ui/hooks/useFileList.d.ts.map +1 -0
- package/dist/ui/hooks/useFileList.js +57 -0
- package/dist/ui/hooks/useFileList.js.map +1 -0
- package/dist/ui/hooks/useInputHistory.d.ts +9 -0
- package/dist/ui/hooks/useInputHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useInputHistory.js +68 -0
- package/dist/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/ui/hooks/usePlanExecution.d.ts +8 -0
- package/dist/ui/hooks/usePlanExecution.d.ts.map +1 -0
- package/dist/ui/hooks/usePlanExecution.js +218 -0
- package/dist/ui/hooks/usePlanExecution.js.map +1 -0
- package/dist/ui/hooks/useTerminalWidth.d.ts +4 -0
- package/dist/ui/hooks/useTerminalWidth.d.ts.map +1 -0
- package/dist/ui/hooks/useTerminalWidth.js +26 -0
- package/dist/ui/hooks/useTerminalWidth.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +7 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink-entry.d.ts +3 -0
- package/dist/ui/ink-entry.d.ts.map +1 -0
- package/dist/ui/ink-entry.js +22 -0
- package/dist/ui/ink-entry.js.map +1 -0
- package/dist/utils/file-system.d.ts +9 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +99 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/git-utils.d.ts +2 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +16 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/json-stream-logger.d.ts +74 -0
- package/dist/utils/json-stream-logger.d.ts.map +1 -0
- package/dist/utils/json-stream-logger.js +808 -0
- package/dist/utils/json-stream-logger.js.map +1 -0
- package/dist/utils/logger.d.ts +152 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +1672 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/platform-utils.d.ts +19 -0
- package/dist/utils/platform-utils.d.ts.map +1 -0
- package/dist/utils/platform-utils.js +134 -0
- package/dist/utils/platform-utils.js.map +1 -0
- package/dist/utils/wsl-utils.d.ts +4 -0
- package/dist/utils/wsl-utils.d.ts.map +1 -0
- package/dist/utils/wsl-utils.js +72 -0
- package/dist/utils/wsl-utils.js.map +1 -0
- package/package.json +132 -0
- package/scripts/patch-yoga.js +48 -0
|
@@ -0,0 +1,1354 @@
|
|
|
1
|
+
export const PPT_DESIGN_PROMPT = `You are an elite presentation design consultant AND structure planner. Output ONLY valid JSON — no markdown, no explanation, no code fences.
|
|
2
|
+
|
|
3
|
+
Given the user's instruction, produce a JSON object with a visual design system and a detailed slide plan.
|
|
4
|
+
|
|
5
|
+
{
|
|
6
|
+
"design": {
|
|
7
|
+
"primary_color": "<deep color matching the topic>",
|
|
8
|
+
"accent_color": "<vibrant contrast color>",
|
|
9
|
+
"background_color": "<near-white or near-black or subtle tint>",
|
|
10
|
+
"text_color": "<must contrast with background>",
|
|
11
|
+
"accent_light": "<light tint of your accent color>",
|
|
12
|
+
"gradient_end": "<secondary gradient paired with primary>",
|
|
13
|
+
"font_title": "Segoe UI",
|
|
14
|
+
"font_body": "Malgun Gothic",
|
|
15
|
+
"mood": "modern-minimal",
|
|
16
|
+
"design_notes": "Describe your visual approach in 1-2 sentences"
|
|
17
|
+
},
|
|
18
|
+
"slides": [
|
|
19
|
+
{ "type": "title", "title": "...", "content_direction": "..." },
|
|
20
|
+
{ "type": "content", "title": "...", "content_direction": "..." },
|
|
21
|
+
{ "type": "closing", "title": "...", "content_direction": "..." }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
═══ DESIGN SYSTEM ═══
|
|
26
|
+
• primary_color: Deep main color for headers and key elements
|
|
27
|
+
• accent_color: Vibrant contrast color for highlights and CTAs
|
|
28
|
+
• background_color: Page background (near white, near black, or subtle tint)
|
|
29
|
+
• text_color: Main text color (must contrast with background)
|
|
30
|
+
• accent_light: Light tint for subtle section backgrounds
|
|
31
|
+
• gradient_end: Paired gradient color for primary
|
|
32
|
+
• font_title / font_body: System fonts only (Segoe UI, Arial, Georgia, Calibri, Malgun Gothic)
|
|
33
|
+
• mood: One of modern-minimal, bold-energetic, corporate-elegant, warm-friendly, academic-clean
|
|
34
|
+
|
|
35
|
+
═══ COLOR PALETTE — CREATIVE PSYCHOLOGY ═══
|
|
36
|
+
⚠ EVERY presentation must have a UNIQUE palette matching the topic's emotional tone.
|
|
37
|
+
Think about color psychology: trust (blues), growth (greens), urgency (reds/oranges),
|
|
38
|
+
innovation (purples/cyans), warmth (corals/browns), elegance (charcoals/rose), wealth (navy/gold).
|
|
39
|
+
Pick DEEP saturated colors for primary, VIBRANT contrasting for accent.
|
|
40
|
+
⚠ Choose colors that MATCH the specific topic. Generic blue = LAZY.
|
|
41
|
+
⚠ Ensure accent_color has HIGH contrast with primary_color.
|
|
42
|
+
|
|
43
|
+
═══ SLIDE STRUCTURE ═══
|
|
44
|
+
⚠ First slide MUST be type "title". Last slide MUST be type "closing".
|
|
45
|
+
⚠ Minimum 10, maximum 13 slides total. Aim for 10-12.
|
|
46
|
+
⚠ Current year: \${new Date().getFullYear()}.
|
|
47
|
+
|
|
48
|
+
═══ TITLE & CLOSING FORMAT ═══
|
|
49
|
+
⚠ Title slide:
|
|
50
|
+
• title: Company/topic name ONLY — max 3-4 words (rendered at 96px)
|
|
51
|
+
✓ "Acme Corp" ✓ "프로젝트 알파" ✗ "Acme Corp - 2025 혁신 전략 보고서" (too long)
|
|
52
|
+
• content_direction: The actual subtitle/tagline TEXT (1-2 lines, under 120 chars)
|
|
53
|
+
⚠ Closing slide:
|
|
54
|
+
• title: "감사합니다" (Korean) / "Thank You" (English)
|
|
55
|
+
• content_direction: Company/topic name
|
|
56
|
+
|
|
57
|
+
═══ SLIDE STRUCTURE STRATEGY ═══
|
|
58
|
+
⚠ Do NOT follow a fixed template. Instead, analyze the user's topic and determine the most logical slide flow yourself.
|
|
59
|
+
⚠ Think about what information the audience NEEDS and in what ORDER.
|
|
60
|
+
⚠ General principles:
|
|
61
|
+
- Start with context/background before diving into details
|
|
62
|
+
- Build a narrative arc: setup → evidence → insight → action
|
|
63
|
+
- Each slide should have a DISTINCT purpose — no redundant slides
|
|
64
|
+
- End with actionable conclusions or key takeaways before closing
|
|
65
|
+
⚠ The slide structure should feel CUSTOM-TAILORED to the specific topic, not a generic template.
|
|
66
|
+
|
|
67
|
+
═══ content_direction = THE #1 PRIORITY ═══
|
|
68
|
+
⚠⚠⚠ content_direction is the REAL DATA AND TEXT that will appear on the slide.
|
|
69
|
+
⚠ Each content_direction MUST be 6-10 sentences of SPECIFIC DATA:
|
|
70
|
+
- Include: numbers, percentages, names, descriptions, dates, comparisons
|
|
71
|
+
- The MORE specific data you provide, the better the slide will look
|
|
72
|
+
- Each item/section: title + 3-4 supporting details with real numbers
|
|
73
|
+
⚠ content_direction MUST describe ONE focused topic per slide.
|
|
74
|
+
If a topic has 4+ sub-items, SPLIT into 2 slides.
|
|
75
|
+
⚠ NEVER include layout/CSS instructions in content_direction. Just the DATA.
|
|
76
|
+
✓ GOOD: "2024년 국내 시장 규모 4.8조 원. 전년 대비 23% 성장. 주요 성장 동력: 신규 고객 유입 35% 증가, 기존 고객 유지율 89%, 프리미엄 세그먼트 매출 비중 41%. 2027년 시장 전망 7.2조 원."
|
|
77
|
+
✓ GOOD: "핵심 제품 A: 월간 구독형 서비스. 기본 플랜 월 29만원, 프로 플랜 월 59만원, 엔터프라이즈 맞춤 견적. 주요 기능: 실시간 분석 대시보드, 자동 보고서 생성, API 연동. 도입 기업 120개사, 평균 고객 만족도 94.2%."
|
|
78
|
+
✗ BAD: "3개 서비스 소개. Layout: cards" ← Too sparse, has layout hint!
|
|
79
|
+
✗ BAD: "왼쪽에 텍스트, 오른쪽에 차트" ← Layout instruction!
|
|
80
|
+
|
|
81
|
+
═══ SLIDE CONTENT VARIETY ═══
|
|
82
|
+
⚠ Each slide's content should naturally suggest a DIFFERENT visual treatment.
|
|
83
|
+
Vary what you write about across slides:
|
|
84
|
+
- Some slides: key metrics/numbers (naturally displayed as large metric spotlights)
|
|
85
|
+
- Some slides: comparison data (naturally shown as tables or side-by-side)
|
|
86
|
+
- Some slides: step-by-step processes (naturally shown as flows)
|
|
87
|
+
- Some slides: category breakdowns (naturally shown as charts or card grids)
|
|
88
|
+
- Some slides: timeline/roadmap items (naturally shown as milestone sequences)
|
|
89
|
+
- Some slides: detailed feature descriptions (naturally shown as rich cards)
|
|
90
|
+
⚠ Don't make every slide a list of items. Mix data-heavy slides with narrative slides.
|
|
91
|
+
⚠ AVOID having 3+ consecutive slides with the same content structure (e.g., all lists of 3-4 items).
|
|
92
|
+
|
|
93
|
+
═══ OVERVIEW / AGENDA SLIDES ═══
|
|
94
|
+
⚠ AVOID overview/agenda/TOC slides — they waste space and add no real content.
|
|
95
|
+
Instead, jump straight into substantive content after the title slide.
|
|
96
|
+
If absolutely needed: MAXIMUM 5 items with short titles only.
|
|
97
|
+
|
|
98
|
+
═══ HARD RULES ═══
|
|
99
|
+
⚠ ALL titles and content_direction MUST be in the SAME language as the user's instruction
|
|
100
|
+
⚠ content_direction with NO real data = FAILURE
|
|
101
|
+
⚠ HARD MAXIMUM: 13 slides. Slides beyond 13 are DISCARDED.
|
|
102
|
+
⚠ NEVER use "스크린샷", "screenshot", "이미지", "사진", "placeholder" in content_direction
|
|
103
|
+
⚠ Do NOT create a separate "연락처" slide — closing handles this.
|
|
104
|
+
|
|
105
|
+
Output ONLY the JSON object.`;
|
|
106
|
+
export function extractLayoutHint(contentDirection) {
|
|
107
|
+
const match = contentDirection.match(/Layout:\s*(.+?)$/im);
|
|
108
|
+
if (!match)
|
|
109
|
+
return 'cards';
|
|
110
|
+
const hint = match[1].trim().toLowerCase();
|
|
111
|
+
if (/card|grid/.test(hint))
|
|
112
|
+
return 'cards';
|
|
113
|
+
if (/bar\s*chart/.test(hint))
|
|
114
|
+
return 'bar_chart';
|
|
115
|
+
if (/donut|pie/.test(hint))
|
|
116
|
+
return 'donut_chart';
|
|
117
|
+
if (/comparison\s*table|table/.test(hint))
|
|
118
|
+
return 'table';
|
|
119
|
+
if (/process|flow/.test(hint))
|
|
120
|
+
return 'process_flow';
|
|
121
|
+
if (/big\s*num|metric/.test(hint))
|
|
122
|
+
return 'big_numbers';
|
|
123
|
+
if (/split|2-col|two.col/.test(hint))
|
|
124
|
+
return 'two_col_split';
|
|
125
|
+
if (/timeline|milestone|roadmap/.test(hint))
|
|
126
|
+
return 'timeline';
|
|
127
|
+
if (/progress\s*bar/.test(hint))
|
|
128
|
+
return 'progress_bars';
|
|
129
|
+
if (/hero|spotlight/.test(hint))
|
|
130
|
+
return 'hero_stat';
|
|
131
|
+
return 'cards';
|
|
132
|
+
}
|
|
133
|
+
export function checkLayoutCompliance(html, layoutType) {
|
|
134
|
+
switch (layoutType) {
|
|
135
|
+
case 'donut_chart':
|
|
136
|
+
if (!html.includes('conic-gradient')) {
|
|
137
|
+
return 'WRONG LAYOUT: Expected donut/pie chart with conic-gradient. You MUST use conic-gradient on a border-radius:50% div. Copy the REQUIRED HTML structure from the prompt.';
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
case 'bar_chart': {
|
|
141
|
+
const hasFlexEnd = /flex-end/.test(html);
|
|
142
|
+
const barHeights = html.match(/style="[^"]*height:\s*\d+%/g) || [];
|
|
143
|
+
if (!hasFlexEnd || barHeights.length < 2) {
|
|
144
|
+
return `WRONG LAYOUT: Expected CSS bar chart with flex-end + at least 2 bars with height:XX%. Found flex-end:${hasFlexEnd}, bars:${barHeights.length}. Copy the REQUIRED HTML structure with .chart-area, .bar-group, .bar elements.`;
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case 'table':
|
|
149
|
+
if (!html.includes('<table') || !html.includes('<th')) {
|
|
150
|
+
return 'WRONG LAYOUT: Expected HTML <table> with <th> header cells. Copy the REQUIRED HTML structure.';
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
case 'process_flow': {
|
|
154
|
+
const arrowCount = (html.match(/→/g) || []).length;
|
|
155
|
+
const hasSteps = /class="[^"]*step/i.test(html);
|
|
156
|
+
if (arrowCount < 2 || !hasSteps) {
|
|
157
|
+
return `WRONG LAYOUT: Expected process flow with step boxes and → arrows. Found arrows:${arrowCount}, steps:${hasSteps}. You MUST have .step divs connected by .arrow divs containing "→".`;
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case 'progress_bars': {
|
|
162
|
+
const hasFill = /bar-fill/i.test(html);
|
|
163
|
+
const hasTrack = /bar-track/i.test(html);
|
|
164
|
+
const widthBars = html.match(/style="[^"]*width:\s*\d+%/g) || [];
|
|
165
|
+
if (!hasFill || !hasTrack || widthBars.length < 2) {
|
|
166
|
+
return `WRONG LAYOUT: Expected progress bars with .bar-track + .bar-fill + width:XX%. Found fill:${hasFill}, track:${hasTrack}, bars:${widthBars.length}. Copy the REQUIRED HTML structure.`;
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
case 'timeline': {
|
|
171
|
+
const hasMilestone = /class="[^"]*milestone/i.test(html);
|
|
172
|
+
const milestoneCount = (html.match(/class="[^"]*milestone[^"]*"/gi) || []).length;
|
|
173
|
+
if (!hasMilestone || milestoneCount < 2) {
|
|
174
|
+
return `WRONG LAYOUT: Expected timeline with milestone cards. Found ${milestoneCount} milestones. You MUST have 3-4 .milestone divs side by side.`;
|
|
175
|
+
}
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
case 'big_numbers': {
|
|
179
|
+
const bigFonts = html.match(/font-size:\s*(?:7[2-9]|[89]\d|1[0-2]\d)px/g) || [];
|
|
180
|
+
if (bigFonts.length < 2) {
|
|
181
|
+
return `WRONG LAYOUT: Expected big number metrics with font-size 72-96px. Found ${bigFonts.length} large fonts. Each .metric-card MUST have a .metric-value with font-size:80px.`;
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case 'hero_stat': {
|
|
186
|
+
const heroFont = html.match(/font-size:\s*(?:9[6-9]|1[0-2]\d)px/g) || [];
|
|
187
|
+
if (heroFont.length < 1) {
|
|
188
|
+
return `WRONG LAYOUT: Expected hero stat with font-size 96-128px. You MUST have ONE .hero-number with font-size:128px.`;
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
export function buildDirectHtmlPrompt(title, contentDirection, design, slideIndex, totalSlides, language, layoutType) {
|
|
196
|
+
const langRule = language === 'ko'
|
|
197
|
+
? 'ALL visible text MUST be in Korean. Write naturally in Korean. Never use Chinese characters (漢字).'
|
|
198
|
+
: 'ALL visible text MUST be in English.';
|
|
199
|
+
const layoutCss = getLayoutSpecificCss(layoutType, design);
|
|
200
|
+
const styleVariants = [
|
|
201
|
+
`Background: ${design.background_color}. Cards/elements use white background with box-shadow.`,
|
|
202
|
+
`Add a bold accent bar at top (height:4px, linear-gradient(90deg, ${design.accent_color}, ${design.primary_color})). Background: ${design.background_color}.`,
|
|
203
|
+
`Subtle gradient background: linear-gradient(150deg, ${design.background_color} 0%, ${design.accent_light} 50%, ${design.background_color} 100%). Stronger shadows.`,
|
|
204
|
+
];
|
|
205
|
+
const styleGuide = styleVariants[slideIndex % styleVariants.length];
|
|
206
|
+
return `You are a world-class web designer creating a presentation slide as a complete HTML page.
|
|
207
|
+
Output ONLY the complete HTML document (<!DOCTYPE html> to </html>). No explanation, no markdown fences.
|
|
208
|
+
|
|
209
|
+
═══ SLIDE ═══
|
|
210
|
+
Title: "${title}" | Slide ${slideIndex + 1} of ${totalSlides}
|
|
211
|
+
|
|
212
|
+
═══ CONTENT (what to show — generate REAL content based on this, never display it literally) ═══
|
|
213
|
+
${contentDirection}
|
|
214
|
+
|
|
215
|
+
═══ DESIGN SYSTEM ═══
|
|
216
|
+
Primary: ${design.primary_color} | Accent: ${design.accent_color} | BG: ${design.background_color}
|
|
217
|
+
Text: ${design.text_color} | Light: ${design.accent_light} | Gradient: ${design.gradient_end}
|
|
218
|
+
Title Font: ${design.font_title} | Body Font: ${design.font_body} | Mood: ${design.mood}
|
|
219
|
+
|
|
220
|
+
═══ VISUAL STYLE FOR THIS SLIDE ═══
|
|
221
|
+
${styleGuide}
|
|
222
|
+
|
|
223
|
+
═══ MANDATORY CSS BOILERPLATE (copy exactly into <style>) ═══
|
|
224
|
+
* { margin:0; padding:0; box-sizing:border-box; }
|
|
225
|
+
html, body { width:1920px; height:1080px; overflow:hidden; font-family:"${design.font_body}","${design.font_title}","Segoe UI","Malgun Gothic",Arial,sans-serif; word-break:keep-all; overflow-wrap:break-word; }
|
|
226
|
+
body { display:flex; flex-direction:column; padding:60px 80px; height:1080px; background:${design.background_color}; color:${design.text_color}; font-size:26px; }
|
|
227
|
+
.slide-title { flex:0 0 auto; margin-bottom:20px; }
|
|
228
|
+
.slide-title h1 { font-size:48px; font-weight:700; color:${design.primary_color}; font-family:"${design.font_title}","Segoe UI",sans-serif; }
|
|
229
|
+
|
|
230
|
+
═══ STRUCTURE: body has EXACTLY 2 children ═══
|
|
231
|
+
→ .slide-title (flex:0 0 auto) containing h1 with title text + optional accent bar
|
|
232
|
+
→ .content (flex:1) stretching to fill ALL remaining vertical space
|
|
233
|
+
⚠ .content class name is REQUIRED for post-processing.
|
|
234
|
+
⚠ ALL layout elements MUST be DIRECT children of .content — NO wrapper divs.
|
|
235
|
+
⚠ NEVER use position:absolute. Flexbox/grid ONLY.
|
|
236
|
+
|
|
237
|
+
${layoutCss}
|
|
238
|
+
|
|
239
|
+
═══ RULES ═══
|
|
240
|
+
• ${langRule}
|
|
241
|
+
• Complete HTML: <!DOCTYPE html> through </html>. ALL styling in <style>.
|
|
242
|
+
• NO <img>, NO external resources, NO JavaScript, NO external fonts.
|
|
243
|
+
• System fonts ONLY. CSS for visuals: gradients, shapes, shadows, borders.
|
|
244
|
+
• Title: 42-48px bold. Body: 26-32px. MINIMUM any text: 24px. If text needs to shrink below 24px, remove content instead.
|
|
245
|
+
• Content fills 85-95% of 1080px height. Empty space = FAILURE. MAX ~1000 chars of visible text.
|
|
246
|
+
• NEVER use justify-content:center on .content (creates dead space). Use stretch/space-evenly.
|
|
247
|
+
• Use gradients, box-shadow (0 4px 20px rgba(0,0,0,0.06)), border-radius (12-20px).
|
|
248
|
+
• Generate REAL professional content. No placeholders. Specific numbers and data.
|
|
249
|
+
• If user specified a year, USE THAT YEAR. Default to ${new Date().getFullYear()} only when no year given.
|
|
250
|
+
• Page number: bottom-right "${slideIndex + 1}" (12px, opacity 0.4).
|
|
251
|
+
|
|
252
|
+
Output the complete HTML now.`;
|
|
253
|
+
}
|
|
254
|
+
export function buildFreeHtmlPrompt(title, contentDirection, design, slideIndex, totalSlides, language) {
|
|
255
|
+
const langRule = language === 'ko'
|
|
256
|
+
? 'ALL visible text MUST be in Korean. Write naturally in Korean. Never use Chinese characters (漢字).'
|
|
257
|
+
: 'ALL visible text MUST be in English.';
|
|
258
|
+
const variants = [
|
|
259
|
+
`Background: ${design.background_color}. Elements use white background with box-shadow.`,
|
|
260
|
+
`Top accent bar (height:4px, linear-gradient(90deg, ${design.accent_color}, ${design.primary_color})). Background: ${design.background_color}.`,
|
|
261
|
+
`Subtle gradient background: linear-gradient(150deg, ${design.background_color} 0%, ${design.accent_light}40 100%). Stronger shadows.`,
|
|
262
|
+
];
|
|
263
|
+
const styleGuide = variants[slideIndex % variants.length];
|
|
264
|
+
return `You are a world-class presentation designer. Create ONE slide as a complete HTML page.
|
|
265
|
+
Output ONLY the complete HTML (<!DOCTYPE html> to </html>). No explanation, no markdown fences.
|
|
266
|
+
|
|
267
|
+
═══ SLIDE ${slideIndex + 1} OF ${totalSlides} ═══
|
|
268
|
+
Title: "${title}"
|
|
269
|
+
|
|
270
|
+
═══ CONTENT TO VISUALIZE ═══
|
|
271
|
+
${contentDirection}
|
|
272
|
+
|
|
273
|
+
═══ DESIGN SYSTEM ═══
|
|
274
|
+
Primary: ${design.primary_color} | Accent: ${design.accent_color} | BG: ${design.background_color}
|
|
275
|
+
Text: ${design.text_color} | Light: ${design.accent_light} | Gradient: ${design.gradient_end}
|
|
276
|
+
Title Font: ${design.font_title} | Body Font: ${design.font_body} | Mood: ${design.mood}
|
|
277
|
+
|
|
278
|
+
═══ STYLE FOR THIS SLIDE ═══
|
|
279
|
+
${styleGuide}
|
|
280
|
+
|
|
281
|
+
═══ YOUR CREATIVE MISSION ═══
|
|
282
|
+
Design the BEST possible visual layout for THIS specific content.
|
|
283
|
+
Think like a professional designer: what visual structure best communicates this information?
|
|
284
|
+
|
|
285
|
+
You have FULL CREATIVE FREEDOM. Choose the most appropriate visual approach:
|
|
286
|
+
• Card grids (2×2, 1×3, 1×4) with icons, stats, bullet details
|
|
287
|
+
• Styled data tables (<table>) with colored headers and alternating rows
|
|
288
|
+
• CSS bar charts: vertical bars using flex-end alignment + height percentages
|
|
289
|
+
• Donut/pie charts: conic-gradient on border-radius:50% elements
|
|
290
|
+
• Horizontal progress bars with labeled tracks and percentage fills
|
|
291
|
+
• Step-by-step process flows with numbered circles + arrow (→) connectors
|
|
292
|
+
• Timeline layouts with dated milestone cards in a horizontal row
|
|
293
|
+
• Dashboard panels: 2-3 large metric spotlights (80-100px numbers)
|
|
294
|
+
• 2-column split: left summary/data + right detailed content or bullets
|
|
295
|
+
• Feature showcases with emoji/icon badges
|
|
296
|
+
• Itinerary/schedule: day-by-day breakdown with locations and activities
|
|
297
|
+
• Ranking/leaderboard: ordered items with visual indicators
|
|
298
|
+
• Comparison matrices: side-by-side analysis with visual scoring
|
|
299
|
+
• SWOT or quadrant grids for strategic analysis
|
|
300
|
+
• Package/pricing comparison: side-by-side product cards with highlights
|
|
301
|
+
• Any OTHER CSS-only visual that serves the content perfectly
|
|
302
|
+
|
|
303
|
+
⚠ Choose the layout that BEST fits THIS content. Match layout to content type: schedules for timelines, charts for financial data, comparison matrices for competitive analysis, card grids for feature showcases. Be creative and appropriate.
|
|
304
|
+
|
|
305
|
+
═══ MANDATORY CSS BOILERPLATE (copy into <style>) ═══
|
|
306
|
+
* { margin:0; padding:0; box-sizing:border-box; }
|
|
307
|
+
html, body { width:1920px; height:1080px; overflow:hidden; font-family:"${design.font_body}","${design.font_title}","Segoe UI","Malgun Gothic",Arial,sans-serif; word-break:keep-all; overflow-wrap:break-word; }
|
|
308
|
+
body { display:flex; flex-direction:column; padding:60px 80px; height:1080px; background:${design.background_color}; color:${design.text_color}; font-size:26px; }
|
|
309
|
+
|
|
310
|
+
═══ HTML STRUCTURE ═══
|
|
311
|
+
body has EXACTLY 2 direct children:
|
|
312
|
+
1. .slide-title (flex:0 0 auto) — h1 with title + accent bar
|
|
313
|
+
.slide-title h1 { font-size:48px; font-weight:700; color:${design.primary_color}; font-family:"${design.font_title}","Segoe UI",sans-serif; }
|
|
314
|
+
Below h1: <div style="width:80px;height:3px;background:${design.accent_color};border-radius:2px;margin-top:12px"></div>
|
|
315
|
+
2. .content (flex:1) — stretches to fill ALL remaining vertical space
|
|
316
|
+
⚠ .content class name is REQUIRED.
|
|
317
|
+
⚠ ALL layout elements MUST be DIRECT children of .content — no wrapper divs.
|
|
318
|
+
|
|
319
|
+
═══ DESIGN RULES ═══
|
|
320
|
+
• ${langRule}
|
|
321
|
+
• Complete HTML: <!DOCTYPE html> through </html>. ALL styling in <style>.
|
|
322
|
+
• NO <img>, NO external resources, NO JavaScript, NO external fonts.
|
|
323
|
+
• System fonts ONLY. CSS for visuals: gradients, shapes, shadows, borders.
|
|
324
|
+
• Title: 42-48px bold. Body: 28-32px. MINIMUM any visible text: 24px (except page numbers at 12px).
|
|
325
|
+
• ⚠ Korean text is WIDER and DENSER than English — use FEWER items with LARGER fonts. Each card/element: MAX 2-3 short lines.
|
|
326
|
+
• ⚠ If you need to shrink text below 24px, you have TOO MUCH content. Remove sections or shorten text instead.
|
|
327
|
+
• ⚠ ABSOLUTELY NO OVERFLOW — content MUST fit within 1080px total height. It is BETTER to have 20% empty space than 1px of clipping. Limit yourself to 3-4 major content elements max.
|
|
328
|
+
• The available height for .content is approximately 900px (1080 - 60px top padding - 60px bottom padding - ~60px title). Design within this constraint.
|
|
329
|
+
• ⚠ MAXIMUM visible text: ~800 characters. More than this WILL cause overflow. Be concise — short labels, brief bullet points (max 8-10 words each).
|
|
330
|
+
• NEVER use position:absolute for layout (ok for page numbers). Use flexbox/grid.
|
|
331
|
+
• NEVER use justify-content:center on .content — it creates dead space. Use stretch/space-evenly.
|
|
332
|
+
• Use gradients, box-shadow (0 4px 20px rgba(0,0,0,0.06)), border-radius (12-20px).
|
|
333
|
+
• Cards/elements: white (#fff) background with subtle shadow on light slides.
|
|
334
|
+
• Table headers: dark background (${design.primary_color}) with white text.
|
|
335
|
+
• Generate REAL professional content from the direction. No placeholders.
|
|
336
|
+
• ⚠ NEVER use bracket placeholders like [Team Name], [Email], [YYYY], [Author]. Instead, INVENT realistic fictional content for ALL fields — names, emails, dates, numbers, etc.
|
|
337
|
+
• If user specified a year, USE THAT YEAR. Default to ${new Date().getFullYear()} only when no year given.
|
|
338
|
+
• Page number: bottom-right "${slideIndex + 1}" (12px, opacity 0.4, position:absolute ok for this).
|
|
339
|
+
|
|
340
|
+
Output the complete HTML now.`;
|
|
341
|
+
}
|
|
342
|
+
export function validateSlideHtml(html, _layoutType) {
|
|
343
|
+
if (!html.includes('<!DOCTYPE') && !html.includes('<!doctype')) {
|
|
344
|
+
return { pass: false, feedback: 'Missing <!DOCTYPE html> declaration. Start with <!DOCTYPE html><html>.' };
|
|
345
|
+
}
|
|
346
|
+
if (!html.includes('<html') || !html.includes('</html>')) {
|
|
347
|
+
return { pass: false, feedback: 'Missing <html> or </html> tags. Output must be a complete HTML document.' };
|
|
348
|
+
}
|
|
349
|
+
if (/<img\s/i.test(html)) {
|
|
350
|
+
return { pass: false, feedback: 'Forbidden: <img> tags are not allowed. Use CSS gradients, shapes, and backgrounds instead.' };
|
|
351
|
+
}
|
|
352
|
+
if (/<script[\s>]/i.test(html)) {
|
|
353
|
+
return { pass: false, feedback: 'Forbidden: <script> tags are not allowed. This is a static slide — no JavaScript.' };
|
|
354
|
+
}
|
|
355
|
+
const absCount = (html.match(/position\s*:\s*absolute/gi) || []).length;
|
|
356
|
+
if (absCount > 6) {
|
|
357
|
+
return { pass: false, feedback: `Too many position:absolute (${absCount}). Use flexbox/grid for main layout.` };
|
|
358
|
+
}
|
|
359
|
+
const externalUrls = html.match(/url\(\s*['"]?https?:\/\//gi) || [];
|
|
360
|
+
if (externalUrls.length > 0) {
|
|
361
|
+
return { pass: false, feedback: 'Forbidden: External URLs detected in CSS url(). No external resources allowed.' };
|
|
362
|
+
}
|
|
363
|
+
const scaleMatches = html.match(/transform\s*:[^;]*scale\(\s*([\d.]+)/gi) || [];
|
|
364
|
+
for (const m of scaleMatches) {
|
|
365
|
+
const val = parseFloat(m.replace(/.*scale\(\s*/i, ''));
|
|
366
|
+
if (val > 0 && val < 0.9) {
|
|
367
|
+
return { pass: false, feedback: `Forbidden: transform:scale(${val}) shrinks content. Use full 1920×1080 layout without scaling.` };
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
const placeholderPatterns = [
|
|
371
|
+
/Card title \(2-5 words\)/i,
|
|
372
|
+
/Detail with number\/data/i,
|
|
373
|
+
/single emoji/i,
|
|
374
|
+
/Display value \(e\.g\./i,
|
|
375
|
+
/1-2 sentence key insight/i,
|
|
376
|
+
/Category name/i,
|
|
377
|
+
/Segment name/i,
|
|
378
|
+
/Lorem ipsum/i,
|
|
379
|
+
/\[placeholder\]/i,
|
|
380
|
+
/\[내용\]/i,
|
|
381
|
+
/\[.{2,20}을\s*입력/i,
|
|
382
|
+
/\[YYYY/i,
|
|
383
|
+
/\[이메일/i,
|
|
384
|
+
/\[작성자/i,
|
|
385
|
+
/\[직급/i,
|
|
386
|
+
/\[NNNN\]/i,
|
|
387
|
+
/\[MM월/i,
|
|
388
|
+
/\[담당자\s*명\]/i,
|
|
389
|
+
];
|
|
390
|
+
for (const pattern of placeholderPatterns) {
|
|
391
|
+
if (pattern.test(html)) {
|
|
392
|
+
return { pass: false, feedback: `Placeholder text detected: "${pattern.source}". Generate REAL content.` };
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
const textElements = (html.match(/<(p|li|td|th|span|div|h[1-6])[^>]*>[^<]{2,}/gi) || []).length;
|
|
396
|
+
if (textElements < 5) {
|
|
397
|
+
return { pass: false, feedback: `Low content density: only ${textElements} text elements. Need at least 5.` };
|
|
398
|
+
}
|
|
399
|
+
const visibleText = html.replace(/<style[\s\S]*?<\/style>/gi, '')
|
|
400
|
+
.replace(/<[^>]+>/g, ' ')
|
|
401
|
+
.replace(/\s+/g, ' ')
|
|
402
|
+
.trim();
|
|
403
|
+
if (visibleText.length > 1200) {
|
|
404
|
+
return { pass: false, feedback: `Content overflow risk: ${visibleText.length} chars of visible text. Reduce to under 1200 chars. Remove 1-2 sections or shorten text to prevent bottom clipping.` };
|
|
405
|
+
}
|
|
406
|
+
const smallFonts = html.match(/font-size\s*:\s*(\d+)px/gi) || [];
|
|
407
|
+
for (const match of smallFonts) {
|
|
408
|
+
const size = parseInt(match.replace(/[^0-9]/g, ''), 10);
|
|
409
|
+
if (size > 0 && size < 24 && size > 13) {
|
|
410
|
+
return { pass: false, feedback: `Font too small: found font-size:${size}px. Minimum allowed is 24px (except 12-13px for page numbers). Increase font size or reduce content.` };
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return { pass: true, feedback: '' };
|
|
414
|
+
}
|
|
415
|
+
export function buildSlideHtmlPrompt(slideTitle, contentDirection, design, slideIndex, totalSlides, language, layoutType = 'cards') {
|
|
416
|
+
const langRule = language === 'ko'
|
|
417
|
+
? 'ALL visible text MUST be in Korean. Write naturally in Korean.'
|
|
418
|
+
: 'ALL visible text MUST be in English.';
|
|
419
|
+
const styleVariants = [
|
|
420
|
+
'LIGHT',
|
|
421
|
+
'ACCENT_HEADER',
|
|
422
|
+
'GRADIENT_BG',
|
|
423
|
+
];
|
|
424
|
+
const styleVariant = styleVariants[slideIndex % styleVariants.length];
|
|
425
|
+
const styleGuide = {
|
|
426
|
+
'LIGHT': `Background: ${design.background_color}. Title: ${design.primary_color}, 48-56px bold. Cards/elements use white background with box-shadow.`,
|
|
427
|
+
'ACCENT_HEADER': `Add a bold accent bar at top (height:6px, background: linear-gradient(90deg, ${design.accent_color}, ${design.primary_color})). Title directly below. Background: ${design.background_color}.`,
|
|
428
|
+
'GRADIENT_BG': `Subtle gradient background: linear-gradient(150deg, ${design.background_color} 0%, ${design.accent_light} 50%, ${design.background_color} 100%). Elements use stronger shadows (0 8px 32px rgba(0,0,0,0.08)).`,
|
|
429
|
+
};
|
|
430
|
+
return `You are a world-class web designer creating a presentation slide as a complete HTML page.
|
|
431
|
+
Output ONLY the complete HTML document — nothing else. No explanation, no markdown fences.
|
|
432
|
+
|
|
433
|
+
═══ SLIDE INFO ═══
|
|
434
|
+
Title: "${slideTitle}"
|
|
435
|
+
Slide ${slideIndex + 1} of ${totalSlides}
|
|
436
|
+
|
|
437
|
+
═══ CONTENT DIRECTION (what to show on this slide) ═══
|
|
438
|
+
${contentDirection}
|
|
439
|
+
|
|
440
|
+
⚠⚠⚠ CRITICAL: The content_direction above is a GUIDE for what content to create.
|
|
441
|
+
Generate REAL, specific, professional text based on it. NEVER display the content_direction text literally on the slide.
|
|
442
|
+
If it says "3 big metrics: X, Y, Z" → create 3 beautifully formatted metric cards with X, Y, Z values.
|
|
443
|
+
If it says "Layout: comparison table" → create a table with the DATA mentioned, not the word "comparison table".
|
|
444
|
+
|
|
445
|
+
═══ DESIGN SYSTEM ═══
|
|
446
|
+
Primary: ${design.primary_color} | Accent: ${design.accent_color} | Background: ${design.background_color}
|
|
447
|
+
Text: ${design.text_color} | Accent Light: ${design.accent_light} | Gradient End: ${design.gradient_end}
|
|
448
|
+
Title Font: ${design.font_title} | Body Font: ${design.font_body}
|
|
449
|
+
Mood: ${design.mood} | Notes: ${design.design_notes}
|
|
450
|
+
|
|
451
|
+
═══ THIS SLIDE'S VISUAL STYLE ═══
|
|
452
|
+
${styleGuide[styleVariant]}
|
|
453
|
+
This ensures visual variety across slides. Follow this style direction.
|
|
454
|
+
|
|
455
|
+
═══ MANDATORY CSS BOILERPLATE — COPY EXACTLY ═══
|
|
456
|
+
Your <style> tag MUST start with these EXACT rules (copy verbatim):
|
|
457
|
+
|
|
458
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
459
|
+
html, body {
|
|
460
|
+
width: 1920px; height: 1080px; overflow: hidden;
|
|
461
|
+
font-family: "${design.font_body}", "${design.font_title}", "Segoe UI", "Malgun Gothic", Arial, sans-serif;
|
|
462
|
+
word-break: keep-all;
|
|
463
|
+
overflow-wrap: break-word;
|
|
464
|
+
}
|
|
465
|
+
body {
|
|
466
|
+
display: flex; flex-direction: column;
|
|
467
|
+
padding: 60px 80px;
|
|
468
|
+
height: 1080px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
⚠ word-break:keep-all is CRITICAL for Korean text — without it, words break at random characters.
|
|
472
|
+
⚠ body MUST be display:flex + flex-direction:column + height:1080px for vertical fill.
|
|
473
|
+
⚠ The main content container (the one with cards/table/chart) MUST use class="content" — required for post-processing.
|
|
474
|
+
|
|
475
|
+
═══ TECHNICAL REQUIREMENTS ═══
|
|
476
|
+
1. Complete HTML: <!DOCTYPE html> through </html>
|
|
477
|
+
2. ALL styling in <style> tag — no external resources, images, fonts, or scripts
|
|
478
|
+
3. System fonts ONLY. NO <img> tags.
|
|
479
|
+
4. Use CSS for visuals: gradients, shapes, shadows, borders, pseudo-elements
|
|
480
|
+
5. FIXED pixel layout — NO max-width, NO media queries, NO percentage widths below 80%
|
|
481
|
+
6. body IS the container — no wrapper divs. Content goes directly in body.
|
|
482
|
+
|
|
483
|
+
═══ VERTICAL FILL — THE #1 QUALITY RULE ═══
|
|
484
|
+
⚠⚠⚠ Content MUST fill the ENTIRE 1920×1080 slide. Empty space = FAILURE.
|
|
485
|
+
⚠⚠⚠ NEVER have more than 150px of empty whitespace anywhere on the slide.
|
|
486
|
+
|
|
487
|
+
MANDATORY STRUCTURE (body has EXACTLY 2 direct children):
|
|
488
|
+
body (display:flex, flex-direction:column, height:1080px, padding:60px 80px)
|
|
489
|
+
→ .slide-title (flex:0 0 auto — title text only, NO extra margin-bottom)
|
|
490
|
+
→ .content (flex:1 — STRETCHES to fill ALL remaining vertical space)
|
|
491
|
+
|
|
492
|
+
⚠ body MUST have exactly 2 direct children: .slide-title and .content. No accent bars, no spacers, no extra divs between them.
|
|
493
|
+
⚠ .slide-title should include any accent bars/decorations AS PART OF the title section, not as separate body children.
|
|
494
|
+
⚠ .content MUST use flex:1 to stretch. NEVER use justify-content:center on .content — it creates dead space.
|
|
495
|
+
⚠⚠⚠ ALL content elements (cards, bars, table, timeline items) MUST be DIRECT CHILDREN of .content. NEVER wrap them in a container/wrapper div inside .content. Wrong: .content > .wrapper > items. Right: .content > items.
|
|
496
|
+
|
|
497
|
+
${getLayoutSpecificCss(layoutType, design)}
|
|
498
|
+
|
|
499
|
+
═══ DESIGN RULES ═══
|
|
500
|
+
1. Title: 42-48px bold. Body: 26-32px. MINIMUM any visible text: 24px. NEVER use font-size below 24px. If content doesn't fit at 24px, REDUCE ITEM COUNT instead of shrinking text. Card descriptions: 26-30px. Card titles: 32-40px. Labels/captions: 24px minimum. body { font-size: 26px; } is MANDATORY. MAX visible text ~1000 characters.
|
|
501
|
+
2. Use gradients, box-shadow (0 4px 20px rgba(0,0,0,0.06)), border-radius (12-20px)
|
|
502
|
+
3. Follow the REQUIRED LAYOUT specified above exactly. Do NOT substitute a different layout type.
|
|
503
|
+
4. LAYOUT LIMITS: MAX 4 cards (2×2 grid), MAX 2 cards per row. Tables: 5-8 rows for rich data. Timeline: 4-5 steps.
|
|
504
|
+
⚠ If content_direction lists 5+ items, group them into 4 cards (combine related items).
|
|
505
|
+
5. ⚠⚠⚠ NEVER use position:absolute. ALL layout MUST use flexbox/grid. position:absolute is STRIPPED by the renderer.
|
|
506
|
+
6. ⚠ NEVER use hub-and-spoke or center-circle layouts (a circle in the center with items around it). The overlapping circle ALWAYS covers text. Use a simple card grid instead.
|
|
507
|
+
7. ⚠ MAXIMUM 4 columns in any grid layout. 5+ columns = text too small. Use 2-3 columns + 2 rows instead.
|
|
508
|
+
8. PIE/DONUT: conic-gradient on border-radius:50% div ONLY. No clip-path or rotated divs.
|
|
509
|
+
9. Bar chart labels: min-width:120px, text-align:center. Never let labels wrap per-character.
|
|
510
|
+
10. ⚠ NO LINE CHARTS in CSS — lines/dots never align correctly. Use bar charts (flex-end alignment) or donut charts (conic-gradient) instead.
|
|
511
|
+
11. CSS CHARTS THAT WORK: vertical bar charts (flex-end + height%), horizontal bar charts (width%), donut/pie charts (conic-gradient + border-radius:50%), progress bars (width%). Use these liberally for data visualization.
|
|
512
|
+
12. Table headers: dark background (${design.primary_color}) with WHITE text. Never transparent.
|
|
513
|
+
|
|
514
|
+
═══ SPACE UTILIZATION — NO DEAD ZONES ═══
|
|
515
|
+
⚠ Content MUST be distributed across the full 1080px height. No section should be >150px of empty whitespace.
|
|
516
|
+
⚠ If using a colored header/banner area, it MUST NOT exceed 20% of slide height (216px max).
|
|
517
|
+
⚠ The main content area (.content with flex:1) must contain the MAJORITY of visible information.
|
|
518
|
+
⚠ Cards stretch to fill height via align-items:stretch from parent — but they MUST have DENSE content inside (see CARD CONTENT DENSITY above).
|
|
519
|
+
⚠ NEVER use justify-content:center or align-items:center on .content — it bunches content in the center with empty space around it.
|
|
520
|
+
⚠ NEVER use justify-content:space-between on individual cards — it creates huge gaps between sparse items. Use flex-start + gap instead.
|
|
521
|
+
⚠ Cards in a row: parent uses align-items:stretch (default) so cards fill the full height.
|
|
522
|
+
|
|
523
|
+
═══ TABLE COMPLETENESS — MANDATORY ═══
|
|
524
|
+
⚠ If you create a table, EVERY cell MUST contain real data. Empty cells = FAILURE.
|
|
525
|
+
⚠ For comparison tables: fill ALL columns for ALL competitors/items with realistic data.
|
|
526
|
+
⚠ Example: 5-company comparison → all 5 columns must have data in every row.
|
|
527
|
+
⚠ NEVER create a table with only 1 column filled — that's not a comparison, it's a list.
|
|
528
|
+
|
|
529
|
+
═══ CONTENT RULES ═══
|
|
530
|
+
• ${langRule}
|
|
531
|
+
• Korean text only — never Chinese characters (漢字), Japanese, or other scripts
|
|
532
|
+
• Generate REAL, specific content — no placeholders
|
|
533
|
+
• BALANCE density and readability — fill 80-90% of the slide area with meaningful content. Avoid both sparse slides and overloaded slides.
|
|
534
|
+
• If the user specifies a year in their request, USE THAT YEAR faithfully. Only default to ${new Date().getFullYear()} for content with no explicit year.
|
|
535
|
+
• ALL content MUST fit within 1080px height. Use compact padding (24-32px) and dense content. Fill 85-95% of slide area.
|
|
536
|
+
• Each section: 3-5 detailed bullet points with specific data. Dense content beats wide padding.
|
|
537
|
+
• body MUST set font-size: 26px as the base. All text inherits at least 26px unless explicitly larger.
|
|
538
|
+
|
|
539
|
+
═══ PAGE NUMBER ═══
|
|
540
|
+
Bottom-right: "${slideIndex + 1}" (12px, opacity 0.4)
|
|
541
|
+
|
|
542
|
+
Output the complete HTML document now. Start with <!DOCTYPE html> and end with </html>.`;
|
|
543
|
+
}
|
|
544
|
+
export function buildContentFillJsonPrompt(slideTitle, contentDirection, layoutType, language) {
|
|
545
|
+
const langRule = language === 'ko'
|
|
546
|
+
? 'ALL text MUST be in Korean. Write naturally in Korean. Never use Chinese characters (漢字).'
|
|
547
|
+
: 'ALL text MUST be in English.';
|
|
548
|
+
const schemas = {
|
|
549
|
+
cards: `{
|
|
550
|
+
"cards": [
|
|
551
|
+
{ "icon": "single emoji", "title": "Short card title (2-5 words)", "bullets": ["Detail with data", "Another detail", "Third point"], "stat": "Key metric with number" }
|
|
552
|
+
]
|
|
553
|
+
}
|
|
554
|
+
RULES: 3-4 cards. Each: icon + title + 3 bullets (MAX 3, keep each under 25 chars) + stat.`,
|
|
555
|
+
bar_chart: `{
|
|
556
|
+
"bars": [
|
|
557
|
+
{ "label": "Category name (under 15 chars)", "value": "Number with unit", "height": 85 }
|
|
558
|
+
],
|
|
559
|
+
"insight": "1-2 sentence key insight about the data"
|
|
560
|
+
}
|
|
561
|
+
RULES: 4-5 bars (MAX 5). height: 10-90 (tallest=85, others proportional). Values must include units.`,
|
|
562
|
+
donut_chart: `{
|
|
563
|
+
"segments": [
|
|
564
|
+
{ "label": "Segment name", "value": "Number with unit", "percent": 45 }
|
|
565
|
+
],
|
|
566
|
+
"centerText": "Total or summary label",
|
|
567
|
+
"summary": "1-2 sentence summary"
|
|
568
|
+
}
|
|
569
|
+
RULES: 3-5 segments. Percents MUST sum to exactly 100.`,
|
|
570
|
+
table: `{
|
|
571
|
+
"headers": ["Descriptive column name", "Another column", "Third column", "Fourth column"],
|
|
572
|
+
"rows": [["real data", "real data", "real data", "real data"]],
|
|
573
|
+
"highlightRow": 0,
|
|
574
|
+
"summary": "1-2 sentence summary"
|
|
575
|
+
}
|
|
576
|
+
RULES: 3-4 columns. 4-5 rows. ALL cells must contain real data. highlightRow: 0-indexed or null.
|
|
577
|
+
⚠ headers MUST be meaningful column names — NEVER use generic "Column 1", "Column 2".`,
|
|
578
|
+
process_flow: `{
|
|
579
|
+
"steps": [
|
|
580
|
+
{ "title": "Step name (2-4 words)", "desc": "2-3 sentence description with specific details", "detail": "Duration or key metric" }
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
RULES: 3-4 steps (MAX 4). Each: title + detailed description + time/metric.`,
|
|
584
|
+
big_numbers: `{
|
|
585
|
+
"metrics": [
|
|
586
|
+
{ "value": "Number only", "unit": "Unit text", "label": "Metric name", "desc": "1-2 sentence context", "trend": "▲ or ▼ + percentage", "positive": true }
|
|
587
|
+
]
|
|
588
|
+
}
|
|
589
|
+
RULES: 2-3 metrics. value=number only, unit=separate field. trend: ▲/▼ + percentage.`,
|
|
590
|
+
timeline: `{
|
|
591
|
+
"milestones": [
|
|
592
|
+
{ "date": "Date or period", "title": "Milestone name", "desc": "2-3 sentence description", "kpi": "Target metric" }
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
RULES: 3 milestones (MAX 3). Each with date, description, and KPI target.`,
|
|
596
|
+
progress_bars: `{
|
|
597
|
+
"bars": [
|
|
598
|
+
{ "label": "Category name", "value": "Display value with unit", "percent": 75, "detail": "Brief context" }
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
RULES: 4-6 bars. percent: 5-100. Include context detail for each.`,
|
|
602
|
+
hero_stat: `{
|
|
603
|
+
"number": "The big number",
|
|
604
|
+
"unit": "Unit or symbol",
|
|
605
|
+
"label": "What this number measures",
|
|
606
|
+
"context": "2-3 sentence context explaining significance",
|
|
607
|
+
"supporting": [
|
|
608
|
+
{ "value": "Number with unit", "label": "Supporting metric name" }
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
RULES: 1 hero number + context + 2-3 supporting metrics.`,
|
|
612
|
+
two_col_split: `{
|
|
613
|
+
"leftTitle": "Left column heading",
|
|
614
|
+
"leftItems": [
|
|
615
|
+
{ "label": "Item name", "value": "Item value with data" }
|
|
616
|
+
],
|
|
617
|
+
"rightTitle": "Right column heading",
|
|
618
|
+
"rightBullets": ["Detailed bullet point with data"]
|
|
619
|
+
}
|
|
620
|
+
RULES: Left: 3-4 key-value items with REAL data. Right: 3-4 detailed bullets with REAL data. Keep each bullet under 30 chars.`,
|
|
621
|
+
};
|
|
622
|
+
return `Extract content from the direction below and output ONLY valid JSON.
|
|
623
|
+
Do NOT output markdown fences, explanations, or anything besides the JSON object.
|
|
624
|
+
|
|
625
|
+
SLIDE TITLE: "${slideTitle}"
|
|
626
|
+
LAYOUT TYPE: ${layoutType}
|
|
627
|
+
|
|
628
|
+
CONTENT DIRECTION:
|
|
629
|
+
${contentDirection}
|
|
630
|
+
|
|
631
|
+
REQUIRED JSON SCHEMA:
|
|
632
|
+
${schemas[layoutType]}
|
|
633
|
+
|
|
634
|
+
${langRule}
|
|
635
|
+
Use SPECIFIC numbers, names, percentages from the content direction.
|
|
636
|
+
Each text field must be substantive (not 1-2 generic words).
|
|
637
|
+
If the content direction lacks specific data, generate realistic professional data that fits the topic.
|
|
638
|
+
|
|
639
|
+
Output the JSON object now:`;
|
|
640
|
+
}
|
|
641
|
+
export function parseContentFillJson(raw, layoutType) {
|
|
642
|
+
let cleaned = raw.trim();
|
|
643
|
+
if (cleaned.startsWith('```')) {
|
|
644
|
+
cleaned = cleaned.replace(/^```(?:json|JSON)?\s*\n?/, '').replace(/\n?```\s*$/, '');
|
|
645
|
+
}
|
|
646
|
+
const firstBrace = cleaned.indexOf('{');
|
|
647
|
+
const lastBrace = cleaned.lastIndexOf('}');
|
|
648
|
+
if (firstBrace >= 0 && lastBrace > firstBrace) {
|
|
649
|
+
cleaned = cleaned.slice(firstBrace, lastBrace + 1);
|
|
650
|
+
}
|
|
651
|
+
let parsed = null;
|
|
652
|
+
try {
|
|
653
|
+
parsed = JSON.parse(cleaned);
|
|
654
|
+
}
|
|
655
|
+
catch {
|
|
656
|
+
try {
|
|
657
|
+
const repaired = cleaned.replace(/,\s*([}\]])/g, '$1');
|
|
658
|
+
parsed = JSON.parse(repaired);
|
|
659
|
+
}
|
|
660
|
+
catch {
|
|
661
|
+
return null;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
if (!parsed)
|
|
665
|
+
return null;
|
|
666
|
+
const jsonStr = JSON.stringify(parsed);
|
|
667
|
+
const ellipsisMatches = jsonStr.match(/"\.\.\."|\u2026/g) || [];
|
|
668
|
+
const totalStringValues = jsonStr.match(/"[^"]+"/g) || [];
|
|
669
|
+
if (ellipsisMatches.length > 0 && totalStringValues.length > 0) {
|
|
670
|
+
const ellipsisRatio = ellipsisMatches.length / totalStringValues.length;
|
|
671
|
+
if (ellipsisRatio > 0.3) {
|
|
672
|
+
return null;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
const stringLiteralMatches = jsonStr.match(/"string"/g) || [];
|
|
676
|
+
if (stringLiteralMatches.length >= 2) {
|
|
677
|
+
return null;
|
|
678
|
+
}
|
|
679
|
+
switch (layoutType) {
|
|
680
|
+
case 'cards':
|
|
681
|
+
if (!Array.isArray(parsed['cards']) || parsed['cards'].length === 0)
|
|
682
|
+
return null;
|
|
683
|
+
break;
|
|
684
|
+
case 'bar_chart':
|
|
685
|
+
if (!Array.isArray(parsed['bars']) || parsed['bars'].length === 0)
|
|
686
|
+
return null;
|
|
687
|
+
break;
|
|
688
|
+
case 'donut_chart':
|
|
689
|
+
if (!Array.isArray(parsed['segments']) || parsed['segments'].length === 0)
|
|
690
|
+
return null;
|
|
691
|
+
break;
|
|
692
|
+
case 'table':
|
|
693
|
+
if (!Array.isArray(parsed['headers']) || !Array.isArray(parsed['rows']))
|
|
694
|
+
return null;
|
|
695
|
+
break;
|
|
696
|
+
case 'process_flow':
|
|
697
|
+
if (!Array.isArray(parsed['steps']) || parsed['steps'].length === 0)
|
|
698
|
+
return null;
|
|
699
|
+
break;
|
|
700
|
+
case 'big_numbers':
|
|
701
|
+
if (!Array.isArray(parsed['metrics']) || parsed['metrics'].length === 0)
|
|
702
|
+
return null;
|
|
703
|
+
break;
|
|
704
|
+
case 'timeline':
|
|
705
|
+
if (!Array.isArray(parsed['milestones']) || parsed['milestones'].length === 0)
|
|
706
|
+
return null;
|
|
707
|
+
break;
|
|
708
|
+
case 'progress_bars':
|
|
709
|
+
if (!Array.isArray(parsed['bars']) || parsed['bars'].length === 0)
|
|
710
|
+
return null;
|
|
711
|
+
break;
|
|
712
|
+
case 'hero_stat':
|
|
713
|
+
if (!parsed['number'])
|
|
714
|
+
return null;
|
|
715
|
+
break;
|
|
716
|
+
case 'two_col_split':
|
|
717
|
+
if (!parsed['leftTitle'] && !parsed['rightTitle'])
|
|
718
|
+
return null;
|
|
719
|
+
if (!Array.isArray(parsed['leftItems']) || parsed['leftItems'].length === 0)
|
|
720
|
+
return null;
|
|
721
|
+
if (!Array.isArray(parsed['rightBullets']) || parsed['rightBullets'].length === 0)
|
|
722
|
+
return null;
|
|
723
|
+
break;
|
|
724
|
+
}
|
|
725
|
+
const allText = JSON.stringify(parsed).replace(/[{}\[\]",:]/g, '').trim();
|
|
726
|
+
if (allText.length < 50)
|
|
727
|
+
return null;
|
|
728
|
+
return parsed;
|
|
729
|
+
}
|
|
730
|
+
function getCardTextColor(design) {
|
|
731
|
+
const hex = (design.background_color || '#f8f9fa').replace('#', '');
|
|
732
|
+
const r = parseInt(hex.slice(0, 2), 16) || 200;
|
|
733
|
+
const g = parseInt(hex.slice(2, 4), 16) || 200;
|
|
734
|
+
const b = parseInt(hex.slice(4, 6), 16) || 200;
|
|
735
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
736
|
+
return luminance < 0.5 ? '#2D3748' : design.text_color;
|
|
737
|
+
}
|
|
738
|
+
function escapeHtmlTemplate(text) {
|
|
739
|
+
return text
|
|
740
|
+
.replace(/&/g, '&')
|
|
741
|
+
.replace(/</g, '<')
|
|
742
|
+
.replace(/>/g, '>')
|
|
743
|
+
.replace(/"/g, '"');
|
|
744
|
+
}
|
|
745
|
+
function wrapSlide(design, title, slideNum, contentCss, contentHtml, variant = 0) {
|
|
746
|
+
const bgVariants = [
|
|
747
|
+
`background:${design.background_color};`,
|
|
748
|
+
`background:linear-gradient(160deg,${design.background_color} 0%,${design.accent_light}40 100%);`,
|
|
749
|
+
`background:${design.background_color};`,
|
|
750
|
+
];
|
|
751
|
+
const bodyBg = bgVariants[variant % bgVariants.length];
|
|
752
|
+
const accentBar = variant % 3 === 2
|
|
753
|
+
? `<div style="height:4px;background:linear-gradient(90deg,${design.accent_color},${design.primary_color});margin-bottom:12px;border-radius:2px;flex-shrink:0"></div>`
|
|
754
|
+
: '';
|
|
755
|
+
return `<!DOCTYPE html>
|
|
756
|
+
<html lang="ko">
|
|
757
|
+
<head><meta charset="UTF-8"><style>
|
|
758
|
+
*{margin:0;padding:0;box-sizing:border-box}
|
|
759
|
+
html,body{width:1920px;height:1080px;overflow:hidden;font-family:"${design.font_body}","${design.font_title}","Segoe UI","Malgun Gothic",Arial,sans-serif;word-break:keep-all;overflow-wrap:break-word}
|
|
760
|
+
body{display:flex;flex-direction:column;padding:60px 80px;height:1080px;${bodyBg}color:${design.text_color};font-size:26px}
|
|
761
|
+
.slide-title{flex:0 0 auto;margin-bottom:20px}
|
|
762
|
+
.slide-title h1{font-size:48px;font-weight:700;color:${design.primary_color};font-family:"${design.font_title}","Segoe UI",sans-serif}
|
|
763
|
+
.title-bar{width:80px;height:3px;background:${design.accent_color};border-radius:2px;margin-top:12px}
|
|
764
|
+
.page-number{position:absolute;bottom:20px;right:80px;font-size:12px;opacity:0.4}
|
|
765
|
+
${contentCss}
|
|
766
|
+
</style></head>
|
|
767
|
+
<body>
|
|
768
|
+
<div class="slide-title">${accentBar}<h1>${escapeHtmlTemplate(title)}</h1><div class="title-bar"></div></div>
|
|
769
|
+
${contentHtml}
|
|
770
|
+
<div class="page-number">${slideNum}</div>
|
|
771
|
+
</body></html>`;
|
|
772
|
+
}
|
|
773
|
+
function buildCardsContent(design, data) {
|
|
774
|
+
const n = Math.min((data.cards || []).length, 4);
|
|
775
|
+
const cols = n <= 3 ? `repeat(${n},1fr)` : '1fr 1fr';
|
|
776
|
+
const is2x2 = n === 4;
|
|
777
|
+
const gridExtra = is2x2 ? 'grid-template-rows:1fr 1fr' : 'grid-template-rows:1fr';
|
|
778
|
+
const cardPad = is2x2 ? '28px 24px' : '48px 36px';
|
|
779
|
+
const cardGap = is2x2 ? '10px' : '16px';
|
|
780
|
+
const h2Size = is2x2 ? '32px' : '40px';
|
|
781
|
+
const liSize = is2x2 ? '26px' : '30px';
|
|
782
|
+
const liMargin = is2x2 ? '8px' : '14px';
|
|
783
|
+
const cardText = getCardTextColor(design);
|
|
784
|
+
const css = `.content{flex:1;display:grid;grid-template-columns:${cols};${gridExtra};gap:24px}
|
|
785
|
+
.card{background:#fff;border-radius:16px;padding:${cardPad};box-shadow:0 4px 20px rgba(0,0,0,0.06);display:flex;flex-direction:column;gap:${cardGap};overflow:hidden;color:${cardText}}
|
|
786
|
+
.card-icon{font-size:36px;line-height:1}
|
|
787
|
+
.card h2{font-size:${h2Size};font-weight:700;color:${design.primary_color}}
|
|
788
|
+
.card ul{list-style:none;flex:1;display:flex;flex-direction:column;justify-content:center}
|
|
789
|
+
.card li{margin-bottom:${liMargin};padding-left:22px;position:relative;font-size:${liSize};line-height:1.4}
|
|
790
|
+
.card li::before{content:"•";color:${design.accent_color};position:absolute;left:0;font-weight:bold}
|
|
791
|
+
.card-stat{margin-top:auto;padding-top:12px;border-top:2px solid ${design.accent_light};font-size:24px;font-weight:600;color:${design.accent_color}}`;
|
|
792
|
+
const maxBullets = 3;
|
|
793
|
+
const cards = (data.cards || []).slice(0, 4).map(c => `
|
|
794
|
+
<div class="card">
|
|
795
|
+
<div class="card-icon">${c.icon || '📌'}</div>
|
|
796
|
+
<h2>${escapeHtmlTemplate(c.title || '')}</h2>
|
|
797
|
+
<ul>${(c.bullets || []).slice(0, maxBullets).map(b => `<li>${escapeHtmlTemplate(b)}</li>`).join('')}</ul>
|
|
798
|
+
${c.stat ? `<div class="card-stat">${escapeHtmlTemplate(c.stat)}</div>` : ''}
|
|
799
|
+
</div>`).join('');
|
|
800
|
+
return { css, html: `<div class="content">${cards}\n</div>` };
|
|
801
|
+
}
|
|
802
|
+
function buildBarChartContent(design, data) {
|
|
803
|
+
const cardText = getCardTextColor(design);
|
|
804
|
+
const css = `.content{flex:1;display:flex;flex-direction:column}
|
|
805
|
+
.chart-area{flex:1;display:flex;align-items:stretch;gap:32px;padding:20px 60px 0}
|
|
806
|
+
.bar-group{flex:1;display:flex;flex-direction:column;align-items:center}
|
|
807
|
+
.bar-spacer{flex:1}
|
|
808
|
+
.bar-value{font-size:28px;font-weight:700;color:${design.primary_color};margin-bottom:8px;flex-shrink:0}
|
|
809
|
+
.bar{width:80%;border-radius:8px 8px 0 0;background:linear-gradient(180deg,${design.accent_color},${design.primary_color});flex-shrink:0}
|
|
810
|
+
.bar-label{font-size:24px;font-weight:600;color:${design.text_color};text-align:center;min-width:120px;word-break:keep-all;padding:12px 0;flex-shrink:0}
|
|
811
|
+
.insight-row{padding:20px 60px;background:${design.accent_light};border-radius:12px;margin-top:16px;font-size:26px;color:${cardText};line-height:1.5;flex-shrink:0}`;
|
|
812
|
+
const maxH = Math.max(...(data.bars || []).map(b => b.height || 50), 1);
|
|
813
|
+
const bars = (data.bars || []).slice(0, 5).map(b => {
|
|
814
|
+
const normalized = Math.max(8, Math.round(((b.height || 50) / maxH) * 85));
|
|
815
|
+
return `
|
|
816
|
+
<div class="bar-group">
|
|
817
|
+
<div class="bar-spacer"></div>
|
|
818
|
+
<div class="bar-value">${escapeHtmlTemplate(b.value || '')}</div>
|
|
819
|
+
<div class="bar" style="height:${normalized}%"></div>
|
|
820
|
+
<div class="bar-label">${escapeHtmlTemplate(b.label || '')}</div>
|
|
821
|
+
</div>`;
|
|
822
|
+
}).join('');
|
|
823
|
+
return {
|
|
824
|
+
css,
|
|
825
|
+
html: `<div class="content">
|
|
826
|
+
<div class="chart-area">${bars}</div>
|
|
827
|
+
<div class="insight-row">${escapeHtmlTemplate(data.insight || '')}</div>
|
|
828
|
+
</div>`,
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function buildDonutChartContent(design, data) {
|
|
832
|
+
const segColors = [design.primary_color, design.accent_color, design.gradient_end, '#FF6B6B', '#4ECDC4', '#45B7D1'];
|
|
833
|
+
const segs = (data.segments || []).slice(0, 6);
|
|
834
|
+
const totalPct = segs.reduce((s, seg) => s + (seg.percent || 0), 0);
|
|
835
|
+
let cumPct = 0;
|
|
836
|
+
const stops = segs.map((s, i) => {
|
|
837
|
+
const start = cumPct;
|
|
838
|
+
const pct = totalPct > 0 ? (s.percent / totalPct) * 100 : 100 / segs.length;
|
|
839
|
+
cumPct += pct;
|
|
840
|
+
return `${segColors[i % segColors.length]} ${start.toFixed(1)}% ${cumPct.toFixed(1)}%`;
|
|
841
|
+
}).join(',');
|
|
842
|
+
const css = `.content{flex:1;display:grid;grid-template-columns:1.2fr 1fr;gap:40px;align-items:center;align-content:center;padding:0}
|
|
843
|
+
.donut-wrap{display:flex;justify-content:center;align-items:center}
|
|
844
|
+
.donut{width:600px;height:600px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 32px rgba(0,0,0,0.08)}
|
|
845
|
+
.donut-hole{width:290px;height:290px;border-radius:50%;background:${design.background_color};display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px}
|
|
846
|
+
.donut-center{font-size:34px;font-weight:800;color:${design.primary_color};text-align:center;line-height:1.3}
|
|
847
|
+
.legend{display:flex;flex-direction:column;gap:24px}
|
|
848
|
+
.legend-item{display:flex;align-items:center;gap:16px;font-size:28px;padding:14px 18px;background:#fff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,0.04);color:${getCardTextColor(design)}}
|
|
849
|
+
.legend-dot{width:24px;height:24px;border-radius:50%;flex-shrink:0}
|
|
850
|
+
.legend-value{font-weight:700;color:${design.primary_color};margin-left:auto;white-space:nowrap}
|
|
851
|
+
.chart-summary{padding:16px 20px;background:${design.accent_light};border-radius:12px;font-size:24px;color:${getCardTextColor(design)};line-height:1.5;margin-top:8px}`;
|
|
852
|
+
const legendHtml = segs.map((s, i) => `
|
|
853
|
+
<div class="legend-item">
|
|
854
|
+
<div class="legend-dot" style="background:${segColors[i % segColors.length]}"></div>
|
|
855
|
+
<span>${escapeHtmlTemplate(s.label || '')}</span>
|
|
856
|
+
<span class="legend-value">${escapeHtmlTemplate(s.value || '')} (${s.percent}%)</span>
|
|
857
|
+
</div>`).join('');
|
|
858
|
+
return {
|
|
859
|
+
css,
|
|
860
|
+
html: `<div class="content">
|
|
861
|
+
<div class="donut-wrap">
|
|
862
|
+
<div class="donut" style="background:conic-gradient(${stops})">
|
|
863
|
+
<div class="donut-hole"><div class="donut-center">${escapeHtmlTemplate(data.centerText || '')}</div></div>
|
|
864
|
+
</div>
|
|
865
|
+
</div>
|
|
866
|
+
<div class="legend">${legendHtml}
|
|
867
|
+
${data.summary ? `<div class="chart-summary">${escapeHtmlTemplate(data.summary)}</div>` : ''}
|
|
868
|
+
</div>
|
|
869
|
+
</div>`,
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
function buildTableContent(design, data) {
|
|
873
|
+
const cardText = getCardTextColor(design);
|
|
874
|
+
const maxCols = Math.min((data.headers || []).length, 4);
|
|
875
|
+
const css = `.content{flex:1;display:flex;flex-direction:column;justify-content:center}
|
|
876
|
+
.data-table{width:100%;border-collapse:collapse;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,0.05);border-radius:12px;overflow:hidden;table-layout:fixed}
|
|
877
|
+
.data-table th{background:${design.primary_color};color:#fff;font-size:28px;text-align:left;padding:22px 28px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
878
|
+
.data-table td{font-size:28px;color:${cardText};padding:22px 28px;border-bottom:1px solid ${design.accent_light};overflow:hidden;word-break:break-word}
|
|
879
|
+
.data-table tr:last-child td{border-bottom:none}
|
|
880
|
+
.data-table tr:nth-child(even){background:${design.accent_light}20}
|
|
881
|
+
.data-table tr.highlight td{background:${design.accent_color}15;font-weight:600}
|
|
882
|
+
.table-summary{margin-top:20px;padding:16px 24px;background:${design.accent_light};border-radius:12px;font-size:26px;color:${cardText};line-height:1.5}`;
|
|
883
|
+
const headers = (data.headers || []).slice(0, maxCols).map(h => `<th>${escapeHtmlTemplate(String(h || '').slice(0, 25))}</th>`).join('');
|
|
884
|
+
const rows = (data.rows || []).slice(0, 5).map((row, ri) => {
|
|
885
|
+
const cls = ri === data.highlightRow ? ' class="highlight"' : '';
|
|
886
|
+
const cells = (row || []).slice(0, maxCols).map(c => `<td>${escapeHtmlTemplate(String(c || '').slice(0, 50))}</td>`).join('');
|
|
887
|
+
return `<tr${cls}>${cells}</tr>`;
|
|
888
|
+
}).join('\n');
|
|
889
|
+
return {
|
|
890
|
+
css,
|
|
891
|
+
html: `<div class="content">
|
|
892
|
+
<table class="data-table"><thead><tr>${headers}</tr></thead><tbody>\n${rows}\n</tbody></table>
|
|
893
|
+
${data.summary ? `<div class="table-summary">${escapeHtmlTemplate(data.summary)}</div>` : ''}
|
|
894
|
+
</div>`,
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
function buildProcessFlowContent(design, data) {
|
|
898
|
+
const n = Math.min((data.steps || []).length, 4);
|
|
899
|
+
const cardText = getCardTextColor(design);
|
|
900
|
+
const titleSz = n <= 3 ? '34px' : '32px';
|
|
901
|
+
const descSz = n <= 3 ? '28px' : '26px';
|
|
902
|
+
const detailSz = n <= 3 ? '28px' : '26px';
|
|
903
|
+
const css = `.content{flex:1;display:flex;align-items:stretch;gap:0}
|
|
904
|
+
.step{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 24px;background:#fff;border-radius:16px;text-align:center;gap:16px;box-shadow:0 4px 20px rgba(0,0,0,0.06)}
|
|
905
|
+
.step-num{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,${design.primary_color},${design.gradient_end});color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;flex-shrink:0}
|
|
906
|
+
.step-title{font-size:${titleSz};font-weight:700;color:${design.primary_color}}
|
|
907
|
+
.step-desc{font-size:${descSz};color:${cardText};line-height:1.5}
|
|
908
|
+
.step-detail{font-size:${detailSz};color:${design.accent_color};font-weight:600;padding-top:14px;border-top:2px solid ${design.accent_color}40}
|
|
909
|
+
.arrow{width:48px;display:flex;align-items:center;justify-content:center;font-size:40px;color:${design.accent_color};flex-shrink:0}`;
|
|
910
|
+
const steps = (data.steps || []).slice(0, 4);
|
|
911
|
+
const maxDescLen = n <= 3 ? 120 : 80;
|
|
912
|
+
const stepsHtml = steps.map((s, i) => {
|
|
913
|
+
const desc = (s.desc || '').slice(0, maxDescLen);
|
|
914
|
+
const stepDiv = `
|
|
915
|
+
<div class="step">
|
|
916
|
+
<div class="step-num">${i + 1}</div>
|
|
917
|
+
<div class="step-title">${escapeHtmlTemplate(s.title || '')}</div>
|
|
918
|
+
<div class="step-desc">${escapeHtmlTemplate(desc)}</div>
|
|
919
|
+
${s.detail ? `<div class="step-detail">${escapeHtmlTemplate(s.detail)}</div>` : ''}
|
|
920
|
+
</div>`;
|
|
921
|
+
return i < steps.length - 1 ? stepDiv + '\n <div class="arrow">→</div>' : stepDiv;
|
|
922
|
+
}).join('');
|
|
923
|
+
return { css, html: `<div class="content">${stepsHtml}\n</div>` };
|
|
924
|
+
}
|
|
925
|
+
function buildBigNumbersContent(design, data) {
|
|
926
|
+
const cardText = getCardTextColor(design);
|
|
927
|
+
const css = `.content{flex:1;display:flex;gap:40px;align-items:center}
|
|
928
|
+
.metric-card{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:56px 36px;border-radius:20px;background:#fff;box-shadow:0 6px 28px rgba(0,0,0,0.08);text-align:center;gap:20px;border-top:4px solid ${design.accent_color}}
|
|
929
|
+
.metric-value{font-size:100px;font-weight:800;color:${design.primary_color};line-height:1}
|
|
930
|
+
.metric-unit{font-size:36px;font-weight:600;color:${design.accent_color}}
|
|
931
|
+
.metric-label{font-size:32px;font-weight:600;color:${cardText}}
|
|
932
|
+
.metric-desc{font-size:26px;color:${cardText}aa;line-height:1.5;max-width:90%}
|
|
933
|
+
.metric-trend{font-size:28px;font-weight:600}`;
|
|
934
|
+
const metrics = (data.metrics || []).slice(0, 3).map(m => `
|
|
935
|
+
<div class="metric-card">
|
|
936
|
+
<div class="metric-value">${escapeHtmlTemplate(m.value || '')}</div>
|
|
937
|
+
<div class="metric-unit">${escapeHtmlTemplate(m.unit || '')}</div>
|
|
938
|
+
<div class="metric-label">${escapeHtmlTemplate(m.label || '')}</div>
|
|
939
|
+
<div class="metric-desc">${escapeHtmlTemplate(m.desc || '')}</div>
|
|
940
|
+
<div class="metric-trend" style="color:${m.positive !== false ? '#10B981' : '#EF4444'}">${escapeHtmlTemplate(m.trend || '')}</div>
|
|
941
|
+
</div>`).join('');
|
|
942
|
+
return { css, html: `<div class="content">${metrics}\n</div>` };
|
|
943
|
+
}
|
|
944
|
+
function buildTimelineContent(design, data) {
|
|
945
|
+
const titleSz = '40px';
|
|
946
|
+
const descSz = '32px';
|
|
947
|
+
const kpiSz = '30px';
|
|
948
|
+
const pad = '44px 40px';
|
|
949
|
+
const css = `.content{flex:1;display:flex;align-items:stretch;gap:24px}
|
|
950
|
+
.milestone{flex:1;display:flex;flex-direction:column;justify-content:center;padding:${pad};border-radius:16px;background:#fff;box-shadow:0 4px 20px rgba(0,0,0,0.06);gap:18px}
|
|
951
|
+
.ms-date{display:inline-block;padding:8px 18px;border-radius:8px;background:${design.primary_color};color:#fff;font-size:26px;font-weight:700;align-self:flex-start}
|
|
952
|
+
.ms-title{font-size:${titleSz};font-weight:700;color:${design.primary_color}}
|
|
953
|
+
.ms-desc{font-size:${descSz};color:${getCardTextColor(design)};line-height:1.55}
|
|
954
|
+
.ms-kpi{font-size:${kpiSz};font-weight:600;color:${design.accent_color};padding-top:16px;border-top:2px solid ${design.accent_light}}`;
|
|
955
|
+
const milestones = (data.milestones || []).slice(0, 3).map((m) => `
|
|
956
|
+
<div class="milestone">
|
|
957
|
+
<div class="ms-date">${escapeHtmlTemplate(m.date || '')}</div>
|
|
958
|
+
<div class="ms-title">${escapeHtmlTemplate(m.title || '')}</div>
|
|
959
|
+
<div class="ms-desc">${escapeHtmlTemplate(m.desc || '')}</div>
|
|
960
|
+
${m.kpi ? `<div class="ms-kpi">${escapeHtmlTemplate(m.kpi)}</div>` : ''}
|
|
961
|
+
</div>`).join('');
|
|
962
|
+
return { css, html: `<div class="content">${milestones}\n</div>` };
|
|
963
|
+
}
|
|
964
|
+
function buildProgressBarsContent(design, data) {
|
|
965
|
+
const barCount = Math.min((data.bars || []).length, 6);
|
|
966
|
+
const barGap = barCount >= 5 ? '28px' : '44px';
|
|
967
|
+
const barHeight = barCount >= 5 ? '44px' : '56px';
|
|
968
|
+
const barRadius = barCount >= 5 ? '22px' : '28px';
|
|
969
|
+
const css = `.content{flex:1;display:flex;flex-direction:column;justify-content:center;gap:${barGap};padding:20px 0}
|
|
970
|
+
.bar-item{display:flex;flex-direction:column;gap:10px}
|
|
971
|
+
.bar-header{display:flex;justify-content:space-between;align-items:baseline}
|
|
972
|
+
.bar-label{font-size:32px;font-weight:600;color:${design.text_color}}
|
|
973
|
+
.bar-val{font-size:32px;font-weight:700;color:${design.primary_color}}
|
|
974
|
+
.bar-track{width:100%;height:${barHeight};background:${design.accent_light};border-radius:${barRadius};overflow:hidden}
|
|
975
|
+
.bar-fill{height:100%;border-radius:${barRadius};background:linear-gradient(90deg,${design.primary_color},${design.accent_color})}
|
|
976
|
+
.bar-detail{font-size:26px;color:${design.text_color}88;margin-top:-2px}`;
|
|
977
|
+
const bars = (data.bars || []).slice(0, 6).map(b => `
|
|
978
|
+
<div class="bar-item">
|
|
979
|
+
<div class="bar-header"><span class="bar-label">${escapeHtmlTemplate(b.label || '')}</span><span class="bar-val">${escapeHtmlTemplate(b.value || '')}</span></div>
|
|
980
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.max(5, Math.min(100, b.percent || 50))}%"></div></div>
|
|
981
|
+
${b.detail ? `<div class="bar-detail">${escapeHtmlTemplate(b.detail)}</div>` : ''}
|
|
982
|
+
</div>`).join('');
|
|
983
|
+
return { css, html: `<div class="content">${bars}\n</div>` };
|
|
984
|
+
}
|
|
985
|
+
function buildHeroStatContent(design, data) {
|
|
986
|
+
const css = `.content{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px}
|
|
987
|
+
.hero-number{font-size:128px;font-weight:900;color:${design.primary_color};line-height:1}
|
|
988
|
+
.hero-unit{font-size:48px;font-weight:600;color:${design.accent_color}}
|
|
989
|
+
.hero-label{font-size:36px;font-weight:600;color:${design.text_color}}
|
|
990
|
+
.hero-context{font-size:28px;color:${design.text_color}aa;text-align:center;max-width:800px;line-height:1.6}
|
|
991
|
+
.supporting-row{display:flex;gap:60px;margin-top:48px}
|
|
992
|
+
.sup-item{text-align:center}
|
|
993
|
+
.sup-value{font-size:40px;font-weight:700;color:${design.primary_color}}
|
|
994
|
+
.sup-label{font-size:24px;color:${design.text_color}aa;margin-top:8px}`;
|
|
995
|
+
const supporting = (data.supporting || []).slice(0, 3).map(s => `
|
|
996
|
+
<div class="sup-item">
|
|
997
|
+
<div class="sup-value">${escapeHtmlTemplate(s.value || '')}</div>
|
|
998
|
+
<div class="sup-label">${escapeHtmlTemplate(s.label || '')}</div>
|
|
999
|
+
</div>`).join('');
|
|
1000
|
+
return {
|
|
1001
|
+
css,
|
|
1002
|
+
html: `<div class="content">
|
|
1003
|
+
<div class="hero-number">${escapeHtmlTemplate(data.number || '')}</div>
|
|
1004
|
+
<div class="hero-unit">${escapeHtmlTemplate(data.unit || '')}</div>
|
|
1005
|
+
<div class="hero-label">${escapeHtmlTemplate(data.label || '')}</div>
|
|
1006
|
+
<div class="hero-context">${escapeHtmlTemplate(data.context || '')}</div>
|
|
1007
|
+
${supporting ? `<div class="supporting-row">${supporting}</div>` : ''}
|
|
1008
|
+
</div>`,
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function buildTwoColSplitContent(design, data) {
|
|
1012
|
+
const css = `.content{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:stretch}
|
|
1013
|
+
.col{display:flex;flex-direction:column;gap:14px;justify-content:space-evenly}
|
|
1014
|
+
.col h2{font-size:36px;font-weight:700;color:${design.primary_color};margin-bottom:12px;padding-bottom:12px;border-bottom:3px solid ${design.accent_color}}
|
|
1015
|
+
.kv-item{display:flex;justify-content:space-between;align-items:center;padding:28px 28px;background:#fff;border-radius:14px;box-shadow:0 2px 12px rgba(0,0,0,0.04);font-size:30px;color:${getCardTextColor(design)}}
|
|
1016
|
+
.kv-label{color:${getCardTextColor(design)};font-weight:500}
|
|
1017
|
+
.kv-value{color:${design.primary_color};font-weight:700;font-size:30px}
|
|
1018
|
+
.col ul{list-style:none;display:flex;flex-direction:column;gap:12px}
|
|
1019
|
+
.col li{padding:20px 20px 20px 34px;position:relative;font-size:28px;line-height:1.5;background:#fff;border-radius:12px;box-shadow:0 1px 8px rgba(0,0,0,0.03);color:${getCardTextColor(design)}}
|
|
1020
|
+
.col li::before{content:"•";color:${design.accent_color};position:absolute;left:12px;font-weight:bold}`;
|
|
1021
|
+
const leftItems = (data.leftItems || []).slice(0, 4).map(item => `
|
|
1022
|
+
<div class="kv-item"><span class="kv-label">${escapeHtmlTemplate(item.label || '')}</span><span class="kv-value">${escapeHtmlTemplate(item.value || '')}</span></div>`).join('');
|
|
1023
|
+
const rightBullets = (data.rightBullets || []).slice(0, 4).map(b => `<li>${escapeHtmlTemplate(b)}</li>`).join('');
|
|
1024
|
+
return {
|
|
1025
|
+
css,
|
|
1026
|
+
html: `<div class="content">
|
|
1027
|
+
<div class="col">
|
|
1028
|
+
<h2>${escapeHtmlTemplate(data.leftTitle || '')}</h2>
|
|
1029
|
+
${leftItems}
|
|
1030
|
+
</div>
|
|
1031
|
+
<div class="col">
|
|
1032
|
+
<h2>${escapeHtmlTemplate(data.rightTitle || '')}</h2>
|
|
1033
|
+
<ul>${rightBullets}</ul>
|
|
1034
|
+
</div>
|
|
1035
|
+
</div>`,
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
export function buildContentSlideHtml(design, title, layoutType, data, slideNum, variant = 0) {
|
|
1039
|
+
const builders = {
|
|
1040
|
+
cards: (d, dt) => buildCardsContent(d, dt),
|
|
1041
|
+
bar_chart: (d, dt) => buildBarChartContent(d, dt),
|
|
1042
|
+
donut_chart: (d, dt) => buildDonutChartContent(d, dt),
|
|
1043
|
+
table: (d, dt) => buildTableContent(d, dt),
|
|
1044
|
+
process_flow: (d, dt) => buildProcessFlowContent(d, dt),
|
|
1045
|
+
big_numbers: (d, dt) => buildBigNumbersContent(d, dt),
|
|
1046
|
+
timeline: (d, dt) => buildTimelineContent(d, dt),
|
|
1047
|
+
progress_bars: (d, dt) => buildProgressBarsContent(d, dt),
|
|
1048
|
+
hero_stat: (d, dt) => buildHeroStatContent(d, dt),
|
|
1049
|
+
two_col_split: (d, dt) => buildTwoColSplitContent(d, dt),
|
|
1050
|
+
};
|
|
1051
|
+
const builder = builders[layoutType] || builders.cards;
|
|
1052
|
+
const content = builder(design, data);
|
|
1053
|
+
return wrapSlide(design, title, slideNum, content.css, content.html, variant);
|
|
1054
|
+
}
|
|
1055
|
+
function getLayoutSpecificCss(layoutType, design) {
|
|
1056
|
+
const layouts = {
|
|
1057
|
+
cards: `═══ REQUIRED LAYOUT: CARD GRID ═══
|
|
1058
|
+
⚠⚠⚠ You MUST create a CARD GRID layout. Using any other layout = FAILURE.
|
|
1059
|
+
|
|
1060
|
+
CSS:
|
|
1061
|
+
.content { flex:1; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:24px; }
|
|
1062
|
+
.card { display:flex; flex-direction:column; justify-content:flex-start; gap:12px; padding:32px 28px; border-radius:16px; background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.06); overflow:hidden; }
|
|
1063
|
+
|
|
1064
|
+
⚠ grid-template-rows:1fr 1fr is CRITICAL — it forces cards to stretch and fill vertical space. Without it, cards collapse to content height leaving huge empty bottom.
|
|
1065
|
+
• MAX 4 cards (2×2). Each: icon/badge + title (32-40px) + 3 bullets (26px, MAX 3 per card, each under 25 chars) + stat/metric at bottom.
|
|
1066
|
+
• If only 3 items: grid-template-columns:1fr 1fr 1fr; grid-template-rows:1fr; (all 3 in one row)
|
|
1067
|
+
• MINIMUM CARD CONTENT: title + 3 bullet points with numbers/data + bottom metric. A card with only 1 bullet = FAILURE.
|
|
1068
|
+
• Card bottom stat: use margin-top:auto to push it to card bottom, creating visual anchor.
|
|
1069
|
+
• ⚠ NEVER have empty grid cells. If you have 3 items, use 3 columns. If 4, use 2×2.`,
|
|
1070
|
+
bar_chart: `═══ REQUIRED LAYOUT: BAR CHART ═══
|
|
1071
|
+
⚠⚠⚠ You MUST create a CSS BAR CHART with vertical bars. Cards/numbers/tables = FAILURE.
|
|
1072
|
+
|
|
1073
|
+
CSS:
|
|
1074
|
+
.content { flex:1; display:flex; flex-direction:column; }
|
|
1075
|
+
.chart-area { flex:1; display:flex; align-items:flex-end; gap:32px; padding:40px 60px 20px; }
|
|
1076
|
+
.bar-group { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; }
|
|
1077
|
+
.bar-value { font-size:28px; font-weight:700; color:${design.primary_color}; }
|
|
1078
|
+
.bar { width:80%; border-radius:8px 8px 0 0; background:linear-gradient(180deg, ${design.accent_color}, ${design.primary_color}); min-height:20px; }
|
|
1079
|
+
.bar-label { font-size:26px; font-weight:600; color:${design.text_color}; text-align:center; min-width:120px; }
|
|
1080
|
+
.insight-row { padding:20px 60px; background:${design.accent_light}; border-radius:12px; margin-top:20px; font-size:26px; color:${design.text_color}; }
|
|
1081
|
+
|
|
1082
|
+
CRITICAL PATTERN — your .content div MUST contain this structure:
|
|
1083
|
+
<div class="content">
|
|
1084
|
+
<div class="chart-area">
|
|
1085
|
+
<div class="bar-group">
|
|
1086
|
+
<div class="bar-value">VALUE</div>
|
|
1087
|
+
<div class="bar" style="height:75%"></div>
|
|
1088
|
+
<div class="bar-label">LABEL</div>
|
|
1089
|
+
</div>
|
|
1090
|
+
<!-- 3-6 bar-groups like above -->
|
|
1091
|
+
</div>
|
|
1092
|
+
<div class="insight-row">KEY INSIGHT TEXT</div>
|
|
1093
|
+
</div>
|
|
1094
|
+
|
|
1095
|
+
⚠ Each bar MUST have style="height:XX%" (tallest=85%, others proportional). align-items:flex-end on .chart-area makes bars grow upward.
|
|
1096
|
+
⚠ The insight-row at bottom provides context and fills space. Be creative with the insight text.
|
|
1097
|
+
⚠⚠⚠ .chart-area and .insight-row MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1098
|
+
donut_chart: `═══ REQUIRED LAYOUT: DONUT/PIE CHART ═══
|
|
1099
|
+
⚠⚠⚠ You MUST create a CSS DONUT CHART using conic-gradient. Cards/tables = FAILURE.
|
|
1100
|
+
|
|
1101
|
+
CSS:
|
|
1102
|
+
.content { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center; }
|
|
1103
|
+
.donut-wrap { display:flex; justify-content:center; align-items:center; }
|
|
1104
|
+
.donut { width:400px; height:400px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
|
|
1105
|
+
.donut-hole { width:200px; height:200px; border-radius:50%; background:${design.background_color}; display:flex; align-items:center; justify-content:center; }
|
|
1106
|
+
.donut-center { font-size:48px; font-weight:800; color:${design.primary_color}; }
|
|
1107
|
+
.legend { display:flex; flex-direction:column; gap:28px; }
|
|
1108
|
+
.legend-item { display:flex; align-items:center; gap:16px; font-size:28px; }
|
|
1109
|
+
.legend-dot { width:20px; height:20px; border-radius:50%; flex-shrink:0; }
|
|
1110
|
+
|
|
1111
|
+
CRITICAL PATTERN — the donut MUST use conic-gradient with ACTUAL data percentages:
|
|
1112
|
+
<div class="donut" style="background:conic-gradient(${design.primary_color} 0% 45%, ${design.accent_color} 45% 75%, ${design.gradient_end} 75% 100%);">
|
|
1113
|
+
|
|
1114
|
+
⚠ conic-gradient segments MUST add to 100%. Adjust percentages to match the ACTUAL DATA.
|
|
1115
|
+
⚠ Left: donut with center hole showing total/summary. Right: legend with colored dots + labels + values.`,
|
|
1116
|
+
table: `═══ REQUIRED LAYOUT: DATA TABLE ═══
|
|
1117
|
+
⚠⚠⚠ You MUST create a styled HTML TABLE with <table>/<th>/<td>. Cards = FAILURE.
|
|
1118
|
+
|
|
1119
|
+
CSS:
|
|
1120
|
+
.content { flex:1; display:flex; flex-direction:column; }
|
|
1121
|
+
table { width:100%; border-collapse:separate; border-spacing:0; border-radius:12px; overflow:hidden; flex:1; }
|
|
1122
|
+
th { padding:20px 24px; background:${design.primary_color}; color:#fff; font-size:26px; font-weight:700; text-align:left; }
|
|
1123
|
+
td { padding:20px 24px; font-size:26px; border-bottom:1px solid ${design.accent_light}; color:${design.text_color}; }
|
|
1124
|
+
tr:nth-child(even) td { background:${design.accent_light}40; }
|
|
1125
|
+
tr.highlight td { background:${design.accent_color}15; font-weight:600; }
|
|
1126
|
+
.summary-bar { margin-top:auto; padding:20px 24px; background:${design.accent_light}; border-radius:12px; font-size:26px; color:${design.text_color}; }
|
|
1127
|
+
|
|
1128
|
+
⚠ table uses flex:1 to stretch vertically. Use larger padding on td (28-32px) if fewer rows to fill space.
|
|
1129
|
+
⚠ Header: dark ${design.primary_color} background with WHITE text. 6-8 rows × 3-5 columns. EVERY cell real data.
|
|
1130
|
+
⚠ Add .summary-bar below table with margin-top:auto to anchor it at the bottom and fill remaining space.
|
|
1131
|
+
⚠⚠⚠ <table> and .summary-bar MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1132
|
+
process_flow: `═══ REQUIRED LAYOUT: PROCESS FLOW ═══
|
|
1133
|
+
⚠⚠⚠ You MUST create a HORIZONTAL PROCESS FLOW with step boxes + arrows (→). Cards without arrows = FAILURE.
|
|
1134
|
+
|
|
1135
|
+
CSS:
|
|
1136
|
+
.content { flex:1; display:flex; align-items:stretch; gap:0; }
|
|
1137
|
+
.step { flex:1; display:flex; flex-direction:column; align-items:center; padding:32px 20px; background:${design.accent_light}; border-radius:16px; text-align:center; gap:16px; }
|
|
1138
|
+
.step-number { width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg, ${design.primary_color}, ${design.gradient_end}); color:#fff; display:flex; align-items:center; justify-content:center; font-size:24px; font-weight:700; flex-shrink:0; }
|
|
1139
|
+
.step-title { font-size:28px; font-weight:700; color:${design.primary_color}; }
|
|
1140
|
+
.step-desc { font-size:24px; color:${design.text_color}; line-height:1.5; flex:1; }
|
|
1141
|
+
.step-time { font-size:24px; color:${design.accent_color}; font-weight:600; margin-top:auto; padding-top:12px; border-top:2px solid ${design.accent_color}40; }
|
|
1142
|
+
.arrow { width:60px; display:flex; align-items:center; justify-content:center; font-size:44px; color:${design.accent_color}; flex-shrink:0; }
|
|
1143
|
+
|
|
1144
|
+
CRITICAL PATTERN — your .content MUST alternate .step and .arrow divs:
|
|
1145
|
+
<div class="content">
|
|
1146
|
+
<div class="step">
|
|
1147
|
+
<div class="step-number">1</div>
|
|
1148
|
+
<div class="step-title">STEP TITLE</div>
|
|
1149
|
+
<div class="step-desc">Description text</div>
|
|
1150
|
+
<div class="step-time">Duration/detail</div>
|
|
1151
|
+
</div>
|
|
1152
|
+
<div class="arrow">→</div>
|
|
1153
|
+
<div class="step">...</div>
|
|
1154
|
+
<div class="arrow">→</div>
|
|
1155
|
+
<div class="step">...</div>
|
|
1156
|
+
</div>
|
|
1157
|
+
|
|
1158
|
+
⚠ 3-5 steps with → arrows between them. align-items:stretch makes all steps equal height.
|
|
1159
|
+
⚠ .step-time with margin-top:auto anchors it at the bottom of each step.
|
|
1160
|
+
⚠⚠⚠ .step and .arrow divs MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1161
|
+
big_numbers: `═══ REQUIRED LAYOUT: BIG NUMBER METRICS ═══
|
|
1162
|
+
⚠⚠⚠ You MUST create BIG NUMBER SPOTLIGHT cards with 72-96px numbers. Tables/small text = FAILURE.
|
|
1163
|
+
|
|
1164
|
+
CSS:
|
|
1165
|
+
.content { flex:1; display:flex; gap:40px; align-items:stretch; }
|
|
1166
|
+
.metric-card { flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:48px 32px; border-radius:20px; background:#fff; box-shadow:0 4px 24px rgba(0,0,0,0.06); text-align:center; gap:20px; }
|
|
1167
|
+
.metric-value { font-size:80px; font-weight:800; color:${design.primary_color}; line-height:1; }
|
|
1168
|
+
.metric-unit { font-size:32px; font-weight:600; color:${design.accent_color}; }
|
|
1169
|
+
.metric-label { font-size:28px; font-weight:600; color:${design.text_color}; }
|
|
1170
|
+
.metric-desc { font-size:24px; color:${design.text_color}aa; line-height:1.5; }
|
|
1171
|
+
.metric-trend { font-size:26px; font-weight:600; margin-top:auto; }
|
|
1172
|
+
|
|
1173
|
+
⚠ 2-3 metric cards side by side. Each: huge number (font-size:80px), unit, label, description, trend.
|
|
1174
|
+
⚠ align-items:stretch makes cards fill full height. justify-content:center within each card centers content.
|
|
1175
|
+
⚠ Trend colors: green (#10B981) for positive ▲, red (#EF4444) for negative ▼.
|
|
1176
|
+
⚠⚠⚠ .metric-card divs MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1177
|
+
two_col_split: `═══ REQUIRED LAYOUT: 2-COLUMN SPLIT ═══
|
|
1178
|
+
⚠⚠⚠ You MUST create a 2-COLUMN layout. Single column = FAILURE.
|
|
1179
|
+
|
|
1180
|
+
CSS:
|
|
1181
|
+
.content { flex:1; display:grid; grid-template-columns:1fr 1fr; gap:32px; }
|
|
1182
|
+
.left-col { display:flex; flex-direction:column; gap:20px; justify-content:center; padding:20px; }
|
|
1183
|
+
.right-col { display:flex; flex-direction:column; gap:20px; justify-content:center; padding:20px; }
|
|
1184
|
+
|
|
1185
|
+
⚠ Left column: primary content (big metric, chart, or main visual). Right: supporting detail cards or text.
|
|
1186
|
+
⚠ Both columns stretch full height. Keep text LARGE (28-32px) — don't try to squeeze too much.
|
|
1187
|
+
⚠ MAX 3-4 items per column. If content overflows, reduce items instead of shrinking text.`,
|
|
1188
|
+
timeline: `═══ REQUIRED LAYOUT: TIMELINE ═══
|
|
1189
|
+
⚠⚠⚠ You MUST create a HORIZONTAL TIMELINE with milestone cards. Generic cards = FAILURE.
|
|
1190
|
+
|
|
1191
|
+
CSS:
|
|
1192
|
+
.content { flex:1; display:flex; align-items:stretch; gap:24px; }
|
|
1193
|
+
.milestone { flex:1; display:flex; flex-direction:column; padding:32px; border-radius:16px; background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.06); gap:16px; }
|
|
1194
|
+
.milestone-date { font-size:24px; font-weight:700; color:${design.accent_color}; }
|
|
1195
|
+
.milestone-icon { width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg, ${design.primary_color}, ${design.gradient_end}); display:flex; align-items:center; justify-content:center; color:#fff; font-size:24px; }
|
|
1196
|
+
.milestone-title { font-size:30px; font-weight:700; color:${design.primary_color}; }
|
|
1197
|
+
.milestone-desc { font-size:26px; color:${design.text_color}; line-height:1.5; flex:1; }
|
|
1198
|
+
.milestone-kpi { font-size:24px; font-weight:600; color:${design.accent_color}; margin-top:auto; padding-top:16px; border-top:2px solid ${design.accent_light}; }
|
|
1199
|
+
|
|
1200
|
+
⚠ 3-4 .milestone cards side by side. Each: date → icon → title → description → KPI at bottom.
|
|
1201
|
+
⚠ align-items:stretch + flex:1 on .milestone-desc ensures all cards are equal height.
|
|
1202
|
+
⚠ .milestone-kpi with margin-top:auto anchors it at the bottom of each card.
|
|
1203
|
+
⚠⚠⚠ .milestone divs MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1204
|
+
progress_bars: `═══ REQUIRED LAYOUT: PROGRESS BARS ═══
|
|
1205
|
+
⚠⚠⚠ You MUST create FULL-WIDTH HORIZONTAL PROGRESS BARS. Small bars inside cards = FAILURE.
|
|
1206
|
+
|
|
1207
|
+
CSS:
|
|
1208
|
+
.content { flex:1; display:flex; flex-direction:column; justify-content:space-evenly; gap:0; padding:20px 0; }
|
|
1209
|
+
.bar-item { display:flex; flex-direction:column; gap:10px; }
|
|
1210
|
+
.bar-header { display:flex; justify-content:space-between; align-items:baseline; }
|
|
1211
|
+
.bar-label { font-size:28px; font-weight:600; color:${design.text_color}; }
|
|
1212
|
+
.bar-value { font-size:28px; font-weight:700; color:${design.primary_color}; }
|
|
1213
|
+
.bar-track { width:100%; height:44px; background:${design.accent_light}; border-radius:22px; overflow:hidden; }
|
|
1214
|
+
.bar-fill { height:100%; border-radius:22px; background:linear-gradient(90deg, ${design.primary_color}, ${design.accent_color}); }
|
|
1215
|
+
|
|
1216
|
+
CRITICAL PATTERN — your .content MUST be a vertical stack of .bar-item divs:
|
|
1217
|
+
<div class="content">
|
|
1218
|
+
<div class="bar-item">
|
|
1219
|
+
<div class="bar-header">
|
|
1220
|
+
<span class="bar-label">Category Name</span>
|
|
1221
|
+
<span class="bar-value">85%</span>
|
|
1222
|
+
</div>
|
|
1223
|
+
<div class="bar-track"><div class="bar-fill" style="width:85%"></div></div>
|
|
1224
|
+
</div>
|
|
1225
|
+
<!-- repeat 4-6 bar-items -->
|
|
1226
|
+
</div>
|
|
1227
|
+
|
|
1228
|
+
⚠ justify-content:space-evenly distributes bars across the full height — NO empty bottom.
|
|
1229
|
+
⚠ Each bar: header row (label + percentage) + track div containing fill div with style="width:XX%".
|
|
1230
|
+
⚠ 4-5 bars (MAX 5). Bar height:44px. Use gradient fills. Labels under 15 chars. The structure above is non-negotiable.
|
|
1231
|
+
⚠⚠⚠ .bar-item divs MUST be DIRECT children of .content. Do NOT wrap them in a container div.`,
|
|
1232
|
+
hero_stat: `═══ REQUIRED LAYOUT: HERO STAT ═══
|
|
1233
|
+
⚠⚠⚠ You MUST create a SINGLE LARGE CENTRAL METRIC. Cards/tables = FAILURE.
|
|
1234
|
+
|
|
1235
|
+
CSS:
|
|
1236
|
+
.content { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:24px; }
|
|
1237
|
+
.hero-number { font-size:128px; font-weight:900; color:${design.primary_color}; line-height:1; }
|
|
1238
|
+
.hero-unit { font-size:48px; font-weight:600; color:${design.accent_color}; }
|
|
1239
|
+
.hero-label { font-size:36px; font-weight:600; color:${design.text_color}; }
|
|
1240
|
+
.hero-context { font-size:28px; color:${design.text_color}aa; text-align:center; max-width:800px; line-height:1.6; }
|
|
1241
|
+
.supporting-row { display:flex; gap:60px; margin-top:48px; }
|
|
1242
|
+
.supporting-item { text-align:center; }
|
|
1243
|
+
.supporting-value { font-size:40px; font-weight:700; color:${design.primary_color}; }
|
|
1244
|
+
.supporting-label { font-size:24px; color:${design.text_color}aa; margin-top:8px; }
|
|
1245
|
+
|
|
1246
|
+
⚠ ONE giant number (font-size:128px) center stage. Description below. Optional 2-3 supporting metrics in a row.
|
|
1247
|
+
⚠ This is the ONLY layout where justify-content:center on .content is correct.`,
|
|
1248
|
+
};
|
|
1249
|
+
return layouts[layoutType] || layouts.cards;
|
|
1250
|
+
}
|
|
1251
|
+
export function postProcessSlideHtml(html) {
|
|
1252
|
+
const fixStyle = `<style id="viewport-fill">
|
|
1253
|
+
body{display:flex!important;flex-direction:column!important;height:1080px!important;min-height:1080px!important;overflow:hidden!important;font-size:max(26px,1.35vw)}
|
|
1254
|
+
body>*:first-child{flex:0 0 auto!important}
|
|
1255
|
+
body>*:not(:first-child):not(style):not(script){flex:1 1 0!important;min-height:0!important;align-content:stretch!important;align-items:stretch!important}
|
|
1256
|
+
body>*:not(:first-child):not(style):not(script)>*{align-self:stretch!important;min-height:0}
|
|
1257
|
+
.slide-title{flex:0 0 auto!important}
|
|
1258
|
+
.content{flex:1 1 0!important;min-height:0!important;align-content:stretch!important;align-items:stretch!important}
|
|
1259
|
+
.content>*{align-self:stretch!important;min-height:0}
|
|
1260
|
+
.content>:only-child{display:flex!important;flex-direction:column!important;justify-content:space-evenly!important;flex:1 1 0!important;min-height:0!important}
|
|
1261
|
+
</style>`;
|
|
1262
|
+
if (html.includes('</head>')) {
|
|
1263
|
+
return html.replace('</head>', fixStyle + '</head>');
|
|
1264
|
+
}
|
|
1265
|
+
if (html.includes('</style>')) {
|
|
1266
|
+
return html.replace(/<\/style>(?![\s\S]*<\/style>)/, fixStyle + '</style>');
|
|
1267
|
+
}
|
|
1268
|
+
return html;
|
|
1269
|
+
}
|
|
1270
|
+
export function buildReviewPrompt(html, expectedLayout, slideTitle) {
|
|
1271
|
+
return `You are a presentation slide quality reviewer. Evaluate this HTML slide and output ONLY a JSON object.
|
|
1272
|
+
|
|
1273
|
+
EXPECTED LAYOUT: "${expectedLayout}"
|
|
1274
|
+
SLIDE TITLE: "${slideTitle}"
|
|
1275
|
+
|
|
1276
|
+
HTML (first 3000 chars):
|
|
1277
|
+
${html.slice(0, 3000)}
|
|
1278
|
+
|
|
1279
|
+
Evaluate:
|
|
1280
|
+
1. LAYOUT (1-10): Does it use "${expectedLayout}" layout? Wrong layout type = score 1.
|
|
1281
|
+
2. READABILITY (1-10): Font sizes ≥26px? Good contrast? Text readable?
|
|
1282
|
+
3. FILL (1-10): Content fills 80-90% of 1920×1080? No huge empty areas?
|
|
1283
|
+
|
|
1284
|
+
Output JSON ONLY (no markdown fences):
|
|
1285
|
+
{"layout":N,"readability":N,"fill":N,"pass":true/false,"feedback":"specific fix needed or empty string"}
|
|
1286
|
+
|
|
1287
|
+
PASS = all scores ≥ 7. FAIL = any score < 7.`;
|
|
1288
|
+
}
|
|
1289
|
+
export const PPT_CREATE_SYSTEM_PROMPT = `You are an elite PowerPoint presentation creator.
|
|
1290
|
+
You build NEW presentations using high-level layout builder tools.
|
|
1291
|
+
Each tool call creates ONE complete, professionally-designed slide.
|
|
1292
|
+
|
|
1293
|
+
═══ AVAILABLE TOOLS ═══
|
|
1294
|
+
Lifecycle: powerpoint_create, powerpoint_save
|
|
1295
|
+
Slides: ppt_build_title_slide, ppt_build_layout_a, ppt_build_layout_b, ppt_build_layout_c, ppt_build_layout_d, ppt_build_layout_e, ppt_build_layout_f, ppt_build_closing_slide
|
|
1296
|
+
Chart: powerpoint_add_chart (use sparingly — prefer Layout D or F for data)
|
|
1297
|
+
Complete: complete (call AFTER saving)
|
|
1298
|
+
|
|
1299
|
+
═══ WORKFLOW ═══
|
|
1300
|
+
1. powerpoint_create — launch PowerPoint
|
|
1301
|
+
2. ppt_build_title_slide — first slide
|
|
1302
|
+
3. ppt_build_layout_[a-f] — content slides (one tool call per slide)
|
|
1303
|
+
4. ppt_build_closing_slide — MUST be the absolute LAST content slide
|
|
1304
|
+
5. powerpoint_save — save file
|
|
1305
|
+
6. complete — report summary
|
|
1306
|
+
|
|
1307
|
+
═══ CONTENT QUALITY ═══
|
|
1308
|
+
• ALL text MUST be in the same language as the user's instruction
|
|
1309
|
+
• Korean input → Korean titles, bullets, table headers, everything
|
|
1310
|
+
• NEVER use placeholder text like "[내용]", "XXX", "lorem ipsum"
|
|
1311
|
+
• Generate REAL, specific, professional content with concrete data
|
|
1312
|
+
|
|
1313
|
+
═══ RULES ═══
|
|
1314
|
+
1. Build each slide COMPLETELY with one tool call before moving to the next
|
|
1315
|
+
2. NEVER go back to modify a previous slide
|
|
1316
|
+
3. NEVER use HTML tags in text — use \\n for line breaks
|
|
1317
|
+
4. The LAST tool before "complete" MUST be powerpoint_save
|
|
1318
|
+
5. If save fails with path error, try "C:\\\\temp\\\\presentation.pptx"`;
|
|
1319
|
+
export const PPT_CREATE_PLANNING_PROMPT = `You are a presentation structure planner.
|
|
1320
|
+
Given the user's instruction and CREATIVE GUIDANCE, create the execution plan.
|
|
1321
|
+
|
|
1322
|
+
⚠ LANGUAGE RULE: ALL slide titles and content MUST be in the SAME language as the user's instruction.
|
|
1323
|
+
|
|
1324
|
+
OUTPUT FORMAT:
|
|
1325
|
+
MODE: CREATE
|
|
1326
|
+
DESIGN DECISIONS:
|
|
1327
|
+
- COLOR_SCHEME: [MODERN_TECH, WARM_EXECUTIVE, CLEAN_MINIMAL, CORPORATE, NATURE_FRESH, BOLD_MODERN]
|
|
1328
|
+
- DESIGN_STYLE: [sidebar / top_band / clean]
|
|
1329
|
+
TOTAL_SLIDES: [number]
|
|
1330
|
+
SLIDE_PLAN:
|
|
1331
|
+
- Slide 1: [Title] | Tool: ppt_build_title_slide | Subtitle: [text]
|
|
1332
|
+
- Slide N: [Title] | Tool: [tool name] | Content: [summary]`;
|
|
1333
|
+
export function buildSlideSystemPrompt(toolName, title, direction, guidance, language) {
|
|
1334
|
+
if (!toolName.startsWith('ppt_build_layout_'))
|
|
1335
|
+
return '';
|
|
1336
|
+
const langRule = language === 'ko'
|
|
1337
|
+
? 'ALL text MUST be in Korean.'
|
|
1338
|
+
: 'ALL text MUST be in English.';
|
|
1339
|
+
return `You are building slide "${title}" for a PowerPoint presentation.
|
|
1340
|
+
You have exactly ONE tool available. Call it with the correct parameters.
|
|
1341
|
+
|
|
1342
|
+
═══ CONTENT DIRECTION ═══
|
|
1343
|
+
${direction}
|
|
1344
|
+
|
|
1345
|
+
═══ CREATIVE CONTEXT ═══
|
|
1346
|
+
${guidance}
|
|
1347
|
+
|
|
1348
|
+
═══ RULES ═══
|
|
1349
|
+
• ${langRule}
|
|
1350
|
+
• Generate REAL, specific, professional content with concrete data
|
|
1351
|
+
• NEVER use placeholder text
|
|
1352
|
+
• Call the tool EXACTLY ONCE with all required parameters`;
|
|
1353
|
+
}
|
|
1354
|
+
//# sourceMappingURL=powerpoint-create-prompts.js.map
|