@nguyenphp/antigravity-marketing 1.0.16 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -74
- package/bin/index.js +4 -4
- package/package.json +4 -3
- package/templates/.agent/agents/backend-specialist.md +263 -0
- package/templates/.agent/agents/database-architect.md +226 -0
- package/templates/.agent/agents/debugger.md +225 -0
- package/templates/.agent/agents/devops-engineer.md +242 -0
- package/templates/.agent/agents/documentation-writer.md +104 -0
- package/templates/.agent/agents/explorer-agent.md +73 -0
- package/templates/.agent/agents/frontend-specialist.md +527 -0
- package/templates/.agent/agents/game-developer.md +162 -0
- package/templates/.agent/agents/mobile-developer.md +377 -0
- package/templates/.agent/agents/orchestrator.md +400 -0
- package/templates/.agent/agents/penetration-tester.md +188 -0
- package/templates/.agent/agents/performance-optimizer.md +187 -0
- package/templates/.agent/agents/project-planner.md +403 -0
- package/templates/.agent/agents/security-auditor.md +170 -0
- package/templates/.agent/agents/seo-specialist.md +111 -0
- package/templates/.agent/agents/test-engineer.md +158 -0
- package/templates/.agent/rules/GEMINI.md +248 -0
- package/templates/.agent/skills/analytics-marketing/SKILL.md +172 -324
- package/templates/.agent/skills/api-patterns/SKILL.md +81 -0
- package/templates/.agent/skills/api-patterns/api-style.md +42 -0
- package/templates/.agent/skills/api-patterns/auth.md +24 -0
- package/templates/.agent/skills/api-patterns/documentation.md +26 -0
- package/templates/.agent/skills/api-patterns/graphql.md +41 -0
- package/templates/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/templates/.agent/skills/api-patterns/response.md +37 -0
- package/templates/.agent/skills/api-patterns/rest.md +40 -0
- package/templates/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/templates/.agent/skills/api-patterns/security-testing.md +122 -0
- package/templates/.agent/skills/api-patterns/trpc.md +41 -0
- package/templates/.agent/skills/api-patterns/versioning.md +22 -0
- package/templates/.agent/skills/app-builder/SKILL.md +75 -0
- package/templates/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/templates/.agent/skills/app-builder/feature-building.md +53 -0
- package/templates/.agent/skills/app-builder/project-detection.md +34 -0
- package/templates/.agent/skills/app-builder/scaffolding.md +118 -0
- package/templates/.agent/skills/app-builder/tech-stack.md +40 -0
- package/templates/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/templates/.agent/skills/architecture/SKILL.md +55 -0
- package/templates/.agent/skills/architecture/context-discovery.md +43 -0
- package/templates/.agent/skills/architecture/examples.md +94 -0
- package/templates/.agent/skills/architecture/pattern-selection.md +68 -0
- package/templates/.agent/skills/architecture/patterns-reference.md +50 -0
- package/templates/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/templates/.agent/skills/banner-design/SKILL.md +192 -0
- package/templates/.agent/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/templates/.agent/skills/bash-linux/SKILL.md +199 -0
- package/templates/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/templates/.agent/skills/brainstorming/SKILL.md +163 -0
- package/templates/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/templates/.agent/skills/brand/SKILL.md +97 -0
- package/templates/.agent/skills/brand/references/approval-checklist.md +169 -0
- package/templates/.agent/skills/brand/references/asset-organization.md +157 -0
- package/templates/.agent/skills/brand/references/brand-guideline-template.md +140 -0
- package/templates/.agent/skills/brand/references/color-palette-management.md +186 -0
- package/templates/.agent/skills/brand/references/consistency-checklist.md +94 -0
- package/templates/.agent/skills/brand/references/logo-usage-rules.md +185 -0
- package/templates/.agent/skills/brand/references/messaging-framework.md +85 -0
- package/templates/.agent/skills/brand/references/typography-specifications.md +214 -0
- package/templates/.agent/skills/brand/references/update.md +118 -0
- package/templates/.agent/skills/brand/references/visual-identity.md +96 -0
- package/templates/.agent/skills/brand/references/voice-framework.md +88 -0
- package/templates/.agent/skills/brand/scripts/extract-colors.cjs +341 -0
- package/templates/.agent/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/templates/.agent/skills/brand/scripts/sync-brand-to-tokens.cjs +266 -0
- package/templates/.agent/skills/brand/scripts/validate-asset.cjs +387 -0
- package/templates/.agent/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/templates/.agent/skills/clean-code/SKILL.md +201 -0
- package/templates/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/templates/.agent/skills/copywriting/SKILL.md +250 -0
- package/templates/.agent/skills/database-design/SKILL.md +52 -0
- package/templates/.agent/skills/database-design/database-selection.md +43 -0
- package/templates/.agent/skills/database-design/indexing.md +39 -0
- package/templates/.agent/skills/database-design/migrations.md +48 -0
- package/templates/.agent/skills/database-design/optimization.md +36 -0
- package/templates/.agent/skills/database-design/orm-selection.md +30 -0
- package/templates/.agent/skills/database-design/schema-design.md +56 -0
- package/templates/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/templates/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/templates/.agent/skills/docker-expert/SKILL.md +409 -0
- package/templates/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/templates/.agent/skills/frontend-design/color-system.md +311 -0
- package/templates/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/templates/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/templates/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/.agent/skills/frontend-design/typography-system.md +345 -0
- package/templates/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/templates/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/templates/.agent/skills/frontend-slides/SKILL.md +92 -0
- package/templates/.agent/skills/frontend-slides/STYLE_PRESETS.md +347 -0
- package/templates/.agent/skills/frontend-slides/animation-patterns.md +110 -0
- package/templates/.agent/skills/frontend-slides/examples/n8n-jupviec-automation.html +789 -0
- package/templates/.agent/skills/frontend-slides/examples/n8n-jupviec-automation.pptx +0 -0
- package/templates/.agent/skills/frontend-slides/html-template.md +347 -0
- package/templates/.agent/skills/frontend-slides/scripts/export-pptx.py +58 -0
- package/templates/.agent/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/templates/.agent/skills/frontend-slides/viewport-base.css +153 -0
- package/templates/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/templates/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/templates/.agent/skills/game-development/SKILL.md +167 -0
- package/templates/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/templates/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/templates/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/templates/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/templates/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/templates/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/templates/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/templates/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/templates/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/templates/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/.agent/skills/growth-engine/SKILL.md +244 -0
- package/templates/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/templates/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/.agent/skills/marketing-report-expert/SKILL.md +70 -0
- package/templates/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/templates/.agent/skills/minimax-docx/LICENSE +21 -0
- package/templates/.agent/skills/minimax-docx/SKILL.md +274 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_typography.md +357 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
- package/templates/.agent/skills/minimax-docx/references/comments_guide.md +191 -0
- package/templates/.agent/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
- package/templates/.agent/skills/minimax-docx/references/design_principles.md +819 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_element_order.md +308 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_namespaces.md +82 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_units.md +72 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_a_create.md +284 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
- package/templates/.agent/skills/minimax-docx/references/track_changes_guide.md +200 -0
- package/templates/.agent/skills/minimax-docx/references/troubleshooting.md +506 -0
- package/templates/.agent/skills/minimax-docx/references/typography_guide.md +294 -0
- package/templates/.agent/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
- package/templates/.agent/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
- package/templates/.agent/skills/minimax-docx/scripts/docx_preview.sh +37 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
- package/templates/.agent/skills/minimax-docx/scripts/env_check.sh +196 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.ps1 +274 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.sh +504 -0
- package/templates/.agent/skills/minimax-multimodal-toolkit/SKILL.md +359 -0
- package/templates/.agent/skills/minimax-pdf/README.md +222 -0
- package/templates/.agent/skills/minimax-pdf/SKILL.md +201 -0
- package/templates/.agent/skills/minimax-pdf/design/design.md +381 -0
- package/templates/.agent/skills/minimax-pdf/scripts/cover.py +1579 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_write.py +242 -0
- package/templates/.agent/skills/minimax-pdf/scripts/make.sh +491 -0
- package/templates/.agent/skills/minimax-pdf/scripts/merge.py +112 -0
- package/templates/.agent/skills/minimax-pdf/scripts/palette.py +559 -0
- package/templates/.agent/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_body.py +1055 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_cover.cjs +111 -0
- package/templates/.agent/skills/minimax-xlsx/SKILL.md +138 -0
- package/templates/.agent/skills/minimax-xlsx/references/create.md +691 -0
- package/templates/.agent/skills/minimax-xlsx/references/edit.md +684 -0
- package/templates/.agent/skills/minimax-xlsx/references/fix.md +37 -0
- package/templates/.agent/skills/minimax-xlsx/references/format.md +768 -0
- package/templates/.agent/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
- package/templates/.agent/skills/minimax-xlsx/references/read-analyze.md +97 -0
- package/templates/.agent/skills/minimax-xlsx/references/validate.md +772 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/formula_check.py +422 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/style_audit.py +575 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
- package/templates/.agent/skills/mobile-design/SKILL.md +394 -0
- package/templates/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/templates/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/templates/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/templates/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/templates/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/templates/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/templates/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/templates/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/templates/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/templates/.agent/skills/mobile-design/platform-android.md +666 -0
- package/templates/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/templates/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/templates/.agent/skills/nestjs-expert/SKILL.md +552 -0
- package/templates/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
- package/templates/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/templates/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/templates/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/.agent/skills/plan-writing/SKILL.md +152 -0
- package/templates/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/templates/.agent/skills/ppc-advertising/SKILL.md +183 -475
- package/templates/.agent/skills/pptx-generator/SKILL.md +249 -0
- package/templates/.agent/skills/pptx-generator/references/design-system.md +392 -0
- package/templates/.agent/skills/pptx-generator/references/editing.md +162 -0
- package/templates/.agent/skills/pptx-generator/references/pitfalls.md +112 -0
- package/templates/.agent/skills/pptx-generator/references/pptxgenjs.md +420 -0
- package/templates/.agent/skills/pptx-generator/references/slide-types.md +413 -0
- package/templates/.agent/skills/prisma-expert/SKILL.md +355 -0
- package/templates/.agent/skills/python-patterns/SKILL.md +441 -0
- package/templates/.agent/skills/react-patterns/SKILL.md +198 -0
- package/templates/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/templates/.agent/skills/remotion-best-practices/SKILL.md +45 -111
- package/templates/.agent/skills/remotion-best-practices/rules/3d.md +4 -4
- package/templates/.agent/skills/remotion-best-practices/rules/animations.md +5 -7
- package/templates/.agent/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
- package/templates/.agent/skills/remotion-best-practices/rules/assets.md +78 -0
- package/templates/.agent/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
- package/templates/.agent/skills/remotion-best-practices/rules/audio.md +1 -4
- package/templates/.agent/skills/remotion-best-practices/rules/calculate-metadata.md +47 -17
- package/templates/.agent/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/templates/.agent/skills/remotion-best-practices/rules/charts.md +80 -48
- package/templates/.agent/skills/remotion-best-practices/rules/compositions.md +22 -14
- package/templates/.agent/skills/remotion-best-practices/rules/display-captions.md +79 -21
- package/templates/.agent/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/templates/.agent/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
- package/templates/.agent/skills/remotion-best-practices/rules/fonts.md +96 -54
- package/templates/.agent/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/templates/.agent/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/templates/.agent/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
- package/templates/.agent/skills/remotion-best-practices/rules/gifs.md +21 -18
- package/templates/.agent/skills/remotion-best-practices/rules/images.md +6 -2
- package/templates/.agent/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/templates/.agent/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/templates/.agent/skills/remotion-best-practices/rules/lottie.md +10 -7
- package/templates/.agent/skills/remotion-best-practices/rules/maps.md +412 -0
- package/templates/.agent/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/templates/.agent/skills/remotion-best-practices/rules/measuring-text.md +140 -0
- package/templates/.agent/skills/remotion-best-practices/rules/parameters.md +109 -0
- package/templates/.agent/skills/remotion-best-practices/rules/sequencing.md +13 -1
- package/templates/.agent/skills/remotion-best-practices/rules/sfx.md +26 -0
- package/templates/.agent/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/templates/.agent/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/templates/.agent/skills/remotion-best-practices/rules/text-animations.md +4 -115
- package/templates/.agent/skills/remotion-best-practices/rules/timing.md +19 -19
- package/templates/.agent/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/templates/.agent/skills/remotion-best-practices/rules/transitions.md +117 -42
- package/templates/.agent/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/templates/.agent/skills/remotion-best-practices/rules/trimming.md +51 -0
- package/templates/.agent/skills/remotion-best-practices/rules/voiceover.md +99 -0
- package/templates/.agent/skills/seo-fundamentals/SKILL.md +83 -441
- package/templates/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/.agent/skills/server-management/SKILL.md +161 -0
- package/templates/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/templates/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/templates/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/.agent/skills/tutorial-video-expert/SKILL.md +88 -0
- package/templates/.agent/skills/typescript-expert/SKILL.md +429 -0
- package/templates/.agent/skills/ui-ux-pro-max/SKILL.md +1 -1
- package/templates/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/templates/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/templates/.agent/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/.agent/skills/vision-analysis/SKILL.md +174 -0
- package/templates/.agent/skills/vue-expert/SKILL.md +374 -0
- package/templates/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/templates/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/templates/.agent/workflows/analyze.md +3 -0
- package/templates/.agent/workflows/brainstorm.md +113 -0
- package/templates/.agent/workflows/brand-report.md +44 -0
- package/templates/.agent/workflows/create.md +59 -0
- package/templates/.agent/workflows/debug.md +103 -0
- package/templates/.agent/workflows/deploy.md +176 -0
- package/templates/.agent/workflows/enhance.md +63 -0
- package/templates/.agent/workflows/orchestrate.md +237 -0
- package/templates/.agent/workflows/plan.md +89 -0
- package/templates/.agent/workflows/preview.md +80 -0
- package/templates/.agent/workflows/report.md +49 -0
- package/templates/.agent/workflows/status.md +86 -0
- package/templates/.agent/workflows/test.md +144 -0
- package/templates/.agent/workflows/ui-ux-pro-max.md +231 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Editing Existing Presentations
|
|
2
|
+
|
|
3
|
+
## Template-Based Workflow
|
|
4
|
+
|
|
5
|
+
When using an existing presentation as a template:
|
|
6
|
+
|
|
7
|
+
1. **Copy and analyze**:
|
|
8
|
+
```bash
|
|
9
|
+
cp /path/to/user-provided.pptx template.pptx
|
|
10
|
+
python -m markitdown template.pptx > template.md
|
|
11
|
+
```
|
|
12
|
+
Review `template.md` to see placeholder text and slide structure.
|
|
13
|
+
|
|
14
|
+
2. **Plan slide mapping**: For each content section, choose a template slide.
|
|
15
|
+
|
|
16
|
+
**USE VARIED LAYOUTS** — monotonous presentations are a common failure mode. Don't default to basic title + bullet slides. Actively seek out:
|
|
17
|
+
- Multi-column layouts (2-column, 3-column)
|
|
18
|
+
- Image + text combinations
|
|
19
|
+
- Full-bleed images with text overlay
|
|
20
|
+
- Quote or callout slides
|
|
21
|
+
- Section dividers
|
|
22
|
+
- Stat/number callouts
|
|
23
|
+
- Icon grids or icon + text rows
|
|
24
|
+
|
|
25
|
+
**Avoid:** Repeating the same text-heavy layout for every slide.
|
|
26
|
+
|
|
27
|
+
Match content type to layout style (e.g., key points -> bullet slide, team info -> multi-column, testimonials -> quote slide).
|
|
28
|
+
|
|
29
|
+
3. **Unpack**: Extract the PPTX into an editable XML tree using Python's `zipfile` module. Pretty-print the XML for readability.
|
|
30
|
+
|
|
31
|
+
4. **Build presentation** (do this yourself, not with subagents):
|
|
32
|
+
- Delete unwanted slides (remove from `<p:sldIdLst>`)
|
|
33
|
+
- Duplicate slides you want to reuse (copy slide XML, relationships, and update `Content_Types.xml` and `presentation.xml`)
|
|
34
|
+
- Reorder slides in `<p:sldIdLst>`
|
|
35
|
+
- **Complete all structural changes before step 5**
|
|
36
|
+
|
|
37
|
+
5. **Edit content**: Update text in each `slide{N}.xml`.
|
|
38
|
+
**Use subagents here if available** — slides are separate XML files, so subagents can edit in parallel.
|
|
39
|
+
|
|
40
|
+
6. **Clean**: Remove orphaned files — slides not in `<p:sldIdLst>`, unreferenced media, orphaned rels.
|
|
41
|
+
|
|
42
|
+
7. **Pack**: Repack the XML tree into a PPTX file. Validate, repair, condense XML, re-encode smart quotes.
|
|
43
|
+
|
|
44
|
+
Always write to `/tmp/` first, then copy to the final path. Python's `zipfile` module uses `seek` internally, which fails on some volume mounts (e.g. Docker bind mounts). Writing to a local temp path avoids this.
|
|
45
|
+
|
|
46
|
+
## Output Structure
|
|
47
|
+
|
|
48
|
+
Copy the user-provided file to `template.pptx` in cwd. This preserves the original and gives a predictable name for all downstream operations.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cp /path/to/user-provided.pptx template.pptx
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
./
|
|
56
|
+
├── template.pptx # Copy of user-provided file (never modified)
|
|
57
|
+
├── template.md # markitdown extraction
|
|
58
|
+
├── unpacked/ # Editable XML tree
|
|
59
|
+
└── edited.pptx # Final repacked deck
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Minimum expected deliverable: `edited.pptx`.
|
|
63
|
+
|
|
64
|
+
## Slide Operations
|
|
65
|
+
|
|
66
|
+
Slide order is in `ppt/presentation.xml` -> `<p:sldIdLst>`.
|
|
67
|
+
|
|
68
|
+
**Reorder**: Rearrange `<p:sldId>` elements.
|
|
69
|
+
|
|
70
|
+
**Delete**: Remove `<p:sldId>`, then clean orphaned files.
|
|
71
|
+
|
|
72
|
+
**Add**: Copy the source slide's XML file, its `.rels` file, and update `Content_Types.xml` and `presentation.xml`. Never manually copy slide files without updating all references — this causes broken notes references and missing relationship IDs.
|
|
73
|
+
|
|
74
|
+
## Editing Content
|
|
75
|
+
|
|
76
|
+
**Subagents:** If available, use them here (after completing step 4). Each slide is a separate XML file, so subagents can edit in parallel. In your prompt to subagents, include:
|
|
77
|
+
- The slide file path(s) to edit
|
|
78
|
+
- **"Use the Edit tool for all changes"**
|
|
79
|
+
- The formatting rules and common pitfalls below
|
|
80
|
+
|
|
81
|
+
For each slide:
|
|
82
|
+
1. Read the slide's XML
|
|
83
|
+
2. Identify ALL placeholder content — text, images, charts, icons, captions
|
|
84
|
+
3. Replace each placeholder with final content
|
|
85
|
+
|
|
86
|
+
**Use the Edit tool, not sed or Python scripts.** The Edit tool forces specificity about what to replace and where, yielding better reliability.
|
|
87
|
+
|
|
88
|
+
## Formatting Rules
|
|
89
|
+
|
|
90
|
+
- **Bold all headers, subheadings, and inline labels**: Use `b="1"` on `<a:rPr>`. This includes:
|
|
91
|
+
- Slide titles
|
|
92
|
+
- Section headers within a slide
|
|
93
|
+
- Inline labels like (e.g.: "Status:", "Description:") at the start of a line
|
|
94
|
+
- **Never use unicode bullets**: Use proper list formatting with `<a:buChar>` or `<a:buAutoNum>`
|
|
95
|
+
- **Bullet consistency**: Let bullets inherit from the layout. Only specify `<a:buChar>` or `<a:buNone>`.
|
|
96
|
+
|
|
97
|
+
## Common Pitfalls — Template Editing
|
|
98
|
+
|
|
99
|
+
### Template Adaptation
|
|
100
|
+
|
|
101
|
+
When source content has fewer items than the template:
|
|
102
|
+
- **Remove excess elements entirely** (images, shapes, text boxes), don't just clear text
|
|
103
|
+
- Check for orphaned visuals after clearing text content
|
|
104
|
+
- Run content QA with `markitdown` to catch mismatched counts
|
|
105
|
+
|
|
106
|
+
When replacing text with different length content:
|
|
107
|
+
- **Shorter replacements**: Usually safe
|
|
108
|
+
- **Longer replacements**: May overflow or wrap unexpectedly
|
|
109
|
+
- Verify with `markitdown` after text changes
|
|
110
|
+
- Consider truncating or splitting content to fit the template's design constraints
|
|
111
|
+
|
|
112
|
+
**Template slots != Source items**: If template has 4 team members but source has 3 users, delete the 4th member's entire group (image + text boxes), not just the text.
|
|
113
|
+
|
|
114
|
+
### Multi-Item Content
|
|
115
|
+
|
|
116
|
+
If source has multiple items (numbered lists, multiple sections), create separate `<a:p>` elements for each — **never concatenate into one string**.
|
|
117
|
+
|
|
118
|
+
**WRONG** — all items in one paragraph:
|
|
119
|
+
```xml
|
|
120
|
+
<a:p>
|
|
121
|
+
<a:r><a:rPr .../><a:t>Step 1: Do the first thing. Step 2: Do the second thing.</a:t></a:r>
|
|
122
|
+
</a:p>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**CORRECT** — separate paragraphs with bold headers:
|
|
126
|
+
```xml
|
|
127
|
+
<a:p>
|
|
128
|
+
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
|
|
129
|
+
<a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 1</a:t></a:r>
|
|
130
|
+
</a:p>
|
|
131
|
+
<a:p>
|
|
132
|
+
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
|
|
133
|
+
<a:r><a:rPr lang="en-US" sz="2799" .../><a:t>Do the first thing.</a:t></a:r>
|
|
134
|
+
</a:p>
|
|
135
|
+
<a:p>
|
|
136
|
+
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
|
|
137
|
+
<a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 2</a:t></a:r>
|
|
138
|
+
</a:p>
|
|
139
|
+
<!-- continue pattern -->
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Copy `<a:pPr>` from the original paragraph to preserve line spacing. Use `b="1"` on headers.
|
|
143
|
+
|
|
144
|
+
### Smart Quotes
|
|
145
|
+
|
|
146
|
+
The Edit tool converts smart quotes to ASCII. **When adding new text with quotes, use XML entities:**
|
|
147
|
+
|
|
148
|
+
```xml
|
|
149
|
+
<a:t>the “Agreement”</a:t>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
| Character | Name | Unicode | XML Entity |
|
|
153
|
+
|-----------|------|---------|------------|
|
|
154
|
+
| \u201c | Left double quote | U+201C | `“` |
|
|
155
|
+
| \u201d | Right double quote | U+201D | `”` |
|
|
156
|
+
| \u2018 | Left single quote | U+2018 | `‘` |
|
|
157
|
+
| \u2019 | Right single quote | U+2019 | `’` |
|
|
158
|
+
|
|
159
|
+
### Other
|
|
160
|
+
|
|
161
|
+
- **Whitespace**: Use `xml:space="preserve"` on `<a:t>` with leading/trailing spaces
|
|
162
|
+
- **XML parsing**: Use `defusedxml.minidom`, not `xml.etree.ElementTree` (corrupts namespaces)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# QA Process & Common Pitfalls
|
|
2
|
+
|
|
3
|
+
## QA Process
|
|
4
|
+
|
|
5
|
+
**Assume there are problems. Your job is to find them.**
|
|
6
|
+
|
|
7
|
+
Your first render is almost never correct. Approach QA as a bug hunt, not a confirmation step. If you found zero issues on first inspection, you weren't looking hard enough.
|
|
8
|
+
|
|
9
|
+
### Content QA
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python -m markitdown output.pptx
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Check for missing content, typos, wrong order.
|
|
16
|
+
|
|
17
|
+
**Check for leftover placeholder text:**
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m markitdown output.pptx | grep -iE "xxxx|lorem|ipsum|placeholder|this.*(page|slide).*layout"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If grep returns results, fix them before declaring success.
|
|
24
|
+
|
|
25
|
+
### Verification Loop
|
|
26
|
+
|
|
27
|
+
1. Generate slides -> Extract text with `python -m markitdown output.pptx` -> Review content
|
|
28
|
+
2. **List issues found** (if none found, look again more critically)
|
|
29
|
+
3. Fix issues
|
|
30
|
+
4. **Re-verify affected slides** — one fix often creates another problem
|
|
31
|
+
5. Repeat until a full pass reveals no new issues
|
|
32
|
+
|
|
33
|
+
**Do not declare success until you've completed at least one fix-and-verify cycle.**
|
|
34
|
+
|
|
35
|
+
### Per-Slide QA (for from-scratch creation)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
python -m markitdown slide-XX-preview.pptx
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Check for missing content, placeholder text, missing page number badge.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Common Mistakes to Avoid
|
|
46
|
+
|
|
47
|
+
- **Don't repeat the same layout** — vary columns, cards, and callouts across slides
|
|
48
|
+
- **Don't center body text** — left-align paragraphs and lists; center only titles
|
|
49
|
+
- **Don't skimp on size contrast** — titles need 36pt+ to stand out from 14-16pt body
|
|
50
|
+
- **Don't default to blue** — pick colors that reflect the specific topic
|
|
51
|
+
- **Don't mix spacing randomly** — choose 0.3" or 0.5" gaps and use consistently
|
|
52
|
+
- **Don't style one slide and leave the rest plain** — commit fully or keep it simple throughout
|
|
53
|
+
- **Don't create text-only slides** — add images, icons, charts, or visual elements; avoid plain title + bullets
|
|
54
|
+
- **Don't forget text box padding** — when aligning lines or shapes with text edges, set `margin: 0` on the text box or offset the shape to account for padding
|
|
55
|
+
- **Don't use low-contrast elements** — icons AND text need strong contrast against the background
|
|
56
|
+
- **NEVER use accent lines under titles** — these are a hallmark of AI-generated slides; use whitespace or background color instead
|
|
57
|
+
- **NEVER use "#" with hex colors** — causes file corruption in PptxGenJS
|
|
58
|
+
- **NEVER encode opacity in hex strings** — use the `opacity` property instead
|
|
59
|
+
- **NEVER use async/await in createSlide()** — compile.js won't await
|
|
60
|
+
- **NEVER reuse option objects across PptxGenJS calls** — PptxGenJS mutates objects in-place
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Critical Pitfalls — PptxGenJS
|
|
65
|
+
|
|
66
|
+
### NEVER use async/await in createSlide()
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
// WRONG - compile.js won't await
|
|
70
|
+
async function createSlide(pres, theme) { ... }
|
|
71
|
+
|
|
72
|
+
// CORRECT
|
|
73
|
+
function createSlide(pres, theme) { ... }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### NEVER use "#" with hex colors
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
color: "FF0000" // CORRECT
|
|
80
|
+
color: "#FF0000" // CORRUPTS FILE
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### NEVER encode opacity in hex strings
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
shadow: { color: "00000020" } // CORRUPTS FILE
|
|
87
|
+
shadow: { color: "000000", opacity: 0.12 } // CORRECT
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Prevent text wrapping in titles
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
// Use fit:'shrink' for long titles
|
|
94
|
+
slide.addText("Long Title Here", {
|
|
95
|
+
x: 0.5, y: 2, w: 9, h: 1,
|
|
96
|
+
fontSize: 48, fit: "shrink"
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### NEVER reuse option objects across calls
|
|
101
|
+
|
|
102
|
+
```javascript
|
|
103
|
+
// WRONG
|
|
104
|
+
const shadow = { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 };
|
|
105
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow, ... });
|
|
106
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow, ... });
|
|
107
|
+
|
|
108
|
+
// CORRECT - factory function
|
|
109
|
+
const makeShadow = () => ({ type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 });
|
|
110
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... });
|
|
111
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... });
|
|
112
|
+
```
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# PptxGenJS Tutorial
|
|
2
|
+
|
|
3
|
+
## Setup & Basic Structure
|
|
4
|
+
|
|
5
|
+
```javascript
|
|
6
|
+
const pptxgen = require("pptxgenjs");
|
|
7
|
+
|
|
8
|
+
let pres = new pptxgen();
|
|
9
|
+
pres.layout = 'LAYOUT_16x9'; // or 'LAYOUT_16x10', 'LAYOUT_4x3', 'LAYOUT_WIDE'
|
|
10
|
+
pres.author = 'Your Name';
|
|
11
|
+
pres.title = 'Presentation Title';
|
|
12
|
+
|
|
13
|
+
let slide = pres.addSlide();
|
|
14
|
+
slide.addText("Hello World!", { x: 0.5, y: 0.5, fontSize: 36, color: "363636" });
|
|
15
|
+
|
|
16
|
+
pres.writeFile({ fileName: "Presentation.pptx" });
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Layout Dimensions
|
|
20
|
+
|
|
21
|
+
Slide dimensions (coordinates in inches):
|
|
22
|
+
- `LAYOUT_16x9`: 10" x 5.625" (default)
|
|
23
|
+
- `LAYOUT_16x10`: 10" x 6.25"
|
|
24
|
+
- `LAYOUT_4x3`: 10" x 7.5"
|
|
25
|
+
- `LAYOUT_WIDE`: 13.3" x 7.5"
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Text & Formatting
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
// Basic text
|
|
33
|
+
slide.addText("Simple Text", {
|
|
34
|
+
x: 1, y: 1, w: 8, h: 2, fontSize: 24, fontFace: "Arial",
|
|
35
|
+
color: "363636", bold: true, align: "center", valign: "middle"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Character spacing (use charSpacing, not letterSpacing which is silently ignored)
|
|
39
|
+
slide.addText("SPACED TEXT", { x: 1, y: 1, w: 8, h: 1, charSpacing: 6 });
|
|
40
|
+
|
|
41
|
+
// Rich text arrays
|
|
42
|
+
slide.addText([
|
|
43
|
+
{ text: "Bold ", options: { bold: true } },
|
|
44
|
+
{ text: "Italic ", options: { italic: true } }
|
|
45
|
+
], { x: 1, y: 3, w: 8, h: 1 });
|
|
46
|
+
|
|
47
|
+
// Multi-line text (requires breakLine: true)
|
|
48
|
+
slide.addText([
|
|
49
|
+
{ text: "Line 1", options: { breakLine: true } },
|
|
50
|
+
{ text: "Line 2", options: { breakLine: true } },
|
|
51
|
+
{ text: "Line 3" } // Last item doesn't need breakLine
|
|
52
|
+
], { x: 0.5, y: 0.5, w: 8, h: 2 });
|
|
53
|
+
|
|
54
|
+
// Text box margin (internal padding)
|
|
55
|
+
slide.addText("Title", {
|
|
56
|
+
x: 0.5, y: 0.3, w: 9, h: 0.6,
|
|
57
|
+
margin: 0 // Use 0 when aligning text with other elements like shapes or icons
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Tip:** Text boxes have internal margin by default. Set `margin: 0` when you need text to align precisely with shapes, lines, or icons at the same x-position.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Lists & Bullets
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
// CORRECT: Multiple bullets
|
|
69
|
+
slide.addText([
|
|
70
|
+
{ text: "First item", options: { bullet: true, breakLine: true } },
|
|
71
|
+
{ text: "Second item", options: { bullet: true, breakLine: true } },
|
|
72
|
+
{ text: "Third item", options: { bullet: true } }
|
|
73
|
+
], { x: 0.5, y: 0.5, w: 8, h: 3 });
|
|
74
|
+
|
|
75
|
+
// WRONG: Never use unicode bullets
|
|
76
|
+
slide.addText("* First item", { ... }); // Creates double bullets
|
|
77
|
+
|
|
78
|
+
// Sub-items and numbered lists
|
|
79
|
+
{ text: "Sub-item", options: { bullet: true, indentLevel: 1 } }
|
|
80
|
+
{ text: "First", options: { bullet: { type: "number" }, breakLine: true } }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Shapes
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
slide.addShape(pres.shapes.RECTANGLE, {
|
|
89
|
+
x: 0.5, y: 0.8, w: 1.5, h: 3.0,
|
|
90
|
+
fill: { color: "FF0000" }, line: { color: "000000", width: 2 }
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
slide.addShape(pres.shapes.OVAL, { x: 4, y: 1, w: 2, h: 2, fill: { color: "0000FF" } });
|
|
94
|
+
|
|
95
|
+
slide.addShape(pres.shapes.LINE, {
|
|
96
|
+
x: 1, y: 3, w: 5, h: 0, line: { color: "FF0000", width: 3, dashType: "dash" }
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// With transparency
|
|
100
|
+
slide.addShape(pres.shapes.RECTANGLE, {
|
|
101
|
+
x: 1, y: 1, w: 3, h: 2,
|
|
102
|
+
fill: { color: "0088CC", transparency: 50 }
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Rounded rectangle (rectRadius only works with ROUNDED_RECTANGLE, not RECTANGLE)
|
|
106
|
+
// Don't pair with rectangular accent overlays -- they won't cover rounded corners. Use RECTANGLE instead.
|
|
107
|
+
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
|
|
108
|
+
x: 1, y: 1, w: 3, h: 2,
|
|
109
|
+
fill: { color: "FFFFFF" }, rectRadius: 0.1
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// With shadow
|
|
113
|
+
slide.addShape(pres.shapes.RECTANGLE, {
|
|
114
|
+
x: 1, y: 1, w: 3, h: 2,
|
|
115
|
+
fill: { color: "FFFFFF" },
|
|
116
|
+
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.15 }
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Shadow options:
|
|
121
|
+
|
|
122
|
+
| Property | Type | Range | Notes |
|
|
123
|
+
|----------|------|-------|-------|
|
|
124
|
+
| `type` | string | `"outer"`, `"inner"` | |
|
|
125
|
+
| `color` | string | 6-char hex (e.g. `"000000"`) | No `#` prefix, no 8-char hex -- see Common Pitfalls |
|
|
126
|
+
| `blur` | number | 0-100 pt | |
|
|
127
|
+
| `offset` | number | 0-200 pt | **Must be non-negative** -- negative values corrupt the file |
|
|
128
|
+
| `angle` | number | 0-359 degrees | Direction the shadow falls (135 = bottom-right, 270 = upward) |
|
|
129
|
+
| `opacity` | number | 0.0-1.0 | Use this for transparency, never encode in color string |
|
|
130
|
+
|
|
131
|
+
To cast a shadow upward (e.g. on a footer bar), use `angle: 270` with a positive offset -- do **not** use a negative offset.
|
|
132
|
+
|
|
133
|
+
**Note**: Gradient fills are not natively supported. Use a gradient image as a background instead.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Images
|
|
138
|
+
|
|
139
|
+
### Image Sources
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
// From file path
|
|
143
|
+
slide.addImage({ path: "images/chart.png", x: 1, y: 1, w: 5, h: 3 });
|
|
144
|
+
|
|
145
|
+
// From URL
|
|
146
|
+
slide.addImage({ path: "https://example.com/image.jpg", x: 1, y: 1, w: 5, h: 3 });
|
|
147
|
+
|
|
148
|
+
// From base64 (faster, no file I/O)
|
|
149
|
+
slide.addImage({ data: "image/png;base64,iVBORw0KGgo...", x: 1, y: 1, w: 5, h: 3 });
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Image Options
|
|
153
|
+
|
|
154
|
+
```javascript
|
|
155
|
+
slide.addImage({
|
|
156
|
+
path: "image.png",
|
|
157
|
+
x: 1, y: 1, w: 5, h: 3,
|
|
158
|
+
rotate: 45, // 0-359 degrees
|
|
159
|
+
rounding: true, // Circular crop
|
|
160
|
+
transparency: 50, // 0-100
|
|
161
|
+
flipH: true, // Horizontal flip
|
|
162
|
+
flipV: false, // Vertical flip
|
|
163
|
+
altText: "Description", // Accessibility
|
|
164
|
+
hyperlink: { url: "https://example.com" }
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Image Sizing Modes
|
|
169
|
+
|
|
170
|
+
```javascript
|
|
171
|
+
// Contain - fit inside, preserve ratio
|
|
172
|
+
{ sizing: { type: 'contain', w: 4, h: 3 } }
|
|
173
|
+
|
|
174
|
+
// Cover - fill area, preserve ratio (may crop)
|
|
175
|
+
{ sizing: { type: 'cover', w: 4, h: 3 } }
|
|
176
|
+
|
|
177
|
+
// Crop - cut specific portion
|
|
178
|
+
{ sizing: { type: 'crop', x: 0.5, y: 0.5, w: 2, h: 2 } }
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Calculate Dimensions (preserve aspect ratio)
|
|
182
|
+
|
|
183
|
+
```javascript
|
|
184
|
+
const origWidth = 1978, origHeight = 923, maxHeight = 3.0;
|
|
185
|
+
const calcWidth = maxHeight * (origWidth / origHeight);
|
|
186
|
+
const centerX = (10 - calcWidth) / 2;
|
|
187
|
+
|
|
188
|
+
slide.addImage({ path: "image.png", x: centerX, y: 1.2, w: calcWidth, h: maxHeight });
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Supported Formats
|
|
192
|
+
|
|
193
|
+
- **Standard**: PNG, JPG, GIF (animated GIFs work in Microsoft 365)
|
|
194
|
+
- **SVG**: Works in modern PowerPoint/Microsoft 365
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Icons
|
|
199
|
+
|
|
200
|
+
Use react-icons to generate SVG icons, then rasterize to PNG for universal compatibility.
|
|
201
|
+
|
|
202
|
+
### Setup
|
|
203
|
+
|
|
204
|
+
```javascript
|
|
205
|
+
const React = require("react");
|
|
206
|
+
const ReactDOMServer = require("react-dom/server");
|
|
207
|
+
const sharp = require("sharp");
|
|
208
|
+
const { FaCheckCircle, FaChartLine } = require("react-icons/fa");
|
|
209
|
+
|
|
210
|
+
function renderIconSvg(IconComponent, color = "#000000", size = 256) {
|
|
211
|
+
return ReactDOMServer.renderToStaticMarkup(
|
|
212
|
+
React.createElement(IconComponent, { color, size: String(size) })
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
async function iconToBase64Png(IconComponent, color, size = 256) {
|
|
217
|
+
const svg = renderIconSvg(IconComponent, color, size);
|
|
218
|
+
const pngBuffer = await sharp(Buffer.from(svg)).png().toBuffer();
|
|
219
|
+
return "image/png;base64," + pngBuffer.toString("base64");
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Add Icon to Slide
|
|
224
|
+
|
|
225
|
+
```javascript
|
|
226
|
+
const iconData = await iconToBase64Png(FaCheckCircle, "#4472C4", 256);
|
|
227
|
+
|
|
228
|
+
slide.addImage({
|
|
229
|
+
data: iconData,
|
|
230
|
+
x: 1, y: 1, w: 0.5, h: 0.5 // Size in inches
|
|
231
|
+
});
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Note**: Use size 256 or higher for crisp icons. The size parameter controls the rasterization resolution, not the display size on the slide (which is set by `w` and `h` in inches).
|
|
235
|
+
|
|
236
|
+
### Icon Libraries
|
|
237
|
+
|
|
238
|
+
Install: `npm install -g react-icons react react-dom sharp`
|
|
239
|
+
|
|
240
|
+
Popular icon sets in react-icons:
|
|
241
|
+
- `react-icons/fa` - Font Awesome
|
|
242
|
+
- `react-icons/md` - Material Design
|
|
243
|
+
- `react-icons/hi` - Heroicons
|
|
244
|
+
- `react-icons/bi` - Bootstrap Icons
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Slide Backgrounds
|
|
249
|
+
|
|
250
|
+
```javascript
|
|
251
|
+
// Solid color
|
|
252
|
+
slide.background = { color: "F1F1F1" };
|
|
253
|
+
|
|
254
|
+
// Color with transparency
|
|
255
|
+
slide.background = { color: "FF3399", transparency: 50 };
|
|
256
|
+
|
|
257
|
+
// Image from URL
|
|
258
|
+
slide.background = { path: "https://example.com/bg.jpg" };
|
|
259
|
+
|
|
260
|
+
// Image from base64
|
|
261
|
+
slide.background = { data: "image/png;base64,iVBORw0KGgo..." };
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Tables
|
|
267
|
+
|
|
268
|
+
```javascript
|
|
269
|
+
slide.addTable([
|
|
270
|
+
["Header 1", "Header 2"],
|
|
271
|
+
["Cell 1", "Cell 2"]
|
|
272
|
+
], {
|
|
273
|
+
x: 1, y: 1, w: 8, h: 2,
|
|
274
|
+
border: { pt: 1, color: "999999" }, fill: { color: "F1F1F1" }
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// Advanced with merged cells
|
|
278
|
+
let tableData = [
|
|
279
|
+
[{ text: "Header", options: { fill: { color: "6699CC" }, color: "FFFFFF", bold: true } }, "Cell"],
|
|
280
|
+
[{ text: "Merged", options: { colspan: 2 } }]
|
|
281
|
+
];
|
|
282
|
+
slide.addTable(tableData, { x: 1, y: 3.5, w: 8, colW: [4, 4] });
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Charts
|
|
288
|
+
|
|
289
|
+
```javascript
|
|
290
|
+
// Bar chart
|
|
291
|
+
slide.addChart(pres.charts.BAR, [{
|
|
292
|
+
name: "Sales", labels: ["Q1", "Q2", "Q3", "Q4"], values: [4500, 5500, 6200, 7100]
|
|
293
|
+
}], {
|
|
294
|
+
x: 0.5, y: 0.6, w: 6, h: 3, barDir: 'col',
|
|
295
|
+
showTitle: true, title: 'Quarterly Sales'
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// Line chart
|
|
299
|
+
slide.addChart(pres.charts.LINE, [{
|
|
300
|
+
name: "Temp", labels: ["Jan", "Feb", "Mar"], values: [32, 35, 42]
|
|
301
|
+
}], { x: 0.5, y: 4, w: 6, h: 3, lineSize: 3, lineSmooth: true });
|
|
302
|
+
|
|
303
|
+
// Pie chart
|
|
304
|
+
slide.addChart(pres.charts.PIE, [{
|
|
305
|
+
name: "Share", labels: ["A", "B", "Other"], values: [35, 45, 20]
|
|
306
|
+
}], { x: 7, y: 1, w: 5, h: 4, showPercent: true });
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Better-Looking Charts
|
|
310
|
+
|
|
311
|
+
Default charts look dated. Apply these options for a modern, clean appearance:
|
|
312
|
+
|
|
313
|
+
```javascript
|
|
314
|
+
slide.addChart(pres.charts.BAR, chartData, {
|
|
315
|
+
x: 0.5, y: 1, w: 9, h: 4, barDir: "col",
|
|
316
|
+
|
|
317
|
+
// Custom colors (match your presentation palette)
|
|
318
|
+
chartColors: ["0D9488", "14B8A6", "5EEAD4"],
|
|
319
|
+
|
|
320
|
+
// Clean background
|
|
321
|
+
chartArea: { fill: { color: "FFFFFF" }, roundedCorners: true },
|
|
322
|
+
|
|
323
|
+
// Muted axis labels
|
|
324
|
+
catAxisLabelColor: "64748B",
|
|
325
|
+
valAxisLabelColor: "64748B",
|
|
326
|
+
|
|
327
|
+
// Subtle grid (value axis only)
|
|
328
|
+
valGridLine: { color: "E2E8F0", size: 0.5 },
|
|
329
|
+
catGridLine: { style: "none" },
|
|
330
|
+
|
|
331
|
+
// Data labels on bars
|
|
332
|
+
showValue: true,
|
|
333
|
+
dataLabelPosition: "outEnd",
|
|
334
|
+
dataLabelColor: "1E293B",
|
|
335
|
+
|
|
336
|
+
// Hide legend for single series
|
|
337
|
+
showLegend: false,
|
|
338
|
+
});
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**Key styling options:**
|
|
342
|
+
- `chartColors: [...]` - hex colors for series/segments
|
|
343
|
+
- `chartArea: { fill, border, roundedCorners }` - chart background
|
|
344
|
+
- `catGridLine/valGridLine: { color, style, size }` - grid lines (`style: "none"` to hide)
|
|
345
|
+
- `lineSmooth: true` - curved lines (line charts)
|
|
346
|
+
- `legendPos: "r"` - legend position: "b", "t", "l", "r", "tr"
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Slide Masters
|
|
351
|
+
|
|
352
|
+
```javascript
|
|
353
|
+
pres.defineSlideMaster({
|
|
354
|
+
title: 'TITLE_SLIDE', background: { color: '283A5E' },
|
|
355
|
+
objects: [{
|
|
356
|
+
placeholder: { options: { name: 'title', type: 'title', x: 1, y: 2, w: 8, h: 2 } }
|
|
357
|
+
}]
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
let titleSlide = pres.addSlide({ masterName: "TITLE_SLIDE" });
|
|
361
|
+
titleSlide.addText("My Title", { placeholder: "title" });
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Common Pitfalls
|
|
367
|
+
|
|
368
|
+
These issues cause file corruption, visual bugs, or broken output. Avoid them.
|
|
369
|
+
|
|
370
|
+
1. **NEVER use "#" with hex colors** - causes file corruption
|
|
371
|
+
```javascript
|
|
372
|
+
color: "FF0000" // CORRECT
|
|
373
|
+
color: "#FF0000" // WRONG
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
2. **NEVER encode opacity in hex color strings** - 8-char colors (e.g., `"00000020"`) corrupt the file. Use the `opacity` property instead.
|
|
377
|
+
```javascript
|
|
378
|
+
shadow: { type: "outer", blur: 6, offset: 2, color: "00000020" } // CORRUPTS FILE
|
|
379
|
+
shadow: { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.12 } // CORRECT
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
3. **Use `bullet: true`** - NEVER unicode symbols like "o" (creates double bullets)
|
|
383
|
+
|
|
384
|
+
4. **Use `breakLine: true`** between array items or text runs together
|
|
385
|
+
|
|
386
|
+
5. **Avoid `lineSpacing` with bullets** - causes excessive gaps; use `paraSpaceAfter` instead
|
|
387
|
+
|
|
388
|
+
6. **Each presentation needs fresh instance** - don't reuse `pptxgen()` objects
|
|
389
|
+
|
|
390
|
+
7. **NEVER reuse option objects across calls** - PptxGenJS mutates objects in-place (e.g. converting shadow values to EMU). Sharing one object between multiple calls corrupts the second shape.
|
|
391
|
+
```javascript
|
|
392
|
+
const shadow = { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 };
|
|
393
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow, ... }); // second call gets already-converted values
|
|
394
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow, ... });
|
|
395
|
+
|
|
396
|
+
const makeShadow = () => ({ type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.15 });
|
|
397
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... }); // fresh object each time
|
|
398
|
+
slide.addShape(pres.shapes.RECTANGLE, { shadow: makeShadow(), ... });
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
8. **Don't use `ROUNDED_RECTANGLE` with accent borders** - rectangular overlay bars won't cover rounded corners. Use `RECTANGLE` instead.
|
|
402
|
+
```javascript
|
|
403
|
+
// WRONG: Accent bar doesn't cover rounded corners
|
|
404
|
+
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 1, y: 1, w: 3, h: 1.5, fill: { color: "FFFFFF" } });
|
|
405
|
+
slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 0.08, h: 1.5, fill: { color: "0891B2" } });
|
|
406
|
+
|
|
407
|
+
// CORRECT: Use RECTANGLE for clean alignment
|
|
408
|
+
slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 3, h: 1.5, fill: { color: "FFFFFF" } });
|
|
409
|
+
slide.addShape(pres.shapes.RECTANGLE, { x: 1, y: 1, w: 0.08, h: 1.5, fill: { color: "0891B2" } });
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Quick Reference
|
|
415
|
+
|
|
416
|
+
- **Shapes**: RECTANGLE, OVAL, LINE, ROUNDED_RECTANGLE
|
|
417
|
+
- **Charts**: BAR, LINE, PIE, DOUGHNUT, SCATTER, BUBBLE, RADAR
|
|
418
|
+
- **Layouts**: LAYOUT_16x9 (10"x5.625"), LAYOUT_16x10, LAYOUT_4x3, LAYOUT_WIDE
|
|
419
|
+
- **Alignment**: "left", "center", "right"
|
|
420
|
+
- **Chart data labels**: "outEnd", "inEnd", "center"
|