@riverbankcms/sdk 0.108.0 → 0.111.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/README.md +21 -1
- package/dist/{PreviewEditorSidebar-BBT-kZAM.mjs → PreviewEditorSidebar-CTR6LUhN.mjs} +181 -135
- package/dist/{PreviewEditorUI-D69xNKT2.mjs → PreviewEditorUI-DZg15Zip.mjs} +3 -4
- package/dist/{PreviewQueryProvider-RRu7wyQ5.mjs → PreviewQueryProvider-kkmjklLG.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CuDjXH6o.mjs → SdkPreviewModeRuntime-DeOTAFvR.mjs} +436 -367
- package/dist/{SiteChromeCustomizeContext-BQUY2dEk.mjs → SiteChromeCustomizeContext-DOSDLCiJ.mjs} +3442 -3029
- package/dist/_dts/ai/src/contracts/proposals.d.ts +12633 -10490
- package/dist/_dts/api/src/bookingAdjustments.d.ts +5 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +2 -17
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -5
- package/dist/_dts/api/src/common/envelope.d.ts +7 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +4 -1
- package/dist/_dts/api/src/courses.d.ts +31 -15
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/endpoints.d.ts +49 -4
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +259 -1
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +6 -6
- package/dist/_dts/api/src/siteOperations.d.ts +11 -19
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +29 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -31
- package/dist/_dts/api/src/webhooks.d.ts +98 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +3 -0
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientField.d.ts +9 -0
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +3 -4
- package/dist/_dts/blocks/src/client/course-registration.d.ts +4 -1
- package/dist/_dts/blocks/src/client.d.ts +4 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -8
- package/dist/_dts/blocks/src/index.d.ts +4 -2
- package/dist/_dts/blocks/src/system/blocks/audio-player.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +3 -23
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +5 -4
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -23
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/single-button.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +35 -0
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +16 -6
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
- package/dist/_dts/blocks/src/system/fields/button.d.ts +10 -21
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +10 -1
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +9 -5
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -24
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/ErrorStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.contract.d.ts +326 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.planning.d.ts +27 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +7 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +2 -1
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +4 -2
- package/dist/_dts/content-editor/src/index.d.ts +12 -12
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +17 -2
- package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +31 -0
- package/dist/_dts/content-model/src/content-types/scaffold.d.ts +58 -0
- package/dist/_dts/content-model/src/content-types/sentinels.d.ts +36 -0
- package/dist/_dts/content-model/src/index.d.ts +3 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3278 -3196
- package/dist/_dts/editor-blocks/src/widgets/button/context.d.ts +3 -2
- package/dist/_dts/media-core/src/fileMimeDetection.d.ts +16 -0
- package/dist/_dts/media-core/src/fileStorage.d.ts +8 -0
- package/dist/_dts/media-core/src/storagePathDomain.d.ts +2 -0
- package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +16 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignOpenRequestContext.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +5 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +5 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -7
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +7 -9
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +4 -11
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -7
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +0 -8
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +1 -11
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +1 -5
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +3 -5
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -4
- package/dist/_dts/sdk/src/bookings/types.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/compare.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +18 -0
- package/dist/_dts/sdk/src/cli/commands/entry.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +12 -1
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +3 -2
- package/dist/_dts/sdk/src/cli/commands/verify.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +22 -1
- package/dist/_dts/sdk/src/cli/index.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/output.d.ts +88 -0
- package/dist/_dts/sdk/src/cli/program.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/catalog.d.ts +10 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +7 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +45 -20
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -15
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +3 -3
- package/dist/_dts/site-commands/src/commands.d.ts +1010 -817
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/core.d.ts +15 -46
- package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +147 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +2 -3
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +2 -1
- package/dist/_dts/theme-core/src/buttons/presets.d.ts +4 -25
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +100 -0
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +80 -0
- package/dist/_dts/theme-core/src/buttons/styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.d.ts +49 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +67 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +649 -0
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +753 -0
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +69 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +101 -83
- package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/presets.d.ts +200 -8
- package/dist/_dts/theme-core/src/gradients/utils.d.ts +6 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +87 -126
- package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -2
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +5 -8
- package/dist/_dts/theme-core/src/palette/index.d.ts +0 -1
- package/dist/_dts/theme-core/src/schema.d.ts +112 -138
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +26 -24
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +10 -10
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +19 -153
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +13 -6
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +8 -9
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +33 -12
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
- package/dist/_dts/ui/src/palette/hex.d.ts +3 -3
- package/dist/cli/index.mjs +68396 -67339
- package/dist/cli/init-docs/content/cli-reference.md +50 -7
- package/dist/cli/init-docs/content/content-management.md +7 -4
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +1 -1
- package/dist/cli/init-docs/content/workflow-publish.md +5 -1
- package/dist/client/{DiscountCodeDisclosure-D6TOf6Hi.mjs → DiscountCodeDisclosure-C4xvTBux.mjs} +1 -1
- package/dist/client/{EventCombined.client-Dao3zxRk.mjs → EventCombined.client-Cr7G131j.mjs} +2 -3
- package/dist/client/{EventListing.client-B2NNt4y1.mjs → EventListing.client-CAjbseNy.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BhwFo16w.mjs → LeafletStaticMap-BMlWfwz3.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BWnB7cMR.mjs → MagicLinkForm-ChdFz96y.mjs} +1 -2
- package/dist/client/{StepIndicator-TzRiQ0BY.mjs → StepIndicator-7D3GaBeM.mjs} +2 -2
- package/dist/client/{accordion-BPy-AJ4_.mjs → accordion-D8JTs2Si.mjs} +1 -1
- package/dist/client/{bookingForm-BL4PGZds.mjs → bookingForm-H3DCRBHs.mjs} +6 -7
- package/dist/client/bookings.mjs +4649 -2767
- package/dist/client/{carousel-C2b7Cn9-.mjs → carousel-DMr_QWlz.mjs} +1 -1
- package/dist/client/{cart-BQcbXIVD.mjs → cart-DWMbfBdR.mjs} +3 -3
- package/dist/client/{checkout-DEmpGRJu.mjs → checkout-zmfdkXLx.mjs} +3 -3
- package/dist/client/client.mjs +3195 -2488
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-gcTh5yZT.mjs} +2 -41
- package/dist/client/{colorTokenParts-CMugwvX_.mjs → colorTokenParts-FSS3al6l.mjs} +31 -1
- package/dist/client/{courseRegistration-BqRZPmsq.mjs → courseRegistration-Z_mn18jy.mjs} +100 -37
- package/dist/client/{eventCalendar-B8N_tSl5.mjs → eventCalendar-CYp0YJGF.mjs} +4 -5
- package/dist/client/{eventCombined-Gjn6gtq7.mjs → eventCombined-rKyYZUa9.mjs} +2 -2
- package/dist/client/{eventDetails-M-VCxA-r.mjs → eventDetails-X0ZaUuMj.mjs} +3 -3
- package/dist/client/{eventListing-DR19hqYi.mjs → eventListing-W1SuL7EP.mjs} +2 -2
- package/dist/client/{eventRegistration-BR02a0k3.mjs → eventRegistration-ClWricui.mjs} +6 -7
- package/dist/client/{form-LY2xIbwg.mjs → form--eKPwAAD.mjs} +1 -2
- package/dist/client/{headerSection-CYwwXJfh.mjs → headerSection-BSeGr-FS.mjs} +2 -3
- package/dist/client/hooks.mjs +2169 -2093
- package/dist/client/{locationMap-DWnBXrFq.mjs → locationMap-BpOrtNYn.mjs} +8 -5
- package/dist/client/{media-DHtSxS5V.mjs → media-DoF0dcVx.mjs} +4 -3
- package/dist/client/{newsletterForm-D9s-fQ2P.mjs → newsletterForm-Bt7it7Dy.mjs} +1 -2
- package/dist/client/{pricing-DDq80oYc.mjs → pricing-BTjSDDr4.mjs} +1 -1
- package/dist/client/{productDetail-B0SbWd45.mjs → productDetail-ICnVTcCg.mjs} +3 -3
- package/dist/client/{productList-PwYlZn0y.mjs → productList-ZHr6D604.mjs} +3 -3
- package/dist/client/{propsDecoder-BRWBiH7i.mjs → propsDecoder-wWN0tBDF.mjs} +2484 -223
- package/dist/client/rendering/client.mjs +2532 -2144
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +3322 -2462
- package/dist/client/{shop-CMwZPYME.mjs → shop-C1u_BUn0.mjs} +5 -6
- package/dist/client/{shop-commerce-BuxsFate.mjs → shop-commerce-CleZdRha.mjs} +5 -6
- package/dist/client/{shop-commerce-store-boYlEJ91.mjs → shop-commerce-store-ycnoB2Ce.mjs} +1 -1
- package/dist/client/{shopShared-D2naaOes.mjs → shopShared-CPhByt2a.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-D9RHpVoj.mjs → useDiscountCodeUi-cStSQI6C.mjs} +1 -1
- package/dist/client/{useEventFilters-igGiK1re.mjs → useEventFilters-DKPN7hSY.mjs} +46 -70
- package/dist/client/{usePolling-CI7MbsFB.mjs → usePolling-BKAd6pkZ.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +72 -6
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +72 -6
- package/dist/{previewAuthStore-a_cBD28m.mjs → previewAuthStore-BkT1D06A.mjs} +72 -6
- package/dist/{sdk-runtime-MBzD-GmP.mjs → sdk-runtime-hu3wr3ng.mjs} +2 -2
- package/dist/{separator-5ahRBC85.mjs → separator-Bln8izQ9.mjs} +1 -1
- package/dist/server/components.mjs +3123 -2391
- package/dist/server/config-validation.mjs +2169 -2093
- package/dist/server/config.mjs +2169 -2093
- package/dist/server/data.mjs +2169 -2093
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +73 -7
- package/dist/server/next/revalidate.mjs +53 -1
- package/dist/server/next.mjs +3195 -2397
- package/dist/server/page-converter.mjs +2192 -1945
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2844 -2325
- package/dist/server/rendering.mjs +3123 -2391
- package/dist/server/routing.mjs +2269 -2149
- package/dist/server/server.mjs +2244 -2102
- package/dist/server/theme-bridge.mjs +2720 -1887
- package/dist/server/theme.mjs +1669 -1322
- package/dist/server/webhooks.mjs +54 -2
- package/dist/styles/index.css +5 -0
- package/package.json +7 -1
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/earth-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/flat-ink.d.ts +0 -20
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +0 -172
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/joy-stamp.d.ts +0 -22
- package/dist/_dts/theme-core/src/buttons/personalities/ornate-ritual.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/quiet-arrow.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/showtime-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +0 -273
- package/dist/_dts/theme-core/src/buttons/presets/types.d.ts +0 -88
- package/dist/_dts/theme-core/src/buttons/utils/contrast.d.ts +0 -38
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +0 -57
- package/dist/client/buttons-EBjyslaX.mjs +0 -1852
|
@@ -115,8 +115,8 @@ export declare const accordionSystemSchema: z.ZodObject<{
|
|
|
115
115
|
triggerColorToken: z.ZodOptional<z.ZodString>;
|
|
116
116
|
accent: z.ZodOptional<z.ZodObject<{
|
|
117
117
|
edge: z.ZodEnum<{
|
|
118
|
-
bottom: "bottom";
|
|
119
118
|
left: "left";
|
|
119
|
+
bottom: "bottom";
|
|
120
120
|
top: "top";
|
|
121
121
|
}>;
|
|
122
122
|
colorToken: z.ZodString;
|
|
@@ -1,54 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Small button emitter used by the SDK bridge.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The bridge deliberately has a smaller structural contract than a full CMS
|
|
5
|
+
* theme, but colour relationships still compile through the canonical button
|
|
6
|
+
* colour-state resolver.
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
import type { ExpandedPalette } from '../palette/expandPalette';
|
|
9
|
+
import { type ButtonColourTreatment } from './types';
|
|
8
10
|
export interface ButtonVariantCore {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
background: ButtonBackgroundType;
|
|
13
|
-
/** Background color token for solid backgrounds (e.g., 'primary') */
|
|
14
|
-
backgroundToken?: string;
|
|
15
|
-
/** Gradient stops for gradient backgrounds */
|
|
16
|
-
gradientStops?: string[];
|
|
17
|
-
/** Gradient direction for gradient backgrounds */
|
|
18
|
-
gradientDirection?: 'to-r' | 'to-l' | 'to-t' | 'to-b' | 'to-tr' | 'to-tl' | 'to-br' | 'to-bl';
|
|
19
|
-
/** Text color token */
|
|
20
|
-
textToken: string;
|
|
21
|
-
/** Border color token (for outline style) */
|
|
22
|
-
borderToken?: string;
|
|
23
|
-
/** Border width */
|
|
24
|
-
borderWidth?: 'none' | 'thin' | 'medium' | 'thick';
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly treatment: ButtonColourTreatment;
|
|
13
|
+
readonly borderWidth?: 'none' | 'thin' | 'medium' | 'thick';
|
|
25
14
|
}
|
|
26
15
|
export interface ButtonCoreSettings {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
borderWidth: 'none' | 'thin' | 'medium' | 'thick';
|
|
33
|
-
/** Font weight */
|
|
34
|
-
fontWeight?: number;
|
|
35
|
-
/** Text transform */
|
|
36
|
-
textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
16
|
+
readonly corners: 'square' | 'soft' | 'rounded' | 'pill';
|
|
17
|
+
readonly shadow: 'none' | 'low' | 'medium' | 'high';
|
|
18
|
+
readonly borderWidth: 'none' | 'thin' | 'medium' | 'thick';
|
|
19
|
+
readonly fontWeight?: number;
|
|
20
|
+
readonly textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
37
21
|
}
|
|
38
|
-
|
|
39
|
-
* Generate button CSS from core variant definitions.
|
|
40
|
-
*
|
|
41
|
-
* This is a pure function with no dependencies on Theme type.
|
|
42
|
-
* It generates CSS that uses rgb(var(--tb-{token})) for colors.
|
|
43
|
-
*
|
|
44
|
-
* @param scopeId - Theme scope ID for selector (e.g., 'sdk' -> [data-theme-scope="sdk"])
|
|
45
|
-
* @param variants - Button variant definitions
|
|
46
|
-
* @param settings - Global button settings
|
|
47
|
-
* @returns CSS string
|
|
48
|
-
*/
|
|
49
|
-
export declare function generateButtonCoreCss(scopeId: string, variants: ButtonVariantCore[], settings: ButtonCoreSettings): string;
|
|
50
|
-
/**
|
|
51
|
-
* Get default button variants for SDK usage.
|
|
52
|
-
* These create primary, secondary, outline, and ghost buttons.
|
|
53
|
-
*/
|
|
22
|
+
export declare function generateButtonCoreCss(scopeId: string, variants: readonly ButtonVariantCore[], settings: ButtonCoreSettings, palette: ExpandedPalette): string;
|
|
54
23
|
export declare function getDefaultButtonVariants(): ButtonVariantCore[];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
export type ButtonUnsupportedEffectReason = 'alpha_requires_surface' | 'changes_foreground' | 'changes_border' | 'changes_element_opacity' | 'unresolved_background_overlay' | 'not_button_effect';
|
|
2
|
+
export type ButtonEffectPolicy = Readonly<{
|
|
3
|
+
classification: 'colour-transition';
|
|
4
|
+
transition: Readonly<{
|
|
5
|
+
kind: 'adjust-shade';
|
|
6
|
+
direction: 'darker' | 'lighter';
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
kind: 'replace-background';
|
|
9
|
+
}>;
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
classification: 'non-colour';
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
classification: 'unsupported-colour' | 'unsupported-background-overlay' | 'not-button';
|
|
14
|
+
reason: ButtonUnsupportedEffectReason;
|
|
15
|
+
}>;
|
|
16
|
+
export type ButtonEffectClassification = ButtonEffectPolicy['classification'] | 'unknown';
|
|
17
|
+
/**
|
|
18
|
+
* Exhaustive live policy for every registered effect id.
|
|
19
|
+
*
|
|
20
|
+
* The resolver consumes the transition payload directly, so adding an effect
|
|
21
|
+
* cannot update classification without also defining its runtime behavior.
|
|
22
|
+
*/
|
|
23
|
+
export declare const BUTTON_EFFECT_POLICIES: {
|
|
24
|
+
readonly 'darken-background': {
|
|
25
|
+
readonly classification: "colour-transition";
|
|
26
|
+
readonly transition: {
|
|
27
|
+
readonly kind: "adjust-shade";
|
|
28
|
+
readonly direction: "darker";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly 'lighten-background': {
|
|
32
|
+
readonly classification: "colour-transition";
|
|
33
|
+
readonly transition: {
|
|
34
|
+
readonly kind: "adjust-shade";
|
|
35
|
+
readonly direction: "lighter";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly 'background-on-hover': {
|
|
39
|
+
readonly classification: "colour-transition";
|
|
40
|
+
readonly transition: {
|
|
41
|
+
readonly kind: "replace-background";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly 'background-on-hover-alpha': {
|
|
45
|
+
readonly classification: "unsupported-colour";
|
|
46
|
+
readonly reason: "alpha_requires_surface";
|
|
47
|
+
};
|
|
48
|
+
readonly 'fade-background': {
|
|
49
|
+
readonly classification: "unsupported-colour";
|
|
50
|
+
readonly reason: "changes_element_opacity";
|
|
51
|
+
};
|
|
52
|
+
readonly 'opacity-reduce': {
|
|
53
|
+
readonly classification: "unsupported-colour";
|
|
54
|
+
readonly reason: "changes_element_opacity";
|
|
55
|
+
};
|
|
56
|
+
readonly 'gradient-text': {
|
|
57
|
+
readonly classification: "unsupported-colour";
|
|
58
|
+
readonly reason: "changes_foreground";
|
|
59
|
+
};
|
|
60
|
+
readonly 'text-color-change': {
|
|
61
|
+
readonly classification: "unsupported-colour";
|
|
62
|
+
readonly reason: "changes_foreground";
|
|
63
|
+
};
|
|
64
|
+
readonly 'border-color-change': {
|
|
65
|
+
readonly classification: "unsupported-colour";
|
|
66
|
+
readonly reason: "changes_border";
|
|
67
|
+
};
|
|
68
|
+
readonly 'aurora-glow': {
|
|
69
|
+
readonly classification: "unsupported-background-overlay";
|
|
70
|
+
readonly reason: "unresolved_background_overlay";
|
|
71
|
+
};
|
|
72
|
+
readonly 'cosmic-stardust': {
|
|
73
|
+
readonly classification: "unsupported-background-overlay";
|
|
74
|
+
readonly reason: "unresolved_background_overlay";
|
|
75
|
+
};
|
|
76
|
+
readonly 'gradient-border-fill': {
|
|
77
|
+
readonly classification: "unsupported-background-overlay";
|
|
78
|
+
readonly reason: "unresolved_background_overlay";
|
|
79
|
+
};
|
|
80
|
+
readonly 'animated-gradient-border-fill': {
|
|
81
|
+
readonly classification: "unsupported-background-overlay";
|
|
82
|
+
readonly reason: "unresolved_background_overlay";
|
|
83
|
+
};
|
|
84
|
+
readonly 'nav-underline': {
|
|
85
|
+
readonly classification: "not-button";
|
|
86
|
+
readonly reason: "not_button_effect";
|
|
87
|
+
};
|
|
88
|
+
readonly 'nav-frosted-base': {
|
|
89
|
+
readonly classification: "not-button";
|
|
90
|
+
readonly reason: "not_button_effect";
|
|
91
|
+
};
|
|
92
|
+
readonly 'nav-frosted-hover': {
|
|
93
|
+
readonly classification: "not-button";
|
|
94
|
+
readonly reason: "not_button_effect";
|
|
95
|
+
};
|
|
96
|
+
readonly 'nav-frosted-active': {
|
|
97
|
+
readonly classification: "not-button";
|
|
98
|
+
readonly reason: "not_button_effect";
|
|
99
|
+
};
|
|
100
|
+
readonly 'animated-gradient': {
|
|
101
|
+
readonly classification: "non-colour";
|
|
102
|
+
};
|
|
103
|
+
readonly 'border-glow': {
|
|
104
|
+
readonly classification: "non-colour";
|
|
105
|
+
};
|
|
106
|
+
readonly 'drop-shadow': {
|
|
107
|
+
readonly classification: "non-colour";
|
|
108
|
+
};
|
|
109
|
+
readonly 'inner-shadow': {
|
|
110
|
+
readonly classification: "non-colour";
|
|
111
|
+
};
|
|
112
|
+
readonly 'neumorphic-shadow': {
|
|
113
|
+
readonly classification: "non-colour";
|
|
114
|
+
};
|
|
115
|
+
readonly 'outer-glow': {
|
|
116
|
+
readonly classification: "non-colour";
|
|
117
|
+
};
|
|
118
|
+
readonly 'retro-3d-shadow': {
|
|
119
|
+
readonly classification: "non-colour";
|
|
120
|
+
};
|
|
121
|
+
readonly 'scale-up': {
|
|
122
|
+
readonly classification: "non-colour";
|
|
123
|
+
};
|
|
124
|
+
readonly 'scale-down': {
|
|
125
|
+
readonly classification: "non-colour";
|
|
126
|
+
};
|
|
127
|
+
readonly lift: {
|
|
128
|
+
readonly classification: "non-colour";
|
|
129
|
+
};
|
|
130
|
+
readonly 'press-down': {
|
|
131
|
+
readonly classification: "non-colour";
|
|
132
|
+
};
|
|
133
|
+
readonly pop: {
|
|
134
|
+
readonly classification: "non-colour";
|
|
135
|
+
};
|
|
136
|
+
readonly 'border-bottom-grow': {
|
|
137
|
+
readonly classification: "non-colour";
|
|
138
|
+
};
|
|
139
|
+
readonly 'sketchy-border': {
|
|
140
|
+
readonly classification: "non-colour";
|
|
141
|
+
};
|
|
142
|
+
readonly 'pulse-animation': {
|
|
143
|
+
readonly classification: "non-colour";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export declare function getButtonEffectPolicy(effectId: string): ButtonEffectPolicy | null;
|
|
147
|
+
export declare function classifyButtonEffectId(effectId: string): ButtonEffectClassification;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { TokenResolver } from '../../tokens/resolver';
|
|
2
|
-
import type { ButtonPreset } from '../presets/types';
|
|
3
2
|
import type { ButtonVariant } from '../types';
|
|
4
3
|
import type { Theme } from '../../schema';
|
|
5
4
|
import type { InteractiveElementConfig } from '../../interactive/types';
|
|
@@ -39,7 +38,7 @@ export interface EffectContext {
|
|
|
39
38
|
/** User-provided customization options */
|
|
40
39
|
options: Record<string, unknown>;
|
|
41
40
|
/** Element configuration (access to background, colors, etc.) */
|
|
42
|
-
buttonConfig: ButtonVariant |
|
|
41
|
+
buttonConfig: ButtonVariant | InteractiveElementConfig;
|
|
43
42
|
/** Token resolver for converting tokens to CSS vars */
|
|
44
43
|
tokens: TokenResolver;
|
|
45
44
|
/** Theme configuration (for accessing theme-level settings like shadows) */
|
|
@@ -127,7 +126,7 @@ export interface EffectPreset {
|
|
|
127
126
|
* @param buttonConfig - Button configuration (ButtonVariant or ButtonPreset)
|
|
128
127
|
* @returns True if effect can be applied to this button
|
|
129
128
|
*/
|
|
130
|
-
isApplicable?: (buttonConfig: ButtonVariant |
|
|
129
|
+
isApplicable?: (buttonConfig: ButtonVariant | InteractiveElementConfig) => boolean;
|
|
131
130
|
}
|
|
132
131
|
/**
|
|
133
132
|
* Reference to an effect preset with customization options
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
export * from './types';
|
|
7
7
|
export * from './classNames';
|
|
8
8
|
export * from './generateButtonCss';
|
|
9
|
+
export * from './resolveButtonColourStates';
|
|
9
10
|
export * from './affordanceIcons';
|
|
10
11
|
export * from './generateDefaultButtonSystem';
|
|
11
12
|
export * from './constants';
|
|
12
13
|
export * from './presets';
|
|
13
|
-
export * from './
|
|
14
|
+
export * from './styles';
|
|
14
15
|
export * from './effects/types';
|
|
15
16
|
export * from './effects/registry';
|
|
16
17
|
export * from './effects/presets/transform';
|
|
@@ -1,43 +1,22 @@
|
|
|
1
1
|
import type { ButtonSystem } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Button Preset
|
|
4
|
-
*
|
|
5
|
-
* A preset is a complete ButtonSystem configuration (global settings + variants)
|
|
6
|
-
* that users can select to quickly style their site's buttons.
|
|
7
|
-
*/
|
|
8
2
|
export interface ButtonPreset {
|
|
9
3
|
id: string;
|
|
10
4
|
name: string;
|
|
11
5
|
description: string;
|
|
12
6
|
category: 'modern' | 'retro' | 'minimal' | 'artistic' | 'technical';
|
|
13
7
|
buttonSystem: ButtonSystem;
|
|
14
|
-
/**
|
|
15
|
-
* Theme compatibility metadata
|
|
16
|
-
*
|
|
17
|
-
* Defines which theme characteristics work well with this preset.
|
|
18
|
-
* Used for intelligent filtering to show only contextually appropriate presets.
|
|
19
|
-
*/
|
|
20
8
|
compatibility?: {
|
|
21
|
-
/** Which palette modes work well (undefined = works with both) */
|
|
22
9
|
modes?: ('light' | 'dark')[];
|
|
23
|
-
/** Which tone axes match (undefined = works with all) */
|
|
24
10
|
tones?: ('minimal' | 'classic' | 'bold')[];
|
|
25
|
-
/** Which energy levels match (undefined = works with all) */
|
|
26
11
|
energies?: ('calm' | 'vibrant')[];
|
|
27
12
|
};
|
|
28
13
|
}
|
|
29
14
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
15
|
+
* The dashboard gallery and generated site styles now share the same curated
|
|
16
|
+
* button definitions. The former experiment-era preset catalogue duplicated
|
|
17
|
+
* colour choices and effect emitters, so it could drift outside the canonical
|
|
18
|
+
* colour contract.
|
|
34
19
|
*/
|
|
35
20
|
export declare const buttonPresets: ButtonPreset[];
|
|
36
|
-
/**
|
|
37
|
-
* Get preset by ID
|
|
38
|
-
*/
|
|
39
21
|
export declare function getPresetById(id: string): ButtonPreset | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* Get presets by category
|
|
42
|
-
*/
|
|
43
22
|
export declare function getPresetsByCategory(category: ButtonPreset['category']): ButtonPreset[];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { ExpandedPalette } from '../palette/expandPalette';
|
|
2
|
+
import type { ButtonColourTreatment, ButtonGlobalSettings, ButtonVariant, OpaqueButtonColourToken, VariantEffects } from './types';
|
|
3
|
+
import { type ButtonUnsupportedEffectReason } from './effectClassification';
|
|
4
|
+
export { classifyButtonEffectId, type ButtonEffectClassification, } from './effectClassification';
|
|
5
|
+
export declare const BUTTON_VISUAL_STATES: readonly ["base", "hover", "focus", "active", "disabled"];
|
|
6
|
+
export type ButtonVisualState = (typeof BUTTON_VISUAL_STATES)[number];
|
|
7
|
+
export declare const BUTTON_CONTRAST_POLICY: {
|
|
8
|
+
readonly textMinimumRatio: 4.5;
|
|
9
|
+
readonly nonTextMinimumRatio: 3;
|
|
10
|
+
readonly gradientSamplesPerSegment: 20;
|
|
11
|
+
readonly alphaBackgrounds: "reject-without-known-surface";
|
|
12
|
+
readonly disabled: "retain-full-colour-contract";
|
|
13
|
+
};
|
|
14
|
+
export type ButtonColourContractError = Readonly<{
|
|
15
|
+
tag: 'unknown_palette_token';
|
|
16
|
+
variantId: string;
|
|
17
|
+
state: ButtonVisualState;
|
|
18
|
+
token: OpaqueButtonColourToken;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
tag: 'missing_on_colour';
|
|
21
|
+
variantId: string;
|
|
22
|
+
state: ButtonVisualState;
|
|
23
|
+
backgroundToken: OpaqueButtonColourToken;
|
|
24
|
+
foregroundToken: OpaqueButtonColourToken;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
tag: 'insufficient_contrast';
|
|
27
|
+
variantId: string;
|
|
28
|
+
state: ButtonVisualState;
|
|
29
|
+
background: string;
|
|
30
|
+
foreground: string;
|
|
31
|
+
ratio: number;
|
|
32
|
+
requiredRatio: number;
|
|
33
|
+
}> | Readonly<{
|
|
34
|
+
tag: 'unsupported_colour_effect';
|
|
35
|
+
variantId: string;
|
|
36
|
+
state: ButtonVisualState;
|
|
37
|
+
effectId: string;
|
|
38
|
+
reason: ButtonUnsupportedEffectReason;
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
tag: 'invalid_colour_effect_options';
|
|
41
|
+
variantId: string;
|
|
42
|
+
state: ButtonVisualState;
|
|
43
|
+
effectId: string;
|
|
44
|
+
option: string;
|
|
45
|
+
}> | Readonly<{
|
|
46
|
+
tag: 'inapplicable_colour_effect';
|
|
47
|
+
variantId: string;
|
|
48
|
+
state: ButtonVisualState;
|
|
49
|
+
effectId: string;
|
|
50
|
+
treatment: ButtonColourTreatment['type'];
|
|
51
|
+
}> | Readonly<{
|
|
52
|
+
tag: 'unknown_button_effect';
|
|
53
|
+
variantId: string;
|
|
54
|
+
state: ButtonVisualState;
|
|
55
|
+
effectId: string;
|
|
56
|
+
}>;
|
|
57
|
+
export type ResolvedButtonColour = Readonly<{
|
|
58
|
+
kind: 'solid';
|
|
59
|
+
backgroundToken: OpaqueButtonColourToken;
|
|
60
|
+
foregroundToken: OpaqueButtonColourToken;
|
|
61
|
+
backgroundCss: string;
|
|
62
|
+
foregroundCss: string;
|
|
63
|
+
}> | Readonly<{
|
|
64
|
+
kind: 'gradient';
|
|
65
|
+
backgroundTokens: readonly [OpaqueButtonColourToken, OpaqueButtonColourToken, ...OpaqueButtonColourToken[]];
|
|
66
|
+
foregroundToken: OpaqueButtonColourToken;
|
|
67
|
+
backgroundCss: string;
|
|
68
|
+
foregroundCss: string;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'surface';
|
|
71
|
+
role: 'link';
|
|
72
|
+
backgroundCss: 'transparent';
|
|
73
|
+
foregroundCss: string;
|
|
74
|
+
}>;
|
|
75
|
+
export type ResolvedButtonColourStates = Readonly<Record<ButtonVisualState, ResolvedButtonColour>>;
|
|
76
|
+
export type ResolvedButtonFocusIndicator = Readonly<{
|
|
77
|
+
kind: 'two-tone';
|
|
78
|
+
innerCss: string;
|
|
79
|
+
outerCss: string;
|
|
80
|
+
minimumPairContrast: number;
|
|
81
|
+
}> | Readonly<{
|
|
82
|
+
kind: 'surface-role';
|
|
83
|
+
colorCss: string;
|
|
84
|
+
minimumSurfaceContrast: number;
|
|
85
|
+
}>;
|
|
86
|
+
export type ButtonColourContractResult = Readonly<{
|
|
87
|
+
ok: true;
|
|
88
|
+
states: ResolvedButtonColourStates;
|
|
89
|
+
focusIndicator: ResolvedButtonFocusIndicator;
|
|
90
|
+
nonColourEffects: VariantEffects;
|
|
91
|
+
}> | Readonly<{
|
|
92
|
+
ok: false;
|
|
93
|
+
error: ButtonColourContractError;
|
|
94
|
+
}>;
|
|
95
|
+
export declare function compileButtonColourStates(input: Readonly<{
|
|
96
|
+
variant: ButtonVariant;
|
|
97
|
+
global: ButtonGlobalSettings;
|
|
98
|
+
palette: ExpandedPalette;
|
|
99
|
+
}>): ButtonColourContractResult;
|
|
100
|
+
export declare function formatButtonColourContractError(error: ButtonColourContractError): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ResolvedButtonColour, ResolvedButtonFocusIndicator } from './resolveButtonColourStates';
|
|
2
|
+
export type ButtonCssDeclaration = readonly [property: string, value: string];
|
|
3
|
+
/**
|
|
4
|
+
* Canonical colour declaration mapping shared by full themes and ThemeBridge.
|
|
5
|
+
* Both background properties are always emitted so transitions cannot retain
|
|
6
|
+
* a stale gradient or solid layer.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolvedButtonColourDeclarations(colour: ResolvedButtonColour): readonly ButtonCssDeclaration[];
|
|
9
|
+
export declare function resolvedButtonFocusDeclarations(indicator: ResolvedButtonFocusIndicator): readonly ButtonCssDeclaration[];
|
|
10
|
+
/**
|
|
11
|
+
* Disabled buttons retain their validated colour pair and add a non-layout
|
|
12
|
+
* visual affordance. `currentColor` keeps the cue inside the same contrast
|
|
13
|
+
* relationship, while retaining pointer events lets the not-allowed cursor
|
|
14
|
+
* remain observable.
|
|
15
|
+
*/
|
|
16
|
+
export declare const RESOLVED_BUTTON_DISABLED_DECLARATIONS: readonly ButtonCssDeclaration[];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { StyleTags } from '../../site-styles/styleTags';
|
|
3
|
+
import type { ButtonGlobalSettings, ButtonSizes, ButtonSystem, ButtonVariant } from '../types';
|
|
4
|
+
export declare const PUBLIC_BUTTON_ROLES: readonly ["primary", "secondary", "outline", "ghost", "accent"];
|
|
5
|
+
export type PublicButtonRole = (typeof PUBLIC_BUTTON_ROLES)[number];
|
|
6
|
+
export type CompleteButtonRole = 'primary' | 'secondary';
|
|
7
|
+
export type SupportingButtonRole = Exclude<PublicButtonRole, CompleteButtonRole>;
|
|
8
|
+
export type ButtonVariantAppearance = Readonly<Pick<ButtonVariant, 'background' | 'borderRadius' | 'shadow' | 'border' | 'hoverBackgroundToken' | 'effects' | 'sizes' | 'affordance'>>;
|
|
9
|
+
export type PublicButtonVariant<TRole extends PublicButtonRole = PublicButtonRole> = Omit<ButtonVariant, 'id' | 'enabled'> & Readonly<{
|
|
10
|
+
id: TRole;
|
|
11
|
+
enabled: true;
|
|
12
|
+
}>;
|
|
13
|
+
export type CompleteButtonRoles = Readonly<{
|
|
14
|
+
[TRole in PublicButtonRole]: PublicButtonVariant<TRole>;
|
|
15
|
+
}>;
|
|
16
|
+
type CompleteRoleDefinition<TRole extends PublicButtonRole> = Readonly<{
|
|
17
|
+
kind: 'complete';
|
|
18
|
+
appearance: ButtonVariantAppearance;
|
|
19
|
+
}>;
|
|
20
|
+
type DerivedRoleDefinition = Readonly<{
|
|
21
|
+
kind: 'derive';
|
|
22
|
+
from: CompleteButtonRole;
|
|
23
|
+
overrides?: Partial<ButtonVariantAppearance>;
|
|
24
|
+
}>;
|
|
25
|
+
export type ButtonRoleDefinitions = Readonly<{
|
|
26
|
+
primary: CompleteRoleDefinition<'primary'>;
|
|
27
|
+
secondary: CompleteRoleDefinition<'secondary'>;
|
|
28
|
+
outline: CompleteRoleDefinition<'outline'> | DerivedRoleDefinition;
|
|
29
|
+
ghost: CompleteRoleDefinition<'ghost'> | DerivedRoleDefinition;
|
|
30
|
+
accent: CompleteRoleDefinition<'accent'> | DerivedRoleDefinition;
|
|
31
|
+
}>;
|
|
32
|
+
export type ButtonStyleSystemDefinition = Readonly<{
|
|
33
|
+
global: ButtonGlobalSettings;
|
|
34
|
+
sizes?: ButtonSizes;
|
|
35
|
+
roles: ButtonRoleDefinitions;
|
|
36
|
+
}>;
|
|
37
|
+
type StringParameterKey<TParameters> = Extract<keyof TParameters, string>;
|
|
38
|
+
export type ButtonStyleControl<TParameters> = {
|
|
39
|
+
[TKey in StringParameterKey<TParameters>]: Readonly<{
|
|
40
|
+
kind: 'choice';
|
|
41
|
+
parameter: TKey;
|
|
42
|
+
label: string;
|
|
43
|
+
options: readonly Readonly<{
|
|
44
|
+
value: Extract<TParameters[TKey], string>;
|
|
45
|
+
label: string;
|
|
46
|
+
}>[];
|
|
47
|
+
}>;
|
|
48
|
+
}[StringParameterKey<TParameters>];
|
|
49
|
+
export type ButtonStyleRecipe<TId extends string = string, TParameters = Readonly<Record<string, never>>> = Readonly<{
|
|
50
|
+
id: TId;
|
|
51
|
+
accessibilityLabel: string;
|
|
52
|
+
tags: StyleTags;
|
|
53
|
+
parameterSchema: z.ZodType<TParameters>;
|
|
54
|
+
defaultParameters: TParameters;
|
|
55
|
+
controls: readonly ButtonStyleControl<TParameters>[];
|
|
56
|
+
defineSystem: (parameters: TParameters) => ButtonStyleSystemDefinition;
|
|
57
|
+
}>;
|
|
58
|
+
export type ResolveButtonStyleError = Readonly<{
|
|
59
|
+
kind: 'invalid-parameters';
|
|
60
|
+
styleId: string;
|
|
61
|
+
issues: readonly string[];
|
|
62
|
+
}> | Readonly<{
|
|
63
|
+
kind: 'invalid-button-system';
|
|
64
|
+
styleId: string;
|
|
65
|
+
issues: readonly string[];
|
|
66
|
+
}>;
|
|
67
|
+
export type ResolveButtonStyleResult = Readonly<{
|
|
68
|
+
kind: 'resolved';
|
|
69
|
+
buttonSystem: ButtonSystem;
|
|
70
|
+
}> | Readonly<{
|
|
71
|
+
kind: 'error';
|
|
72
|
+
error: ResolveButtonStyleError;
|
|
73
|
+
}>;
|
|
74
|
+
export declare function defineButtonStyleRecipe<const TId extends string, TParameters>(recipe: ButtonStyleRecipe<TId, TParameters>): ButtonStyleRecipe<TId, TParameters>;
|
|
75
|
+
export declare function materializeButtonRoles(definitions: ButtonRoleDefinitions): CompleteButtonRoles;
|
|
76
|
+
export declare function resolveButtonStyleRecipe<TId extends string, TParameters>(recipe: ButtonStyleRecipe<TId, TParameters>, parameters: unknown): ResolveButtonStyleResult;
|
|
77
|
+
export declare function isPublicButtonRole(value: string): value is PublicButtonRole;
|
|
78
|
+
export declare function hasCompletePublicButtonRoles(buttonSystem: ButtonSystem): boolean;
|
|
79
|
+
export declare function listMissingPublicButtonRoles(buttonSystem: ButtonSystem): readonly PublicButtonRole[];
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ButtonColourTreatment, type ButtonGlobalSettings } from '../../types';
|
|
2
|
+
import { type ButtonVariantAppearance, type ButtonStyleRecipe, type ButtonStyleSystemDefinition } from '../domain';
|
|
3
|
+
type AuthoringColourTreatment = Readonly<{
|
|
4
|
+
type: 'solid';
|
|
5
|
+
colorToken: string;
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
type: 'gradient';
|
|
8
|
+
stops: readonly [string, string, ...string[]];
|
|
9
|
+
direction: Extract<ButtonColourTreatment, {
|
|
10
|
+
type: 'gradient';
|
|
11
|
+
}>['direction'];
|
|
12
|
+
foregroundToken: string;
|
|
13
|
+
}> | Extract<ButtonColourTreatment, {
|
|
14
|
+
type: 'surface';
|
|
15
|
+
}>;
|
|
16
|
+
type AuthoringAppearance = Omit<ButtonVariantAppearance, 'background' | 'hoverBackgroundToken'> & Readonly<{
|
|
17
|
+
background: AuthoringColourTreatment;
|
|
18
|
+
hoverBackgroundToken?: string;
|
|
19
|
+
}>;
|
|
20
|
+
type AuthoringCompleteRole = Readonly<{
|
|
21
|
+
kind: 'complete';
|
|
22
|
+
appearance: AuthoringAppearance;
|
|
23
|
+
}>;
|
|
24
|
+
type AuthoringDerivedRole = Readonly<{
|
|
25
|
+
kind: 'derive';
|
|
26
|
+
from: 'primary' | 'secondary';
|
|
27
|
+
overrides?: Partial<AuthoringAppearance>;
|
|
28
|
+
}>;
|
|
29
|
+
type AuthoringRoleDefinitions = Readonly<{
|
|
30
|
+
primary: AuthoringCompleteRole;
|
|
31
|
+
secondary: AuthoringCompleteRole;
|
|
32
|
+
outline: AuthoringCompleteRole | AuthoringDerivedRole;
|
|
33
|
+
ghost: AuthoringCompleteRole | AuthoringDerivedRole;
|
|
34
|
+
accent: AuthoringCompleteRole | AuthoringDerivedRole;
|
|
35
|
+
}>;
|
|
36
|
+
type AuthoringGlobalSettings = Omit<ButtonGlobalSettings, 'hoverColorToken'> & Readonly<{
|
|
37
|
+
hoverColorToken?: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function defineStaticButtonStyleRecipe<const TId extends string>(input: {
|
|
40
|
+
id: TId;
|
|
41
|
+
accessibilityLabel: string;
|
|
42
|
+
tags: ButtonStyleRecipe<TId>['tags'];
|
|
43
|
+
system: Readonly<{
|
|
44
|
+
global: AuthoringGlobalSettings;
|
|
45
|
+
sizes?: ButtonStyleSystemDefinition['sizes'];
|
|
46
|
+
roles: AuthoringRoleDefinitions;
|
|
47
|
+
}>;
|
|
48
|
+
}): ButtonStyleRecipe<TId>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare const quietArrowRecipe: Readonly<{
|
|
2
|
+
id: "quiet-arrow";
|
|
3
|
+
accessibilityLabel: string;
|
|
4
|
+
tags: Readonly<Partial<Readonly<{
|
|
5
|
+
tone: import("../../../../../blocks/src/index").StyleTone;
|
|
6
|
+
energy: import("../../../../../blocks/src/index").StyleEnergy;
|
|
7
|
+
motion: import("../../../../../blocks/src/index").StyleMotion;
|
|
8
|
+
era: import("../../../../../blocks/src/index").StyleEra;
|
|
9
|
+
}>>>;
|
|
10
|
+
parameterSchema: import("zod").ZodType<{
|
|
11
|
+
secondaryTreatment: "outlined" | "solid-accent";
|
|
12
|
+
}, unknown, import("zod/v4/core").$ZodTypeInternals<{
|
|
13
|
+
secondaryTreatment: "outlined" | "solid-accent";
|
|
14
|
+
}, unknown>>;
|
|
15
|
+
defaultParameters: {
|
|
16
|
+
secondaryTreatment: "outlined" | "solid-accent";
|
|
17
|
+
};
|
|
18
|
+
controls: readonly Readonly<{
|
|
19
|
+
kind: "choice";
|
|
20
|
+
parameter: "secondaryTreatment";
|
|
21
|
+
label: string;
|
|
22
|
+
options: readonly Readonly<{
|
|
23
|
+
value: "outlined" | "solid-accent";
|
|
24
|
+
label: string;
|
|
25
|
+
}>[];
|
|
26
|
+
}>[];
|
|
27
|
+
defineSystem: (parameters: {
|
|
28
|
+
secondaryTreatment: "outlined" | "solid-accent";
|
|
29
|
+
}) => Readonly<{
|
|
30
|
+
global: import("../../../../../blocks/src/index").ButtonGlobalSettings;
|
|
31
|
+
sizes?: import("../..").ButtonSizes;
|
|
32
|
+
roles: Readonly<{
|
|
33
|
+
primary: Readonly<{
|
|
34
|
+
kind: "complete";
|
|
35
|
+
appearance: import("..").ButtonVariantAppearance;
|
|
36
|
+
}>;
|
|
37
|
+
secondary: Readonly<{
|
|
38
|
+
kind: "complete";
|
|
39
|
+
appearance: import("..").ButtonVariantAppearance;
|
|
40
|
+
}>;
|
|
41
|
+
outline: Readonly<{
|
|
42
|
+
kind: "complete";
|
|
43
|
+
appearance: import("..").ButtonVariantAppearance;
|
|
44
|
+
}> | Readonly<{
|
|
45
|
+
kind: "derive";
|
|
46
|
+
from: import("..").CompleteButtonRole;
|
|
47
|
+
overrides?: Partial<import("..").ButtonVariantAppearance>;
|
|
48
|
+
}>;
|
|
49
|
+
ghost: Readonly<{
|
|
50
|
+
kind: "complete";
|
|
51
|
+
appearance: import("..").ButtonVariantAppearance;
|
|
52
|
+
}> | Readonly<{
|
|
53
|
+
kind: "derive";
|
|
54
|
+
from: import("..").CompleteButtonRole;
|
|
55
|
+
overrides?: Partial<import("..").ButtonVariantAppearance>;
|
|
56
|
+
}>;
|
|
57
|
+
accent: Readonly<{
|
|
58
|
+
kind: "complete";
|
|
59
|
+
appearance: import("..").ButtonVariantAppearance;
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: "derive";
|
|
62
|
+
from: import("..").CompleteButtonRole;
|
|
63
|
+
overrides?: Partial<import("..").ButtonVariantAppearance>;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
67
|
+
}>;
|