@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
|
@@ -97,14 +97,14 @@ export default function LoginSSO() {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
return (
|
|
100
|
-
<Center axis="both" padding={6} style={pageStyle}>
|
|
100
|
+
<Center role="main" axis="both" padding={6} style={pageStyle}>
|
|
101
101
|
<Card padding={8} width="100%" maxWidth={400}>
|
|
102
102
|
<VStack gap={4} hAlign="stretch">
|
|
103
103
|
{/* ── Step 1: Email entry ── */}
|
|
104
104
|
{step === 'email' && (
|
|
105
105
|
<>
|
|
106
106
|
<VStack gap={1} hAlign="center">
|
|
107
|
-
<Text type="display-1" as="
|
|
107
|
+
<Text type="display-1" as="h1">
|
|
108
108
|
Welcome back
|
|
109
109
|
</Text>
|
|
110
110
|
<Text type="body" color="secondary" size="sm">
|
|
@@ -176,7 +176,7 @@ export default function LoginSSO() {
|
|
|
176
176
|
<>
|
|
177
177
|
<VStack gap={2} hAlign="center">
|
|
178
178
|
<Avatar name={provider.name} size={48} />
|
|
179
|
-
<Text type="display-3" as="
|
|
179
|
+
<Text type="display-3" as="h1">
|
|
180
180
|
Sign in with {provider.name}
|
|
181
181
|
</Text>
|
|
182
182
|
<Text type="body" color="secondary" size="sm">
|
|
@@ -220,7 +220,7 @@ export default function LoginSSO() {
|
|
|
220
220
|
{step === 'password-fallback' && (
|
|
221
221
|
<>
|
|
222
222
|
<VStack gap={1} hAlign="center">
|
|
223
|
-
<Text type="display-1" as="
|
|
223
|
+
<Text type="display-1" as="h1">
|
|
224
224
|
Welcome back
|
|
225
225
|
</Text>
|
|
226
226
|
<Text type="body" color="secondary" size="sm">
|
|
@@ -120,7 +120,7 @@ export default function MixedGalleryTemplate() {
|
|
|
120
120
|
height="fill"
|
|
121
121
|
contentWidth={1400}
|
|
122
122
|
content={
|
|
123
|
-
<LayoutContent padding={6}>
|
|
123
|
+
<LayoutContent role="main" padding={6}>
|
|
124
124
|
<style>{GALLERY_CSS}</style>
|
|
125
125
|
<VStack gap={6} style={containerStyle}>
|
|
126
126
|
{/* Header */}
|
|
@@ -273,21 +273,33 @@ function ProductInfo() {
|
|
|
273
273
|
<Divider />
|
|
274
274
|
<Collapsible
|
|
275
275
|
value="composition"
|
|
276
|
-
trigger={
|
|
276
|
+
trigger={
|
|
277
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
278
|
+
Composition
|
|
279
|
+
</Heading>
|
|
280
|
+
}>
|
|
277
281
|
<Text type="body">{PRODUCT.composition}</Text>
|
|
278
282
|
</Collapsible>
|
|
279
283
|
<Divider />
|
|
280
284
|
<Collapsible
|
|
281
285
|
value="delivery"
|
|
282
286
|
defaultIsOpen={false}
|
|
283
|
-
trigger={
|
|
287
|
+
trigger={
|
|
288
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
289
|
+
Delivery & Returns
|
|
290
|
+
</Heading>
|
|
291
|
+
}>
|
|
284
292
|
<Text type="body">{PRODUCT.deliveryReturns}</Text>
|
|
285
293
|
</Collapsible>
|
|
286
294
|
<Divider />
|
|
287
295
|
<Collapsible
|
|
288
296
|
value="dimensions"
|
|
289
297
|
defaultIsOpen={false}
|
|
290
|
-
trigger={
|
|
298
|
+
trigger={
|
|
299
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
300
|
+
Dimensions
|
|
301
|
+
</Heading>
|
|
302
|
+
}>
|
|
291
303
|
<Text type="body">{PRODUCT.dimensions}</Text>
|
|
292
304
|
</Collapsible>
|
|
293
305
|
<Divider />
|
|
@@ -305,7 +317,7 @@ export default function ProductDetailTemplate() {
|
|
|
305
317
|
height="fill"
|
|
306
318
|
contentWidth={1200}
|
|
307
319
|
content={
|
|
308
|
-
<LayoutContent padding={6}>
|
|
320
|
+
<LayoutContent role="main" padding={6}>
|
|
309
321
|
<Grid columns={{minWidth: 320, repeat: 'fit'}} gap={5}>
|
|
310
322
|
<ImageGallery
|
|
311
323
|
selected={selectedThumb}
|
|
@@ -117,7 +117,7 @@ export default function ProductGalleryTemplate() {
|
|
|
117
117
|
height="fill"
|
|
118
118
|
contentWidth={1200}
|
|
119
119
|
content={
|
|
120
|
-
<LayoutContent padding={6}>
|
|
120
|
+
<LayoutContent role="main" padding={6}>
|
|
121
121
|
<VStack gap={6}>
|
|
122
122
|
{/* Header — Grid handles responsive stacking */}
|
|
123
123
|
<Grid columns={{minWidth: 280, max: 2}} gap={4} align="start">
|
|
@@ -110,7 +110,7 @@ export default function SettingsTemplate() {
|
|
|
110
110
|
)
|
|
111
111
|
}
|
|
112
112
|
content={
|
|
113
|
-
<LayoutContent padding={4}>
|
|
113
|
+
<LayoutContent role="main" padding={4}>
|
|
114
114
|
<VStack gap={4}>
|
|
115
115
|
{/* Mobile: the sidebar nav collapses to a horizontal, centered
|
|
116
116
|
tab bar above the content. */}
|
|
@@ -125,7 +125,9 @@ export default function SettingsTemplate() {
|
|
|
125
125
|
)}
|
|
126
126
|
<Grid columns={{minWidth: 320}} gap={10}>
|
|
127
127
|
<VStack gap={1}>
|
|
128
|
-
<Heading level={3}
|
|
128
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
129
|
+
Basic information
|
|
130
|
+
</Heading>
|
|
129
131
|
<Text type="supporting" color="secondary">
|
|
130
132
|
View and update your personal details and account information.
|
|
131
133
|
</Text>
|
|
@@ -171,7 +173,9 @@ export default function SettingsTemplate() {
|
|
|
171
173
|
|
|
172
174
|
<Grid columns={{minWidth: 320}} gap={10}>
|
|
173
175
|
<VStack gap={1}>
|
|
174
|
-
<Heading level={3}
|
|
176
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
177
|
+
Change password
|
|
178
|
+
</Heading>
|
|
175
179
|
<Text type="supporting" color="secondary">
|
|
176
180
|
Update your password to keep your account secure.
|
|
177
181
|
</Text>
|
|
@@ -215,7 +219,9 @@ export default function SettingsTemplate() {
|
|
|
215
219
|
|
|
216
220
|
<Grid columns={{minWidth: 320}} gap={10}>
|
|
217
221
|
<VStack gap={1}>
|
|
218
|
-
<Heading level={3}
|
|
222
|
+
<Heading level={3} accessibilityLevel={2}>
|
|
223
|
+
Advanced settings
|
|
224
|
+
</Heading>
|
|
219
225
|
<Text type="supporting" color="secondary">
|
|
220
226
|
Configure detailed account preferences and security options.
|
|
221
227
|
</Text>
|
|
@@ -2470,7 +2470,7 @@ function SettingsSideNav({
|
|
|
2470
2470
|
<HStack gap={2} align="center" paddingInline={2} minHeight={32}>
|
|
2471
2471
|
{/* Also the dialog's accessible name (`aria-labelledby`), so the
|
|
2472
2472
|
painted title and the announced one cannot drift apart. */}
|
|
2473
|
-
<Heading level={4} id={titleId}>
|
|
2473
|
+
<Heading level={4} accessibilityLevel={1} id={titleId}>
|
|
2474
2474
|
Settings
|
|
2475
2475
|
</Heading>
|
|
2476
2476
|
</HStack>
|
|
@@ -2633,10 +2633,9 @@ function SettingsNarrowShell({
|
|
|
2633
2633
|
<VStack gap={0} height="100%">
|
|
2634
2634
|
<HStack gap={2} align="center" paddingInline={3} paddingBlock={3}>
|
|
2635
2635
|
<StackItem size="fill">
|
|
2636
|
-
{/* The element `aria-labelledby` points at in this shell
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
<Text type="label" id={titleId}>
|
|
2636
|
+
{/* The element `aria-labelledby` points at in this shell, and the
|
|
2637
|
+
page's level-1 heading; it keeps the label look. */}
|
|
2638
|
+
<Text type="label" as="h1" id={titleId}>
|
|
2640
2639
|
Settings
|
|
2641
2640
|
</Text>
|
|
2642
2641
|
</StackItem>
|
|
@@ -2718,7 +2717,7 @@ export default function SettingsDialogTemplate() {
|
|
|
2718
2717
|
return (
|
|
2719
2718
|
// `Center` is the page root — the rubric's root for a content page, and
|
|
2720
2719
|
// what puts the inline dialog in the middle of the page it stands in for.
|
|
2721
|
-
<Center height="100dvh">
|
|
2720
|
+
<Center role="main" height="100dvh">
|
|
2722
2721
|
<Dialog
|
|
2723
2722
|
isOpen
|
|
2724
2723
|
// `isInline` renders this same dialog WITHOUT the `<dialog>` element, so
|
|
@@ -259,7 +259,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
259
259
|
|
|
260
260
|
const navList = (
|
|
261
261
|
<VStack gap={4} style={sideNavPadding}>
|
|
262
|
-
<Heading level={2} style={sideNavHeading}>
|
|
262
|
+
<Heading level={2} accessibilityLevel={1} style={sideNavHeading}>
|
|
263
263
|
Account settings
|
|
264
264
|
</Heading>
|
|
265
265
|
<List density="spacious">
|
|
@@ -306,7 +306,11 @@ export default function SettingsSecurityTemplate() {
|
|
|
306
306
|
<Layout
|
|
307
307
|
height="fill"
|
|
308
308
|
style={fillViewport}
|
|
309
|
-
content={
|
|
309
|
+
content={
|
|
310
|
+
<LayoutContent role="main" padding={2}>
|
|
311
|
+
{navList}
|
|
312
|
+
</LayoutContent>
|
|
313
|
+
}
|
|
310
314
|
/>
|
|
311
315
|
);
|
|
312
316
|
}
|
|
@@ -324,7 +328,7 @@ export default function SettingsSecurityTemplate() {
|
|
|
324
328
|
)
|
|
325
329
|
}
|
|
326
330
|
content={
|
|
327
|
-
<LayoutContent padding={4}>
|
|
331
|
+
<LayoutContent role="main" padding={4}>
|
|
328
332
|
<VStack gap={0}>
|
|
329
333
|
{/* Mobile detail view: a back button sits beside the section title
|
|
330
334
|
(the per-section headings below are hidden on mobile). Toolbar's
|
|
@@ -350,7 +354,11 @@ export default function SettingsSecurityTemplate() {
|
|
|
350
354
|
}
|
|
351
355
|
onClick={() => setMobileView('nav')}
|
|
352
356
|
/>
|
|
353
|
-
|
|
357
|
+
{/* The phone detail view's title is its level-1 heading:
|
|
358
|
+
the nav that carries the page title is not shown. */}
|
|
359
|
+
<Heading level={2} accessibilityLevel={1}>
|
|
360
|
+
{SECTION_TITLES[activeNav]}
|
|
361
|
+
</Heading>
|
|
354
362
|
</>
|
|
355
363
|
}
|
|
356
364
|
/>
|
|
@@ -367,7 +375,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
367
375
|
{activeTab === 'login' && (
|
|
368
376
|
<VStack gap={8}>
|
|
369
377
|
<VStack gap={0}>
|
|
370
|
-
<Heading level={3}>
|
|
378
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
379
|
+
Login
|
|
380
|
+
</Heading>
|
|
371
381
|
<Divider />
|
|
372
382
|
{LOGIN_ROWS.map(row => (
|
|
373
383
|
<InfoRowItem key={row.label} {...row} />
|
|
@@ -375,7 +385,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
375
385
|
</VStack>
|
|
376
386
|
|
|
377
387
|
<VStack gap={0}>
|
|
378
|
-
<Heading level={3}
|
|
388
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
389
|
+
Social accounts
|
|
390
|
+
</Heading>
|
|
379
391
|
<Divider />
|
|
380
392
|
{SOCIAL_ROWS.map(row => (
|
|
381
393
|
<InfoRowItem key={row.label} {...row} />
|
|
@@ -383,7 +395,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
383
395
|
</VStack>
|
|
384
396
|
|
|
385
397
|
<VStack gap={0}>
|
|
386
|
-
<Heading level={3}
|
|
398
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
399
|
+
Device history
|
|
400
|
+
</Heading>
|
|
387
401
|
<Divider />
|
|
388
402
|
{DEVICE_ROWS.map((device, i) => (
|
|
389
403
|
<HStack
|
|
@@ -417,7 +431,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
417
431
|
</VStack>
|
|
418
432
|
|
|
419
433
|
<VStack gap={0}>
|
|
420
|
-
<Heading level={3}>
|
|
434
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
435
|
+
Account
|
|
436
|
+
</Heading>
|
|
421
437
|
<Divider />
|
|
422
438
|
<HStack
|
|
423
439
|
hAlign="between"
|
|
@@ -444,7 +460,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
444
460
|
{activeTab === 'shared' && (
|
|
445
461
|
<VStack gap={8}>
|
|
446
462
|
<VStack gap={2}>
|
|
447
|
-
<Heading level={3}
|
|
463
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
464
|
+
Shared access
|
|
465
|
+
</Heading>
|
|
448
466
|
<Divider />
|
|
449
467
|
<Text type="body" color="secondary">
|
|
450
468
|
Review each request carefully before approving access.
|
|
@@ -721,7 +739,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
721
739
|
|
|
722
740
|
<VStack gap={8}>
|
|
723
741
|
<VStack gap={0}>
|
|
724
|
-
<Heading level={3}>
|
|
742
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
743
|
+
Messages
|
|
744
|
+
</Heading>
|
|
725
745
|
<VStack style={rowPadding}>
|
|
726
746
|
<Switch
|
|
727
747
|
label="Show people when I've read their messages."
|
|
@@ -741,7 +761,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
741
761
|
</VStack>
|
|
742
762
|
|
|
743
763
|
<VStack gap={0}>
|
|
744
|
-
<Heading level={3}>
|
|
764
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
765
|
+
Listings
|
|
766
|
+
</Heading>
|
|
745
767
|
<VStack style={rowPadding}>
|
|
746
768
|
<Switch
|
|
747
769
|
label="Include my listing(s) in search engines"
|
|
@@ -756,7 +778,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
756
778
|
</VStack>
|
|
757
779
|
|
|
758
780
|
<VStack gap={4}>
|
|
759
|
-
<Heading level={3}>
|
|
781
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
782
|
+
Reviews
|
|
783
|
+
</Heading>
|
|
760
784
|
<Text type="supporting" color="secondary">
|
|
761
785
|
Choose what's shared when you write a review.{' '}
|
|
762
786
|
<Link href="#" type="supporting">
|
|
@@ -801,7 +825,9 @@ export default function SettingsSecurityTemplate() {
|
|
|
801
825
|
</VStack>
|
|
802
826
|
|
|
803
827
|
<VStack gap={4}>
|
|
804
|
-
<Heading level={3}
|
|
828
|
+
<Heading level={3} accessibilityLevel={isNarrow ? 2 : 3}>
|
|
829
|
+
Data privacy
|
|
830
|
+
</Heading>
|
|
805
831
|
<Card>
|
|
806
832
|
<HStack hAlign="between" vAlign="center">
|
|
807
833
|
<Text type="body">Request my personal data</Text>
|
|
@@ -99,7 +99,7 @@ export default function SideGalleryTemplate() {
|
|
|
99
99
|
height="fill"
|
|
100
100
|
contentWidth={1400}
|
|
101
101
|
content={
|
|
102
|
-
<LayoutContent padding={6}>
|
|
102
|
+
<LayoutContent role="main" padding={6}>
|
|
103
103
|
<Grid columns={{minWidth: 360, repeat: 'fit'}} gap={8} align="center">
|
|
104
104
|
{/* Left side: Text + CTA */}
|
|
105
105
|
<VStack gap={6} vAlign="center">
|
|
@@ -458,7 +458,7 @@ export default function SimpleTableTemplate() {
|
|
|
458
458
|
onClick: () =>
|
|
459
459
|
// Demo only: replace this toast with the call that sends the invite.
|
|
460
460
|
showToast({
|
|
461
|
-
body: `
|
|
461
|
+
body: `Demo: the invite would be resent to ${member.email} here`,
|
|
462
462
|
uniqueID: `resend-${member.id}`,
|
|
463
463
|
}),
|
|
464
464
|
},
|
|
@@ -547,7 +547,7 @@ export default function SimpleTableTemplate() {
|
|
|
547
547
|
onClick: () =>
|
|
548
548
|
// Demo only: replace this toast with the export call.
|
|
549
549
|
showToast({
|
|
550
|
-
body: `
|
|
550
|
+
body: `Demo: ${pluralize(selectionState.selectedKeys.size, 'member')} would be exported here`,
|
|
551
551
|
uniqueID: 'export-members',
|
|
552
552
|
}),
|
|
553
553
|
},
|
|
@@ -793,25 +793,26 @@ const BULK_EDIT_ACTIONS: ReadonlyArray<{
|
|
|
793
793
|
key: string;
|
|
794
794
|
label: string;
|
|
795
795
|
icon: React.ReactNode;
|
|
796
|
-
|
|
796
|
+
/** The demo toast for the selected job IDs. */
|
|
797
|
+
demoBody: (jobIds: string) => string;
|
|
797
798
|
}> = [
|
|
798
799
|
{
|
|
799
800
|
key: 'assign',
|
|
800
801
|
label: 'Assign',
|
|
801
802
|
icon: <Icon icon={UserPlus} size="sm" />,
|
|
802
|
-
|
|
803
|
+
demoBody: ids => `Demo: a technician would be assigned to ${ids} here`,
|
|
803
804
|
},
|
|
804
805
|
{
|
|
805
806
|
key: 'reschedule',
|
|
806
807
|
label: 'Reschedule',
|
|
807
808
|
icon: <Icon icon={Calendar} size="sm" />,
|
|
808
|
-
|
|
809
|
+
demoBody: ids => `Demo: ${ids} would be rescheduled here`,
|
|
809
810
|
},
|
|
810
811
|
{
|
|
811
812
|
key: 'cancel',
|
|
812
813
|
label: 'Cancel',
|
|
813
814
|
icon: <Icon icon={CircleX} size="sm" />,
|
|
814
|
-
|
|
815
|
+
demoBody: ids => `Demo: ${ids} would be canceled here`,
|
|
815
816
|
},
|
|
816
817
|
];
|
|
817
818
|
|
|
@@ -3594,7 +3595,15 @@ export default function TableFilterTemplate() {
|
|
|
3594
3595
|
variant="ghost"
|
|
3595
3596
|
size="sm"
|
|
3596
3597
|
icon={action.icon}
|
|
3597
|
-
onClick={() =>
|
|
3598
|
+
onClick={() =>
|
|
3599
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
3600
|
+
showToast({
|
|
3601
|
+
body: action.demoBody(
|
|
3602
|
+
selectedJobs.map(job => job.id).join(', '),
|
|
3603
|
+
),
|
|
3604
|
+
uniqueID: `bulk-${action.key}`,
|
|
3605
|
+
})
|
|
3606
|
+
}
|
|
3598
3607
|
/>
|
|
3599
3608
|
))}
|
|
3600
3609
|
</HStack>
|
|
@@ -4371,7 +4380,13 @@ export default function TableFilterTemplate() {
|
|
|
4371
4380
|
<Button
|
|
4372
4381
|
label="New job"
|
|
4373
4382
|
variant="primary"
|
|
4374
|
-
onClick={() =>
|
|
4383
|
+
onClick={() =>
|
|
4384
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
4385
|
+
showToast({
|
|
4386
|
+
body: 'Demo: a new job form would open here',
|
|
4387
|
+
uniqueID: 'new-job',
|
|
4388
|
+
})
|
|
4389
|
+
}
|
|
4375
4390
|
/>
|
|
4376
4391
|
</HStack>
|
|
4377
4392
|
|
|
@@ -45,6 +45,7 @@ import type {TableColumn, TablePlugin} from '@astryxdesign/core/Table';
|
|
|
45
45
|
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
46
46
|
import {useToast} from '@astryxdesign/core/Toast';
|
|
47
47
|
import {VisuallyHidden} from '@astryxdesign/core/VisuallyHidden';
|
|
48
|
+
import {useImperativeAlertDialog} from '@astryxdesign/core/AlertDialog';
|
|
48
49
|
import {
|
|
49
50
|
PencilIcon,
|
|
50
51
|
DocumentDuplicateIcon,
|
|
@@ -590,11 +591,14 @@ function getColumns({
|
|
|
590
591
|
onEdit,
|
|
591
592
|
onDuplicate,
|
|
592
593
|
onDemo,
|
|
594
|
+
onDelete,
|
|
593
595
|
}: {
|
|
594
596
|
onEdit: (task: TaskRow) => void;
|
|
595
597
|
onDuplicate: (task: TaskRow) => void;
|
|
596
598
|
/** Says what a menu action would do, for actions this demo does not perform. */
|
|
597
599
|
onDemo: (task: TaskRow, action: string) => void;
|
|
600
|
+
/** Asks before the destructive Delete issue action. */
|
|
601
|
+
onDelete: (task: TaskRow) => void;
|
|
598
602
|
}): TableColumn<TaskRow>[] {
|
|
599
603
|
return [
|
|
600
604
|
{
|
|
@@ -727,7 +731,7 @@ function getColumns({
|
|
|
727
731
|
{
|
|
728
732
|
label: 'Delete issue',
|
|
729
733
|
icon: TrashIcon,
|
|
730
|
-
onClick: () =>
|
|
734
|
+
onClick: () => onDelete(task),
|
|
731
735
|
},
|
|
732
736
|
]}
|
|
733
737
|
/>
|
|
@@ -915,6 +919,8 @@ export default function DataTableTemplate() {
|
|
|
915
919
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
916
920
|
const [selectedTask, setSelectedTask] = useState<TaskRow | null>(null);
|
|
917
921
|
const showToast = useToast();
|
|
922
|
+
const confirm = useImperativeAlertDialog();
|
|
923
|
+
const {show: showConfirm, hide: hideConfirm} = confirm;
|
|
918
924
|
const columns = useMemo(
|
|
919
925
|
() =>
|
|
920
926
|
getColumns({
|
|
@@ -936,8 +942,22 @@ export default function DataTableTemplate() {
|
|
|
936
942
|
body: `Demo: ${action} ${task.taskId} would happen here`,
|
|
937
943
|
uniqueID: `${action}-${task.taskId}`,
|
|
938
944
|
}),
|
|
945
|
+
onDelete: task =>
|
|
946
|
+
showConfirm({
|
|
947
|
+
title: `Delete ${task.taskId}?`,
|
|
948
|
+
description: "This demo won't delete anything.",
|
|
949
|
+
actionLabel: 'Delete issue',
|
|
950
|
+
onAction: () => {
|
|
951
|
+
hideConfirm();
|
|
952
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
953
|
+
showToast({
|
|
954
|
+
body: `Demo: ${task.taskId} would be deleted here`,
|
|
955
|
+
uniqueID: `delete-${task.taskId}`,
|
|
956
|
+
});
|
|
957
|
+
},
|
|
958
|
+
}),
|
|
939
959
|
}),
|
|
940
|
-
[showToast],
|
|
960
|
+
[showToast, showConfirm, hideConfirm],
|
|
941
961
|
);
|
|
942
962
|
const [powerSearchFilters, setPowerSearchFilters] = useState<
|
|
943
963
|
ReadonlyArray<PowerSearchFilter>
|
|
@@ -1179,6 +1199,7 @@ export default function DataTableTemplate() {
|
|
|
1179
1199
|
}
|
|
1180
1200
|
/>
|
|
1181
1201
|
</Dialog>
|
|
1202
|
+
{confirm.element}
|
|
1182
1203
|
</>
|
|
1183
1204
|
);
|
|
1184
1205
|
}
|