@astryxdesign/cli 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5cf5d69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -63
- package/api/build/_adapter.d.mts +51 -0
- package/api/build/_adapter.mjs +122 -6
- package/api/build/build.doc.mjs +1 -1
- package/api/build/build.mjs +23 -14
- package/api/build/build.type.d.mts +1 -1
- package/api/build/build.type.mjs +3 -3
- package/api/build/help/help.d.mts +15 -14
- package/api/build/help/help.mjs +62 -3
- package/api/build/kit/answer.mjs +2 -3
- package/api/build/kit/signals.d.mts +10 -0
- package/api/build/kit/signals.mjs +15 -2
- package/api/component/detail/blocks/blocks.mjs +2 -1
- package/api/discover/_adapter.d.mts +57 -6
- package/api/discover/_adapter.mjs +278 -49
- package/api/discover/_catalog-view.d.mts +7 -0
- package/api/discover/_catalog-view.mjs +10 -1
- package/api/discover/detail/detail.d.mts +3 -2
- package/api/discover/detail/detail.mjs +3 -2
- package/api/discover/detail/doc/doc.mjs +1 -1
- package/api/discover/discover.d.mts +24 -0
- package/api/discover/discover.doc.mjs +1 -1
- package/api/discover/discover.mjs +146 -25
- package/api/discover/discover.type.d.mts +6 -4
- package/api/discover/discover.type.mjs +6 -4
- package/api/discover/search/search.d.mts +22 -0
- package/api/discover/search/search.mjs +290 -70
- package/api/docs/_entry-names.mjs +4 -3
- package/api/doctor/_adapter.d.mts +43 -3
- package/api/doctor/_adapter.mjs +142 -18
- package/api/doctor/built-checks.d.mts +30 -3
- package/api/doctor/built-checks.mjs +132 -5
- package/api/doctor/doctor.d.mts +93 -6
- package/api/doctor/doctor.doc.mjs +2 -2
- package/api/doctor/doctor.mjs +524 -33
- package/api/doctor/doctor.type.d.mts +2 -1
- package/api/doctor/doctor.type.mjs +2 -1
- package/api/doctor/theme-checks.d.mts +19 -0
- package/api/doctor/theme-checks.mjs +74 -6
- package/api/hook/hook.type.d.mts +1 -1
- package/api/hook/hook.type.mjs +1 -1
- package/api/hook/list/list.mjs +11 -7
- package/api/icon/_adapter.d.mts +2 -1
- package/api/icon/_adapter.mjs +10 -15
- package/api/icon/_records.d.mts +3 -1
- package/api/icon/_records.mjs +30 -3
- package/api/icon/exportIconIndex.doc.mjs +1 -1
- package/api/icon/icon.doc.mjs +3 -3
- package/api/icon/icon.type.d.mts +32 -1
- package/api/icon/icon.type.mjs +19 -3
- package/api/icon/list/list.mjs +4 -1
- package/api/icon/rankIconIndex.doc.mjs +1 -1
- package/api/icon/search/icon-index.mjs +18 -8
- package/api/icon/search/search.d.mts +26 -3
- package/api/icon/search/search.mjs +155 -9
- package/api/init/_adapter.d.mts +14 -0
- package/api/init/_adapter.mjs +26 -4
- package/api/init/init.d.mts +1 -1
- package/api/init/init.doc.mjs +2 -2
- package/api/init/init.mjs +1 -1
- package/api/init/init.type.d.mts +29 -1
- package/api/init/init.type.mjs +14 -1
- package/api/init/run/run.d.mts +11 -1
- package/api/init/run/run.mjs +84 -5
- package/api/integration/_adapter.d.mts +5 -4
- package/api/integration/_adapter.mjs +7 -5
- package/api/integration/integrationCheck.doc.mjs +1 -1
- package/api/integration/pack-check.mjs +8 -9
- package/api/integration/validate-integration.d.mts +1 -1
- package/api/integration/validate-integration.mjs +26 -24
- package/api/integration/validate-integration.type.d.mts +5 -2
- package/api/integration/validate-integration.type.mjs +5 -2
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/render/_adapter.d.mts +4 -2
- package/api/render/_adapter.mjs +62 -21
- package/api/render/render.doc.mjs +8 -5
- package/api/render/render.mjs +1 -1
- package/api/render/render.type.d.mts +2 -0
- package/api/render/render.type.mjs +2 -0
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.d.mts +3 -0
- package/api/search/_candidate-score.mjs +36 -3
- package/api/search/_gather-docs.mjs +29 -2
- package/api/search/_gather-templates.mjs +2 -1
- package/api/search/_main-searcher.mjs +13 -0
- package/api/search/_named-keywords.d.mts +2 -1
- package/api/search/_named-keywords.mjs +48 -6
- package/api/search/_order.d.mts +36 -1
- package/api/search/_order.mjs +141 -3
- package/api/swizzle/list/list.mjs +8 -1
- package/api/swizzle/swizzle.type.d.mts +1 -1
- package/api/swizzle/swizzle.type.mjs +1 -1
- package/api/template/copy/copy.mjs +3 -4
- package/api/template/list/list.mjs +2 -1
- package/api/template/show/show.mjs +2 -1
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template.doc.mjs +1 -1
- package/api/template/template.mjs +19 -1
- package/api/template/template.type.d.mts +1 -0
- package/api/template/template.type.mjs +2 -1
- package/api/theme/_adapter.d.mts +1 -0
- package/api/theme/_adapter.mjs +3 -5
- package/api/theme/_app-provider.d.mts +42 -0
- package/api/theme/_app-provider.mjs +61 -27
- package/api/theme/build/build.d.mts +4 -10
- package/api/theme/build/build.mjs +165 -116
- package/api/theme/build/input-fields.d.mts +9 -0
- package/api/theme/build/input-fields.mjs +155 -16
- package/api/theme/build/radius-values.d.mts +18 -0
- package/api/theme/build/radius-values.mjs +76 -0
- package/api/theme/build/typography-values.mjs +7 -23
- package/api/theme/build/written-values.d.mts +18 -0
- package/api/theme/build/written-values.mjs +107 -31
- package/api/theme/eject/eject.mjs +6 -1
- package/api/theme/palette/generate/generator.mjs +24 -0
- package/api/theme/theme.type.d.mts +4 -2
- package/api/theme/theme.type.mjs +3 -2
- package/api/theme/themeBuild.doc.mjs +2 -2
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +40 -0
- package/api/theme-edit/_catalog.mjs +100 -22
- package/api/theme-edit/_check.mjs +213 -43
- package/api/theme-edit/_color.d.mts +14 -0
- package/api/theme-edit/_color.mjs +22 -0
- package/api/theme-edit/_compiler.mjs +52 -0
- package/api/theme-edit/_context.d.mts +20 -2
- package/api/theme-edit/_context.mjs +157 -29
- package/api/theme-edit/_edit.mjs +426 -58
- package/api/theme-edit/_how-question.d.mts +14 -0
- package/api/theme-edit/_how-question.mjs +1541 -127
- package/api/theme-edit/_how.mjs +43 -0
- package/api/theme-edit/_missed.mjs +107 -27
- package/api/theme-edit/_normal.d.mts +18 -4
- package/api/theme-edit/_normal.mjs +84 -3
- package/api/theme-edit/_palette.d.mts +9 -0
- package/api/theme-edit/_palette.mjs +158 -33
- package/api/theme-edit/_part-words.mjs +16 -3
- package/api/theme-edit/_parts.d.mts +8 -0
- package/api/theme-edit/_parts.mjs +120 -36
- package/api/theme-edit/_png.d.mts +24 -0
- package/api/theme-edit/_png.mjs +99 -0
- package/api/theme-edit/_preview-app.d.mts +16 -0
- package/api/theme-edit/_preview-app.mjs +52 -18
- package/api/theme-edit/_preview.d.mts +44 -26
- package/api/theme-edit/_preview.mjs +255 -67
- package/api/theme-edit/_project.d.mts +12 -1
- package/api/theme-edit/_project.mjs +16 -1
- package/api/theme-edit/_settings.d.mts +116 -0
- package/api/theme-edit/_settings.mjs +1197 -58
- package/api/theme-edit/_tables.d.mts +16 -0
- package/api/theme-edit/_tables.mjs +34 -4
- package/api/theme-edit/theme-edit.type.d.mts +15 -2
- package/api/theme-edit/theme-edit.type.mjs +8 -6
- package/api/upgrade/_adapter.d.mts +46 -7
- package/api/upgrade/_adapter.mjs +110 -15
- package/api/upgrade/registry/registry.d.mts +6 -3
- package/api/upgrade/registry/registry.mjs +21 -6
- package/api/upgrade/run/run.mjs +23 -11
- package/api/upgrade/upgrade.doc.mjs +4 -3
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +3 -2
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +4 -0
- package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
- package/assets/docs/tree/icon-sets.doc.mjs +6 -6
- package/assets/docs/tree/problems.doc.mjs +3 -3
- package/assets/docs/tree/render-pages.doc.mjs +17 -3
- package/assets/docs/tree/share-a-page.doc.mjs +5 -5
- package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
- package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +40 -5
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/installed-icon-set.doc.mjs +30 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
- package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
- package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +6 -2
- package/assets/templates/pages/ai-chat-landing/page.tsx +1 -1
- package/assets/templates/pages/blank/page.tsx +4 -2
- package/assets/templates/pages/canvas-editor/page.tsx +3 -1
- package/assets/templates/pages/centered-hero/page.tsx +1 -1
- package/assets/templates/pages/checkout-wizard/page.tsx +1 -1
- package/assets/templates/pages/classic-gallery/page.tsx +1 -1
- package/assets/templates/pages/contact-form/page.tsx +2 -2
- package/assets/templates/pages/course-detail/page.tsx +1 -1
- package/assets/templates/pages/dashboard/page.tsx +24 -8
- package/assets/templates/pages/dashboard-alert-rail/page.tsx +4 -2
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -3
- package/assets/templates/pages/dashboard-comparison/page.tsx +5 -2
- package/assets/templates/pages/dashboard-composition/page.tsx +10 -4
- package/assets/templates/pages/dashboard-progress/page.tsx +6 -3
- package/assets/templates/pages/dashboard-scorecard/page.tsx +17 -8
- package/assets/templates/pages/detail-page/page.tsx +22 -5
- package/assets/templates/pages/documentation/page.tsx +4 -2
- package/assets/templates/pages/documentation-design/page.tsx +5 -2
- package/assets/templates/pages/documentation-technical/page.tsx +4 -2
- package/assets/templates/pages/editor/page.tsx +28 -9
- package/assets/templates/pages/file-explorer/page.tsx +3 -1
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/form-wizard/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-dialog/page.tsx +3 -1
- package/assets/templates/pages/form-wizard-inline/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-vertical/page.tsx +1 -1
- package/assets/templates/pages/gallery-hero/page.tsx +1 -1
- package/assets/templates/pages/ide/page.tsx +7 -2
- package/assets/templates/pages/kanban-board/page.tsx +10 -4
- package/assets/templates/pages/library/page.tsx +31 -61
- package/assets/templates/pages/login/page.tsx +4 -2
- package/assets/templates/pages/login-card/page.tsx +4 -2
- package/assets/templates/pages/login-split/page.tsx +3 -2
- package/assets/templates/pages/login-sso/page.tsx +4 -4
- package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
- package/assets/templates/pages/payment-form/page.tsx +1 -1
- package/assets/templates/pages/product-detail/page.tsx +16 -4
- package/assets/templates/pages/product-gallery/page.tsx +1 -1
- package/assets/templates/pages/settings/page.tsx +10 -4
- package/assets/templates/pages/settings-dialog/page.tsx +5 -6
- package/assets/templates/pages/settings-sidebar/page.tsx +39 -13
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -2
- package/assets/templates/pages/table-filter/page.tsx +21 -6
- package/assets/templates/pages/table-grouped/page.tsx +23 -2
- package/assets/templates/pages/table-inbox/page.tsx +82 -32
- package/assets/templates/pages/theme-showcase/page.tsx +3 -2
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
- package/assets/templates/themes/butter/butterTheme.ts +197 -4
- package/assets/templates/themes/chocolate/chocolateTheme.ts +72 -8
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
- package/assets/templates/themes/gothic/gothicTheme.ts +114 -4
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
- package/assets/templates/themes/matcha/matchaTheme.ts +48 -12
- package/assets/templates/themes/neutral/neutralTheme.ts +29 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/stone/stoneTheme.ts +69 -0
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
- package/assets/templates/themes/y2k/y2kTheme.ts +249 -14
- package/authoring/codemod/parse.d.mts +0 -36
- package/authoring/codemod/parse.mjs +62 -41
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/config/parse.d.mts +0 -47
- package/authoring/config/parse.mjs +128 -103
- package/authoring/config/type.ts +4 -3
- package/authoring/debug/parse.d.mts +2 -2
- package/authoring/discover/parse.d.mts +2 -2
- package/authoring/discover/parse.mjs +52 -38
- package/authoring/discover/type.ts +2 -1
- package/authoring/doctypes/_schema.d.mts +834 -950
- package/authoring/doctypes/_schema.mjs +863 -825
- package/authoring/doctypes/command/parse.mjs +2 -2
- package/authoring/doctypes/component/parse.mjs +2 -2
- package/authoring/doctypes/enum/parse.mjs +2 -2
- package/authoring/doctypes/hook/parse.mjs +2 -2
- package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +1 -1
- package/authoring/doctypes/icon-definition/parse.d.mts +0 -24
- package/authoring/doctypes/icon-definition/parse.mjs +59 -43
- package/authoring/doctypes/icon-set/parse.d.mts +0 -75
- package/authoring/doctypes/icon-set/parse.mjs +239 -210
- package/authoring/doctypes/legacy.mjs +3 -3
- package/authoring/doctypes/namespace/parse.mjs +2 -2
- package/authoring/doctypes/reference/parse.mjs +2 -2
- package/authoring/doctypes/schema/parse.mjs +2 -2
- package/authoring/doctypes/template/parse.d.mts +0 -101
- package/authoring/doctypes/template/parse.mjs +131 -106
- package/authoring/doctypes/theme/parse.d.mts +0 -23
- package/authoring/doctypes/theme/parse.mjs +52 -36
- package/authoring/gap-report/parse.d.mts +1 -1
- package/authoring/integration/integration.doc.mjs +8 -0
- package/authoring/integration/schema.d.mts +14 -3
- package/authoring/integration/schema.mjs +20 -2
- package/authoring/integration/type.ts +14 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.mjs +27 -13
- package/clients/cli/commands/component.mjs +14 -3
- package/clients/cli/commands/discover.doc.mjs +2 -2
- package/clients/cli/commands/discover.mjs +20 -3
- package/clients/cli/commands/docs.doc.mjs +11 -9
- package/clients/cli/commands/docs.mjs +50 -21
- package/clients/cli/commands/experimental/icon.mjs +330 -227
- package/clients/cli/commands/experimental/render.mjs +16 -1
- package/clients/cli/commands/experimental/theme.mjs +42 -17
- package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon-map.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-render.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +36 -24
- package/clients/cli/commands/integration-check.doc.mjs +1 -1
- package/clients/cli/commands/mcp.doc.mjs +53 -0
- package/clients/cli/commands/mcp.mjs +51 -0
- package/clients/cli/commands/search.mjs +46 -9
- package/clients/cli/commands/template.mjs +3 -2
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +12 -2
- package/clients/cli/commands/upgrade.doc.mjs +3 -2
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/formatters/index.mjs +52 -6
- package/clients/cli/index.mjs +23 -17
- package/clients/cli/lib/base-gate.mjs +37 -5
- package/clients/cli/lib/define-command.mjs +82 -4
- package/clients/cli/lib/json-shim.mjs +61 -4
- package/clients/cli/lib/manifest.mjs +9 -1
- package/clients/cli/lib/mcp-server.mjs +286 -0
- package/clients/cli/lib/mcp-tools.mjs +405 -0
- package/clients/cli/lib/other-cli-words.mjs +99 -0
- package/clients/cli/lib/stray-option.mjs +27 -1
- package/clients/cli/lib/unknown-command.mjs +326 -11
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +49 -1
- package/foundation/agent-docs/agent-docs.mjs +108 -7
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core.d.mts +1 -1
- package/foundation/bases/core.mjs +3 -3
- package/foundation/bases/resolve.d.mts +4 -8
- package/foundation/bases/resolve.mjs +15 -21
- package/foundation/bases/state.d.mts +15 -9
- package/foundation/bases/state.mjs +33 -6
- package/foundation/config/project.d.mts +5 -4
- package/foundation/config/project.mjs +33 -17
- package/foundation/discovery/component-discovery.mjs +15 -28
- package/foundation/discovery/icon-imports.d.mts +66 -0
- package/foundation/discovery/icon-imports.mjs +225 -0
- package/foundation/discovery/icon-ranking.d.mts +12 -2
- package/foundation/discovery/icon-ranking.mjs +197 -10
- package/foundation/discovery/icon-set-checks.mjs +2 -1
- package/foundation/discovery/icon-set-discovery.d.mts +28 -0
- package/foundation/discovery/icon-set-discovery.mjs +42 -0
- package/foundation/discovery/icon-set-writer.d.mts +2 -11
- package/foundation/discovery/icon-set-writer.mjs +3 -29
- package/foundation/discovery/module-exports.d.mts +1 -1
- package/foundation/discovery/module-exports.mjs +136 -33
- package/foundation/discovery/name-roots.d.mts +5 -0
- package/foundation/discovery/name-roots.mjs +11 -0
- package/foundation/discovery/runner-allowlist.d.mts +1 -0
- package/foundation/discovery/runner-allowlist.mjs +2 -0
- package/foundation/discovery/runner-commands.mjs +1 -0
- package/foundation/discovery/template-adapter.d.mts +1 -1
- package/foundation/discovery/template-destination.d.mts +14 -6
- package/foundation/discovery/template-destination.mjs +42 -8
- package/foundation/discovery/template-icons.d.mts +45 -2
- package/foundation/discovery/template-icons.mjs +26 -54
- package/foundation/discovery/template-needs.d.mts +28 -2
- package/foundation/discovery/template-needs.mjs +92 -11
- package/foundation/discovery/theme-discovery.d.mts +8 -0
- package/foundation/discovery/theme-discovery.mjs +23 -6
- package/foundation/discovery/theme-imports.mjs +2 -4
- package/foundation/doc-compiler/parse-readable.mjs +4 -3
- package/foundation/doc-compiler/stored-docs.d.mts +13 -0
- package/foundation/doc-compiler/stored-docs.mjs +74 -3
- package/foundation/env/cli-command.d.mts +68 -10
- package/foundation/env/cli-command.mjs +116 -22
- package/foundation/env/project-scope.d.mts +9 -0
- package/foundation/env/project-scope.mjs +28 -2
- package/foundation/fs/gather-cache.d.mts +23 -0
- package/foundation/fs/gather-cache.mjs +94 -2
- package/foundation/fs/module-loader.d.mts +3 -1
- package/foundation/fs/module-loader.mjs +85 -5
- package/foundation/fs/read-record.mjs +9 -5
- package/foundation/identity/package-names.d.mts +18 -0
- package/foundation/identity/package-names.mjs +19 -0
- package/foundation/identity/providers.mjs +3 -2
- package/foundation/integrations/icon-features.d.mts +63 -0
- package/foundation/integrations/icon-features.mjs +54 -0
- package/foundation/integrations/integrations.d.mts +13 -1
- package/foundation/integrations/integrations.mjs +47 -6
- package/foundation/integrations/pack-state.d.mts +21 -0
- package/foundation/integrations/pack-state.mjs +42 -19
- package/foundation/integrations/validate-contributions.d.mts +11 -3
- package/foundation/integrations/validate-contributions.mjs +51 -13
- package/foundation/release/cache.d.mts +13 -1
- package/foundation/release/cache.mjs +94 -14
- package/foundation/release/notices.d.mts +15 -0
- package/foundation/release/notices.mjs +111 -7
- package/foundation/release/project.d.mts +3 -4
- package/foundation/release/project.mjs +5 -6
- package/foundation/render/client-bundle.d.mts +126 -0
- package/foundation/render/client-bundle.mjs +565 -0
- package/foundation/render/cut-short.d.mts +7 -1
- package/foundation/render/cut-short.mjs +46 -6
- package/foundation/render/embedded-imports.d.mts +4 -3
- package/foundation/render/embedded-imports.mjs +13 -8
- package/foundation/render/esbuild-dependency.d.mts +14 -0
- package/foundation/render/esbuild-dependency.mjs +41 -0
- package/foundation/render/file-header.mjs +5 -4
- package/foundation/render/page-worker.mjs +562 -86
- package/foundation/render/picture-chrome.mjs +54 -29
- package/foundation/render/picture-playwright.mjs +78 -42
- package/foundation/render/picture-window.d.mts +33 -0
- package/foundation/render/picture-window.mjs +78 -0
- package/foundation/render/render-page.d.mts +55 -4
- package/foundation/render/render-page.mjs +199 -28
- package/foundation/render/restore-folder.d.mts +13 -0
- package/foundation/render/restore-folder.mjs +30 -0
- package/foundation/render/served-packages.d.mts +2 -1
- package/foundation/render/served-packages.mjs +5 -3
- package/foundation/render/ts-paths.d.mts +11 -0
- package/foundation/render/ts-paths.mjs +27 -2
- package/foundation/render/value-uses.d.mts +43 -0
- package/foundation/render/value-uses.mjs +110 -0
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.doc.mjs +7 -1
- package/foundation/response/error-codes.mjs +10 -2
- package/foundation/response/response-types.doc.mjs +12 -12
- package/foundation/runtime/package-root.d.mts +8 -0
- package/foundation/runtime/package-root.mjs +20 -0
- package/foundation/suggest/other-command.d.mts +11 -0
- package/foundation/suggest/other-command.mjs +1 -1
- package/foundation/text/icon-id.d.mts +20 -0
- package/foundation/text/icon-id.mjs +40 -0
- package/foundation/text/icon-set-next.d.mts +25 -0
- package/foundation/text/icon-set-next.mjs +29 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +7 -6
|
@@ -14,7 +14,13 @@ import {createRequire} from 'node:module';
|
|
|
14
14
|
import * as path from 'node:path';
|
|
15
15
|
import {pathToFileURL} from 'node:url';
|
|
16
16
|
import {AstryxError} from '../error.mjs';
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
EDITOR_STAMP,
|
|
19
|
+
withPngText,
|
|
20
|
+
decodePng,
|
|
21
|
+
encodePng,
|
|
22
|
+
cutTall,
|
|
23
|
+
} from './_png.mjs';
|
|
18
24
|
import {
|
|
19
25
|
findDeclaredWorkspaceRoot,
|
|
20
26
|
findNodeModulesPackage,
|
|
@@ -56,6 +62,7 @@ import {
|
|
|
56
62
|
modesOf,
|
|
57
63
|
refuse,
|
|
58
64
|
editorWrote,
|
|
65
|
+
editorRecorded,
|
|
59
66
|
recordWritten,
|
|
60
67
|
themeFiles,
|
|
61
68
|
refuseThemesNotFolder,
|
|
@@ -72,7 +79,7 @@ import {
|
|
|
72
79
|
newPictureRun,
|
|
73
80
|
renderPreview,
|
|
74
81
|
renderSheet,
|
|
75
|
-
|
|
82
|
+
screenshots,
|
|
76
83
|
pageInTheWay,
|
|
77
84
|
inTheWayPhrase,
|
|
78
85
|
} from './_preview.mjs';
|
|
@@ -434,8 +441,9 @@ export const SAMPLE_PAGE_NAME = 'the sample page';
|
|
|
434
441
|
* measured it: the page and its picture, the part (null when the text sits
|
|
435
442
|
* in none), its texts, the one mode it was cut in when only one was, and
|
|
436
443
|
* whether every text is drawn whole once the part keeps its width
|
|
437
|
-
* (`flex-shrink: 0`, applied in the page and measured).
|
|
438
|
-
*
|
|
444
|
+
* (`flex-shrink: 0`, applied in the page and measured). `broken`: the
|
|
445
|
+
* texts are words drawn broken across two lines inside the word, not cut.
|
|
446
|
+
* @typedef {{page: string, file: string, part: string | null, texts: string[], only: 'light' | 'dark' | null, whole: boolean, broken?: boolean}} CutShort
|
|
439
447
|
*/
|
|
440
448
|
|
|
441
449
|
/** The texts named, the first six and how many more. @param {string[]} texts */
|
|
@@ -454,6 +462,8 @@ export function cutShortNote(c) {
|
|
|
454
462
|
const what = c.part
|
|
455
463
|
? `${c.part} label${n === 1 ? '' : 's'}`
|
|
456
464
|
: `text${n === 1 ? '' : 's'}`;
|
|
465
|
+
if (c.broken)
|
|
466
|
+
return `${c.page} (${c.file}) breaks ${n} word${n === 1 ? '' : 's'} across lines inside the word${c.part ? ` in the ${c.part}` : ''}${c.only ? ` in ${c.only} mode only` : ''} (${someTexts(c.texts)}); the word is wider than the space ${c.part ? `the ${c.part}` : 'its box'} has`;
|
|
457
467
|
return `${c.page} (${c.file}) draws ${n} ${what} cut short${c.only ? ` in ${c.only} mode only` : ''} (${someTexts(c.texts)}); the text no longer fits ${c.part ? `the ${c.part}` : 'its box'}`;
|
|
458
468
|
}
|
|
459
469
|
|
|
@@ -469,7 +479,9 @@ export function cutShortNote(c) {
|
|
|
469
479
|
*/
|
|
470
480
|
export function cutShortProblem(ctx, slug, c) {
|
|
471
481
|
const label = c.part ? `${c.part} labels` : 'text';
|
|
472
|
-
const problem =
|
|
482
|
+
const problem = c.broken
|
|
483
|
+
? `words broken across lines inside the word${c.part ? ` in the ${c.part}` : ''} in ${c.page}'s pictures (${c.file}${c.only ? `, ${c.only} mode` : ''}): ${someTexts(c.texts)}`
|
|
484
|
+
: `${label} cut short in ${c.page}'s pictures (${c.file}${c.only ? `, ${c.only} mode` : ''}): ${someTexts(c.texts)}`;
|
|
473
485
|
if (c.part && c.whole && ctx.project.target.has(c.part))
|
|
474
486
|
return {problem, fix: `${P} set ${slug} flex-shrink 0 --on ${c.part}`};
|
|
475
487
|
return {
|
|
@@ -489,7 +501,9 @@ export function cutShortProblem(ctx, slug, c) {
|
|
|
489
501
|
* states among them) have no name: their cells are narrow, and the full
|
|
490
502
|
* sheet cuts long labels short in every theme.
|
|
491
503
|
* @param {import('./_project.mjs').ThemeProject} project
|
|
492
|
-
* @param {Array<{html: string, png: string, name?: string}>} shots
|
|
504
|
+
* @param {Array<{html: string, png: string, name?: string, most?: number}>} shots
|
|
505
|
+
* `most`: the tallest the page's picture may be; a taller one is cut into
|
|
506
|
+
* pictures that tall, in order ({@link pagesOfPicture})
|
|
493
507
|
* @param {Array<'light' | 'dark'>} modes
|
|
494
508
|
* @returns {Promise<{files: string[], problem: string | null, cutShort: CutShort[]}>}
|
|
495
509
|
*/
|
|
@@ -500,14 +514,15 @@ export async function pictures(project, shots, modes) {
|
|
|
500
514
|
* The text drawn cut short, by page, then by part: its texts, the modes
|
|
501
515
|
* it was drawn so in, whether keeping the part's width draws every one
|
|
502
516
|
* whole, and the page's picture.
|
|
503
|
-
*
|
|
517
|
+
* Keyed by part, and apart for words broken across lines.
|
|
518
|
+
* @type {Map<string, {file: string, parts: Map<string, {part: string, broken: boolean, texts: Set<string>, modes: Set<'light' | 'dark'>, whole: boolean}>}>}
|
|
504
519
|
*/
|
|
505
520
|
const cut = new Map();
|
|
506
521
|
/** One entry for each part on each page, from what was measured. */
|
|
507
522
|
const cutShortNotes = () =>
|
|
508
523
|
[...cut].flatMap(([name, page]) =>
|
|
509
|
-
[...page.parts].map(
|
|
510
|
-
(
|
|
524
|
+
[...page.parts.values()].map(
|
|
525
|
+
({part, broken, texts, modes: drawnIn, whole}) =>
|
|
511
526
|
/** @type {CutShort} */ ({
|
|
512
527
|
page: name,
|
|
513
528
|
file: page.file,
|
|
@@ -516,6 +531,7 @@ export async function pictures(project, shots, modes) {
|
|
|
516
531
|
only:
|
|
517
532
|
modes.length > 1 && drawnIn.size === 1 ? [...drawnIn][0] : null,
|
|
518
533
|
whole,
|
|
534
|
+
...(broken ? {broken: true} : {}),
|
|
519
535
|
}),
|
|
520
536
|
),
|
|
521
537
|
);
|
|
@@ -583,7 +599,9 @@ export async function pictures(project, shots, modes) {
|
|
|
583
599
|
cutShort: [],
|
|
584
600
|
problem: `${blocked.map(f => path.relative(project.cwd, f)).join(', ')} ${blocked.length === 1 ? 'is a file' : 'are files'} the editor did not write (or changed since it did), so no picture was taken and ${blocked.length === 1 ? 'it is' : 'they are'} left as ${blocked.length === 1 ? 'it is' : 'they are'}`,
|
|
585
601
|
};
|
|
586
|
-
|
|
602
|
+
/** The pictures to take, each with where it goes. @type {Array<{html: string, out: string, part: string, m: 'light' | 'dark', name?: string, most?: number}>} */
|
|
603
|
+
const jobs = [];
|
|
604
|
+
for (const {html, png, name, most} of shots) {
|
|
587
605
|
for (const m of modes) {
|
|
588
606
|
const out = outOf(png, m);
|
|
589
607
|
if (isLink(out)) {
|
|
@@ -629,9 +647,20 @@ export async function pictures(project, shots, modes) {
|
|
|
629
647
|
problem: `${path.relative(project.cwd, path.dirname(out))}/ cannot be written (${/** @type {any} */ (e)?.code ?? 'no access'}), so no picture was taken; fix its permissions, then run the command again`,
|
|
630
648
|
};
|
|
631
649
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
650
|
+
jobs.push({html, out, part, m, name, most});
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
// Every picture with one browser, then each put in place in order.
|
|
654
|
+
const results = await screenshots(
|
|
655
|
+
project,
|
|
656
|
+
jobs.map(j => ({html: j.html, png: j.part, mode: j.m})),
|
|
657
|
+
run,
|
|
658
|
+
);
|
|
659
|
+
for (const [i, {out, part, m, name, most}] of jobs.entries()) {
|
|
660
|
+
{
|
|
661
|
+
const r = results[i];
|
|
662
|
+
if (!r?.ok) {
|
|
663
|
+
for (const j of jobs.slice(i)) fs.rmSync(j.part, {force: true});
|
|
635
664
|
// Said for the whole run: the pictures taken before this one stand,
|
|
636
665
|
// and this one and every one after it were not taken.
|
|
637
666
|
const all = shots.flatMap(s => modes.map(mm => outOf(s.png, mm)));
|
|
@@ -642,14 +671,14 @@ export async function pictures(project, shots, modes) {
|
|
|
642
671
|
files,
|
|
643
672
|
cutShort: cutShortNotes(),
|
|
644
673
|
problem: files.length
|
|
645
|
-
? `${files.join(', ')} ${files.length === 1 ? 'was' : 'were'} taken, but ${missed.join(', ')} ${missed.length === 1 ? 'was' : 'were'} not: ${r
|
|
646
|
-
: `No picture was taken: ${r
|
|
674
|
+
? `${files.join(', ')} ${files.length === 1 ? 'was' : 'were'} taken, but ${missed.join(', ')} ${missed.length === 1 ? 'was' : 'were'} not: ${r?.reason ?? 'the browser stopped first'}`
|
|
675
|
+
: `No picture was taken: ${r?.reason ?? 'the browser stopped first'}`,
|
|
647
676
|
};
|
|
648
677
|
}
|
|
649
678
|
try {
|
|
650
679
|
fs.renameSync(part, out);
|
|
651
680
|
} catch (e) {
|
|
652
|
-
fs.rmSync(part, {force: true});
|
|
681
|
+
for (const j of jobs.slice(i)) fs.rmSync(j.part, {force: true});
|
|
653
682
|
return {
|
|
654
683
|
files,
|
|
655
684
|
cutShort: cutShortNotes(),
|
|
@@ -672,6 +701,15 @@ export async function pictures(project, shots, modes) {
|
|
|
672
701
|
// An unstamped picture is still recorded below.
|
|
673
702
|
}
|
|
674
703
|
recordWritten(project.cwd, slug, [out]);
|
|
704
|
+
if (most) {
|
|
705
|
+
const cut = pagesOfPicture(project.cwd, slug, out, most);
|
|
706
|
+
if (cut.problem) notes.push(cut.problem);
|
|
707
|
+
else if (cut.files.length) {
|
|
708
|
+
files.pop();
|
|
709
|
+
files.push(...cut.files);
|
|
710
|
+
r.file = cut.files[0];
|
|
711
|
+
}
|
|
712
|
+
}
|
|
675
713
|
}
|
|
676
714
|
for (const n of r.notes ?? []) if (!notes.includes(n)) notes.push(n);
|
|
677
715
|
// What the browser measured on a page laid out to fit, kept by page
|
|
@@ -679,13 +717,16 @@ export async function pictures(project, shots, modes) {
|
|
|
679
717
|
if (name && r.cutShort?.length) {
|
|
680
718
|
const page = cut.get(name) ?? {file: r.file, parts: new Map()};
|
|
681
719
|
cut.set(name, page);
|
|
682
|
-
for (const {part, text, whole} of r.cutShort) {
|
|
683
|
-
const
|
|
720
|
+
for (const {part, text, whole, broken} of r.cutShort) {
|
|
721
|
+
const key = `${part ?? ''}${broken ? '\0broken' : ''}`;
|
|
722
|
+
const at = page.parts.get(key) ?? {
|
|
723
|
+
part: part ?? '',
|
|
724
|
+
broken: Boolean(broken),
|
|
684
725
|
texts: new Set(),
|
|
685
726
|
modes: new Set(),
|
|
686
727
|
whole: true,
|
|
687
728
|
};
|
|
688
|
-
page.parts.set(
|
|
729
|
+
page.parts.set(key, at);
|
|
689
730
|
at.texts.add(text);
|
|
690
731
|
at.modes.add(m);
|
|
691
732
|
at.whole &&= whole;
|
|
@@ -720,6 +761,58 @@ export async function pictures(project, shots, modes) {
|
|
|
720
761
|
};
|
|
721
762
|
}
|
|
722
763
|
|
|
764
|
+
/**
|
|
765
|
+
* A picture taller than `most` cut into pictures at most that tall, in
|
|
766
|
+
* order (`sheet-inputs-1.png`, `-2` …), each cut where the page shows
|
|
767
|
+
* between two parts ({@link cutTall}), stamped and recorded as the
|
|
768
|
+
* editor's, the tall one removed; pictures cut from it before and no
|
|
769
|
+
* longer made are removed too. A file of yours at a cut picture's name is
|
|
770
|
+
* never written over: the tall picture stays, and the note names it.
|
|
771
|
+
* @param {string} cwd
|
|
772
|
+
* @param {string} slug
|
|
773
|
+
* @param {string} out the picture just taken
|
|
774
|
+
* @param {number} most
|
|
775
|
+
* @returns {{files: string[], problem: string | null}} the pictures, as
|
|
776
|
+
* shown, when it was cut; none when it fits
|
|
777
|
+
*/
|
|
778
|
+
function pagesOfPicture(cwd, slug, out, most) {
|
|
779
|
+
const dir = path.dirname(out);
|
|
780
|
+
const base = path.basename(out, '.png');
|
|
781
|
+
const rel = (/** @type {string} */ f) =>
|
|
782
|
+
path.relative(cwd, f).split(path.sep).join('/');
|
|
783
|
+
let pieces;
|
|
784
|
+
try {
|
|
785
|
+
pieces = cutTall(decodePng(fs.readFileSync(out)), most);
|
|
786
|
+
} catch {
|
|
787
|
+
return {files: [], problem: null};
|
|
788
|
+
}
|
|
789
|
+
const named = new RegExp(
|
|
790
|
+
`^${base.replace(/[^a-z0-9-]/gi, '\\$&')}-(\\d+)\\.png$`,
|
|
791
|
+
);
|
|
792
|
+
const before = (fs.existsSync(dir) ? fs.readdirSync(dir) : [])
|
|
793
|
+
.filter(n => named.test(n))
|
|
794
|
+
.map(n => path.join(dir, n));
|
|
795
|
+
const mine = before.filter(f => !editorRecorded(cwd, slug, f));
|
|
796
|
+
const names =
|
|
797
|
+
pieces.length > 1
|
|
798
|
+
? pieces.map((_, i) => path.join(dir, `${base}-${i + 1}.png`))
|
|
799
|
+
: [];
|
|
800
|
+
const inWay = mine.filter(f => names.includes(f));
|
|
801
|
+
if (inWay.length)
|
|
802
|
+
return {
|
|
803
|
+
files: [],
|
|
804
|
+
problem: `${inWay.map(rel).join(', ')} ${inWay.length === 1 ? 'is a file' : 'are files'} the editor did not write, so ${rel(out)} was not cut into pictures of at most ${most}px and stays whole`,
|
|
805
|
+
};
|
|
806
|
+
for (const f of before) if (!mine.includes(f)) fs.rmSync(f, {force: true});
|
|
807
|
+
if (!names.length) return {files: [], problem: null};
|
|
808
|
+
pieces.forEach((pic, i) =>
|
|
809
|
+
writeWhole(names[i], withPngText(encodePng(pic), EDITOR_STAMP, slug)),
|
|
810
|
+
);
|
|
811
|
+
recordWritten(cwd, slug, names);
|
|
812
|
+
fs.rmSync(out, {force: true});
|
|
813
|
+
return {files: names.map(rel), problem: null};
|
|
814
|
+
}
|
|
815
|
+
|
|
723
816
|
/**
|
|
724
817
|
* The families the theme's build writes that no package loads: not a
|
|
725
818
|
* system or desktop font, not loaded by a font stylesheet the app copy
|
|
@@ -861,6 +954,12 @@ export function fontNotes(ctx, data) {
|
|
|
861
954
|
// A font setting whose family the build no longer uses (the theme's own
|
|
862
955
|
// source sets every place it went) gets no note: nothing shows it.
|
|
863
956
|
const built = builtFontFamilies(ctx, data.name);
|
|
957
|
+
// The families the base's own font stylesheet loads from a remote sheet:
|
|
958
|
+
// named once below, as the app shows them, never as fonts nothing loads.
|
|
959
|
+
const base = baseFontsSheet(ctx, data);
|
|
960
|
+
const baseLoads = new Set(
|
|
961
|
+
base?.remote.length ? base.families.map(f => fontKey(f)) : [],
|
|
962
|
+
);
|
|
864
963
|
for (const s of data.settings) {
|
|
865
964
|
if (
|
|
866
965
|
s.thing !== 'font' ||
|
|
@@ -875,7 +974,8 @@ export function fontNotes(ctx, data) {
|
|
|
875
974
|
packages.some(x => x.of === s) ||
|
|
876
975
|
s.value === 'rounded' ||
|
|
877
976
|
s.value === 'comic' ||
|
|
878
|
-
presetFamily(fontOf(s.value).family)
|
|
977
|
+
presetFamily(fontOf(s.value).family) ||
|
|
978
|
+
baseLoads.has(fontKey(fontOf(s.value).family))
|
|
879
979
|
)
|
|
880
980
|
continue;
|
|
881
981
|
const family = fontOf(s.value).family.replace(/["']/g, '').toLowerCase();
|
|
@@ -927,7 +1027,6 @@ export function fontNotes(ctx, data) {
|
|
|
927
1027
|
// import in the base's fonts.css) is not in the static previews: a page
|
|
928
1028
|
// opened from disk cannot load a remote stylesheet. Unless an installed
|
|
929
1029
|
// package loads it, the previews and pictures show the next font.
|
|
930
|
-
const base = baseFontsSheet(ctx, data);
|
|
931
1030
|
if (base?.remote.length)
|
|
932
1031
|
for (const family of base.families) {
|
|
933
1032
|
if (built && !built.has(family.toLowerCase())) continue;
|
|
@@ -942,7 +1041,8 @@ export function fontNotes(ctx, data) {
|
|
|
942
1041
|
}
|
|
943
1042
|
notes.push(...baseWeightNotes(ctx, data));
|
|
944
1043
|
for (const family of familiesNothingLoads(ctx, data, packages)) {
|
|
945
|
-
if (dialFamilies.has(fontKey(family)))
|
|
1044
|
+
if (dialFamilies.has(fontKey(family)) || baseLoads.has(fontKey(family)))
|
|
1045
|
+
continue;
|
|
946
1046
|
notes.push(unloadedNote(family));
|
|
947
1047
|
}
|
|
948
1048
|
notes.push(...loneFamilyNotes(ctx, data));
|
|
@@ -1204,8 +1304,14 @@ export function lookAtPictures(files) {
|
|
|
1204
1304
|
files.find(f => path.basename(f) === `${name}-dark.png`);
|
|
1205
1305
|
const preview = one('preview');
|
|
1206
1306
|
const open = one(`sheet-${OPEN_SECTION}`);
|
|
1207
|
-
|
|
1208
|
-
|
|
1307
|
+
// A family's picture, or the pictures cut from it, in order.
|
|
1308
|
+
/** @param {string} g @param {string} dark */
|
|
1309
|
+
const cuts = (g, dark) =>
|
|
1310
|
+
files.filter(f =>
|
|
1311
|
+
new RegExp(`^sheet-${g}${dark}(?:-\\d+)?\\.png$`).test(path.basename(f)),
|
|
1312
|
+
);
|
|
1313
|
+
const families = FAMILY_SECTIONS.flatMap(g =>
|
|
1314
|
+
cuts(g, '').length ? cuts(g, '') : cuts(g, '-dark'),
|
|
1209
1315
|
);
|
|
1210
1316
|
if (!preview && !open && !families.length) return null;
|
|
1211
1317
|
const dark =
|
|
@@ -1259,6 +1365,13 @@ export async function openStatesPage(ctx, slug, data) {
|
|
|
1259
1365
|
return {html, png};
|
|
1260
1366
|
}
|
|
1261
1367
|
|
|
1368
|
+
/**
|
|
1369
|
+
* The tallest a family's picture is: a reader fits a picture to its width,
|
|
1370
|
+
* and a taller one comes out too small to read, so it is cut into pictures
|
|
1371
|
+
* this tall (`sheet-inputs-1.png`, `-2` …).
|
|
1372
|
+
*/
|
|
1373
|
+
export const FAMILY_PICTURE_HEIGHT = 1600;
|
|
1374
|
+
|
|
1262
1375
|
/**
|
|
1263
1376
|
* The family `show --png` pictures when the theme's settings set no part of
|
|
1264
1377
|
* its own (a fresh theme, or only theme-wide settings): the buttons, an
|
|
@@ -1276,6 +1389,14 @@ export const FAMILY_SECTIONS = Object.freeze(
|
|
|
1276
1389
|
SHOWCASE_GROUPS.filter(g => g !== OPEN_SECTION && g !== 'pages'),
|
|
1277
1390
|
);
|
|
1278
1391
|
|
|
1392
|
+
/**
|
|
1393
|
+
* The errors of a folder that cannot be written (no permission, read-only,
|
|
1394
|
+
* full): a page the pictures need that cannot be written there is the
|
|
1395
|
+
* pictures' problem, which the picture run names, never a refusal of the
|
|
1396
|
+
* command.
|
|
1397
|
+
*/
|
|
1398
|
+
export const UNWRITABLE = Object.freeze(['EACCES', 'EPERM', 'EROFS', 'ENOSPC']);
|
|
1399
|
+
|
|
1279
1400
|
/**
|
|
1280
1401
|
* One page for each family of components ({@link FAMILY_SECTIONS}), cut
|
|
1281
1402
|
* from the full sheet just made, so each shows its family as the sheet
|
|
@@ -1326,11 +1447,18 @@ export function familyPages(sheet, slug, cwd, only = FAMILY_SECTIONS) {
|
|
|
1326
1447
|
`<strong>${slug}: every component</strong>`,
|
|
1327
1448
|
`<strong>${slug}: every component (${family})</strong>`,
|
|
1328
1449
|
);
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1450
|
+
try {
|
|
1451
|
+
writeWhole(
|
|
1452
|
+
html,
|
|
1453
|
+
`${head}${text.slice(at, starts[i + 1]?.at ?? end)}${after}`,
|
|
1454
|
+
);
|
|
1455
|
+
stampSheet(html, slug, cwd);
|
|
1456
|
+
} catch (e) {
|
|
1457
|
+
// A theme folder it cannot write: no family page, and the picture
|
|
1458
|
+
// run names the folder.
|
|
1459
|
+
if (UNWRITABLE.includes(/** @type {any} */ (e)?.code)) break;
|
|
1460
|
+
throw e;
|
|
1461
|
+
}
|
|
1334
1462
|
pages.push({html, png, family});
|
|
1335
1463
|
}
|
|
1336
1464
|
return {pages, problems};
|