plcode-linux-x64-musl 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.plcode/AGENTS.md +160 -0
- package/.plcode/agent/backend-architect.md +40 -0
- package/.plcode/agent/backend-security-coder.md +11 -0
- package/.plcode/agent/backend-specialist.md +117 -0
- package/.plcode/agent/backend-typescript-architect.md +18 -0
- package/.plcode/agent/code-reviewer.md +48 -0
- package/.plcode/agent/content/0-category.json +19 -0
- package/.plcode/agent/content/copywriter.md +68 -0
- package/.plcode/agent/content/technical-writer.md +68 -0
- package/.plcode/agent/core/0-category.json +50 -0
- package/.plcode/agent/core/health-monitor.md +187 -0
- package/.plcode/agent/core/memory-manager.md +168 -0
- package/.plcode/agent/core/openagent.md +430 -0
- package/.plcode/agent/core/opencoder.md +282 -0
- package/.plcode/agent/core/pool.md +383 -0
- package/.plcode/agent/data/0-category.json +13 -0
- package/.plcode/agent/data/data-analyst.md +69 -0
- package/.plcode/agent/database-architect.md +262 -0
- package/.plcode/agent/database-optimizer.md +161 -0
- package/.plcode/agent/database-specialist.md +101 -0
- package/.plcode/agent/development/0-category.json +36 -0
- package/.plcode/agent/development/backend-specialist.md +68 -0
- package/.plcode/agent/development/codebase-agent.md +137 -0
- package/.plcode/agent/development/devops-specialist.md +70 -0
- package/.plcode/agent/development/frontend-specialist.md +214 -0
- package/.plcode/agent/docs.md +33 -0
- package/.plcode/agent/eval-runner.md +34 -0
- package/.plcode/agent/frontend-developer.md +188 -0
- package/.plcode/agent/frontend-security-coder.md +11 -0
- package/.plcode/agent/git-committer.md +12 -0
- package/.plcode/agent/meta/0-category.json +19 -0
- package/.plcode/agent/meta/repo-manager.md +1078 -0
- package/.plcode/agent/meta/system-builder.md +724 -0
- package/.plcode/agent/orchestration/0-category.json +40 -0
- package/.plcode/agent/orchestration/adversarial-agent.md +115 -0
- package/.plcode/agent/orchestration/background-agent.md +121 -0
- package/.plcode/agent/orchestration/chat-agent.md +108 -0
- package/.plcode/agent/orchestration/code-agent.md +91 -0
- package/.plcode/agent/orchestration/critic-agent.md +103 -0
- package/.plcode/agent/orchestration/executor-agent.md +107 -0
- package/.plcode/agent/orchestration/media-agent.md +99 -0
- package/.plcode/agent/orchestration/planner-agent.md +105 -0
- package/.plcode/agent/orchestration/review-agent.md +105 -0
- package/.plcode/agent/orchestration/support-agent.md +117 -0
- package/.plcode/agent/orchestration/test-agent.md +104 -0
- package/.plcode/agent/subagents/code/build-agent.md +75 -0
- package/.plcode/agent/subagents/code/codebase-pattern-analyst.md +459 -0
- package/.plcode/agent/subagents/code/coder-agent.md +71 -0
- package/.plcode/agent/subagents/code/reviewer.md +58 -0
- package/.plcode/agent/subagents/code/tester.md +59 -0
- package/.plcode/agent/subagents/core/context-retriever.md +904 -0
- package/.plcode/agent/subagents/core/contextscout.md +149 -0
- package/.plcode/agent/subagents/core/documentation.md +49 -0
- package/.plcode/agent/subagents/core/task-manager.md +345 -0
- package/.plcode/agent/subagents/superpowers/code-reviewer.md +113 -0
- package/.plcode/agent/subagents/system-builder/agent-generator.md +452 -0
- package/.plcode/agent/subagents/system-builder/command-creator.md +226 -0
- package/.plcode/agent/subagents/system-builder/context-organizer.md +455 -0
- package/.plcode/agent/subagents/system-builder/domain-analyzer.md +459 -0
- package/.plcode/agent/subagents/system-builder/workflow-designer.md +240 -0
- package/.plcode/agent/subagents/test/simple-responder.md +44 -0
- package/.plcode/agent/subagents/utils/image-specialist.md +67 -0
- package/.plcode/agent/triage.md +86 -0
- package/.plcode/agent/typescript-pro.md +11 -0
- package/.plcode/context/content/README.md +39 -0
- package/.plcode/context/content/copywriting-frameworks.md +317 -0
- package/.plcode/context/content/tone-voice.md +391 -0
- package/.plcode/context/content-creation/examples/navigation.md +37 -0
- package/.plcode/context/content-creation/formats/audio-content.md +493 -0
- package/.plcode/context/content-creation/formats/image-content.md +387 -0
- package/.plcode/context/content-creation/formats/navigation.md +79 -0
- package/.plcode/context/content-creation/formats/video-content.md +533 -0
- package/.plcode/context/content-creation/formats/written-content.md +459 -0
- package/.plcode/context/content-creation/navigation.md +55 -0
- package/.plcode/context/content-creation/principles/audience-targeting.md +417 -0
- package/.plcode/context/content-creation/principles/copywriting-frameworks.md +317 -0
- package/.plcode/context/content-creation/principles/hooks.md +279 -0
- package/.plcode/context/content-creation/principles/navigation.md +79 -0
- package/.plcode/context/content-creation/principles/tone-voice.md +391 -0
- package/.plcode/context/content-creation/workflows/audience-review.md +474 -0
- package/.plcode/context/content-creation/workflows/content-ideas.md +504 -0
- package/.plcode/context/content-creation/workflows/content-matrix.md +397 -0
- package/.plcode/context/content-creation/workflows/navigation.md +85 -0
- package/.plcode/context/content-creation/workflows/remix-repurpose.md +577 -0
- package/.plcode/context/core/context-system/CHANGELOG.md +87 -0
- package/.plcode/context/core/context-system/examples/navigation-examples.md +510 -0
- package/.plcode/context/core/context-system/guides/compact.md +351 -0
- package/.plcode/context/core/context-system/guides/creation.md +363 -0
- package/.plcode/context/core/context-system/guides/navigation-design.md +458 -0
- package/.plcode/context/core/context-system/guides/organizing-context.md +549 -0
- package/.plcode/context/core/context-system/guides/workflows.md +598 -0
- package/.plcode/context/core/context-system/operations/error.md +299 -0
- package/.plcode/context/core/context-system/operations/extract.md +190 -0
- package/.plcode/context/core/context-system/operations/harvest.md +310 -0
- package/.plcode/context/core/context-system/operations/organize.md +245 -0
- package/.plcode/context/core/context-system/operations/update.md +260 -0
- package/.plcode/context/core/context-system/standards/mvi.md +154 -0
- package/.plcode/context/core/context-system/standards/structure.md +262 -0
- package/.plcode/context/core/context-system/standards/templates.md +350 -0
- package/.plcode/context/core/context-system.md +453 -0
- package/.plcode/context/core/essential-patterns.md +225 -0
- package/.plcode/context/core/navigation.md +69 -0
- package/.plcode/context/core/standards/code-analysis.md +172 -0
- package/.plcode/context/core/standards/code-quality.md +182 -0
- package/.plcode/context/core/standards/code.md +1 -0
- package/.plcode/context/core/standards/docs.md +1 -0
- package/.plcode/context/core/standards/documentation.md +173 -0
- package/.plcode/context/core/standards/navigation.md +46 -0
- package/.plcode/context/core/standards/security-patterns.md +149 -0
- package/.plcode/context/core/standards/test-coverage.md +133 -0
- package/.plcode/context/core/standards/tests.md +1 -0
- package/.plcode/context/core/system/context-guide.md +218 -0
- package/.plcode/context/core/workflows/code-review.md +150 -0
- package/.plcode/context/core/workflows/delegation.md +1 -0
- package/.plcode/context/core/workflows/design-iteration.md +595 -0
- package/.plcode/context/core/workflows/feature-breakdown.md +303 -0
- package/.plcode/context/core/workflows/navigation.md +44 -0
- package/.plcode/context/core/workflows/review.md +1 -0
- package/.plcode/context/core/workflows/session-management.md +162 -0
- package/.plcode/context/core/workflows/task-delegation.md +95 -0
- package/.plcode/context/data/README.md +18 -0
- package/.plcode/context/data/navigation.md +18 -0
- package/.plcode/context/development/README.md +52 -0
- package/.plcode/context/development/animation-patterns.md +831 -0
- package/.plcode/context/development/api-design.md +394 -0
- package/.plcode/context/development/backend/navigation.md +55 -0
- package/.plcode/context/development/backend-navigation.md +77 -0
- package/.plcode/context/development/clean-code.md +189 -0
- package/.plcode/context/development/data/navigation.md +36 -0
- package/.plcode/context/development/design-assets.md +604 -0
- package/.plcode/context/development/design-systems.md +395 -0
- package/.plcode/context/development/frontend/navigation.md +47 -0
- package/.plcode/context/development/fullstack-navigation.md +80 -0
- package/.plcode/context/development/infrastructure/navigation.md +31 -0
- package/.plcode/context/development/integration/navigation.md +36 -0
- package/.plcode/context/development/navigation.md +80 -0
- package/.plcode/context/development/principles/api-design.md +427 -0
- package/.plcode/context/development/principles/clean-code.md +189 -0
- package/.plcode/context/development/principles/navigation.md +46 -0
- package/.plcode/context/development/react-patterns.md +323 -0
- package/.plcode/context/development/ui-navigation.md +58 -0
- package/.plcode/context/development/ui-styling-standards.md +566 -0
- package/.plcode/context/learning/README.md +18 -0
- package/.plcode/context/learning/navigation.md +18 -0
- package/.plcode/context/navigation.md +47 -0
- package/.plcode/context/openagents-repo/blueprints/context-bundle-template.md +279 -0
- package/.plcode/context/openagents-repo/concepts/subagent-testing-modes.md +142 -0
- package/.plcode/context/openagents-repo/core-concepts/agents.md +368 -0
- package/.plcode/context/openagents-repo/core-concepts/categories.md +467 -0
- package/.plcode/context/openagents-repo/core-concepts/evals.md +515 -0
- package/.plcode/context/openagents-repo/core-concepts/registry.md +473 -0
- package/.plcode/context/openagents-repo/errors/tool-permission-errors.md +227 -0
- package/.plcode/context/openagents-repo/examples/context-bundle-example.md +234 -0
- package/.plcode/context/openagents-repo/examples/subagent-prompt-structure.md +291 -0
- package/.plcode/context/openagents-repo/guides/adding-agent.md +326 -0
- package/.plcode/context/openagents-repo/guides/creating-release.md +296 -0
- package/.plcode/context/openagents-repo/guides/debugging.md +438 -0
- package/.plcode/context/openagents-repo/guides/profile-validation.md +367 -0
- package/.plcode/context/openagents-repo/guides/subagent-invocation.md +386 -0
- package/.plcode/context/openagents-repo/guides/testing-agent.md +310 -0
- package/.plcode/context/openagents-repo/guides/testing-subagents-approval.md +140 -0
- package/.plcode/context/openagents-repo/guides/testing-subagents.md +301 -0
- package/.plcode/context/openagents-repo/guides/updating-registry.md +453 -0
- package/.plcode/context/openagents-repo/lookup/commands.md +400 -0
- package/.plcode/context/openagents-repo/lookup/file-locations.md +322 -0
- package/.plcode/context/openagents-repo/lookup/subagent-framework-maps.md +79 -0
- package/.plcode/context/openagents-repo/lookup/subagent-test-commands.md +213 -0
- package/.plcode/context/openagents-repo/navigation.md +143 -0
- package/.plcode/context/openagents-repo/plugins/context/architecture/lifecycle.md +39 -0
- package/.plcode/context/openagents-repo/plugins/context/architecture/overview.md +61 -0
- package/.plcode/context/openagents-repo/plugins/context/capabilities/agents.md +45 -0
- package/.plcode/context/openagents-repo/plugins/context/capabilities/events.md +48 -0
- package/.plcode/context/openagents-repo/plugins/context/capabilities/events_skills.md +608 -0
- package/.plcode/context/openagents-repo/plugins/context/capabilities/tools.md +48 -0
- package/.plcode/context/openagents-repo/plugins/context/context-overview.md +35 -0
- package/.plcode/context/openagents-repo/plugins/context/reference/best-practices.md +28 -0
- package/.plcode/context/openagents-repo/quality/registry-dependencies.md +642 -0
- package/.plcode/context/openagents-repo/quick-start.md +168 -0
- package/.plcode/context/openagents-repo/templates/context-bundle-template.md +272 -0
- package/.plcode/context/product/README.md +18 -0
- package/.plcode/context/product/navigation.md +18 -0
- package/.plcode/context/project/navigation.md +31 -0
- package/.plcode/context/project/project-context.md +102 -0
- package/.plcode/context/system-builder-templates/SYSTEM-BUILDER-GUIDE.md +495 -0
- package/.plcode/context/system-builder-templates/navigation.md +72 -0
- package/.plcode/context/system-builder-templates/orchestrator-template.md +261 -0
- package/.plcode/context/system-builder-templates/subagent-template.md +213 -0
- package/.plcode/context/ui/navigation.md +83 -0
- package/.plcode/context/ui/terminal/navigation.md +99 -0
- package/.plcode/context/ui/web/animation-patterns.md +831 -0
- package/.plcode/context/ui/web/design/concepts/scroll-linked-animations.md +52 -0
- package/.plcode/context/ui/web/design/examples/scrollytelling-headphone.md +242 -0
- package/.plcode/context/ui/web/design/guides/building-scrollytelling-pages.md +274 -0
- package/.plcode/context/ui/web/design/lookup/scroll-animation-prompts.md +211 -0
- package/.plcode/context/ui/web/design/navigation.md +87 -0
- package/.plcode/context/ui/web/design-assets.md +604 -0
- package/.plcode/context/ui/web/design-systems.md +395 -0
- package/.plcode/context/ui/web/navigation.md +116 -0
- package/.plcode/context/ui/web/react-patterns.md +323 -0
- package/.plcode/context/ui/web/ui-styling-standards.md +566 -0
- package/.plcode/instructions/agent-rules.md +21 -0
- package/.plcode/instructions/coding-preferences-general.md +26 -0
- package/.plcode/instructions/coding-preferences-typescript.md +7 -0
- package/.plcode/instructions/commits.md +10 -0
- package/.plcode/instructions/responses.md +7 -0
- package/.plcode/instructions/testing.md +6 -0
- package/.plcode/instructions/tooling-preferences.md +20 -0
- package/.plcode/plcode.jsonc +393 -0
- package/.plcode/skill/core/agents-md-generator/SKILL.md +220 -0
- package/.plcode/skill/core/api-design-principles/SKILL.md +41 -0
- package/.plcode/skill/core/api-design-principles/assets/api-design-checklist.md +155 -0
- package/.plcode/skill/core/api-design-principles/assets/rest-api-template.py +182 -0
- package/.plcode/skill/core/api-design-principles/references/graphql-schema-design.md +583 -0
- package/.plcode/skill/core/api-design-principles/references/rest-best-practices.md +408 -0
- package/.plcode/skill/core/api-design-principles/resources/implementation-playbook.md +513 -0
- package/.plcode/skill/core/api-documentation/SKILL.md +185 -0
- package/.plcode/skill/core/api-security-best-practices/SKILL.md +927 -0
- package/.plcode/skill/core/api-testing-observability-api-mock/SKILL.md +50 -0
- package/.plcode/skill/core/api-testing-observability-api-mock/resources/implementation-playbook.md +1327 -0
- package/.plcode/skill/core/audit/SKILL.md +141 -0
- package/.plcode/skill/core/backend-dev/README.md +333 -0
- package/.plcode/skill/core/backend-dev/SKILL.md +437 -0
- package/.plcode/skill/core/backend-dev/examples.md +622 -0
- package/.plcode/skill/core/backend-dev-guidelines/SKILL.md +344 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/architecture-overview.md +479 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/async-and-errors.md +305 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/complete-examples.md +607 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/configuration.md +285 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/database-patterns.md +227 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/middleware-guide.md +205 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/routing-and-controllers.md +704 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/sentry-and-monitoring.md +338 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/services-and-repositories.md +814 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/testing-guide.md +230 -0
- package/.plcode/skill/core/backend-dev-guidelines/resources/validation-patterns.md +750 -0
- package/.plcode/skill/core/browser/SKILL.md +67 -0
- package/.plcode/skill/core/browser/eval.js +38 -0
- package/.plcode/skill/core/browser/nav.js +37 -0
- package/.plcode/skill/core/browser/package-lock.json +928 -0
- package/.plcode/skill/core/browser/package.json +12 -0
- package/.plcode/skill/core/browser/pick.js +106 -0
- package/.plcode/skill/core/browser/screenshot.js +31 -0
- package/.plcode/skill/core/browser/start.js +71 -0
- package/.plcode/skill/core/changelog-generator/SKILL.md +105 -0
- package/.plcode/skill/core/clarify/SKILL.md +199 -0
- package/.plcode/skill/core/code-refactoring/SKILL.md +232 -0
- package/.plcode/skill/core/code-review/SKILL.md +60 -0
- package/.plcode/skill/core/critique/SKILL.md +137 -0
- package/.plcode/skill/core/database-design/SKILL.md +186 -0
- package/.plcode/skill/core/dispatching-parallel-agents/SKILL.md +192 -0
- package/.plcode/skill/core/error-handling-patterns/SKILL.md +39 -0
- package/.plcode/skill/core/error-handling-patterns/resources/implementation-playbook.md +634 -0
- package/.plcode/skill/core/executing-plans/SKILL.md +97 -0
- package/.plcode/skill/core/finishing-a-development-branch/SKILL.md +214 -0
- package/.plcode/skill/core/frontend-design/LICENSE.txt +177 -0
- package/.plcode/skill/core/frontend-design/SKILL.md +516 -0
- package/.plcode/skill/core/javascript-typescript/SKILL.md +147 -0
- package/.plcode/skill/core/python-development/SKILL.md +142 -0
- package/.plcode/skill/core/receiving-code-review/SKILL.md +227 -0
- package/.plcode/skill/core/requesting-code-review/SKILL.md +116 -0
- package/.plcode/skill/core/requesting-code-review/code-reviewer.md +160 -0
- package/.plcode/skill/core/skill-creator/LICENSE.txt +202 -0
- package/.plcode/skill/core/skill-creator/SKILL.md +357 -0
- package/.plcode/skill/core/skill-creator/references/output-patterns.md +92 -0
- package/.plcode/skill/core/skill-creator/references/workflows.md +28 -0
- package/.plcode/skill/core/skill-creator/scripts/__pycache__/quick_validate.cpython-313.pyc +0 -0
- package/.plcode/skill/core/skill-creator/scripts/init_skill.py +303 -0
- package/.plcode/skill/core/skill-creator/scripts/package_skill.py +110 -0
- package/.plcode/skill/core/skill-creator/scripts/quick_validate.py +103 -0
- package/.plcode/skill/core/subagent-driven-development/SKILL.md +256 -0
- package/.plcode/skill/core/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/.plcode/skill/core/subagent-driven-development/implementer-prompt.md +78 -0
- package/.plcode/skill/core/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/.plcode/skill/core/systematic-debugging/CREATION-LOG.md +133 -0
- package/.plcode/skill/core/systematic-debugging/SKILL.md +309 -0
- package/.plcode/skill/core/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/.plcode/skill/core/systematic-debugging/condition-based-waiting.md +120 -0
- package/.plcode/skill/core/systematic-debugging/defense-in-depth.md +128 -0
- package/.plcode/skill/core/systematic-debugging/find-polluter.sh +63 -0
- package/.plcode/skill/core/systematic-debugging/root-cause-tracing.md +183 -0
- package/.plcode/skill/core/systematic-debugging/test-academic.md +14 -0
- package/.plcode/skill/core/systematic-debugging/test-pressure-1.md +65 -0
- package/.plcode/skill/core/systematic-debugging/test-pressure-2.md +75 -0
- package/.plcode/skill/core/systematic-debugging/test-pressure-3.md +75 -0
- package/.plcode/skill/core/task-generator/SKILL.md +72 -0
- package/.plcode/skill/core/test-driven-development/SKILL.md +393 -0
- package/.plcode/skill/core/test-driven-development/testing-anti-patterns.md +317 -0
- package/.plcode/skill/core/using-git-worktrees/SKILL.md +224 -0
- package/.plcode/skill/core/using-superpowers/SKILL.md +96 -0
- package/.plcode/skill/core/verification-before-completion/SKILL.md +148 -0
- package/.plcode/skill/core/writing-plans/SKILL.md +122 -0
- package/.plcode/skill/core/writing-skills/SKILL.md +717 -0
- package/.plcode/skill/core/writing-skills/anthropic-best-practices.md +1176 -0
- package/.plcode/skill/core/writing-skills/examples/CLAUDE_MD_TESTING.md +200 -0
- package/.plcode/skill/core/writing-skills/graphviz-conventions.dot +172 -0
- package/.plcode/skill/core/writing-skills/persuasion-principles.md +220 -0
- package/.plcode/skill/core/writing-skills/render-graphs.js +171 -0
- package/.plcode/skill/core/writing-skills/testing-skills-with-subagents.md +404 -0
- package/.plcode/skill/experimental/accessibility-compliance-accessibility-audit/SKILL.md +46 -0
- package/.plcode/skill/experimental/accessibility-compliance-accessibility-audit/resources/implementation-playbook.md +489 -0
- package/.plcode/skill/experimental/adapt/SKILL.md +214 -0
- package/.plcode/skill/experimental/agnos/ROUTING.md +128 -0
- package/.plcode/skill/experimental/agnos/SKILL.md +142 -0
- package/.plcode/skill/experimental/algorithmic-art/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/algorithmic-art/SKILL.md +444 -0
- package/.plcode/skill/experimental/algorithmic-art/templates/generator_template.js +223 -0
- package/.plcode/skill/experimental/algorithmic-art/templates/viewer.html +634 -0
- package/.plcode/skill/experimental/animate/SKILL.md +204 -0
- package/.plcode/skill/experimental/application-performance-performance-optimization/SKILL.md +158 -0
- package/.plcode/skill/experimental/architecture-diagram/SKILL.md +378 -0
- package/.plcode/skill/experimental/artifacts-builder/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/artifacts-builder/SKILL.md +80 -0
- package/.plcode/skill/experimental/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/.plcode/skill/experimental/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/.plcode/skill/experimental/automem-memory-management/SKILL.md +401 -0
- package/.plcode/skill/experimental/backend-architect/SKILL.md +331 -0
- package/.plcode/skill/experimental/backend-security-coder/SKILL.md +172 -0
- package/.plcode/skill/experimental/bolder/SKILL.md +140 -0
- package/.plcode/skill/experimental/brainstorming/SKILL.md +102 -0
- package/.plcode/skill/experimental/canvas-design/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/canvas-design/SKILL.md +138 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/.plcode/skill/experimental/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/.plcode/skill/experimental/colorize/SKILL.md +170 -0
- package/.plcode/skill/experimental/content-research-writer/SKILL.md +596 -0
- package/.plcode/skill/experimental/delight/SKILL.md +350 -0
- package/.plcode/skill/experimental/design-tokens/SKILL.md +456 -0
- package/.plcode/skill/experimental/distill/SKILL.md +146 -0
- package/.plcode/skill/experimental/doc-coauthoring/SKILL.md +395 -0
- package/.plcode/skill/experimental/document-docx/LICENSE.txt +30 -0
- package/.plcode/skill/experimental/document-docx/SKILL.md +581 -0
- package/.plcode/skill/experimental/document-docx/docx-js.md +488 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.plcode/skill/experimental/document-docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/pack.py +159 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/unpack.py +29 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validate.py +69 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validation/__init__.py +15 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validation/base.py +951 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validation/docx.py +274 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validation/pptx.py +315 -0
- package/.plcode/skill/experimental/document-docx/ooxml/scripts/validation/redlining.py +279 -0
- package/.plcode/skill/experimental/document-docx/ooxml.md +635 -0
- package/.plcode/skill/experimental/document-docx/scripts/__init__.py +1 -0
- package/.plcode/skill/experimental/document-docx/scripts/accept_changes.py +135 -0
- package/.plcode/skill/experimental/document-docx/scripts/comment.py +318 -0
- package/.plcode/skill/experimental/document-docx/scripts/document.py +1276 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/helpers/__init__.py +0 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/helpers/merge_runs.py +199 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/pack.py +159 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/soffice.py +183 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/unpack.py +132 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validate.py +111 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validators/__init__.py +15 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validators/base.py +847 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validators/docx.py +446 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validators/pptx.py +275 -0
- package/.plcode/skill/experimental/document-docx/scripts/office/validators/redlining.py +247 -0
- package/.plcode/skill/experimental/document-docx/scripts/templates/comments.xml +3 -0
- package/.plcode/skill/experimental/document-docx/scripts/templates/commentsExtended.xml +3 -0
- package/.plcode/skill/experimental/document-docx/scripts/templates/commentsExtensible.xml +3 -0
- package/.plcode/skill/experimental/document-docx/scripts/templates/commentsIds.xml +3 -0
- package/.plcode/skill/experimental/document-docx/scripts/templates/people.xml +3 -0
- package/.plcode/skill/experimental/document-docx/scripts/utilities.py +374 -0
- package/.plcode/skill/experimental/document-pdf/LICENSE.txt +30 -0
- package/.plcode/skill/experimental/document-pdf/SKILL.md +332 -0
- package/.plcode/skill/experimental/document-pdf/forms.md +312 -0
- package/.plcode/skill/experimental/document-pdf/reference.md +640 -0
- package/.plcode/skill/experimental/document-pdf/scripts/check_bounding_boxes.py +65 -0
- package/.plcode/skill/experimental/document-pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/.plcode/skill/experimental/document-pdf/scripts/check_fillable_fields.py +11 -0
- package/.plcode/skill/experimental/document-pdf/scripts/convert_pdf_to_images.py +33 -0
- package/.plcode/skill/experimental/document-pdf/scripts/create_validation_image.py +37 -0
- package/.plcode/skill/experimental/document-pdf/scripts/extract_form_field_info.py +122 -0
- package/.plcode/skill/experimental/document-pdf/scripts/extract_form_structure.py +115 -0
- package/.plcode/skill/experimental/document-pdf/scripts/fill_fillable_fields.py +98 -0
- package/.plcode/skill/experimental/document-pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/.plcode/skill/experimental/document-pptx/LICENSE.txt +30 -0
- package/.plcode/skill/experimental/document-pptx/SKILL.md +236 -0
- package/.plcode/skill/experimental/document-pptx/editing.md +213 -0
- package/.plcode/skill/experimental/document-pptx/html2pptx.md +719 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/pack.py +159 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/unpack.py +29 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validate.py +69 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validation/base.py +951 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validation/docx.py +274 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/.plcode/skill/experimental/document-pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/.plcode/skill/experimental/document-pptx/ooxml.md +446 -0
- package/.plcode/skill/experimental/document-pptx/pptxgenjs.md +511 -0
- package/.plcode/skill/experimental/document-pptx/scripts/__init__.py +0 -0
- package/.plcode/skill/experimental/document-pptx/scripts/add_slide.py +195 -0
- package/.plcode/skill/experimental/document-pptx/scripts/clean.py +286 -0
- package/.plcode/skill/experimental/document-pptx/scripts/html2pptx.js +1008 -0
- package/.plcode/skill/experimental/document-pptx/scripts/inventory.py +1029 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/helpers/__init__.py +0 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/pack.py +159 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/soffice.py +183 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/unpack.py +132 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validate.py +111 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validators/__init__.py +15 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validators/base.py +847 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validators/docx.py +446 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validators/pptx.py +275 -0
- package/.plcode/skill/experimental/document-pptx/scripts/office/validators/redlining.py +247 -0
- package/.plcode/skill/experimental/document-pptx/scripts/rearrange.py +231 -0
- package/.plcode/skill/experimental/document-pptx/scripts/replace.py +385 -0
- package/.plcode/skill/experimental/document-pptx/scripts/thumbnail.py +289 -0
- package/.plcode/skill/experimental/document-xlsx/LICENSE.txt +30 -0
- package/.plcode/skill/experimental/document-xlsx/SKILL.md +320 -0
- package/.plcode/skill/experimental/document-xlsx/recalc.py +211 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/helpers/__init__.py +0 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/pack.py +159 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/soffice.py +183 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/unpack.py +132 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validate.py +111 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validators/__init__.py +15 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validators/base.py +847 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validators/docx.py +446 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validators/pptx.py +275 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/office/validators/redlining.py +247 -0
- package/.plcode/skill/experimental/document-xlsx/scripts/recalc.py +184 -0
- package/.plcode/skill/experimental/domain-driven-design/SKILL.md +75 -0
- package/.plcode/skill/experimental/domain-driven-design/references/ddd-deliverables.md +24 -0
- package/.plcode/skill/experimental/excalidraw/SKILL.md +537 -0
- package/.plcode/skill/experimental/extract/SKILL.md +94 -0
- package/.plcode/skill/experimental/frontend-ui-animator/SKILL.md +147 -0
- package/.plcode/skill/experimental/frontend-ui-animator/references/animation-patterns.md +583 -0
- package/.plcode/skill/experimental/frontend-ui-animator/references/component-checklist.md +161 -0
- package/.plcode/skill/experimental/frontend-ui-animator/references/tailwind-presets.md +404 -0
- package/.plcode/skill/experimental/frontend-ui-integration/SKILL.md +79 -0
- package/.plcode/skill/experimental/harden/SKILL.md +385 -0
- package/.plcode/skill/experimental/infographic/SKILL.md +469 -0
- package/.plcode/skill/experimental/llm-application-dev/SKILL.md +221 -0
- package/.plcode/skill/experimental/mcp-builder/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/mcp-builder/SKILL.md +256 -0
- package/.plcode/skill/experimental/mcp-builder/reference/evaluation.md +630 -0
- package/.plcode/skill/experimental/mcp-builder/reference/mcp_best_practices.md +269 -0
- package/.plcode/skill/experimental/mcp-builder/reference/node_mcp_server.md +974 -0
- package/.plcode/skill/experimental/mcp-builder/reference/python_mcp_server.md +737 -0
- package/.plcode/skill/experimental/mcp-builder/scripts/connections.py +151 -0
- package/.plcode/skill/experimental/mcp-builder/scripts/evaluation.py +373 -0
- package/.plcode/skill/experimental/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/.plcode/skill/experimental/mcp-builder/scripts/requirements.txt +2 -0
- package/.plcode/skill/experimental/normalize/SKILL.md +69 -0
- package/.plcode/skill/experimental/onboard/SKILL.md +272 -0
- package/.plcode/skill/experimental/optimize/SKILL.md +291 -0
- package/.plcode/skill/experimental/polish/SKILL.md +204 -0
- package/.plcode/skill/experimental/product-management/SKILL.md +327 -0
- package/.plcode/skill/experimental/quieter/SKILL.md +125 -0
- package/.plcode/skill/experimental/ralph/scripts/prompt.md +108 -0
- package/.plcode/skill/experimental/ralph/scripts/ralph.sh +77 -0
- package/.plcode/skill/experimental/ralph/skill.md +170 -0
- package/.plcode/skill/experimental/ralph-executor/skill.md +130 -0
- package/.plcode/skill/experimental/rsc-data-optimizer/SKILL.md +117 -0
- package/.plcode/skill/experimental/rsc-data-optimizer/references/patterns.md +285 -0
- package/.plcode/skill/experimental/shadcn-management/SKILL.md +109 -0
- package/.plcode/skill/experimental/shadcn-management/references/workflows.md +214 -0
- package/.plcode/skill/experimental/sketch/SKILL.md +232 -0
- package/.plcode/skill/experimental/teach-impeccable/SKILL.md +78 -0
- package/.plcode/skill/experimental/theme-factory/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/theme-factory/SKILL.md +63 -0
- package/.plcode/skill/experimental/theme-factory/theme-showcase.pdf +0 -0
- package/.plcode/skill/experimental/theme-factory/themes/arctic-frost.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/botanical-garden.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/desert-rose.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/forest-canopy.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/golden-hour.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/midnight-galaxy.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/modern-minimalist.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/ocean-depths.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/sunset-boulevard.md +19 -0
- package/.plcode/skill/experimental/theme-factory/themes/tech-innovation.md +19 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/SKILL.md +238 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/charts.csv +26 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/colors.csv +97 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/landing.csv +31 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/products.csv +97 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/styles.csv +59 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/typography.csv +58 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/scripts/core.py +236 -0
- package/.plcode/skill/experimental/ui-ux-pro-max/scripts/search.py +61 -0
- package/.plcode/skill/experimental/webapp-testing/LICENSE.txt +202 -0
- package/.plcode/skill/experimental/webapp-testing/SKILL.md +108 -0
- package/.plcode/skill/experimental/webapp-testing/examples/console_logging.py +35 -0
- package/.plcode/skill/experimental/webapp-testing/examples/element_discovery.py +40 -0
- package/.plcode/skill/experimental/webapp-testing/examples/static_html_automation.py +33 -0
- package/.plcode/skill/experimental/webapp-testing/scripts/with_server.py +106 -0
- package/bin/plcode +0 -0
- package/package.json +27 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* html2pptx - Convert HTML slide to pptxgenjs slide with positioned elements
|
|
3
|
+
*
|
|
4
|
+
* USAGE:
|
|
5
|
+
* const pptx = new pptxgen();
|
|
6
|
+
* pptx.layout = 'LAYOUT_16x9'; // Must match HTML body dimensions
|
|
7
|
+
*
|
|
8
|
+
* const { slide, placeholders } = await html2pptx('slide.html', pptx);
|
|
9
|
+
* slide.addChart(pptx.charts.LINE, data, placeholders[0]);
|
|
10
|
+
*
|
|
11
|
+
* await pptx.writeFile('output.pptx');
|
|
12
|
+
*
|
|
13
|
+
* FEATURES:
|
|
14
|
+
* - Converts HTML to PowerPoint with accurate positioning
|
|
15
|
+
* - Supports text, images, shapes, and bullet lists
|
|
16
|
+
* - Extracts placeholder elements (class="placeholder") with positions
|
|
17
|
+
* - Handles CSS gradients, borders, and margins
|
|
18
|
+
*
|
|
19
|
+
* VALIDATION:
|
|
20
|
+
* - Uses body width/height from HTML for viewport sizing
|
|
21
|
+
* - Throws error if HTML dimensions don't match presentation layout
|
|
22
|
+
* - Throws error if content overflows body (with overflow details)
|
|
23
|
+
*
|
|
24
|
+
* RETURNS:
|
|
25
|
+
* { slide, placeholders } where placeholders is an array of { id, x, y, w, h }
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
const { chromium } = require("playwright")
|
|
29
|
+
const path = require("path")
|
|
30
|
+
const sharp = require("sharp")
|
|
31
|
+
|
|
32
|
+
const PT_PER_PX = 0.75
|
|
33
|
+
const PX_PER_IN = 96
|
|
34
|
+
const EMU_PER_IN = 914400
|
|
35
|
+
|
|
36
|
+
// Helper: Get body dimensions and check for overflow
|
|
37
|
+
async function getBodyDimensions(page) {
|
|
38
|
+
const bodyDimensions = await page.evaluate(() => {
|
|
39
|
+
const body = document.body
|
|
40
|
+
const style = window.getComputedStyle(body)
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
width: parseFloat(style.width),
|
|
44
|
+
height: parseFloat(style.height),
|
|
45
|
+
scrollWidth: body.scrollWidth,
|
|
46
|
+
scrollHeight: body.scrollHeight,
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const errors = []
|
|
51
|
+
const widthOverflowPx = Math.max(0, bodyDimensions.scrollWidth - bodyDimensions.width - 1)
|
|
52
|
+
const heightOverflowPx = Math.max(0, bodyDimensions.scrollHeight - bodyDimensions.height - 1)
|
|
53
|
+
|
|
54
|
+
const widthOverflowPt = widthOverflowPx * PT_PER_PX
|
|
55
|
+
const heightOverflowPt = heightOverflowPx * PT_PER_PX
|
|
56
|
+
|
|
57
|
+
if (widthOverflowPt > 0 || heightOverflowPt > 0) {
|
|
58
|
+
const directions = []
|
|
59
|
+
if (widthOverflowPt > 0) directions.push(`${widthOverflowPt.toFixed(1)}pt horizontally`)
|
|
60
|
+
if (heightOverflowPt > 0) directions.push(`${heightOverflowPt.toFixed(1)}pt vertically`)
|
|
61
|
+
const reminder = heightOverflowPt > 0 ? ' (Remember: leave 0.5" margin at bottom of slide)' : ""
|
|
62
|
+
errors.push(`HTML content overflows body by ${directions.join(" and ")}${reminder}`)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return { ...bodyDimensions, errors }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Helper: Validate dimensions match presentation layout
|
|
69
|
+
function validateDimensions(bodyDimensions, pres) {
|
|
70
|
+
const errors = []
|
|
71
|
+
const widthInches = bodyDimensions.width / PX_PER_IN
|
|
72
|
+
const heightInches = bodyDimensions.height / PX_PER_IN
|
|
73
|
+
|
|
74
|
+
if (pres.presLayout) {
|
|
75
|
+
const layoutWidth = pres.presLayout.width / EMU_PER_IN
|
|
76
|
+
const layoutHeight = pres.presLayout.height / EMU_PER_IN
|
|
77
|
+
|
|
78
|
+
if (Math.abs(layoutWidth - widthInches) > 0.1 || Math.abs(layoutHeight - heightInches) > 0.1) {
|
|
79
|
+
errors.push(
|
|
80
|
+
`HTML dimensions (${widthInches.toFixed(1)}" × ${heightInches.toFixed(1)}") ` +
|
|
81
|
+
`don't match presentation layout (${layoutWidth.toFixed(1)}" × ${layoutHeight.toFixed(1)}")`,
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return errors
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function validateTextBoxPosition(slideData, bodyDimensions) {
|
|
89
|
+
const errors = []
|
|
90
|
+
const slideHeightInches = bodyDimensions.height / PX_PER_IN
|
|
91
|
+
const minBottomMargin = 0.5 // 0.5 inches from bottom
|
|
92
|
+
|
|
93
|
+
for (const el of slideData.elements) {
|
|
94
|
+
// Check text elements (p, h1-h6, list)
|
|
95
|
+
if (["p", "h1", "h2", "h3", "h4", "h5", "h6", "list"].includes(el.type)) {
|
|
96
|
+
const fontSize = el.style?.fontSize || 0
|
|
97
|
+
const bottomEdge = el.position.y + el.position.h
|
|
98
|
+
const distanceFromBottom = slideHeightInches - bottomEdge
|
|
99
|
+
|
|
100
|
+
if (fontSize > 12 && distanceFromBottom < minBottomMargin) {
|
|
101
|
+
const getText = () => {
|
|
102
|
+
if (typeof el.text === "string") return el.text
|
|
103
|
+
if (Array.isArray(el.text)) return el.text.find((t) => t.text)?.text || ""
|
|
104
|
+
if (Array.isArray(el.items)) return el.items.find((item) => item.text)?.text || ""
|
|
105
|
+
return ""
|
|
106
|
+
}
|
|
107
|
+
const textPrefix = getText().substring(0, 50) + (getText().length > 50 ? "..." : "")
|
|
108
|
+
|
|
109
|
+
errors.push(
|
|
110
|
+
`Text box "${textPrefix}" ends too close to bottom edge ` +
|
|
111
|
+
`(${distanceFromBottom.toFixed(2)}" from bottom, minimum ${minBottomMargin}" required)`,
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return errors
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Helper: Add background to slide
|
|
121
|
+
async function addBackground(slideData, targetSlide, tmpDir) {
|
|
122
|
+
if (slideData.background.type === "image" && slideData.background.path) {
|
|
123
|
+
let imagePath = slideData.background.path.startsWith("file://")
|
|
124
|
+
? slideData.background.path.replace("file://", "")
|
|
125
|
+
: slideData.background.path
|
|
126
|
+
targetSlide.background = { path: imagePath }
|
|
127
|
+
} else if (slideData.background.type === "color" && slideData.background.value) {
|
|
128
|
+
targetSlide.background = { color: slideData.background.value }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Helper: Add elements to slide
|
|
133
|
+
function addElements(slideData, targetSlide, pres) {
|
|
134
|
+
for (const el of slideData.elements) {
|
|
135
|
+
if (el.type === "image") {
|
|
136
|
+
let imagePath = el.src.startsWith("file://") ? el.src.replace("file://", "") : el.src
|
|
137
|
+
targetSlide.addImage({
|
|
138
|
+
path: imagePath,
|
|
139
|
+
x: el.position.x,
|
|
140
|
+
y: el.position.y,
|
|
141
|
+
w: el.position.w,
|
|
142
|
+
h: el.position.h,
|
|
143
|
+
})
|
|
144
|
+
} else if (el.type === "line") {
|
|
145
|
+
targetSlide.addShape(pres.ShapeType.line, {
|
|
146
|
+
x: el.x1,
|
|
147
|
+
y: el.y1,
|
|
148
|
+
w: el.x2 - el.x1,
|
|
149
|
+
h: el.y2 - el.y1,
|
|
150
|
+
line: { color: el.color, width: el.width },
|
|
151
|
+
})
|
|
152
|
+
} else if (el.type === "shape") {
|
|
153
|
+
const shapeOptions = {
|
|
154
|
+
x: el.position.x,
|
|
155
|
+
y: el.position.y,
|
|
156
|
+
w: el.position.w,
|
|
157
|
+
h: el.position.h,
|
|
158
|
+
shape: el.shape.rectRadius > 0 ? pres.ShapeType.roundRect : pres.ShapeType.rect,
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (el.shape.fill) {
|
|
162
|
+
shapeOptions.fill = { color: el.shape.fill }
|
|
163
|
+
if (el.shape.transparency != null) shapeOptions.fill.transparency = el.shape.transparency
|
|
164
|
+
}
|
|
165
|
+
if (el.shape.line) shapeOptions.line = el.shape.line
|
|
166
|
+
if (el.shape.rectRadius > 0) shapeOptions.rectRadius = el.shape.rectRadius
|
|
167
|
+
if (el.shape.shadow) shapeOptions.shadow = el.shape.shadow
|
|
168
|
+
|
|
169
|
+
targetSlide.addText(el.text || "", shapeOptions)
|
|
170
|
+
} else if (el.type === "list") {
|
|
171
|
+
const listOptions = {
|
|
172
|
+
x: el.position.x,
|
|
173
|
+
y: el.position.y,
|
|
174
|
+
w: el.position.w,
|
|
175
|
+
h: el.position.h,
|
|
176
|
+
fontSize: el.style.fontSize,
|
|
177
|
+
fontFace: el.style.fontFace,
|
|
178
|
+
color: el.style.color,
|
|
179
|
+
align: el.style.align,
|
|
180
|
+
valign: "top",
|
|
181
|
+
lineSpacing: el.style.lineSpacing,
|
|
182
|
+
paraSpaceBefore: el.style.paraSpaceBefore,
|
|
183
|
+
paraSpaceAfter: el.style.paraSpaceAfter,
|
|
184
|
+
margin: el.style.margin,
|
|
185
|
+
}
|
|
186
|
+
if (el.style.margin) listOptions.margin = el.style.margin
|
|
187
|
+
targetSlide.addText(el.items, listOptions)
|
|
188
|
+
} else {
|
|
189
|
+
// Check if text is single-line (height suggests one line)
|
|
190
|
+
const lineHeight = el.style.lineSpacing || el.style.fontSize * 1.2
|
|
191
|
+
const isSingleLine = el.position.h <= lineHeight * 1.5
|
|
192
|
+
|
|
193
|
+
let adjustedX = el.position.x
|
|
194
|
+
let adjustedW = el.position.w
|
|
195
|
+
|
|
196
|
+
// Make single-line text 2% wider to account for underestimate
|
|
197
|
+
if (isSingleLine) {
|
|
198
|
+
const widthIncrease = el.position.w * 0.02
|
|
199
|
+
const align = el.style.align
|
|
200
|
+
|
|
201
|
+
if (align === "center") {
|
|
202
|
+
// Center: expand both sides
|
|
203
|
+
adjustedX = el.position.x - widthIncrease / 2
|
|
204
|
+
adjustedW = el.position.w + widthIncrease
|
|
205
|
+
} else if (align === "right") {
|
|
206
|
+
// Right: expand to the left
|
|
207
|
+
adjustedX = el.position.x - widthIncrease
|
|
208
|
+
adjustedW = el.position.w + widthIncrease
|
|
209
|
+
} else {
|
|
210
|
+
// Left (default): expand to the right
|
|
211
|
+
adjustedW = el.position.w + widthIncrease
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const textOptions = {
|
|
216
|
+
x: adjustedX,
|
|
217
|
+
y: el.position.y,
|
|
218
|
+
w: adjustedW,
|
|
219
|
+
h: el.position.h,
|
|
220
|
+
fontSize: el.style.fontSize,
|
|
221
|
+
fontFace: el.style.fontFace,
|
|
222
|
+
color: el.style.color,
|
|
223
|
+
bold: el.style.bold,
|
|
224
|
+
italic: el.style.italic,
|
|
225
|
+
underline: el.style.underline,
|
|
226
|
+
valign: "top",
|
|
227
|
+
lineSpacing: el.style.lineSpacing,
|
|
228
|
+
paraSpaceBefore: el.style.paraSpaceBefore,
|
|
229
|
+
paraSpaceAfter: el.style.paraSpaceAfter,
|
|
230
|
+
inset: 0, // Remove default PowerPoint internal padding
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (el.style.align) textOptions.align = el.style.align
|
|
234
|
+
if (el.style.margin) textOptions.margin = el.style.margin
|
|
235
|
+
if (el.style.rotate !== undefined) textOptions.rotate = el.style.rotate
|
|
236
|
+
if (el.style.transparency !== null && el.style.transparency !== undefined)
|
|
237
|
+
textOptions.transparency = el.style.transparency
|
|
238
|
+
|
|
239
|
+
targetSlide.addText(el.text, textOptions)
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Helper: Extract slide data from HTML page
|
|
245
|
+
async function extractSlideData(page) {
|
|
246
|
+
return await page.evaluate(() => {
|
|
247
|
+
const PT_PER_PX = 0.75
|
|
248
|
+
const PX_PER_IN = 96
|
|
249
|
+
|
|
250
|
+
// Fonts that are single-weight and should not have bold applied
|
|
251
|
+
// (applying bold causes PowerPoint to use faux bold which makes text wider)
|
|
252
|
+
const SINGLE_WEIGHT_FONTS = ["impact"]
|
|
253
|
+
|
|
254
|
+
// Helper: Check if a font should skip bold formatting
|
|
255
|
+
const shouldSkipBold = (fontFamily) => {
|
|
256
|
+
if (!fontFamily) return false
|
|
257
|
+
const normalizedFont = fontFamily.toLowerCase().replace(/['"]/g, "").split(",")[0].trim()
|
|
258
|
+
return SINGLE_WEIGHT_FONTS.includes(normalizedFont)
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Unit conversion helpers
|
|
262
|
+
const pxToInch = (px) => px / PX_PER_IN
|
|
263
|
+
const pxToPoints = (pxStr) => parseFloat(pxStr) * PT_PER_PX
|
|
264
|
+
const rgbToHex = (rgbStr) => {
|
|
265
|
+
// Handle transparent backgrounds by defaulting to white
|
|
266
|
+
if (rgbStr === "rgba(0, 0, 0, 0)" || rgbStr === "transparent") return "FFFFFF"
|
|
267
|
+
|
|
268
|
+
const match = rgbStr.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/)
|
|
269
|
+
if (!match) return "FFFFFF"
|
|
270
|
+
return match
|
|
271
|
+
.slice(1)
|
|
272
|
+
.map((n) => parseInt(n).toString(16).padStart(2, "0"))
|
|
273
|
+
.join("")
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const extractAlpha = (rgbStr) => {
|
|
277
|
+
const match = rgbStr.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/)
|
|
278
|
+
if (!match || !match[4]) return null
|
|
279
|
+
const alpha = parseFloat(match[4])
|
|
280
|
+
return Math.round((1 - alpha) * 100)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const applyTextTransform = (text, textTransform) => {
|
|
284
|
+
if (textTransform === "uppercase") return text.toUpperCase()
|
|
285
|
+
if (textTransform === "lowercase") return text.toLowerCase()
|
|
286
|
+
if (textTransform === "capitalize") {
|
|
287
|
+
return text.replace(/\b\w/g, (c) => c.toUpperCase())
|
|
288
|
+
}
|
|
289
|
+
return text
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Extract rotation angle from CSS transform and writing-mode
|
|
293
|
+
const getRotation = (transform, writingMode) => {
|
|
294
|
+
let angle = 0
|
|
295
|
+
|
|
296
|
+
// Handle writing-mode first
|
|
297
|
+
// PowerPoint: 90° = text rotated 90° clockwise (reads top to bottom, letters upright)
|
|
298
|
+
// PowerPoint: 270° = text rotated 270° clockwise (reads bottom to top, letters upright)
|
|
299
|
+
if (writingMode === "vertical-rl") {
|
|
300
|
+
// vertical-rl alone = text reads top to bottom = 90° in PowerPoint
|
|
301
|
+
angle = 90
|
|
302
|
+
} else if (writingMode === "vertical-lr") {
|
|
303
|
+
// vertical-lr alone = text reads bottom to top = 270° in PowerPoint
|
|
304
|
+
angle = 270
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Then add any transform rotation
|
|
308
|
+
if (transform && transform !== "none") {
|
|
309
|
+
// Try to match rotate() function
|
|
310
|
+
const rotateMatch = transform.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)
|
|
311
|
+
if (rotateMatch) {
|
|
312
|
+
angle += parseFloat(rotateMatch[1])
|
|
313
|
+
} else {
|
|
314
|
+
// Browser may compute as matrix - extract rotation from matrix
|
|
315
|
+
const matrixMatch = transform.match(/matrix\(([^)]+)\)/)
|
|
316
|
+
if (matrixMatch) {
|
|
317
|
+
const values = matrixMatch[1].split(",").map(parseFloat)
|
|
318
|
+
// matrix(a, b, c, d, e, f) where rotation = atan2(b, a)
|
|
319
|
+
const matrixAngle = Math.atan2(values[1], values[0]) * (180 / Math.PI)
|
|
320
|
+
angle += Math.round(matrixAngle)
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Normalize to 0-359 range
|
|
326
|
+
angle = angle % 360
|
|
327
|
+
if (angle < 0) angle += 360
|
|
328
|
+
|
|
329
|
+
return angle === 0 ? null : angle
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Get position/dimensions accounting for rotation
|
|
333
|
+
const getPositionAndSize = (el, rect, rotation) => {
|
|
334
|
+
if (rotation === null) {
|
|
335
|
+
return { x: rect.left, y: rect.top, w: rect.width, h: rect.height }
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// For 90° or 270° rotations, swap width and height
|
|
339
|
+
// because PowerPoint applies rotation to the original (unrotated) box
|
|
340
|
+
const isVertical = rotation === 90 || rotation === 270
|
|
341
|
+
|
|
342
|
+
if (isVertical) {
|
|
343
|
+
// The browser shows us the rotated dimensions (tall box for vertical text)
|
|
344
|
+
// But PowerPoint needs the pre-rotation dimensions (wide box that will be rotated)
|
|
345
|
+
// So we swap: browser's height becomes PPT's width, browser's width becomes PPT's height
|
|
346
|
+
const centerX = rect.left + rect.width / 2
|
|
347
|
+
const centerY = rect.top + rect.height / 2
|
|
348
|
+
|
|
349
|
+
return {
|
|
350
|
+
x: centerX - rect.height / 2,
|
|
351
|
+
y: centerY - rect.width / 2,
|
|
352
|
+
w: rect.height,
|
|
353
|
+
h: rect.width,
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// For other rotations, use element's offset dimensions
|
|
358
|
+
const centerX = rect.left + rect.width / 2
|
|
359
|
+
const centerY = rect.top + rect.height / 2
|
|
360
|
+
return {
|
|
361
|
+
x: centerX - el.offsetWidth / 2,
|
|
362
|
+
y: centerY - el.offsetHeight / 2,
|
|
363
|
+
w: el.offsetWidth,
|
|
364
|
+
h: el.offsetHeight,
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Parse CSS box-shadow into PptxGenJS shadow properties
|
|
369
|
+
const parseBoxShadow = (boxShadow) => {
|
|
370
|
+
if (!boxShadow || boxShadow === "none") return null
|
|
371
|
+
|
|
372
|
+
// Browser computed style format: "rgba(0, 0, 0, 0.3) 2px 2px 8px 0px [inset]"
|
|
373
|
+
// CSS format: "[inset] 2px 2px 8px 0px rgba(0, 0, 0, 0.3)"
|
|
374
|
+
|
|
375
|
+
const insetMatch = boxShadow.match(/inset/)
|
|
376
|
+
|
|
377
|
+
// IMPORTANT: PptxGenJS/PowerPoint doesn't properly support inset shadows
|
|
378
|
+
// Only process outer shadows to avoid file corruption
|
|
379
|
+
if (insetMatch) return null
|
|
380
|
+
|
|
381
|
+
// Extract color first (rgba or rgb at start)
|
|
382
|
+
const colorMatch = boxShadow.match(/rgba?\([^)]+\)/)
|
|
383
|
+
|
|
384
|
+
// Extract numeric values (handles both px and pt units)
|
|
385
|
+
const parts = boxShadow.match(/([-\d.]+)(px|pt)/g)
|
|
386
|
+
|
|
387
|
+
if (!parts || parts.length < 2) return null
|
|
388
|
+
|
|
389
|
+
const offsetX = parseFloat(parts[0])
|
|
390
|
+
const offsetY = parseFloat(parts[1])
|
|
391
|
+
const blur = parts.length > 2 ? parseFloat(parts[2]) : 0
|
|
392
|
+
|
|
393
|
+
// Calculate angle from offsets (in degrees, 0 = right, 90 = down)
|
|
394
|
+
let angle = 0
|
|
395
|
+
if (offsetX !== 0 || offsetY !== 0) {
|
|
396
|
+
angle = Math.atan2(offsetY, offsetX) * (180 / Math.PI)
|
|
397
|
+
if (angle < 0) angle += 360
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Calculate offset distance (hypotenuse)
|
|
401
|
+
const offset = Math.sqrt(offsetX * offsetX + offsetY * offsetY) * PT_PER_PX
|
|
402
|
+
|
|
403
|
+
// Extract opacity from rgba
|
|
404
|
+
let opacity = 0.5
|
|
405
|
+
if (colorMatch) {
|
|
406
|
+
const opacityMatch = colorMatch[0].match(/[\d.]+\)$/)
|
|
407
|
+
if (opacityMatch) {
|
|
408
|
+
opacity = parseFloat(opacityMatch[0].replace(")", ""))
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return {
|
|
413
|
+
type: "outer",
|
|
414
|
+
angle: Math.round(angle),
|
|
415
|
+
blur: blur * 0.75, // Convert to points
|
|
416
|
+
color: colorMatch ? rgbToHex(colorMatch[0]) : "000000",
|
|
417
|
+
offset: offset,
|
|
418
|
+
opacity,
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// Parse inline formatting tags (<b>, <i>, <u>, <strong>, <em>, <span>) into text runs
|
|
423
|
+
const parseInlineFormatting = (element, baseOptions = {}, runs = [], baseTextTransform = (x) => x) => {
|
|
424
|
+
let prevNodeIsText = false
|
|
425
|
+
|
|
426
|
+
element.childNodes.forEach((node) => {
|
|
427
|
+
let textTransform = baseTextTransform
|
|
428
|
+
|
|
429
|
+
const isText = node.nodeType === Node.TEXT_NODE || node.tagName === "BR"
|
|
430
|
+
if (isText) {
|
|
431
|
+
const text = node.tagName === "BR" ? "\n" : textTransform(node.textContent.replace(/\s+/g, " "))
|
|
432
|
+
const prevRun = runs[runs.length - 1]
|
|
433
|
+
if (prevNodeIsText && prevRun) {
|
|
434
|
+
prevRun.text += text
|
|
435
|
+
} else {
|
|
436
|
+
runs.push({ text, options: { ...baseOptions } })
|
|
437
|
+
}
|
|
438
|
+
} else if (node.nodeType === Node.ELEMENT_NODE && node.textContent.trim()) {
|
|
439
|
+
const options = { ...baseOptions }
|
|
440
|
+
const computed = window.getComputedStyle(node)
|
|
441
|
+
|
|
442
|
+
// Handle inline elements with computed styles
|
|
443
|
+
if (
|
|
444
|
+
node.tagName === "SPAN" ||
|
|
445
|
+
node.tagName === "B" ||
|
|
446
|
+
node.tagName === "STRONG" ||
|
|
447
|
+
node.tagName === "I" ||
|
|
448
|
+
node.tagName === "EM" ||
|
|
449
|
+
node.tagName === "U"
|
|
450
|
+
) {
|
|
451
|
+
const isBold = computed.fontWeight === "bold" || parseInt(computed.fontWeight) >= 600
|
|
452
|
+
if (isBold && !shouldSkipBold(computed.fontFamily)) options.bold = true
|
|
453
|
+
if (computed.fontStyle === "italic") options.italic = true
|
|
454
|
+
if (computed.textDecoration && computed.textDecoration.includes("underline")) options.underline = true
|
|
455
|
+
if (computed.color && computed.color !== "rgb(0, 0, 0)") {
|
|
456
|
+
options.color = rgbToHex(computed.color)
|
|
457
|
+
const transparency = extractAlpha(computed.color)
|
|
458
|
+
if (transparency !== null) options.transparency = transparency
|
|
459
|
+
}
|
|
460
|
+
if (computed.fontSize) options.fontSize = pxToPoints(computed.fontSize)
|
|
461
|
+
|
|
462
|
+
// Apply text-transform on the span element itself
|
|
463
|
+
if (computed.textTransform && computed.textTransform !== "none") {
|
|
464
|
+
const transformStr = computed.textTransform
|
|
465
|
+
textTransform = (text) => applyTextTransform(text, transformStr)
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// Validate: Check for margins on inline elements
|
|
469
|
+
if (computed.marginLeft && parseFloat(computed.marginLeft) > 0) {
|
|
470
|
+
errors.push(
|
|
471
|
+
`Inline element <${node.tagName.toLowerCase()}> has margin-left which is not supported in PowerPoint. Remove margin from inline elements.`,
|
|
472
|
+
)
|
|
473
|
+
}
|
|
474
|
+
if (computed.marginRight && parseFloat(computed.marginRight) > 0) {
|
|
475
|
+
errors.push(
|
|
476
|
+
`Inline element <${node.tagName.toLowerCase()}> has margin-right which is not supported in PowerPoint. Remove margin from inline elements.`,
|
|
477
|
+
)
|
|
478
|
+
}
|
|
479
|
+
if (computed.marginTop && parseFloat(computed.marginTop) > 0) {
|
|
480
|
+
errors.push(
|
|
481
|
+
`Inline element <${node.tagName.toLowerCase()}> has margin-top which is not supported in PowerPoint. Remove margin from inline elements.`,
|
|
482
|
+
)
|
|
483
|
+
}
|
|
484
|
+
if (computed.marginBottom && parseFloat(computed.marginBottom) > 0) {
|
|
485
|
+
errors.push(
|
|
486
|
+
`Inline element <${node.tagName.toLowerCase()}> has margin-bottom which is not supported in PowerPoint. Remove margin from inline elements.`,
|
|
487
|
+
)
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Recursively process the child node. This will flatten nested spans into multiple runs.
|
|
491
|
+
parseInlineFormatting(node, options, runs, textTransform)
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
prevNodeIsText = isText
|
|
496
|
+
})
|
|
497
|
+
|
|
498
|
+
// Trim leading space from first run and trailing space from last run
|
|
499
|
+
if (runs.length > 0) {
|
|
500
|
+
runs[0].text = runs[0].text.replace(/^\s+/, "")
|
|
501
|
+
runs[runs.length - 1].text = runs[runs.length - 1].text.replace(/\s+$/, "")
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
return runs.filter((r) => r.text.length > 0)
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// Extract background from body (image or color)
|
|
508
|
+
const body = document.body
|
|
509
|
+
const bodyStyle = window.getComputedStyle(body)
|
|
510
|
+
const bgImage = bodyStyle.backgroundImage
|
|
511
|
+
const bgColor = bodyStyle.backgroundColor
|
|
512
|
+
|
|
513
|
+
// Collect validation errors
|
|
514
|
+
const errors = []
|
|
515
|
+
|
|
516
|
+
// Validate: Check for CSS gradients
|
|
517
|
+
if (bgImage && (bgImage.includes("linear-gradient") || bgImage.includes("radial-gradient"))) {
|
|
518
|
+
errors.push(
|
|
519
|
+
"CSS gradients are not supported. Use Sharp to rasterize gradients as PNG images first, " +
|
|
520
|
+
"then reference with background-image: url('gradient.png')",
|
|
521
|
+
)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
let background
|
|
525
|
+
if (bgImage && bgImage !== "none") {
|
|
526
|
+
// Extract URL from url("...") or url(...)
|
|
527
|
+
const urlMatch = bgImage.match(/url\(["']?([^"')]+)["']?\)/)
|
|
528
|
+
if (urlMatch) {
|
|
529
|
+
background = {
|
|
530
|
+
type: "image",
|
|
531
|
+
path: urlMatch[1],
|
|
532
|
+
}
|
|
533
|
+
} else {
|
|
534
|
+
background = {
|
|
535
|
+
type: "color",
|
|
536
|
+
value: rgbToHex(bgColor),
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
} else {
|
|
540
|
+
background = {
|
|
541
|
+
type: "color",
|
|
542
|
+
value: rgbToHex(bgColor),
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// Process all elements
|
|
547
|
+
const elements = []
|
|
548
|
+
const placeholders = []
|
|
549
|
+
const textTags = ["P", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "LI"]
|
|
550
|
+
const processed = new Set()
|
|
551
|
+
|
|
552
|
+
document.querySelectorAll("*").forEach((el) => {
|
|
553
|
+
if (processed.has(el)) return
|
|
554
|
+
|
|
555
|
+
// Validate text elements don't have backgrounds, borders, or shadows
|
|
556
|
+
if (textTags.includes(el.tagName)) {
|
|
557
|
+
const computed = window.getComputedStyle(el)
|
|
558
|
+
const hasBg = computed.backgroundColor && computed.backgroundColor !== "rgba(0, 0, 0, 0)"
|
|
559
|
+
const hasBorder =
|
|
560
|
+
(computed.borderWidth && parseFloat(computed.borderWidth) > 0) ||
|
|
561
|
+
(computed.borderTopWidth && parseFloat(computed.borderTopWidth) > 0) ||
|
|
562
|
+
(computed.borderRightWidth && parseFloat(computed.borderRightWidth) > 0) ||
|
|
563
|
+
(computed.borderBottomWidth && parseFloat(computed.borderBottomWidth) > 0) ||
|
|
564
|
+
(computed.borderLeftWidth && parseFloat(computed.borderLeftWidth) > 0)
|
|
565
|
+
const hasShadow = computed.boxShadow && computed.boxShadow !== "none"
|
|
566
|
+
|
|
567
|
+
if (hasBg || hasBorder || hasShadow) {
|
|
568
|
+
errors.push(
|
|
569
|
+
`Text element <${el.tagName.toLowerCase()}> has ${hasBg ? "background" : hasBorder ? "border" : "shadow"}. ` +
|
|
570
|
+
"Backgrounds, borders, and shadows are only supported on <div> elements, not text elements.",
|
|
571
|
+
)
|
|
572
|
+
return
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// Extract placeholder elements (for charts, etc.)
|
|
577
|
+
if (el.className && el.className.includes("placeholder")) {
|
|
578
|
+
const rect = el.getBoundingClientRect()
|
|
579
|
+
if (rect.width === 0 || rect.height === 0) {
|
|
580
|
+
errors.push(
|
|
581
|
+
`Placeholder "${el.id || "unnamed"}" has ${rect.width === 0 ? "width: 0" : "height: 0"}. Check the layout CSS.`,
|
|
582
|
+
)
|
|
583
|
+
} else {
|
|
584
|
+
placeholders.push({
|
|
585
|
+
id: el.id || `placeholder-${placeholders.length}`,
|
|
586
|
+
x: pxToInch(rect.left),
|
|
587
|
+
y: pxToInch(rect.top),
|
|
588
|
+
w: pxToInch(rect.width),
|
|
589
|
+
h: pxToInch(rect.height),
|
|
590
|
+
})
|
|
591
|
+
}
|
|
592
|
+
processed.add(el)
|
|
593
|
+
return
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// Extract images
|
|
597
|
+
if (el.tagName === "IMG") {
|
|
598
|
+
const rect = el.getBoundingClientRect()
|
|
599
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
600
|
+
elements.push({
|
|
601
|
+
type: "image",
|
|
602
|
+
src: el.src,
|
|
603
|
+
position: {
|
|
604
|
+
x: pxToInch(rect.left),
|
|
605
|
+
y: pxToInch(rect.top),
|
|
606
|
+
w: pxToInch(rect.width),
|
|
607
|
+
h: pxToInch(rect.height),
|
|
608
|
+
},
|
|
609
|
+
})
|
|
610
|
+
processed.add(el)
|
|
611
|
+
return
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// Extract DIVs with backgrounds/borders as shapes
|
|
616
|
+
const isContainer = el.tagName === "DIV" && !textTags.includes(el.tagName)
|
|
617
|
+
if (isContainer) {
|
|
618
|
+
const computed = window.getComputedStyle(el)
|
|
619
|
+
const hasBg = computed.backgroundColor && computed.backgroundColor !== "rgba(0, 0, 0, 0)"
|
|
620
|
+
|
|
621
|
+
// Validate: Check for unwrapped text content in DIV
|
|
622
|
+
for (const node of el.childNodes) {
|
|
623
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
624
|
+
const text = node.textContent.trim()
|
|
625
|
+
if (text) {
|
|
626
|
+
errors.push(
|
|
627
|
+
`DIV element contains unwrapped text "${text.substring(0, 50)}${text.length > 50 ? "..." : ""}". ` +
|
|
628
|
+
"All text must be wrapped in <p>, <h1>-<h6>, <ul>, or <ol> tags to appear in PowerPoint.",
|
|
629
|
+
)
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
// Check for background images on shapes
|
|
635
|
+
const bgImage = computed.backgroundImage
|
|
636
|
+
if (bgImage && bgImage !== "none") {
|
|
637
|
+
errors.push(
|
|
638
|
+
"Background images on DIV elements are not supported. " +
|
|
639
|
+
"Use solid colors or borders for shapes, or use slide.addImage() in PptxGenJS to layer images.",
|
|
640
|
+
)
|
|
641
|
+
return
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
// Check for borders - both uniform and partial
|
|
645
|
+
const borderTop = computed.borderTopWidth
|
|
646
|
+
const borderRight = computed.borderRightWidth
|
|
647
|
+
const borderBottom = computed.borderBottomWidth
|
|
648
|
+
const borderLeft = computed.borderLeftWidth
|
|
649
|
+
const borders = [borderTop, borderRight, borderBottom, borderLeft].map((b) => parseFloat(b) || 0)
|
|
650
|
+
const hasBorder = borders.some((b) => b > 0)
|
|
651
|
+
const hasUniformBorder = hasBorder && borders.every((b) => b === borders[0])
|
|
652
|
+
const borderLines = []
|
|
653
|
+
|
|
654
|
+
if (hasBorder && !hasUniformBorder) {
|
|
655
|
+
const rect = el.getBoundingClientRect()
|
|
656
|
+
const x = pxToInch(rect.left)
|
|
657
|
+
const y = pxToInch(rect.top)
|
|
658
|
+
const w = pxToInch(rect.width)
|
|
659
|
+
const h = pxToInch(rect.height)
|
|
660
|
+
|
|
661
|
+
// Collect lines to add after shape (inset by half the line width to center on edge)
|
|
662
|
+
if (parseFloat(borderTop) > 0) {
|
|
663
|
+
const widthPt = pxToPoints(borderTop)
|
|
664
|
+
const inset = widthPt / 72 / 2 // Convert points to inches, then half
|
|
665
|
+
borderLines.push({
|
|
666
|
+
type: "line",
|
|
667
|
+
x1: x,
|
|
668
|
+
y1: y + inset,
|
|
669
|
+
x2: x + w,
|
|
670
|
+
y2: y + inset,
|
|
671
|
+
width: widthPt,
|
|
672
|
+
color: rgbToHex(computed.borderTopColor),
|
|
673
|
+
})
|
|
674
|
+
}
|
|
675
|
+
if (parseFloat(borderRight) > 0) {
|
|
676
|
+
const widthPt = pxToPoints(borderRight)
|
|
677
|
+
const inset = widthPt / 72 / 2
|
|
678
|
+
borderLines.push({
|
|
679
|
+
type: "line",
|
|
680
|
+
x1: x + w - inset,
|
|
681
|
+
y1: y,
|
|
682
|
+
x2: x + w - inset,
|
|
683
|
+
y2: y + h,
|
|
684
|
+
width: widthPt,
|
|
685
|
+
color: rgbToHex(computed.borderRightColor),
|
|
686
|
+
})
|
|
687
|
+
}
|
|
688
|
+
if (parseFloat(borderBottom) > 0) {
|
|
689
|
+
const widthPt = pxToPoints(borderBottom)
|
|
690
|
+
const inset = widthPt / 72 / 2
|
|
691
|
+
borderLines.push({
|
|
692
|
+
type: "line",
|
|
693
|
+
x1: x,
|
|
694
|
+
y1: y + h - inset,
|
|
695
|
+
x2: x + w,
|
|
696
|
+
y2: y + h - inset,
|
|
697
|
+
width: widthPt,
|
|
698
|
+
color: rgbToHex(computed.borderBottomColor),
|
|
699
|
+
})
|
|
700
|
+
}
|
|
701
|
+
if (parseFloat(borderLeft) > 0) {
|
|
702
|
+
const widthPt = pxToPoints(borderLeft)
|
|
703
|
+
const inset = widthPt / 72 / 2
|
|
704
|
+
borderLines.push({
|
|
705
|
+
type: "line",
|
|
706
|
+
x1: x + inset,
|
|
707
|
+
y1: y,
|
|
708
|
+
x2: x + inset,
|
|
709
|
+
y2: y + h,
|
|
710
|
+
width: widthPt,
|
|
711
|
+
color: rgbToHex(computed.borderLeftColor),
|
|
712
|
+
})
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (hasBg || hasBorder) {
|
|
717
|
+
const rect = el.getBoundingClientRect()
|
|
718
|
+
if (rect.width > 0 && rect.height > 0) {
|
|
719
|
+
const shadow = parseBoxShadow(computed.boxShadow)
|
|
720
|
+
|
|
721
|
+
// Only add shape if there's background or uniform border
|
|
722
|
+
if (hasBg || hasUniformBorder) {
|
|
723
|
+
elements.push({
|
|
724
|
+
type: "shape",
|
|
725
|
+
text: "", // Shape only - child text elements render on top
|
|
726
|
+
position: {
|
|
727
|
+
x: pxToInch(rect.left),
|
|
728
|
+
y: pxToInch(rect.top),
|
|
729
|
+
w: pxToInch(rect.width),
|
|
730
|
+
h: pxToInch(rect.height),
|
|
731
|
+
},
|
|
732
|
+
shape: {
|
|
733
|
+
fill: hasBg ? rgbToHex(computed.backgroundColor) : null,
|
|
734
|
+
transparency: hasBg ? extractAlpha(computed.backgroundColor) : null,
|
|
735
|
+
line: hasUniformBorder
|
|
736
|
+
? {
|
|
737
|
+
color: rgbToHex(computed.borderColor),
|
|
738
|
+
width: pxToPoints(computed.borderWidth),
|
|
739
|
+
}
|
|
740
|
+
: null,
|
|
741
|
+
// Convert border-radius to rectRadius (in inches)
|
|
742
|
+
// % values: 50%+ = circle (1), <50% = percentage of min dimension
|
|
743
|
+
// pt values: divide by 72 (72pt = 1 inch)
|
|
744
|
+
// px values: divide by 96 (96px = 1 inch)
|
|
745
|
+
rectRadius: (() => {
|
|
746
|
+
const radius = computed.borderRadius
|
|
747
|
+
const radiusValue = parseFloat(radius)
|
|
748
|
+
if (radiusValue === 0) return 0
|
|
749
|
+
|
|
750
|
+
if (radius.includes("%")) {
|
|
751
|
+
if (radiusValue >= 50) return 1
|
|
752
|
+
// Calculate percentage of smaller dimension
|
|
753
|
+
const minDim = Math.min(rect.width, rect.height)
|
|
754
|
+
return (radiusValue / 100) * pxToInch(minDim)
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
if (radius.includes("pt")) return radiusValue / 72
|
|
758
|
+
return radiusValue / PX_PER_IN
|
|
759
|
+
})(),
|
|
760
|
+
shadow: shadow,
|
|
761
|
+
},
|
|
762
|
+
})
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// Add partial border lines
|
|
766
|
+
elements.push(...borderLines)
|
|
767
|
+
|
|
768
|
+
processed.add(el)
|
|
769
|
+
return
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// Extract bullet lists as single text block
|
|
775
|
+
if (el.tagName === "UL" || el.tagName === "OL") {
|
|
776
|
+
const rect = el.getBoundingClientRect()
|
|
777
|
+
if (rect.width === 0 || rect.height === 0) return
|
|
778
|
+
|
|
779
|
+
const liElements = Array.from(el.querySelectorAll("li"))
|
|
780
|
+
const items = []
|
|
781
|
+
const ulComputed = window.getComputedStyle(el)
|
|
782
|
+
const ulPaddingLeftPt = pxToPoints(ulComputed.paddingLeft)
|
|
783
|
+
|
|
784
|
+
// Split: margin-left for bullet position, indent for text position
|
|
785
|
+
// margin-left + indent = ul padding-left
|
|
786
|
+
const marginLeft = ulPaddingLeftPt * 0.5
|
|
787
|
+
const textIndent = ulPaddingLeftPt * 0.5
|
|
788
|
+
|
|
789
|
+
liElements.forEach((li, idx) => {
|
|
790
|
+
const isLast = idx === liElements.length - 1
|
|
791
|
+
const runs = parseInlineFormatting(li, { breakLine: false })
|
|
792
|
+
// Clean manual bullets from first run
|
|
793
|
+
if (runs.length > 0) {
|
|
794
|
+
runs[0].text = runs[0].text.replace(/^[•\-\*▪▸]\s*/, "")
|
|
795
|
+
runs[0].options.bullet = { indent: textIndent }
|
|
796
|
+
}
|
|
797
|
+
// Set breakLine on last run
|
|
798
|
+
if (runs.length > 0 && !isLast) {
|
|
799
|
+
runs[runs.length - 1].options.breakLine = true
|
|
800
|
+
}
|
|
801
|
+
items.push(...runs)
|
|
802
|
+
})
|
|
803
|
+
|
|
804
|
+
const computed = window.getComputedStyle(liElements[0] || el)
|
|
805
|
+
|
|
806
|
+
elements.push({
|
|
807
|
+
type: "list",
|
|
808
|
+
items: items,
|
|
809
|
+
position: {
|
|
810
|
+
x: pxToInch(rect.left),
|
|
811
|
+
y: pxToInch(rect.top),
|
|
812
|
+
w: pxToInch(rect.width),
|
|
813
|
+
h: pxToInch(rect.height),
|
|
814
|
+
},
|
|
815
|
+
style: {
|
|
816
|
+
fontSize: pxToPoints(computed.fontSize),
|
|
817
|
+
fontFace: computed.fontFamily.split(",")[0].replace(/['"]/g, "").trim(),
|
|
818
|
+
color: rgbToHex(computed.color),
|
|
819
|
+
transparency: extractAlpha(computed.color),
|
|
820
|
+
align: computed.textAlign === "start" ? "left" : computed.textAlign,
|
|
821
|
+
lineSpacing:
|
|
822
|
+
computed.lineHeight && computed.lineHeight !== "normal" ? pxToPoints(computed.lineHeight) : null,
|
|
823
|
+
paraSpaceBefore: 0,
|
|
824
|
+
paraSpaceAfter: pxToPoints(computed.marginBottom),
|
|
825
|
+
// PptxGenJS margin array is [left, right, bottom, top]
|
|
826
|
+
margin: [marginLeft, 0, 0, 0],
|
|
827
|
+
},
|
|
828
|
+
})
|
|
829
|
+
|
|
830
|
+
liElements.forEach((li) => processed.add(li))
|
|
831
|
+
processed.add(el)
|
|
832
|
+
return
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// Extract text elements (P, H1, H2, etc.)
|
|
836
|
+
if (!textTags.includes(el.tagName)) return
|
|
837
|
+
|
|
838
|
+
const rect = el.getBoundingClientRect()
|
|
839
|
+
const text = el.textContent.trim()
|
|
840
|
+
if (rect.width === 0 || rect.height === 0 || !text) return
|
|
841
|
+
|
|
842
|
+
// Validate: Check for manual bullet symbols in text elements (not in lists)
|
|
843
|
+
if (el.tagName !== "LI" && /^[•\-\*▪▸○●◆◇■□]\s/.test(text.trimStart())) {
|
|
844
|
+
errors.push(
|
|
845
|
+
`Text element <${el.tagName.toLowerCase()}> starts with bullet symbol "${text.substring(0, 20)}...". ` +
|
|
846
|
+
"Use <ul> or <ol> lists instead of manual bullet symbols.",
|
|
847
|
+
)
|
|
848
|
+
return
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
const computed = window.getComputedStyle(el)
|
|
852
|
+
const rotation = getRotation(computed.transform, computed.writingMode)
|
|
853
|
+
const { x, y, w, h } = getPositionAndSize(el, rect, rotation)
|
|
854
|
+
|
|
855
|
+
const baseStyle = {
|
|
856
|
+
fontSize: pxToPoints(computed.fontSize),
|
|
857
|
+
fontFace: computed.fontFamily.split(",")[0].replace(/['"]/g, "").trim(),
|
|
858
|
+
color: rgbToHex(computed.color),
|
|
859
|
+
align: computed.textAlign === "start" ? "left" : computed.textAlign,
|
|
860
|
+
lineSpacing: pxToPoints(computed.lineHeight),
|
|
861
|
+
paraSpaceBefore: pxToPoints(computed.marginTop),
|
|
862
|
+
paraSpaceAfter: pxToPoints(computed.marginBottom),
|
|
863
|
+
// PptxGenJS margin array is [left, right, bottom, top] (not [top, right, bottom, left] as documented)
|
|
864
|
+
margin: [
|
|
865
|
+
pxToPoints(computed.paddingLeft),
|
|
866
|
+
pxToPoints(computed.paddingRight),
|
|
867
|
+
pxToPoints(computed.paddingBottom),
|
|
868
|
+
pxToPoints(computed.paddingTop),
|
|
869
|
+
],
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
const transparency = extractAlpha(computed.color)
|
|
873
|
+
if (transparency !== null) baseStyle.transparency = transparency
|
|
874
|
+
|
|
875
|
+
if (rotation !== null) baseStyle.rotate = rotation
|
|
876
|
+
|
|
877
|
+
const hasFormatting = el.querySelector("b, i, u, strong, em, span, br")
|
|
878
|
+
|
|
879
|
+
if (hasFormatting) {
|
|
880
|
+
// Text with inline formatting
|
|
881
|
+
const transformStr = computed.textTransform
|
|
882
|
+
const runs = parseInlineFormatting(el, {}, [], (str) => applyTextTransform(str, transformStr))
|
|
883
|
+
|
|
884
|
+
// Adjust lineSpacing based on largest fontSize in runs
|
|
885
|
+
const adjustedStyle = { ...baseStyle }
|
|
886
|
+
if (adjustedStyle.lineSpacing) {
|
|
887
|
+
const maxFontSize = Math.max(adjustedStyle.fontSize, ...runs.map((r) => r.options?.fontSize || 0))
|
|
888
|
+
if (maxFontSize > adjustedStyle.fontSize) {
|
|
889
|
+
const lineHeightMultiplier = adjustedStyle.lineSpacing / adjustedStyle.fontSize
|
|
890
|
+
adjustedStyle.lineSpacing = maxFontSize * lineHeightMultiplier
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
elements.push({
|
|
895
|
+
type: el.tagName.toLowerCase(),
|
|
896
|
+
text: runs,
|
|
897
|
+
position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
|
|
898
|
+
style: adjustedStyle,
|
|
899
|
+
})
|
|
900
|
+
} else {
|
|
901
|
+
// Plain text - inherit CSS formatting
|
|
902
|
+
const textTransform = computed.textTransform
|
|
903
|
+
const transformedText = applyTextTransform(text, textTransform)
|
|
904
|
+
|
|
905
|
+
const isBold = computed.fontWeight === "bold" || parseInt(computed.fontWeight) >= 600
|
|
906
|
+
|
|
907
|
+
elements.push({
|
|
908
|
+
type: el.tagName.toLowerCase(),
|
|
909
|
+
text: transformedText,
|
|
910
|
+
position: { x: pxToInch(x), y: pxToInch(y), w: pxToInch(w), h: pxToInch(h) },
|
|
911
|
+
style: {
|
|
912
|
+
...baseStyle,
|
|
913
|
+
bold: isBold && !shouldSkipBold(computed.fontFamily),
|
|
914
|
+
italic: computed.fontStyle === "italic",
|
|
915
|
+
underline: computed.textDecoration.includes("underline"),
|
|
916
|
+
},
|
|
917
|
+
})
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
processed.add(el)
|
|
921
|
+
})
|
|
922
|
+
|
|
923
|
+
return { background, elements, placeholders, errors }
|
|
924
|
+
})
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
async function html2pptx(htmlFile, pres, options = {}) {
|
|
928
|
+
const { tmpDir = process.env.TMPDIR || "/tmp", slide = null } = options
|
|
929
|
+
|
|
930
|
+
try {
|
|
931
|
+
// Use Chrome on macOS, default Chromium on Unix
|
|
932
|
+
const launchOptions = { env: { TMPDIR: tmpDir } }
|
|
933
|
+
if (process.platform === "darwin") {
|
|
934
|
+
launchOptions.channel = "chrome"
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
const browser = await chromium.launch(launchOptions)
|
|
938
|
+
|
|
939
|
+
let bodyDimensions
|
|
940
|
+
let slideData
|
|
941
|
+
|
|
942
|
+
const filePath = path.isAbsolute(htmlFile) ? htmlFile : path.join(process.cwd(), htmlFile)
|
|
943
|
+
const validationErrors = []
|
|
944
|
+
|
|
945
|
+
try {
|
|
946
|
+
const page = await browser.newPage()
|
|
947
|
+
page.on("console", (msg) => {
|
|
948
|
+
// Log the message text to your test runner's console
|
|
949
|
+
console.log(`Browser console: ${msg.text()}`)
|
|
950
|
+
})
|
|
951
|
+
|
|
952
|
+
await page.goto(`file://${filePath}`)
|
|
953
|
+
|
|
954
|
+
bodyDimensions = await getBodyDimensions(page)
|
|
955
|
+
|
|
956
|
+
await page.setViewportSize({
|
|
957
|
+
width: Math.round(bodyDimensions.width),
|
|
958
|
+
height: Math.round(bodyDimensions.height),
|
|
959
|
+
})
|
|
960
|
+
|
|
961
|
+
slideData = await extractSlideData(page)
|
|
962
|
+
} finally {
|
|
963
|
+
await browser.close()
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
// Collect all validation errors
|
|
967
|
+
if (bodyDimensions.errors && bodyDimensions.errors.length > 0) {
|
|
968
|
+
validationErrors.push(...bodyDimensions.errors)
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
const dimensionErrors = validateDimensions(bodyDimensions, pres)
|
|
972
|
+
if (dimensionErrors.length > 0) {
|
|
973
|
+
validationErrors.push(...dimensionErrors)
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
const textBoxPositionErrors = validateTextBoxPosition(slideData, bodyDimensions)
|
|
977
|
+
if (textBoxPositionErrors.length > 0) {
|
|
978
|
+
validationErrors.push(...textBoxPositionErrors)
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
if (slideData.errors && slideData.errors.length > 0) {
|
|
982
|
+
validationErrors.push(...slideData.errors)
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// Throw all errors at once if any exist
|
|
986
|
+
if (validationErrors.length > 0) {
|
|
987
|
+
const errorMessage =
|
|
988
|
+
validationErrors.length === 1
|
|
989
|
+
? validationErrors[0]
|
|
990
|
+
: `Multiple validation errors found:\n${validationErrors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")}`
|
|
991
|
+
throw new Error(errorMessage)
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
const targetSlide = slide || pres.addSlide()
|
|
995
|
+
|
|
996
|
+
await addBackground(slideData, targetSlide, tmpDir)
|
|
997
|
+
addElements(slideData, targetSlide, pres)
|
|
998
|
+
|
|
999
|
+
return { slide: targetSlide, placeholders: slideData.placeholders }
|
|
1000
|
+
} catch (error) {
|
|
1001
|
+
if (!error.message.startsWith(htmlFile)) {
|
|
1002
|
+
throw new Error(`${htmlFile}: ${error.message}`)
|
|
1003
|
+
}
|
|
1004
|
+
throw error
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
module.exports = html2pptx
|