popost 0.0.0-stage → 4.6.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/LICENSE +12 -0
- package/README.md +35 -2
- package/SKILL.md +147 -0
- package/THIRD_PARTY_NOTICES +11 -0
- package/agents/openai.yaml +4 -0
- package/assets/canvas/THIRD_PARTY_LICENSES.txt +1339 -0
- package/assets/canvas/assets/dist-Ag5yM9-G.js +12 -0
- package/assets/canvas/assets/es-C_Ha8SM2.js +2 -0
- package/assets/canvas/assets/es-DzkTYs_E.js +38 -0
- package/assets/canvas/assets/index-DS6BKqT0.css +1 -0
- package/assets/canvas/assets/index-DjfLTPyx.js +72 -0
- package/assets/canvas/assets/jszip.min-Cw2BF2G0.js +2 -0
- package/assets/canvas/build-info.json +14 -0
- package/assets/canvas/index.html +13 -0
- package/assets/fonts/NOTICE.txt +168 -0
- package/assets/fonts/cjk-brush/LICENSE +93 -0
- package/assets/fonts/cjk-calligraphy/LICENSE +93 -0
- package/assets/fonts/cjk-cursive/LICENSE +93 -0
- package/assets/fonts/cjk-display/LICENSE +93 -0
- package/assets/fonts/cjk-rounded/LICENSE +93 -0
- package/assets/fonts/cjk-sans/LICENSE +93 -0
- package/assets/fonts/cjk-sans-tc/LICENSE +93 -0
- package/assets/fonts/cjk-serif/LICENSE +93 -0
- package/assets/fonts/cjk-serif-tc/LICENSE +93 -0
- package/assets/fonts/cjk-title/LICENSE +93 -0
- package/assets/fonts/cjk-wenkai/LICENSE +94 -0
- package/assets/fonts/cjk-wenkai-tc/LICENSE +93 -0
- package/assets/fonts/clean-sans/LICENSE +93 -0
- package/assets/fonts/condensed-sans/LICENSE +93 -0
- package/assets/fonts/css/cjk-brush.css +919 -0
- package/assets/fonts/css/cjk-calligraphy.css +737 -0
- package/assets/fonts/css/cjk-cursive.css +919 -0
- package/assets/fonts/css/cjk-display.css +737 -0
- package/assets/fonts/css/cjk-rounded.css +929 -0
- package/assets/fonts/css/cjk-sans-tc.css +1079 -0
- package/assets/fonts/css/cjk-sans.css +809 -0
- package/assets/fonts/css/cjk-serif-tc.css +1079 -0
- package/assets/fonts/css/cjk-serif.css +809 -0
- package/assets/fonts/css/cjk-title.css +919 -0
- package/assets/fonts/css/cjk-wenkai-tc.css +2298 -0
- package/assets/fonts/css/cjk-wenkai.css +16 -0
- package/assets/fonts/css/clean-sans.css +8 -0
- package/assets/fonts/css/condensed-sans.css +8 -0
- package/assets/fonts/css/editorial-serif.css +8 -0
- package/assets/fonts/css/experimental-display.css +8 -0
- package/assets/fonts/css/geometric-sans.css +8 -0
- package/assets/fonts/css/latin-anton.css +29 -0
- package/assets/fonts/css/latin-be-vietnam-pro.css +116 -0
- package/assets/fonts/css/latin-bebas-neue.css +19 -0
- package/assets/fonts/css/latin-caveat.css +39 -0
- package/assets/fonts/css/latin-cormorant-garamond.css +98 -0
- package/assets/fonts/css/latin-dancing-script.css +29 -0
- package/assets/fonts/css/latin-dm-sans.css +38 -0
- package/assets/fonts/css/latin-ibm-plex-mono.css +196 -0
- package/assets/fonts/css/latin-inter-tight.css +138 -0
- package/assets/fonts/css/latin-inter.css +138 -0
- package/assets/fonts/css/latin-jetbrains-mono.css +118 -0
- package/assets/fonts/css/latin-lexend.css +29 -0
- package/assets/fonts/css/latin-libre-baskerville.css +38 -0
- package/assets/fonts/css/latin-lora.css +138 -0
- package/assets/fonts/css/latin-manrope.css +59 -0
- package/assets/fonts/css/latin-montserrat.css +98 -0
- package/assets/fonts/css/latin-open-sans.css +198 -0
- package/assets/fonts/css/latin-oswald.css +49 -0
- package/assets/fonts/css/latin-pacifico.css +49 -0
- package/assets/fonts/css/latin-playfair-display.css +78 -0
- package/assets/fonts/css/latin-poppins.css +116 -0
- package/assets/fonts/css/latin-roboto.css +178 -0
- package/assets/fonts/css/latin-source-serif-4.css +118 -0
- package/assets/fonts/css/luxury-serif.css +8 -0
- package/assets/fonts/editorial-serif/LICENSE +93 -0
- package/assets/fonts/experimental-display/LICENSE +93 -0
- package/assets/fonts/geometric-sans/LICENSE +93 -0
- package/assets/fonts/latin-anton/LICENSE +93 -0
- package/assets/fonts/latin-be-vietnam-pro/LICENSE +93 -0
- package/assets/fonts/latin-bebas-neue/LICENSE +93 -0
- package/assets/fonts/latin-caveat/LICENSE +93 -0
- package/assets/fonts/latin-cormorant-garamond/LICENSE +93 -0
- package/assets/fonts/latin-dancing-script/LICENSE +93 -0
- package/assets/fonts/latin-dm-sans/LICENSE +93 -0
- package/assets/fonts/latin-ibm-plex-mono/LICENSE +93 -0
- package/assets/fonts/latin-inter/LICENSE +93 -0
- package/assets/fonts/latin-inter-tight/LICENSE +93 -0
- package/assets/fonts/latin-jetbrains-mono/LICENSE +93 -0
- package/assets/fonts/latin-lexend/LICENSE +93 -0
- package/assets/fonts/latin-libre-baskerville/LICENSE +93 -0
- package/assets/fonts/latin-lora/LICENSE +93 -0
- package/assets/fonts/latin-manrope/LICENSE +93 -0
- package/assets/fonts/latin-montserrat/LICENSE +93 -0
- package/assets/fonts/latin-open-sans/LICENSE +93 -0
- package/assets/fonts/latin-oswald/LICENSE +93 -0
- package/assets/fonts/latin-pacifico/LICENSE +93 -0
- package/assets/fonts/latin-playfair-display/LICENSE +93 -0
- package/assets/fonts/latin-poppins/LICENSE +93 -0
- package/assets/fonts/latin-roboto/LICENSE +93 -0
- package/assets/fonts/latin-source-serif-4/LICENSE +93 -0
- package/assets/fonts/luxury-serif/LICENSE +93 -0
- package/assets/fonts/palette.json +3067 -0
- package/assets/mock/mock_models.json +25 -0
- package/assets/mock/mock_result.png +0 -0
- package/assets/project-starter/page.html +9 -0
- package/assets/provider-profiles.example.json +38 -0
- package/assets/series-plan.example.json +53 -0
- package/assets/template-profile.example.json +15 -0
- package/dist/cli.js +11852 -0
- package/dist/index.js +11633 -0
- package/dist/types/args.d.ts +56 -0
- package/dist/types/cli.d.ts +2 -0
- package/dist/types/cloud/auth-flow.d.ts +30 -0
- package/dist/types/cloud/errors.d.ts +6 -0
- package/dist/types/cloud/push.d.ts +36 -0
- package/dist/types/cloud/service.d.ts +86 -0
- package/dist/types/cloud/state.d.ts +32 -0
- package/dist/types/commands/account.d.ts +2 -0
- package/dist/types/commands/auth.d.ts +8 -0
- package/dist/types/commands/cloud.d.ts +2 -0
- package/dist/types/commands/core.d.ts +2 -0
- package/dist/types/commands/deck.d.ts +2 -0
- package/dist/types/commands/font.d.ts +2 -0
- package/dist/types/commands/image.d.ts +2 -0
- package/dist/types/commands/inspiration.d.ts +2 -0
- package/dist/types/commands/install.d.ts +2 -0
- package/dist/types/commands/link.d.ts +2 -0
- package/dist/types/commands/post-bundle.d.ts +6 -0
- package/dist/types/commands/pricing.d.ts +3 -0
- package/dist/types/commands/provider.d.ts +3 -0
- package/dist/types/commands/render.d.ts +2 -0
- package/dist/types/commands/setup.d.ts +2 -0
- package/dist/types/commands/sheet.d.ts +2 -0
- package/dist/types/commands/template.d.ts +3 -0
- package/dist/types/commands/workflow.d.ts +2 -0
- package/dist/types/core/errors.d.ts +15 -0
- package/dist/types/core/fingerprint.d.ts +3 -0
- package/dist/types/core/image-info.d.ts +23 -0
- package/dist/types/core/image.d.ts +22 -0
- package/dist/types/core/project.d.ts +105 -0
- package/dist/types/core/pyjson.d.ts +21 -0
- package/dist/types/core/util.d.ts +29 -0
- package/dist/types/credentials.d.ts +53 -0
- package/dist/types/deck/compile-bundle.d.ts +1 -0
- package/dist/types/deck/engine.d.ts +7 -0
- package/dist/types/deck/export-deck.d.ts +21 -0
- package/dist/types/deck/import-deck.d.ts +20 -0
- package/dist/types/deck/pages.d.ts +6 -0
- package/dist/types/deck/types.d.ts +49 -0
- package/dist/types/device-login.d.ts +13 -0
- package/dist/types/editor/canvas-state.d.ts +43 -0
- package/dist/types/editor/handoff.d.ts +31 -0
- package/dist/types/editor/http-types.d.ts +55 -0
- package/dist/types/editor/project-tools.d.ts +7 -0
- package/dist/types/editor/request-security.d.ts +3 -0
- package/dist/types/editor/routes-cloud.d.ts +7 -0
- package/dist/types/editor/routes-get.d.ts +3 -0
- package/dist/types/editor/routes-post.d.ts +3 -0
- package/dist/types/editor/sanitize.d.ts +15 -0
- package/dist/types/editor/save.d.ts +11 -0
- package/dist/types/editor/server.d.ts +15 -0
- package/dist/types/editor/subcommand.d.ts +11 -0
- package/dist/types/fonts/install.d.ts +22 -0
- package/dist/types/fonts/palette.d.ts +47 -0
- package/dist/types/fonts/project-fonts.d.ts +52 -0
- package/dist/types/fonts/source.d.ts +7 -0
- package/dist/types/images/batch-jobs.d.ts +51 -0
- package/dist/types/images/batch-quote.d.ts +7 -0
- package/dist/types/images/batch-run.d.ts +9 -0
- package/dist/types/images/capabilities.d.ts +12 -0
- package/dist/types/images/edit-plan.d.ts +60 -0
- package/dist/types/images/edit.d.ts +9 -0
- package/dist/types/images/info.d.ts +16 -0
- package/dist/types/images/jobs.d.ts +48 -0
- package/dist/types/images/prepare.d.ts +32 -0
- package/dist/types/images/references.d.ts +31 -0
- package/dist/types/images/retry.d.ts +28 -0
- package/dist/types/images/run.d.ts +35 -0
- package/dist/types/images/single-job.d.ts +19 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/install/agents.d.ts +24 -0
- package/dist/types/install/payload.d.ts +12 -0
- package/dist/types/install/skill-install.d.ts +15 -0
- package/dist/types/main.d.ts +7 -0
- package/dist/types/node-runtime.d.ts +3 -0
- package/dist/types/node-secret.d.ts +3 -0
- package/dist/types/providers/account.d.ts +8 -0
- package/dist/types/providers/adapter.d.ts +58 -0
- package/dist/types/providers/api-errors.d.ts +7 -0
- package/dist/types/providers/api.d.ts +95 -0
- package/dist/types/providers/base.d.ts +89 -0
- package/dist/types/providers/canonical.d.ts +4 -0
- package/dist/types/providers/cli-args.d.ts +22 -0
- package/dist/types/providers/cli-commands.d.ts +12 -0
- package/dist/types/providers/cli-config.d.ts +57 -0
- package/dist/types/providers/cli-generate.d.ts +35 -0
- package/dist/types/providers/cli-quote.d.ts +35 -0
- package/dist/types/providers/cli.d.ts +51 -0
- package/dist/types/providers/custom-http-util.d.ts +19 -0
- package/dist/types/providers/custom-http.d.ts +36 -0
- package/dist/types/providers/decimal.d.ts +22 -0
- package/dist/types/providers/errors.d.ts +40 -0
- package/dist/types/providers/index.d.ts +11 -0
- package/dist/types/providers/inspiration-plan.d.ts +43 -0
- package/dist/types/providers/inspiration.d.ts +18 -0
- package/dist/types/providers/ledger.d.ts +33 -0
- package/dist/types/providers/link-bundle.d.ts +53 -0
- package/dist/types/providers/link-task.d.ts +54 -0
- package/dist/types/providers/link.d.ts +24 -0
- package/dist/types/providers/manual-host.d.ts +17 -0
- package/dist/types/providers/paths.d.ts +10 -0
- package/dist/types/providers/popost-tasks.d.ts +52 -0
- package/dist/types/providers/popost-validate.d.ts +7 -0
- package/dist/types/providers/popost.d.ts +73 -0
- package/dist/types/providers/pricing.d.ts +6 -0
- package/dist/types/providers/secrets.d.ts +11 -0
- package/dist/types/providers/time.d.ts +11 -0
- package/dist/types/render/audit-script.d.ts +7 -0
- package/dist/types/render/audit.d.ts +49 -0
- package/dist/types/render/browser.d.ts +7 -0
- package/dist/types/render/edit.d.ts +26 -0
- package/dist/types/render/mime.d.ts +2 -0
- package/dist/types/render/offline.d.ts +47 -0
- package/dist/types/render/page-select.d.ts +7 -0
- package/dist/types/render/png.d.ts +28 -0
- package/dist/types/render/sheet-layout.d.ts +67 -0
- package/dist/types/render/sheet.d.ts +12 -0
- package/dist/types/runtime.d.ts +99 -0
- package/dist/types/setup/check.d.ts +14 -0
- package/dist/types/setup/context.d.ts +57 -0
- package/dist/types/setup/quote.d.ts +3 -0
- package/dist/types/setup/run.d.ts +12 -0
- package/dist/types/setup/spec.d.ts +53 -0
- package/dist/types/setup/steps.d.ts +33 -0
- package/dist/types/version.d.ts +2 -0
- package/dist/types/workflow/build.d.ts +43 -0
- package/dist/types/workflow/community-search.d.ts +34 -0
- package/dist/types/workflow/composition-grid.d.ts +44 -0
- package/dist/types/workflow/errors.d.ts +11 -0
- package/dist/types/workflow/io.d.ts +8 -0
- package/dist/types/workflow/page-check.d.ts +13 -0
- package/dist/types/workflow/post-bundle.d.ts +33 -0
- package/dist/types/workflow/project-bundle.d.ts +10 -0
- package/dist/types/workflow/review.d.ts +20 -0
- package/dist/types/workflow/series-plan.d.ts +14 -0
- package/dist/types/workflow/settings.d.ts +16 -0
- package/dist/types/workflow/subcommands.d.ts +9 -0
- package/dist/types/workflow/template-plugins.d.ts +62 -0
- package/dist/types/workflow/zip-inspect.d.ts +11 -0
- package/package.json +69 -4
- package/references/asset-architecture.md +11 -0
- package/references/create.md +13 -0
- package/references/design-system.md +11 -0
- package/references/editor-contract.md +21 -0
- package/references/fonts.md +29 -0
- package/references/generic-scenes.md +139 -0
- package/references/host-editor.md +54 -0
- package/references/imagery.md +48 -0
- package/references/onboarding.md +58 -0
- package/references/platform-adaptation.md +13 -0
- package/references/post-bundle.md +54 -0
- package/references/project-manifest.md +9 -0
- package/references/providers.md +57 -0
- package/references/quality-review.md +21 -0
- package/references/reproduce.md +23 -0
- package/references/scene-templates.md +21 -0
- package/references/social-series.md +35 -0
- package/templates/community/README.md +418 -0
- package/templates/community/index.json +5287 -0
- package/templates/community/magazine-argument-explainer/README.md +5 -0
- package/templates/community/magazine-argument-explainer/SKILL.md +36 -0
- package/templates/community/magazine-argument-explainer/template.json +46 -0
- package/templates/community/magazine-life-profile/README.md +5 -0
- package/templates/community/magazine-life-profile/SKILL.md +36 -0
- package/templates/community/magazine-life-profile/template.json +46 -0
- package/templates/community/magazine-news-brief/README.md +5 -0
- package/templates/community/magazine-news-brief/SKILL.md +36 -0
- package/templates/community/magazine-news-brief/template.json +46 -0
- package/templates/community/magazine-outfit-breakdown/README.md +5 -0
- package/templates/community/magazine-outfit-breakdown/SKILL.md +36 -0
- package/templates/community/magazine-outfit-breakdown/template.json +46 -0
- package/templates/community/magazine-parallel-workflow/README.md +7 -0
- package/templates/community/magazine-parallel-workflow/SKILL.md +36 -0
- package/templates/community/magazine-parallel-workflow/template.json +47 -0
- package/templates/community/magazine-quote-reading/README.md +7 -0
- package/templates/community/magazine-quote-reading/SKILL.md +36 -0
- package/templates/community/magazine-quote-reading/template.json +47 -0
- package/templates/community/magazine-story-timeline/README.md +5 -0
- package/templates/community/magazine-story-timeline/SKILL.md +36 -0
- package/templates/community/magazine-story-timeline/template.json +46 -0
- package/templates/community/magazine-travel-itinerary/README.md +5 -0
- package/templates/community/magazine-travel-itinerary/SKILL.md +36 -0
- package/templates/community/magazine-travel-itinerary/template.json +46 -0
- package/templates/community/minimal-case-outcome/README.md +7 -0
- package/templates/community/minimal-case-outcome/SKILL.md +36 -0
- package/templates/community/minimal-case-outcome/template.json +47 -0
- package/templates/community/minimal-concept-starter/README.md +7 -0
- package/templates/community/minimal-concept-starter/SKILL.md +36 -0
- package/templates/community/minimal-concept-starter/template.json +50 -0
- package/templates/community/minimal-data-ranking/README.md +7 -0
- package/templates/community/minimal-data-ranking/SKILL.md +36 -0
- package/templates/community/minimal-data-ranking/template.json +47 -0
- package/templates/community/minimal-feedback-loop/README.md +7 -0
- package/templates/community/minimal-feedback-loop/SKILL.md +36 -0
- package/templates/community/minimal-feedback-loop/template.json +47 -0
- package/templates/community/minimal-period-recap/README.md +7 -0
- package/templates/community/minimal-period-recap/SKILL.md +36 -0
- package/templates/community/minimal-period-recap/template.json +47 -0
- package/templates/community/minimal-structure-breakdown/README.md +7 -0
- package/templates/community/minimal-structure-breakdown/SKILL.md +36 -0
- package/templates/community/minimal-structure-breakdown/template.json +47 -0
- package/templates/community/tiktok-accessory-wearing-closeups/README.md +10 -0
- package/templates/community/tiktok-accessory-wearing-closeups/SKILL.md +74 -0
- package/templates/community/tiktok-accessory-wearing-closeups/references/mother-post.md +23 -0
- package/templates/community/tiktok-accessory-wearing-closeups/source.json +30 -0
- package/templates/community/tiktok-accessory-wearing-closeups/template.json +53 -0
- package/templates/community/tiktok-apparel-unboxing-print/README.md +10 -0
- package/templates/community/tiktok-apparel-unboxing-print/SKILL.md +74 -0
- package/templates/community/tiktok-apparel-unboxing-print/references/mother-post.md +23 -0
- package/templates/community/tiktok-apparel-unboxing-print/source.json +30 -0
- package/templates/community/tiktok-apparel-unboxing-print/template.json +53 -0
- package/templates/community/tiktok-appliance-spec-use-guide/README.md +12 -0
- package/templates/community/tiktok-appliance-spec-use-guide/SKILL.md +76 -0
- package/templates/community/tiktok-appliance-spec-use-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-appliance-spec-use-guide/source.json +42 -0
- package/templates/community/tiktok-appliance-spec-use-guide/template.json +57 -0
- package/templates/community/tiktok-audience-gift-recommendation/README.md +8 -0
- package/templates/community/tiktok-audience-gift-recommendation/SKILL.md +62 -0
- package/templates/community/tiktok-audience-gift-recommendation/template.json +82 -0
- package/templates/community/tiktok-baby-appliance-side-by-side/README.md +13 -0
- package/templates/community/tiktok-baby-appliance-side-by-side/SKILL.md +76 -0
- package/templates/community/tiktok-baby-appliance-side-by-side/references/mother-post.md +23 -0
- package/templates/community/tiktok-baby-appliance-side-by-side/source.json +48 -0
- package/templates/community/tiktok-baby-appliance-side-by-side/template.json +58 -0
- package/templates/community/tiktok-baby-product-capacity-accessories/README.md +14 -0
- package/templates/community/tiktok-baby-product-capacity-accessories/SKILL.md +76 -0
- package/templates/community/tiktok-baby-product-capacity-accessories/references/mother-post.md +23 -0
- package/templates/community/tiktok-baby-product-capacity-accessories/source.json +54 -0
- package/templates/community/tiktok-baby-product-capacity-accessories/template.json +59 -0
- package/templates/community/tiktok-bag-material-studio-closeups/README.md +10 -0
- package/templates/community/tiktok-bag-material-studio-closeups/SKILL.md +74 -0
- package/templates/community/tiktok-bag-material-studio-closeups/references/mother-post.md +23 -0
- package/templates/community/tiktok-bag-material-studio-closeups/source.json +30 -0
- package/templates/community/tiktok-bag-material-studio-closeups/template.json +53 -0
- package/templates/community/tiktok-bag-on-body-size-guide/README.md +14 -0
- package/templates/community/tiktok-bag-on-body-size-guide/SKILL.md +76 -0
- package/templates/community/tiktok-bag-on-body-size-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-bag-on-body-size-guide/source.json +54 -0
- package/templates/community/tiktok-bag-on-body-size-guide/template.json +59 -0
- package/templates/community/tiktok-bag-packing-capacity/README.md +13 -0
- package/templates/community/tiktok-bag-packing-capacity/SKILL.md +76 -0
- package/templates/community/tiktok-bag-packing-capacity/references/mother-post.md +23 -0
- package/templates/community/tiktok-bag-packing-capacity/source.json +48 -0
- package/templates/community/tiktok-bag-packing-capacity/template.json +58 -0
- package/templates/community/tiktok-bedding-setup-fabric/README.md +12 -0
- package/templates/community/tiktok-bedding-setup-fabric/SKILL.md +76 -0
- package/templates/community/tiktok-bedding-setup-fabric/references/mother-post.md +23 -0
- package/templates/community/tiktok-bedding-setup-fabric/source.json +42 -0
- package/templates/community/tiktok-bedding-setup-fabric/template.json +57 -0
- package/templates/community/tiktok-bedside-storage-before-after/README.md +12 -0
- package/templates/community/tiktok-bedside-storage-before-after/SKILL.md +76 -0
- package/templates/community/tiktok-bedside-storage-before-after/references/mother-post.md +23 -0
- package/templates/community/tiktok-bedside-storage-before-after/source.json +42 -0
- package/templates/community/tiktok-bedside-storage-before-after/template.json +57 -0
- package/templates/community/tiktok-body-type-fit-comparison/README.md +9 -0
- package/templates/community/tiktok-body-type-fit-comparison/SKILL.md +73 -0
- package/templates/community/tiktok-body-type-fit-comparison/references/mother-post.md +23 -0
- package/templates/community/tiktok-body-type-fit-comparison/source.json +24 -0
- package/templates/community/tiktok-body-type-fit-comparison/template.json +51 -0
- package/templates/community/tiktok-book-excerpt-emotional-hook/README.md +11 -0
- package/templates/community/tiktok-book-excerpt-emotional-hook/SKILL.md +75 -0
- package/templates/community/tiktok-book-excerpt-emotional-hook/references/mother-post.md +23 -0
- package/templates/community/tiktok-book-excerpt-emotional-hook/source.json +36 -0
- package/templates/community/tiktok-book-excerpt-emotional-hook/template.json +55 -0
- package/templates/community/tiktok-budget-message-recommendation/README.md +8 -0
- package/templates/community/tiktok-budget-message-recommendation/SKILL.md +62 -0
- package/templates/community/tiktok-budget-message-recommendation/template.json +76 -0
- package/templates/community/tiktok-car-accessory-compatibility/README.md +14 -0
- package/templates/community/tiktok-car-accessory-compatibility/SKILL.md +76 -0
- package/templates/community/tiktok-car-accessory-compatibility/references/mother-post.md +23 -0
- package/templates/community/tiktok-car-accessory-compatibility/source.json +54 -0
- package/templates/community/tiktok-car-accessory-compatibility/template.json +59 -0
- package/templates/community/tiktok-car-appearance-upgrade/README.md +10 -0
- package/templates/community/tiktok-car-appearance-upgrade/SKILL.md +74 -0
- package/templates/community/tiktok-car-appearance-upgrade/references/mother-post.md +23 -0
- package/templates/community/tiktok-car-appearance-upgrade/source.json +30 -0
- package/templates/community/tiktok-car-appearance-upgrade/template.json +53 -0
- package/templates/community/tiktok-car-tool-use-cases/README.md +15 -0
- package/templates/community/tiktok-car-tool-use-cases/SKILL.md +76 -0
- package/templates/community/tiktok-car-tool-use-cases/references/mother-post.md +23 -0
- package/templates/community/tiktok-car-tool-use-cases/source.json +60 -0
- package/templates/community/tiktok-car-tool-use-cases/template.json +60 -0
- package/templates/community/tiktok-childrens-book-family-reading/README.md +11 -0
- package/templates/community/tiktok-childrens-book-family-reading/SKILL.md +75 -0
- package/templates/community/tiktok-childrens-book-family-reading/references/mother-post.md +23 -0
- package/templates/community/tiktok-childrens-book-family-reading/source.json +36 -0
- package/templates/community/tiktok-childrens-book-family-reading/template.json +55 -0
- package/templates/community/tiktok-cleaning-appliance-feature-demo/README.md +13 -0
- package/templates/community/tiktok-cleaning-appliance-feature-demo/SKILL.md +76 -0
- package/templates/community/tiktok-cleaning-appliance-feature-demo/references/mother-post.md +23 -0
- package/templates/community/tiktok-cleaning-appliance-feature-demo/source.json +48 -0
- package/templates/community/tiktok-cleaning-appliance-feature-demo/template.json +58 -0
- package/templates/community/tiktok-clothing-colorway-flat-lay/README.md +15 -0
- package/templates/community/tiktok-clothing-colorway-flat-lay/SKILL.md +76 -0
- package/templates/community/tiktok-clothing-colorway-flat-lay/references/mother-post.md +23 -0
- package/templates/community/tiktok-clothing-colorway-flat-lay/source.json +60 -0
- package/templates/community/tiktok-clothing-colorway-flat-lay/template.json +60 -0
- package/templates/community/tiktok-clothing-colorway-styling/README.md +9 -0
- package/templates/community/tiktok-clothing-colorway-styling/SKILL.md +73 -0
- package/templates/community/tiktok-clothing-colorway-styling/references/mother-post.md +23 -0
- package/templates/community/tiktok-clothing-colorway-styling/source.json +24 -0
- package/templates/community/tiktok-clothing-colorway-styling/template.json +51 -0
- package/templates/community/tiktok-clothing-front-back-fabric/README.md +13 -0
- package/templates/community/tiktok-clothing-front-back-fabric/SKILL.md +76 -0
- package/templates/community/tiktok-clothing-front-back-fabric/references/mother-post.md +23 -0
- package/templates/community/tiktok-clothing-front-back-fabric/source.json +48 -0
- package/templates/community/tiktok-clothing-front-back-fabric/template.json +58 -0
- package/templates/community/tiktok-collectible-toy-set-singles/README.md +11 -0
- package/templates/community/tiktok-collectible-toy-set-singles/SKILL.md +75 -0
- package/templates/community/tiktok-collectible-toy-set-singles/references/mother-post.md +23 -0
- package/templates/community/tiktok-collectible-toy-set-singles/source.json +36 -0
- package/templates/community/tiktok-collectible-toy-set-singles/template.json +55 -0
- package/templates/community/tiktok-comment-product-reveal/README.md +8 -0
- package/templates/community/tiktok-comment-product-reveal/SKILL.md +64 -0
- package/templates/community/tiktok-comment-product-reveal/template.json +76 -0
- package/templates/community/tiktok-computer-unboxing-first-use/README.md +11 -0
- package/templates/community/tiktok-computer-unboxing-first-use/SKILL.md +75 -0
- package/templates/community/tiktok-computer-unboxing-first-use/references/mother-post.md +23 -0
- package/templates/community/tiktok-computer-unboxing-first-use/source.json +36 -0
- package/templates/community/tiktok-computer-unboxing-first-use/template.json +55 -0
- package/templates/community/tiktok-device-setup-ports-guide/README.md +14 -0
- package/templates/community/tiktok-device-setup-ports-guide/SKILL.md +76 -0
- package/templates/community/tiktok-device-setup-ports-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-device-setup-ports-guide/source.json +54 -0
- package/templates/community/tiktok-device-setup-ports-guide/template.json +59 -0
- package/templates/community/tiktok-digital-product-feature-scenarios/README.md +14 -0
- package/templates/community/tiktok-digital-product-feature-scenarios/SKILL.md +76 -0
- package/templates/community/tiktok-digital-product-feature-scenarios/references/mother-post.md +23 -0
- package/templates/community/tiktok-digital-product-feature-scenarios/source.json +54 -0
- package/templates/community/tiktok-digital-product-feature-scenarios/template.json +59 -0
- package/templates/community/tiktok-drinkware-on-the-go/README.md +11 -0
- package/templates/community/tiktok-drinkware-on-the-go/SKILL.md +75 -0
- package/templates/community/tiktok-drinkware-on-the-go/references/mother-post.md +23 -0
- package/templates/community/tiktok-drinkware-on-the-go/source.json +36 -0
- package/templates/community/tiktok-drinkware-on-the-go/template.json +55 -0
- package/templates/community/tiktok-electronics-unboxing-accessories/README.md +9 -0
- package/templates/community/tiktok-electronics-unboxing-accessories/SKILL.md +73 -0
- package/templates/community/tiktok-electronics-unboxing-accessories/references/mother-post.md +23 -0
- package/templates/community/tiktok-electronics-unboxing-accessories/source.json +24 -0
- package/templates/community/tiktok-electronics-unboxing-accessories/template.json +51 -0
- package/templates/community/tiktok-emergency-essentials-checklist/README.md +13 -0
- package/templates/community/tiktok-emergency-essentials-checklist/SKILL.md +76 -0
- package/templates/community/tiktok-emergency-essentials-checklist/references/mother-post.md +23 -0
- package/templates/community/tiktok-emergency-essentials-checklist/source.json +48 -0
- package/templates/community/tiktok-emergency-essentials-checklist/template.json +58 -0
- package/templates/community/tiktok-fill-in-gift-book-preview/README.md +11 -0
- package/templates/community/tiktok-fill-in-gift-book-preview/SKILL.md +75 -0
- package/templates/community/tiktok-fill-in-gift-book-preview/references/mother-post.md +23 -0
- package/templates/community/tiktok-fill-in-gift-book-preview/source.json +36 -0
- package/templates/community/tiktok-fill-in-gift-book-preview/template.json +55 -0
- package/templates/community/tiktok-food-unpacking-texture/README.md +8 -0
- package/templates/community/tiktok-food-unpacking-texture/SKILL.md +72 -0
- package/templates/community/tiktok-food-unpacking-texture/references/mother-post.md +23 -0
- package/templates/community/tiktok-food-unpacking-texture/source.json +18 -0
- package/templates/community/tiktok-food-unpacking-texture/template.json +49 -0
- package/templates/community/tiktok-footwear-colorway-on-foot/README.md +13 -0
- package/templates/community/tiktok-footwear-colorway-on-foot/SKILL.md +76 -0
- package/templates/community/tiktok-footwear-colorway-on-foot/references/mother-post.md +23 -0
- package/templates/community/tiktok-footwear-colorway-on-foot/source.json +48 -0
- package/templates/community/tiktok-footwear-colorway-on-foot/template.json +58 -0
- package/templates/community/tiktok-footwear-handheld-detail/README.md +10 -0
- package/templates/community/tiktok-footwear-handheld-detail/SKILL.md +74 -0
- package/templates/community/tiktok-footwear-handheld-detail/references/mother-post.md +23 -0
- package/templates/community/tiktok-footwear-handheld-detail/source.json +30 -0
- package/templates/community/tiktok-footwear-handheld-detail/template.json +53 -0
- package/templates/community/tiktok-footwear-on-foot-outfits/README.md +10 -0
- package/templates/community/tiktok-footwear-on-foot-outfits/SKILL.md +74 -0
- package/templates/community/tiktok-footwear-on-foot-outfits/references/mother-post.md +23 -0
- package/templates/community/tiktok-footwear-on-foot-outfits/source.json +30 -0
- package/templates/community/tiktok-footwear-on-foot-outfits/template.json +53 -0
- package/templates/community/tiktok-functional-clothing-in-use/README.md +15 -0
- package/templates/community/tiktok-functional-clothing-in-use/SKILL.md +76 -0
- package/templates/community/tiktok-functional-clothing-in-use/references/mother-post.md +23 -0
- package/templates/community/tiktok-functional-clothing-in-use/source.json +60 -0
- package/templates/community/tiktok-functional-clothing-in-use/template.json +60 -0
- package/templates/community/tiktok-furniture-room-detail/README.md +10 -0
- package/templates/community/tiktok-furniture-room-detail/SKILL.md +74 -0
- package/templates/community/tiktok-furniture-room-detail/references/mother-post.md +23 -0
- package/templates/community/tiktok-furniture-room-detail/source.json +30 -0
- package/templates/community/tiktok-furniture-room-detail/template.json +53 -0
- package/templates/community/tiktok-furniture-set-dimensions/README.md +14 -0
- package/templates/community/tiktok-furniture-set-dimensions/SKILL.md +76 -0
- package/templates/community/tiktok-furniture-set-dimensions/references/mother-post.md +23 -0
- package/templates/community/tiktok-furniture-set-dimensions/source.json +54 -0
- package/templates/community/tiktok-furniture-set-dimensions/template.json +59 -0
- package/templates/community/tiktok-furniture-set-feature-breakdown/README.md +14 -0
- package/templates/community/tiktok-furniture-set-feature-breakdown/SKILL.md +76 -0
- package/templates/community/tiktok-furniture-set-feature-breakdown/references/mother-post.md +23 -0
- package/templates/community/tiktok-furniture-set-feature-breakdown/source.json +54 -0
- package/templates/community/tiktok-furniture-set-feature-breakdown/template.json +59 -0
- package/templates/community/tiktok-gardening-tool-before-after/README.md +18 -0
- package/templates/community/tiktok-gardening-tool-before-after/SKILL.md +76 -0
- package/templates/community/tiktok-gardening-tool-before-after/references/mother-post.md +23 -0
- package/templates/community/tiktok-gardening-tool-before-after/source.json +78 -0
- package/templates/community/tiktok-gardening-tool-before-after/template.json +63 -0
- package/templates/community/tiktok-gift-box-reveal/README.md +8 -0
- package/templates/community/tiktok-gift-box-reveal/SKILL.md +72 -0
- package/templates/community/tiktok-gift-box-reveal/references/mother-post.md +23 -0
- package/templates/community/tiktok-gift-box-reveal/source.json +18 -0
- package/templates/community/tiktok-gift-box-reveal/template.json +49 -0
- package/templates/community/tiktok-handheld-product-features/README.md +10 -0
- package/templates/community/tiktok-handheld-product-features/SKILL.md +68 -0
- package/templates/community/tiktok-handheld-product-features/template.json +78 -0
- package/templates/community/tiktok-holiday-gift-building-unboxing/README.md +11 -0
- package/templates/community/tiktok-holiday-gift-building-unboxing/SKILL.md +75 -0
- package/templates/community/tiktok-holiday-gift-building-unboxing/references/mother-post.md +23 -0
- package/templates/community/tiktok-holiday-gift-building-unboxing/source.json +36 -0
- package/templates/community/tiktok-holiday-gift-building-unboxing/template.json +55 -0
- package/templates/community/tiktok-home-lighting-mood/README.md +9 -0
- package/templates/community/tiktok-home-lighting-mood/SKILL.md +73 -0
- package/templates/community/tiktok-home-lighting-mood/references/mother-post.md +23 -0
- package/templates/community/tiktok-home-lighting-mood/source.json +24 -0
- package/templates/community/tiktok-home-lighting-mood/template.json +51 -0
- package/templates/community/tiktok-home-product-lifestyle-scenes/README.md +10 -0
- package/templates/community/tiktok-home-product-lifestyle-scenes/SKILL.md +74 -0
- package/templates/community/tiktok-home-product-lifestyle-scenes/references/mother-post.md +23 -0
- package/templates/community/tiktok-home-product-lifestyle-scenes/source.json +30 -0
- package/templates/community/tiktok-home-product-lifestyle-scenes/template.json +53 -0
- package/templates/community/tiktok-home-product-real-use/README.md +12 -0
- package/templates/community/tiktok-home-product-real-use/SKILL.md +76 -0
- package/templates/community/tiktok-home-product-real-use/references/mother-post.md +23 -0
- package/templates/community/tiktok-home-product-real-use/source.json +42 -0
- package/templates/community/tiktok-home-product-real-use/template.json +57 -0
- package/templates/community/tiktok-home-storage-before-after/README.md +12 -0
- package/templates/community/tiktok-home-storage-before-after/SKILL.md +76 -0
- package/templates/community/tiktok-home-storage-before-after/references/mother-post.md +23 -0
- package/templates/community/tiktok-home-storage-before-after/source.json +42 -0
- package/templates/community/tiktok-home-storage-before-after/template.json +57 -0
- package/templates/community/tiktok-home-styling-before-after/README.md +13 -0
- package/templates/community/tiktok-home-styling-before-after/SKILL.md +76 -0
- package/templates/community/tiktok-home-styling-before-after/references/mother-post.md +23 -0
- package/templates/community/tiktok-home-styling-before-after/source.json +48 -0
- package/templates/community/tiktok-home-styling-before-after/template.json +58 -0
- package/templates/community/tiktok-interest-mood-product-match/README.md +8 -0
- package/templates/community/tiktok-interest-mood-product-match/SKILL.md +64 -0
- package/templates/community/tiktok-interest-mood-product-match/template.json +76 -0
- package/templates/community/tiktok-jewelry-macro-craftsmanship/README.md +11 -0
- package/templates/community/tiktok-jewelry-macro-craftsmanship/SKILL.md +75 -0
- package/templates/community/tiktok-jewelry-macro-craftsmanship/references/mother-post.md +23 -0
- package/templates/community/tiktok-jewelry-macro-craftsmanship/source.json +36 -0
- package/templates/community/tiktok-jewelry-macro-craftsmanship/template.json +55 -0
- package/templates/community/tiktok-kids-clothing-flat-lay-try-on/README.md +9 -0
- package/templates/community/tiktok-kids-clothing-flat-lay-try-on/SKILL.md +73 -0
- package/templates/community/tiktok-kids-clothing-flat-lay-try-on/references/mother-post.md +23 -0
- package/templates/community/tiktok-kids-clothing-flat-lay-try-on/source.json +24 -0
- package/templates/community/tiktok-kids-clothing-flat-lay-try-on/template.json +51 -0
- package/templates/community/tiktok-kitchen-appliance-food-results/README.md +11 -0
- package/templates/community/tiktok-kitchen-appliance-food-results/SKILL.md +75 -0
- package/templates/community/tiktok-kitchen-appliance-food-results/references/mother-post.md +23 -0
- package/templates/community/tiktok-kitchen-appliance-food-results/source.json +36 -0
- package/templates/community/tiktok-kitchen-appliance-food-results/template.json +55 -0
- package/templates/community/tiktok-kitchen-tool-step-demo/README.md +15 -0
- package/templates/community/tiktok-kitchen-tool-step-demo/SKILL.md +76 -0
- package/templates/community/tiktok-kitchen-tool-step-demo/references/mother-post.md +23 -0
- package/templates/community/tiktok-kitchen-tool-step-demo/source.json +60 -0
- package/templates/community/tiktok-kitchen-tool-step-demo/template.json +60 -0
- package/templates/community/tiktok-lifestyle-hook-finished-results/README.md +10 -0
- package/templates/community/tiktok-lifestyle-hook-finished-results/SKILL.md +74 -0
- package/templates/community/tiktok-lifestyle-hook-finished-results/references/mother-post.md +23 -0
- package/templates/community/tiktok-lifestyle-hook-finished-results/source.json +30 -0
- package/templates/community/tiktok-lifestyle-hook-finished-results/template.json +53 -0
- package/templates/community/tiktok-lighting-installation-mood/README.md +13 -0
- package/templates/community/tiktok-lighting-installation-mood/SKILL.md +76 -0
- package/templates/community/tiktok-lighting-installation-mood/references/mother-post.md +23 -0
- package/templates/community/tiktok-lighting-installation-mood/source.json +48 -0
- package/templates/community/tiktok-lighting-installation-mood/template.json +58 -0
- package/templates/community/tiktok-lockscreen-product-reveal/README.md +8 -0
- package/templates/community/tiktok-lockscreen-product-reveal/SKILL.md +62 -0
- package/templates/community/tiktok-lockscreen-product-reveal/template.json +76 -0
- package/templates/community/tiktok-makeup-shade-swatches/README.md +12 -0
- package/templates/community/tiktok-makeup-shade-swatches/SKILL.md +76 -0
- package/templates/community/tiktok-makeup-shade-swatches/references/mother-post.md +23 -0
- package/templates/community/tiktok-makeup-shade-swatches/source.json +42 -0
- package/templates/community/tiktok-makeup-shade-swatches/template.json +57 -0
- package/templates/community/tiktok-makeup-unboxing-closeups/README.md +11 -0
- package/templates/community/tiktok-makeup-unboxing-closeups/SKILL.md +75 -0
- package/templates/community/tiktok-makeup-unboxing-closeups/references/mother-post.md +23 -0
- package/templates/community/tiktok-makeup-unboxing-closeups/source.json +36 -0
- package/templates/community/tiktok-makeup-unboxing-closeups/template.json +55 -0
- package/templates/community/tiktok-mirror-try-on-fit/README.md +13 -0
- package/templates/community/tiktok-mirror-try-on-fit/SKILL.md +76 -0
- package/templates/community/tiktok-mirror-try-on-fit/references/mother-post.md +23 -0
- package/templates/community/tiktok-mirror-try-on-fit/source.json +48 -0
- package/templates/community/tiktok-mirror-try-on-fit/template.json +58 -0
- package/templates/community/tiktok-modest-fashion-try-on-details/README.md +14 -0
- package/templates/community/tiktok-modest-fashion-try-on-details/SKILL.md +75 -0
- package/templates/community/tiktok-modest-fashion-try-on-details/references/mother-post.md +23 -0
- package/templates/community/tiktok-modest-fashion-try-on-details/source.json +54 -0
- package/templates/community/tiktok-modest-fashion-try-on-details/template.json +58 -0
- package/templates/community/tiktok-nutrition-drink-mixing/README.md +8 -0
- package/templates/community/tiktok-nutrition-drink-mixing/SKILL.md +72 -0
- package/templates/community/tiktok-nutrition-drink-mixing/references/mother-post.md +23 -0
- package/templates/community/tiktok-nutrition-drink-mixing/source.json +18 -0
- package/templates/community/tiktok-nutrition-drink-mixing/template.json +49 -0
- package/templates/community/tiktok-one-garment-outfit-ideas/README.md +12 -0
- package/templates/community/tiktok-one-garment-outfit-ideas/SKILL.md +76 -0
- package/templates/community/tiktok-one-garment-outfit-ideas/references/mother-post.md +23 -0
- package/templates/community/tiktok-one-garment-outfit-ideas/source.json +42 -0
- package/templates/community/tiktok-one-garment-outfit-ideas/template.json +57 -0
- package/templates/community/tiktok-outdoor-apparel-colorway-try-on/README.md +10 -0
- package/templates/community/tiktok-outdoor-apparel-colorway-try-on/SKILL.md +74 -0
- package/templates/community/tiktok-outdoor-apparel-colorway-try-on/references/mother-post.md +23 -0
- package/templates/community/tiktok-outdoor-apparel-colorway-try-on/source.json +30 -0
- package/templates/community/tiktok-outdoor-apparel-colorway-try-on/template.json +53 -0
- package/templates/community/tiktok-outdoor-electronics-specs/README.md +15 -0
- package/templates/community/tiktok-outdoor-electronics-specs/SKILL.md +76 -0
- package/templates/community/tiktok-outdoor-electronics-specs/references/mother-post.md +23 -0
- package/templates/community/tiktok-outdoor-electronics-specs/source.json +60 -0
- package/templates/community/tiktok-outdoor-electronics-specs/template.json +60 -0
- package/templates/community/tiktok-outdoor-gear-packing-capacity/README.md +11 -0
- package/templates/community/tiktok-outdoor-gear-packing-capacity/SKILL.md +75 -0
- package/templates/community/tiktok-outdoor-gear-packing-capacity/references/mother-post.md +23 -0
- package/templates/community/tiktok-outdoor-gear-packing-capacity/source.json +36 -0
- package/templates/community/tiktok-outdoor-gear-packing-capacity/template.json +55 -0
- package/templates/community/tiktok-outdoor-gear-spec-guide/README.md +14 -0
- package/templates/community/tiktok-outdoor-gear-spec-guide/SKILL.md +76 -0
- package/templates/community/tiktok-outdoor-gear-spec-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-outdoor-gear-spec-guide/source.json +54 -0
- package/templates/community/tiktok-outdoor-gear-spec-guide/template.json +59 -0
- package/templates/community/tiktok-party-game-interaction/README.md +9 -0
- package/templates/community/tiktok-party-game-interaction/SKILL.md +73 -0
- package/templates/community/tiktok-party-game-interaction/references/mother-post.md +23 -0
- package/templates/community/tiktok-party-game-interaction/source.json +24 -0
- package/templates/community/tiktok-party-game-interaction/template.json +51 -0
- package/templates/community/tiktok-perfume-mood-fragrance-notes/README.md +11 -0
- package/templates/community/tiktok-perfume-mood-fragrance-notes/SKILL.md +75 -0
- package/templates/community/tiktok-perfume-mood-fragrance-notes/references/mother-post.md +23 -0
- package/templates/community/tiktok-perfume-mood-fragrance-notes/source.json +36 -0
- package/templates/community/tiktok-perfume-mood-fragrance-notes/template.json +55 -0
- package/templates/community/tiktok-personal-care-tool-accessories/README.md +12 -0
- package/templates/community/tiktok-personal-care-tool-accessories/SKILL.md +76 -0
- package/templates/community/tiktok-personal-care-tool-accessories/references/mother-post.md +23 -0
- package/templates/community/tiktok-personal-care-tool-accessories/source.json +42 -0
- package/templates/community/tiktok-personal-care-tool-accessories/template.json +57 -0
- package/templates/community/tiktok-pet-product-features-reviews/README.md +9 -0
- package/templates/community/tiktok-pet-product-features-reviews/SKILL.md +73 -0
- package/templates/community/tiktok-pet-product-features-reviews/references/mother-post.md +23 -0
- package/templates/community/tiktok-pet-product-features-reviews/source.json +24 -0
- package/templates/community/tiktok-pet-product-features-reviews/template.json +51 -0
- package/templates/community/tiktok-pet-product-scenarios-specs/README.md +14 -0
- package/templates/community/tiktok-pet-product-scenarios-specs/SKILL.md +76 -0
- package/templates/community/tiktok-pet-product-scenarios-specs/references/mother-post.md +23 -0
- package/templates/community/tiktok-pet-product-scenarios-specs/source.json +54 -0
- package/templates/community/tiktok-pet-product-scenarios-specs/template.json +59 -0
- package/templates/community/tiktok-problem-action-product-guide/README.md +10 -0
- package/templates/community/tiktok-problem-action-product-guide/SKILL.md +70 -0
- package/templates/community/tiktok-problem-action-product-guide/template.json +64 -0
- package/templates/community/tiktok-reaction-product-twist/README.md +8 -0
- package/templates/community/tiktok-reaction-product-twist/SKILL.md +64 -0
- package/templates/community/tiktok-reaction-product-twist/template.json +75 -0
- package/templates/community/tiktok-relationship-gift-response/README.md +8 -0
- package/templates/community/tiktok-relationship-gift-response/SKILL.md +62 -0
- package/templates/community/tiktok-relationship-gift-response/template.json +76 -0
- package/templates/community/tiktok-routine-before-after-timeline/README.md +9 -0
- package/templates/community/tiktok-routine-before-after-timeline/SKILL.md +73 -0
- package/templates/community/tiktok-routine-before-after-timeline/references/mother-post.md +23 -0
- package/templates/community/tiktok-routine-before-after-timeline/source.json +24 -0
- package/templates/community/tiktok-routine-before-after-timeline/template.json +51 -0
- package/templates/community/tiktok-scenery-product-reveal/README.md +8 -0
- package/templates/community/tiktok-scenery-product-reveal/SKILL.md +62 -0
- package/templates/community/tiktok-scenery-product-reveal/template.json +76 -0
- package/templates/community/tiktok-selfie-product-discovery/README.md +8 -0
- package/templates/community/tiktok-selfie-product-discovery/SKILL.md +64 -0
- package/templates/community/tiktok-selfie-product-discovery/template.json +76 -0
- package/templates/community/tiktok-sensory-mood-product-reveal/README.md +8 -0
- package/templates/community/tiktok-sensory-mood-product-reveal/SKILL.md +62 -0
- package/templates/community/tiktok-sensory-mood-product-reveal/template.json +54 -0
- package/templates/community/tiktok-skincare-set-price-comparison/README.md +14 -0
- package/templates/community/tiktok-skincare-set-price-comparison/SKILL.md +76 -0
- package/templates/community/tiktok-skincare-set-price-comparison/references/mother-post.md +23 -0
- package/templates/community/tiktok-skincare-set-price-comparison/source.json +54 -0
- package/templates/community/tiktok-skincare-set-price-comparison/template.json +59 -0
- package/templates/community/tiktok-sms-product-recommendation/README.md +8 -0
- package/templates/community/tiktok-sms-product-recommendation/SKILL.md +62 -0
- package/templates/community/tiktok-sms-product-recommendation/template.json +76 -0
- package/templates/community/tiktok-snack-flavor-packaging/README.md +11 -0
- package/templates/community/tiktok-snack-flavor-packaging/SKILL.md +75 -0
- package/templates/community/tiktok-snack-flavor-packaging/references/mother-post.md +23 -0
- package/templates/community/tiktok-snack-flavor-packaging/source.json +36 -0
- package/templates/community/tiktok-snack-flavor-packaging/template.json +55 -0
- package/templates/community/tiktok-social-status-recommendation/README.md +8 -0
- package/templates/community/tiktok-social-status-recommendation/SKILL.md +64 -0
- package/templates/community/tiktok-social-status-recommendation/template.json +76 -0
- package/templates/community/tiktok-sportswear-flat-lay-fabric/README.md +11 -0
- package/templates/community/tiktok-sportswear-flat-lay-fabric/SKILL.md +75 -0
- package/templates/community/tiktok-sportswear-flat-lay-fabric/references/mother-post.md +23 -0
- package/templates/community/tiktok-sportswear-flat-lay-fabric/source.json +36 -0
- package/templates/community/tiktok-sportswear-flat-lay-fabric/template.json +55 -0
- package/templates/community/tiktok-streetwear-try-on/README.md +12 -0
- package/templates/community/tiktok-streetwear-try-on/SKILL.md +76 -0
- package/templates/community/tiktok-streetwear-try-on/references/mother-post.md +23 -0
- package/templates/community/tiktok-streetwear-try-on/source.json +42 -0
- package/templates/community/tiktok-streetwear-try-on/template.json +57 -0
- package/templates/community/tiktok-supplement-ingredients-serving-guide/README.md +12 -0
- package/templates/community/tiktok-supplement-ingredients-serving-guide/SKILL.md +76 -0
- package/templates/community/tiktok-supplement-ingredients-serving-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-supplement-ingredients-serving-guide/source.json +42 -0
- package/templates/community/tiktok-supplement-ingredients-serving-guide/template.json +57 -0
- package/templates/community/tiktok-tableware-color-set-studio/README.md +9 -0
- package/templates/community/tiktok-tableware-color-set-studio/SKILL.md +73 -0
- package/templates/community/tiktok-tableware-color-set-studio/references/mother-post.md +23 -0
- package/templates/community/tiktok-tableware-color-set-studio/source.json +24 -0
- package/templates/community/tiktok-tableware-color-set-studio/template.json +51 -0
- package/templates/community/tiktok-themed-book-list-flat-lay/README.md +13 -0
- package/templates/community/tiktok-themed-book-list-flat-lay/SKILL.md +76 -0
- package/templates/community/tiktok-themed-book-list-flat-lay/references/mother-post.md +23 -0
- package/templates/community/tiktok-themed-book-list-flat-lay/source.json +48 -0
- package/templates/community/tiktok-themed-book-list-flat-lay/template.json +58 -0
- package/templates/community/tiktok-tool-specs-use-steps/README.md +12 -0
- package/templates/community/tiktok-tool-specs-use-steps/SKILL.md +76 -0
- package/templates/community/tiktok-tool-specs-use-steps/references/mother-post.md +23 -0
- package/templates/community/tiktok-tool-specs-use-steps/source.json +42 -0
- package/templates/community/tiktok-tool-specs-use-steps/template.json +57 -0
- package/templates/community/tiktok-trading-card-edition-guide/README.md +11 -0
- package/templates/community/tiktok-trading-card-edition-guide/SKILL.md +75 -0
- package/templates/community/tiktok-trading-card-edition-guide/references/mother-post.md +23 -0
- package/templates/community/tiktok-trading-card-edition-guide/source.json +36 -0
- package/templates/community/tiktok-trading-card-edition-guide/template.json +55 -0
- package/templates/community/tiktok-travel-product-problem-solution/README.md +12 -0
- package/templates/community/tiktok-travel-product-problem-solution/SKILL.md +76 -0
- package/templates/community/tiktok-travel-product-problem-solution/references/mother-post.md +23 -0
- package/templates/community/tiktok-travel-product-problem-solution/source.json +42 -0
- package/templates/community/tiktok-travel-product-problem-solution/template.json +57 -0
- package/templates/community/tiktok-two-choice-gift-recommendation/README.md +8 -0
- package/templates/community/tiktok-two-choice-gift-recommendation/SKILL.md +62 -0
- package/templates/community/tiktok-two-choice-gift-recommendation/template.json +76 -0
- package/templates/community/tiktok-underwear-before-after-styling/README.md +12 -0
- package/templates/community/tiktok-underwear-before-after-styling/SKILL.md +76 -0
- package/templates/community/tiktok-underwear-before-after-styling/references/mother-post.md +23 -0
- package/templates/community/tiktok-underwear-before-after-styling/source.json +42 -0
- package/templates/community/tiktok-underwear-before-after-styling/template.json +57 -0
- package/templates/community/tiktok-vacuum-cleaning-results/README.md +11 -0
- package/templates/community/tiktok-vacuum-cleaning-results/SKILL.md +75 -0
- package/templates/community/tiktok-vacuum-cleaning-results/references/mother-post.md +23 -0
- package/templates/community/tiktok-vacuum-cleaning-results/source.json +36 -0
- package/templates/community/tiktok-vacuum-cleaning-results/template.json +55 -0
- package/templates/community/tiktok-warm-clothing-fabric-details/README.md +11 -0
- package/templates/community/tiktok-warm-clothing-fabric-details/SKILL.md +75 -0
- package/templates/community/tiktok-warm-clothing-fabric-details/references/mother-post.md +23 -0
- package/templates/community/tiktok-warm-clothing-fabric-details/source.json +36 -0
- package/templates/community/tiktok-warm-clothing-fabric-details/template.json +55 -0
- package/templates/community/tiktok-waterproof-footwear-outdoors/README.md +9 -0
- package/templates/community/tiktok-waterproof-footwear-outdoors/SKILL.md +73 -0
- package/templates/community/tiktok-waterproof-footwear-outdoors/references/mother-post.md +23 -0
- package/templates/community/tiktok-waterproof-footwear-outdoors/source.json +24 -0
- package/templates/community/tiktok-waterproof-footwear-outdoors/template.json +51 -0
- package/templates/generic/commerce-sell/scenario.md +48 -0
- package/templates/generic/commerce-sell/source.manifest.json +9 -0
- package/templates/generic/commerce-sell/template.html +99 -0
- package/templates/generic/commerce-sell/template.json +33 -0
- package/templates/generic/comparison/scenario.md +45 -0
- package/templates/generic/comparison/source.manifest.json +9 -0
- package/templates/generic/comparison/template.html +70 -0
- package/templates/generic/comparison/template.json +33 -0
- package/templates/generic/curated-list/scenario.md +42 -0
- package/templates/generic/curated-list/source.manifest.json +9 -0
- package/templates/generic/curated-list/template.html +86 -0
- package/templates/generic/curated-list/template.json +33 -0
- package/templates/generic/step-guide/scenario.md +45 -0
- package/templates/generic/step-guide/source.manifest.json +9 -0
- package/templates/generic/step-guide/template.html +91 -0
- package/templates/generic/step-guide/template.json +34 -0
- package/templates/generic/viewpoint/scenario.md +45 -0
- package/templates/generic/viewpoint/source.manifest.json +9 -0
- package/templates/generic/viewpoint/template.html +83 -0
- package/templates/generic/viewpoint/template.json +34 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DECK_BUNDLE = "\"use strict\";(()=>{var f=e=>new DOMParser().parseFromString(e,\"text/html\");function y(e,t,s){if(!e||/^(data:|blob:|#)/i.test(e))return e;let n=new URL(e,t);if(n.origin!==s)throw new Error(\"\u672C\u5730\u5DE5\u7A0B\u4E0D\u80FD\u4F9D\u8D56\u7AD9\u5916\u8D44\u6E90\uFF0C\u8BF7\u5148\u5BFC\u5165\u56FE\u7247\u548C\u5B57\u4F53\u3002\");return\"../\"+n.pathname.slice(1)+n.search+n.hash}function g(e,t,s){return e.replace(/url\\(\\s*(['\"]?)([^)'\"\\s]+)\\1\\s*\\)/gi,(n,r,i)=>`url(\"${y(i,t,s)}\")`)}var M=/^(--|background(?:-|$)|color$|font(?:-|$)|line-height$|letter-spacing$|word-spacing$|text-(?:align|transform|indent|rendering)$|direction$|writing-mode$|white-space$|visibility$)/;function x(e){let t=[],s=0,n=\"\",r=!1,i=0;for(let o=0;o<e.length;o++){let a=e[o];if(r){r=!1;continue}if(a===\"\\\\\"){r=!0;continue}if(n){a===n&&(n=\"\");continue}if(a==='\"'||a===\"'\"){n=a;continue}a===\"(\"||a===\"[\"?s++:a===\")\"||a===\"]\"?s--:a===\",\"&&!s&&(t.push(e.slice(i,o)),i=o+1)}return t.push(e.slice(i)),t}function A(e,t){return[...e].filter(t).map(s=>`${s}:${e.getPropertyValue(s)}${e.getPropertyPriority(s)?\"!important\":\"\"}`).join(\";\")}function H(e,t,s){if(/^\\s*(?::root|html|body)\\s*$/.test(e))return`:scope{${A(t,o=>M.test(o))}}`;let n=e.trim().replace(/^(?:(?:html|body|:root)\\s+)+/,\"\"),r=n.match(/^[^\\s>+~]+/)?.[0],i=n;try{r&&s.matches(r)&&(i+=\",:scope\"+n.slice(r.length))}catch{}return`${i}{${t.cssText}}`}function S(e,t){let s=new CSSStyleSheet;s.replaceSync(e);let n=[];function r(o){return[...o].map(a=>{if(a.type===CSSRule.FONT_FACE_RULE)return n.push(a.cssText),\"\";if(a.type===CSSRule.STYLE_RULE){let l=a;return x(l.selectorText).map(p=>H(p,l.style,t)).join(`\n`)}let c=a.cssRules;return c&&!/^@(?:font-face|keyframes)/i.test(a.cssText)?a.cssText.slice(0,a.cssText.indexOf(\"{\")+1)+r(c)+\"}\":a.cssText}).join(`\n`)}let i=r(s.cssRules);return n.join(`\n`)+`\n@scope {\n`+i+`\n}`}function R(e,t,s){let n=t.get(e.href);return n||(n=s.fetchStylesheet(e).then(r=>g(r,e.href,s.origin)),t.set(e.href,n)),n}async function P(e,t,s,n,r){let i=\"\";for(let o of e)if(o.tagName===\"STYLE\")i+=g(o.textContent??\"\",t,r.origin)+`\n`;else{let a=new URL(o.getAttribute(\"href\")??\"\",t);if(a.origin!==r.origin)throw new Error(s);i+=await R(a,n,r)+`\n`}return i}function w(e,t,s){let n=e.createElement(\"style\");return n.dataset[t]=\"\",n.textContent=s,n}async function $(e,t,s,n,r){let i=await P(e.querySelectorAll('style,link[rel=\"stylesheet\"]'),s,\"\u8BF7\u5148\u5C06\u5B57\u4F53\u548C\u6837\u5F0F\u4FDD\u5B58\u5230\u5DE5\u7A0B\u5185\",n,r);t.querySelectorAll('style,link[rel=\"stylesheet\"]').forEach(o=>o.remove()),t.prepend(w(e,\"popostStyle\",S(i,t)))}async function D(e,t,s,n,r){let i=await P(e.head.querySelectorAll('style,link[rel=\"stylesheet\"]'),s,\"\u672C\u5730\u6837\u5F0F\u6587\u4EF6\u4E0D\u53EF\u6307\u5411\u7AD9\u5916\",n,r);t.querySelectorAll(\"style[data-popost-head-style]\").forEach(o=>o.remove()),i.trim()&&t.append(w(e,\"popostHeadStyle\",S(i,t)))}function q(e,t,s){for(let n of[e,...e.querySelectorAll(\"*\")]){for(let r of[\"src\",\"href\",\"poster\"])n.hasAttribute(r)&&n.setAttribute(r,y(n.getAttribute(r)??\"\",t,s));n.hasAttribute(\"style\")&&n.setAttribute(\"style\",g(n.getAttribute(\"style\")??\"\",t,s))}}function k(e,t){e.classList.add(\"slide\"),e.dataset.popostPage=t.id,e.dataset.popostWidth=String(t.width),e.dataset.popostHeight=String(t.height),e.dataset.popostName=t.name||t.id,e.style.width=t.width+\"px\",e.style.height=t.height+\"px\",e.style.position||(e.style.position=\"relative\"),e.style.overflow||(e.style.overflow=\"hidden\")}async function _(e,t,s){let n=f(e.html),r=n.querySelector(\".slide[data-popost-page],.post,.page\");if(!r)throw new Error(`\u9875\u9762 ${e.id} \u7F3A\u5C11 .post/.page \u753B\u5E03\u6839\u8282\u70B9`);let i=new URL(e.htmlPath,s.origin+\"/\").href;return r.hasAttribute(\"data-popost-page\")?await D(n,r,i,t,s):await $(n,r,i,t,s),q(r,i,s.origin),k(r,e),r.outerHTML}var j='<!doctype html><html><head><meta charset=\"utf-8\"><style>html,body{margin:0;padding:0}.slide{box-sizing:border-box}</style></head><body>';async function E(e,t){let s=new Map,n=await Promise.all(e.pages.map(r=>_(r,s,t)));return j+n.join(`\n`)+\"</body></html>\"}function I(){return\"p-\"+crypto.randomUUID().replace(/-/g,\"\").slice(0,12)}function U(e,t,s){let n=e.dataset.popostPage;return(!n||!/^[\\w-]{1,64}$/.test(n)||t.has(n))&&(n=s()),t.add(n),e.dataset.popostPage=n,n}function N(e){let t=new Set;return e.replace(/@font-face\\s*\\{[^{}]*\\}/gi,s=>{let n=s.replace(/\\s+/g,\" \").trim();return t.has(n)?\"\":(t.add(n),s)})}function F(e,t){let s=e.head.cloneNode(!0);s.querySelectorAll(\"script,base,meta[http-equiv]\").forEach(r=>r.remove());let n='<!doctype html><html><head><meta charset=\"utf-8\">'+s.innerHTML+'</head><body style=\"margin:0\">'+t.outerHTML+\"</body></html>\";return N(n)}function b(e,t){let s=f(e),n=[...s.querySelectorAll(\".slide\")].filter(o=>!o.parentElement?.closest(\".slide\"));if(!n.length)throw new Error(\"\u8BF7\u81F3\u5C11\u4FDD\u7559\u4E00\u9875\u56FE\u6587\");let r=new Set,i=t.newPageId??I;return n.map((o,a)=>{let c=U(o,r,i),l=t.previousPages.find(C=>C.id===c),p=Number(o.dataset.popostWidth||l?.width||t.defaultSize.width),d=Number(o.dataset.popostHeight||l?.height||t.defaultSize.height);return o.style.width=p+\"px\",o.style.height=d+\"px\",{id:c,name:o.dataset.popostName||`Page ${a+1}`,width:p,height:d,role:l?.role||\"content\",html:F(s,o)}})}var T=window,m=async e=>{try{return{ok:!0,value:await e()}}catch(t){return{ok:!1,error:t instanceof Error?t.message:String(t)}}},h=e=>new DOMParser().parseFromString(e,\"text/html\"),O=\"script,iframe,object,embed,base,form,meta[http-equiv]\",z=/^\\s*javascript:/i,W=e=>{let t=h(e);t.querySelectorAll(O).forEach(s=>s.remove());for(let s of t.querySelectorAll(\"*\"))for(let n of s.getAttributeNames()){let r=s.getAttribute(n)??\"\",i=n===\"href\"||n===\"src\"||n===\"xlink:href\"||n===\"poster\";(/^on/i.test(n)||i&&z.test(r))&&s.removeAttribute(n)}return\"<!doctype html>\"+t.documentElement.outerHTML},v=(e,t)=>E({pages:e.map(s=>({...s,html:W(s.html)}))},{origin:t,fetchStylesheet:s=>T.__popostReadStylesheet(s.href)}),L=e=>[...e.querySelectorAll(\".slide\")].filter(t=>!t.parentElement?.closest(\".slide\")),u=e=>{let t=e.cloneNode(!0);return t.removeAttribute(\"data-popost-name\"),t.outerHTML},V=()=>\"p-\"+[...crypto.getRandomValues(new Uint8Array(6))].map(t=>t.toString(16).padStart(2,\"0\")).join(\"\"),Y=(e,t,s)=>m(()=>({pages:b(e,{previousPages:t,defaultSize:s,newPageId:V}),signatures:L(h(e)).map(u)})),B=e=>{let t=e.cloneNode(!0);return t.querySelectorAll(\"style[data-popost-head-style]\").forEach(s=>s.remove()),[...new Set([u(e),u(t)])]},G=(e,t)=>m(async()=>{let s={};for(let n of e)try{let[r]=L(h(await v([n],t)));s[n.id]=r?B(r):null}catch{s[n.id]=null}return s});T.__popostDeck={compile:(e,t)=>m(()=>v(e,t)),split:Y,baseline:G};})();\n";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Runtime } from '../runtime';
|
|
2
|
+
import type { DeckSession } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A session over Chromium (`rt.launchBrowser`) for the project at `root`. The browser is closed when `fn` ends and at once
|
|
5
|
+
* when the host aborts the command (`rt.signal`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const chromeSession: (rt: Runtime, root: string) => DeckSession;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Runtime } from '../runtime';
|
|
2
|
+
import type { DeckSession } from './types';
|
|
3
|
+
export interface ExportDeckOptions {
|
|
4
|
+
/** Where to write the document, relative to the working directory. Default `<project>/exports/deck.html`. */
|
|
5
|
+
readonly out?: string;
|
|
6
|
+
/** Replaces the Chromium-backed converter (tests). */
|
|
7
|
+
readonly session?: DeckSession;
|
|
8
|
+
}
|
|
9
|
+
export interface ExportDeckResult {
|
|
10
|
+
/** Absolute path of the written document. */
|
|
11
|
+
readonly file: string;
|
|
12
|
+
readonly pages: number;
|
|
13
|
+
/** The document itself, so a host need not read the file back. */
|
|
14
|
+
readonly html: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Write the editor document of the project at `dir` (relative to `rt.cwd`). Throws `ValueError` for a page the editor
|
|
18
|
+
* cannot compile (no canvas root, an external resource, a stylesheet that is not in the project) and `ProjectError` for a
|
|
19
|
+
* directory that is not a project.
|
|
20
|
+
*/
|
|
21
|
+
export declare const exportDeck: (rt: Runtime, dir: string, options?: ExportDeckOptions) => Promise<ExportDeckResult>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Runtime } from '../runtime';
|
|
2
|
+
import type { DeckSession } from './types';
|
|
3
|
+
export interface ImportDeckOptions {
|
|
4
|
+
/** Replaces the Chromium-backed converter (tests). */
|
|
5
|
+
readonly session?: DeckSession;
|
|
6
|
+
}
|
|
7
|
+
export interface ImportDeckResult {
|
|
8
|
+
/** Pages in the project now. */
|
|
9
|
+
readonly pages: number;
|
|
10
|
+
/** Existing pages whose content changed (files rewritten, reviews and renders dropped). */
|
|
11
|
+
readonly changed: string[];
|
|
12
|
+
readonly added: string[];
|
|
13
|
+
readonly removed: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Bring the project at `dir` (relative to `rt.cwd`) in line with an editor document. Throws `ValueError` for a document
|
|
17
|
+
* without a slide or with a bad page size, `ProjectError` for a directory that is not a project. A document that matches
|
|
18
|
+
* the project writes nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare const importDeck: (rt: Runtime, dir: string, html: string, options?: ImportDeckOptions) => Promise<ImportDeckResult>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PageEntry, Project } from '../core/project';
|
|
2
|
+
import type { DeckPage } from './types';
|
|
3
|
+
/** One manifest page with its HTML read from the project. */
|
|
4
|
+
export declare const loadDeckPage: (project: Project, entry: PageEntry) => Promise<DeckPage>;
|
|
5
|
+
/** Every page of the manifest, in manifest order. */
|
|
6
|
+
export declare const loadDeckPages: (project: Project) => Promise<DeckPage[]>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shapes `popost deck` passes between the host side (Node, over `Runtime`) and the converter, which runs the editor's
|
|
3
|
+
* own `compileProject` / `splitProject` (`packages/canvas-editor/src/storage/compile.ts`) inside Chromium (`engine.ts`).
|
|
4
|
+
* They mirror the editor's `ManifestPage`, `PreviousPage` and `SplitPage`.
|
|
5
|
+
*/
|
|
6
|
+
export interface DeckSize {
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly height: number;
|
|
9
|
+
}
|
|
10
|
+
/** A project page as the editor's `compileProject` takes it. */
|
|
11
|
+
export interface DeckPage extends DeckSize {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly role?: string;
|
|
15
|
+
/** Page file path relative to the project root, e.g. `pages/p1.html`. */
|
|
16
|
+
readonly htmlPath: string;
|
|
17
|
+
readonly html: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DeckPreviousPage extends DeckSize {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly role?: string;
|
|
22
|
+
}
|
|
23
|
+
/** One top-level `.slide` of an editor document, as a project page. */
|
|
24
|
+
export interface DeckSplitPage extends DeckSize {
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly role: string;
|
|
28
|
+
/** A complete page document for `pages/<id>.html`. */
|
|
29
|
+
readonly html: string;
|
|
30
|
+
}
|
|
31
|
+
export interface DeckSplit {
|
|
32
|
+
readonly pages: readonly DeckSplitPage[];
|
|
33
|
+
/** One per page of `pages`, same order: the slide as the document has it, to compare with `baseline`. */
|
|
34
|
+
readonly signatures: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
/** What turns a project into an editor document and back. The default runs in Chromium; tests may pass their own. */
|
|
37
|
+
export interface DeckEngine {
|
|
38
|
+
/** The editor document of `pages` (in order). Throws `ValueError` for a page that cannot be compiled. */
|
|
39
|
+
compile(pages: readonly DeckPage[]): Promise<string>;
|
|
40
|
+
/** The pages of an editor document. Throws `ValueError` when it has no slide. */
|
|
41
|
+
split(content: string, previousPages: readonly DeckPreviousPage[], defaultSize: DeckSize): Promise<DeckSplit>;
|
|
42
|
+
/**
|
|
43
|
+
* Each page's slide as `compile` writes it now, in the form of `DeckSplit.signatures`: every form an unedited slide of that
|
|
44
|
+
* page may have in a document (the current one first); `null` when the page does not compile.
|
|
45
|
+
*/
|
|
46
|
+
baseline(pages: readonly DeckPage[]): Promise<Record<string, readonly string[] | null>>;
|
|
47
|
+
}
|
|
48
|
+
/** Runs `fn` with an engine and releases whatever the engine holds (the browser) afterwards. */
|
|
49
|
+
export type DeckSession = <T>(fn: (engine: DeckEngine) => Promise<T>) => Promise<T>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CredentialsLocation } from './credentials';
|
|
2
|
+
import type { Runtime } from './runtime';
|
|
3
|
+
export interface DeviceGrant {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
deviceCode: string;
|
|
6
|
+
publicKey: string;
|
|
7
|
+
privateKey: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const deviceLocation: (rt: CredentialsLocation) => string | undefined;
|
|
10
|
+
export declare const parseDeviceGrant: (value: string) => DeviceGrant;
|
|
11
|
+
export declare const deviceApi: <T>(fetcher: Runtime["fetch"], baseUrl: string, route: string, payload: unknown) => Promise<T>;
|
|
12
|
+
export declare const deviceTokenProvider: (grant: DeviceGrant, fetcher: Runtime["fetch"]) => (baseUrl: string) => Promise<string>;
|
|
13
|
+
export declare const login: (rt: Runtime, requestedBase?: string, noOpen?: boolean) => Promise<number>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local disk state of the shared project canvas (port of `canvas_bridge.py`): the project as the editor sees it (manifest
|
|
3
|
+
* with every page's HTML), its revision, the first-open snapshot, a short history, feedback notes, and the editor's HTML
|
|
4
|
+
* page with the deployment settings injected. State lives in the project, never only in the browser.
|
|
5
|
+
*/
|
|
6
|
+
import type { Manifest, Project } from '../core/project';
|
|
7
|
+
export type ProjectPayload = Manifest & {
|
|
8
|
+
pages: (Manifest['pages'][number] & {
|
|
9
|
+
html: string;
|
|
10
|
+
})[];
|
|
11
|
+
};
|
|
12
|
+
export declare const STATE_DIR = ".popost-editor";
|
|
13
|
+
/** Python `json.dumps(sort_keys=True)`: the same value always gives the same text, whatever the key order. */
|
|
14
|
+
export declare const stableJson: (value: unknown) => string;
|
|
15
|
+
export declare const canvasPayload: (project: Project) => Promise<ProjectPayload>;
|
|
16
|
+
/** Changes whenever any page file, font entry or manifest field changes: the editor echoes it back on save. */
|
|
17
|
+
export declare const payloadRevision: (payload: ProjectPayload) => string;
|
|
18
|
+
export declare const canvasRevision: (project: Project) => Promise<string>;
|
|
19
|
+
/** The project as it was when the editor first opened it (kept even after pages are deleted). */
|
|
20
|
+
export declare const canvasInitial: (project: Project) => Promise<{
|
|
21
|
+
manifest: ProjectPayload;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}>;
|
|
24
|
+
/** Keep the project as it was before a save; only the newest few are retained. */
|
|
25
|
+
export declare const canvasBackup: (project: Project) => Promise<void>;
|
|
26
|
+
export declare class NoteError extends Error {
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
type Note = Record<string, unknown>;
|
|
30
|
+
export interface NoteOperation {
|
|
31
|
+
op: string;
|
|
32
|
+
note?: Note;
|
|
33
|
+
id?: unknown;
|
|
34
|
+
patch?: Note;
|
|
35
|
+
}
|
|
36
|
+
/** Feedback notes of the project; `operations` (add / update / delete) are applied and saved first. */
|
|
37
|
+
export declare const canvasNotes: (project: Project, operations?: readonly NoteOperation[]) => Promise<{
|
|
38
|
+
notes: Note[];
|
|
39
|
+
command: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** The editor's `index.html` with this project's settings injected; the editor's own HTML/CSS/JS stays shared. */
|
|
42
|
+
export declare const editorHtml: (project: Project, source: string, query?: string, cloud?: "keyed" | "anonymous" | "off") => string;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type CloudMode } from '../cloud/service';
|
|
2
|
+
import type { Project } from '../core/project';
|
|
3
|
+
import type { Runtime } from '../runtime';
|
|
4
|
+
/** The editor build's version (`packages/canvas-editor/src/version.ts`); a service of another version is not reused. */
|
|
5
|
+
export declare const EDITOR_VERSION = "4.1.2";
|
|
6
|
+
export declare const editorInfo: (project: Project) => {
|
|
7
|
+
schema: string;
|
|
8
|
+
version: string;
|
|
9
|
+
projectId: string;
|
|
10
|
+
projectIdentity: string;
|
|
11
|
+
capabilities: string[];
|
|
12
|
+
};
|
|
13
|
+
/** What the handoff says about cloud save: how this service syncs and, once it did, where the work is on the web. */
|
|
14
|
+
export interface CloudHandoff {
|
|
15
|
+
readonly mode: CloudMode;
|
|
16
|
+
readonly state: string;
|
|
17
|
+
readonly webUrl?: string;
|
|
18
|
+
readonly deckId?: string;
|
|
19
|
+
readonly error?: {
|
|
20
|
+
readonly code: string;
|
|
21
|
+
readonly message: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const handoff: (rt: Runtime, project: Project, origin: string, host?: string, reused?: boolean, cloud?: CloudHandoff) => Record<string, unknown>;
|
|
25
|
+
/** Reuse this project's running editor service or start a detached one, and describe how to open it. */
|
|
26
|
+
export declare const presentLocal: (rt: Runtime, project: Project, host: string, port: number, cloud?: boolean, fallback?: CloudHandoff["error"]) => Promise<Record<string, unknown>>;
|
|
27
|
+
/**
|
|
28
|
+
* `present`: the host's own editor, the workbench tied to a configured key, or a local service.
|
|
29
|
+
* A host's answer is the command's JSON as it is.
|
|
30
|
+
*/
|
|
31
|
+
export declare const present: (rt: Runtime, project: Project, host: string, port: number, cloud?: boolean) => Promise<Record<string, unknown>>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the editor service exchanges with a transport: a plain request and a plain response, so every route is an
|
|
3
|
+
* ordinary async function over `rt.fs` that a test can call without a socket (`server.ts` adapts Node's `http` to it).
|
|
4
|
+
*/
|
|
5
|
+
import type { CloudService } from '../cloud/service';
|
|
6
|
+
import type { Project } from '../core/project';
|
|
7
|
+
import type { Runtime } from '../runtime';
|
|
8
|
+
export interface ApiRequest {
|
|
9
|
+
readonly method: string;
|
|
10
|
+
/** Path as received (percent-encoded), no query. */
|
|
11
|
+
readonly path: string;
|
|
12
|
+
readonly rawQuery: string;
|
|
13
|
+
readonly query: URLSearchParams;
|
|
14
|
+
/** Header names are lower case. */
|
|
15
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
16
|
+
readonly body: Uint8Array;
|
|
17
|
+
/** The loopback port the service listens on. */
|
|
18
|
+
readonly port: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ApiResponse {
|
|
21
|
+
readonly status: number;
|
|
22
|
+
readonly headers: Record<string, string>;
|
|
23
|
+
readonly body: Uint8Array | string;
|
|
24
|
+
}
|
|
25
|
+
export interface Preview {
|
|
26
|
+
readonly at: number;
|
|
27
|
+
readonly body: string;
|
|
28
|
+
readonly csp: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ServiceState {
|
|
31
|
+
/** The project being served; `import-project` switches it. */
|
|
32
|
+
root: string;
|
|
33
|
+
/** `/_preview/<id>.html` -> sanitized document, kept in memory for a few minutes. */
|
|
34
|
+
readonly previews: Map<string, Preview>;
|
|
35
|
+
/** Cloud save: login flows, the upload credential, the button's phase and the background pushes. */
|
|
36
|
+
readonly cloud: CloudService;
|
|
37
|
+
}
|
|
38
|
+
export interface Ctx {
|
|
39
|
+
readonly rt: Runtime;
|
|
40
|
+
readonly state: ServiceState;
|
|
41
|
+
readonly req: ApiRequest;
|
|
42
|
+
/** The project, re-read from disk: an agent or another window may have changed it. */
|
|
43
|
+
readonly load: () => Promise<Project>;
|
|
44
|
+
/** Run `fn` after every earlier locked call finished: project reads-modify-writes never interleave. */
|
|
45
|
+
readonly locked: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
46
|
+
}
|
|
47
|
+
export declare const jsonResponse: (req: ApiRequest, status: number, value: unknown) => ApiResponse;
|
|
48
|
+
/** A file reply; zips and PNGs are offered as downloads. */
|
|
49
|
+
export declare const fileResponse: (data: Uint8Array, contentType: string, downloadName?: string) => ApiResponse;
|
|
50
|
+
export declare const noStoreResponse: (body: Uint8Array | string, contentType: string, extra?: Record<string, string>) => ApiResponse;
|
|
51
|
+
/** A request the caller got wrong: the Python `ValueError` / `SyntaxError` family. */
|
|
52
|
+
export declare const isBadRequest: (error: unknown) => boolean;
|
|
53
|
+
export declare const errorMessage: (error: unknown) => string;
|
|
54
|
+
/** Parse a JSON body that must be an object. */
|
|
55
|
+
export declare const parseJsonObject: (req: ApiRequest) => Record<string, unknown>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Project } from '../core/project';
|
|
2
|
+
import { type ApiResponse, type Ctx } from './http-types';
|
|
3
|
+
export declare const hasComparison: (project: Project) => boolean;
|
|
4
|
+
/** Match explicitly mapped pages first, then bind unassigned images in the order they were registered. */
|
|
5
|
+
export declare const localReferenceImages: (ctx: Ctx) => Promise<ApiResponse>;
|
|
6
|
+
export declare const localReferenceImage: (ctx: Ctx) => Promise<ApiResponse>;
|
|
7
|
+
export declare const localProjectAssets: (ctx: Ctx) => Promise<ApiResponse>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Local services must reject foreign Host headers, including after DNS rebinding. */
|
|
2
|
+
export declare const hostAllowed: (host: string | undefined, port: number) => boolean;
|
|
3
|
+
export declare const originAllowed: (headers: Readonly<Record<string, string>>, port: number) => boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ApiResponse, type Ctx } from './http-types';
|
|
2
|
+
export declare const CLOUD_DONE_PATH = "/cloud-done.html";
|
|
3
|
+
export declare const cloudStatus: (ctx: Ctx) => Promise<ApiResponse>;
|
|
4
|
+
export declare const cloudStart: (ctx: Ctx) => Promise<ApiResponse>;
|
|
5
|
+
export declare const cloudPush: (ctx: Ctx) => Promise<ApiResponse>;
|
|
6
|
+
export declare const cloudCallback: (ctx: Ctx) => ApiResponse;
|
|
7
|
+
export declare const cloudDone: () => ApiResponse;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Drop `@import`, external `url()`, `expression()` and `javascript:` from CSS text. */
|
|
2
|
+
export declare const cleanCss: (css: string) => string;
|
|
3
|
+
interface SanitizeOptions {
|
|
4
|
+
/** Preview only: `<base>` and `<meta http-equiv>` are dropped (the server sets its own base). */
|
|
5
|
+
readonly preview?: boolean;
|
|
6
|
+
/** Preview only: an inline `<script nonce=N>` with this nonce (and no `src`) is kept. */
|
|
7
|
+
readonly nonce?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const sanitizeHtml: (html: string, options?: SanitizeOptions) => string;
|
|
10
|
+
/** A document for the editor's preview frame, and the `Content-Security-Policy` it must be served with. */
|
|
11
|
+
export declare const previewHtml: (content: string, nonce: string | null) => {
|
|
12
|
+
body: string;
|
|
13
|
+
csp: string;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Project } from '../core/project';
|
|
2
|
+
/** A request the caller got wrong (HTTP 400); named like the Python `ValueError` it replaces. */
|
|
3
|
+
export declare class SaveError extends Error {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SavedPage {
|
|
7
|
+
id: string;
|
|
8
|
+
sha256: string;
|
|
9
|
+
}
|
|
10
|
+
/** Validate and write all pages of `data` (`{pages: [{id, name?, width?, height?, role?, html}]}`). */
|
|
11
|
+
export declare const savePayload: (project: Project, data: unknown) => Promise<SavedPage[]>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CloudOptions } from '../cloud/service';
|
|
2
|
+
import { Project } from '../core/project';
|
|
3
|
+
import type { Runtime } from '../runtime';
|
|
4
|
+
import { type ServiceState } from './http-types';
|
|
5
|
+
/** A project bundle may be large, but not unbounded. */
|
|
6
|
+
export declare const MAX_BODY_BYTES: number;
|
|
7
|
+
/** The state of one service: the served project, its previews and its cloud-save state. */
|
|
8
|
+
export declare const createServiceState: (rt: Runtime, root: string, cloud?: CloudOptions) => ServiceState;
|
|
9
|
+
/** Run calls one after another, so a read-modify-write of the project never interleaves with another. */
|
|
10
|
+
export declare const createLock: () => (<T>(fn: () => Promise<T>) => Promise<T>);
|
|
11
|
+
/**
|
|
12
|
+
* Serve `project` on `127.0.0.1:<port>` (0 picks a free port) until the process is stopped or `rt.signal` aborts. The
|
|
13
|
+
* first line on stdout is `{"ok": true, "listening": url, "project": dir}`: `present` reads it from the service log.
|
|
14
|
+
*/
|
|
15
|
+
export declare const serveProject: (rt: Runtime, project: Project, port: number, cloud?: CloudOptions) => Promise<number>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run another CLI command in the same runtime and read its JSON answer, so the editor server and `export --final` use
|
|
3
|
+
* the `package`, `unpack` and `build` commands through their public contract instead of their internals.
|
|
4
|
+
*/
|
|
5
|
+
import type { Runtime } from '../runtime';
|
|
6
|
+
export interface SubcommandResult {
|
|
7
|
+
readonly code: number;
|
|
8
|
+
/** The JSON document the command printed, or `null` when it printed none. */
|
|
9
|
+
readonly json: Record<string, unknown> | null;
|
|
10
|
+
}
|
|
11
|
+
export declare const runSubcommand: (rt: Runtime, argv: readonly string[]) => Promise<SubcommandResult>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Runtime } from '../runtime';
|
|
2
|
+
export interface InstalledRole {
|
|
3
|
+
id: string;
|
|
4
|
+
family: string;
|
|
5
|
+
cssPath: string;
|
|
6
|
+
licensePath: string;
|
|
7
|
+
fileCount: number;
|
|
8
|
+
totalBytes: number;
|
|
9
|
+
label: string;
|
|
10
|
+
license: Record<string, unknown>;
|
|
11
|
+
package: string;
|
|
12
|
+
packageVersion: string;
|
|
13
|
+
}
|
|
14
|
+
export interface InstallResult {
|
|
15
|
+
installed: InstalledRole[];
|
|
16
|
+
manifestPath: string;
|
|
17
|
+
cssAggregatePath: string;
|
|
18
|
+
totalBytes: number;
|
|
19
|
+
totalInstalled: number;
|
|
20
|
+
}
|
|
21
|
+
/** Install the comma-separated role ids into `projectPath` (created when missing). */
|
|
22
|
+
export declare const installProject: (rt: Runtime, rolesCsv: string, projectPath: string) => Promise<InstallResult>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The font library manifest (`assets/fonts/palette.json`): the one list every font menu, install and licence check is
|
|
3
|
+
* built from. The npm package ships the manifest, the per-role CSS and LICENSE files; the `.woff2` files are found next to
|
|
4
|
+
* it when the Skill comes from a checkout, and downloaded otherwise (`source.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { Runtime } from '../runtime';
|
|
7
|
+
export interface FontRole {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
family: string;
|
|
11
|
+
cssPath: string;
|
|
12
|
+
licensePath: string;
|
|
13
|
+
fileCount: number;
|
|
14
|
+
totalBytes: number;
|
|
15
|
+
package: string;
|
|
16
|
+
packageVersion: string;
|
|
17
|
+
license: {
|
|
18
|
+
spdx: string;
|
|
19
|
+
path: string;
|
|
20
|
+
sha256: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
/** `.woff2` file name -> sha256. */
|
|
24
|
+
assetSha256: Record<string, string>;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface Palette {
|
|
28
|
+
version: string;
|
|
29
|
+
roles: FontRole[];
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface FontLibrary {
|
|
33
|
+
readonly palette: Palette;
|
|
34
|
+
/** First 12 hex chars of sha256(palette.json): the version segment of the public font bucket. */
|
|
35
|
+
readonly digest: string;
|
|
36
|
+
/** `<skillRoot>/assets/fonts`. */
|
|
37
|
+
readonly dir: string;
|
|
38
|
+
}
|
|
39
|
+
export declare class FontError extends Error {
|
|
40
|
+
name: string;
|
|
41
|
+
}
|
|
42
|
+
/** An unknown role id: a caller mistake (HTTP 400), named like the Python `ValueError`. */
|
|
43
|
+
export declare class UnknownRoleError extends FontError {
|
|
44
|
+
name: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const loadLibrary: (rt: Runtime) => Promise<FontLibrary>;
|
|
47
|
+
export declare const listRoles: (rt: Runtime) => Promise<FontRole[]>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fonts as a project sees them: `font install` (CLI) and `POST /api/font-install` (local editor) both put the chosen
|
|
3
|
+
* roles into the project, record them in `manifest.fonts`, and - unless the caller keeps the pages untouched - link their
|
|
4
|
+
* CSS from every page.
|
|
5
|
+
*/
|
|
6
|
+
import type { Project } from '../core/project';
|
|
7
|
+
import type { Runtime } from '../runtime';
|
|
8
|
+
import { type InstallResult } from './install';
|
|
9
|
+
/** A previously injected font stylesheet link (self-closed or not). */
|
|
10
|
+
export declare const FONT_LINK: RegExp;
|
|
11
|
+
export declare const fontLinkTag: (cssPath: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* `html` with the font links replaced by `links`: before `</head>`; a page without it gets them after an open `<head>`,
|
|
14
|
+
* before `<body`, or before its first tag (browsers hoist a `<link>` into the head). Links the page already had are replaced,
|
|
15
|
+
* so a page that has exactly these links comes back identical.
|
|
16
|
+
*/
|
|
17
|
+
export declare const withFontLinks: (html: string, links: string) => string;
|
|
18
|
+
/**
|
|
19
|
+
* The `<link>` tags of every installed font, as a page has them; empty when the project has no fonts. With the page's
|
|
20
|
+
* `html`, a font whose family the page embeds as `@font-face` is left out.
|
|
21
|
+
*/
|
|
22
|
+
export declare const installedFontLinks: (project: Project, html?: string) => string;
|
|
23
|
+
/** What `linkInstalledFonts` did: the pages it changed and, defensively, the ones it could not read or write. */
|
|
24
|
+
export interface FontLinkReport {
|
|
25
|
+
linked: string[];
|
|
26
|
+
failed?: {
|
|
27
|
+
page: string;
|
|
28
|
+
reason: string;
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Every page (or just `only`) gets a link for every installed font, replacing the links it had. Returns the pages that
|
|
33
|
+
* changed; a page that already has exactly these links is not written.
|
|
34
|
+
*/
|
|
35
|
+
export declare const linkInstalledFonts: (project: Project, only?: readonly string[]) => Promise<FontLinkReport>;
|
|
36
|
+
/**
|
|
37
|
+
* A warning for each installed `cjk-*` role when the project's copy language is known and not Chinese: the export carries the
|
|
38
|
+
* CSS a page links on every page, and the Chinese stylesheets are large. Only a warning, the roles are installed anyway; an
|
|
39
|
+
* unknown language (nothing saved by `settings`) warns about nothing.
|
|
40
|
+
*/
|
|
41
|
+
export declare const cjkFontWarnings: (project: Project, roleIds: readonly string[]) => string[];
|
|
42
|
+
export interface FontInstall {
|
|
43
|
+
result: InstallResult;
|
|
44
|
+
fontLinks: FontLinkReport;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Install `rolesCsv` into the project and save the manifest. With `injectLinks`, every page gets a link for every installed
|
|
48
|
+
* font (`fontLinks` says which pages changed); the editor passes `false` so its unsaved canvas keeps its own font CSS.
|
|
49
|
+
*/
|
|
50
|
+
export declare const installFonts: (rt: Runtime, project: Project, rolesCsv: string, injectLinks: boolean) => Promise<FontInstall>;
|
|
51
|
+
/** `installFonts` for callers that only need what was installed. */
|
|
52
|
+
export declare const installFontsIntoProject: (rt: Runtime, project: Project, rolesCsv: string, injectLinks: boolean) => Promise<InstallResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Runtime } from '../runtime';
|
|
2
|
+
import { type FontLibrary } from './palette';
|
|
3
|
+
export declare const DEFAULT_FONT_BASE_URL = "https://static.popost.ai/fonts/popost";
|
|
4
|
+
/** The bytes of `relPath` (relative to the font library root, forward slashes); `hash` is checked when given. */
|
|
5
|
+
export declare const readFontAsset: (rt: Runtime, lib: FontLibrary, relPath: string, hash?: string) => Promise<Uint8Array>;
|
|
6
|
+
/** `fn` over `items` with at most `limit` running at once; results keep the order of `items`. */
|
|
7
|
+
export declare const mapLimit: <T, R>(items: readonly T[], limit: number, fn: (item: T) => Promise<R>) => Promise<R[]>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `image quote` and `image run` share when they take several jobs at once: reading the job files, the bounded
|
|
3
|
+
* pool that runs them side by side, and how a failure of one job is reported without touching the others.
|
|
4
|
+
*/
|
|
5
|
+
import type { Project } from '../core/project';
|
|
6
|
+
import type { Runtime } from '../runtime';
|
|
7
|
+
import { type Job } from './jobs';
|
|
8
|
+
/**
|
|
9
|
+
* How many jobs go out at once unless told otherwise, and the most that may. The platform lets a user have four generations
|
|
10
|
+
* in flight (a fifth is refused outright, or made to wait, depending on the caller), so a larger pool would only turn
|
|
11
|
+
* jobs into refusals.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_CONCURRENCY = 4;
|
|
14
|
+
export declare const MAX_CONCURRENCY = 4;
|
|
15
|
+
/** What a batch command takes besides the jobs themselves. */
|
|
16
|
+
export interface BatchCall {
|
|
17
|
+
readonly config?: string;
|
|
18
|
+
readonly acceptUnknownCost: boolean;
|
|
19
|
+
readonly concurrency: number;
|
|
20
|
+
}
|
|
21
|
+
/** The one JSON document a batch prints, and its exit code. */
|
|
22
|
+
export interface BatchResult {
|
|
23
|
+
readonly document: Record<string, unknown>;
|
|
24
|
+
readonly code: number;
|
|
25
|
+
}
|
|
26
|
+
export interface Entry {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly path: string;
|
|
29
|
+
readonly job: Job;
|
|
30
|
+
}
|
|
31
|
+
/** Every job file of the project, by id. */
|
|
32
|
+
export declare const readEntries: (project: Project) => Promise<Entry[]>;
|
|
33
|
+
/** `a=quote, b=quote` for the jobs that hold a quote, for the messages that tell the caller which quote ids exist. */
|
|
34
|
+
export declare const boundQuotes: (entries: readonly Entry[]) => string;
|
|
35
|
+
/** `a,b,c` as a list of distinct ids; anything else about them is the caller's to check. */
|
|
36
|
+
export declare const splitList: (value: string, what: string) => string[];
|
|
37
|
+
/** The exit code and message of a job that failed with `error`: an input the caller can fix is 2, a bug is 1. */
|
|
38
|
+
export declare const failureOf: (error: unknown) => {
|
|
39
|
+
code: number;
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Runs `work` for every item, at most `limit` at a time, and returns the results in the order of the items. `work` must
|
|
44
|
+
* not throw (it reports a failure as its result), so one job can never cancel another. After the host cancelled, no
|
|
45
|
+
* further item is started and `cancelled` stands in for its result.
|
|
46
|
+
*/
|
|
47
|
+
export declare const runPool: <T, R>(rt: Runtime, items: readonly T[], limit: number, work: (item: T) => Promise<R>, cancelled: (item: T) => R) => Promise<R[]>;
|
|
48
|
+
/** The worst exit code of the failures (1 refused, 2 environment or input), or 0 when there are none. */
|
|
49
|
+
export declare const worstCode: (codes: readonly number[]) => number;
|
|
50
|
+
/** A batch has one billing service. Quote/run other services separately instead of adding their units. */
|
|
51
|
+
export declare const requireSingleProvider: (entries: readonly Entry[]) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `image quote` for several jobs (`--id a,b,c`, or `--all`): one free quote per job, taken side by side, then one list with
|
|
3
|
+
* every quote id and the total the user is asked to authorize. A failed quote stays that job's own; the others keep theirs.
|
|
4
|
+
*/
|
|
5
|
+
import type { Project } from '../core/project';
|
|
6
|
+
import { type BatchCall, type BatchResult } from './batch-jobs';
|
|
7
|
+
export declare const quoteBatch: (project: Project, dir: string, target: readonly string[] | "all", call: BatchCall) => Promise<BatchResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `image run` for several quoted jobs (`--quote-id q1,q2,q3`, or `--all-quoted`), side by side. Each job is exactly the
|
|
3
|
+
* single run it would have been: its own quote, idempotency key, ledger entry and job file, and an unknown outcome is
|
|
4
|
+
* never resubmitted. The pool only starts them together and collects one result per job; a job that fails neither
|
|
5
|
+
* cancels nor retries the others.
|
|
6
|
+
*/
|
|
7
|
+
import type { Project } from '../core/project';
|
|
8
|
+
import { type BatchCall, type BatchResult } from './batch-jobs';
|
|
9
|
+
export declare const runBatch: (project: Project, dir: string, target: readonly string[] | "all-quoted", call: BatchCall) => Promise<BatchResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Project } from '../core/project';
|
|
2
|
+
import type { JobProvider } from './jobs';
|
|
3
|
+
export interface ModelLimits {
|
|
4
|
+
/** The ratios the model declares (`16:9`); `undefined`: not known, or not restricted. */
|
|
5
|
+
readonly aspects?: readonly string[];
|
|
6
|
+
/** How many reference pictures a request may carry. */
|
|
7
|
+
readonly maxReferenceImages: number;
|
|
8
|
+
/** Why the live model list was not used, when it was wanted. */
|
|
9
|
+
readonly unavailable?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Limits of the model a job on this channel will use. A host channel generates elsewhere, so only the common limits apply. */
|
|
12
|
+
export declare const modelLimits: (project: Project, provider: JobProvider, config?: string) => Promise<ModelLimits>;
|