@riverbankcms/sdk 0.108.0 → 0.109.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-DWqwfy3_.mjs} +7 -22
- package/dist/{PreviewEditorUI-D69xNKT2.mjs → PreviewEditorUI-B7OL4sfR.mjs} +3 -3
- package/dist/{PreviewQueryProvider-RRu7wyQ5.mjs → PreviewQueryProvider-D0y2l8JN.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CuDjXH6o.mjs → SdkPreviewModeRuntime-D8Gt9Gbe.mjs} +212 -153
- package/dist/{SiteChromeCustomizeContext-BQUY2dEk.mjs → SiteChromeCustomizeContext-DUpalEdL.mjs} +1919 -1032
- package/dist/_dts/ai/src/contracts/proposals.d.ts +11244 -10741
- 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/common/envelope.d.ts +7 -0
- package/dist/_dts/api/src/courses.d.ts +1 -0
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/endpoints.d.ts +35 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- 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 +247 -1
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +1 -5
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +29 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -27
- 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/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- 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 +1 -22
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -22
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -0
- 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 +3 -0
- 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/customize/backgrounds.d.ts +16 -6
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
- 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 +3071 -3157
- 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/preview/StyleConfigurator.state.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- 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/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 +43 -19
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +893 -823
- 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 +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +44 -32
- 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/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/designState.d.ts +10 -10
- 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/runtimeCompiler.d.ts +29 -8
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
- package/dist/cli/index.mjs +67956 -66745
- 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-publish.md +5 -1
- package/dist/client/{DiscountCodeDisclosure-D6TOf6Hi.mjs → DiscountCodeDisclosure-DU1ygxU2.mjs} +1 -1
- package/dist/client/{EventCombined.client-Dao3zxRk.mjs → EventCombined.client-DB5zagCo.mjs} +3 -3
- package/dist/client/{EventListing.client-B2NNt4y1.mjs → EventListing.client-CTX9JHBL.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BhwFo16w.mjs → LeafletStaticMap-BYImhgiB.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BWnB7cMR.mjs → MagicLinkForm-CRkw_M3l.mjs} +2 -2
- package/dist/client/{StepIndicator-TzRiQ0BY.mjs → StepIndicator-BnmVBJJh.mjs} +2 -2
- package/dist/client/{accordion-BPy-AJ4_.mjs → accordion-CeGreumd.mjs} +1 -1
- package/dist/client/{bookingForm-BL4PGZds.mjs → bookingForm-CSzFNrpN.mjs} +6 -6
- package/dist/client/bookings.mjs +512 -252
- package/dist/client/{buttons-EBjyslaX.mjs → buttons-DoFV7KDL.mjs} +493 -230
- package/dist/client/{carousel-C2b7Cn9-.mjs → carousel-B2jDtogf.mjs} +1 -1
- package/dist/client/{cart-BQcbXIVD.mjs → cart-D-jZ-vaY.mjs} +3 -3
- package/dist/client/{checkout-DEmpGRJu.mjs → checkout-Dza-LA7N.mjs} +3 -3
- package/dist/client/client.mjs +1673 -785
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-CrgzoXsm.mjs} +1 -30
- package/dist/client/{courseRegistration-BqRZPmsq.mjs → courseRegistration-TYkNychb.mjs} +7 -7
- package/dist/client/{eventCalendar-B8N_tSl5.mjs → eventCalendar-BI_90SsT.mjs} +5 -5
- package/dist/client/{eventCombined-Gjn6gtq7.mjs → eventCombined-mNrpryE9.mjs} +2 -2
- package/dist/client/{eventDetails-M-VCxA-r.mjs → eventDetails-D4GVlCIY.mjs} +3 -3
- package/dist/client/{eventListing-DR19hqYi.mjs → eventListing-YhKN018y.mjs} +2 -2
- package/dist/client/{eventRegistration-BR02a0k3.mjs → eventRegistration-CdHGtilr.mjs} +7 -7
- package/dist/client/foregroundContract-xICPq59x.mjs +31 -0
- package/dist/client/{form-LY2xIbwg.mjs → form-AcAL45rA.mjs} +2 -2
- package/dist/client/{headerSection-CYwwXJfh.mjs → headerSection-uEC52ueD.mjs} +3 -3
- package/dist/client/hooks.mjs +890 -497
- package/dist/client/{locationMap-DWnBXrFq.mjs → locationMap-_wJDSUYe.mjs} +3 -3
- package/dist/client/{media-DHtSxS5V.mjs → media-BK0O3b-U.mjs} +3 -2
- package/dist/client/{newsletterForm-D9s-fQ2P.mjs → newsletterForm-DrArsb2B.mjs} +2 -2
- package/dist/client/{pricing-DDq80oYc.mjs → pricing-BSYVghwo.mjs} +1 -1
- package/dist/client/{productDetail-B0SbWd45.mjs → productDetail-Dyk90sMs.mjs} +3 -3
- package/dist/client/{productList-PwYlZn0y.mjs → productList-BCKThwAI.mjs} +3 -3
- package/dist/client/{propsDecoder-BRWBiH7i.mjs → propsDecoder-CkXxkdSR.mjs} +63 -24
- package/dist/client/rendering/client.mjs +1034 -486
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +1832 -760
- package/dist/client/{shop-CMwZPYME.mjs → shop-DeltVH10.mjs} +6 -6
- package/dist/client/{shop-commerce-BuxsFate.mjs → shop-commerce-BD9Jsm2Z.mjs} +6 -6
- package/dist/client/{shop-commerce-store-boYlEJ91.mjs → shop-commerce-store-CmXD6FDS.mjs} +1 -1
- package/dist/client/{shopShared-D2naaOes.mjs → shopShared-B8v-lH_F.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D9RHpVoj.mjs → useDiscountCodeUi-DbWJN8ld.mjs} +1 -1
- package/dist/client/{useEventFilters-igGiK1re.mjs → useEventFilters-EJIMUnqT.mjs} +46 -69
- package/dist/client/{usePolling-CI7MbsFB.mjs → usePolling-Cmh14fc7.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +35 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +35 -0
- package/dist/{previewAuthStore-a_cBD28m.mjs → previewAuthStore-CTO7CRPk.mjs} +35 -0
- package/dist/{sdk-runtime-MBzD-GmP.mjs → sdk-runtime-Dou0GAav.mjs} +2 -2
- package/dist/{separator-5ahRBC85.mjs → separator-CI5wZNXT.mjs} +1 -1
- package/dist/server/components.mjs +1832 -784
- package/dist/server/config-validation.mjs +890 -497
- package/dist/server/config.mjs +890 -497
- package/dist/server/data.mjs +890 -497
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +36 -1
- package/dist/server/next.mjs +1868 -785
- package/dist/server/page-converter.mjs +849 -285
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1553 -718
- package/dist/server/rendering.mjs +1832 -784
- package/dist/server/routing.mjs +933 -522
- package/dist/server/server.mjs +929 -501
- package/dist/server/theme-bridge.mjs +1408 -392
- package/dist/server/theme.mjs +471 -228
- package/dist/styles/index.css +5 -0
- package/package.json +7 -1
- 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/client.mjs
CHANGED
|
@@ -6314,6 +6314,41 @@ const API_ENDPOINTS$1 = {
|
|
|
6314
6314
|
auth: "service",
|
|
6315
6315
|
responseKind: "json"
|
|
6316
6316
|
},
|
|
6317
|
+
sdkCatalogTheme: {
|
|
6318
|
+
path: "/sdk/{siteId}/catalog/theme",
|
|
6319
|
+
method: "GET",
|
|
6320
|
+
errors: ["server:internal_error"],
|
|
6321
|
+
auth: "service",
|
|
6322
|
+
responseKind: "json"
|
|
6323
|
+
},
|
|
6324
|
+
sdkCatalogBlocks: {
|
|
6325
|
+
path: "/sdk/{siteId}/catalog/blocks",
|
|
6326
|
+
method: "GET",
|
|
6327
|
+
errors: ["server:internal_error"],
|
|
6328
|
+
auth: "service",
|
|
6329
|
+
responseKind: "json"
|
|
6330
|
+
},
|
|
6331
|
+
sdkCatalogContentTypes: {
|
|
6332
|
+
path: "/sdk/{siteId}/catalog/content-types",
|
|
6333
|
+
method: "GET",
|
|
6334
|
+
errors: ["server:internal_error"],
|
|
6335
|
+
auth: "service",
|
|
6336
|
+
responseKind: "json"
|
|
6337
|
+
},
|
|
6338
|
+
sdkCapabilities: {
|
|
6339
|
+
path: "/sdk/{siteId}/capabilities",
|
|
6340
|
+
method: "GET",
|
|
6341
|
+
errors: ["server:internal_error"],
|
|
6342
|
+
auth: "service",
|
|
6343
|
+
responseKind: "json"
|
|
6344
|
+
},
|
|
6345
|
+
sdkListDemoContent: {
|
|
6346
|
+
path: "/sdk/{siteId}/demo-content",
|
|
6347
|
+
method: "GET",
|
|
6348
|
+
errors: ["server:internal_error"],
|
|
6349
|
+
auth: "service",
|
|
6350
|
+
responseKind: "json"
|
|
6351
|
+
},
|
|
6317
6352
|
sdkPullPages: {
|
|
6318
6353
|
path: "/sdk/{siteId}/pull/pages",
|
|
6319
6354
|
method: "GET",
|
|
@@ -7572,18 +7607,25 @@ var init_booking_instalments = __esmMin((() => {}));
|
|
|
7572
7607
|
//#endregion
|
|
7573
7608
|
//#region ../core/src/booking-date-time.ts
|
|
7574
7609
|
function isValidTimeZone$1(timeZone) {
|
|
7610
|
+
const cached = timeZoneValidityCache.get(timeZone);
|
|
7611
|
+
if (cached !== void 0) return cached;
|
|
7612
|
+
let isValid;
|
|
7575
7613
|
try {
|
|
7576
7614
|
new Intl.DateTimeFormat(DEFAULT_LOCALE, { timeZone }).format(/* @__PURE__ */ new Date());
|
|
7577
|
-
|
|
7615
|
+
isValid = true;
|
|
7578
7616
|
} catch {
|
|
7579
|
-
|
|
7617
|
+
isValid = false;
|
|
7580
7618
|
}
|
|
7619
|
+
if (timeZoneValidityCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) timeZoneValidityCache.clear();
|
|
7620
|
+
timeZoneValidityCache.set(timeZone, isValid);
|
|
7621
|
+
return isValid;
|
|
7581
7622
|
}
|
|
7582
7623
|
function getSafeTimeZone(timeZone) {
|
|
7583
7624
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
7584
7625
|
return normalized.length > 0 && isValidTimeZone$1(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
7585
7626
|
}
|
|
7586
7627
|
function parseStrictBookingTimeZone(timeZone) {
|
|
7628
|
+
if (typeof timeZone !== "string") return null;
|
|
7587
7629
|
const normalized = timeZone.trim();
|
|
7588
7630
|
if (normalized.length === 0 || !isValidTimeZone$1(normalized)) return null;
|
|
7589
7631
|
return normalized;
|
|
@@ -7596,10 +7638,19 @@ function formatParseError(error) {
|
|
|
7596
7638
|
}
|
|
7597
7639
|
}
|
|
7598
7640
|
function formatToPartsLookup(date, locale, timeZone, format) {
|
|
7599
|
-
return new Map(
|
|
7641
|
+
return new Map(getCachedDateTimeFormatter(locale, timeZone, format).formatToParts(date).map((part) => [part.type, part.value]));
|
|
7642
|
+
}
|
|
7643
|
+
function getCachedDateTimeFormatter(locale, timeZone, format) {
|
|
7644
|
+
const key = `${locale}\u0000${timeZone}\u0000${JSON.stringify(Object.entries(format).sort(([left], [right]) => left.localeCompare(right)))}`;
|
|
7645
|
+
const cached = dateTimeFormatterCache.get(key);
|
|
7646
|
+
if (cached !== void 0) return cached;
|
|
7647
|
+
const formatter = new Intl.DateTimeFormat(locale, {
|
|
7600
7648
|
...format,
|
|
7601
7649
|
timeZone
|
|
7602
|
-
})
|
|
7650
|
+
});
|
|
7651
|
+
if (dateTimeFormatterCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) dateTimeFormatterCache.clear();
|
|
7652
|
+
dateTimeFormatterCache.set(key, formatter);
|
|
7653
|
+
return formatter;
|
|
7603
7654
|
}
|
|
7604
7655
|
function getZonedDateTimeParts(date, timeZone) {
|
|
7605
7656
|
const parts = formatToPartsLookup(date, "en-GB", timeZone, {
|
|
@@ -7652,23 +7703,9 @@ function toUtcIsoDateTimeString(value) {
|
|
|
7652
7703
|
return parsed.value;
|
|
7653
7704
|
}
|
|
7654
7705
|
function parseScheduledBookingDateTime(input) {
|
|
7706
|
+
let startsAt;
|
|
7655
7707
|
try {
|
|
7656
|
-
|
|
7657
|
-
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
7658
|
-
if (timeZone === null) return {
|
|
7659
|
-
ok: false,
|
|
7660
|
-
field: "timeZone",
|
|
7661
|
-
reason: "invalid_time_zone",
|
|
7662
|
-
value: input.timeZone
|
|
7663
|
-
};
|
|
7664
|
-
return {
|
|
7665
|
-
ok: true,
|
|
7666
|
-
value: {
|
|
7667
|
-
startsAt,
|
|
7668
|
-
timeZone,
|
|
7669
|
-
locale: input.locale
|
|
7670
|
-
}
|
|
7671
|
-
};
|
|
7708
|
+
startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
7672
7709
|
} catch {
|
|
7673
7710
|
return {
|
|
7674
7711
|
ok: false,
|
|
@@ -7677,6 +7714,21 @@ function parseScheduledBookingDateTime(input) {
|
|
|
7677
7714
|
value: input.startsAt
|
|
7678
7715
|
};
|
|
7679
7716
|
}
|
|
7717
|
+
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
7718
|
+
if (timeZone === null) return {
|
|
7719
|
+
ok: false,
|
|
7720
|
+
field: "timeZone",
|
|
7721
|
+
reason: "invalid_time_zone",
|
|
7722
|
+
value: typeof input.timeZone === "string" ? input.timeZone : ""
|
|
7723
|
+
};
|
|
7724
|
+
return {
|
|
7725
|
+
ok: true,
|
|
7726
|
+
value: {
|
|
7727
|
+
startsAt,
|
|
7728
|
+
timeZone,
|
|
7729
|
+
locale: input.locale
|
|
7730
|
+
}
|
|
7731
|
+
};
|
|
7680
7732
|
}
|
|
7681
7733
|
function parseScheduledBookingDateRange(input) {
|
|
7682
7734
|
const start = parseScheduledBookingDateTime(input);
|
|
@@ -7715,10 +7767,7 @@ function toScheduledBookingDateRange(input) {
|
|
|
7715
7767
|
function formatBookingInstant(isoString, options) {
|
|
7716
7768
|
const date = new Date(isoString);
|
|
7717
7769
|
if (Number.isNaN(date.getTime())) return isoString;
|
|
7718
|
-
return
|
|
7719
|
-
...options.format,
|
|
7720
|
-
timeZone: getSafeTimeZone(options.timeZone)
|
|
7721
|
-
}).format(date);
|
|
7770
|
+
return getCachedDateTimeFormatter(options.locale ?? DEFAULT_LOCALE, getSafeTimeZone(options.timeZone), options.format).format(date);
|
|
7722
7771
|
}
|
|
7723
7772
|
function formatBookingDate(input, format = {
|
|
7724
7773
|
weekday: "long",
|
|
@@ -7806,7 +7855,7 @@ function addLocalScheduleDays(date, days) {
|
|
|
7806
7855
|
day: utcDate.getUTCDate()
|
|
7807
7856
|
};
|
|
7808
7857
|
}
|
|
7809
|
-
var DEFAULT_LOCALE, FALLBACK_TIMEZONE, DEFAULT_BOOKING_DATE_TIME_FORMAT, LOCAL_DATE_PATTERN;
|
|
7858
|
+
var DEFAULT_LOCALE, FALLBACK_TIMEZONE, DEFAULT_BOOKING_DATE_TIME_FORMAT, LOCAL_DATE_PATTERN, DATE_TIME_FORMATTER_CACHE_LIMIT, dateTimeFormatterCache, timeZoneValidityCache;
|
|
7810
7859
|
var init_booking_date_time = __esmMin((() => {
|
|
7811
7860
|
init_result();
|
|
7812
7861
|
DEFAULT_LOCALE = "en-US";
|
|
@@ -7819,6 +7868,9 @@ var init_booking_date_time = __esmMin((() => {
|
|
|
7819
7868
|
minute: "2-digit"
|
|
7820
7869
|
};
|
|
7821
7870
|
LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
7871
|
+
DATE_TIME_FORMATTER_CACHE_LIMIT = 100;
|
|
7872
|
+
dateTimeFormatterCache = /* @__PURE__ */ new Map();
|
|
7873
|
+
timeZoneValidityCache = /* @__PURE__ */ new Map();
|
|
7822
7874
|
})), init_dated_offering_settlement = __esmMin((() => {
|
|
7823
7875
|
init_result();
|
|
7824
7876
|
}));
|
|
@@ -8393,7 +8445,8 @@ function validateRelativeStoragePath(value) {
|
|
|
8393
8445
|
if (value.startsWith("sites/")) return fail({ tag: "SITE_SCOPED_PATH" });
|
|
8394
8446
|
if (value.startsWith("/")) return fail({ tag: "LEADING_SLASH" });
|
|
8395
8447
|
if (value.includes("//")) return fail({ tag: "DOUBLE_SLASH" });
|
|
8396
|
-
if (value.
|
|
8448
|
+
if (value.includes("%")) return fail({ tag: "PERCENT_ENCODING" });
|
|
8449
|
+
if (value.split("/").some((segment) => segment === "." || segment === "..")) return fail({ tag: "TRAVERSAL" });
|
|
8397
8450
|
return ok$1(value);
|
|
8398
8451
|
}
|
|
8399
8452
|
function brandRelativeStoragePath(value) {
|
|
@@ -9278,7 +9331,7 @@ var init_repeaterGrid = __esmMin((() => {
|
|
|
9278
9331
|
DEFAULT_REPEATER_GRID_COLUMN_FIELD_ID = "gridColumn";
|
|
9279
9332
|
}));
|
|
9280
9333
|
var ICON_PICKER_PRESETS;
|
|
9281
|
-
var init_presets$
|
|
9334
|
+
var init_presets$2 = __esmMin((() => {
|
|
9282
9335
|
ICON_PICKER_PRESETS = ["cta", "feature"];
|
|
9283
9336
|
}));
|
|
9284
9337
|
//#endregion
|
|
@@ -9365,11 +9418,11 @@ function createSdkSelectField(input) {
|
|
|
9365
9418
|
}
|
|
9366
9419
|
}));
|
|
9367
9420
|
}
|
|
9368
|
-
var visibilityLevels, MEDIA_KINDS, DISPLAY_MEDIA_KINDS, PUBLIC_FILE_FIELD_KINDS, siteOptionSources, mediaDeliverySchema, selectOptionSchema, selectSourceSchema, visibleWhenPredicateSchema, visibleWhenSchema, uiSchema, baseFieldSchema, textFieldSchema, richTextFieldSchema, inlineTextFieldSchema, mediaFieldSchema, fileFieldSchema, booleanFieldSchema, dateFieldSchema, timeFieldSchema, dateTimeFieldSchema, slugFieldSchema, urlFieldSchema, linkFieldSchema, selectFieldSchema, referenceFieldSchema, itemTypeSchema, repeaterFieldSchema, groupFieldSchema, modalFieldSchema, numberFieldSchema, tabDefinitionSchema, tabGroupFieldSchema, presetOptionSchema, presetOrCustomFieldSchema, contentTypeSelectFieldSchema, entryPickerFieldSchema, _fieldSchemaInternal, fieldSchema, slotSchema, typographyTokens$1, colorTokens$1, spacingTokens$1, radiusTokens$1, styleTokenSchema, behaviourSchema, quickFieldPrioritySchema, previewCustomizeManifestCurationSchema, blockCategoryEnum;
|
|
9421
|
+
var visibilityLevels, MEDIA_KINDS, DISPLAY_MEDIA_KINDS, PUBLIC_FILE_FIELD_KINDS, siteOptionSources, mediaDeliverySchema, selectOptionSchema, selectSourceSchema, visibleWhenPredicateSchema, visibleWhenSchema, uiSchema, baseFieldSchema, textFieldSchema, richTextFieldSchema, inlineTextFieldSchema, mediaFieldSchema, fileFieldSchema, booleanFieldSchema, dateFieldSchema, timeFieldSchema, dateTimeFieldSchema, slugFieldSchema, urlFieldSchema, linkFieldSchema, selectFieldSchema, referenceFieldSchema, itemTypeSchema, repeaterFieldSchema, groupFieldSchema, modalFieldSchema, numberFieldSchema, tabDefinitionSchema, tabGroupFieldSchema, presetOptionSchema, presetOrCustomFieldSchema, contentTypeSelectFieldSchema, entryPickerFieldSchema, _fieldSchemaInternal, fieldSchema, slotSchema, typographyTokens$1, colorTokens$1, spacingTokens$1, radiusTokens$1, styleTokenSchema, behaviourSchema, quickFieldPrioritySchema, previewCustomizeManifestCurationSchema, blockCategoryEnum, blockContentSourceKinds, blockContentSourceSchema;
|
|
9369
9422
|
var init_schema$1 = __esmMin((() => {
|
|
9370
9423
|
init_node();
|
|
9371
9424
|
init_repeaterGrid();
|
|
9372
|
-
init_presets$
|
|
9425
|
+
init_presets$2();
|
|
9373
9426
|
visibilityLevels = [
|
|
9374
9427
|
"admin",
|
|
9375
9428
|
"designer",
|
|
@@ -9895,6 +9948,21 @@ var init_schema$1 = __esmMin((() => {
|
|
|
9895
9948
|
"layout",
|
|
9896
9949
|
"interactive"
|
|
9897
9950
|
]);
|
|
9951
|
+
blockContentSourceKinds = [
|
|
9952
|
+
"inline",
|
|
9953
|
+
"entries",
|
|
9954
|
+
"mixed"
|
|
9955
|
+
];
|
|
9956
|
+
blockContentSourceSchema = z$1.object({
|
|
9957
|
+
kind: z$1.enum(blockContentSourceKinds),
|
|
9958
|
+
contentType: z$1.string().min(1).optional()
|
|
9959
|
+
}).superRefine((value, ctx) => {
|
|
9960
|
+
if (value.kind === "inline" && value.contentType) ctx.addIssue({
|
|
9961
|
+
code: z$1.ZodIssueCode.custom,
|
|
9962
|
+
path: ["contentType"],
|
|
9963
|
+
message: "contentType is not allowed when contentSource.kind is \"inline\""
|
|
9964
|
+
});
|
|
9965
|
+
});
|
|
9898
9966
|
z$1.object({
|
|
9899
9967
|
name: z$1.string().min(1),
|
|
9900
9968
|
version: z$1.string().min(1),
|
|
@@ -9925,6 +9993,12 @@ var init_schema$1 = __esmMin((() => {
|
|
|
9925
9993
|
}).optional()).optional(),
|
|
9926
9994
|
category: blockCategoryEnum.optional(),
|
|
9927
9995
|
contentTypes: z$1.array(z$1.string()).optional(),
|
|
9996
|
+
/**
|
|
9997
|
+
* Explicit content-source classification (inline / entries / mixed). Optional at the
|
|
9998
|
+
* schema level for backward compatibility with SDK-defined custom blocks, but every
|
|
9999
|
+
* registered SYSTEM block must declare it (enforced by a registry-wide test).
|
|
10000
|
+
*/
|
|
10001
|
+
contentSource: blockContentSourceSchema.optional(),
|
|
9928
10002
|
tags: z$1.array(z$1.string()).optional(),
|
|
9929
10003
|
icon: z$1.string().optional()
|
|
9930
10004
|
});
|
|
@@ -11479,7 +11553,7 @@ function normalizeStoredObjectChildren(children, value, ctx) {
|
|
|
11479
11553
|
return normalized;
|
|
11480
11554
|
}
|
|
11481
11555
|
function normalizeStoredRepeaterItems(plan, value, ctx) {
|
|
11482
|
-
if (!isUnknownArray$
|
|
11556
|
+
if (!isUnknownArray$4(value)) return value;
|
|
11483
11557
|
return value.map((item) => {
|
|
11484
11558
|
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
11485
11559
|
const itemRecord = item;
|
|
@@ -11538,7 +11612,7 @@ function getAtFieldPath(source, path) {
|
|
|
11538
11612
|
}, source);
|
|
11539
11613
|
}
|
|
11540
11614
|
function normalizeRepeaterItems(plan, value, ctx) {
|
|
11541
|
-
if (!isUnknownArray$
|
|
11615
|
+
if (!isUnknownArray$4(value)) return value;
|
|
11542
11616
|
return value.map((item) => {
|
|
11543
11617
|
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
11544
11618
|
const itemRecord = item;
|
|
@@ -11886,7 +11960,7 @@ function validateExplicitNullForPushPlan(plan, value, ctx) {
|
|
|
11886
11960
|
}
|
|
11887
11961
|
}
|
|
11888
11962
|
function validateExplicitNullsForPushRepeater(plan, value, ctx) {
|
|
11889
|
-
if (!isUnknownArray$
|
|
11963
|
+
if (!isUnknownArray$4(value)) return [];
|
|
11890
11964
|
return value.flatMap((item, index) => {
|
|
11891
11965
|
if (!isPlainObject$4(item)) return [];
|
|
11892
11966
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === item._type)?.fields : plan.repeatedItemPlan;
|
|
@@ -11974,7 +12048,7 @@ function isEmptyValue$1(value) {
|
|
|
11974
12048
|
function isPlainObject$4(value) {
|
|
11975
12049
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
11976
12050
|
}
|
|
11977
|
-
function isUnknownArray$
|
|
12051
|
+
function isUnknownArray$4(value) {
|
|
11978
12052
|
return Array.isArray(value);
|
|
11979
12053
|
}
|
|
11980
12054
|
function isValidRichTextDoc(value) {
|
|
@@ -12062,7 +12136,7 @@ init_augmentManifest();
|
|
|
12062
12136
|
init_schema$1();
|
|
12063
12137
|
//#endregion
|
|
12064
12138
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
12065
|
-
function hexToRgb$
|
|
12139
|
+
function hexToRgb$1(hex) {
|
|
12066
12140
|
const h = hex.replace(/^#/, "");
|
|
12067
12141
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
12068
12142
|
if (m.length !== 6) throw new Error("Bad hex");
|
|
@@ -12172,7 +12246,7 @@ function oklchToHexGamut(L, C, h) {
|
|
|
12172
12246
|
return rgbToHex$1(r, g, bb);
|
|
12173
12247
|
}
|
|
12174
12248
|
function featuresFromHex(hex) {
|
|
12175
|
-
const { r, g, b } = hexToRgb$
|
|
12249
|
+
const { r, g, b } = hexToRgb$1(hex);
|
|
12176
12250
|
const { h, s, l } = rgbToHsl$1(r, g, b);
|
|
12177
12251
|
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
12178
12252
|
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
@@ -12205,14 +12279,14 @@ function relativeLuminance(r, g, b) {
|
|
|
12205
12279
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
12206
12280
|
}
|
|
12207
12281
|
function contrastRatio(hex1, hex2) {
|
|
12208
|
-
const { r: r1, g: g1, b: b1 } = hexToRgb$
|
|
12209
|
-
const { r: r2, g: g2, b: b2 } = hexToRgb$
|
|
12282
|
+
const { r: r1, g: g1, b: b1 } = hexToRgb$1(hex1);
|
|
12283
|
+
const { r: r2, g: g2, b: b2 } = hexToRgb$1(hex2);
|
|
12210
12284
|
const L1 = relativeLuminance(r1, g1, b1);
|
|
12211
12285
|
const L2 = relativeLuminance(r2, g2, b2);
|
|
12212
12286
|
const [hi, lo] = L1 >= L2 ? [L1, L2] : [L2, L1];
|
|
12213
12287
|
return (hi + .05) / (lo + .05);
|
|
12214
12288
|
}
|
|
12215
|
-
var init_contrast$
|
|
12289
|
+
var init_contrast$1 = __esmMin((() => {
|
|
12216
12290
|
init_colorConversion();
|
|
12217
12291
|
}));
|
|
12218
12292
|
//#endregion
|
|
@@ -12268,7 +12342,7 @@ function asAccessibleSurfaceToken(token) {
|
|
|
12268
12342
|
}
|
|
12269
12343
|
var ON_BACKGROUND;
|
|
12270
12344
|
var init_accessibleSurfaces = __esmMin((() => {
|
|
12271
|
-
init_contrast$
|
|
12345
|
+
init_contrast$1();
|
|
12272
12346
|
init_onColor();
|
|
12273
12347
|
}));
|
|
12274
12348
|
//#endregion
|
|
@@ -13273,6 +13347,10 @@ var init_modern_minimal = __esmMin((() => {
|
|
|
13273
13347
|
name: "primary",
|
|
13274
13348
|
hex: "#1f2937"
|
|
13275
13349
|
},
|
|
13350
|
+
{
|
|
13351
|
+
name: "primaryForeground",
|
|
13352
|
+
hex: "#ffffff"
|
|
13353
|
+
},
|
|
13276
13354
|
{
|
|
13277
13355
|
name: "secondary",
|
|
13278
13356
|
hex: "#6b7280"
|
|
@@ -13301,6 +13379,14 @@ var init_modern_minimal = __esmMin((() => {
|
|
|
13301
13379
|
name: "surface",
|
|
13302
13380
|
hex: "#ffffff"
|
|
13303
13381
|
},
|
|
13382
|
+
{
|
|
13383
|
+
name: "surfaceAlt",
|
|
13384
|
+
hex: "#f9fafb"
|
|
13385
|
+
},
|
|
13386
|
+
{
|
|
13387
|
+
name: "muted",
|
|
13388
|
+
hex: "#f3f4f6"
|
|
13389
|
+
},
|
|
13304
13390
|
{
|
|
13305
13391
|
name: "text",
|
|
13306
13392
|
hex: "#1f2937"
|
|
@@ -13411,7 +13497,7 @@ function generateCssVars(palette) {
|
|
|
13411
13497
|
const cssVars = {};
|
|
13412
13498
|
Object.entries(palette).forEach(([key, value]) => {
|
|
13413
13499
|
if (key === "meta" || value === null || value === void 0 || typeof value !== "string") return;
|
|
13414
|
-
const { r, g, b } = hexToRgb$
|
|
13500
|
+
const { r, g, b } = hexToRgb$1(value);
|
|
13415
13501
|
cssVars[`--tb-${key}`] = `${r} ${g} ${b}`;
|
|
13416
13502
|
});
|
|
13417
13503
|
return cssVars;
|
|
@@ -13458,48 +13544,48 @@ var init_neutralScale = __esmMin((() => {
|
|
|
13458
13544
|
}));
|
|
13459
13545
|
var init_colorPlacement = __esmMin((() => {
|
|
13460
13546
|
init_colorConversion();
|
|
13461
|
-
init_contrast$
|
|
13547
|
+
init_contrast$1();
|
|
13462
13548
|
}));
|
|
13463
13549
|
var init_backgroundGeneration = __esmMin((() => {
|
|
13464
13550
|
init_colorConversion();
|
|
13465
13551
|
}));
|
|
13466
13552
|
var init_analogous_harmony = __esmMin((() => {
|
|
13467
|
-
init_utils$
|
|
13553
|
+
init_utils$6();
|
|
13468
13554
|
init_colorConversion();
|
|
13469
13555
|
}));
|
|
13470
13556
|
var init_complementary_contrast = __esmMin((() => {
|
|
13471
|
-
init_utils$
|
|
13557
|
+
init_utils$6();
|
|
13472
13558
|
}));
|
|
13473
13559
|
var init_earthy_natural = __esmMin((() => {
|
|
13474
13560
|
init_colorConversion();
|
|
13475
13561
|
}));
|
|
13476
13562
|
var init_high_contrast_modern = __esmMin((() => {
|
|
13477
|
-
init_utils$
|
|
13563
|
+
init_utils$6();
|
|
13478
13564
|
}));
|
|
13479
13565
|
var init_jewel_dark = __esmMin((() => {
|
|
13480
13566
|
init_colorConversion();
|
|
13481
13567
|
}));
|
|
13482
13568
|
var init_minimal_monochrome = __esmMin((() => {
|
|
13483
|
-
init_utils$
|
|
13569
|
+
init_utils$6();
|
|
13484
13570
|
}));
|
|
13485
13571
|
var init_neon_pop = __esmMin((() => {
|
|
13486
|
-
init_utils$
|
|
13572
|
+
init_utils$6();
|
|
13487
13573
|
}));
|
|
13488
13574
|
var init_pastel_light = __esmMin((() => {
|
|
13489
|
-
init_utils$
|
|
13575
|
+
init_utils$6();
|
|
13490
13576
|
init_colorConversion();
|
|
13491
13577
|
}));
|
|
13492
13578
|
var init_soft_modern = __esmMin((() => {
|
|
13493
13579
|
init_colorConversion();
|
|
13494
13580
|
}));
|
|
13495
13581
|
var init_split_complementary = __esmMin((() => {
|
|
13496
|
-
init_utils$
|
|
13582
|
+
init_utils$6();
|
|
13497
13583
|
}));
|
|
13498
13584
|
var init_tetradic = __esmMin((() => {
|
|
13499
|
-
init_utils$
|
|
13585
|
+
init_utils$6();
|
|
13500
13586
|
}));
|
|
13501
13587
|
var init_triadic_balance = __esmMin((() => {
|
|
13502
|
-
init_utils$
|
|
13588
|
+
init_utils$6();
|
|
13503
13589
|
})), init_allRecipes = __esmMin((() => {
|
|
13504
13590
|
init_analogous_harmony();
|
|
13505
13591
|
init_complementary_contrast();
|
|
@@ -13515,7 +13601,7 @@ var init_triadic_balance = __esmMin((() => {
|
|
|
13515
13601
|
init_triadic_balance();
|
|
13516
13602
|
}));
|
|
13517
13603
|
var init_legs = __esmMin((() => {
|
|
13518
|
-
init_contrast$
|
|
13604
|
+
init_contrast$1();
|
|
13519
13605
|
init_colorConversion();
|
|
13520
13606
|
})), init_supportRoles = __esmMin((() => {
|
|
13521
13607
|
init_colorConversion();
|
|
@@ -13523,7 +13609,7 @@ var init_legs = __esmMin((() => {
|
|
|
13523
13609
|
})), init_generatePalette = __esmMin((() => {
|
|
13524
13610
|
init_backgroundGeneration();
|
|
13525
13611
|
init_colorConversion();
|
|
13526
|
-
init_contrast$
|
|
13612
|
+
init_contrast$1();
|
|
13527
13613
|
init_legs();
|
|
13528
13614
|
init_supportRoles();
|
|
13529
13615
|
}));
|
|
@@ -13533,7 +13619,7 @@ var init_classifyColor = __esmMin((() => {
|
|
|
13533
13619
|
var init_suggestRecipes = __esmMin((() => {
|
|
13534
13620
|
init_allRecipes();
|
|
13535
13621
|
init_colorConversion();
|
|
13536
|
-
init_contrast$
|
|
13622
|
+
init_contrast$1();
|
|
13537
13623
|
init_generatePalette();
|
|
13538
13624
|
init_classifyColor();
|
|
13539
13625
|
}));
|
|
@@ -13565,7 +13651,7 @@ function getTextColorForBackground(background) {
|
|
|
13565
13651
|
}
|
|
13566
13652
|
function parseColorToRgb(input) {
|
|
13567
13653
|
const trimmed = input.trim();
|
|
13568
|
-
if (trimmed.startsWith("#")) return hexToRgb$
|
|
13654
|
+
if (trimmed.startsWith("#")) return hexToRgb$1(trimmed);
|
|
13569
13655
|
const rgbMatch = trimmed.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(?:0|1|0?\.\d+))?\s*\)$/i);
|
|
13570
13656
|
if (rgbMatch?.[1] && rgbMatch[2] && rgbMatch[3]) return {
|
|
13571
13657
|
r: clamp255(Number(rgbMatch[1])),
|
|
@@ -13580,16 +13666,16 @@ function clamp255(value) {
|
|
|
13580
13666
|
}
|
|
13581
13667
|
var init_textColor = __esmMin((() => {
|
|
13582
13668
|
init_colorConversion();
|
|
13583
|
-
init_contrast$
|
|
13669
|
+
init_contrast$1();
|
|
13584
13670
|
}));
|
|
13585
13671
|
var init_legibility = __esmMin((() => {
|
|
13586
|
-
init_contrast$
|
|
13672
|
+
init_contrast$1();
|
|
13587
13673
|
}));
|
|
13588
13674
|
//#endregion
|
|
13589
13675
|
//#region ../theme-core/src/palette/utils/index.ts
|
|
13590
|
-
var init_utils$
|
|
13676
|
+
var init_utils$6 = __esmMin((() => {
|
|
13591
13677
|
init_colorConversion();
|
|
13592
|
-
init_contrast$
|
|
13678
|
+
init_contrast$1();
|
|
13593
13679
|
init_colorPlacement();
|
|
13594
13680
|
init_backgroundGeneration();
|
|
13595
13681
|
init_suggestRecipes();
|
|
@@ -13710,7 +13796,7 @@ var init_swatch = __esmMin((() => {}));
|
|
|
13710
13796
|
var init_PaletteCard = __esmMin((() => {
|
|
13711
13797
|
init_generateCssVars();
|
|
13712
13798
|
init_neutralScale();
|
|
13713
|
-
init_utils$
|
|
13799
|
+
init_utils$6();
|
|
13714
13800
|
init_paletteAccess();
|
|
13715
13801
|
init_expandPalette();
|
|
13716
13802
|
init_swatch();
|
|
@@ -13942,7 +14028,7 @@ function assignDeep(target, ...sources) {
|
|
|
13942
14028
|
});
|
|
13943
14029
|
return target;
|
|
13944
14030
|
}
|
|
13945
|
-
var init_utils$
|
|
14031
|
+
var init_utils$5 = __esmMin((() => {}));
|
|
13946
14032
|
//#endregion
|
|
13947
14033
|
//#region ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/options.js
|
|
13948
14034
|
function buildProcessOptions(opts, override) {
|
|
@@ -13960,13 +14046,13 @@ function buildProcessOptions(opts, override) {
|
|
|
13960
14046
|
}, override);
|
|
13961
14047
|
}
|
|
13962
14048
|
var init_options = __esmMin((() => {
|
|
13963
|
-
init_utils$
|
|
14049
|
+
init_utils$5();
|
|
13964
14050
|
}));
|
|
13965
14051
|
//#endregion
|
|
13966
14052
|
//#region ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/builder.js
|
|
13967
14053
|
var Builder;
|
|
13968
14054
|
var init_builder$2 = __esmMin((() => {
|
|
13969
|
-
init_utils$
|
|
14055
|
+
init_utils$5();
|
|
13970
14056
|
init_esm$2();
|
|
13971
14057
|
Builder = class {
|
|
13972
14058
|
/**
|
|
@@ -14328,7 +14414,7 @@ var init_esm$3 = __esmMin((() => {
|
|
|
14328
14414
|
var init_client$2 = __esmMin((() => {
|
|
14329
14415
|
init_esm$4();
|
|
14330
14416
|
init_esm$3();
|
|
14331
|
-
init_utils$
|
|
14417
|
+
init_utils$5();
|
|
14332
14418
|
}));
|
|
14333
14419
|
var init_host = __esmMin((() => {
|
|
14334
14420
|
init_esm$4();
|
|
@@ -14339,7 +14425,7 @@ var _Vibrant, Vibrant;
|
|
|
14339
14425
|
var init_esm$2 = __esmMin((() => {
|
|
14340
14426
|
init_options();
|
|
14341
14427
|
init_builder$2();
|
|
14342
|
-
init_utils$
|
|
14428
|
+
init_utils$5();
|
|
14343
14429
|
init_pipeline$1();
|
|
14344
14430
|
init_client$2();
|
|
14345
14431
|
init_host();
|
|
@@ -16567,12 +16653,8 @@ var init_sitePalettePersistence = __esmMin((() => {
|
|
|
16567
16653
|
init_colors();
|
|
16568
16654
|
init_selection();
|
|
16569
16655
|
}));
|
|
16570
|
-
var init_themePaletteCompatibility = __esmMin((() => {
|
|
16571
|
-
init_themeColorTokens();
|
|
16572
|
-
init_colors();
|
|
16573
|
-
}));
|
|
16574
16656
|
var init_fromVibrant = __esmMin((() => {
|
|
16575
|
-
init_utils$
|
|
16657
|
+
init_utils$6();
|
|
16576
16658
|
}));
|
|
16577
16659
|
//#endregion
|
|
16578
16660
|
//#region ../theme-core/src/palette/index.ts
|
|
@@ -16584,7 +16666,7 @@ var init_palette$1 = __esmMin((() => {
|
|
|
16584
16666
|
init_generateShades();
|
|
16585
16667
|
init_neutralScale();
|
|
16586
16668
|
init_types$16();
|
|
16587
|
-
init_utils$
|
|
16669
|
+
init_utils$6();
|
|
16588
16670
|
init_paletteAccess();
|
|
16589
16671
|
init_extractPalette();
|
|
16590
16672
|
init_colors();
|
|
@@ -16594,7 +16676,6 @@ var init_palette$1 = __esmMin((() => {
|
|
|
16594
16676
|
init_resolveSelection();
|
|
16595
16677
|
init_selection();
|
|
16596
16678
|
init_sitePalettePersistence();
|
|
16597
|
-
init_themePaletteCompatibility();
|
|
16598
16679
|
init_fromVibrant();
|
|
16599
16680
|
init_suggestRecipes();
|
|
16600
16681
|
init_allRecipes();
|
|
@@ -17040,6 +17121,108 @@ var init_contentTemplateDesignIntent = __esmMin((() => {
|
|
|
17040
17121
|
init_types$17();
|
|
17041
17122
|
}));
|
|
17042
17123
|
//#endregion
|
|
17124
|
+
//#region ../theme-core/src/buttons/effectClassification.ts
|
|
17125
|
+
function getButtonEffectPolicy(effectId) {
|
|
17126
|
+
return Object.prototype.hasOwnProperty.call(BUTTON_EFFECT_POLICIES, effectId) ? BUTTON_EFFECT_POLICIES[effectId] : null;
|
|
17127
|
+
}
|
|
17128
|
+
function classifyButtonEffectId(effectId) {
|
|
17129
|
+
return getButtonEffectPolicy(effectId)?.classification ?? "unknown";
|
|
17130
|
+
}
|
|
17131
|
+
var BUTTON_EFFECT_POLICIES;
|
|
17132
|
+
var init_effectClassification = __esmMin((() => {
|
|
17133
|
+
BUTTON_EFFECT_POLICIES = {
|
|
17134
|
+
"darken-background": {
|
|
17135
|
+
classification: "colour-transition",
|
|
17136
|
+
transition: {
|
|
17137
|
+
kind: "adjust-shade",
|
|
17138
|
+
direction: "darker"
|
|
17139
|
+
}
|
|
17140
|
+
},
|
|
17141
|
+
"lighten-background": {
|
|
17142
|
+
classification: "colour-transition",
|
|
17143
|
+
transition: {
|
|
17144
|
+
kind: "adjust-shade",
|
|
17145
|
+
direction: "lighter"
|
|
17146
|
+
}
|
|
17147
|
+
},
|
|
17148
|
+
"background-on-hover": {
|
|
17149
|
+
classification: "colour-transition",
|
|
17150
|
+
transition: { kind: "replace-background" }
|
|
17151
|
+
},
|
|
17152
|
+
"background-on-hover-alpha": {
|
|
17153
|
+
classification: "unsupported-colour",
|
|
17154
|
+
reason: "alpha_requires_surface"
|
|
17155
|
+
},
|
|
17156
|
+
"fade-background": {
|
|
17157
|
+
classification: "unsupported-colour",
|
|
17158
|
+
reason: "changes_element_opacity"
|
|
17159
|
+
},
|
|
17160
|
+
"opacity-reduce": {
|
|
17161
|
+
classification: "unsupported-colour",
|
|
17162
|
+
reason: "changes_element_opacity"
|
|
17163
|
+
},
|
|
17164
|
+
"gradient-text": {
|
|
17165
|
+
classification: "unsupported-colour",
|
|
17166
|
+
reason: "changes_foreground"
|
|
17167
|
+
},
|
|
17168
|
+
"text-color-change": {
|
|
17169
|
+
classification: "unsupported-colour",
|
|
17170
|
+
reason: "changes_foreground"
|
|
17171
|
+
},
|
|
17172
|
+
"border-color-change": {
|
|
17173
|
+
classification: "unsupported-colour",
|
|
17174
|
+
reason: "changes_border"
|
|
17175
|
+
},
|
|
17176
|
+
"aurora-glow": {
|
|
17177
|
+
classification: "unsupported-background-overlay",
|
|
17178
|
+
reason: "unresolved_background_overlay"
|
|
17179
|
+
},
|
|
17180
|
+
"cosmic-stardust": {
|
|
17181
|
+
classification: "unsupported-background-overlay",
|
|
17182
|
+
reason: "unresolved_background_overlay"
|
|
17183
|
+
},
|
|
17184
|
+
"gradient-border-fill": {
|
|
17185
|
+
classification: "unsupported-background-overlay",
|
|
17186
|
+
reason: "unresolved_background_overlay"
|
|
17187
|
+
},
|
|
17188
|
+
"animated-gradient-border-fill": {
|
|
17189
|
+
classification: "unsupported-background-overlay",
|
|
17190
|
+
reason: "unresolved_background_overlay"
|
|
17191
|
+
},
|
|
17192
|
+
"nav-underline": {
|
|
17193
|
+
classification: "not-button",
|
|
17194
|
+
reason: "not_button_effect"
|
|
17195
|
+
},
|
|
17196
|
+
"nav-frosted-base": {
|
|
17197
|
+
classification: "not-button",
|
|
17198
|
+
reason: "not_button_effect"
|
|
17199
|
+
},
|
|
17200
|
+
"nav-frosted-hover": {
|
|
17201
|
+
classification: "not-button",
|
|
17202
|
+
reason: "not_button_effect"
|
|
17203
|
+
},
|
|
17204
|
+
"nav-frosted-active": {
|
|
17205
|
+
classification: "not-button",
|
|
17206
|
+
reason: "not_button_effect"
|
|
17207
|
+
},
|
|
17208
|
+
"animated-gradient": { classification: "non-colour" },
|
|
17209
|
+
"border-glow": { classification: "non-colour" },
|
|
17210
|
+
"drop-shadow": { classification: "non-colour" },
|
|
17211
|
+
"inner-shadow": { classification: "non-colour" },
|
|
17212
|
+
"neumorphic-shadow": { classification: "non-colour" },
|
|
17213
|
+
"outer-glow": { classification: "non-colour" },
|
|
17214
|
+
"retro-3d-shadow": { classification: "non-colour" },
|
|
17215
|
+
"scale-up": { classification: "non-colour" },
|
|
17216
|
+
"scale-down": { classification: "non-colour" },
|
|
17217
|
+
lift: { classification: "non-colour" },
|
|
17218
|
+
"press-down": { classification: "non-colour" },
|
|
17219
|
+
pop: { classification: "non-colour" },
|
|
17220
|
+
"border-bottom-grow": { classification: "non-colour" },
|
|
17221
|
+
"sketchy-border": { classification: "non-colour" },
|
|
17222
|
+
"pulse-animation": { classification: "non-colour" }
|
|
17223
|
+
};
|
|
17224
|
+
}));
|
|
17225
|
+
//#endregion
|
|
17043
17226
|
//#region ../theme-core/src/buttons/types.ts
|
|
17044
17227
|
function isVariantRole(value) {
|
|
17045
17228
|
return VARIANT_ROLES.includes(value);
|
|
@@ -17048,9 +17231,155 @@ function asSpecialVariantId(value) {
|
|
|
17048
17231
|
if (value.length === 0) throw new Error("SpecialVariantId must be a non-empty string");
|
|
17049
17232
|
return value;
|
|
17050
17233
|
}
|
|
17051
|
-
|
|
17234
|
+
function parseOpaqueButtonColourToken(value) {
|
|
17235
|
+
const token = parseThemeColorToken(value);
|
|
17236
|
+
if (token === null) return null;
|
|
17237
|
+
const parts = parseColorTokenParts(token);
|
|
17238
|
+
return parts.kind === "token" && parts.opacityPercent === null ? token : null;
|
|
17239
|
+
}
|
|
17240
|
+
function unsafeAsOpaqueButtonColourToken(value) {
|
|
17241
|
+
return value;
|
|
17242
|
+
}
|
|
17243
|
+
function normalizeLegacyButtonVariantInput(input) {
|
|
17244
|
+
if (!isUnknownRecord(input)) return input;
|
|
17245
|
+
const background = input.background;
|
|
17246
|
+
if (!isUnknownRecord(background)) return input;
|
|
17247
|
+
if (!(background.type === "transparent" || Object.prototype.hasOwnProperty.call(input, "textColorToken") || isUnknownRecord(input.border) && Object.prototype.hasOwnProperty.call(input.border, "colorToken") || hasLegacyButtonEffects(input.effects) || hasLegacyAlphaToken(input, background))) return input;
|
|
17248
|
+
const { textColorToken, ...withoutLegacyText } = input;
|
|
17249
|
+
const normalizedBorder = isUnknownRecord(input.border) && typeof input.border.widthClass === "string" ? { widthClass: input.border.widthClass } : input.border;
|
|
17250
|
+
const normalizedAffordance = isUnknownRecord(input.affordance) && typeof input.affordance.iconId === "string" ? { iconId: input.affordance.iconId } : input.affordance;
|
|
17251
|
+
const normalizedEffects = normalizeLegacyButtonEffects(input.effects, background.type);
|
|
17252
|
+
const hoverBackgroundToken = stripLegacyTokenAlpha(input.hoverBackgroundToken);
|
|
17253
|
+
if (background.type === "transparent") return {
|
|
17254
|
+
...withoutLegacyText,
|
|
17255
|
+
background: {
|
|
17256
|
+
type: "surface",
|
|
17257
|
+
role: "link"
|
|
17258
|
+
},
|
|
17259
|
+
border: normalizedBorder,
|
|
17260
|
+
affordance: normalizedAffordance,
|
|
17261
|
+
effects: normalizedEffects,
|
|
17262
|
+
hoverBackgroundToken
|
|
17263
|
+
};
|
|
17264
|
+
if (background.type === "gradient") {
|
|
17265
|
+
const stops = Array.isArray(background.stops) ? background.stops.map(stripLegacyTokenAlpha) : background.stops;
|
|
17266
|
+
return {
|
|
17267
|
+
...withoutLegacyText,
|
|
17268
|
+
background: {
|
|
17269
|
+
...background,
|
|
17270
|
+
stops,
|
|
17271
|
+
foregroundToken: stripLegacyTokenAlpha(background.foregroundToken ?? textColorToken)
|
|
17272
|
+
},
|
|
17273
|
+
border: normalizedBorder,
|
|
17274
|
+
affordance: normalizedAffordance,
|
|
17275
|
+
effects: normalizedEffects,
|
|
17276
|
+
hoverBackgroundToken
|
|
17277
|
+
};
|
|
17278
|
+
}
|
|
17279
|
+
return {
|
|
17280
|
+
...withoutLegacyText,
|
|
17281
|
+
background: background.type === "solid" ? {
|
|
17282
|
+
...background,
|
|
17283
|
+
colorToken: stripLegacyTokenAlpha(background.colorToken)
|
|
17284
|
+
} : background,
|
|
17285
|
+
border: normalizedBorder,
|
|
17286
|
+
affordance: normalizedAffordance,
|
|
17287
|
+
effects: normalizedEffects,
|
|
17288
|
+
hoverBackgroundToken
|
|
17289
|
+
};
|
|
17290
|
+
}
|
|
17291
|
+
function normalizeLegacyButtonGlobalInput(input) {
|
|
17292
|
+
if (!isUnknownRecord(input)) return input;
|
|
17293
|
+
const hoverColorToken = stripLegacyTokenAlpha(input.hoverColorToken);
|
|
17294
|
+
return hoverColorToken === input.hoverColorToken ? input : {
|
|
17295
|
+
...input,
|
|
17296
|
+
hoverColorToken
|
|
17297
|
+
};
|
|
17298
|
+
}
|
|
17299
|
+
function hasLegacyAlphaToken(input, background) {
|
|
17300
|
+
const stops = isUnknownArray$3(background.stops) ? background.stops : [];
|
|
17301
|
+
return [
|
|
17302
|
+
input.hoverBackgroundToken,
|
|
17303
|
+
background.colorToken,
|
|
17304
|
+
background.foregroundToken,
|
|
17305
|
+
...stops
|
|
17306
|
+
].some((token) => stripLegacyTokenAlpha(token) !== token);
|
|
17307
|
+
}
|
|
17308
|
+
function stripLegacyTokenAlpha(value) {
|
|
17309
|
+
if (typeof value !== "string") return value;
|
|
17310
|
+
const slashIndex = value.indexOf("/");
|
|
17311
|
+
return slashIndex < 0 ? value : value.slice(0, slashIndex);
|
|
17312
|
+
}
|
|
17313
|
+
function hasLegacyButtonEffects(input) {
|
|
17314
|
+
if (!isUnknownRecord(input)) return false;
|
|
17315
|
+
return [
|
|
17316
|
+
"base",
|
|
17317
|
+
"hover",
|
|
17318
|
+
"active",
|
|
17319
|
+
"focus"
|
|
17320
|
+
].some((state) => {
|
|
17321
|
+
const effects = input[state];
|
|
17322
|
+
return Array.isArray(effects) && effects.some((effect) => {
|
|
17323
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return true;
|
|
17324
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
17325
|
+
if (classification !== "colour-transition" && classification !== "non-colour") return true;
|
|
17326
|
+
return effect.effectId === "background-on-hover" && isUnknownRecord(effect.options) && stripLegacyTokenAlpha(effect.options.colorToken) !== effect.options.colorToken;
|
|
17327
|
+
});
|
|
17328
|
+
});
|
|
17329
|
+
}
|
|
17330
|
+
function normalizeLegacyButtonEffects(input, backgroundType) {
|
|
17331
|
+
if (!isUnknownRecord(input)) return input;
|
|
17332
|
+
const normalized = {};
|
|
17333
|
+
for (const state of [
|
|
17334
|
+
"base",
|
|
17335
|
+
"hover",
|
|
17336
|
+
"active",
|
|
17337
|
+
"focus"
|
|
17338
|
+
]) {
|
|
17339
|
+
const effects = input[state];
|
|
17340
|
+
if (!Array.isArray(effects)) continue;
|
|
17341
|
+
const safeEffects = effects.flatMap((effect) => {
|
|
17342
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return [];
|
|
17343
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
17344
|
+
if (classification === "non-colour") return [effect];
|
|
17345
|
+
if (classification !== "colour-transition") return [];
|
|
17346
|
+
if (effect.effectId === "background-on-hover") {
|
|
17347
|
+
const options = isUnknownRecord(effect.options) ? effect.options : null;
|
|
17348
|
+
const colorToken = options === null ? null : parseOpaqueButtonColourToken(stripLegacyTokenAlpha(options.colorToken));
|
|
17349
|
+
return colorToken === null ? [] : [{
|
|
17350
|
+
...effect,
|
|
17351
|
+
options: {
|
|
17352
|
+
...options,
|
|
17353
|
+
colorToken
|
|
17354
|
+
}
|
|
17355
|
+
}];
|
|
17356
|
+
}
|
|
17357
|
+
if (backgroundType !== "solid") return [];
|
|
17358
|
+
const rawAmount = isUnknownRecord(effect.options) ? effect.options.amount : void 0;
|
|
17359
|
+
const amount = typeof rawAmount === "number" && rawAmount > 0 ? Math.max(100, Math.round(rawAmount / 100) * 100) : 100;
|
|
17360
|
+
return [{
|
|
17361
|
+
...effect,
|
|
17362
|
+
options: {
|
|
17363
|
+
...isUnknownRecord(effect.options) ? effect.options : {},
|
|
17364
|
+
amount
|
|
17365
|
+
}
|
|
17366
|
+
}];
|
|
17367
|
+
});
|
|
17368
|
+
if (safeEffects.length > 0) normalized[state] = safeEffects;
|
|
17369
|
+
}
|
|
17370
|
+
return Object.keys(normalized).length === 0 ? void 0 : normalized;
|
|
17371
|
+
}
|
|
17372
|
+
function isUnknownRecord(value) {
|
|
17373
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17374
|
+
}
|
|
17375
|
+
function isUnknownArray$3(value) {
|
|
17376
|
+
return Array.isArray(value);
|
|
17377
|
+
}
|
|
17378
|
+
var VARIANT_ROLES, DEFAULT_VARIANT_ALIAS_ID, opaqueButtonColourTokenSchema, cornerStyleSchema, shadowSizeSchema, textTransformSchema, fontWeightSchema, buttonTypographySchema, letterSpacingSchema, hoverTransformSchema, hoverColorSchema, buttonPaddingPresetSchema, gradientStyleSchema, gradientSharpnessSchema, prioritySchema, buttonSizeNameSchema, PADDING_TOKEN_PATTERN, paddingShorthandSchema, buttonSizeConfigSchema, buttonSizesSchema, canonicalButtonGlobalSettingsSchema, buttonGlobalSettingsSchema, gradientDirectionSchema$1, buttonColourTreatmentSchema, buttonBackgroundSchema, effectApplicationSchema$1, buttonBorderSchema, buttonVariantAffordanceSchema, variantShadowSchema, variantEffectsSchema, variantSizeOverridesSchema, canonicalButtonVariantSchema, buttonVariantSchema, buttonSystemSchema;
|
|
17052
17379
|
var init_types$14 = __esmMin((() => {
|
|
17380
|
+
init_effectClassification();
|
|
17053
17381
|
init_themeColorTokens();
|
|
17382
|
+
init_colorTokenParts();
|
|
17054
17383
|
VARIANT_ROLES = [
|
|
17055
17384
|
"primary",
|
|
17056
17385
|
"secondary",
|
|
@@ -17061,6 +17390,11 @@ var init_types$14 = __esmMin((() => {
|
|
|
17061
17390
|
"accent"
|
|
17062
17391
|
];
|
|
17063
17392
|
DEFAULT_VARIANT_ALIAS_ID = "default";
|
|
17393
|
+
opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => parseOpaqueButtonColourToken(value) !== null, "Button colour tokens must be opaque").transform((value) => {
|
|
17394
|
+
const token = parseOpaqueButtonColourToken(value);
|
|
17395
|
+
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
17396
|
+
return token;
|
|
17397
|
+
});
|
|
17064
17398
|
cornerStyleSchema = z$1.enum([
|
|
17065
17399
|
"square",
|
|
17066
17400
|
"rounded",
|
|
@@ -17149,7 +17483,7 @@ var init_types$14 = __esmMin((() => {
|
|
|
17149
17483
|
lg,
|
|
17150
17484
|
xl: xl ?? lg
|
|
17151
17485
|
}));
|
|
17152
|
-
|
|
17486
|
+
canonicalButtonGlobalSettingsSchema = z$1.object({
|
|
17153
17487
|
cornerStyle: cornerStyleSchema,
|
|
17154
17488
|
cornerRadius: z$1.number().min(0).max(24).optional(),
|
|
17155
17489
|
/**
|
|
@@ -17180,11 +17514,12 @@ var init_types$14 = __esmMin((() => {
|
|
|
17180
17514
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
17181
17515
|
hoverTransform: hoverTransformSchema,
|
|
17182
17516
|
hoverColor: hoverColorSchema,
|
|
17183
|
-
hoverColorToken:
|
|
17517
|
+
hoverColorToken: opaqueButtonColourTokenSchema.optional(),
|
|
17184
17518
|
gradientStyle: gradientStyleSchema.optional(),
|
|
17185
17519
|
gradientAngle: z$1.number().min(0).max(360).optional(),
|
|
17186
17520
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
17187
17521
|
});
|
|
17522
|
+
buttonGlobalSettingsSchema = z$1.preprocess(normalizeLegacyButtonGlobalInput, canonicalButtonGlobalSettingsSchema);
|
|
17188
17523
|
gradientDirectionSchema$1 = z$1.enum([
|
|
17189
17524
|
"to-r",
|
|
17190
17525
|
"to-l",
|
|
@@ -17195,30 +17530,37 @@ var init_types$14 = __esmMin((() => {
|
|
|
17195
17530
|
"to-br",
|
|
17196
17531
|
"to-bl"
|
|
17197
17532
|
]);
|
|
17198
|
-
|
|
17533
|
+
buttonColourTreatmentSchema = z$1.discriminatedUnion("type", [
|
|
17199
17534
|
z$1.object({
|
|
17200
17535
|
type: z$1.literal("solid"),
|
|
17201
|
-
colorToken:
|
|
17536
|
+
colorToken: opaqueButtonColourTokenSchema
|
|
17202
17537
|
}),
|
|
17203
17538
|
z$1.object({
|
|
17204
17539
|
type: z$1.literal("gradient"),
|
|
17205
|
-
stops: z$1.array(
|
|
17206
|
-
|
|
17540
|
+
stops: z$1.array(opaqueButtonColourTokenSchema).min(2).transform((stops) => {
|
|
17541
|
+
const [first, second, ...rest] = stops;
|
|
17542
|
+
if (first === void 0 || second === void 0) throw new Error("Invariant: gradient stops passed the minimum length schema");
|
|
17543
|
+
return [
|
|
17544
|
+
first,
|
|
17545
|
+
second,
|
|
17546
|
+
...rest
|
|
17547
|
+
];
|
|
17548
|
+
}),
|
|
17549
|
+
direction: gradientDirectionSchema$1,
|
|
17550
|
+
foregroundToken: opaqueButtonColourTokenSchema
|
|
17207
17551
|
}),
|
|
17208
|
-
z$1.object({
|
|
17552
|
+
z$1.object({
|
|
17553
|
+
type: z$1.literal("surface"),
|
|
17554
|
+
role: z$1.literal("link")
|
|
17555
|
+
})
|
|
17209
17556
|
]);
|
|
17557
|
+
buttonBackgroundSchema = buttonColourTreatmentSchema;
|
|
17210
17558
|
effectApplicationSchema$1 = z$1.object({
|
|
17211
17559
|
effectId: z$1.string(),
|
|
17212
|
-
options: z$1.record(z$1.string(), z$1.
|
|
17213
|
-
});
|
|
17214
|
-
buttonBorderSchema = z$1.object({
|
|
17215
|
-
widthClass: z$1.string(),
|
|
17216
|
-
colorToken: themeColorTokenSchema
|
|
17217
|
-
});
|
|
17218
|
-
buttonVariantAffordanceSchema = z$1.object({
|
|
17219
|
-
iconId: z$1.string().min(1),
|
|
17220
|
-
colorToken: themeColorTokenSchema.optional()
|
|
17560
|
+
options: z$1.record(z$1.string(), z$1.json()).optional()
|
|
17221
17561
|
});
|
|
17562
|
+
buttonBorderSchema = z$1.object({ widthClass: z$1.string() });
|
|
17563
|
+
buttonVariantAffordanceSchema = z$1.object({ iconId: z$1.string().min(1) });
|
|
17222
17564
|
variantShadowSchema = z$1.object({
|
|
17223
17565
|
elevation: z$1.enum([
|
|
17224
17566
|
"none",
|
|
@@ -17246,22 +17588,22 @@ var init_types$14 = __esmMin((() => {
|
|
|
17246
17588
|
lg: buttonSizeConfigSchema.optional(),
|
|
17247
17589
|
xl: buttonSizeConfigSchema.optional()
|
|
17248
17590
|
});
|
|
17249
|
-
|
|
17591
|
+
canonicalButtonVariantSchema = z$1.object({
|
|
17250
17592
|
id: z$1.string(),
|
|
17251
17593
|
name: z$1.string().min(1).max(20),
|
|
17252
17594
|
enabled: z$1.boolean(),
|
|
17253
17595
|
priority: prioritySchema,
|
|
17254
17596
|
background: buttonBackgroundSchema,
|
|
17255
|
-
textColorToken: themeColorTokenSchema,
|
|
17256
17597
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
17257
17598
|
borderRadius: z$1.string().optional(),
|
|
17258
17599
|
shadow: variantShadowSchema.optional(),
|
|
17259
17600
|
border: buttonBorderSchema.optional(),
|
|
17260
|
-
hoverBackgroundToken:
|
|
17601
|
+
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
17261
17602
|
effects: variantEffectsSchema.optional(),
|
|
17262
17603
|
sizes: variantSizeOverridesSchema.optional(),
|
|
17263
17604
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
17264
17605
|
});
|
|
17606
|
+
buttonVariantSchema = z$1.preprocess(normalizeLegacyButtonVariantInput, canonicalButtonVariantSchema);
|
|
17265
17607
|
buttonSystemSchema = z$1.object({
|
|
17266
17608
|
global: buttonGlobalSettingsSchema,
|
|
17267
17609
|
variants: z$1.array(buttonVariantSchema).min(1).max(6),
|
|
@@ -17285,7 +17627,7 @@ function defineButtonPersonality(input) {
|
|
|
17285
17627
|
name: input.name,
|
|
17286
17628
|
description: input.description,
|
|
17287
17629
|
tags: input.tags,
|
|
17288
|
-
buttonSystem: input.buttonSystem
|
|
17630
|
+
buttonSystem: buttonSystemSchema.parse(input.buttonSystem)
|
|
17289
17631
|
};
|
|
17290
17632
|
}
|
|
17291
17633
|
var buttonPersonalityIdSchema;
|
|
@@ -17350,19 +17692,15 @@ var init_brushed_wash = __esmMin((() => {
|
|
|
17350
17692
|
background: {
|
|
17351
17693
|
type: "gradient",
|
|
17352
17694
|
stops: ["primary", "accent"],
|
|
17353
|
-
direction: "to-r"
|
|
17695
|
+
direction: "to-r",
|
|
17696
|
+
foregroundToken: "primaryForeground"
|
|
17354
17697
|
},
|
|
17355
|
-
textColorToken: "primaryForeground",
|
|
17356
17698
|
borderRadius: "rounded-lg",
|
|
17357
17699
|
shadow: {
|
|
17358
17700
|
elevation: "low",
|
|
17359
17701
|
softness: "soft",
|
|
17360
17702
|
position: "bottom"
|
|
17361
|
-
}
|
|
17362
|
-
effects: { hover: [{
|
|
17363
|
-
effectId: "opacity-reduce",
|
|
17364
|
-
options: { reduction: -15 }
|
|
17365
|
-
}] }
|
|
17703
|
+
}
|
|
17366
17704
|
},
|
|
17367
17705
|
{
|
|
17368
17706
|
id: "secondary",
|
|
@@ -17372,32 +17710,27 @@ var init_brushed_wash = __esmMin((() => {
|
|
|
17372
17710
|
background: {
|
|
17373
17711
|
type: "gradient",
|
|
17374
17712
|
stops: ["secondary", "accent"],
|
|
17375
|
-
direction: "to-br"
|
|
17713
|
+
direction: "to-br",
|
|
17714
|
+
foregroundToken: "primaryForeground"
|
|
17376
17715
|
},
|
|
17377
|
-
textColorToken: "primaryForeground",
|
|
17378
17716
|
borderRadius: "rounded-lg",
|
|
17379
17717
|
shadow: {
|
|
17380
17718
|
elevation: "low",
|
|
17381
17719
|
softness: "soft",
|
|
17382
17720
|
position: "bottom"
|
|
17383
|
-
}
|
|
17384
|
-
effects: { hover: [{
|
|
17385
|
-
effectId: "opacity-reduce",
|
|
17386
|
-
options: { reduction: -15 }
|
|
17387
|
-
}] }
|
|
17721
|
+
}
|
|
17388
17722
|
},
|
|
17389
17723
|
{
|
|
17390
17724
|
id: "outline",
|
|
17391
17725
|
name: "Outline",
|
|
17392
17726
|
enabled: true,
|
|
17393
17727
|
priority: 3,
|
|
17394
|
-
background: {
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
border: {
|
|
17398
|
-
widthClass: "border",
|
|
17399
|
-
colorToken: "primary"
|
|
17728
|
+
background: {
|
|
17729
|
+
type: "surface",
|
|
17730
|
+
role: "link"
|
|
17400
17731
|
},
|
|
17732
|
+
borderRadius: "rounded-lg",
|
|
17733
|
+
border: { widthClass: "border" },
|
|
17401
17734
|
effects: { hover: [{
|
|
17402
17735
|
effectId: "background-on-hover",
|
|
17403
17736
|
options: { colorToken: "surface" }
|
|
@@ -17408,8 +17741,10 @@ var init_brushed_wash = __esmMin((() => {
|
|
|
17408
17741
|
name: "Ghost",
|
|
17409
17742
|
enabled: true,
|
|
17410
17743
|
priority: 3,
|
|
17411
|
-
background: {
|
|
17412
|
-
|
|
17744
|
+
background: {
|
|
17745
|
+
type: "surface",
|
|
17746
|
+
role: "link"
|
|
17747
|
+
},
|
|
17413
17748
|
borderRadius: "rounded-lg",
|
|
17414
17749
|
effects: { hover: [{
|
|
17415
17750
|
effectId: "background-on-hover",
|
|
@@ -17455,7 +17790,6 @@ var init_confident_chip = __esmMin((() => {
|
|
|
17455
17790
|
type: "solid",
|
|
17456
17791
|
colorToken: "primary"
|
|
17457
17792
|
},
|
|
17458
|
-
textColorToken: "primaryForeground",
|
|
17459
17793
|
borderRadius: "rounded-md",
|
|
17460
17794
|
shadow: {
|
|
17461
17795
|
elevation: "medium",
|
|
@@ -17465,7 +17799,7 @@ var init_confident_chip = __esmMin((() => {
|
|
|
17465
17799
|
effects: {
|
|
17466
17800
|
hover: [{
|
|
17467
17801
|
effectId: "darken-background",
|
|
17468
|
-
options: { amount:
|
|
17802
|
+
options: { amount: 100 }
|
|
17469
17803
|
}],
|
|
17470
17804
|
active: [{
|
|
17471
17805
|
effectId: "scale-down",
|
|
@@ -17482,12 +17816,8 @@ var init_confident_chip = __esmMin((() => {
|
|
|
17482
17816
|
type: "solid",
|
|
17483
17817
|
colorToken: "surface"
|
|
17484
17818
|
},
|
|
17485
|
-
textColorToken: "text",
|
|
17486
17819
|
borderRadius: "rounded-md",
|
|
17487
|
-
border: {
|
|
17488
|
-
widthClass: "border",
|
|
17489
|
-
colorToken: "border"
|
|
17490
|
-
},
|
|
17820
|
+
border: { widthClass: "border" },
|
|
17491
17821
|
effects: { hover: [{
|
|
17492
17822
|
effectId: "background-on-hover",
|
|
17493
17823
|
options: { colorToken: "background" }
|
|
@@ -17498,13 +17828,12 @@ var init_confident_chip = __esmMin((() => {
|
|
|
17498
17828
|
name: "Outline",
|
|
17499
17829
|
enabled: true,
|
|
17500
17830
|
priority: 3,
|
|
17501
|
-
background: {
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
border: {
|
|
17505
|
-
widthClass: "border",
|
|
17506
|
-
colorToken: "primary"
|
|
17831
|
+
background: {
|
|
17832
|
+
type: "surface",
|
|
17833
|
+
role: "link"
|
|
17507
17834
|
},
|
|
17835
|
+
borderRadius: "rounded-md",
|
|
17836
|
+
border: { widthClass: "border" },
|
|
17508
17837
|
effects: { hover: [{
|
|
17509
17838
|
effectId: "background-on-hover",
|
|
17510
17839
|
options: { colorToken: "surface" }
|
|
@@ -17515,8 +17844,10 @@ var init_confident_chip = __esmMin((() => {
|
|
|
17515
17844
|
name: "Ghost",
|
|
17516
17845
|
enabled: true,
|
|
17517
17846
|
priority: 3,
|
|
17518
|
-
background: {
|
|
17519
|
-
|
|
17847
|
+
background: {
|
|
17848
|
+
type: "surface",
|
|
17849
|
+
role: "link"
|
|
17850
|
+
},
|
|
17520
17851
|
borderRadius: "rounded-md",
|
|
17521
17852
|
effects: { hover: [{
|
|
17522
17853
|
effectId: "background-on-hover",
|
|
@@ -17579,7 +17910,6 @@ var init_earth_pill = __esmMin((() => {
|
|
|
17579
17910
|
type: "solid",
|
|
17580
17911
|
colorToken: "primary"
|
|
17581
17912
|
},
|
|
17582
|
-
textColorToken: "primaryForeground",
|
|
17583
17913
|
borderRadius: "rounded-full",
|
|
17584
17914
|
shadow: {
|
|
17585
17915
|
elevation: "low",
|
|
@@ -17605,13 +17935,12 @@ var init_earth_pill = __esmMin((() => {
|
|
|
17605
17935
|
name: "Secondary",
|
|
17606
17936
|
enabled: true,
|
|
17607
17937
|
priority: 2,
|
|
17608
|
-
background: {
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
border: {
|
|
17612
|
-
widthClass: "border",
|
|
17613
|
-
colorToken: "primary"
|
|
17938
|
+
background: {
|
|
17939
|
+
type: "surface",
|
|
17940
|
+
role: "link"
|
|
17614
17941
|
},
|
|
17942
|
+
borderRadius: "rounded-full",
|
|
17943
|
+
border: { widthClass: "border" },
|
|
17615
17944
|
effects: { hover: [{
|
|
17616
17945
|
effectId: "background-on-hover",
|
|
17617
17946
|
options: { colorToken: "muted" }
|
|
@@ -17622,13 +17951,12 @@ var init_earth_pill = __esmMin((() => {
|
|
|
17622
17951
|
name: "Outline",
|
|
17623
17952
|
enabled: true,
|
|
17624
17953
|
priority: 3,
|
|
17625
|
-
background: {
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
border: {
|
|
17629
|
-
widthClass: "border",
|
|
17630
|
-
colorToken: "border"
|
|
17954
|
+
background: {
|
|
17955
|
+
type: "surface",
|
|
17956
|
+
role: "link"
|
|
17631
17957
|
},
|
|
17958
|
+
borderRadius: "rounded-full",
|
|
17959
|
+
border: { widthClass: "border" },
|
|
17632
17960
|
effects: { hover: [{
|
|
17633
17961
|
effectId: "background-on-hover",
|
|
17634
17962
|
options: { colorToken: "surfaceAlt" }
|
|
@@ -17639,8 +17967,10 @@ var init_earth_pill = __esmMin((() => {
|
|
|
17639
17967
|
name: "Ghost",
|
|
17640
17968
|
enabled: true,
|
|
17641
17969
|
priority: 3,
|
|
17642
|
-
background: {
|
|
17643
|
-
|
|
17970
|
+
background: {
|
|
17971
|
+
type: "surface",
|
|
17972
|
+
role: "link"
|
|
17973
|
+
},
|
|
17644
17974
|
borderRadius: "rounded-full",
|
|
17645
17975
|
shadow: {
|
|
17646
17976
|
elevation: "none",
|
|
@@ -17661,11 +17991,7 @@ var init_earth_pill = __esmMin((() => {
|
|
|
17661
17991
|
padding: "0.625rem 0",
|
|
17662
17992
|
fontSize: "text-xl"
|
|
17663
17993
|
}
|
|
17664
|
-
}
|
|
17665
|
-
effects: { hover: [{
|
|
17666
|
-
effectId: "opacity-reduce",
|
|
17667
|
-
options: { reduction: 25 }
|
|
17668
|
-
}] }
|
|
17994
|
+
}
|
|
17669
17995
|
}
|
|
17670
17996
|
]
|
|
17671
17997
|
}
|
|
@@ -17701,8 +18027,10 @@ var init_editorial_link = __esmMin((() => {
|
|
|
17701
18027
|
name: "Primary",
|
|
17702
18028
|
enabled: true,
|
|
17703
18029
|
priority: 1,
|
|
17704
|
-
background: {
|
|
17705
|
-
|
|
18030
|
+
background: {
|
|
18031
|
+
type: "surface",
|
|
18032
|
+
role: "link"
|
|
18033
|
+
},
|
|
17706
18034
|
borderRadius: "rounded-none",
|
|
17707
18035
|
sizes: {
|
|
17708
18036
|
sm: { padding: "0.25rem 0" },
|
|
@@ -17724,8 +18052,10 @@ var init_editorial_link = __esmMin((() => {
|
|
|
17724
18052
|
name: "Secondary",
|
|
17725
18053
|
enabled: true,
|
|
17726
18054
|
priority: 2,
|
|
17727
|
-
background: {
|
|
17728
|
-
|
|
18055
|
+
background: {
|
|
18056
|
+
type: "surface",
|
|
18057
|
+
role: "link"
|
|
18058
|
+
},
|
|
17729
18059
|
borderRadius: "rounded-none",
|
|
17730
18060
|
sizes: {
|
|
17731
18061
|
sm: { padding: "0.25rem 0" },
|
|
@@ -17747,8 +18077,10 @@ var init_editorial_link = __esmMin((() => {
|
|
|
17747
18077
|
name: "Outline",
|
|
17748
18078
|
enabled: true,
|
|
17749
18079
|
priority: 3,
|
|
17750
|
-
background: {
|
|
17751
|
-
|
|
18080
|
+
background: {
|
|
18081
|
+
type: "surface",
|
|
18082
|
+
role: "link"
|
|
18083
|
+
},
|
|
17752
18084
|
borderRadius: "rounded-none",
|
|
17753
18085
|
sizes: {
|
|
17754
18086
|
sm: { padding: "0.25rem 0" },
|
|
@@ -17770,19 +18102,17 @@ var init_editorial_link = __esmMin((() => {
|
|
|
17770
18102
|
name: "Ghost",
|
|
17771
18103
|
enabled: true,
|
|
17772
18104
|
priority: 3,
|
|
17773
|
-
background: {
|
|
17774
|
-
|
|
18105
|
+
background: {
|
|
18106
|
+
type: "surface",
|
|
18107
|
+
role: "link"
|
|
18108
|
+
},
|
|
17775
18109
|
borderRadius: "rounded-none",
|
|
17776
18110
|
sizes: {
|
|
17777
18111
|
sm: { padding: "0.25rem 0" },
|
|
17778
18112
|
md: { padding: "0.5rem 0" },
|
|
17779
18113
|
lg: { padding: "0.625rem 0" },
|
|
17780
18114
|
xl: { padding: "0.75rem 0" }
|
|
17781
|
-
}
|
|
17782
|
-
effects: { hover: [{
|
|
17783
|
-
effectId: "opacity-reduce",
|
|
17784
|
-
options: { reduction: -20 }
|
|
17785
|
-
}] }
|
|
18115
|
+
}
|
|
17786
18116
|
}
|
|
17787
18117
|
]
|
|
17788
18118
|
}
|
|
@@ -17840,12 +18170,8 @@ var init_flat_ink = __esmMin((() => {
|
|
|
17840
18170
|
type: "solid",
|
|
17841
18171
|
colorToken: "primary"
|
|
17842
18172
|
},
|
|
17843
|
-
textColorToken: "primaryForeground",
|
|
17844
18173
|
borderRadius: "rounded-lg",
|
|
17845
|
-
affordance: {
|
|
17846
|
-
iconId: "ArrowRight",
|
|
17847
|
-
colorToken: "accent"
|
|
17848
|
-
},
|
|
18174
|
+
affordance: { iconId: "ArrowRight" },
|
|
17849
18175
|
effects: { hover: [{
|
|
17850
18176
|
effectId: "lift",
|
|
17851
18177
|
options: { translateY: "-2px" }
|
|
@@ -17859,13 +18185,12 @@ var init_flat_ink = __esmMin((() => {
|
|
|
17859
18185
|
name: "Secondary",
|
|
17860
18186
|
enabled: true,
|
|
17861
18187
|
priority: 2,
|
|
17862
|
-
background: {
|
|
17863
|
-
|
|
17864
|
-
|
|
17865
|
-
border: {
|
|
17866
|
-
widthClass: "border",
|
|
17867
|
-
colorToken: "border"
|
|
18188
|
+
background: {
|
|
18189
|
+
type: "surface",
|
|
18190
|
+
role: "link"
|
|
17868
18191
|
},
|
|
18192
|
+
borderRadius: "rounded-lg",
|
|
18193
|
+
border: { widthClass: "border" },
|
|
17869
18194
|
effects: { hover: [{
|
|
17870
18195
|
effectId: "lift",
|
|
17871
18196
|
options: { translateY: "-2px" }
|
|
@@ -17883,12 +18208,8 @@ var init_flat_ink = __esmMin((() => {
|
|
|
17883
18208
|
type: "solid",
|
|
17884
18209
|
colorToken: "accent"
|
|
17885
18210
|
},
|
|
17886
|
-
textColorToken: "accentForeground",
|
|
17887
18211
|
borderRadius: "rounded-lg",
|
|
17888
|
-
affordance: {
|
|
17889
|
-
iconId: "ArrowRight",
|
|
17890
|
-
colorToken: "accentForeground"
|
|
17891
|
-
},
|
|
18212
|
+
affordance: { iconId: "ArrowRight" },
|
|
17892
18213
|
effects: { hover: [{
|
|
17893
18214
|
effectId: "lift",
|
|
17894
18215
|
options: { translateY: "-2px" }
|
|
@@ -17951,7 +18272,6 @@ var init_ink_stamp = __esmMin((() => {
|
|
|
17951
18272
|
type: "solid",
|
|
17952
18273
|
colorToken: "primary"
|
|
17953
18274
|
},
|
|
17954
|
-
textColorToken: "primaryForeground",
|
|
17955
18275
|
borderRadius: "rounded-md",
|
|
17956
18276
|
effects: {
|
|
17957
18277
|
hover: [{
|
|
@@ -17972,13 +18292,12 @@ var init_ink_stamp = __esmMin((() => {
|
|
|
17972
18292
|
name: "Secondary",
|
|
17973
18293
|
enabled: true,
|
|
17974
18294
|
priority: 2,
|
|
17975
|
-
background: {
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
border: {
|
|
17979
|
-
widthClass: "border-2",
|
|
17980
|
-
colorToken: "primary"
|
|
18295
|
+
background: {
|
|
18296
|
+
type: "surface",
|
|
18297
|
+
role: "link"
|
|
17981
18298
|
},
|
|
18299
|
+
borderRadius: "rounded-md",
|
|
18300
|
+
border: { widthClass: "border-2" },
|
|
17982
18301
|
effects: { hover: [{
|
|
17983
18302
|
effectId: "background-on-hover",
|
|
17984
18303
|
options: { colorToken: "surface" }
|
|
@@ -17989,13 +18308,12 @@ var init_ink_stamp = __esmMin((() => {
|
|
|
17989
18308
|
name: "Outline",
|
|
17990
18309
|
enabled: true,
|
|
17991
18310
|
priority: 3,
|
|
17992
|
-
background: {
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
border: {
|
|
17996
|
-
widthClass: "border-2",
|
|
17997
|
-
colorToken: "border"
|
|
18311
|
+
background: {
|
|
18312
|
+
type: "surface",
|
|
18313
|
+
role: "link"
|
|
17998
18314
|
},
|
|
18315
|
+
borderRadius: "rounded-md",
|
|
18316
|
+
border: { widthClass: "border-2" },
|
|
17999
18317
|
effects: { hover: [{
|
|
18000
18318
|
effectId: "background-on-hover",
|
|
18001
18319
|
options: { colorToken: "surface" }
|
|
@@ -18006,8 +18324,10 @@ var init_ink_stamp = __esmMin((() => {
|
|
|
18006
18324
|
name: "Ghost",
|
|
18007
18325
|
enabled: true,
|
|
18008
18326
|
priority: 3,
|
|
18009
|
-
background: {
|
|
18010
|
-
|
|
18327
|
+
background: {
|
|
18328
|
+
type: "surface",
|
|
18329
|
+
role: "link"
|
|
18330
|
+
},
|
|
18011
18331
|
borderRadius: "rounded-none",
|
|
18012
18332
|
sizes: {
|
|
18013
18333
|
sm: {
|
|
@@ -18094,7 +18414,6 @@ var init_joy_stamp = __esmMin((() => {
|
|
|
18094
18414
|
type: "solid",
|
|
18095
18415
|
colorToken: "primary"
|
|
18096
18416
|
},
|
|
18097
|
-
textColorToken: "primaryForeground",
|
|
18098
18417
|
borderRadius: "rounded-full",
|
|
18099
18418
|
shadow: {
|
|
18100
18419
|
elevation: "high",
|
|
@@ -18108,13 +18427,12 @@ var init_joy_stamp = __esmMin((() => {
|
|
|
18108
18427
|
name: "Secondary",
|
|
18109
18428
|
enabled: true,
|
|
18110
18429
|
priority: 2,
|
|
18111
|
-
background: {
|
|
18112
|
-
|
|
18113
|
-
|
|
18114
|
-
border: {
|
|
18115
|
-
widthClass: "border-2",
|
|
18116
|
-
colorToken: "text"
|
|
18430
|
+
background: {
|
|
18431
|
+
type: "surface",
|
|
18432
|
+
role: "link"
|
|
18117
18433
|
},
|
|
18434
|
+
borderRadius: "rounded-full",
|
|
18435
|
+
border: { widthClass: "border-2" },
|
|
18118
18436
|
shadow: {
|
|
18119
18437
|
elevation: "high",
|
|
18120
18438
|
softness: "hard",
|
|
@@ -18179,12 +18497,8 @@ var init_ornate_ritual = __esmMin((() => {
|
|
|
18179
18497
|
type: "solid",
|
|
18180
18498
|
colorToken: "primary"
|
|
18181
18499
|
},
|
|
18182
|
-
textColorToken: "primaryForeground",
|
|
18183
18500
|
borderRadius: "rounded-md",
|
|
18184
|
-
border: {
|
|
18185
|
-
widthClass: "border",
|
|
18186
|
-
colorToken: "primary"
|
|
18187
|
-
},
|
|
18501
|
+
border: { widthClass: "border" },
|
|
18188
18502
|
effects: {
|
|
18189
18503
|
hover: [{
|
|
18190
18504
|
effectId: "background-on-hover",
|
|
@@ -18205,12 +18519,8 @@ var init_ornate_ritual = __esmMin((() => {
|
|
|
18205
18519
|
type: "solid",
|
|
18206
18520
|
colorToken: "secondary"
|
|
18207
18521
|
},
|
|
18208
|
-
textColorToken: "primaryForeground",
|
|
18209
18522
|
borderRadius: "rounded-md",
|
|
18210
|
-
border: {
|
|
18211
|
-
widthClass: "border",
|
|
18212
|
-
colorToken: "primary"
|
|
18213
|
-
},
|
|
18523
|
+
border: { widthClass: "border" },
|
|
18214
18524
|
effects: { hover: [{
|
|
18215
18525
|
effectId: "background-on-hover",
|
|
18216
18526
|
options: { colorToken: "surface" }
|
|
@@ -18221,13 +18531,12 @@ var init_ornate_ritual = __esmMin((() => {
|
|
|
18221
18531
|
name: "Outline",
|
|
18222
18532
|
enabled: true,
|
|
18223
18533
|
priority: 3,
|
|
18224
|
-
background: {
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
border: {
|
|
18228
|
-
widthClass: "border",
|
|
18229
|
-
colorToken: "primary"
|
|
18534
|
+
background: {
|
|
18535
|
+
type: "surface",
|
|
18536
|
+
role: "link"
|
|
18230
18537
|
},
|
|
18538
|
+
borderRadius: "rounded-md",
|
|
18539
|
+
border: { widthClass: "border" },
|
|
18231
18540
|
effects: { hover: [{
|
|
18232
18541
|
effectId: "background-on-hover",
|
|
18233
18542
|
options: { colorToken: "muted" }
|
|
@@ -18238,8 +18547,10 @@ var init_ornate_ritual = __esmMin((() => {
|
|
|
18238
18547
|
name: "Ghost",
|
|
18239
18548
|
enabled: true,
|
|
18240
18549
|
priority: 3,
|
|
18241
|
-
background: {
|
|
18242
|
-
|
|
18550
|
+
background: {
|
|
18551
|
+
type: "surface",
|
|
18552
|
+
role: "link"
|
|
18553
|
+
},
|
|
18243
18554
|
borderRadius: "rounded-none",
|
|
18244
18555
|
sizes: {
|
|
18245
18556
|
sm: {
|
|
@@ -18321,14 +18632,10 @@ var init_pebble = __esmMin((() => {
|
|
|
18321
18632
|
type: "solid",
|
|
18322
18633
|
colorToken: "primary"
|
|
18323
18634
|
},
|
|
18324
|
-
textColorToken: "primaryForeground",
|
|
18325
18635
|
borderRadius: "rounded-full",
|
|
18326
18636
|
effects: { hover: [{
|
|
18327
|
-
effectId: "background
|
|
18328
|
-
options: {
|
|
18329
|
-
colorToken: "primary",
|
|
18330
|
-
opacity: 88
|
|
18331
|
-
}
|
|
18637
|
+
effectId: "darken-background",
|
|
18638
|
+
options: { amount: 100 }
|
|
18332
18639
|
}] }
|
|
18333
18640
|
},
|
|
18334
18641
|
{
|
|
@@ -18336,13 +18643,12 @@ var init_pebble = __esmMin((() => {
|
|
|
18336
18643
|
name: "Secondary",
|
|
18337
18644
|
enabled: true,
|
|
18338
18645
|
priority: 2,
|
|
18339
|
-
background: {
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
border: {
|
|
18343
|
-
widthClass: "border-2",
|
|
18344
|
-
colorToken: "accent"
|
|
18646
|
+
background: {
|
|
18647
|
+
type: "surface",
|
|
18648
|
+
role: "link"
|
|
18345
18649
|
},
|
|
18650
|
+
borderRadius: "rounded-full",
|
|
18651
|
+
border: { widthClass: "border-2" },
|
|
18346
18652
|
effects: { hover: [{
|
|
18347
18653
|
effectId: "background-on-hover",
|
|
18348
18654
|
options: { colorToken: "accent" }
|
|
@@ -18353,13 +18659,12 @@ var init_pebble = __esmMin((() => {
|
|
|
18353
18659
|
name: "Outline",
|
|
18354
18660
|
enabled: true,
|
|
18355
18661
|
priority: 3,
|
|
18356
|
-
background: {
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
border: {
|
|
18360
|
-
widthClass: "border",
|
|
18361
|
-
colorToken: "border"
|
|
18662
|
+
background: {
|
|
18663
|
+
type: "surface",
|
|
18664
|
+
role: "link"
|
|
18362
18665
|
},
|
|
18666
|
+
borderRadius: "rounded-full",
|
|
18667
|
+
border: { widthClass: "border" },
|
|
18363
18668
|
effects: { hover: [{
|
|
18364
18669
|
effectId: "background-on-hover",
|
|
18365
18670
|
options: { colorToken: "surface" }
|
|
@@ -18370,8 +18675,10 @@ var init_pebble = __esmMin((() => {
|
|
|
18370
18675
|
name: "Ghost",
|
|
18371
18676
|
enabled: true,
|
|
18372
18677
|
priority: 3,
|
|
18373
|
-
background: {
|
|
18374
|
-
|
|
18678
|
+
background: {
|
|
18679
|
+
type: "surface",
|
|
18680
|
+
role: "link"
|
|
18681
|
+
},
|
|
18375
18682
|
borderRadius: "rounded-full",
|
|
18376
18683
|
sizes: {
|
|
18377
18684
|
sm: {
|
|
@@ -18387,11 +18694,7 @@ var init_pebble = __esmMin((() => {
|
|
|
18387
18694
|
padding: "0.75rem 1.5rem",
|
|
18388
18695
|
fontSize: "text-xl"
|
|
18389
18696
|
}
|
|
18390
|
-
}
|
|
18391
|
-
effects: { hover: [{
|
|
18392
|
-
effectId: "opacity-reduce",
|
|
18393
|
-
options: { reduction: 30 }
|
|
18394
|
-
}] }
|
|
18697
|
+
}
|
|
18395
18698
|
}
|
|
18396
18699
|
]
|
|
18397
18700
|
}
|
|
@@ -18452,15 +18755,11 @@ var init_quiet_arrow = __esmMin((() => {
|
|
|
18452
18755
|
type: "solid",
|
|
18453
18756
|
colorToken: "primary"
|
|
18454
18757
|
},
|
|
18455
|
-
textColorToken: "primaryForeground",
|
|
18456
18758
|
borderRadius: "rounded-xl",
|
|
18457
18759
|
affordance: { iconId: "ArrowRight" },
|
|
18458
18760
|
effects: { hover: [{
|
|
18459
|
-
effectId: "background
|
|
18460
|
-
options: {
|
|
18461
|
-
colorToken: "primary",
|
|
18462
|
-
opacity: 90
|
|
18463
|
-
}
|
|
18761
|
+
effectId: "darken-background",
|
|
18762
|
+
options: { amount: 100 }
|
|
18464
18763
|
}] }
|
|
18465
18764
|
},
|
|
18466
18765
|
{
|
|
@@ -18468,13 +18767,12 @@ var init_quiet_arrow = __esmMin((() => {
|
|
|
18468
18767
|
name: "Secondary",
|
|
18469
18768
|
enabled: true,
|
|
18470
18769
|
priority: 2,
|
|
18471
|
-
background: {
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
border: {
|
|
18475
|
-
widthClass: "border",
|
|
18476
|
-
colorToken: "primary"
|
|
18770
|
+
background: {
|
|
18771
|
+
type: "surface",
|
|
18772
|
+
role: "link"
|
|
18477
18773
|
},
|
|
18774
|
+
borderRadius: "rounded-xl",
|
|
18775
|
+
border: { widthClass: "border" },
|
|
18478
18776
|
affordance: { iconId: "ArrowRight" },
|
|
18479
18777
|
effects: { hover: [{
|
|
18480
18778
|
effectId: "background-on-hover",
|
|
@@ -18486,21 +18784,22 @@ var init_quiet_arrow = __esmMin((() => {
|
|
|
18486
18784
|
name: "Outline",
|
|
18487
18785
|
enabled: true,
|
|
18488
18786
|
priority: 3,
|
|
18489
|
-
background: {
|
|
18490
|
-
|
|
18787
|
+
background: {
|
|
18788
|
+
type: "surface",
|
|
18789
|
+
role: "link"
|
|
18790
|
+
},
|
|
18491
18791
|
borderRadius: "rounded-xl",
|
|
18492
|
-
border: {
|
|
18493
|
-
widthClass: "border",
|
|
18494
|
-
colorToken: "primary"
|
|
18495
|
-
}
|
|
18792
|
+
border: { widthClass: "border" }
|
|
18496
18793
|
},
|
|
18497
18794
|
{
|
|
18498
18795
|
id: "ghost",
|
|
18499
18796
|
name: "Ghost",
|
|
18500
18797
|
enabled: true,
|
|
18501
18798
|
priority: 3,
|
|
18502
|
-
background: {
|
|
18503
|
-
|
|
18799
|
+
background: {
|
|
18800
|
+
type: "surface",
|
|
18801
|
+
role: "link"
|
|
18802
|
+
},
|
|
18504
18803
|
borderRadius: "rounded-xl"
|
|
18505
18804
|
}
|
|
18506
18805
|
]
|
|
@@ -18563,7 +18862,6 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18563
18862
|
type: "solid",
|
|
18564
18863
|
colorToken: "primary"
|
|
18565
18864
|
},
|
|
18566
|
-
textColorToken: "background",
|
|
18567
18865
|
borderRadius: "rounded-full",
|
|
18568
18866
|
effects: { hover: [{ effectId: "pop" }] }
|
|
18569
18867
|
},
|
|
@@ -18572,13 +18870,12 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18572
18870
|
name: "Secondary",
|
|
18573
18871
|
enabled: true,
|
|
18574
18872
|
priority: 2,
|
|
18575
|
-
background: {
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
border: {
|
|
18579
|
-
widthClass: "border-2",
|
|
18580
|
-
colorToken: "primary"
|
|
18873
|
+
background: {
|
|
18874
|
+
type: "surface",
|
|
18875
|
+
role: "link"
|
|
18581
18876
|
},
|
|
18877
|
+
borderRadius: "rounded-full",
|
|
18878
|
+
border: { widthClass: "border-2" },
|
|
18582
18879
|
effects: { hover: [{ effectId: "pop" }] }
|
|
18583
18880
|
},
|
|
18584
18881
|
{
|
|
@@ -18590,7 +18887,6 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18590
18887
|
type: "solid",
|
|
18591
18888
|
colorToken: "secondary"
|
|
18592
18889
|
},
|
|
18593
|
-
textColorToken: "primary",
|
|
18594
18890
|
borderRadius: "rounded-full",
|
|
18595
18891
|
effects: { hover: [{ effectId: "pop" }] }
|
|
18596
18892
|
},
|
|
@@ -18603,12 +18899,8 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18603
18899
|
type: "solid",
|
|
18604
18900
|
colorToken: "background"
|
|
18605
18901
|
},
|
|
18606
|
-
textColorToken: "primary",
|
|
18607
18902
|
borderRadius: "rounded-full",
|
|
18608
|
-
border: {
|
|
18609
|
-
widthClass: "border-2",
|
|
18610
|
-
colorToken: "primary"
|
|
18611
|
-
},
|
|
18903
|
+
border: { widthClass: "border-2" },
|
|
18612
18904
|
effects: { hover: [{
|
|
18613
18905
|
effectId: "background-on-hover",
|
|
18614
18906
|
options: { colorToken: "surface" }
|
|
@@ -18619,13 +18911,12 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18619
18911
|
name: "Outline",
|
|
18620
18912
|
enabled: true,
|
|
18621
18913
|
priority: 3,
|
|
18622
|
-
background: {
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
border: {
|
|
18626
|
-
widthClass: "border-2",
|
|
18627
|
-
colorToken: "primary"
|
|
18914
|
+
background: {
|
|
18915
|
+
type: "surface",
|
|
18916
|
+
role: "link"
|
|
18628
18917
|
},
|
|
18918
|
+
borderRadius: "rounded-full",
|
|
18919
|
+
border: { widthClass: "border-2" },
|
|
18629
18920
|
effects: { hover: [{
|
|
18630
18921
|
effectId: "background-on-hover",
|
|
18631
18922
|
options: { colorToken: "background" }
|
|
@@ -18636,8 +18927,10 @@ var init_showtime_pill = __esmMin((() => {
|
|
|
18636
18927
|
name: "Ghost",
|
|
18637
18928
|
enabled: true,
|
|
18638
18929
|
priority: 3,
|
|
18639
|
-
background: {
|
|
18640
|
-
|
|
18930
|
+
background: {
|
|
18931
|
+
type: "surface",
|
|
18932
|
+
role: "link"
|
|
18933
|
+
},
|
|
18641
18934
|
borderRadius: "rounded-full",
|
|
18642
18935
|
effects: { hover: [{
|
|
18643
18936
|
effectId: "background-on-hover",
|
|
@@ -18683,7 +18976,6 @@ var init_soft_pill = __esmMin((() => {
|
|
|
18683
18976
|
type: "solid",
|
|
18684
18977
|
colorToken: "primary"
|
|
18685
18978
|
},
|
|
18686
|
-
textColorToken: "primaryForeground",
|
|
18687
18979
|
borderRadius: "rounded-full",
|
|
18688
18980
|
shadow: {
|
|
18689
18981
|
elevation: "low",
|
|
@@ -18706,13 +18998,12 @@ var init_soft_pill = __esmMin((() => {
|
|
|
18706
18998
|
name: "Secondary",
|
|
18707
18999
|
enabled: true,
|
|
18708
19000
|
priority: 2,
|
|
18709
|
-
background: {
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
border: {
|
|
18713
|
-
widthClass: "border-2",
|
|
18714
|
-
colorToken: "primary"
|
|
19001
|
+
background: {
|
|
19002
|
+
type: "surface",
|
|
19003
|
+
role: "link"
|
|
18715
19004
|
},
|
|
19005
|
+
borderRadius: "rounded-full",
|
|
19006
|
+
border: { widthClass: "border-2" },
|
|
18716
19007
|
effects: { hover: [{
|
|
18717
19008
|
effectId: "background-on-hover",
|
|
18718
19009
|
options: { colorToken: "surface" }
|
|
@@ -18723,13 +19014,12 @@ var init_soft_pill = __esmMin((() => {
|
|
|
18723
19014
|
name: "Outline",
|
|
18724
19015
|
enabled: true,
|
|
18725
19016
|
priority: 3,
|
|
18726
|
-
background: {
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
border: {
|
|
18730
|
-
widthClass: "border",
|
|
18731
|
-
colorToken: "border"
|
|
19017
|
+
background: {
|
|
19018
|
+
type: "surface",
|
|
19019
|
+
role: "link"
|
|
18732
19020
|
},
|
|
19021
|
+
borderRadius: "rounded-full",
|
|
19022
|
+
border: { widthClass: "border" },
|
|
18733
19023
|
effects: { hover: [{
|
|
18734
19024
|
effectId: "background-on-hover",
|
|
18735
19025
|
options: { colorToken: "surface" }
|
|
@@ -18740,8 +19030,10 @@ var init_soft_pill = __esmMin((() => {
|
|
|
18740
19030
|
name: "Ghost",
|
|
18741
19031
|
enabled: true,
|
|
18742
19032
|
priority: 3,
|
|
18743
|
-
background: {
|
|
18744
|
-
|
|
19033
|
+
background: {
|
|
19034
|
+
type: "surface",
|
|
19035
|
+
role: "link"
|
|
19036
|
+
},
|
|
18745
19037
|
borderRadius: "rounded-full",
|
|
18746
19038
|
effects: { hover: [{
|
|
18747
19039
|
effectId: "background-on-hover",
|
|
@@ -18756,6 +19048,7 @@ var init_soft_pill = __esmMin((() => {
|
|
|
18756
19048
|
//#region ../theme-core/src/buttons/personalities/two-tone-pill.ts
|
|
18757
19049
|
var solidSecondary, twoTonePill;
|
|
18758
19050
|
var init_two_tone_pill = __esmMin((() => {
|
|
19051
|
+
init_types$14();
|
|
18759
19052
|
init_soft_pill();
|
|
18760
19053
|
init_types$13();
|
|
18761
19054
|
solidSecondary = {
|
|
@@ -18765,9 +19058,8 @@ var init_two_tone_pill = __esmMin((() => {
|
|
|
18765
19058
|
priority: 2,
|
|
18766
19059
|
background: {
|
|
18767
19060
|
type: "solid",
|
|
18768
|
-
colorToken: "secondary"
|
|
19061
|
+
colorToken: unsafeAsOpaqueButtonColourToken("secondary")
|
|
18769
19062
|
},
|
|
18770
|
-
textColorToken: "onSecondary",
|
|
18771
19063
|
borderRadius: "rounded-full",
|
|
18772
19064
|
shadow: {
|
|
18773
19065
|
elevation: "none",
|
|
@@ -19148,6 +19440,276 @@ var init_testimonialQuotePresets = __esmMin((() => {
|
|
|
19148
19440
|
serifDisplayQuote = { style: "serif-display" };
|
|
19149
19441
|
accentGlyphQuote = { style: "accent-glyph" };
|
|
19150
19442
|
}));
|
|
19443
|
+
//#endregion
|
|
19444
|
+
//#region ../theme-core/src/gradients/types.ts
|
|
19445
|
+
/**
|
|
19446
|
+
* Gradient configuration types and schemas
|
|
19447
|
+
*/
|
|
19448
|
+
var gradientStopSchema, radialGradientShapeSchema, gradientConfigSchema;
|
|
19449
|
+
var init_types$12 = __esmMin((() => {
|
|
19450
|
+
init_themeColorTokens();
|
|
19451
|
+
gradientStopSchema = z$1.object({
|
|
19452
|
+
color: themeColorTokenSchema,
|
|
19453
|
+
position: z$1.number().min(0).max(100)
|
|
19454
|
+
});
|
|
19455
|
+
radialGradientShapeSchema = z$1.enum(["circle", "ellipse"]);
|
|
19456
|
+
gradientConfigSchema = z$1.object({
|
|
19457
|
+
type: z$1.enum([
|
|
19458
|
+
"linear",
|
|
19459
|
+
"radial",
|
|
19460
|
+
"conic"
|
|
19461
|
+
]).default("linear"),
|
|
19462
|
+
angle: z$1.number().min(0).max(360).optional(),
|
|
19463
|
+
shape: radialGradientShapeSchema.optional(),
|
|
19464
|
+
position: z$1.string().optional(),
|
|
19465
|
+
stops: z$1.array(gradientStopSchema).min(2)
|
|
19466
|
+
});
|
|
19467
|
+
}));
|
|
19468
|
+
//#endregion
|
|
19469
|
+
//#region ../theme-core/src/gradients/presets.ts
|
|
19470
|
+
function parseGradientPresetId(value) {
|
|
19471
|
+
if (typeof value !== "string") return null;
|
|
19472
|
+
const normalized = value.trim();
|
|
19473
|
+
if (!gradientPresetIdSet.has(normalized)) return null;
|
|
19474
|
+
return normalized;
|
|
19475
|
+
}
|
|
19476
|
+
function getGradientPreset(id) {
|
|
19477
|
+
return gradientPresetById[id];
|
|
19478
|
+
}
|
|
19479
|
+
var rawGradientPresets, GRADIENT_PRESETS, GRADIENT_PRESET_IDS, gradientPresetIdSet, gradientPresetById;
|
|
19480
|
+
var init_presets$1 = __esmMin((() => {
|
|
19481
|
+
rawGradientPresets = [
|
|
19482
|
+
{
|
|
19483
|
+
id: "primary-secondary",
|
|
19484
|
+
name: "Primary to Secondary",
|
|
19485
|
+
description: "Blend your primary and secondary brand colors",
|
|
19486
|
+
type: "linear",
|
|
19487
|
+
angle: 135,
|
|
19488
|
+
stops: [{
|
|
19489
|
+
color: "primary-500",
|
|
19490
|
+
position: 0
|
|
19491
|
+
}, {
|
|
19492
|
+
color: "secondary-500",
|
|
19493
|
+
position: 100
|
|
19494
|
+
}]
|
|
19495
|
+
},
|
|
19496
|
+
{
|
|
19497
|
+
id: "primary-accent",
|
|
19498
|
+
name: "Primary to Accent",
|
|
19499
|
+
description: "Energetic gradient from primary to accent",
|
|
19500
|
+
type: "linear",
|
|
19501
|
+
angle: 135,
|
|
19502
|
+
stops: [{
|
|
19503
|
+
color: "primary-500",
|
|
19504
|
+
position: 0
|
|
19505
|
+
}, {
|
|
19506
|
+
color: "accent-500",
|
|
19507
|
+
position: 100
|
|
19508
|
+
}]
|
|
19509
|
+
},
|
|
19510
|
+
{
|
|
19511
|
+
id: "secondary-accent",
|
|
19512
|
+
name: "Secondary to Accent",
|
|
19513
|
+
description: "Vibrant secondary to accent blend",
|
|
19514
|
+
type: "linear",
|
|
19515
|
+
angle: 135,
|
|
19516
|
+
stops: [{
|
|
19517
|
+
color: "secondary-500",
|
|
19518
|
+
position: 0
|
|
19519
|
+
}, {
|
|
19520
|
+
color: "accent-500",
|
|
19521
|
+
position: 100
|
|
19522
|
+
}]
|
|
19523
|
+
},
|
|
19524
|
+
{
|
|
19525
|
+
id: "primary-light-dark",
|
|
19526
|
+
name: "Primary Light to Dark",
|
|
19527
|
+
description: "Subtle primary color fade",
|
|
19528
|
+
type: "linear",
|
|
19529
|
+
angle: 180,
|
|
19530
|
+
stops: [{
|
|
19531
|
+
color: "primary-500",
|
|
19532
|
+
position: 0
|
|
19533
|
+
}, {
|
|
19534
|
+
color: "primary-900",
|
|
19535
|
+
position: 100
|
|
19536
|
+
}]
|
|
19537
|
+
},
|
|
19538
|
+
{
|
|
19539
|
+
id: "primary-dark-light",
|
|
19540
|
+
name: "Primary Dark to Light",
|
|
19541
|
+
description: "Reverse primary fade",
|
|
19542
|
+
type: "linear",
|
|
19543
|
+
angle: 180,
|
|
19544
|
+
stops: [{
|
|
19545
|
+
color: "primary-900",
|
|
19546
|
+
position: 0
|
|
19547
|
+
}, {
|
|
19548
|
+
color: "primary-50",
|
|
19549
|
+
position: 100
|
|
19550
|
+
}]
|
|
19551
|
+
},
|
|
19552
|
+
{
|
|
19553
|
+
id: "secondary-light-dark",
|
|
19554
|
+
name: "Secondary Light to Dark",
|
|
19555
|
+
description: "Subtle secondary color fade",
|
|
19556
|
+
type: "linear",
|
|
19557
|
+
angle: 180,
|
|
19558
|
+
stops: [{
|
|
19559
|
+
color: "secondary-500",
|
|
19560
|
+
position: 0
|
|
19561
|
+
}, {
|
|
19562
|
+
color: "secondary-900",
|
|
19563
|
+
position: 100
|
|
19564
|
+
}]
|
|
19565
|
+
},
|
|
19566
|
+
{
|
|
19567
|
+
id: "accent-light-dark",
|
|
19568
|
+
name: "Accent Light to Dark",
|
|
19569
|
+
description: "Accent color depth fade",
|
|
19570
|
+
type: "linear",
|
|
19571
|
+
angle: 180,
|
|
19572
|
+
stops: [{
|
|
19573
|
+
color: "accent-500",
|
|
19574
|
+
position: 0
|
|
19575
|
+
}, {
|
|
19576
|
+
color: "accent-900",
|
|
19577
|
+
position: 100
|
|
19578
|
+
}]
|
|
19579
|
+
},
|
|
19580
|
+
{
|
|
19581
|
+
id: "background-surface",
|
|
19582
|
+
name: "Background to Surface",
|
|
19583
|
+
description: "Subtle depth using base colors",
|
|
19584
|
+
type: "linear",
|
|
19585
|
+
angle: 180,
|
|
19586
|
+
stops: [{
|
|
19587
|
+
color: "background",
|
|
19588
|
+
position: 0
|
|
19589
|
+
}, {
|
|
19590
|
+
color: "surface",
|
|
19591
|
+
position: 100
|
|
19592
|
+
}]
|
|
19593
|
+
},
|
|
19594
|
+
{
|
|
19595
|
+
id: "neutral-fade",
|
|
19596
|
+
name: "Neutral Gradient",
|
|
19597
|
+
description: "Elegant neutral color fade",
|
|
19598
|
+
type: "linear",
|
|
19599
|
+
angle: 180,
|
|
19600
|
+
stops: [{
|
|
19601
|
+
color: "neutral-900",
|
|
19602
|
+
position: 0
|
|
19603
|
+
}, {
|
|
19604
|
+
color: "neutral-50",
|
|
19605
|
+
position: 100
|
|
19606
|
+
}]
|
|
19607
|
+
},
|
|
19608
|
+
{
|
|
19609
|
+
id: "primary-glow",
|
|
19610
|
+
name: "Primary glow",
|
|
19611
|
+
description: "A soft top-centred glow using your primary palette",
|
|
19612
|
+
type: "radial",
|
|
19613
|
+
shape: "ellipse",
|
|
19614
|
+
position: "top center",
|
|
19615
|
+
stops: [{
|
|
19616
|
+
color: "primary-900",
|
|
19617
|
+
position: 0
|
|
19618
|
+
}, {
|
|
19619
|
+
color: "primary-950",
|
|
19620
|
+
position: 100
|
|
19621
|
+
}],
|
|
19622
|
+
foreground: {
|
|
19623
|
+
textColor: "onPrimary900",
|
|
19624
|
+
headingColor: "onPrimary900",
|
|
19625
|
+
linkColor: "onPrimary900",
|
|
19626
|
+
supportingColor: "onPrimary900"
|
|
19627
|
+
}
|
|
19628
|
+
},
|
|
19629
|
+
{
|
|
19630
|
+
id: "accent-glow",
|
|
19631
|
+
name: "Accent glow",
|
|
19632
|
+
description: "A soft top-centred glow using your accent palette",
|
|
19633
|
+
type: "radial",
|
|
19634
|
+
shape: "ellipse",
|
|
19635
|
+
position: "top center",
|
|
19636
|
+
stops: [{
|
|
19637
|
+
color: "accent-900",
|
|
19638
|
+
position: 0
|
|
19639
|
+
}, {
|
|
19640
|
+
color: "accent-950",
|
|
19641
|
+
position: 100
|
|
19642
|
+
}],
|
|
19643
|
+
foreground: {
|
|
19644
|
+
textColor: "onAccent900",
|
|
19645
|
+
headingColor: "onAccent900",
|
|
19646
|
+
linkColor: "onAccent900",
|
|
19647
|
+
supportingColor: "onAccent900"
|
|
19648
|
+
}
|
|
19649
|
+
},
|
|
19650
|
+
{
|
|
19651
|
+
id: "primary-secondary-accent",
|
|
19652
|
+
name: "Brand Trio",
|
|
19653
|
+
description: "All three brand colors in harmony",
|
|
19654
|
+
type: "linear",
|
|
19655
|
+
angle: 135,
|
|
19656
|
+
stops: [
|
|
19657
|
+
{
|
|
19658
|
+
color: "primary-500",
|
|
19659
|
+
position: 0
|
|
19660
|
+
},
|
|
19661
|
+
{
|
|
19662
|
+
color: "secondary-500",
|
|
19663
|
+
position: 50
|
|
19664
|
+
},
|
|
19665
|
+
{
|
|
19666
|
+
color: "accent-500",
|
|
19667
|
+
position: 100
|
|
19668
|
+
}
|
|
19669
|
+
]
|
|
19670
|
+
}
|
|
19671
|
+
];
|
|
19672
|
+
GRADIENT_PRESETS = rawGradientPresets.map((preset) => ({
|
|
19673
|
+
...preset,
|
|
19674
|
+
id: preset.id,
|
|
19675
|
+
stops: preset.stops
|
|
19676
|
+
}));
|
|
19677
|
+
GRADIENT_PRESET_IDS = GRADIENT_PRESETS.map((preset) => preset.id);
|
|
19678
|
+
gradientPresetIdSet = new Set(GRADIENT_PRESET_IDS);
|
|
19679
|
+
gradientPresetById = Object.fromEntries(GRADIENT_PRESETS.map((preset) => [preset.id, preset]));
|
|
19680
|
+
}));
|
|
19681
|
+
//#endregion
|
|
19682
|
+
//#region ../theme-core/src/gradients/utils.ts
|
|
19683
|
+
/**
|
|
19684
|
+
* Convert a GradientConfig to a CSS gradient string
|
|
19685
|
+
*
|
|
19686
|
+
* @param config - The gradient configuration using theme tokens
|
|
19687
|
+
* @param tokens - Map of theme color tokens to hex values
|
|
19688
|
+
* @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
|
|
19689
|
+
*/
|
|
19690
|
+
function gradientToCss(config, tokens) {
|
|
19691
|
+
const stops = config.stops.map((stop) => {
|
|
19692
|
+
return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
|
|
19693
|
+
}).join(", ");
|
|
19694
|
+
const type = config.type ?? "linear";
|
|
19695
|
+
if (type === "radial") {
|
|
19696
|
+
const position = config.position ?? "center";
|
|
19697
|
+
return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
|
|
19698
|
+
}
|
|
19699
|
+
if (type === "conic") {
|
|
19700
|
+
const position = config.position ?? "center";
|
|
19701
|
+
return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
|
|
19702
|
+
}
|
|
19703
|
+
return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
|
|
19704
|
+
}
|
|
19705
|
+
var init_utils$4 = __esmMin((() => {}));
|
|
19706
|
+
//#endregion
|
|
19707
|
+
//#region ../theme-core/src/gradients/index.ts
|
|
19708
|
+
var init_gradients = __esmMin((() => {
|
|
19709
|
+
init_types$12();
|
|
19710
|
+
init_presets$1();
|
|
19711
|
+
init_utils$4();
|
|
19712
|
+
}));
|
|
19151
19713
|
var init_customizableSurfaces = __esmMin((() => {
|
|
19152
19714
|
init_types$17();
|
|
19153
19715
|
})), logoTextConfidenceValues, logoAssetShapeValues, logoKindValues, logoDensityValues, logoContainsTextSchema, logoAnalysisSourceSchema, brandDisplayModeValues, logoAccommodationPatternValues, logoSizePolicyValues;
|
|
@@ -21469,14 +22031,12 @@ var init_background$2 = __esmMin((() => {
|
|
|
21469
22031
|
]
|
|
21470
22032
|
},
|
|
21471
22033
|
generateCSS: (ctx) => {
|
|
21472
|
-
const { themeId, variantId, options, tokens } = ctx;
|
|
22034
|
+
const { themeId, variantId, options, tokens, buttonConfig } = ctx;
|
|
21473
22035
|
const colorToken = options.colorToken || "neutral-800";
|
|
21474
|
-
const color = tokens.getColor(colorToken);
|
|
21475
|
-
const textColorToken = typeof options.textColorToken === "string" ? options.textColorToken : null;
|
|
21476
22036
|
return `
|
|
21477
22037
|
/* Add background on hover */
|
|
21478
22038
|
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
21479
|
-
background-color: ${
|
|
22039
|
+
background-color: ${tokens.getColor(colorToken)};${"textColorToken" in buttonConfig && typeof options.textColorToken === "string" ? `\n color: ${tokens.getColor(options.textColorToken)};` : ""}
|
|
21480
22040
|
}
|
|
21481
22041
|
`;
|
|
21482
22042
|
}
|
|
@@ -21495,10 +22055,10 @@ var init_background$2 = __esmMin((() => {
|
|
|
21495
22055
|
default: 50
|
|
21496
22056
|
},
|
|
21497
22057
|
generateCSS: (ctx) => {
|
|
21498
|
-
const { themeId, variantId, stateGroup, options
|
|
22058
|
+
const { themeId, variantId, stateGroup, options } = ctx;
|
|
21499
22059
|
const rawOpacity = options.opacity;
|
|
21500
22060
|
const clampedOpacity = Math.max(0, Math.min(100, typeof rawOpacity === "number" && !Number.isNaN(rawOpacity) ? rawOpacity : 50));
|
|
21501
|
-
const cssVar = `var(--tb-${options.colorToken ||
|
|
22061
|
+
const cssVar = `var(--tb-${options.colorToken || "neutral-800"})`;
|
|
21502
22062
|
return `
|
|
21503
22063
|
/* Add semi-transparent background (${stateGroup}) */
|
|
21504
22064
|
:where([data-theme-scope="${themeId}"]) .${variantId}${stateGroup === "base" ? "" : `:${stateGroup}`} {
|
|
@@ -21675,7 +22235,7 @@ var init_shadow = __esmMin((() => {
|
|
|
21675
22235
|
const spread = options.spread || 10;
|
|
21676
22236
|
let glowColor;
|
|
21677
22237
|
if (options.glowColorToken && typeof options.glowColorToken === "string") glowColor = tokens.getColor(options.glowColorToken);
|
|
21678
|
-
else if (buttonConfig.border
|
|
22238
|
+
else if (buttonConfig.border) glowColor = "colorToken" in buttonConfig.border ? tokens.getColor(buttonConfig.border.colorToken) : "currentColor";
|
|
21679
22239
|
else if (buttonConfig.background.type === "solid") glowColor = tokens.getColor(buttonConfig.background.colorToken ?? "primary-400");
|
|
21680
22240
|
else glowColor = tokens.getColor("primary-400");
|
|
21681
22241
|
return `
|
|
@@ -21757,9 +22317,9 @@ function generateShadowValue$1(elevation, softness, position = "bottom", color)
|
|
|
21757
22317
|
case "crisp": return `${xOffset}px ${yOffset}px ${baseOffset}px ${config.spread}px ${color ?? "rgb(0 0 0 / 0.4)"}`;
|
|
21758
22318
|
}
|
|
21759
22319
|
}
|
|
21760
|
-
var GRADIENT_DIRECTION_MAP$
|
|
22320
|
+
var GRADIENT_DIRECTION_MAP$2, BORDER_RADIUS_MAP, ELEVATION_OFFSET, BORDER_WIDTH_MAP$4, FONT_SIZE_MAP, DEFAULT_BUTTON_SIZES;
|
|
21761
22321
|
var init_constants$2 = __esmMin((() => {
|
|
21762
|
-
GRADIENT_DIRECTION_MAP$
|
|
22322
|
+
GRADIENT_DIRECTION_MAP$2 = {
|
|
21763
22323
|
"to-r": "to right",
|
|
21764
22324
|
"to-l": "to left",
|
|
21765
22325
|
"to-t": "to top",
|
|
@@ -22704,30 +23264,6 @@ function generateSingleEffectCSS(themeId, variantId, stateGroup, effectApp, elem
|
|
|
22704
23264
|
var init_generateEffectsCSS = __esmMin((() => {
|
|
22705
23265
|
init_registry$1();
|
|
22706
23266
|
}));
|
|
22707
|
-
/**
|
|
22708
|
-
* Get contrasting text color for a button background
|
|
22709
|
-
*
|
|
22710
|
-
* This function returns theme-aware text colors using the neutral scale,
|
|
22711
|
-
* which is guaranteed to exist in every theme and harmonizes with the design.
|
|
22712
|
-
*
|
|
22713
|
-
* Uses neutral-50 (lightest) for dark backgrounds and neutral-950 (darkest)
|
|
22714
|
-
* for light backgrounds. This ensures excellent contrast while respecting
|
|
22715
|
-
* the theme's neutral palette (warm/cool tinting).
|
|
22716
|
-
*
|
|
22717
|
-
* For solid backgrounds with primary/secondary/neutral colors:
|
|
22718
|
-
* - Dark backgrounds (shade >= 500): neutral-50 (very light)
|
|
22719
|
-
* - Light backgrounds (shade < 500): neutral-950 (very dark)
|
|
22720
|
-
*/
|
|
22721
|
-
function getContrastingTextColorToken(backgroundToken, theme) {
|
|
22722
|
-
const isLightTheme = theme.palette.meta.mode === "light";
|
|
22723
|
-
if (backgroundToken.startsWith("primary-") || backgroundToken.startsWith("secondary-")) return "neutral-50";
|
|
22724
|
-
if (backgroundToken.startsWith("neutral-")) {
|
|
22725
|
-
const match = backgroundToken.match(/neutral-(\d+)/);
|
|
22726
|
-
if (match?.[1]) return parseInt(match[1], 10) >= 500 ? "neutral-50" : "neutral-950";
|
|
22727
|
-
}
|
|
22728
|
-
return isLightTheme ? "neutral-50" : "neutral-950";
|
|
22729
|
-
}
|
|
22730
|
-
var init_contrast$1 = __esmMin((() => {}));
|
|
22731
23267
|
//#endregion
|
|
22732
23268
|
//#region ../theme-core/src/buttons/generateDefaultButtonSystem.ts
|
|
22733
23269
|
/**
|
|
@@ -22771,13 +23307,8 @@ function generateDefaultButtonSystem(theme) {
|
|
|
22771
23307
|
priority: 1,
|
|
22772
23308
|
background: {
|
|
22773
23309
|
type: "solid",
|
|
22774
|
-
colorToken: "primary"
|
|
22775
|
-
}
|
|
22776
|
-
textColorToken: getContrastingTextColorToken("primary", theme),
|
|
22777
|
-
effects: { hover: [{
|
|
22778
|
-
effectId: "opacity-reduce",
|
|
22779
|
-
options: { reduction: 15 }
|
|
22780
|
-
}] }
|
|
23310
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
23311
|
+
}
|
|
22781
23312
|
},
|
|
22782
23313
|
{
|
|
22783
23314
|
id: "secondary",
|
|
@@ -22786,51 +23317,39 @@ function generateDefaultButtonSystem(theme) {
|
|
|
22786
23317
|
priority: 2,
|
|
22787
23318
|
background: {
|
|
22788
23319
|
type: "solid",
|
|
22789
|
-
colorToken: "neutral-700"
|
|
22790
|
-
}
|
|
22791
|
-
textColorToken: getContrastingTextColorToken("neutral-700", theme),
|
|
22792
|
-
effects: { hover: [{
|
|
22793
|
-
effectId: "opacity-reduce",
|
|
22794
|
-
options: { reduction: 15 }
|
|
22795
|
-
}] }
|
|
23320
|
+
colorToken: unsafeAsOpaqueButtonColourToken("neutral-700")
|
|
23321
|
+
}
|
|
22796
23322
|
},
|
|
22797
23323
|
{
|
|
22798
23324
|
id: "outline",
|
|
22799
23325
|
name: "Outline",
|
|
22800
23326
|
enabled: true,
|
|
22801
23327
|
priority: 3,
|
|
22802
|
-
background: {
|
|
22803
|
-
|
|
23328
|
+
background: {
|
|
23329
|
+
type: "surface",
|
|
23330
|
+
role: "link"
|
|
23331
|
+
},
|
|
22804
23332
|
shadow: {
|
|
22805
23333
|
elevation: "none",
|
|
22806
23334
|
softness: null,
|
|
22807
23335
|
position: "bottom"
|
|
22808
23336
|
},
|
|
22809
|
-
border: {
|
|
22810
|
-
colorToken: "primary",
|
|
22811
|
-
widthClass: borderWidthClass
|
|
22812
|
-
},
|
|
22813
|
-
effects: { hover: [{
|
|
22814
|
-
effectId: "opacity-reduce",
|
|
22815
|
-
options: { reduction: 15 }
|
|
22816
|
-
}] }
|
|
23337
|
+
border: { widthClass: borderWidthClass }
|
|
22817
23338
|
},
|
|
22818
23339
|
{
|
|
22819
23340
|
id: "ghost",
|
|
22820
23341
|
name: "Ghost",
|
|
22821
23342
|
enabled: true,
|
|
22822
23343
|
priority: 3,
|
|
22823
|
-
background: {
|
|
22824
|
-
|
|
23344
|
+
background: {
|
|
23345
|
+
type: "surface",
|
|
23346
|
+
role: "link"
|
|
23347
|
+
},
|
|
22825
23348
|
shadow: {
|
|
22826
23349
|
elevation: "none",
|
|
22827
23350
|
softness: null,
|
|
22828
23351
|
position: "bottom"
|
|
22829
|
-
}
|
|
22830
|
-
effects: { hover: [{
|
|
22831
|
-
effectId: "opacity-reduce",
|
|
22832
|
-
options: { reduction: 15 }
|
|
22833
|
-
}] }
|
|
23352
|
+
}
|
|
22834
23353
|
}
|
|
22835
23354
|
];
|
|
22836
23355
|
return {
|
|
@@ -22847,7 +23366,7 @@ function generateDefaultButtonSystem(theme) {
|
|
|
22847
23366
|
}
|
|
22848
23367
|
var BORDER_WIDTH_TO_CLASS_MAP, VALID_CORNER_STYLES;
|
|
22849
23368
|
var init_generateDefaultButtonSystem = __esmMin((() => {
|
|
22850
|
-
|
|
23369
|
+
init_types$14();
|
|
22851
23370
|
BORDER_WIDTH_TO_CLASS_MAP = {
|
|
22852
23371
|
none: "border-0",
|
|
22853
23372
|
hairline: "border",
|
|
@@ -22883,8 +23402,490 @@ var init_affordanceIcons = __esmMin((() => {
|
|
|
22883
23402
|
};
|
|
22884
23403
|
}));
|
|
22885
23404
|
//#endregion
|
|
23405
|
+
//#region ../theme-core/src/surfaces/foregroundRoles.ts
|
|
23406
|
+
var SURFACE_FOREGROUND_ROLES;
|
|
23407
|
+
var init_foregroundRoles = __esmMin((() => {
|
|
23408
|
+
SURFACE_FOREGROUND_ROLES = [
|
|
23409
|
+
"text",
|
|
23410
|
+
"heading",
|
|
23411
|
+
"link",
|
|
23412
|
+
"supporting"
|
|
23413
|
+
];
|
|
23414
|
+
}));
|
|
23415
|
+
//#endregion
|
|
23416
|
+
//#region ../theme-core/src/surfaces/foregroundContract.ts
|
|
23417
|
+
function requireSurfaceColorValue(role, value) {
|
|
23418
|
+
const normalized = value.trim();
|
|
23419
|
+
if (normalized.length === 0) throw new RangeError(`Surface foreground ${role} must be a non-empty CSS color.`);
|
|
23420
|
+
return normalized;
|
|
23421
|
+
}
|
|
23422
|
+
function completeSurfaceForegrounds(input) {
|
|
23423
|
+
const text = requireSurfaceColorValue("text", input.text);
|
|
23424
|
+
return {
|
|
23425
|
+
text,
|
|
23426
|
+
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
23427
|
+
link: input.link === void 0 ? text : requireSurfaceColorValue("link", input.link),
|
|
23428
|
+
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
23429
|
+
};
|
|
23430
|
+
}
|
|
23431
|
+
function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FALLBACKS[role]) {
|
|
23432
|
+
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
23433
|
+
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
23434
|
+
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
23435
|
+
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
23436
|
+
}
|
|
23437
|
+
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
23438
|
+
if (!Number.isFinite(opacityPercent) || opacityPercent < 0 || opacityPercent > 100) throw new RangeError("Surface foreground opacity must be between 0 and 100.");
|
|
23439
|
+
return `color-mix(in srgb, ${surfaceForegroundValue(role)} ${opacityPercent}%, transparent)`;
|
|
23440
|
+
}
|
|
23441
|
+
function surfaceForegroundStyle(input) {
|
|
23442
|
+
const foregrounds = completeSurfaceForegrounds(input);
|
|
23443
|
+
return {
|
|
23444
|
+
color: foregrounds.text,
|
|
23445
|
+
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
23446
|
+
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
23447
|
+
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
23448
|
+
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting
|
|
23449
|
+
};
|
|
23450
|
+
}
|
|
23451
|
+
function surfaceForegroundDeclarations(input) {
|
|
23452
|
+
const foregrounds = completeSurfaceForegrounds(input);
|
|
23453
|
+
return [`color: ${foregrounds.text}`, ...SURFACE_FOREGROUND_ROLES.map((role) => `${SURFACE_FOREGROUND_CSS_VARS[role]}: ${foregrounds[role]}`)];
|
|
23454
|
+
}
|
|
23455
|
+
var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LINK_COLOR, DEFAULT_SURFACE_SUPPORTING_COLOR, DEFAULT_ROLE_FALLBACKS;
|
|
23456
|
+
var init_foregroundContract = __esmMin((() => {
|
|
23457
|
+
init_foregroundRoles();
|
|
23458
|
+
SURFACE_FOREGROUND_CSS_VARS = {
|
|
23459
|
+
text: "--rb-surface-text-color",
|
|
23460
|
+
heading: "--rb-surface-heading-color",
|
|
23461
|
+
link: "--rb-surface-link-color",
|
|
23462
|
+
supporting: "--rb-surface-supporting-color"
|
|
23463
|
+
};
|
|
23464
|
+
DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
23465
|
+
DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
23466
|
+
DEFAULT_SURFACE_SUPPORTING_COLOR = "rgb(var(--tb-mutedText, 100 116 139))";
|
|
23467
|
+
DEFAULT_ROLE_FALLBACKS = {
|
|
23468
|
+
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
23469
|
+
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
23470
|
+
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
23471
|
+
supporting: DEFAULT_SURFACE_SUPPORTING_COLOR
|
|
23472
|
+
};
|
|
23473
|
+
}));
|
|
23474
|
+
//#endregion
|
|
23475
|
+
//#region ../theme-core/src/buttons/resolveButtonColourStates.ts
|
|
23476
|
+
function compileButtonColourStates(input) {
|
|
23477
|
+
const baseTransition = applyColourEffects({
|
|
23478
|
+
variantId: input.variant.id,
|
|
23479
|
+
state: "base",
|
|
23480
|
+
treatment: input.variant.background,
|
|
23481
|
+
effects: input.variant.effects?.base,
|
|
23482
|
+
palette: input.palette
|
|
23483
|
+
});
|
|
23484
|
+
if (!baseTransition.ok) return baseTransition;
|
|
23485
|
+
const stateTreatments = {
|
|
23486
|
+
base: baseTransition.treatment,
|
|
23487
|
+
hover: hoverTreatment(input.variant, input.global, baseTransition.treatment),
|
|
23488
|
+
focus: baseTransition.treatment,
|
|
23489
|
+
active: baseTransition.treatment,
|
|
23490
|
+
disabled: baseTransition.treatment
|
|
23491
|
+
};
|
|
23492
|
+
const nonColourEffects = { ...baseTransition.nonColourEffects.length > 0 ? { base: [...baseTransition.nonColourEffects] } : {} };
|
|
23493
|
+
for (const state of [
|
|
23494
|
+
"hover",
|
|
23495
|
+
"focus",
|
|
23496
|
+
"active"
|
|
23497
|
+
]) {
|
|
23498
|
+
const transition = applyColourEffects({
|
|
23499
|
+
variantId: input.variant.id,
|
|
23500
|
+
state,
|
|
23501
|
+
treatment: stateTreatments[state],
|
|
23502
|
+
effects: input.variant.effects?.[state],
|
|
23503
|
+
palette: input.palette
|
|
23504
|
+
});
|
|
23505
|
+
if (!transition.ok) return transition;
|
|
23506
|
+
stateTreatments[state] = transition.treatment;
|
|
23507
|
+
if (transition.nonColourEffects.length > 0) nonColourEffects[state] = [...transition.nonColourEffects];
|
|
23508
|
+
}
|
|
23509
|
+
const resolved = {};
|
|
23510
|
+
for (const state of BUTTON_VISUAL_STATES) {
|
|
23511
|
+
const result = resolveTreatment$1({
|
|
23512
|
+
variantId: input.variant.id,
|
|
23513
|
+
state,
|
|
23514
|
+
treatment: stateTreatments[state],
|
|
23515
|
+
palette: input.palette
|
|
23516
|
+
});
|
|
23517
|
+
if (!result.ok) return result;
|
|
23518
|
+
resolved[state] = result.colour;
|
|
23519
|
+
}
|
|
23520
|
+
return {
|
|
23521
|
+
ok: true,
|
|
23522
|
+
states: resolved,
|
|
23523
|
+
focusIndicator: resolveFocusIndicator(resolved.focus),
|
|
23524
|
+
nonColourEffects
|
|
23525
|
+
};
|
|
23526
|
+
}
|
|
23527
|
+
function formatButtonColourContractError(error) {
|
|
23528
|
+
switch (error.tag) {
|
|
23529
|
+
case "unknown_palette_token": return `Button "${error.variantId}" ${error.state} state uses unknown palette token "${error.token}".`;
|
|
23530
|
+
case "missing_on_colour": return `Button "${error.variantId}" ${error.state} state cannot derive ${error.foregroundToken} from ${error.backgroundToken}.`;
|
|
23531
|
+
case "insufficient_contrast": return `Button "${error.variantId}" ${error.state} state has ${error.ratio.toFixed(2)}:1 contrast (${error.requiredRatio}:1 required).`;
|
|
23532
|
+
case "unsupported_colour_effect": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" is not contrast-safe (${error.reason}).`;
|
|
23533
|
+
case "invalid_colour_effect_options": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" has an invalid ${error.option} option.`;
|
|
23534
|
+
case "inapplicable_colour_effect": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" cannot apply to a ${error.treatment} treatment.`;
|
|
23535
|
+
case "unknown_button_effect": return `Button "${error.variantId}" ${error.state} uses unknown effect "${error.effectId}".`;
|
|
23536
|
+
}
|
|
23537
|
+
}
|
|
23538
|
+
function hoverTreatment(variant, global, fallback) {
|
|
23539
|
+
const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
|
|
23540
|
+
return token === void 0 ? fallback : {
|
|
23541
|
+
type: "solid",
|
|
23542
|
+
colorToken: token
|
|
23543
|
+
};
|
|
23544
|
+
}
|
|
23545
|
+
function applyColourEffects(input) {
|
|
23546
|
+
let treatment = input.treatment;
|
|
23547
|
+
const nonColourEffects = [];
|
|
23548
|
+
for (const effect of input.effects ?? []) {
|
|
23549
|
+
const policy = getButtonEffectPolicy(effect.effectId);
|
|
23550
|
+
if (policy === null) return unknownEffect(input, effect);
|
|
23551
|
+
switch (policy.classification) {
|
|
23552
|
+
case "non-colour":
|
|
23553
|
+
nonColourEffects.push(effect);
|
|
23554
|
+
break;
|
|
23555
|
+
case "unsupported-colour":
|
|
23556
|
+
case "unsupported-background-overlay":
|
|
23557
|
+
case "not-button": return unsupportedEffect(input, effect, policy.reason);
|
|
23558
|
+
case "colour-transition":
|
|
23559
|
+
if (policy.transition.kind === "adjust-shade") {
|
|
23560
|
+
if (treatment.type !== "solid") return inapplicableEffect(input, effect, treatment);
|
|
23561
|
+
const amount = readShadeAmount(effect);
|
|
23562
|
+
if (amount === null) return invalidEffectOption(input, effect, "amount");
|
|
23563
|
+
const signedAmount = policy.transition.direction === "darker" ? amount : -amount;
|
|
23564
|
+
treatment = {
|
|
23565
|
+
type: "solid",
|
|
23566
|
+
colorToken: adjustShade(treatment.colorToken, signedAmount, input.palette)
|
|
23567
|
+
};
|
|
23568
|
+
break;
|
|
23569
|
+
}
|
|
23570
|
+
if (policy.transition.kind === "replace-background") {
|
|
23571
|
+
const colorToken = readOpaqueToken(effect, "colorToken", "neutral-800");
|
|
23572
|
+
if (colorToken === null) return invalidEffectOption(input, effect, "colorToken");
|
|
23573
|
+
treatment = {
|
|
23574
|
+
type: "solid",
|
|
23575
|
+
colorToken
|
|
23576
|
+
};
|
|
23577
|
+
break;
|
|
23578
|
+
}
|
|
23579
|
+
return unknownEffect(input, effect);
|
|
23580
|
+
}
|
|
23581
|
+
}
|
|
23582
|
+
return {
|
|
23583
|
+
ok: true,
|
|
23584
|
+
treatment,
|
|
23585
|
+
nonColourEffects
|
|
23586
|
+
};
|
|
23587
|
+
}
|
|
23588
|
+
function resolveTreatment$1(input) {
|
|
23589
|
+
const treatment = input.treatment;
|
|
23590
|
+
switch (treatment.type) {
|
|
23591
|
+
case "surface": return {
|
|
23592
|
+
ok: true,
|
|
23593
|
+
colour: {
|
|
23594
|
+
kind: "surface",
|
|
23595
|
+
role: treatment.role,
|
|
23596
|
+
backgroundCss: "transparent",
|
|
23597
|
+
foregroundCss: surfaceForegroundValue(treatment.role)
|
|
23598
|
+
}
|
|
23599
|
+
};
|
|
23600
|
+
case "solid": return resolveSolid(input, treatment.colorToken);
|
|
23601
|
+
case "gradient": return resolveGradient$2(input, treatment);
|
|
23602
|
+
}
|
|
23603
|
+
}
|
|
23604
|
+
function resolveFocusIndicator(colour) {
|
|
23605
|
+
switch (colour.kind) {
|
|
23606
|
+
case "solid": return {
|
|
23607
|
+
kind: "two-tone",
|
|
23608
|
+
innerCss: colour.foregroundCss,
|
|
23609
|
+
outerCss: colour.backgroundCss,
|
|
23610
|
+
minimumPairContrast: BUTTON_CONTRAST_POLICY.textMinimumRatio
|
|
23611
|
+
};
|
|
23612
|
+
case "gradient": return {
|
|
23613
|
+
kind: "two-tone",
|
|
23614
|
+
innerCss: colour.foregroundCss,
|
|
23615
|
+
outerCss: tokenCss(colour.backgroundTokens[0]),
|
|
23616
|
+
minimumPairContrast: BUTTON_CONTRAST_POLICY.textMinimumRatio
|
|
23617
|
+
};
|
|
23618
|
+
case "surface": return {
|
|
23619
|
+
kind: "surface-role",
|
|
23620
|
+
colorCss: colour.foregroundCss,
|
|
23621
|
+
minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
|
|
23622
|
+
};
|
|
23623
|
+
}
|
|
23624
|
+
}
|
|
23625
|
+
function resolveSolid(input, backgroundToken) {
|
|
23626
|
+
const backgroundHex = paletteHex(input, backgroundToken);
|
|
23627
|
+
if (!backgroundHex.ok) return backgroundHex;
|
|
23628
|
+
const foregroundToken = unsafeAsOpaqueButtonColourToken(onColorTokenName(backgroundToken));
|
|
23629
|
+
const foregroundHex = input.palette[foregroundToken];
|
|
23630
|
+
if (typeof foregroundHex !== "string") return {
|
|
23631
|
+
ok: false,
|
|
23632
|
+
error: {
|
|
23633
|
+
tag: "missing_on_colour",
|
|
23634
|
+
variantId: input.variantId,
|
|
23635
|
+
state: input.state,
|
|
23636
|
+
backgroundToken,
|
|
23637
|
+
foregroundToken
|
|
23638
|
+
}
|
|
23639
|
+
};
|
|
23640
|
+
const contrast = validateContrast({
|
|
23641
|
+
...input,
|
|
23642
|
+
background: backgroundToken,
|
|
23643
|
+
backgroundHex: backgroundHex.hex,
|
|
23644
|
+
foreground: foregroundToken,
|
|
23645
|
+
foregroundHex
|
|
23646
|
+
});
|
|
23647
|
+
if (!contrast.ok) return contrast;
|
|
23648
|
+
return {
|
|
23649
|
+
ok: true,
|
|
23650
|
+
colour: {
|
|
23651
|
+
kind: "solid",
|
|
23652
|
+
backgroundToken,
|
|
23653
|
+
foregroundToken,
|
|
23654
|
+
backgroundCss: tokenCss(backgroundToken),
|
|
23655
|
+
foregroundCss: tokenCss(foregroundToken)
|
|
23656
|
+
}
|
|
23657
|
+
};
|
|
23658
|
+
}
|
|
23659
|
+
function resolveGradient$2(input, treatment) {
|
|
23660
|
+
const foregroundHex = paletteHex(input, treatment.foregroundToken);
|
|
23661
|
+
if (!foregroundHex.ok) return foregroundHex;
|
|
23662
|
+
const stopHexes = [];
|
|
23663
|
+
for (const token of treatment.stops) {
|
|
23664
|
+
const stop = paletteHex(input, token);
|
|
23665
|
+
if (!stop.ok) return stop;
|
|
23666
|
+
stopHexes.push(stop.hex);
|
|
23667
|
+
}
|
|
23668
|
+
for (let segment = 0; segment < stopHexes.length - 1; segment += 1) {
|
|
23669
|
+
const start = stopHexes[segment];
|
|
23670
|
+
const end = stopHexes[segment + 1];
|
|
23671
|
+
const startToken = treatment.stops[segment];
|
|
23672
|
+
const endToken = treatment.stops[segment + 1];
|
|
23673
|
+
if (start === void 0 || end === void 0 || startToken === void 0 || endToken === void 0) continue;
|
|
23674
|
+
for (let sample = 0; sample <= BUTTON_CONTRAST_POLICY.gradientSamplesPerSegment; sample += 1) {
|
|
23675
|
+
const position = sample / BUTTON_CONTRAST_POLICY.gradientSamplesPerSegment;
|
|
23676
|
+
const sampleHex = interpolateHex(start, end, position);
|
|
23677
|
+
const contrast = validateContrast({
|
|
23678
|
+
...input,
|
|
23679
|
+
background: `${startToken}→${endToken}@${position.toFixed(2)}`,
|
|
23680
|
+
backgroundHex: sampleHex,
|
|
23681
|
+
foreground: treatment.foregroundToken,
|
|
23682
|
+
foregroundHex: foregroundHex.hex
|
|
23683
|
+
});
|
|
23684
|
+
if (!contrast.ok) return contrast;
|
|
23685
|
+
}
|
|
23686
|
+
}
|
|
23687
|
+
const direction = GRADIENT_DIRECTION_MAP$2[treatment.direction] ?? "to right";
|
|
23688
|
+
return {
|
|
23689
|
+
ok: true,
|
|
23690
|
+
colour: {
|
|
23691
|
+
kind: "gradient",
|
|
23692
|
+
backgroundTokens: treatment.stops,
|
|
23693
|
+
foregroundToken: treatment.foregroundToken,
|
|
23694
|
+
backgroundCss: `linear-gradient(${direction}, ${treatment.stops.map(tokenCss).join(", ")})`,
|
|
23695
|
+
foregroundCss: tokenCss(treatment.foregroundToken)
|
|
23696
|
+
}
|
|
23697
|
+
};
|
|
23698
|
+
}
|
|
23699
|
+
function paletteHex(input, token) {
|
|
23700
|
+
const hex = input.palette[token];
|
|
23701
|
+
return typeof hex === "string" ? {
|
|
23702
|
+
ok: true,
|
|
23703
|
+
hex
|
|
23704
|
+
} : {
|
|
23705
|
+
ok: false,
|
|
23706
|
+
error: {
|
|
23707
|
+
tag: "unknown_palette_token",
|
|
23708
|
+
variantId: input.variantId,
|
|
23709
|
+
state: input.state,
|
|
23710
|
+
token
|
|
23711
|
+
}
|
|
23712
|
+
};
|
|
23713
|
+
}
|
|
23714
|
+
function validateContrast(input) {
|
|
23715
|
+
const ratio = contrastRatio(input.backgroundHex, input.foregroundHex);
|
|
23716
|
+
return ratio >= BUTTON_CONTRAST_POLICY.textMinimumRatio ? { ok: true } : {
|
|
23717
|
+
ok: false,
|
|
23718
|
+
error: {
|
|
23719
|
+
tag: "insufficient_contrast",
|
|
23720
|
+
variantId: input.variantId,
|
|
23721
|
+
state: input.state,
|
|
23722
|
+
background: input.background,
|
|
23723
|
+
foreground: input.foreground,
|
|
23724
|
+
ratio,
|
|
23725
|
+
requiredRatio: BUTTON_CONTRAST_POLICY.textMinimumRatio
|
|
23726
|
+
}
|
|
23727
|
+
};
|
|
23728
|
+
}
|
|
23729
|
+
function tokenCss(token) {
|
|
23730
|
+
return `rgb(var(--tb-${token}))`;
|
|
23731
|
+
}
|
|
23732
|
+
function adjustShade(token, amount, palette) {
|
|
23733
|
+
const match = token.match(/^(.*)-(\d{2,3})$/);
|
|
23734
|
+
const base = match?.[1] ?? token;
|
|
23735
|
+
const currentShade = match?.[2] === void 0 ? 500 : Number(match[2]);
|
|
23736
|
+
const availableShades = [
|
|
23737
|
+
50,
|
|
23738
|
+
100,
|
|
23739
|
+
200,
|
|
23740
|
+
300,
|
|
23741
|
+
400,
|
|
23742
|
+
500,
|
|
23743
|
+
600,
|
|
23744
|
+
700,
|
|
23745
|
+
800,
|
|
23746
|
+
900,
|
|
23747
|
+
950
|
|
23748
|
+
].filter((shade) => typeof palette[`${base}-${shade}`] === "string");
|
|
23749
|
+
if (availableShades.length === 0) return token;
|
|
23750
|
+
const firstShade = availableShades[0];
|
|
23751
|
+
if (firstShade === void 0) return token;
|
|
23752
|
+
const exactIndex = availableShades.indexOf(currentShade);
|
|
23753
|
+
const startingIndex = exactIndex >= 0 ? exactIndex : availableShades.indexOf(availableShades.reduce((closestShade, shade) => Math.abs(shade - currentShade) < Math.abs(closestShade - currentShade) ? shade : closestShade, firstShade));
|
|
23754
|
+
const stepCount = Math.abs(amount) / 100;
|
|
23755
|
+
const direction = amount < 0 ? -1 : 1;
|
|
23756
|
+
const targetShade = availableShades[Math.max(0, Math.min(availableShades.length - 1, startingIndex + direction * stepCount))];
|
|
23757
|
+
return targetShade === void 0 ? token : unsafeAsOpaqueButtonColourToken(`${base}-${targetShade}`);
|
|
23758
|
+
}
|
|
23759
|
+
function readShadeAmount(effect) {
|
|
23760
|
+
const value = effect.options?.amount ?? 100;
|
|
23761
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 && value % 100 === 0 ? value : null;
|
|
23762
|
+
}
|
|
23763
|
+
function readOpaqueToken(effect, key, fallback) {
|
|
23764
|
+
return parseOpaqueButtonColourToken(effect.options?.[key] ?? fallback);
|
|
23765
|
+
}
|
|
23766
|
+
function unsupportedEffect(input, effect, reason) {
|
|
23767
|
+
return {
|
|
23768
|
+
ok: false,
|
|
23769
|
+
error: {
|
|
23770
|
+
tag: "unsupported_colour_effect",
|
|
23771
|
+
variantId: input.variantId,
|
|
23772
|
+
state: input.state,
|
|
23773
|
+
effectId: effect.effectId,
|
|
23774
|
+
reason
|
|
23775
|
+
}
|
|
23776
|
+
};
|
|
23777
|
+
}
|
|
23778
|
+
function invalidEffectOption(input, effect, option) {
|
|
23779
|
+
return {
|
|
23780
|
+
ok: false,
|
|
23781
|
+
error: {
|
|
23782
|
+
tag: "invalid_colour_effect_options",
|
|
23783
|
+
variantId: input.variantId,
|
|
23784
|
+
state: input.state,
|
|
23785
|
+
effectId: effect.effectId,
|
|
23786
|
+
option
|
|
23787
|
+
}
|
|
23788
|
+
};
|
|
23789
|
+
}
|
|
23790
|
+
function inapplicableEffect(input, effect, treatment) {
|
|
23791
|
+
return {
|
|
23792
|
+
ok: false,
|
|
23793
|
+
error: {
|
|
23794
|
+
tag: "inapplicable_colour_effect",
|
|
23795
|
+
variantId: input.variantId,
|
|
23796
|
+
state: input.state,
|
|
23797
|
+
effectId: effect.effectId,
|
|
23798
|
+
treatment: treatment.type
|
|
23799
|
+
}
|
|
23800
|
+
};
|
|
23801
|
+
}
|
|
23802
|
+
function unknownEffect(input, effect) {
|
|
23803
|
+
return {
|
|
23804
|
+
ok: false,
|
|
23805
|
+
error: {
|
|
23806
|
+
tag: "unknown_button_effect",
|
|
23807
|
+
variantId: input.variantId,
|
|
23808
|
+
state: input.state,
|
|
23809
|
+
effectId: effect.effectId
|
|
23810
|
+
}
|
|
23811
|
+
};
|
|
23812
|
+
}
|
|
23813
|
+
function interpolateHex(startHex, endHex, position) {
|
|
23814
|
+
const start = hexToRgb$1(startHex);
|
|
23815
|
+
const end = hexToRgb$1(endHex);
|
|
23816
|
+
const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
|
|
23817
|
+
return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
|
|
23818
|
+
}
|
|
23819
|
+
var BUTTON_VISUAL_STATES, BUTTON_CONTRAST_POLICY;
|
|
23820
|
+
var init_resolveButtonColourStates = __esmMin((() => {
|
|
23821
|
+
init_contrast$1();
|
|
23822
|
+
init_colorConversion();
|
|
23823
|
+
init_onColor();
|
|
23824
|
+
init_foregroundContract();
|
|
23825
|
+
init_types$14();
|
|
23826
|
+
init_constants$2();
|
|
23827
|
+
init_effectClassification();
|
|
23828
|
+
BUTTON_VISUAL_STATES = [
|
|
23829
|
+
"base",
|
|
23830
|
+
"hover",
|
|
23831
|
+
"focus",
|
|
23832
|
+
"active",
|
|
23833
|
+
"disabled"
|
|
23834
|
+
];
|
|
23835
|
+
BUTTON_CONTRAST_POLICY = {
|
|
23836
|
+
textMinimumRatio: 4.5,
|
|
23837
|
+
nonTextMinimumRatio: 3,
|
|
23838
|
+
gradientSamplesPerSegment: 20,
|
|
23839
|
+
alphaBackgrounds: "reject-without-known-surface",
|
|
23840
|
+
disabled: "retain-full-colour-contract"
|
|
23841
|
+
};
|
|
23842
|
+
}));
|
|
23843
|
+
//#endregion
|
|
23844
|
+
//#region ../theme-core/src/buttons/resolvedButtonCss.ts
|
|
23845
|
+
/**
|
|
23846
|
+
* Canonical colour declaration mapping shared by full themes and ThemeBridge.
|
|
23847
|
+
* Both background properties are always emitted so transitions cannot retain
|
|
23848
|
+
* a stale gradient or solid layer.
|
|
23849
|
+
*/
|
|
23850
|
+
function resolvedButtonColourDeclarations(colour) {
|
|
23851
|
+
switch (colour.kind) {
|
|
23852
|
+
case "solid": return [
|
|
23853
|
+
["background-color", colour.backgroundCss],
|
|
23854
|
+
["background-image", "none"],
|
|
23855
|
+
["color", colour.foregroundCss]
|
|
23856
|
+
];
|
|
23857
|
+
case "gradient": return [
|
|
23858
|
+
["background-color", "transparent"],
|
|
23859
|
+
["background-image", colour.backgroundCss],
|
|
23860
|
+
["color", colour.foregroundCss]
|
|
23861
|
+
];
|
|
23862
|
+
case "surface": return [
|
|
23863
|
+
["background-color", colour.backgroundCss],
|
|
23864
|
+
["background-image", "none"],
|
|
23865
|
+
["color", colour.foregroundCss]
|
|
23866
|
+
];
|
|
23867
|
+
}
|
|
23868
|
+
}
|
|
23869
|
+
function resolvedButtonFocusDeclarations(indicator) {
|
|
23870
|
+
return indicator.kind === "two-tone" ? [
|
|
23871
|
+
["outline", `2px solid ${indicator.innerCss}`],
|
|
23872
|
+
["outline-offset", "2px"],
|
|
23873
|
+
["box-shadow", `0 0 0 4px ${indicator.outerCss}`]
|
|
23874
|
+
] : [["outline", `3px solid ${indicator.colorCss}`], ["outline-offset", "3px"]];
|
|
23875
|
+
}
|
|
23876
|
+
var RESOLVED_BUTTON_DISABLED_DECLARATIONS;
|
|
23877
|
+
var init_resolvedButtonCss = __esmMin((() => {
|
|
23878
|
+
RESOLVED_BUTTON_DISABLED_DECLARATIONS = [
|
|
23879
|
+
["cursor", "not-allowed"],
|
|
23880
|
+
["transform", "none"],
|
|
23881
|
+
["box-shadow", "none"],
|
|
23882
|
+
["outline", "2px dashed currentColor"],
|
|
23883
|
+
["outline-offset", "-4px"]
|
|
23884
|
+
];
|
|
23885
|
+
}));
|
|
23886
|
+
//#endregion
|
|
22886
23887
|
//#region ../theme-core/src/buttons/generateButtonCss.ts
|
|
22887
|
-
function rule(selector, declarations) {
|
|
23888
|
+
function rule$1(selector, declarations) {
|
|
22888
23889
|
return {
|
|
22889
23890
|
selectors: typeof selector === "string" ? [selector] : selector,
|
|
22890
23891
|
declarations
|
|
@@ -22925,6 +23926,7 @@ function shadowSizeToShadow(size, theme) {
|
|
|
22925
23926
|
function generateButtonCss(options) {
|
|
22926
23927
|
const { themeId, theme, buttonSystem: providedButtonSystem } = options;
|
|
22927
23928
|
const tokens = new TokenResolver(theme);
|
|
23929
|
+
const palette = expandPalette(theme.palette);
|
|
22928
23930
|
const buttonSystem = providedButtonSystem ?? generateDefaultButtonSystem(theme);
|
|
22929
23931
|
const themeSizes = {
|
|
22930
23932
|
...DEFAULT_BUTTON_SIZES,
|
|
@@ -22933,34 +23935,109 @@ function generateButtonCss(options) {
|
|
|
22933
23935
|
const enabledVariants = buttonSystem.variants.filter((v) => v.enabled);
|
|
22934
23936
|
const aliasSource = resolveAliasSource(enabledVariants);
|
|
22935
23937
|
const chunks = [];
|
|
22936
|
-
for (const variant of enabledVariants)
|
|
23938
|
+
for (const variant of enabledVariants) {
|
|
23939
|
+
const compiled = compileRuntimeVariant(variant, buttonSystem.global, palette);
|
|
23940
|
+
if (compiled.fallbackError) chunks.push({ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` });
|
|
23941
|
+
chunks.push(...variantChunks(compiled.variant, compiled.global, themeSizes, themeId, tokens, theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects));
|
|
23942
|
+
}
|
|
22937
23943
|
if (aliasSource) {
|
|
22938
|
-
const
|
|
23944
|
+
const compiled = compileRuntimeVariant({
|
|
22939
23945
|
...aliasSource,
|
|
22940
23946
|
id: DEFAULT_VARIANT_ALIAS_ID,
|
|
22941
23947
|
name: "Default"
|
|
22942
|
-
};
|
|
22943
|
-
chunks.push(
|
|
23948
|
+
}, buttonSystem.global, palette);
|
|
23949
|
+
if (compiled.fallbackError) chunks.push({ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` });
|
|
23950
|
+
chunks.push(...variantChunks(compiled.variant, compiled.global, themeSizes, themeId, tokens, theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects));
|
|
22944
23951
|
}
|
|
22945
23952
|
return chunks.map(renderChunk).join("\n\n");
|
|
22946
23953
|
}
|
|
23954
|
+
function compileRuntimeVariant(variant, global, palette) {
|
|
23955
|
+
const result = compileButtonColourStates({
|
|
23956
|
+
variant,
|
|
23957
|
+
global,
|
|
23958
|
+
palette
|
|
23959
|
+
});
|
|
23960
|
+
if (result.ok) return {
|
|
23961
|
+
variant,
|
|
23962
|
+
global,
|
|
23963
|
+
colours: result.states,
|
|
23964
|
+
focusIndicator: result.focusIndicator,
|
|
23965
|
+
nonColourEffects: result.nonColourEffects
|
|
23966
|
+
};
|
|
23967
|
+
const fallbackVariant = {
|
|
23968
|
+
...variant,
|
|
23969
|
+
background: {
|
|
23970
|
+
type: "surface",
|
|
23971
|
+
role: "link"
|
|
23972
|
+
},
|
|
23973
|
+
hoverBackgroundToken: void 0,
|
|
23974
|
+
effects: void 0
|
|
23975
|
+
};
|
|
23976
|
+
const fallbackGlobal = {
|
|
23977
|
+
...global,
|
|
23978
|
+
hoverColor: "none",
|
|
23979
|
+
hoverColorToken: void 0
|
|
23980
|
+
};
|
|
23981
|
+
const fallback = compileButtonColourStates({
|
|
23982
|
+
variant: fallbackVariant,
|
|
23983
|
+
global: fallbackGlobal,
|
|
23984
|
+
palette
|
|
23985
|
+
});
|
|
23986
|
+
if (!fallback.ok) {
|
|
23987
|
+
const colour = {
|
|
23988
|
+
kind: "surface",
|
|
23989
|
+
role: "link",
|
|
23990
|
+
backgroundCss: "transparent",
|
|
23991
|
+
foregroundCss: surfaceForegroundValue("link")
|
|
23992
|
+
};
|
|
23993
|
+
return {
|
|
23994
|
+
variant: fallbackVariant,
|
|
23995
|
+
global: fallbackGlobal,
|
|
23996
|
+
colours: {
|
|
23997
|
+
base: colour,
|
|
23998
|
+
hover: colour,
|
|
23999
|
+
focus: colour,
|
|
24000
|
+
active: colour,
|
|
24001
|
+
disabled: colour
|
|
24002
|
+
},
|
|
24003
|
+
focusIndicator: {
|
|
24004
|
+
kind: "surface-role",
|
|
24005
|
+
colorCss: colour.foregroundCss,
|
|
24006
|
+
minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
|
|
24007
|
+
},
|
|
24008
|
+
nonColourEffects: {},
|
|
24009
|
+
fallbackError: result.error
|
|
24010
|
+
};
|
|
24011
|
+
}
|
|
24012
|
+
return {
|
|
24013
|
+
variant: fallbackVariant,
|
|
24014
|
+
global: fallbackGlobal,
|
|
24015
|
+
colours: fallback.states,
|
|
24016
|
+
focusIndicator: fallback.focusIndicator,
|
|
24017
|
+
nonColourEffects: fallback.nonColourEffects,
|
|
24018
|
+
fallbackError: result.error
|
|
24019
|
+
};
|
|
24020
|
+
}
|
|
22947
24021
|
/** Pick the highest-priority variant whose role we'll alias to `.default`. */
|
|
22948
24022
|
function resolveAliasSource(enabled) {
|
|
22949
24023
|
if (enabled.some((v) => v.id === DEFAULT_VARIANT_ALIAS_ID)) return null;
|
|
22950
24024
|
return enabled.slice().sort((a, b) => a.priority - b.priority)[0] ?? null;
|
|
22951
24025
|
}
|
|
22952
|
-
function variantChunks(variant, global, themeSizes, themeId, tokens, theme) {
|
|
24026
|
+
function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colours, focusIndicator, nonColourEffects) {
|
|
22953
24027
|
const out = [];
|
|
22954
24028
|
const variantId = parseButtonVariantIdForCss(variant.id);
|
|
22955
24029
|
const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
|
|
22956
|
-
out.push(variantBaseRule(variant, selector, global, tokens, theme));
|
|
24030
|
+
out.push(variantBaseRule(variant, selector, global, tokens, theme, colours.base));
|
|
22957
24031
|
out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
24032
|
+
for (const state of [
|
|
24033
|
+
"hover",
|
|
24034
|
+
"focus",
|
|
24035
|
+
"active"
|
|
24036
|
+
]) if (!resolvedColoursEqual(colours.base, colours[state])) out.push(variantStateColourRule(variantId, themeId, state, colours[state]));
|
|
24037
|
+
const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
|
|
22962
24038
|
if (effects) out.push({ raw: effects });
|
|
22963
|
-
|
|
24039
|
+
out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator));
|
|
24040
|
+
const affordance = variantAffordanceRule(variant, selector);
|
|
22964
24041
|
if (affordance) out.push(affordance);
|
|
22965
24042
|
out.push(...variantDisabledRules(variantId, themeId));
|
|
22966
24043
|
out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
|
|
@@ -22975,21 +24052,20 @@ function variantChunks(variant, global, themeSizes, themeId, tokens, theme) {
|
|
|
22975
24052
|
* one (node overrides personality). Colour comes from the affordance token, or
|
|
22976
24053
|
* `currentColor` (the button text colour) when no token is given.
|
|
22977
24054
|
*/
|
|
22978
|
-
function variantAffordanceRule(variant, selector
|
|
24055
|
+
function variantAffordanceRule(variant, selector) {
|
|
22979
24056
|
const affordance = variant.affordance;
|
|
22980
24057
|
if (!affordance) return null;
|
|
22981
24058
|
const maskUrl = affordanceIconMaskUrl(affordance.iconId);
|
|
22982
24059
|
if (!maskUrl) return null;
|
|
22983
|
-
const color = affordance.colorToken ? variant.background.type === "transparent" ? surfaceLinkColor(tokens.getColor(affordance.colorToken)) : tokens.getColor(affordance.colorToken) : "currentColor";
|
|
22984
24060
|
const mask = `url("${maskUrl}") no-repeat center / contain`;
|
|
22985
|
-
return rule(`${selector}:not(.${AFFORDANCE_SUPPRESS_CLASS})::after`, [
|
|
24061
|
+
return rule$1(`${selector}:not(.${AFFORDANCE_SUPPRESS_CLASS})::after`, [
|
|
22986
24062
|
["content", "\"\""],
|
|
22987
24063
|
["display", "inline-block"],
|
|
22988
24064
|
["width", "1em"],
|
|
22989
24065
|
["height", "1em"],
|
|
22990
24066
|
["margin-inline-start", "0.5em"],
|
|
22991
24067
|
["flex", "0 0 auto"],
|
|
22992
|
-
["background-color",
|
|
24068
|
+
["background-color", "currentColor"],
|
|
22993
24069
|
["-webkit-mask", mask],
|
|
22994
24070
|
["mask", mask]
|
|
22995
24071
|
]);
|
|
@@ -22999,7 +24075,7 @@ function parseButtonVariantIdForCss(value) {
|
|
|
22999
24075
|
if (!variantId) throw new Error("Button variant id must be a non-empty string");
|
|
23000
24076
|
return variantId;
|
|
23001
24077
|
}
|
|
23002
|
-
function variantBaseRule(variant, selector, global, tokens, theme) {
|
|
24078
|
+
function variantBaseRule(variant, selector, global, tokens, theme, colour) {
|
|
23003
24079
|
const decls = [];
|
|
23004
24080
|
decls.push(["font-weight", String(global.fontWeight)]);
|
|
23005
24081
|
decls.push(["font-family", resolveFontFamily(global)]);
|
|
@@ -23011,20 +24087,12 @@ function variantBaseRule(variant, selector, global, tokens, theme) {
|
|
|
23011
24087
|
for (const decl of STRUCTURAL_DECLARATIONS) decls.push(decl);
|
|
23012
24088
|
decls.push(["border-radius", resolveBorderRadius(variant, global)]);
|
|
23013
24089
|
decls.push(["box-shadow", resolveBoxShadow(variant, global, theme, tokens)]);
|
|
23014
|
-
|
|
23015
|
-
else if (variant.background.type === "gradient") {
|
|
23016
|
-
const colors = variant.background.stops.map((stop) => tokens.getColor(stop)).join(", ");
|
|
23017
|
-
const direction = GRADIENT_DIRECTION_MAP$3[variant.background.direction] || "to right";
|
|
23018
|
-
decls.push(["background-image", `linear-gradient(${direction}, ${colors})`]);
|
|
23019
|
-
} else decls.push(["background-color", "transparent"]);
|
|
23020
|
-
const foregroundColor = variant.background.type === "transparent" ? surfaceLinkColor(tokens.getColor(variant.textColorToken)) : tokens.getColor(variant.textColorToken);
|
|
23021
|
-
decls.push(["color", foregroundColor]);
|
|
24090
|
+
decls.push(...resolvedButtonColourDeclarations(colour));
|
|
23022
24091
|
if (variant.border) {
|
|
23023
24092
|
const borderWidth = BORDER_WIDTH_MAP$4[variant.border.widthClass] || "1px";
|
|
23024
|
-
|
|
23025
|
-
decls.push(["border", `${borderWidth} solid ${borderColor}`]);
|
|
24093
|
+
decls.push(["border", `${borderWidth} solid currentColor`]);
|
|
23026
24094
|
}
|
|
23027
|
-
return rule(selector, decls);
|
|
24095
|
+
return rule$1(selector, decls);
|
|
23028
24096
|
}
|
|
23029
24097
|
/**
|
|
23030
24098
|
* Resolve a colour for a button that does not own its own background.
|
|
@@ -23033,30 +24101,22 @@ function variantBaseRule(variant, selector, global, tokens, theme) {
|
|
|
23033
24101
|
* token fallback keeps buttons usable in contexts that do not provide that
|
|
23034
24102
|
* contract (and preserves the existing theme behaviour there).
|
|
23035
24103
|
*/
|
|
23036
|
-
function
|
|
23037
|
-
return
|
|
23038
|
-
}
|
|
23039
|
-
function variantHoverBackgroundRule(variant, variantId, global, themeId, tokens) {
|
|
23040
|
-
let hoverToken = variant.hoverBackgroundToken;
|
|
23041
|
-
if (!hoverToken && global.hoverColor === "token" && global.hoverColorToken) hoverToken = global.hoverColorToken;
|
|
23042
|
-
if (!hoverToken) return null;
|
|
23043
|
-
return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:hover`, [["background-color", tokens.getColor(hoverToken)]]);
|
|
24104
|
+
function variantStateColourRule(variantId, themeId, state, colour) {
|
|
24105
|
+
return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:${state}`, resolvedButtonColourDeclarations(colour));
|
|
23044
24106
|
}
|
|
23045
|
-
function variantFocusVisibleRule(variantId, themeId) {
|
|
23046
|
-
return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`,
|
|
24107
|
+
function variantFocusVisibleRule(variantId, themeId, focusIndicator) {
|
|
24108
|
+
return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator));
|
|
23047
24109
|
}
|
|
23048
|
-
function variantEffectsCss(variant, themeId, tokens, theme) {
|
|
23049
|
-
if (!
|
|
24110
|
+
function variantEffectsCss(variant, effects, themeId, tokens, theme) {
|
|
24111
|
+
if (!effects) return "";
|
|
23050
24112
|
const elementConfig = {
|
|
23051
|
-
background: variant.background,
|
|
23052
|
-
textColorToken: variant.textColorToken,
|
|
23053
|
-
border: variant.border ? { colorToken: variant.border.colorToken } : void 0,
|
|
24113
|
+
background: variant.background.type === "surface" ? { type: "transparent" } : variant.background,
|
|
23054
24114
|
shadow: variant.shadow
|
|
23055
24115
|
};
|
|
23056
24116
|
return generateEffectsCSS({
|
|
23057
24117
|
themeId,
|
|
23058
24118
|
variantId: variant.id,
|
|
23059
|
-
effects
|
|
24119
|
+
effects,
|
|
23060
24120
|
elementConfig,
|
|
23061
24121
|
tokens,
|
|
23062
24122
|
theme
|
|
@@ -23071,18 +24131,15 @@ function variantDisabledRules(variantId, themeId) {
|
|
|
23071
24131
|
`${base}:focus`
|
|
23072
24132
|
];
|
|
23073
24133
|
const pseudoSelectors = [`${base}::before`, `${base}::after`];
|
|
23074
|
-
return [rule(disabledSelectors, [
|
|
23075
|
-
["opacity", "0.5"],
|
|
23076
|
-
["cursor", "not-allowed"],
|
|
23077
|
-
["pointer-events", "none"],
|
|
23078
|
-
["transform", "none"],
|
|
23079
|
-
["box-shadow", "none"]
|
|
23080
|
-
]), rule(pseudoSelectors, [
|
|
24134
|
+
return [rule$1(disabledSelectors, [...RESOLVED_BUTTON_DISABLED_DECLARATIONS]), rule$1(pseudoSelectors, [
|
|
23081
24135
|
["opacity", "0"],
|
|
23082
24136
|
["animation", "none"],
|
|
23083
24137
|
["pointer-events", "none"]
|
|
23084
24138
|
])];
|
|
23085
24139
|
}
|
|
24140
|
+
function resolvedColoursEqual(left, right) {
|
|
24141
|
+
return JSON.stringify(left) === JSON.stringify(right);
|
|
24142
|
+
}
|
|
23086
24143
|
function variantSizeRules(variant, variantId, themeSizes, themeId) {
|
|
23087
24144
|
const borderWidth = variant.border ? BORDER_WIDTH_MAP$4[variant.border.widthClass] || "1px" : "0px";
|
|
23088
24145
|
const rules = [];
|
|
@@ -23092,7 +24149,7 @@ function variantSizeRules(variant, variantId, themeSizes, themeId) {
|
|
|
23092
24149
|
const decls = [];
|
|
23093
24150
|
for (const decl of paddingDeclarations(config.padding, borderWidth)) decls.push(decl);
|
|
23094
24151
|
if (config.fontSize) decls.push(["font-size", FONT_SIZE_MAP[config.fontSize] || "1rem"]);
|
|
23095
|
-
rules.push(rule(selector, decls));
|
|
24152
|
+
rules.push(rule$1(selector, decls));
|
|
23096
24153
|
}
|
|
23097
24154
|
return rules;
|
|
23098
24155
|
}
|
|
@@ -23161,6 +24218,10 @@ var init_generateButtonCss = __esmMin((() => {
|
|
|
23161
24218
|
init_constants$2();
|
|
23162
24219
|
init_generateDefaultButtonSystem();
|
|
23163
24220
|
init_affordanceIcons();
|
|
24221
|
+
init_expandPalette();
|
|
24222
|
+
init_foregroundContract();
|
|
24223
|
+
init_resolveButtonColourStates();
|
|
24224
|
+
init_resolvedButtonCss();
|
|
23164
24225
|
AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
23165
24226
|
BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
23166
24227
|
LETTER_SPACING_MAP = {
|
|
@@ -23177,23 +24238,51 @@ var init_generateButtonCss = __esmMin((() => {
|
|
|
23177
24238
|
["outline", "none"]
|
|
23178
24239
|
];
|
|
23179
24240
|
}));
|
|
23180
|
-
|
|
24241
|
+
function presetCategory(personality) {
|
|
24242
|
+
switch (personality.tags.era) {
|
|
24243
|
+
case "retro": return "retro";
|
|
24244
|
+
case "editorial": return "minimal";
|
|
24245
|
+
case "organic": return "artistic";
|
|
24246
|
+
case "modern": return personality.tags.tone === "bold" ? "modern" : "technical";
|
|
24247
|
+
case "technical": return "technical";
|
|
24248
|
+
case void 0: return "modern";
|
|
24249
|
+
}
|
|
24250
|
+
}
|
|
24251
|
+
var init_presets = __esmMin((() => {
|
|
24252
|
+
init_personalities();
|
|
24253
|
+
buttonPersonalities.map((personality) => ({
|
|
24254
|
+
id: personality.id,
|
|
24255
|
+
name: personality.name,
|
|
24256
|
+
description: personality.description,
|
|
24257
|
+
category: presetCategory(personality),
|
|
24258
|
+
buttonSystem: personality.buttonSystem,
|
|
24259
|
+
compatibility: {
|
|
24260
|
+
...personality.tags.tone ? { tones: [personality.tags.tone] } : {},
|
|
24261
|
+
...personality.tags.energy ? { energies: [personality.tags.energy] } : {}
|
|
24262
|
+
}
|
|
24263
|
+
}));
|
|
24264
|
+
}));
|
|
23181
24265
|
//#endregion
|
|
23182
24266
|
//#region ../theme-core/src/buttons/effects/types.ts
|
|
23183
|
-
var init_types$
|
|
23184
|
-
var init_core$2 = __esmMin((() => {
|
|
24267
|
+
var init_types$11 = __esmMin((() => {}));
|
|
24268
|
+
var init_core$2 = __esmMin((() => {
|
|
24269
|
+
init_resolveButtonColourStates();
|
|
24270
|
+
init_resolvedButtonCss();
|
|
24271
|
+
init_types$14();
|
|
24272
|
+
}));
|
|
23185
24273
|
//#endregion
|
|
23186
24274
|
//#region ../theme-core/src/buttons/index.ts
|
|
23187
24275
|
var init_buttons = __esmMin((() => {
|
|
23188
24276
|
init_types$14();
|
|
23189
24277
|
init_classNames();
|
|
23190
24278
|
init_generateButtonCss();
|
|
24279
|
+
init_resolveButtonColourStates();
|
|
23191
24280
|
init_affordanceIcons();
|
|
23192
24281
|
init_generateDefaultButtonSystem();
|
|
23193
24282
|
init_constants$2();
|
|
23194
24283
|
init_presets();
|
|
23195
24284
|
init_personalities();
|
|
23196
|
-
init_types$
|
|
24285
|
+
init_types$11();
|
|
23197
24286
|
init_registry$1();
|
|
23198
24287
|
init_transform();
|
|
23199
24288
|
init_core$2();
|
|
@@ -23213,7 +24302,7 @@ function normalizeBoxStylesCardVariant(value) {
|
|
|
23213
24302
|
return normalizeCardVariantRole(value);
|
|
23214
24303
|
}
|
|
23215
24304
|
var cardVariantRoleValues, boxlessCardVariantValue, legacyCardVariantRoleAliases, cardSpacingSchema, gradientDirectionSchema, cardVariantRoleSchema, boxStylesCardVariantSchema, cardBackgroundSchema, cardBorderSchema, cardCornerValueSchema, cardAccentEdgeSchema, cardCornerRadiiSchema, cardVariantSchema, cardSystemSchema;
|
|
23216
|
-
var init_types$
|
|
24305
|
+
var init_types$10 = __esmMin((() => {
|
|
23217
24306
|
init_themeColorTokens();
|
|
23218
24307
|
cardVariantRoleValues = ["default", "alternative"];
|
|
23219
24308
|
boxlessCardVariantValue = "none";
|
|
@@ -23429,76 +24518,6 @@ function generateDefaultCardSystem(theme) {
|
|
|
23429
24518
|
}
|
|
23430
24519
|
var init_generateDefaultCardSystem = __esmMin((() => {}));
|
|
23431
24520
|
//#endregion
|
|
23432
|
-
//#region ../theme-core/src/surfaces/foregroundRoles.ts
|
|
23433
|
-
var SURFACE_FOREGROUND_ROLES;
|
|
23434
|
-
var init_foregroundRoles = __esmMin((() => {
|
|
23435
|
-
SURFACE_FOREGROUND_ROLES = [
|
|
23436
|
-
"text",
|
|
23437
|
-
"heading",
|
|
23438
|
-
"link",
|
|
23439
|
-
"supporting"
|
|
23440
|
-
];
|
|
23441
|
-
}));
|
|
23442
|
-
//#endregion
|
|
23443
|
-
//#region ../theme-core/src/surfaces/foregroundContract.ts
|
|
23444
|
-
function requireSurfaceColorValue(role, value) {
|
|
23445
|
-
const normalized = value.trim();
|
|
23446
|
-
if (normalized.length === 0) throw new RangeError(`Surface foreground ${role} must be a non-empty CSS color.`);
|
|
23447
|
-
return normalized;
|
|
23448
|
-
}
|
|
23449
|
-
function completeSurfaceForegrounds(input) {
|
|
23450
|
-
const text = requireSurfaceColorValue("text", input.text);
|
|
23451
|
-
return {
|
|
23452
|
-
text,
|
|
23453
|
-
heading: input.heading === void 0 ? text : requireSurfaceColorValue("heading", input.heading),
|
|
23454
|
-
link: input.link === void 0 ? text : requireSurfaceColorValue("link", input.link),
|
|
23455
|
-
supporting: input.supporting === void 0 ? text : requireSurfaceColorValue("supporting", input.supporting)
|
|
23456
|
-
};
|
|
23457
|
-
}
|
|
23458
|
-
function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FALLBACKS[role]) {
|
|
23459
|
-
const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
|
|
23460
|
-
const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
|
|
23461
|
-
if (role === "text") return `var(${roleVariable}, ${fallback})`;
|
|
23462
|
-
return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
|
|
23463
|
-
}
|
|
23464
|
-
function surfaceForegroundValueWithOpacity(role, opacityPercent) {
|
|
23465
|
-
if (!Number.isFinite(opacityPercent) || opacityPercent < 0 || opacityPercent > 100) throw new RangeError("Surface foreground opacity must be between 0 and 100.");
|
|
23466
|
-
return `color-mix(in srgb, ${surfaceForegroundValue(role)} ${opacityPercent}%, transparent)`;
|
|
23467
|
-
}
|
|
23468
|
-
function surfaceForegroundStyle(input) {
|
|
23469
|
-
const foregrounds = completeSurfaceForegrounds(input);
|
|
23470
|
-
return {
|
|
23471
|
-
color: foregrounds.text,
|
|
23472
|
-
[SURFACE_FOREGROUND_CSS_VARS.text]: foregrounds.text,
|
|
23473
|
-
[SURFACE_FOREGROUND_CSS_VARS.heading]: foregrounds.heading,
|
|
23474
|
-
[SURFACE_FOREGROUND_CSS_VARS.link]: foregrounds.link,
|
|
23475
|
-
[SURFACE_FOREGROUND_CSS_VARS.supporting]: foregrounds.supporting
|
|
23476
|
-
};
|
|
23477
|
-
}
|
|
23478
|
-
function surfaceForegroundDeclarations(input) {
|
|
23479
|
-
const foregrounds = completeSurfaceForegrounds(input);
|
|
23480
|
-
return [`color: ${foregrounds.text}`, ...SURFACE_FOREGROUND_ROLES.map((role) => `${SURFACE_FOREGROUND_CSS_VARS[role]}: ${foregrounds[role]}`)];
|
|
23481
|
-
}
|
|
23482
|
-
var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LINK_COLOR, DEFAULT_SURFACE_SUPPORTING_COLOR, DEFAULT_ROLE_FALLBACKS;
|
|
23483
|
-
var init_foregroundContract = __esmMin((() => {
|
|
23484
|
-
init_foregroundRoles();
|
|
23485
|
-
SURFACE_FOREGROUND_CSS_VARS = {
|
|
23486
|
-
text: "--rb-surface-text-color",
|
|
23487
|
-
heading: "--rb-surface-heading-color",
|
|
23488
|
-
link: "--rb-surface-link-color",
|
|
23489
|
-
supporting: "--rb-surface-supporting-color"
|
|
23490
|
-
};
|
|
23491
|
-
DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
|
|
23492
|
-
DEFAULT_SURFACE_LINK_COLOR = "rgb(var(--tb-primary, var(--tb-text, 17 24 39)))";
|
|
23493
|
-
DEFAULT_SURFACE_SUPPORTING_COLOR = "rgb(var(--tb-mutedText, 100 116 139))";
|
|
23494
|
-
DEFAULT_ROLE_FALLBACKS = {
|
|
23495
|
-
text: DEFAULT_SURFACE_TEXT_COLOR,
|
|
23496
|
-
heading: DEFAULT_SURFACE_TEXT_COLOR,
|
|
23497
|
-
link: DEFAULT_SURFACE_LINK_COLOR,
|
|
23498
|
-
supporting: DEFAULT_SURFACE_SUPPORTING_COLOR
|
|
23499
|
-
};
|
|
23500
|
-
}));
|
|
23501
|
-
//#endregion
|
|
23502
24521
|
//#region ../theme-core/src/surfaces/index.ts
|
|
23503
24522
|
var init_surfaces = __esmMin((() => {
|
|
23504
24523
|
init_foregroundContract();
|
|
@@ -23631,7 +24650,7 @@ var init_core$1 = __esmMin((() => {
|
|
|
23631
24650
|
//#endregion
|
|
23632
24651
|
//#region ../theme-core/src/cards/index.ts
|
|
23633
24652
|
var init_cards = __esmMin((() => {
|
|
23634
|
-
init_types$
|
|
24653
|
+
init_types$10();
|
|
23635
24654
|
init_constants$1();
|
|
23636
24655
|
init_generateCardCss();
|
|
23637
24656
|
init_generateDefaultCardSystem();
|
|
@@ -23640,7 +24659,7 @@ var init_cards = __esmMin((() => {
|
|
|
23640
24659
|
//#endregion
|
|
23641
24660
|
//#region ../theme-core/src/accordions/types.ts
|
|
23642
24661
|
var accordionIconSchema, accordionSystemSchema, ICON_CONFIG, ICON_SIZE_PX, ACCORDION_SPACING_MAP, ACCORDION_TRIGGER_FONT_SCALE, ACCORDION_TRIGGER_LETTER_SPACING, ACCORDION_OPEN_ACCENT_THICKNESS;
|
|
23643
|
-
var init_types$
|
|
24662
|
+
var init_types$9 = __esmMin((() => {
|
|
23644
24663
|
init_themeColorTokens();
|
|
23645
24664
|
accordionIconSchema = z$1.enum([
|
|
23646
24665
|
"plus-minus",
|
|
@@ -23797,7 +24816,7 @@ var init_types$10 = __esmMin((() => {
|
|
|
23797
24816
|
//#endregion
|
|
23798
24817
|
//#region ../theme-core/src/inputs/types.ts
|
|
23799
24818
|
var inputSystemSchema, INPUT_SPACING_MAP, INPUT_FONT_SIZE_MAP, LABEL_FONT_SIZE_MAP, FONT_WEIGHT_MAP;
|
|
23800
|
-
var init_types$
|
|
24819
|
+
var init_types$8 = __esmMin((() => {
|
|
23801
24820
|
init_themeColorTokens();
|
|
23802
24821
|
inputSystemSchema = z$1.object({
|
|
23803
24822
|
base: z$1.object({
|
|
@@ -23916,31 +24935,6 @@ var init_types$9 = __esmMin((() => {
|
|
|
23916
24935
|
};
|
|
23917
24936
|
}));
|
|
23918
24937
|
//#endregion
|
|
23919
|
-
//#region ../theme-core/src/gradients/types.ts
|
|
23920
|
-
/**
|
|
23921
|
-
* Gradient configuration types and schemas
|
|
23922
|
-
*/
|
|
23923
|
-
var gradientStopSchema, radialGradientShapeSchema, gradientConfigSchema;
|
|
23924
|
-
var init_types$8 = __esmMin((() => {
|
|
23925
|
-
init_themeColorTokens();
|
|
23926
|
-
gradientStopSchema = z$1.object({
|
|
23927
|
-
color: themeColorTokenSchema,
|
|
23928
|
-
position: z$1.number().min(0).max(100)
|
|
23929
|
-
});
|
|
23930
|
-
radialGradientShapeSchema = z$1.enum(["circle", "ellipse"]);
|
|
23931
|
-
gradientConfigSchema = z$1.object({
|
|
23932
|
-
type: z$1.enum([
|
|
23933
|
-
"linear",
|
|
23934
|
-
"radial",
|
|
23935
|
-
"conic"
|
|
23936
|
-
]).default("linear"),
|
|
23937
|
-
angle: z$1.number().min(0).max(360).optional(),
|
|
23938
|
-
shape: radialGradientShapeSchema.optional(),
|
|
23939
|
-
position: z$1.string().optional(),
|
|
23940
|
-
stops: z$1.array(gradientStopSchema).min(2)
|
|
23941
|
-
});
|
|
23942
|
-
}));
|
|
23943
|
-
//#endregion
|
|
23944
24938
|
//#region ../theme-core/src/interactive/baseSchema.ts
|
|
23945
24939
|
/**
|
|
23946
24940
|
* Shared Base Schemas for Interactive Elements
|
|
@@ -24612,9 +25606,9 @@ var init_schema = __esmMin((() => {
|
|
|
24612
25606
|
init_media$2();
|
|
24613
25607
|
init_buttons();
|
|
24614
25608
|
init_cards();
|
|
24615
|
-
init_types$10();
|
|
24616
25609
|
init_types$9();
|
|
24617
25610
|
init_types$8();
|
|
25611
|
+
init_types$12();
|
|
24618
25612
|
init_types$7();
|
|
24619
25613
|
init_validation$2();
|
|
24620
25614
|
init_atRuleValidation();
|
|
@@ -25619,6 +26613,21 @@ var init_designState = __esmMin((() => {
|
|
|
25619
26613
|
styleAuthorities: z$1.array(blockRuntimeStyleAuthoritySchema)
|
|
25620
26614
|
}).strict();
|
|
25621
26615
|
}));
|
|
26616
|
+
//#endregion
|
|
26617
|
+
//#region ../theme-core/src/site-styles/runtimeCompiler.ts
|
|
26618
|
+
function defineSectionForegroundRuntimeTokens(input) {
|
|
26619
|
+
return {
|
|
26620
|
+
textColor: requireThemeColorToken(input.textColor),
|
|
26621
|
+
headingColor: requireThemeColorToken(input.headingColor),
|
|
26622
|
+
linkColor: requireThemeColorToken(input.linkColor),
|
|
26623
|
+
supportingColor: requireThemeColorToken(input.supportingColor)
|
|
26624
|
+
};
|
|
26625
|
+
}
|
|
26626
|
+
function requireThemeColorToken(value) {
|
|
26627
|
+
const token = parseThemeColorToken(value);
|
|
26628
|
+
if (!token) throw new Error(`Invalid section foreground Theme color token: ${String(value)}`);
|
|
26629
|
+
return token;
|
|
26630
|
+
}
|
|
25622
26631
|
function defineDesignRuntimeRules(rules) {
|
|
25623
26632
|
return rules;
|
|
25624
26633
|
}
|
|
@@ -25644,6 +26653,8 @@ var init_runtimeCompiler = __esmMin((() => {
|
|
|
25644
26653
|
init_types$17();
|
|
25645
26654
|
init_accessibleSurfaces();
|
|
25646
26655
|
init_sectionTransitions();
|
|
26656
|
+
init_tokens();
|
|
26657
|
+
init_gradients();
|
|
25647
26658
|
defaultDesignRuntimeRules = defineDesignRuntimeRules({
|
|
25648
26659
|
sectionSurfaces: {
|
|
25649
26660
|
base: {},
|
|
@@ -26042,13 +27053,14 @@ function inferHeaderCurationFromLegacyLooks(lookIds, recipes) {
|
|
|
26042
27053
|
function getCuratedSiteStyle(id) {
|
|
26043
27054
|
return curatedSiteStylesById.get(id) ?? null;
|
|
26044
27055
|
}
|
|
26045
|
-
var SOFT_EARTH_SITE_STYLE_ID_VALUE, SOFT_EARTH_SITE_STYLE_ID, curatedSiteStyleIdValues, quietBudget, accentLedQuietBudget, balancedBudget, expressiveBudget, kirtanOrnateDesignRuntimeRules, expressiveUnderlineInputs, ornateDarkInputs, generatedContentFrameKinds, curatedSiteStyles, curatedSiteStylesById;
|
|
27056
|
+
var SOFT_EARTH_SITE_STYLE_ID_VALUE, SOFT_EARTH_SITE_STYLE_ID, curatedSiteStyleIdValues, quietBudget, accentLedQuietBudget, balancedBudget, expressiveBudget, kirtanOrnateDesignRuntimeRules, primaryGlowGradientPresetId, fulcrumDesignRuntimeRules, expressiveUnderlineInputs, ornateDarkInputs, generatedContentFrameKinds, curatedSiteStyles, curatedSiteStylesById;
|
|
26046
27057
|
var init_curatedSiteStyles = __esmMin((() => {
|
|
26047
27058
|
init_personalities();
|
|
26048
27059
|
init_curated();
|
|
26049
27060
|
init_siteStyleDefaults$1();
|
|
26050
27061
|
init_siteStyleDefaults();
|
|
26051
27062
|
init_testimonialQuotePresets();
|
|
27063
|
+
init_gradients();
|
|
26052
27064
|
init_headerLooks();
|
|
26053
27065
|
init_footerLooks();
|
|
26054
27066
|
init_curatedChoices();
|
|
@@ -26116,24 +27128,24 @@ var init_curatedSiteStyles = __esmMin((() => {
|
|
|
26116
27128
|
type: "color",
|
|
26117
27129
|
color: "muted"
|
|
26118
27130
|
},
|
|
26119
|
-
foreground: {
|
|
27131
|
+
foreground: defineSectionForegroundRuntimeTokens({
|
|
26120
27132
|
textColor: "text",
|
|
26121
27133
|
headingColor: "primary",
|
|
26122
27134
|
linkColor: "primary",
|
|
26123
27135
|
supportingColor: "text"
|
|
26124
|
-
}
|
|
27136
|
+
})
|
|
26125
27137
|
},
|
|
26126
27138
|
"brand-depth-band": {
|
|
26127
27139
|
background: {
|
|
26128
27140
|
type: "color",
|
|
26129
27141
|
color: "primary-800"
|
|
26130
27142
|
},
|
|
26131
|
-
foreground: {
|
|
27143
|
+
foreground: defineSectionForegroundRuntimeTokens({
|
|
26132
27144
|
textColor: "text",
|
|
26133
27145
|
headingColor: "primary",
|
|
26134
27146
|
linkColor: "primary",
|
|
26135
27147
|
supportingColor: "text"
|
|
26136
|
-
}
|
|
27148
|
+
})
|
|
26137
27149
|
},
|
|
26138
27150
|
"hero-image": {
|
|
26139
27151
|
background: {
|
|
@@ -26141,12 +27153,32 @@ var init_curatedSiteStyles = __esmMin((() => {
|
|
|
26141
27153
|
opacity: 1,
|
|
26142
27154
|
position: "center center"
|
|
26143
27155
|
},
|
|
26144
|
-
foreground: {
|
|
27156
|
+
foreground: defineSectionForegroundRuntimeTokens({
|
|
26145
27157
|
textColor: "text",
|
|
26146
27158
|
headingColor: "primary",
|
|
26147
27159
|
linkColor: "primary",
|
|
26148
27160
|
supportingColor: "text"
|
|
26149
|
-
}
|
|
27161
|
+
})
|
|
27162
|
+
}
|
|
27163
|
+
}
|
|
27164
|
+
});
|
|
27165
|
+
primaryGlowGradientPresetId = parseGradientPresetId("primary-glow");
|
|
27166
|
+
if (!primaryGlowGradientPresetId) throw new Error("Expected primary-glow in the Theme Core gradient catalog");
|
|
27167
|
+
fulcrumDesignRuntimeRules = defineDesignRuntimeRules({
|
|
27168
|
+
...defaultDesignRuntimeRules,
|
|
27169
|
+
sectionSurfaces: {
|
|
27170
|
+
...defaultDesignRuntimeRules.sectionSurfaces,
|
|
27171
|
+
"accent-band": {
|
|
27172
|
+
background: {
|
|
27173
|
+
type: "gradient",
|
|
27174
|
+
gradientPresetId: primaryGlowGradientPresetId
|
|
27175
|
+
},
|
|
27176
|
+
foreground: defineSectionForegroundRuntimeTokens({
|
|
27177
|
+
textColor: "primaryForeground",
|
|
27178
|
+
headingColor: "primaryForeground",
|
|
27179
|
+
linkColor: "primaryForeground",
|
|
27180
|
+
supportingColor: "primaryForeground"
|
|
27181
|
+
})
|
|
26150
27182
|
}
|
|
26151
27183
|
}
|
|
26152
27184
|
});
|
|
@@ -27323,6 +28355,8 @@ var init_curatedSiteStyles = __esmMin((() => {
|
|
|
27323
28355
|
},
|
|
27324
28356
|
compositionBudget: quietBudget,
|
|
27325
28357
|
typography: fulcrumTypography,
|
|
28358
|
+
designRuntimeRules: fulcrumDesignRuntimeRules,
|
|
28359
|
+
recommendedAppearancePresetIds: ["cta-accent-band"],
|
|
27326
28360
|
themeOverrides: {
|
|
27327
28361
|
shadow: { colorToken: "primary" },
|
|
27328
28362
|
accordions: {
|
|
@@ -30927,9 +31961,15 @@ var init_button = __esmMin((() => {
|
|
|
30927
31961
|
//#endregion
|
|
30928
31962
|
//#region ../blocks/src/system/fields/ctas.ts
|
|
30929
31963
|
function createCtasRepeater(options = {}) {
|
|
30930
|
-
const { id = "ctas", label = "Calls to action", itemLabel = "CTA", minItems = 0, maxItems, button } = options;
|
|
31964
|
+
const { id = "ctas", label = "Calls to action", itemLabel = "CTA", minItems = 0, maxItems, button, defaultValue } = options;
|
|
31965
|
+
const fieldId = id;
|
|
31966
|
+
const buttonField = createButtonGroup({
|
|
31967
|
+
showGroupLabel: false,
|
|
31968
|
+
...button ?? {},
|
|
31969
|
+
flattenInRepeater: true
|
|
31970
|
+
});
|
|
30931
31971
|
return {
|
|
30932
|
-
id,
|
|
31972
|
+
id: fieldId,
|
|
30933
31973
|
type: "repeater",
|
|
30934
31974
|
label,
|
|
30935
31975
|
itemLabel,
|
|
@@ -30938,11 +31978,8 @@ function createCtasRepeater(options = {}) {
|
|
|
30938
31978
|
maxItems,
|
|
30939
31979
|
required: false,
|
|
30940
31980
|
allowConversion: true,
|
|
30941
|
-
|
|
30942
|
-
|
|
30943
|
-
...button ?? {},
|
|
30944
|
-
flattenInRepeater: true
|
|
30945
|
-
})] }
|
|
31981
|
+
...defaultValue !== void 0 ? { defaultValue: [...defaultValue] } : {},
|
|
31982
|
+
schema: { fields: [buttonField] }
|
|
30946
31983
|
};
|
|
30947
31984
|
}
|
|
30948
31985
|
var init_ctas = __esmMin((() => {
|
|
@@ -31004,6 +32041,7 @@ var init_heroCtaRow = __esmMin((() => {
|
|
|
31004
32041
|
label: "Calls to action",
|
|
31005
32042
|
itemLabel: "CTA",
|
|
31006
32043
|
maxItems: 3,
|
|
32044
|
+
defaultValue: [],
|
|
31007
32045
|
button: {
|
|
31008
32046
|
variants: [
|
|
31009
32047
|
{
|
|
@@ -31082,7 +32120,7 @@ var init_ctaCopy = __esmMin((() => {
|
|
|
31082
32120
|
eyebrowPath: "content.eyebrow",
|
|
31083
32121
|
titlePath: "content.title",
|
|
31084
32122
|
className: "cta-heading"
|
|
31085
|
-
}), richText({ className: "cta-content rb-prose rb-mx-auto rb-max-w-none" }, when("content
|
|
32123
|
+
}), richText({ className: "cta-content rb-prose rb-mx-auto rb-max-w-none" }, when("content"), bind("content"))]
|
|
31086
32124
|
});
|
|
31087
32125
|
}));
|
|
31088
32126
|
//#endregion
|
|
@@ -33484,6 +34522,7 @@ function createBlockManifest(config) {
|
|
|
33484
34522
|
previewCustomize: config.previewCustomize,
|
|
33485
34523
|
category: config.category,
|
|
33486
34524
|
contentTypes: config.contentTypes ? [...config.contentTypes] : void 0,
|
|
34525
|
+
contentSource: config.contentSource,
|
|
33487
34526
|
tags: config.tags ? [...config.tags] : [],
|
|
33488
34527
|
icon: config.icon ?? "Box",
|
|
33489
34528
|
layout,
|
|
@@ -33640,6 +34679,7 @@ const heroBlockDefinition = { manifest: createBlockManifest({
|
|
|
33640
34679
|
title: "Hero",
|
|
33641
34680
|
titleSource: "headline",
|
|
33642
34681
|
category: "layout",
|
|
34682
|
+
contentSource: { kind: "inline" },
|
|
33643
34683
|
includeContainerStyles: true,
|
|
33644
34684
|
promotedFields: ["_sectionStyles.background.image"],
|
|
33645
34685
|
fragments: [
|
|
@@ -33917,6 +34957,7 @@ const introBlockDefinition = { manifest: createBlockManifest({
|
|
|
33917
34957
|
id: "block.intro",
|
|
33918
34958
|
title: "Intro",
|
|
33919
34959
|
category: "layout",
|
|
34960
|
+
contentSource: { kind: "inline" },
|
|
33920
34961
|
includeContainerStyles: true,
|
|
33921
34962
|
titleSource: "title",
|
|
33922
34963
|
previewCustomize: { quickFieldPriority: [
|
|
@@ -34106,6 +35147,7 @@ const bodyTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
34106
35147
|
title: "Body Text",
|
|
34107
35148
|
titleSource: "heading",
|
|
34108
35149
|
category: "content",
|
|
35150
|
+
contentSource: { kind: "inline" },
|
|
34109
35151
|
fragments: [{
|
|
34110
35152
|
fragment: bodyCopyFragment,
|
|
34111
35153
|
fieldPriority: 0
|
|
@@ -34165,6 +35207,10 @@ const blogPostBlockDefinition = {
|
|
|
34165
35207
|
description: "Highlights a single blog post with title, image, and excerpt.",
|
|
34166
35208
|
category: "blog",
|
|
34167
35209
|
contentTypes: ["post"],
|
|
35210
|
+
contentSource: {
|
|
35211
|
+
kind: "entries",
|
|
35212
|
+
contentType: "post"
|
|
35213
|
+
},
|
|
34168
35214
|
tags: [
|
|
34169
35215
|
"blog",
|
|
34170
35216
|
"post",
|
|
@@ -34468,6 +35514,10 @@ const blogListingManifest = createBlockManifest({
|
|
|
34468
35514
|
],
|
|
34469
35515
|
description: "Display a collection of blog posts in grid or stack layout.",
|
|
34470
35516
|
contentTypes: ["post"],
|
|
35517
|
+
contentSource: {
|
|
35518
|
+
kind: "entries",
|
|
35519
|
+
contentType: "post"
|
|
35520
|
+
},
|
|
34471
35521
|
tags: [
|
|
34472
35522
|
"blog",
|
|
34473
35523
|
"posts",
|
|
@@ -34514,6 +35564,7 @@ const ctaFullBlockDefinition = { manifest: createBlockManifest({
|
|
|
34514
35564
|
id: "block.cta-full",
|
|
34515
35565
|
title: "Full-width CTA",
|
|
34516
35566
|
category: "marketing",
|
|
35567
|
+
contentSource: { kind: "inline" },
|
|
34517
35568
|
fragments: [{
|
|
34518
35569
|
fragment: ctaCopyFragment,
|
|
34519
35570
|
fieldPriority: 0
|
|
@@ -34551,6 +35602,7 @@ const singleButtonBlockDefinition = { manifest: createBlockManifest({
|
|
|
34551
35602
|
id: "block.single-button",
|
|
34552
35603
|
title: "Single Button",
|
|
34553
35604
|
category: "marketing",
|
|
35605
|
+
contentSource: { kind: "inline" },
|
|
34554
35606
|
fragments: [{
|
|
34555
35607
|
fragment: singleButtonFragment,
|
|
34556
35608
|
fieldPriority: 0
|
|
@@ -34941,6 +35993,7 @@ const formManifest = createBlockManifest({
|
|
|
34941
35993
|
paletteHidden: false
|
|
34942
35994
|
},
|
|
34943
35995
|
category: "interactive",
|
|
35996
|
+
contentSource: { kind: "inline" },
|
|
34944
35997
|
tags: [
|
|
34945
35998
|
"form",
|
|
34946
35999
|
"contact",
|
|
@@ -35008,6 +36061,7 @@ const contactNewsletterBlockDefinition = {
|
|
|
35008
36061
|
titleSource: "contactTitle",
|
|
35009
36062
|
description: "Two-column newsletter signup and contact form section.",
|
|
35010
36063
|
category: "interactive",
|
|
36064
|
+
contentSource: { kind: "inline" },
|
|
35011
36065
|
layout: contactNewsletterLayout,
|
|
35012
36066
|
defaultVariant: "default",
|
|
35013
36067
|
variants: { default: contactNewsletterLayout },
|
|
@@ -35218,6 +36272,7 @@ const faqBlockDefinition = { manifest: createBlockManifest({
|
|
|
35218
36272
|
title: "FAQ",
|
|
35219
36273
|
titleSource: "title",
|
|
35220
36274
|
category: "content",
|
|
36275
|
+
contentSource: { kind: "inline" },
|
|
35221
36276
|
includeContainerStyles: true,
|
|
35222
36277
|
fragments: [{
|
|
35223
36278
|
fragment: faqHeadingFragment,
|
|
@@ -36961,6 +38016,7 @@ const siteHeaderBlockDefinition = { manifest: createBlockManifest({
|
|
|
36961
38016
|
id: "block.site-header",
|
|
36962
38017
|
title: "Site Header",
|
|
36963
38018
|
category: "layout",
|
|
38019
|
+
contentSource: { kind: "inline" },
|
|
36964
38020
|
additionalFields: [{
|
|
36965
38021
|
id: "mode",
|
|
36966
38022
|
type: "select",
|
|
@@ -37174,6 +38230,7 @@ const siteFooterBlockDefinition = { manifest: createBlockManifest({
|
|
|
37174
38230
|
id: "block.site-footer",
|
|
37175
38231
|
title: "Site Footer",
|
|
37176
38232
|
category: "layout",
|
|
38233
|
+
contentSource: { kind: "inline" },
|
|
37177
38234
|
skipSectionStyles: true,
|
|
37178
38235
|
layout: section$1({
|
|
37179
38236
|
background: "background",
|
|
@@ -37332,6 +38389,7 @@ const testimonialsBlockDefinition = {
|
|
|
37332
38389
|
id: "block.testimonials",
|
|
37333
38390
|
title: "Testimonials",
|
|
37334
38391
|
category: "marketing",
|
|
38392
|
+
contentSource: { kind: "inline" },
|
|
37335
38393
|
includeContainerStyles: true,
|
|
37336
38394
|
previewCustomize: { quickFieldPriority: [
|
|
37337
38395
|
"avatarLayout",
|
|
@@ -37496,6 +38554,7 @@ const columnsBlockDefinition = { manifest: createBlockManifest({
|
|
|
37496
38554
|
id: "block.columns",
|
|
37497
38555
|
title: "Columns",
|
|
37498
38556
|
category: "layout",
|
|
38557
|
+
contentSource: { kind: "inline" },
|
|
37499
38558
|
additionalFields: [
|
|
37500
38559
|
parseFieldDefinition({
|
|
37501
38560
|
id: "equalHeight",
|
|
@@ -37736,6 +38795,7 @@ const collectionBlockDefinition = { manifest: createBlockManifest({
|
|
|
37736
38795
|
id: "block.collection",
|
|
37737
38796
|
title: "Collection",
|
|
37738
38797
|
category: "layout",
|
|
38798
|
+
contentSource: { kind: "inline" },
|
|
37739
38799
|
additionalFields: [
|
|
37740
38800
|
parseFieldDefinition({
|
|
37741
38801
|
id: "layout",
|
|
@@ -38030,6 +39090,7 @@ const featureCardsBlockDefinition = { manifest: createBlockManifest({
|
|
|
38030
39090
|
id: "block.feature-cards",
|
|
38031
39091
|
title: "Feature Cards",
|
|
38032
39092
|
category: "layout",
|
|
39093
|
+
contentSource: { kind: "inline" },
|
|
38033
39094
|
includeContainerStyles: true,
|
|
38034
39095
|
titleSource: "title",
|
|
38035
39096
|
additionalFields: [
|
|
@@ -38422,6 +39483,7 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
|
|
|
38422
39483
|
id: "block.media-text",
|
|
38423
39484
|
title: "Media and Text",
|
|
38424
39485
|
category: "layout",
|
|
39486
|
+
contentSource: { kind: "inline" },
|
|
38425
39487
|
includeContainerStyles: true,
|
|
38426
39488
|
titleSource: "title",
|
|
38427
39489
|
previewCustomize: { quickFieldPriority: [
|
|
@@ -38830,6 +39892,7 @@ const appointmentBookingBlockDefinition = {
|
|
|
38830
39892
|
paletteHidden: false
|
|
38831
39893
|
},
|
|
38832
39894
|
category: "interactive",
|
|
39895
|
+
contentSource: { kind: "inline" },
|
|
38833
39896
|
tags: [
|
|
38834
39897
|
"booking",
|
|
38835
39898
|
"appointment",
|
|
@@ -39000,6 +40063,7 @@ const weeklySlotAvailabilityManifest = createBlockManifest({
|
|
|
39000
40063
|
paletteHidden: false
|
|
39001
40064
|
},
|
|
39002
40065
|
category: "interactive",
|
|
40066
|
+
contentSource: { kind: "inline" },
|
|
39003
40067
|
tags: [
|
|
39004
40068
|
"booking",
|
|
39005
40069
|
"appointment",
|
|
@@ -40751,6 +41815,7 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
40751
41815
|
init_builder$1();
|
|
40752
41816
|
init_styledSection();
|
|
40753
41817
|
init_fragments$1();
|
|
41818
|
+
init_button();
|
|
40754
41819
|
init_api_bindings();
|
|
40755
41820
|
init_shared$4();
|
|
40756
41821
|
init_shop_shared();
|
|
@@ -40765,6 +41830,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
40765
41830
|
titleSource: "heading",
|
|
40766
41831
|
description: "Multi-step event registration form",
|
|
40767
41832
|
category: "interactive",
|
|
41833
|
+
contentSource: { kind: "inline" },
|
|
40768
41834
|
tags: [
|
|
40769
41835
|
"events",
|
|
40770
41836
|
"registration",
|
|
@@ -40871,15 +41937,9 @@ const eventRegistrationBlockDefinition = {
|
|
|
40871
41937
|
defaultValue: "Complete Registration",
|
|
40872
41938
|
maxLength: 40
|
|
40873
41939
|
},
|
|
40874
|
-
{
|
|
40875
|
-
id: "buttonVariant",
|
|
40876
|
-
type: "select",
|
|
40877
|
-
label: "Button style",
|
|
41940
|
+
createButtonVariantField({
|
|
40878
41941
|
description: "Choose a button style from your theme",
|
|
40879
|
-
|
|
40880
|
-
multiple: false,
|
|
40881
|
-
defaultValue: "primary",
|
|
40882
|
-
options: [
|
|
41942
|
+
variants: [
|
|
40883
41943
|
{
|
|
40884
41944
|
value: "primary",
|
|
40885
41945
|
label: "Primary"
|
|
@@ -40892,9 +41952,8 @@ const eventRegistrationBlockDefinition = {
|
|
|
40892
41952
|
value: "outline",
|
|
40893
41953
|
label: "Outline"
|
|
40894
41954
|
}
|
|
40895
|
-
]
|
|
40896
|
-
|
|
40897
|
-
}
|
|
41955
|
+
]
|
|
41956
|
+
})
|
|
40898
41957
|
],
|
|
40899
41958
|
layout: [styledSection({
|
|
40900
41959
|
baseClass: "",
|
|
@@ -41301,6 +42360,7 @@ var init_course_registration_interactive = __esmMin((() => {
|
|
|
41301
42360
|
init_builder$1();
|
|
41302
42361
|
init_styledSection();
|
|
41303
42362
|
init_fragments$1();
|
|
42363
|
+
init_button();
|
|
41304
42364
|
init_api_bindings();
|
|
41305
42365
|
init_shared$3();
|
|
41306
42366
|
init_defineBlock();
|
|
@@ -41313,6 +42373,7 @@ const courseRegistrationBlockDefinition = {
|
|
|
41313
42373
|
titleSource: "heading",
|
|
41314
42374
|
description: "Enrollment form for multi-session courses",
|
|
41315
42375
|
category: "interactive",
|
|
42376
|
+
contentSource: { kind: "inline" },
|
|
41316
42377
|
tags: [
|
|
41317
42378
|
"courses",
|
|
41318
42379
|
"enrollment",
|
|
@@ -41426,15 +42487,9 @@ const courseRegistrationBlockDefinition = {
|
|
|
41426
42487
|
defaultValue: "Sign up",
|
|
41427
42488
|
maxLength: 40
|
|
41428
42489
|
},
|
|
41429
|
-
{
|
|
41430
|
-
id: "buttonVariant",
|
|
41431
|
-
type: "select",
|
|
41432
|
-
label: "Button style",
|
|
42490
|
+
createButtonVariantField({
|
|
41433
42491
|
description: "Choose a button style from your theme",
|
|
41434
|
-
|
|
41435
|
-
multiple: false,
|
|
41436
|
-
defaultValue: "primary",
|
|
41437
|
-
options: [
|
|
42492
|
+
variants: [
|
|
41438
42493
|
{
|
|
41439
42494
|
value: "primary",
|
|
41440
42495
|
label: "Primary"
|
|
@@ -41447,9 +42502,8 @@ const courseRegistrationBlockDefinition = {
|
|
|
41447
42502
|
value: "outline",
|
|
41448
42503
|
label: "Outline"
|
|
41449
42504
|
}
|
|
41450
|
-
]
|
|
41451
|
-
|
|
41452
|
-
}
|
|
42505
|
+
]
|
|
42506
|
+
})
|
|
41453
42507
|
],
|
|
41454
42508
|
layout: [styledSection({
|
|
41455
42509
|
baseClass: "",
|
|
@@ -41527,6 +42581,7 @@ var init_event_details = __esmMin((() => {
|
|
|
41527
42581
|
titleSource: "heading",
|
|
41528
42582
|
description: "Date/time, venue, map, and other dates for an event",
|
|
41529
42583
|
category: "content",
|
|
42584
|
+
contentSource: { kind: "entries" },
|
|
41530
42585
|
tags: [
|
|
41531
42586
|
"events",
|
|
41532
42587
|
"venue",
|
|
@@ -41741,6 +42796,7 @@ const courseDetailsBlockDefinition = {
|
|
|
41741
42796
|
titleSource: "heading",
|
|
41742
42797
|
description: "Schedule, venue, price, and enrollment status for a course",
|
|
41743
42798
|
category: "content",
|
|
42799
|
+
contentSource: { kind: "entries" },
|
|
41744
42800
|
tags: [
|
|
41745
42801
|
"courses",
|
|
41746
42802
|
"schedule",
|
|
@@ -42040,6 +43096,7 @@ const eventSpotlightBlockDefinition = {
|
|
|
42040
43096
|
paletteHidden: false
|
|
42041
43097
|
},
|
|
42042
43098
|
category: "content",
|
|
43099
|
+
contentSource: { kind: "entries" },
|
|
42043
43100
|
tags: [
|
|
42044
43101
|
"events",
|
|
42045
43102
|
"featured",
|
|
@@ -45036,6 +46093,7 @@ const eventListingBlockDefinition = {
|
|
|
45036
46093
|
paletteHidden: true
|
|
45037
46094
|
},
|
|
45038
46095
|
category: "interactive",
|
|
46096
|
+
contentSource: { kind: "entries" },
|
|
45039
46097
|
tags: [
|
|
45040
46098
|
"events",
|
|
45041
46099
|
"listing",
|
|
@@ -46298,6 +47356,7 @@ const eventCalendarBlockDefinition = {
|
|
|
46298
47356
|
paletteHidden: false
|
|
46299
47357
|
},
|
|
46300
47358
|
category: "interactive",
|
|
47359
|
+
contentSource: { kind: "entries" },
|
|
46301
47360
|
tags: [
|
|
46302
47361
|
"events",
|
|
46303
47362
|
"calendar",
|
|
@@ -46705,6 +47764,7 @@ const recurringScheduleBlockDefinition = {
|
|
|
46705
47764
|
titleSource: "heading",
|
|
46706
47765
|
description: "A compact weekly schedule with one row per recurring series.",
|
|
46707
47766
|
category: "interactive",
|
|
47767
|
+
contentSource: { kind: "entries" },
|
|
46708
47768
|
icon: "CalendarDays",
|
|
46709
47769
|
tags: [
|
|
46710
47770
|
"schedule",
|
|
@@ -47345,7 +48405,10 @@ const offeringsPreviewFields = [
|
|
|
47345
48405
|
label: "Link"
|
|
47346
48406
|
}
|
|
47347
48407
|
],
|
|
47348
|
-
ui: {
|
|
48408
|
+
ui: {
|
|
48409
|
+
intent: "display",
|
|
48410
|
+
widget: "buttonVariant"
|
|
48411
|
+
}
|
|
47349
48412
|
},
|
|
47350
48413
|
{
|
|
47351
48414
|
id: "buttonText",
|
|
@@ -47398,6 +48461,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
47398
48461
|
paletteHidden: false
|
|
47399
48462
|
},
|
|
47400
48463
|
category: "content",
|
|
48464
|
+
contentSource: { kind: "mixed" },
|
|
47401
48465
|
tags: [
|
|
47402
48466
|
"offerings",
|
|
47403
48467
|
"events",
|
|
@@ -47573,6 +48637,7 @@ const embedManifest = createBlockManifest({
|
|
|
47573
48637
|
id: "block.embed",
|
|
47574
48638
|
title: "Embed Content",
|
|
47575
48639
|
category: "content",
|
|
48640
|
+
contentSource: { kind: "entries" },
|
|
47576
48641
|
titleSource: "heading",
|
|
47577
48642
|
additionalFields: [
|
|
47578
48643
|
parseFieldDefinition({
|
|
@@ -48065,6 +49130,7 @@ const imageGalleryBlockDefinition = { manifest: createBlockManifest({
|
|
|
48065
49130
|
id: "block.image-gallery",
|
|
48066
49131
|
title: "Image Gallery",
|
|
48067
49132
|
category: "content",
|
|
49133
|
+
contentSource: { kind: "inline" },
|
|
48068
49134
|
previewCustomize: { quickFieldPriority: [
|
|
48069
49135
|
"aspectRatio",
|
|
48070
49136
|
"slidesToShow",
|
|
@@ -48723,6 +49789,7 @@ const videoGridBlockDefinition = { manifest: createBlockManifest({
|
|
|
48723
49789
|
id: "block.video-grid",
|
|
48724
49790
|
title: "Video Grid",
|
|
48725
49791
|
category: "media",
|
|
49792
|
+
contentSource: { kind: "inline" },
|
|
48726
49793
|
skipSectionStyles: true,
|
|
48727
49794
|
additionalFields: parseFieldDefinitions([
|
|
48728
49795
|
{
|
|
@@ -48928,6 +49995,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
|
|
|
48928
49995
|
title: "Audio Player",
|
|
48929
49996
|
titleSource: "title",
|
|
48930
49997
|
category: "media",
|
|
49998
|
+
contentSource: { kind: "inline" },
|
|
48931
49999
|
description: "Add a branded audio player for a single track.",
|
|
48932
50000
|
tags: [
|
|
48933
50001
|
"audio",
|
|
@@ -49017,6 +50085,7 @@ const fileDownloadBlockDefinition = { manifest: createBlockManifest({
|
|
|
49017
50085
|
title: "File Download",
|
|
49018
50086
|
titleSource: ["title", "file.filename"],
|
|
49019
50087
|
category: "media",
|
|
50088
|
+
contentSource: { kind: "inline" },
|
|
49020
50089
|
description: "Add a simple public download link for a document, ZIP, or audio file.",
|
|
49021
50090
|
tags: [
|
|
49022
50091
|
"file",
|
|
@@ -50233,6 +51302,7 @@ const shopBlockDefinition = {
|
|
|
50233
51302
|
paletteHidden: false
|
|
50234
51303
|
},
|
|
50235
51304
|
category: "interactive",
|
|
51305
|
+
contentSource: { kind: "entries" },
|
|
50236
51306
|
tags: [
|
|
50237
51307
|
"shop",
|
|
50238
51308
|
"passes",
|
|
@@ -50442,6 +51512,7 @@ const productListBlockDefinition = {
|
|
|
50442
51512
|
paletteHidden: false
|
|
50443
51513
|
},
|
|
50444
51514
|
category: "interactive",
|
|
51515
|
+
contentSource: { kind: "entries" },
|
|
50445
51516
|
tags: [
|
|
50446
51517
|
"shop",
|
|
50447
51518
|
"products",
|
|
@@ -50593,6 +51664,7 @@ const productDetailBlockDefinition = {
|
|
|
50593
51664
|
paletteHidden: false
|
|
50594
51665
|
},
|
|
50595
51666
|
category: "interactive",
|
|
51667
|
+
contentSource: { kind: "entries" },
|
|
50596
51668
|
tags: [
|
|
50597
51669
|
"shop",
|
|
50598
51670
|
"product",
|
|
@@ -50718,6 +51790,7 @@ const cartBlockDefinition = {
|
|
|
50718
51790
|
paletteHidden: false
|
|
50719
51791
|
},
|
|
50720
51792
|
category: "interactive",
|
|
51793
|
+
contentSource: { kind: "inline" },
|
|
50721
51794
|
tags: [
|
|
50722
51795
|
"shop",
|
|
50723
51796
|
"cart",
|
|
@@ -50809,6 +51882,7 @@ const checkoutBlockDefinition = {
|
|
|
50809
51882
|
paletteHidden: false
|
|
50810
51883
|
},
|
|
50811
51884
|
category: "interactive",
|
|
51885
|
+
contentSource: { kind: "inline" },
|
|
50812
51886
|
tags: [
|
|
50813
51887
|
"shop",
|
|
50814
51888
|
"checkout",
|
|
@@ -51048,6 +52122,7 @@ const giftingBlockDefinition = {
|
|
|
51048
52122
|
paletteHidden: false
|
|
51049
52123
|
},
|
|
51050
52124
|
category: "interactive",
|
|
52125
|
+
contentSource: { kind: "entries" },
|
|
51051
52126
|
tags: [
|
|
51052
52127
|
"gifting",
|
|
51053
52128
|
"gift cards",
|
|
@@ -51429,6 +52504,7 @@ const newsletterSignupBlockDefinition = {
|
|
|
51429
52504
|
titleSource: "title",
|
|
51430
52505
|
description: "Newsletter subscription form with configurable field presets.",
|
|
51431
52506
|
category: "interactive",
|
|
52507
|
+
contentSource: { kind: "inline" },
|
|
51432
52508
|
fragments: [{
|
|
51433
52509
|
fragment: newsletterCopyFragment,
|
|
51434
52510
|
fieldPriority: 0
|
|
@@ -51616,6 +52692,7 @@ const teamMembersBlockDefinition = {
|
|
|
51616
52692
|
id: "block.team-members",
|
|
51617
52693
|
title: "Team Members",
|
|
51618
52694
|
category: "content",
|
|
52695
|
+
contentSource: { kind: "mixed" },
|
|
51619
52696
|
titleSource: "heading",
|
|
51620
52697
|
additionalFields: [
|
|
51621
52698
|
parseFieldDefinition({
|
|
@@ -52065,6 +53142,7 @@ const locationMapBlockDefinition = {
|
|
|
52065
53142
|
titleSource: "heading",
|
|
52066
53143
|
description: "Show a business location with an interactive map and directions link.",
|
|
52067
53144
|
category: "content",
|
|
53145
|
+
contentSource: { kind: "inline" },
|
|
52068
53146
|
tags: [
|
|
52069
53147
|
"map",
|
|
52070
53148
|
"location",
|
|
@@ -53076,216 +54154,6 @@ function getBlockDefinition(name) {
|
|
|
53076
54154
|
//#region ../blocks/src/system/theme/index.ts
|
|
53077
54155
|
init_tokens();
|
|
53078
54156
|
//#endregion
|
|
53079
|
-
//#region ../theme-core/src/gradients/presets.ts
|
|
53080
|
-
/**
|
|
53081
|
-
* Curated library of gradient presets
|
|
53082
|
-
* All gradients use theme color tokens, so they adapt to the site's palette
|
|
53083
|
-
*/
|
|
53084
|
-
const GRADIENT_PRESETS = [
|
|
53085
|
-
{
|
|
53086
|
-
id: "primary-secondary",
|
|
53087
|
-
name: "Primary to Secondary",
|
|
53088
|
-
description: "Blend your primary and secondary brand colors",
|
|
53089
|
-
type: "linear",
|
|
53090
|
-
angle: 135,
|
|
53091
|
-
stops: [{
|
|
53092
|
-
color: "primary-500",
|
|
53093
|
-
position: 0
|
|
53094
|
-
}, {
|
|
53095
|
-
color: "secondary-500",
|
|
53096
|
-
position: 100
|
|
53097
|
-
}]
|
|
53098
|
-
},
|
|
53099
|
-
{
|
|
53100
|
-
id: "primary-accent",
|
|
53101
|
-
name: "Primary to Accent",
|
|
53102
|
-
description: "Energetic gradient from primary to accent",
|
|
53103
|
-
type: "linear",
|
|
53104
|
-
angle: 135,
|
|
53105
|
-
stops: [{
|
|
53106
|
-
color: "primary-500",
|
|
53107
|
-
position: 0
|
|
53108
|
-
}, {
|
|
53109
|
-
color: "accent-500",
|
|
53110
|
-
position: 100
|
|
53111
|
-
}]
|
|
53112
|
-
},
|
|
53113
|
-
{
|
|
53114
|
-
id: "secondary-accent",
|
|
53115
|
-
name: "Secondary to Accent",
|
|
53116
|
-
description: "Vibrant secondary to accent blend",
|
|
53117
|
-
type: "linear",
|
|
53118
|
-
angle: 135,
|
|
53119
|
-
stops: [{
|
|
53120
|
-
color: "secondary-500",
|
|
53121
|
-
position: 0
|
|
53122
|
-
}, {
|
|
53123
|
-
color: "accent-500",
|
|
53124
|
-
position: 100
|
|
53125
|
-
}]
|
|
53126
|
-
},
|
|
53127
|
-
{
|
|
53128
|
-
id: "primary-light-dark",
|
|
53129
|
-
name: "Primary Light to Dark",
|
|
53130
|
-
description: "Subtle primary color fade",
|
|
53131
|
-
type: "linear",
|
|
53132
|
-
angle: 180,
|
|
53133
|
-
stops: [{
|
|
53134
|
-
color: "primary-500",
|
|
53135
|
-
position: 0
|
|
53136
|
-
}, {
|
|
53137
|
-
color: "primary-900",
|
|
53138
|
-
position: 100
|
|
53139
|
-
}]
|
|
53140
|
-
},
|
|
53141
|
-
{
|
|
53142
|
-
id: "primary-dark-light",
|
|
53143
|
-
name: "Primary Dark to Light",
|
|
53144
|
-
description: "Reverse primary fade",
|
|
53145
|
-
type: "linear",
|
|
53146
|
-
angle: 180,
|
|
53147
|
-
stops: [{
|
|
53148
|
-
color: "primary-900",
|
|
53149
|
-
position: 0
|
|
53150
|
-
}, {
|
|
53151
|
-
color: "primary-50",
|
|
53152
|
-
position: 100
|
|
53153
|
-
}]
|
|
53154
|
-
},
|
|
53155
|
-
{
|
|
53156
|
-
id: "secondary-light-dark",
|
|
53157
|
-
name: "Secondary Light to Dark",
|
|
53158
|
-
description: "Subtle secondary color fade",
|
|
53159
|
-
type: "linear",
|
|
53160
|
-
angle: 180,
|
|
53161
|
-
stops: [{
|
|
53162
|
-
color: "secondary-500",
|
|
53163
|
-
position: 0
|
|
53164
|
-
}, {
|
|
53165
|
-
color: "secondary-900",
|
|
53166
|
-
position: 100
|
|
53167
|
-
}]
|
|
53168
|
-
},
|
|
53169
|
-
{
|
|
53170
|
-
id: "accent-light-dark",
|
|
53171
|
-
name: "Accent Light to Dark",
|
|
53172
|
-
description: "Accent color depth fade",
|
|
53173
|
-
type: "linear",
|
|
53174
|
-
angle: 180,
|
|
53175
|
-
stops: [{
|
|
53176
|
-
color: "accent-500",
|
|
53177
|
-
position: 0
|
|
53178
|
-
}, {
|
|
53179
|
-
color: "accent-900",
|
|
53180
|
-
position: 100
|
|
53181
|
-
}]
|
|
53182
|
-
},
|
|
53183
|
-
{
|
|
53184
|
-
id: "background-surface",
|
|
53185
|
-
name: "Background to Surface",
|
|
53186
|
-
description: "Subtle depth using base colors",
|
|
53187
|
-
type: "linear",
|
|
53188
|
-
angle: 180,
|
|
53189
|
-
stops: [{
|
|
53190
|
-
color: "background",
|
|
53191
|
-
position: 0
|
|
53192
|
-
}, {
|
|
53193
|
-
color: "surface",
|
|
53194
|
-
position: 100
|
|
53195
|
-
}]
|
|
53196
|
-
},
|
|
53197
|
-
{
|
|
53198
|
-
id: "neutral-fade",
|
|
53199
|
-
name: "Neutral Gradient",
|
|
53200
|
-
description: "Elegant neutral color fade",
|
|
53201
|
-
type: "linear",
|
|
53202
|
-
angle: 180,
|
|
53203
|
-
stops: [{
|
|
53204
|
-
color: "neutral-900",
|
|
53205
|
-
position: 0
|
|
53206
|
-
}, {
|
|
53207
|
-
color: "neutral-50",
|
|
53208
|
-
position: 100
|
|
53209
|
-
}]
|
|
53210
|
-
},
|
|
53211
|
-
{
|
|
53212
|
-
id: "primary-radial",
|
|
53213
|
-
name: "Primary Spotlight",
|
|
53214
|
-
description: "Radial primary gradient from center",
|
|
53215
|
-
type: "radial",
|
|
53216
|
-
position: "center",
|
|
53217
|
-
stops: [{
|
|
53218
|
-
color: "primary-500",
|
|
53219
|
-
position: 0
|
|
53220
|
-
}, {
|
|
53221
|
-
color: "primary-900",
|
|
53222
|
-
position: 100
|
|
53223
|
-
}]
|
|
53224
|
-
},
|
|
53225
|
-
{
|
|
53226
|
-
id: "accent-radial",
|
|
53227
|
-
name: "Accent Spotlight",
|
|
53228
|
-
description: "Radial accent gradient from center",
|
|
53229
|
-
type: "radial",
|
|
53230
|
-
position: "center",
|
|
53231
|
-
stops: [{
|
|
53232
|
-
color: "accent-500",
|
|
53233
|
-
position: 0
|
|
53234
|
-
}, {
|
|
53235
|
-
color: "accent-900",
|
|
53236
|
-
position: 100
|
|
53237
|
-
}]
|
|
53238
|
-
},
|
|
53239
|
-
{
|
|
53240
|
-
id: "primary-secondary-accent",
|
|
53241
|
-
name: "Brand Trio",
|
|
53242
|
-
description: "All three brand colors in harmony",
|
|
53243
|
-
type: "linear",
|
|
53244
|
-
angle: 135,
|
|
53245
|
-
stops: [
|
|
53246
|
-
{
|
|
53247
|
-
color: "primary-500",
|
|
53248
|
-
position: 0
|
|
53249
|
-
},
|
|
53250
|
-
{
|
|
53251
|
-
color: "secondary-500",
|
|
53252
|
-
position: 50
|
|
53253
|
-
},
|
|
53254
|
-
{
|
|
53255
|
-
color: "accent-500",
|
|
53256
|
-
position: 100
|
|
53257
|
-
}
|
|
53258
|
-
]
|
|
53259
|
-
}
|
|
53260
|
-
];
|
|
53261
|
-
//#endregion
|
|
53262
|
-
//#region ../theme-core/src/gradients/utils.ts
|
|
53263
|
-
/**
|
|
53264
|
-
* Convert a GradientConfig to a CSS gradient string
|
|
53265
|
-
*
|
|
53266
|
-
* @param config - The gradient configuration using theme tokens
|
|
53267
|
-
* @param tokens - Map of theme color tokens to hex values
|
|
53268
|
-
* @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
|
|
53269
|
-
*/
|
|
53270
|
-
function gradientToCss(config, tokens) {
|
|
53271
|
-
const stops = config.stops.map((stop) => {
|
|
53272
|
-
return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
|
|
53273
|
-
}).join(", ");
|
|
53274
|
-
const type = config.type ?? "linear";
|
|
53275
|
-
if (type === "radial") {
|
|
53276
|
-
const position = config.position ?? "center";
|
|
53277
|
-
return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
|
|
53278
|
-
}
|
|
53279
|
-
if (type === "conic") {
|
|
53280
|
-
const position = config.position ?? "center";
|
|
53281
|
-
return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
|
|
53282
|
-
}
|
|
53283
|
-
return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
|
|
53284
|
-
}
|
|
53285
|
-
//#endregion
|
|
53286
|
-
//#region ../theme-core/src/gradients/index.ts
|
|
53287
|
-
init_types$8();
|
|
53288
|
-
//#endregion
|
|
53289
54157
|
//#region ../blocks/src/system/helpers/backgroundMedia.ts
|
|
53290
54158
|
init_media$1();
|
|
53291
54159
|
function resolveBackgroundMedia(input) {
|
|
@@ -53307,6 +54175,7 @@ function backgroundVideoMobileClassNames(input) {
|
|
|
53307
54175
|
//#endregion
|
|
53308
54176
|
//#region ../blocks/src/system/transforms/registry/background.ts
|
|
53309
54177
|
init_background$1();
|
|
54178
|
+
init_gradients();
|
|
53310
54179
|
init_themeColorResolution();
|
|
53311
54180
|
init_surfaceForegroundStyles();
|
|
53312
54181
|
init_media();
|
|
@@ -53328,9 +54197,9 @@ function appendBackgroundMediaClasses(baseClassName, input) {
|
|
|
53328
54197
|
].filter(Boolean).join(" ");
|
|
53329
54198
|
}
|
|
53330
54199
|
function gradientPresetCss(value) {
|
|
53331
|
-
|
|
53332
|
-
|
|
53333
|
-
|
|
54200
|
+
const presetId = parseGradientPresetId(value);
|
|
54201
|
+
if (!presetId) return null;
|
|
54202
|
+
const preset = getGradientPreset(presetId);
|
|
53334
54203
|
return gradientToCss(preset, Object.fromEntries(preset.stops.map((stop) => [stop.color, `rgb(var(--tb-${stop.color}))`])));
|
|
53335
54204
|
}
|
|
53336
54205
|
const backgroundTransforms = [
|
|
@@ -54436,7 +55305,7 @@ function getSocialIconComponent(value) {
|
|
|
54436
55305
|
}
|
|
54437
55306
|
//#endregion
|
|
54438
55307
|
//#region ../blocks/src/system/icons/registry.ts
|
|
54439
|
-
init_presets$
|
|
55308
|
+
init_presets$2();
|
|
54440
55309
|
function buildSearchText(parts) {
|
|
54441
55310
|
return parts.map((part) => part.trim()).filter(Boolean).join(" ");
|
|
54442
55311
|
}
|
|
@@ -54654,7 +55523,7 @@ const IconNode = ({ value, title, className, blockId: _blockId, blockKind: _bloc
|
|
|
54654
55523
|
};
|
|
54655
55524
|
//#endregion
|
|
54656
55525
|
//#region ../blocks/src/system/icons/index.ts
|
|
54657
|
-
init_presets$
|
|
55526
|
+
init_presets$2();
|
|
54658
55527
|
init_svg();
|
|
54659
55528
|
//#endregion
|
|
54660
55529
|
//#region ../blocks/src/system/runtime/nodes/feature-card-icon.tsx
|
|
@@ -55157,7 +56026,7 @@ function normalizeBoolean$1(value) {
|
|
|
55157
56026
|
}
|
|
55158
56027
|
//#endregion
|
|
55159
56028
|
//#region ../blocks/src/system/runtime/nodes/accordionIconTreatment.ts
|
|
55160
|
-
init_types$
|
|
56029
|
+
init_types$9();
|
|
55161
56030
|
init_colorStyles();
|
|
55162
56031
|
function resolveAccordionIconStyle(iconStyle, iconTreatment) {
|
|
55163
56032
|
if (iconTreatment) switch (iconTreatment.iconSet) {
|
|
@@ -55189,7 +56058,7 @@ init_clsx();
|
|
|
55189
56058
|
init_RichText();
|
|
55190
56059
|
init_richText_coerce();
|
|
55191
56060
|
init_svg();
|
|
55192
|
-
init_types$
|
|
56061
|
+
init_types$9();
|
|
55193
56062
|
/**
|
|
55194
56063
|
* Lookup map for accordion icons - only these 6 icons are bundled
|
|
55195
56064
|
*/
|
|
@@ -61883,7 +62752,7 @@ function parseBorderWidth(widthClass) {
|
|
|
61883
62752
|
}
|
|
61884
62753
|
//#endregion
|
|
61885
62754
|
//#region ../theme-core/src/accordions/generateAccordionCss.ts
|
|
61886
|
-
init_types$
|
|
62755
|
+
init_types$9();
|
|
61887
62756
|
init_constants$1();
|
|
61888
62757
|
init_colorStyles();
|
|
61889
62758
|
init_surfaces();
|
|
@@ -62068,7 +62937,7 @@ function generateAccordionCss({ themeId, theme, accordionSystem }) {
|
|
|
62068
62937
|
}
|
|
62069
62938
|
//#endregion
|
|
62070
62939
|
//#region ../theme-core/src/inputs/generateInputCss.ts
|
|
62071
|
-
init_types$
|
|
62940
|
+
init_types$8();
|
|
62072
62941
|
init_constants$2();
|
|
62073
62942
|
init_colorStyles();
|
|
62074
62943
|
/**
|
|
@@ -65005,6 +65874,8 @@ function buildThemeCssVars(theme) {
|
|
|
65005
65874
|
const inputRadius = mapInputRadius(inputSystem.base.corners, theme.corners);
|
|
65006
65875
|
return {
|
|
65007
65876
|
...generateCssVars(theme.palette),
|
|
65877
|
+
["--tb-secondaryForeground"]: "var(--tb-onSecondary)",
|
|
65878
|
+
["--tb-accentForeground"]: "var(--tb-onAccent)",
|
|
65008
65879
|
["--tb-scrim"]: "0 0 0",
|
|
65009
65880
|
["--tb-shadow"]: "0 0 0",
|
|
65010
65881
|
...generateShadowCssVars(theme),
|
|
@@ -73689,6 +74560,11 @@ const containerResponsiveThemeCss = `/*
|
|
|
73689
74560
|
flex-wrap: wrap;
|
|
73690
74561
|
}
|
|
73691
74562
|
|
|
74563
|
+
/* Text-style CTA actions belong to the section foreground contract. */
|
|
74564
|
+
:where(.theme-scope) [data-block="cta-full"] .cta-row .button-link {
|
|
74565
|
+
color: var(--rb-surface-link-color, var(--rb-surface-text-color, rgb(var(--tb-primary))));
|
|
74566
|
+
}
|
|
74567
|
+
|
|
73692
74568
|
/* =============================================================================
|
|
73693
74569
|
* Block: Body Text (content block, Phase 2)
|
|
73694
74570
|
*
|
|
@@ -79269,6 +80145,8 @@ function ResponsiveScope({ children, responsiveMode = DEFAULT_THEME_RESPONSIVE_M
|
|
|
79269
80145
|
* always emitting the structural CSS contract system blocks rely on.
|
|
79270
80146
|
*/
|
|
79271
80147
|
init_colorConversion();
|
|
80148
|
+
init_textColor();
|
|
80149
|
+
init_onColor();
|
|
79272
80150
|
init_core$2();
|
|
79273
80151
|
init_core$1();
|
|
79274
80152
|
z$1.object({
|
|
@@ -79717,6 +80595,7 @@ init_RichText();
|
|
|
79717
80595
|
* behavior of the default declarative block system.
|
|
79718
80596
|
*/
|
|
79719
80597
|
init_clsx();
|
|
80598
|
+
init_gradients();
|
|
79720
80599
|
init_background$1();
|
|
79721
80600
|
init_media();
|
|
79722
80601
|
//#endregion
|
|
@@ -79746,6 +80625,7 @@ Array.from(new Set(systemCustomizeFacetDefinitions.flatMap((definition) => defin
|
|
|
79746
80625
|
//#region ../blocks/src/system/customize/backgrounds.ts
|
|
79747
80626
|
init_src$3();
|
|
79748
80627
|
init_site_styles();
|
|
80628
|
+
init_gradients();
|
|
79749
80629
|
const backgroundColorTokenNames = backgroundAppearanceColorTokenNames;
|
|
79750
80630
|
const backgroundColorTokenNameSet = new Set(backgroundColorTokenNames);
|
|
79751
80631
|
const backgroundColorTokens = toBackgroundColorTokens(backgroundColorTokenNames);
|
|
@@ -79766,18 +80646,17 @@ function parseBackgroundColorToken(value) {
|
|
|
79766
80646
|
if (!token) return null;
|
|
79767
80647
|
return token ? token : null;
|
|
79768
80648
|
}
|
|
79769
|
-
const gradientPresetIds = GRADIENT_PRESETS.map((preset) => preset.id);
|
|
79770
|
-
new Set(gradientPresetIds);
|
|
79771
80649
|
//#endregion
|
|
79772
80650
|
//#region ../blocks/src/index.ts
|
|
79773
80651
|
init_palette$1();
|
|
79774
80652
|
init_generateShades();
|
|
79775
|
-
init_utils$
|
|
80653
|
+
init_utils$6();
|
|
79776
80654
|
init_schema();
|
|
79777
80655
|
init_site_styles();
|
|
79778
80656
|
init_buttons();
|
|
79779
80657
|
init_cards();
|
|
79780
80658
|
init_tokens();
|
|
80659
|
+
init_gradients();
|
|
79781
80660
|
init_richTextSchema();
|
|
79782
80661
|
init_media();
|
|
79783
80662
|
init_media$1();
|
|
@@ -80472,6 +81351,7 @@ const CANONICAL_REFUND_PLANNER_ERROR_CODES = [
|
|
|
80472
81351
|
"already_refunded",
|
|
80473
81352
|
"idempotency_amount_mismatch",
|
|
80474
81353
|
"idempotency_method_mismatch",
|
|
81354
|
+
"idempotency_receipt_mismatch",
|
|
80475
81355
|
"refund_in_progress"
|
|
80476
81356
|
],
|
|
80477
81357
|
"invalid_amount",
|
|
@@ -80484,7 +81364,12 @@ const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
|
|
|
80484
81364
|
"payment_intent_not_found",
|
|
80485
81365
|
"stripe_error",
|
|
80486
81366
|
"stale_pending_missing_context",
|
|
80487
|
-
"non_refundable_deposit_remaining"
|
|
81367
|
+
"non_refundable_deposit_remaining",
|
|
81368
|
+
"deposit_refund_override_required",
|
|
81369
|
+
"refund_revoke_requires_full_line_refund",
|
|
81370
|
+
"payment_receipt_not_found",
|
|
81371
|
+
"payment_receipt_not_refundable",
|
|
81372
|
+
"payment_receipt_attribution_required"
|
|
80488
81373
|
];
|
|
80489
81374
|
[...CANONICAL_REFUND_PLANNER_ERROR_CODES];
|
|
80490
81375
|
//#endregion
|
|
@@ -80497,7 +81382,10 @@ const STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
|
|
|
80497
81382
|
"missing_credit_customer",
|
|
80498
81383
|
"deposit_refund_override_required",
|
|
80499
81384
|
"refund_revoke_requires_full_line_refund",
|
|
80500
|
-
"unified_order_link_required"
|
|
81385
|
+
"unified_order_link_required",
|
|
81386
|
+
"payment_receipt_not_found",
|
|
81387
|
+
"payment_receipt_not_refundable",
|
|
81388
|
+
"payment_receipt_attribution_required"
|
|
80501
81389
|
];
|
|
80502
81390
|
const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ...STANDARD_LINE_ITEM_REFUND_INVALID_CODES];
|
|
80503
81391
|
[...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
|
|
@@ -159337,7 +160225,7 @@ var SimpleCache = class {
|
|
|
159337
160225
|
* 1. This constant
|
|
159338
160226
|
* 2. The "version" field in package.json
|
|
159339
160227
|
*/
|
|
159340
|
-
const SDK_VERSION = "0.
|
|
160228
|
+
const SDK_VERSION = "0.109.0";
|
|
159341
160229
|
//#endregion
|
|
159342
160230
|
//#region src/client/error.ts
|
|
159343
160231
|
let _Symbol$for;
|