@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.
Files changed (189) hide show
  1. package/README.md +21 -1
  2. package/dist/{PreviewEditorSidebar-BBT-kZAM.mjs → PreviewEditorSidebar-DWqwfy3_.mjs} +7 -22
  3. package/dist/{PreviewEditorUI-D69xNKT2.mjs → PreviewEditorUI-B7OL4sfR.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-RRu7wyQ5.mjs → PreviewQueryProvider-D0y2l8JN.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-CuDjXH6o.mjs → SdkPreviewModeRuntime-D8Gt9Gbe.mjs} +212 -153
  6. package/dist/{SiteChromeCustomizeContext-BQUY2dEk.mjs → SiteChromeCustomizeContext-DUpalEdL.mjs} +1919 -1032
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +11244 -10741
  8. package/dist/_dts/api/src/bookingAdjustments.d.ts +5 -0
  9. package/dist/_dts/api/src/bookingOperations.d.ts +4 -0
  10. package/dist/_dts/api/src/bookingRecords.d.ts +2 -17
  11. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
  12. package/dist/_dts/api/src/common/envelope.d.ts +7 -0
  13. package/dist/_dts/api/src/courses.d.ts +1 -0
  14. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
  15. package/dist/_dts/api/src/endpoints.d.ts +35 -0
  16. package/dist/_dts/api/src/index.d.ts +2 -2
  17. package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
  18. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
  19. package/dist/_dts/api/src/sdkContracts.d.ts +247 -1
  20. package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
  21. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +1 -5
  22. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +29 -1
  23. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -27
  24. package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientField.d.ts +9 -0
  25. package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +3 -4
  26. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
  27. package/dist/_dts/blocks/src/index.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/blocks/audio-player.d.ts +3 -0
  29. package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +3 -0
  30. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +3 -0
  31. package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +1 -22
  32. package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +3 -0
  33. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -22
  34. package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -0
  35. package/dist/_dts/blocks/src/system/blocks/form.d.ts +3 -0
  36. package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +3 -0
  37. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -0
  38. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +3 -0
  39. package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +3 -0
  40. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  41. package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +3 -0
  42. package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +3 -0
  43. package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
  44. package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +16 -6
  45. package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
  46. package/dist/_dts/blocks/src/system/fields/ctas.d.ts +8 -0
  47. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +31 -0
  48. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
  49. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
  50. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
  51. package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +31 -0
  52. package/dist/_dts/content-model/src/content-types/scaffold.d.ts +58 -0
  53. package/dist/_dts/content-model/src/content-types/sentinels.d.ts +36 -0
  54. package/dist/_dts/content-model/src/index.d.ts +3 -0
  55. package/dist/_dts/core/src/booking-date-time.d.ts +8 -0
  56. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3071 -3157
  57. package/dist/_dts/media-core/src/fileMimeDetection.d.ts +16 -0
  58. package/dist/_dts/media-core/src/fileStorage.d.ts +8 -0
  59. package/dist/_dts/media-core/src/storagePathDomain.d.ts +2 -0
  60. package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +3 -0
  61. package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
  62. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -0
  63. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
  64. package/dist/_dts/sdk/src/cli/commands/audit.d.ts +1 -1
  65. package/dist/_dts/sdk/src/cli/commands/compare.d.ts +1 -1
  66. package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +1 -1
  67. package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +18 -0
  68. package/dist/_dts/sdk/src/cli/commands/entry.d.ts +15 -0
  69. package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +2 -2
  70. package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +1 -1
  71. package/dist/_dts/sdk/src/cli/commands/pull.d.ts +1 -0
  72. package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +1 -1
  73. package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +3 -0
  74. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +12 -1
  75. package/dist/_dts/sdk/src/cli/commands/setup.d.ts +1 -0
  76. package/dist/_dts/sdk/src/cli/commands/verify.d.ts +1 -0
  77. package/dist/_dts/sdk/src/cli/helpers.d.ts +22 -1
  78. package/dist/_dts/sdk/src/cli/index.d.ts +4 -0
  79. package/dist/_dts/sdk/src/cli/output.d.ts +88 -0
  80. package/dist/_dts/sdk/src/cli/program.d.ts +29 -0
  81. package/dist/_dts/sdk/src/cli/push-config.d.ts +1 -1
  82. package/dist/_dts/sdk/src/client/management/catalog.d.ts +10 -0
  83. package/dist/_dts/sdk/src/client/management/http.d.ts +7 -1
  84. package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
  85. package/dist/_dts/sdk/src/client/management/types.d.ts +43 -19
  86. package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
  87. package/dist/_dts/sdk/src/public-api/contracts.d.ts +2 -0
  88. package/dist/_dts/sdk/src/version.d.ts +1 -1
  89. package/dist/_dts/site-commands/src/commands.d.ts +893 -823
  90. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  91. package/dist/_dts/theme-core/src/buttons/core.d.ts +15 -46
  92. package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +147 -0
  93. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +2 -3
  94. package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +1 -1
  95. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  96. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +44 -32
  97. package/dist/_dts/theme-core/src/buttons/presets.d.ts +4 -25
  98. package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +100 -0
  99. package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +16 -0
  100. package/dist/_dts/theme-core/src/buttons/types.d.ts +101 -83
  101. package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
  102. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  103. package/dist/_dts/theme-core/src/gradients/presets.d.ts +200 -8
  104. package/dist/_dts/theme-core/src/gradients/utils.d.ts +6 -2
  105. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +87 -126
  106. package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
  107. package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
  108. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -2
  109. package/dist/_dts/theme-core/src/palette/curated/types.d.ts +5 -8
  110. package/dist/_dts/theme-core/src/palette/index.d.ts +0 -1
  111. package/dist/_dts/theme-core/src/schema.d.ts +112 -138
  112. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  113. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +10 -10
  114. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -2
  115. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +13 -6
  116. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +29 -8
  117. package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
  118. package/dist/cli/index.mjs +67956 -66745
  119. package/dist/cli/init-docs/content/cli-reference.md +50 -7
  120. package/dist/cli/init-docs/content/content-management.md +7 -4
  121. package/dist/cli/init-docs/content/workflow-publish.md +5 -1
  122. package/dist/client/{DiscountCodeDisclosure-D6TOf6Hi.mjs → DiscountCodeDisclosure-DU1ygxU2.mjs} +1 -1
  123. package/dist/client/{EventCombined.client-Dao3zxRk.mjs → EventCombined.client-DB5zagCo.mjs} +3 -3
  124. package/dist/client/{EventListing.client-B2NNt4y1.mjs → EventListing.client-CTX9JHBL.mjs} +2 -2
  125. package/dist/client/{LeafletStaticMap-BhwFo16w.mjs → LeafletStaticMap-BYImhgiB.mjs} +1 -1
  126. package/dist/client/{MagicLinkForm-BWnB7cMR.mjs → MagicLinkForm-CRkw_M3l.mjs} +2 -2
  127. package/dist/client/{StepIndicator-TzRiQ0BY.mjs → StepIndicator-BnmVBJJh.mjs} +2 -2
  128. package/dist/client/{accordion-BPy-AJ4_.mjs → accordion-CeGreumd.mjs} +1 -1
  129. package/dist/client/{bookingForm-BL4PGZds.mjs → bookingForm-CSzFNrpN.mjs} +6 -6
  130. package/dist/client/bookings.mjs +512 -252
  131. package/dist/client/{buttons-EBjyslaX.mjs → buttons-DoFV7KDL.mjs} +493 -230
  132. package/dist/client/{carousel-C2b7Cn9-.mjs → carousel-B2jDtogf.mjs} +1 -1
  133. package/dist/client/{cart-BQcbXIVD.mjs → cart-D-jZ-vaY.mjs} +3 -3
  134. package/dist/client/{checkout-DEmpGRJu.mjs → checkout-Dza-LA7N.mjs} +3 -3
  135. package/dist/client/client.mjs +1673 -785
  136. package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-CrgzoXsm.mjs} +1 -30
  137. package/dist/client/{courseRegistration-BqRZPmsq.mjs → courseRegistration-TYkNychb.mjs} +7 -7
  138. package/dist/client/{eventCalendar-B8N_tSl5.mjs → eventCalendar-BI_90SsT.mjs} +5 -5
  139. package/dist/client/{eventCombined-Gjn6gtq7.mjs → eventCombined-mNrpryE9.mjs} +2 -2
  140. package/dist/client/{eventDetails-M-VCxA-r.mjs → eventDetails-D4GVlCIY.mjs} +3 -3
  141. package/dist/client/{eventListing-DR19hqYi.mjs → eventListing-YhKN018y.mjs} +2 -2
  142. package/dist/client/{eventRegistration-BR02a0k3.mjs → eventRegistration-CdHGtilr.mjs} +7 -7
  143. package/dist/client/foregroundContract-xICPq59x.mjs +31 -0
  144. package/dist/client/{form-LY2xIbwg.mjs → form-AcAL45rA.mjs} +2 -2
  145. package/dist/client/{headerSection-CYwwXJfh.mjs → headerSection-uEC52ueD.mjs} +3 -3
  146. package/dist/client/hooks.mjs +890 -497
  147. package/dist/client/{locationMap-DWnBXrFq.mjs → locationMap-_wJDSUYe.mjs} +3 -3
  148. package/dist/client/{media-DHtSxS5V.mjs → media-BK0O3b-U.mjs} +3 -2
  149. package/dist/client/{newsletterForm-D9s-fQ2P.mjs → newsletterForm-DrArsb2B.mjs} +2 -2
  150. package/dist/client/{pricing-DDq80oYc.mjs → pricing-BSYVghwo.mjs} +1 -1
  151. package/dist/client/{productDetail-B0SbWd45.mjs → productDetail-Dyk90sMs.mjs} +3 -3
  152. package/dist/client/{productList-PwYlZn0y.mjs → productList-BCKThwAI.mjs} +3 -3
  153. package/dist/client/{propsDecoder-BRWBiH7i.mjs → propsDecoder-CkXxkdSR.mjs} +63 -24
  154. package/dist/client/rendering/client.mjs +1034 -486
  155. package/dist/client/rendering/islands.mjs +19 -19
  156. package/dist/client/rendering.mjs +1832 -760
  157. package/dist/client/{shop-CMwZPYME.mjs → shop-DeltVH10.mjs} +6 -6
  158. package/dist/client/{shop-commerce-BuxsFate.mjs → shop-commerce-BD9Jsm2Z.mjs} +6 -6
  159. package/dist/client/{shop-commerce-store-boYlEJ91.mjs → shop-commerce-store-CmXD6FDS.mjs} +1 -1
  160. package/dist/client/{shopShared-D2naaOes.mjs → shopShared-B8v-lH_F.mjs} +2 -2
  161. package/dist/client/{useDiscountCodeUi-D9RHpVoj.mjs → useDiscountCodeUi-DbWJN8ld.mjs} +1 -1
  162. package/dist/client/{useEventFilters-igGiK1re.mjs → useEventFilters-EJIMUnqT.mjs} +46 -69
  163. package/dist/client/{usePolling-CI7MbsFB.mjs → usePolling-Cmh14fc7.mjs} +2 -2
  164. package/dist/preview-next/before-render.mjs +35 -0
  165. package/dist/preview-next/client/runtime.mjs +4 -4
  166. package/dist/preview-next/middleware.mjs +35 -0
  167. package/dist/{previewAuthStore-a_cBD28m.mjs → previewAuthStore-CTO7CRPk.mjs} +35 -0
  168. package/dist/{sdk-runtime-MBzD-GmP.mjs → sdk-runtime-Dou0GAav.mjs} +2 -2
  169. package/dist/{separator-5ahRBC85.mjs → separator-CI5wZNXT.mjs} +1 -1
  170. package/dist/server/components.mjs +1832 -784
  171. package/dist/server/config-validation.mjs +890 -497
  172. package/dist/server/config.mjs +890 -497
  173. package/dist/server/data.mjs +890 -497
  174. package/dist/server/date-time.mjs +386 -0
  175. package/dist/server/index.mjs +36 -1
  176. package/dist/server/next.mjs +1868 -785
  177. package/dist/server/page-converter.mjs +849 -285
  178. package/dist/server/prebuild.mjs +1 -1
  179. package/dist/server/rendering/server.mjs +1553 -718
  180. package/dist/server/rendering.mjs +1832 -784
  181. package/dist/server/routing.mjs +933 -522
  182. package/dist/server/server.mjs +929 -501
  183. package/dist/server/theme-bridge.mjs +1408 -392
  184. package/dist/server/theme.mjs +471 -228
  185. package/dist/styles/index.css +5 -0
  186. package/package.json +7 -1
  187. package/dist/_dts/theme-core/src/buttons/presets/types.d.ts +0 -88
  188. package/dist/_dts/theme-core/src/buttons/utils/contrast.d.ts +0 -38
  189. package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +0 -57
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { d as unwrapResponse, s as ApiRequestError } from "./previewAuthStore-a_cBD28m.mjs";
2
+ import { d as unwrapResponse, s as ApiRequestError } from "./previewAuthStore-CTO7CRPk.mjs";
3
3
  import * as React$1 from "react";
4
4
  import React, { cloneElement, createContext, createElement, forwardRef, isValidElement, memo, useCallback, useContext, useDebugValue, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -51850,19 +51850,29 @@ const DEFAULT_BOOKING_DATE_TIME_FORMAT = {
51850
51850
  minute: "2-digit"
51851
51851
  };
51852
51852
  const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
51853
+ const DATE_TIME_FORMATTER_CACHE_LIMIT = 100;
51854
+ const dateTimeFormatterCache = /* @__PURE__ */ new Map();
51855
+ const timeZoneValidityCache = /* @__PURE__ */ new Map();
51853
51856
  function isValidTimeZone$1(timeZone) {
51857
+ const cached = timeZoneValidityCache.get(timeZone);
51858
+ if (cached !== void 0) return cached;
51859
+ let isValid;
51854
51860
  try {
51855
51861
  new Intl.DateTimeFormat(DEFAULT_LOCALE, { timeZone }).format(/* @__PURE__ */ new Date());
51856
- return true;
51862
+ isValid = true;
51857
51863
  } catch {
51858
- return false;
51864
+ isValid = false;
51859
51865
  }
51866
+ if (timeZoneValidityCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) timeZoneValidityCache.clear();
51867
+ timeZoneValidityCache.set(timeZone, isValid);
51868
+ return isValid;
51860
51869
  }
51861
51870
  function getSafeTimeZone(timeZone) {
51862
51871
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
51863
51872
  return normalized.length > 0 && isValidTimeZone$1(normalized) ? normalized : FALLBACK_TIMEZONE;
51864
51873
  }
51865
51874
  function parseStrictBookingTimeZone(timeZone) {
51875
+ if (typeof timeZone !== "string") return null;
51866
51876
  const normalized = timeZone.trim();
51867
51877
  if (normalized.length === 0 || !isValidTimeZone$1(normalized)) return null;
51868
51878
  return normalized;
@@ -51875,10 +51885,19 @@ function formatParseError(error) {
51875
51885
  }
51876
51886
  }
51877
51887
  function formatToPartsLookup(date, locale, timeZone, format) {
51878
- return new Map(new Intl.DateTimeFormat(locale, {
51888
+ return new Map(getCachedDateTimeFormatter(locale, timeZone, format).formatToParts(date).map((part) => [part.type, part.value]));
51889
+ }
51890
+ function getCachedDateTimeFormatter(locale, timeZone, format) {
51891
+ const key = `${locale}\u0000${timeZone}\u0000${JSON.stringify(Object.entries(format).sort(([left], [right]) => left.localeCompare(right)))}`;
51892
+ const cached = dateTimeFormatterCache.get(key);
51893
+ if (cached !== void 0) return cached;
51894
+ const formatter = new Intl.DateTimeFormat(locale, {
51879
51895
  ...format,
51880
51896
  timeZone
51881
- }).formatToParts(date).map((part) => [part.type, part.value]));
51897
+ });
51898
+ if (dateTimeFormatterCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) dateTimeFormatterCache.clear();
51899
+ dateTimeFormatterCache.set(key, formatter);
51900
+ return formatter;
51882
51901
  }
51883
51902
  function getZonedDateTimeParts(date, timeZone) {
51884
51903
  const parts = formatToPartsLookup(date, "en-GB", timeZone, {
@@ -51931,23 +51950,9 @@ function toUtcIsoDateTimeString(value) {
51931
51950
  return parsed.value;
51932
51951
  }
51933
51952
  function parseScheduledBookingDateTime(input) {
51953
+ let startsAt;
51934
51954
  try {
51935
- const startsAt = toUtcIsoDateTimeString(input.startsAt);
51936
- const timeZone = parseStrictBookingTimeZone(input.timeZone);
51937
- if (timeZone === null) return {
51938
- ok: false,
51939
- field: "timeZone",
51940
- reason: "invalid_time_zone",
51941
- value: input.timeZone
51942
- };
51943
- return {
51944
- ok: true,
51945
- value: {
51946
- startsAt,
51947
- timeZone,
51948
- locale: input.locale
51949
- }
51950
- };
51955
+ startsAt = toUtcIsoDateTimeString(input.startsAt);
51951
51956
  } catch {
51952
51957
  return {
51953
51958
  ok: false,
@@ -51956,6 +51961,21 @@ function parseScheduledBookingDateTime(input) {
51956
51961
  value: input.startsAt
51957
51962
  };
51958
51963
  }
51964
+ const timeZone = parseStrictBookingTimeZone(input.timeZone);
51965
+ if (timeZone === null) return {
51966
+ ok: false,
51967
+ field: "timeZone",
51968
+ reason: "invalid_time_zone",
51969
+ value: typeof input.timeZone === "string" ? input.timeZone : ""
51970
+ };
51971
+ return {
51972
+ ok: true,
51973
+ value: {
51974
+ startsAt,
51975
+ timeZone,
51976
+ locale: input.locale
51977
+ }
51978
+ };
51959
51979
  }
51960
51980
  function parseScheduledBookingDateRange(input) {
51961
51981
  const start = parseScheduledBookingDateTime(input);
@@ -51994,10 +52014,7 @@ function toScheduledBookingDateRange(input) {
51994
52014
  function formatBookingInstant(isoString, options) {
51995
52015
  const date = new Date(isoString);
51996
52016
  if (Number.isNaN(date.getTime())) return isoString;
51997
- return new Intl.DateTimeFormat(options.locale ?? DEFAULT_LOCALE, {
51998
- ...options.format,
51999
- timeZone: getSafeTimeZone(options.timeZone)
52000
- }).format(date);
52017
+ return getCachedDateTimeFormatter(options.locale ?? DEFAULT_LOCALE, getSafeTimeZone(options.timeZone), options.format).format(date);
52001
52018
  }
52002
52019
  function formatBookingDate(input, format = {
52003
52020
  weekday: "long",
@@ -76010,6 +76027,111 @@ function mergeStyles(...styles) {
76010
76027
  return Object.keys(merged).length ? merged : void 0;
76011
76028
  }
76012
76029
  //#endregion
76030
+ //#region ../theme-core/src/buttons/effectClassification.ts
76031
+ /**
76032
+ * Exhaustive live policy for every registered effect id.
76033
+ *
76034
+ * The resolver consumes the transition payload directly, so adding an effect
76035
+ * cannot update classification without also defining its runtime behavior.
76036
+ */
76037
+ const BUTTON_EFFECT_POLICIES = {
76038
+ "darken-background": {
76039
+ classification: "colour-transition",
76040
+ transition: {
76041
+ kind: "adjust-shade",
76042
+ direction: "darker"
76043
+ }
76044
+ },
76045
+ "lighten-background": {
76046
+ classification: "colour-transition",
76047
+ transition: {
76048
+ kind: "adjust-shade",
76049
+ direction: "lighter"
76050
+ }
76051
+ },
76052
+ "background-on-hover": {
76053
+ classification: "colour-transition",
76054
+ transition: { kind: "replace-background" }
76055
+ },
76056
+ "background-on-hover-alpha": {
76057
+ classification: "unsupported-colour",
76058
+ reason: "alpha_requires_surface"
76059
+ },
76060
+ "fade-background": {
76061
+ classification: "unsupported-colour",
76062
+ reason: "changes_element_opacity"
76063
+ },
76064
+ "opacity-reduce": {
76065
+ classification: "unsupported-colour",
76066
+ reason: "changes_element_opacity"
76067
+ },
76068
+ "gradient-text": {
76069
+ classification: "unsupported-colour",
76070
+ reason: "changes_foreground"
76071
+ },
76072
+ "text-color-change": {
76073
+ classification: "unsupported-colour",
76074
+ reason: "changes_foreground"
76075
+ },
76076
+ "border-color-change": {
76077
+ classification: "unsupported-colour",
76078
+ reason: "changes_border"
76079
+ },
76080
+ "aurora-glow": {
76081
+ classification: "unsupported-background-overlay",
76082
+ reason: "unresolved_background_overlay"
76083
+ },
76084
+ "cosmic-stardust": {
76085
+ classification: "unsupported-background-overlay",
76086
+ reason: "unresolved_background_overlay"
76087
+ },
76088
+ "gradient-border-fill": {
76089
+ classification: "unsupported-background-overlay",
76090
+ reason: "unresolved_background_overlay"
76091
+ },
76092
+ "animated-gradient-border-fill": {
76093
+ classification: "unsupported-background-overlay",
76094
+ reason: "unresolved_background_overlay"
76095
+ },
76096
+ "nav-underline": {
76097
+ classification: "not-button",
76098
+ reason: "not_button_effect"
76099
+ },
76100
+ "nav-frosted-base": {
76101
+ classification: "not-button",
76102
+ reason: "not_button_effect"
76103
+ },
76104
+ "nav-frosted-hover": {
76105
+ classification: "not-button",
76106
+ reason: "not_button_effect"
76107
+ },
76108
+ "nav-frosted-active": {
76109
+ classification: "not-button",
76110
+ reason: "not_button_effect"
76111
+ },
76112
+ "animated-gradient": { classification: "non-colour" },
76113
+ "border-glow": { classification: "non-colour" },
76114
+ "drop-shadow": { classification: "non-colour" },
76115
+ "inner-shadow": { classification: "non-colour" },
76116
+ "neumorphic-shadow": { classification: "non-colour" },
76117
+ "outer-glow": { classification: "non-colour" },
76118
+ "retro-3d-shadow": { classification: "non-colour" },
76119
+ "scale-up": { classification: "non-colour" },
76120
+ "scale-down": { classification: "non-colour" },
76121
+ lift: { classification: "non-colour" },
76122
+ "press-down": { classification: "non-colour" },
76123
+ pop: { classification: "non-colour" },
76124
+ "border-bottom-grow": { classification: "non-colour" },
76125
+ "sketchy-border": { classification: "non-colour" },
76126
+ "pulse-animation": { classification: "non-colour" }
76127
+ };
76128
+ function getButtonEffectPolicy(effectId) {
76129
+ return Object.prototype.hasOwnProperty.call(BUTTON_EFFECT_POLICIES, effectId) ? BUTTON_EFFECT_POLICIES[effectId] : null;
76130
+ }
76131
+ function classifyButtonEffectId(effectId) {
76132
+ return getButtonEffectPolicy(effectId)?.classification ?? "unknown";
76133
+ }
76134
+ //#endregion
76013
76135
  //#region ../theme-core/src/tokens/blockColorTokens.ts
76014
76136
  const blockColorTokenNames = [
76015
76137
  "text",
@@ -76148,6 +76270,20 @@ function asSpecialVariantId(value) {
76148
76270
  * Shared between generator and renderer so neither side hard-codes the string.
76149
76271
  */
76150
76272
  const DEFAULT_VARIANT_ALIAS_ID = "default";
76273
+ function parseOpaqueButtonColourToken(value) {
76274
+ const token = parseThemeColorToken(value);
76275
+ if (token === null) return null;
76276
+ const parts = parseColorTokenParts(token);
76277
+ return parts.kind === "token" && parts.opacityPercent === null ? token : null;
76278
+ }
76279
+ function unsafeAsOpaqueButtonColourToken(value) {
76280
+ return value;
76281
+ }
76282
+ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => parseOpaqueButtonColourToken(value) !== null, "Button colour tokens must be opaque").transform((value) => {
76283
+ const token = parseOpaqueButtonColourToken(value);
76284
+ if (token === null) throw new Error("Invariant: opaque button token passed its schema");
76285
+ return token;
76286
+ });
76151
76287
  const cornerStyleSchema = z$1.enum([
76152
76288
  "square",
76153
76289
  "rounded",
@@ -76249,7 +76385,7 @@ const buttonSizesSchema = z$1.object({
76249
76385
  lg,
76250
76386
  xl: xl ?? lg
76251
76387
  }));
76252
- const buttonGlobalSettingsSchema = z$1.object({
76388
+ const canonicalButtonGlobalSettingsSchema = z$1.object({
76253
76389
  cornerStyle: cornerStyleSchema,
76254
76390
  cornerRadius: z$1.number().min(0).max(24).optional(),
76255
76391
  /**
@@ -76280,11 +76416,12 @@ const buttonGlobalSettingsSchema = z$1.object({
76280
76416
  paddingPreset: buttonPaddingPresetSchema.optional(),
76281
76417
  hoverTransform: hoverTransformSchema,
76282
76418
  hoverColor: hoverColorSchema,
76283
- hoverColorToken: themeColorTokenSchema.optional(),
76419
+ hoverColorToken: opaqueButtonColourTokenSchema.optional(),
76284
76420
  gradientStyle: gradientStyleSchema.optional(),
76285
76421
  gradientAngle: z$1.number().min(0).max(360).optional(),
76286
76422
  gradientSharpness: gradientSharpnessSchema.optional()
76287
76423
  });
76424
+ const buttonGlobalSettingsSchema = z$1.preprocess(normalizeLegacyButtonGlobalInput, canonicalButtonGlobalSettingsSchema);
76288
76425
  const gradientDirectionSchema$1 = z$1.enum([
76289
76426
  "to-r",
76290
76427
  "to-l",
@@ -76298,27 +76435,33 @@ const gradientDirectionSchema$1 = z$1.enum([
76298
76435
  const buttonBackgroundSchema = z$1.discriminatedUnion("type", [
76299
76436
  z$1.object({
76300
76437
  type: z$1.literal("solid"),
76301
- colorToken: themeColorTokenSchema
76438
+ colorToken: opaqueButtonColourTokenSchema
76302
76439
  }),
76303
76440
  z$1.object({
76304
76441
  type: z$1.literal("gradient"),
76305
- stops: z$1.array(themeColorTokenSchema).min(2),
76306
- direction: gradientDirectionSchema$1
76442
+ stops: z$1.array(opaqueButtonColourTokenSchema).min(2).transform((stops) => {
76443
+ const [first, second, ...rest] = stops;
76444
+ if (first === void 0 || second === void 0) throw new Error("Invariant: gradient stops passed the minimum length schema");
76445
+ return [
76446
+ first,
76447
+ second,
76448
+ ...rest
76449
+ ];
76450
+ }),
76451
+ direction: gradientDirectionSchema$1,
76452
+ foregroundToken: opaqueButtonColourTokenSchema
76307
76453
  }),
76308
- z$1.object({ type: z$1.literal("transparent") })
76454
+ z$1.object({
76455
+ type: z$1.literal("surface"),
76456
+ role: z$1.literal("link")
76457
+ })
76309
76458
  ]);
76310
76459
  const effectApplicationSchema$1 = z$1.object({
76311
76460
  effectId: z$1.string(),
76312
- options: z$1.record(z$1.string(), z$1.any()).optional()
76313
- });
76314
- const buttonBorderSchema = z$1.object({
76315
- widthClass: z$1.string(),
76316
- colorToken: themeColorTokenSchema
76317
- });
76318
- const buttonVariantAffordanceSchema = z$1.object({
76319
- iconId: z$1.string().min(1),
76320
- colorToken: themeColorTokenSchema.optional()
76461
+ options: z$1.record(z$1.string(), z$1.json()).optional()
76321
76462
  });
76463
+ const buttonBorderSchema = z$1.object({ widthClass: z$1.string() });
76464
+ const buttonVariantAffordanceSchema = z$1.object({ iconId: z$1.string().min(1) });
76322
76465
  const variantShadowSchema = z$1.object({
76323
76466
  elevation: z$1.enum([
76324
76467
  "none",
@@ -76359,27 +76502,170 @@ const variantSizeOverridesSchema = z$1.object({
76359
76502
  * default (e.g. link-style variants declaring zero horizontal padding at
76360
76503
  * every size).
76361
76504
  */
76362
- const buttonVariantSchema = z$1.object({
76505
+ const canonicalButtonVariantSchema = z$1.object({
76363
76506
  id: z$1.string(),
76364
76507
  name: z$1.string().min(1).max(20),
76365
76508
  enabled: z$1.boolean(),
76366
76509
  priority: prioritySchema,
76367
76510
  background: buttonBackgroundSchema,
76368
- textColorToken: themeColorTokenSchema,
76369
76511
  /** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
76370
76512
  borderRadius: z$1.string().optional(),
76371
76513
  shadow: variantShadowSchema.optional(),
76372
76514
  border: buttonBorderSchema.optional(),
76373
- hoverBackgroundToken: z$1.string().optional(),
76515
+ hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
76374
76516
  effects: variantEffectsSchema.optional(),
76375
76517
  sizes: variantSizeOverridesSchema.optional(),
76376
76518
  affordance: buttonVariantAffordanceSchema.optional()
76377
76519
  });
76520
+ /**
76521
+ * Temporary persisted-theme admission boundary for issue #1206.
76522
+ *
76523
+ * Production inventory on 2026-07-22 found 22 rows using the old independent
76524
+ * `textColorToken`/border colour shape. New source and all downstream code use
76525
+ * only the canonical relationship. Delete this preprocessor after the reviewed
76526
+ * production rewrite reports zero legacy rows.
76527
+ */
76528
+ const buttonVariantSchema = z$1.preprocess(normalizeLegacyButtonVariantInput, canonicalButtonVariantSchema);
76378
76529
  const buttonSystemSchema = z$1.object({
76379
76530
  global: buttonGlobalSettingsSchema,
76380
76531
  variants: z$1.array(buttonVariantSchema).min(1).max(6),
76381
76532
  sizes: buttonSizesSchema.optional()
76382
76533
  });
76534
+ function normalizeLegacyButtonVariantInput(input) {
76535
+ if (!isUnknownRecord(input)) return input;
76536
+ const background = input.background;
76537
+ if (!isUnknownRecord(background)) return input;
76538
+ 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;
76539
+ const { textColorToken, ...withoutLegacyText } = input;
76540
+ const normalizedBorder = isUnknownRecord(input.border) && typeof input.border.widthClass === "string" ? { widthClass: input.border.widthClass } : input.border;
76541
+ const normalizedAffordance = isUnknownRecord(input.affordance) && typeof input.affordance.iconId === "string" ? { iconId: input.affordance.iconId } : input.affordance;
76542
+ const normalizedEffects = normalizeLegacyButtonEffects(input.effects, background.type);
76543
+ const hoverBackgroundToken = stripLegacyTokenAlpha(input.hoverBackgroundToken);
76544
+ if (background.type === "transparent") return {
76545
+ ...withoutLegacyText,
76546
+ background: {
76547
+ type: "surface",
76548
+ role: "link"
76549
+ },
76550
+ border: normalizedBorder,
76551
+ affordance: normalizedAffordance,
76552
+ effects: normalizedEffects,
76553
+ hoverBackgroundToken
76554
+ };
76555
+ if (background.type === "gradient") {
76556
+ const stops = Array.isArray(background.stops) ? background.stops.map(stripLegacyTokenAlpha) : background.stops;
76557
+ return {
76558
+ ...withoutLegacyText,
76559
+ background: {
76560
+ ...background,
76561
+ stops,
76562
+ foregroundToken: stripLegacyTokenAlpha(background.foregroundToken ?? textColorToken)
76563
+ },
76564
+ border: normalizedBorder,
76565
+ affordance: normalizedAffordance,
76566
+ effects: normalizedEffects,
76567
+ hoverBackgroundToken
76568
+ };
76569
+ }
76570
+ return {
76571
+ ...withoutLegacyText,
76572
+ background: background.type === "solid" ? {
76573
+ ...background,
76574
+ colorToken: stripLegacyTokenAlpha(background.colorToken)
76575
+ } : background,
76576
+ border: normalizedBorder,
76577
+ affordance: normalizedAffordance,
76578
+ effects: normalizedEffects,
76579
+ hoverBackgroundToken
76580
+ };
76581
+ }
76582
+ function normalizeLegacyButtonGlobalInput(input) {
76583
+ if (!isUnknownRecord(input)) return input;
76584
+ const hoverColorToken = stripLegacyTokenAlpha(input.hoverColorToken);
76585
+ return hoverColorToken === input.hoverColorToken ? input : {
76586
+ ...input,
76587
+ hoverColorToken
76588
+ };
76589
+ }
76590
+ function hasLegacyAlphaToken(input, background) {
76591
+ const stops = isUnknownArray$5(background.stops) ? background.stops : [];
76592
+ return [
76593
+ input.hoverBackgroundToken,
76594
+ background.colorToken,
76595
+ background.foregroundToken,
76596
+ ...stops
76597
+ ].some((token) => stripLegacyTokenAlpha(token) !== token);
76598
+ }
76599
+ function stripLegacyTokenAlpha(value) {
76600
+ if (typeof value !== "string") return value;
76601
+ const slashIndex = value.indexOf("/");
76602
+ return slashIndex < 0 ? value : value.slice(0, slashIndex);
76603
+ }
76604
+ function hasLegacyButtonEffects(input) {
76605
+ if (!isUnknownRecord(input)) return false;
76606
+ return [
76607
+ "base",
76608
+ "hover",
76609
+ "active",
76610
+ "focus"
76611
+ ].some((state) => {
76612
+ const effects = input[state];
76613
+ return Array.isArray(effects) && effects.some((effect) => {
76614
+ if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return true;
76615
+ const classification = classifyButtonEffectId(effect.effectId);
76616
+ if (classification !== "colour-transition" && classification !== "non-colour") return true;
76617
+ return effect.effectId === "background-on-hover" && isUnknownRecord(effect.options) && stripLegacyTokenAlpha(effect.options.colorToken) !== effect.options.colorToken;
76618
+ });
76619
+ });
76620
+ }
76621
+ function normalizeLegacyButtonEffects(input, backgroundType) {
76622
+ if (!isUnknownRecord(input)) return input;
76623
+ const normalized = {};
76624
+ for (const state of [
76625
+ "base",
76626
+ "hover",
76627
+ "active",
76628
+ "focus"
76629
+ ]) {
76630
+ const effects = input[state];
76631
+ if (!Array.isArray(effects)) continue;
76632
+ const safeEffects = effects.flatMap((effect) => {
76633
+ if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return [];
76634
+ const classification = classifyButtonEffectId(effect.effectId);
76635
+ if (classification === "non-colour") return [effect];
76636
+ if (classification !== "colour-transition") return [];
76637
+ if (effect.effectId === "background-on-hover") {
76638
+ const options = isUnknownRecord(effect.options) ? effect.options : null;
76639
+ const colorToken = options === null ? null : parseOpaqueButtonColourToken(stripLegacyTokenAlpha(options.colorToken));
76640
+ return colorToken === null ? [] : [{
76641
+ ...effect,
76642
+ options: {
76643
+ ...options,
76644
+ colorToken
76645
+ }
76646
+ }];
76647
+ }
76648
+ if (backgroundType !== "solid") return [];
76649
+ const rawAmount = isUnknownRecord(effect.options) ? effect.options.amount : void 0;
76650
+ const amount = typeof rawAmount === "number" && rawAmount > 0 ? Math.max(100, Math.round(rawAmount / 100) * 100) : 100;
76651
+ return [{
76652
+ ...effect,
76653
+ options: {
76654
+ ...isUnknownRecord(effect.options) ? effect.options : {},
76655
+ amount
76656
+ }
76657
+ }];
76658
+ });
76659
+ if (safeEffects.length > 0) normalized[state] = safeEffects;
76660
+ }
76661
+ return Object.keys(normalized).length === 0 ? void 0 : normalized;
76662
+ }
76663
+ function isUnknownRecord(value) {
76664
+ return typeof value === "object" && value !== null && !Array.isArray(value);
76665
+ }
76666
+ function isUnknownArray$5(value) {
76667
+ return Array.isArray(value);
76668
+ }
76383
76669
  //#endregion
76384
76670
  //#region ../theme-core/src/buttons/classNames.ts
76385
76671
  /**
@@ -76734,14 +77020,12 @@ const backgroundOnHoverEffect = {
76734
77020
  ]
76735
77021
  },
76736
77022
  generateCSS: (ctx) => {
76737
- const { themeId, variantId, options, tokens } = ctx;
77023
+ const { themeId, variantId, options, tokens, buttonConfig } = ctx;
76738
77024
  const colorToken = options.colorToken || "neutral-800";
76739
- const color = tokens.getColor(colorToken);
76740
- const textColorToken = typeof options.textColorToken === "string" ? options.textColorToken : null;
76741
77025
  return `
76742
77026
  /* Add background on hover */
76743
77027
  :where([data-theme-scope="${themeId}"]) .${variantId}:hover {
76744
- background-color: ${color};${textColorToken ? `\n color: ${tokens.getColor(textColorToken)};` : ""}
77028
+ background-color: ${tokens.getColor(colorToken)};${"textColorToken" in buttonConfig && typeof options.textColorToken === "string" ? `\n color: ${tokens.getColor(options.textColorToken)};` : ""}
76745
77029
  }
76746
77030
  `;
76747
77031
  }
@@ -76765,10 +77049,10 @@ const backgroundOnHoverAlphaEffect = {
76765
77049
  default: 50
76766
77050
  },
76767
77051
  generateCSS: (ctx) => {
76768
- const { themeId, variantId, stateGroup, options, buttonConfig } = ctx;
77052
+ const { themeId, variantId, stateGroup, options } = ctx;
76769
77053
  const rawOpacity = options.opacity;
76770
77054
  const clampedOpacity = Math.max(0, Math.min(100, typeof rawOpacity === "number" && !Number.isNaN(rawOpacity) ? rawOpacity : 50));
76771
- const cssVar = `var(--tb-${options.colorToken || buttonConfig.textColorToken || "neutral-800"})`;
77055
+ const cssVar = `var(--tb-${options.colorToken || "neutral-800"})`;
76772
77056
  return `
76773
77057
  /* Add semi-transparent background (${stateGroup}) */
76774
77058
  :where([data-theme-scope="${themeId}"]) .${variantId}${stateGroup === "base" ? "" : `:${stateGroup}`} {
@@ -76981,7 +77265,7 @@ const outerGlowEffect = {
76981
77265
  const spread = options.spread || 10;
76982
77266
  let glowColor;
76983
77267
  if (options.glowColorToken && typeof options.glowColorToken === "string") glowColor = tokens.getColor(options.glowColorToken);
76984
- else if (buttonConfig.border?.colorToken) glowColor = tokens.getColor(buttonConfig.border.colorToken);
77268
+ else if (buttonConfig.border) glowColor = "colorToken" in buttonConfig.border ? tokens.getColor(buttonConfig.border.colorToken) : "currentColor";
76985
77269
  else if (buttonConfig.background.type === "solid") glowColor = tokens.getColor(buttonConfig.background.colorToken ?? "primary-400");
76986
77270
  else glowColor = tokens.getColor("primary-400");
76987
77271
  return `
@@ -77971,31 +78255,6 @@ function generateSingleEffectCSS(themeId, variantId, stateGroup, effectApp, elem
77971
78255
  return effectPreset.generateCSS(ctx);
77972
78256
  }
77973
78257
  //#endregion
77974
- //#region ../theme-core/src/buttons/utils/contrast.ts
77975
- /**
77976
- * Get contrasting text color for a button background
77977
- *
77978
- * This function returns theme-aware text colors using the neutral scale,
77979
- * which is guaranteed to exist in every theme and harmonizes with the design.
77980
- *
77981
- * Uses neutral-50 (lightest) for dark backgrounds and neutral-950 (darkest)
77982
- * for light backgrounds. This ensures excellent contrast while respecting
77983
- * the theme's neutral palette (warm/cool tinting).
77984
- *
77985
- * For solid backgrounds with primary/secondary/neutral colors:
77986
- * - Dark backgrounds (shade >= 500): neutral-50 (very light)
77987
- * - Light backgrounds (shade < 500): neutral-950 (very dark)
77988
- */
77989
- function getContrastingTextColorToken(backgroundToken, theme) {
77990
- const isLightTheme = theme.palette.meta.mode === "light";
77991
- if (backgroundToken.startsWith("primary-") || backgroundToken.startsWith("secondary-")) return "neutral-50";
77992
- if (backgroundToken.startsWith("neutral-")) {
77993
- const match = backgroundToken.match(/neutral-(\d+)/);
77994
- if (match?.[1]) return parseInt(match[1], 10) >= 500 ? "neutral-50" : "neutral-950";
77995
- }
77996
- return isLightTheme ? "neutral-50" : "neutral-950";
77997
- }
77998
- //#endregion
77999
78258
  //#region ../theme-core/src/buttons/generateDefaultButtonSystem.ts
78000
78259
  /**
78001
78260
  * Map border width to border width class
@@ -78052,13 +78311,8 @@ function generateDefaultButtonSystem(theme) {
78052
78311
  priority: 1,
78053
78312
  background: {
78054
78313
  type: "solid",
78055
- colorToken: "primary"
78056
- },
78057
- textColorToken: getContrastingTextColorToken("primary", theme),
78058
- effects: { hover: [{
78059
- effectId: "opacity-reduce",
78060
- options: { reduction: 15 }
78061
- }] }
78314
+ colorToken: unsafeAsOpaqueButtonColourToken("primary")
78315
+ }
78062
78316
  },
78063
78317
  {
78064
78318
  id: "secondary",
@@ -78067,51 +78321,39 @@ function generateDefaultButtonSystem(theme) {
78067
78321
  priority: 2,
78068
78322
  background: {
78069
78323
  type: "solid",
78070
- colorToken: "neutral-700"
78071
- },
78072
- textColorToken: getContrastingTextColorToken("neutral-700", theme),
78073
- effects: { hover: [{
78074
- effectId: "opacity-reduce",
78075
- options: { reduction: 15 }
78076
- }] }
78324
+ colorToken: unsafeAsOpaqueButtonColourToken("neutral-700")
78325
+ }
78077
78326
  },
78078
78327
  {
78079
78328
  id: "outline",
78080
78329
  name: "Outline",
78081
78330
  enabled: true,
78082
78331
  priority: 3,
78083
- background: { type: "transparent" },
78084
- textColorToken: "primary",
78332
+ background: {
78333
+ type: "surface",
78334
+ role: "link"
78335
+ },
78085
78336
  shadow: {
78086
78337
  elevation: "none",
78087
78338
  softness: null,
78088
78339
  position: "bottom"
78089
78340
  },
78090
- border: {
78091
- colorToken: "primary",
78092
- widthClass: borderWidthClass
78093
- },
78094
- effects: { hover: [{
78095
- effectId: "opacity-reduce",
78096
- options: { reduction: 15 }
78097
- }] }
78341
+ border: { widthClass: borderWidthClass }
78098
78342
  },
78099
78343
  {
78100
78344
  id: "ghost",
78101
78345
  name: "Ghost",
78102
78346
  enabled: true,
78103
78347
  priority: 3,
78104
- background: { type: "transparent" },
78105
- textColorToken: "primary",
78348
+ background: {
78349
+ type: "surface",
78350
+ role: "link"
78351
+ },
78106
78352
  shadow: {
78107
78353
  elevation: "none",
78108
78354
  softness: null,
78109
78355
  position: "bottom"
78110
- },
78111
- effects: { hover: [{
78112
- effectId: "opacity-reduce",
78113
- options: { reduction: 15 }
78114
- }] }
78356
+ }
78115
78357
  }
78116
78358
  ];
78117
78359
  return {
@@ -78167,6 +78409,751 @@ function affordanceIconMaskUrl(iconId) {
78167
78409
  return `data:image/svg+xml,${`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>${paths.map((d) => `<path d='${d}'/>`).join("")}</svg>`.replace(/"/g, "'").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ")}`;
78168
78410
  }
78169
78411
  //#endregion
78412
+ //#region ../theme-core/src/palette/utils/colorConversion.ts
78413
+ const clamp01 = (x) => Math.max(0, Math.min(1, x));
78414
+ const mod = (a, n) => (a % n + n) % n;
78415
+ const deg = (x) => mod(x, 360);
78416
+ function hexToRgb(hex) {
78417
+ const h = hex.replace(/^#/, "");
78418
+ const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
78419
+ if (m.length !== 6) throw new Error("Bad hex");
78420
+ const int = parseInt(m, 16);
78421
+ return {
78422
+ r: int >> 16 & 255,
78423
+ g: int >> 8 & 255,
78424
+ b: int & 255
78425
+ };
78426
+ }
78427
+ function rgbToHex$1(r, g, b) {
78428
+ const to = (n) => Math.round(n).toString(16).padStart(2, "0");
78429
+ return `#${to(r)}${to(g)}${to(b)}`;
78430
+ }
78431
+ function srgbToLinear$1(u) {
78432
+ const x = u / 255;
78433
+ return x <= .04045 ? x / 12.92 : Math.pow((x + .055) / 1.055, 2.4);
78434
+ }
78435
+ function linearToSrgb(x) {
78436
+ return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
78437
+ }
78438
+ function rgbToHsl$1(r, g, b) {
78439
+ const R = r / 255, G = g / 255, B = b / 255;
78440
+ const max = Math.max(R, G, B), min = Math.min(R, G, B);
78441
+ const d = max - min;
78442
+ let h = 0;
78443
+ if (d !== 0) {
78444
+ switch (max) {
78445
+ case R:
78446
+ h = (G - B) / d + (G < B ? 6 : 0);
78447
+ break;
78448
+ case G:
78449
+ h = (B - R) / d + 2;
78450
+ break;
78451
+ case B:
78452
+ h = (R - G) / d + 4;
78453
+ break;
78454
+ }
78455
+ h *= 60;
78456
+ }
78457
+ const l = (max + min) / 2;
78458
+ const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
78459
+ return {
78460
+ h,
78461
+ s,
78462
+ l
78463
+ };
78464
+ }
78465
+ function srgbToOklab(r, g, b) {
78466
+ const R = srgbToLinear$1(r), G = srgbToLinear$1(g), B = srgbToLinear$1(b);
78467
+ const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
78468
+ const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
78469
+ const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
78470
+ const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
78471
+ return {
78472
+ L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
78473
+ a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
78474
+ b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
78475
+ };
78476
+ }
78477
+ function oklabToSrgb(L, a, b) {
78478
+ const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
78479
+ const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
78480
+ const s_ = Math.pow(L - .0894841775 * a - 1.291485548 * b, 3);
78481
+ const R = 4.0767416621 * l_ - 3.3077115913 * m_ + .2309699292 * s_;
78482
+ const G = -1.2684380046 * l_ + 2.6097574011 * m_ - .3413193965 * s_;
78483
+ const B = -.0041960863 * l_ - .7034186147 * m_ + 1.707614701 * s_;
78484
+ return {
78485
+ r: linearToSrgb(R),
78486
+ g: linearToSrgb(G),
78487
+ b: linearToSrgb(B)
78488
+ };
78489
+ }
78490
+ function oklabToOklch(L, a, b) {
78491
+ const C = Math.sqrt(a * a + b * b);
78492
+ return {
78493
+ L,
78494
+ C,
78495
+ h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
78496
+ };
78497
+ }
78498
+ function oklchToOklab(L, C, h) {
78499
+ const hr = h * Math.PI / 180;
78500
+ return {
78501
+ L,
78502
+ a: C * Math.cos(hr),
78503
+ b: C * Math.sin(hr)
78504
+ };
78505
+ }
78506
+ function inSRGB(r, g, b) {
78507
+ return r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255;
78508
+ }
78509
+ function oklchToHexGamut(L, C, h) {
78510
+ let lo = 0, hi = C, best = 0;
78511
+ for (let i = 0; i < 18; i++) {
78512
+ const mid = (lo + hi) / 2;
78513
+ const { a, b } = oklchToOklab(L, mid, h);
78514
+ const { r, g, b: bb } = oklabToSrgb(L, a, b);
78515
+ if (inSRGB(r, g, bb)) {
78516
+ best = mid;
78517
+ lo = mid;
78518
+ } else hi = mid;
78519
+ }
78520
+ const { a, b } = oklchToOklab(L, best, h);
78521
+ const { r, g, b: bb } = oklabToSrgb(L, a, b);
78522
+ return rgbToHex$1(r, g, bb);
78523
+ }
78524
+ function featuresFromHex(hex) {
78525
+ const { r, g, b } = hexToRgb(hex);
78526
+ const { h, s, l } = rgbToHsl$1(r, g, b);
78527
+ const { L, a, b: b2 } = srgbToOklab(r, g, b);
78528
+ const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
78529
+ return {
78530
+ r,
78531
+ g,
78532
+ b,
78533
+ h,
78534
+ s,
78535
+ l,
78536
+ v: Math.max(r, g, b) / 255,
78537
+ Y: .2126 * srgbToLinear$1(r) + .7152 * srgbToLinear$1(g) + .0722 * srgbToLinear$1(b),
78538
+ chroma: s,
78539
+ okL,
78540
+ okC,
78541
+ okH,
78542
+ hex
78543
+ };
78544
+ }
78545
+ //#endregion
78546
+ //#region ../theme-core/src/palette/generateShades.ts
78547
+ function generateShades(hexColor, name) {
78548
+ const shadeSteps = [
78549
+ 50,
78550
+ 100,
78551
+ 200,
78552
+ 300,
78553
+ 400,
78554
+ 500,
78555
+ 600,
78556
+ 700,
78557
+ 800,
78558
+ 900,
78559
+ 950
78560
+ ];
78561
+ const base = featuresFromHex(hexColor);
78562
+ const hue = base.okH;
78563
+ const baseChroma = base.okC;
78564
+ const toneMap = {
78565
+ 50: .975,
78566
+ 100: .945,
78567
+ 200: .89,
78568
+ 300: .82,
78569
+ 400: .74,
78570
+ 500: .66,
78571
+ 600: .58,
78572
+ 700: .49,
78573
+ 800: .4,
78574
+ 900: .28,
78575
+ 950: .16
78576
+ };
78577
+ const shadeDefs = shadeSteps.map((step, idx) => {
78578
+ const t = idx / (shadeSteps.length - 1);
78579
+ const L = toneMap[step];
78580
+ const C = baseChroma * (.06 + .94 * Math.sin(Math.PI * t));
78581
+ return {
78582
+ name: `${name}-${step}`,
78583
+ hex: oklchToHexGamut(L, C, hue)
78584
+ };
78585
+ });
78586
+ shadeDefs.push({
78587
+ name,
78588
+ hex: hexColor
78589
+ });
78590
+ return shadeDefs;
78591
+ }
78592
+ //#endregion
78593
+ //#region ../theme-core/src/palette/neutralScale.ts
78594
+ function generateNeutralScale({ background, steps = 11, warm = false }) {
78595
+ const isDark = background === "#000000" || background.startsWith("#0") || background.startsWith("#1");
78596
+ const shadeNames = [
78597
+ 50,
78598
+ 100,
78599
+ 200,
78600
+ 300,
78601
+ 400,
78602
+ 500,
78603
+ 600,
78604
+ 700,
78605
+ 800,
78606
+ 900,
78607
+ 950
78608
+ ];
78609
+ const count = Math.min(steps, shadeNames.length);
78610
+ const scale = [];
78611
+ for (let i = 0; i < count; i++) {
78612
+ const shadeName = shadeNames[i] ?? shadeNames[shadeNames.length - 1] ?? 950;
78613
+ const t = i / (count - 1);
78614
+ const hex = oklchToHexGamut(isDark ? mix(.06, .92, t) : mix(.98, .1, t), .02, warm ? 85 : 250);
78615
+ const name = `neutral-${shadeName}`;
78616
+ scale.push({
78617
+ name,
78618
+ hex
78619
+ });
78620
+ }
78621
+ return scale;
78622
+ }
78623
+ function mix(a, b, t) {
78624
+ return a + (b - a) * Math.max(0, Math.min(1, t));
78625
+ }
78626
+ //#endregion
78627
+ //#region ../theme-core/src/palette/utils/contrast.ts
78628
+ function relativeLuminance$1(r, g, b) {
78629
+ const R = srgbToLinear$1(r), G = srgbToLinear$1(g), B = srgbToLinear$1(b);
78630
+ return .2126 * R + .7152 * G + .0722 * B;
78631
+ }
78632
+ function contrastRatio$1(hex1, hex2) {
78633
+ const { r: r1, g: g1, b: b1 } = hexToRgb(hex1);
78634
+ const { r: r2, g: g2, b: b2 } = hexToRgb(hex2);
78635
+ const L1 = relativeLuminance$1(r1, g1, b1);
78636
+ const L2 = relativeLuminance$1(r2, g2, b2);
78637
+ const [hi, lo] = L1 >= L2 ? [L1, L2] : [L2, L1];
78638
+ return (hi + .05) / (lo + .05);
78639
+ }
78640
+ //#endregion
78641
+ //#region ../theme-core/src/palette/utils/textColor.ts
78642
+ /**
78643
+ * Pick the better of black/white text for a given background using actual
78644
+ * contrast ratios, not a simple luminance cutoff.
78645
+ *
78646
+ * @param background - Background color in hex or rgb/rgba format (e.g., '#FFFFFF' or 'rgb(255, 255, 255)')
78647
+ * @param minContrast - Preferred minimum contrast ratio for body-sized text
78648
+ * @returns '#000000' for light backgrounds, '#FFFFFF' for dark backgrounds
78649
+ */
78650
+ function pickBlackOrWhiteTextColor(background, minContrast = 4.5) {
78651
+ const { r, g, b } = parseColorToRgb(background);
78652
+ const luminance = relativeLuminance$1(r, g, b);
78653
+ const blackContrast = (luminance + .05) / .05;
78654
+ const whiteContrast = 1.05 / (luminance + .05);
78655
+ if (blackContrast >= minContrast && whiteContrast < minContrast) return "#000000";
78656
+ if (whiteContrast >= minContrast && blackContrast < minContrast) return "#FFFFFF";
78657
+ return blackContrast >= whiteContrast ? "#000000" : "#FFFFFF";
78658
+ }
78659
+ /**
78660
+ * Backwards-compatible alias for callers that want the best black/white text
78661
+ * color for a background.
78662
+ */
78663
+ function getTextColorForBackground(background) {
78664
+ return pickBlackOrWhiteTextColor(background);
78665
+ }
78666
+ function parseColorToRgb(input) {
78667
+ const trimmed = input.trim();
78668
+ if (trimmed.startsWith("#")) return hexToRgb(trimmed);
78669
+ 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);
78670
+ if (rgbMatch?.[1] && rgbMatch[2] && rgbMatch[3]) return {
78671
+ r: clamp255(Number(rgbMatch[1])),
78672
+ g: clamp255(Number(rgbMatch[2])),
78673
+ b: clamp255(Number(rgbMatch[3]))
78674
+ };
78675
+ throw new Error("Unsupported color format");
78676
+ }
78677
+ function clamp255(value) {
78678
+ if (Number.isNaN(value)) return 0;
78679
+ return Math.max(0, Math.min(255, value));
78680
+ }
78681
+ //#endregion
78682
+ //#region ../theme-core/src/palette/utils/onColor.ts
78683
+ const BACKGROUND_ROLE_NAMES = /* @__PURE__ */ new Set([
78684
+ "primary",
78685
+ "secondary",
78686
+ "accent",
78687
+ "success",
78688
+ "warning",
78689
+ "destructive",
78690
+ "info",
78691
+ "background",
78692
+ "surface",
78693
+ "surfaceAlt",
78694
+ "muted",
78695
+ "neutral"
78696
+ ]);
78697
+ function onColorTokenName(backgroundToken) {
78698
+ return `on${backgroundToken.split("-").filter((part) => part.length > 0).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`;
78699
+ }
78700
+ function isOnColorBackgroundCandidateToken(token) {
78701
+ const role = token.match(/^(.*?)(?:-\d{2,3})?$/)?.[1] ?? token;
78702
+ return BACKGROUND_ROLE_NAMES.has(role);
78703
+ }
78704
+ //#endregion
78705
+ //#region ../theme-core/src/palette/expandPalette.ts
78706
+ function colorsToMap(palette) {
78707
+ const map = {};
78708
+ for (const c of palette.colors) map[c.name] = c.hex;
78709
+ return map;
78710
+ }
78711
+ function isBackgroundDark(hex) {
78712
+ try {
78713
+ return featuresFromHex(hex).Y < .5;
78714
+ } catch {
78715
+ return false;
78716
+ }
78717
+ }
78718
+ const nonShadeablePaletteRoleNames = /* @__PURE__ */ new Set([
78719
+ "success",
78720
+ "warning",
78721
+ "destructive"
78722
+ ]);
78723
+ function expandPalette(palette) {
78724
+ const base = colorsToMap(palette);
78725
+ const expanded = { ...base };
78726
+ generateNeutralScale({
78727
+ background: base.background || base.surface || "#ffffff",
78728
+ steps: 11,
78729
+ warm: false
78730
+ }).forEach((n) => {
78731
+ expanded[n.name] = n.hex;
78732
+ });
78733
+ for (const [name, hex] of Object.entries(base)) {
78734
+ if (nonShadeablePaletteRoleNames.has(name)) continue;
78735
+ if (hex) generateShades(hex, name).forEach((shade) => {
78736
+ expanded[shade.name] = shade.hex;
78737
+ });
78738
+ }
78739
+ if (base.text) expanded.body = base.text;
78740
+ if (base.danger && !base.destructive) expanded.destructive = base.danger;
78741
+ const isDark = base.background ? isBackgroundDark(base.background) : false;
78742
+ expanded.mutedText = palette.meta?.mode === "dark" || isDark ? expanded["neutral-600"] ?? "#666" : expanded["neutral-500"] ?? "#888";
78743
+ for (const [token, hex] of Object.entries({ ...expanded })) {
78744
+ if (!hex || !isOnColorBackgroundCandidateToken(token)) continue;
78745
+ const onToken = onColorTokenName(token);
78746
+ if (expanded[onToken]) continue;
78747
+ expanded[onToken] = getTextColorForBackground(hex);
78748
+ }
78749
+ return expanded;
78750
+ }
78751
+ //#endregion
78752
+ //#region ../theme-core/src/buttons/resolveButtonColourStates.ts
78753
+ const BUTTON_VISUAL_STATES = [
78754
+ "base",
78755
+ "hover",
78756
+ "focus",
78757
+ "active",
78758
+ "disabled"
78759
+ ];
78760
+ const BUTTON_CONTRAST_POLICY = {
78761
+ textMinimumRatio: 4.5,
78762
+ nonTextMinimumRatio: 3,
78763
+ gradientSamplesPerSegment: 20,
78764
+ alphaBackgrounds: "reject-without-known-surface",
78765
+ disabled: "retain-full-colour-contract"
78766
+ };
78767
+ function compileButtonColourStates(input) {
78768
+ const baseTransition = applyColourEffects({
78769
+ variantId: input.variant.id,
78770
+ state: "base",
78771
+ treatment: input.variant.background,
78772
+ effects: input.variant.effects?.base,
78773
+ palette: input.palette
78774
+ });
78775
+ if (!baseTransition.ok) return baseTransition;
78776
+ const stateTreatments = {
78777
+ base: baseTransition.treatment,
78778
+ hover: hoverTreatment(input.variant, input.global, baseTransition.treatment),
78779
+ focus: baseTransition.treatment,
78780
+ active: baseTransition.treatment,
78781
+ disabled: baseTransition.treatment
78782
+ };
78783
+ const nonColourEffects = { ...baseTransition.nonColourEffects.length > 0 ? { base: [...baseTransition.nonColourEffects] } : {} };
78784
+ for (const state of [
78785
+ "hover",
78786
+ "focus",
78787
+ "active"
78788
+ ]) {
78789
+ const transition = applyColourEffects({
78790
+ variantId: input.variant.id,
78791
+ state,
78792
+ treatment: stateTreatments[state],
78793
+ effects: input.variant.effects?.[state],
78794
+ palette: input.palette
78795
+ });
78796
+ if (!transition.ok) return transition;
78797
+ stateTreatments[state] = transition.treatment;
78798
+ if (transition.nonColourEffects.length > 0) nonColourEffects[state] = [...transition.nonColourEffects];
78799
+ }
78800
+ const resolved = {};
78801
+ for (const state of BUTTON_VISUAL_STATES) {
78802
+ const result = resolveTreatment({
78803
+ variantId: input.variant.id,
78804
+ state,
78805
+ treatment: stateTreatments[state],
78806
+ palette: input.palette
78807
+ });
78808
+ if (!result.ok) return result;
78809
+ resolved[state] = result.colour;
78810
+ }
78811
+ return {
78812
+ ok: true,
78813
+ states: resolved,
78814
+ focusIndicator: resolveFocusIndicator(resolved.focus),
78815
+ nonColourEffects
78816
+ };
78817
+ }
78818
+ function formatButtonColourContractError(error) {
78819
+ switch (error.tag) {
78820
+ case "unknown_palette_token": return `Button "${error.variantId}" ${error.state} state uses unknown palette token "${error.token}".`;
78821
+ case "missing_on_colour": return `Button "${error.variantId}" ${error.state} state cannot derive ${error.foregroundToken} from ${error.backgroundToken}.`;
78822
+ case "insufficient_contrast": return `Button "${error.variantId}" ${error.state} state has ${error.ratio.toFixed(2)}:1 contrast (${error.requiredRatio}:1 required).`;
78823
+ case "unsupported_colour_effect": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" is not contrast-safe (${error.reason}).`;
78824
+ case "invalid_colour_effect_options": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" has an invalid ${error.option} option.`;
78825
+ case "inapplicable_colour_effect": return `Button "${error.variantId}" ${error.state} effect "${error.effectId}" cannot apply to a ${error.treatment} treatment.`;
78826
+ case "unknown_button_effect": return `Button "${error.variantId}" ${error.state} uses unknown effect "${error.effectId}".`;
78827
+ }
78828
+ }
78829
+ function hoverTreatment(variant, global, fallback) {
78830
+ const token = variant.hoverBackgroundToken ?? (global.hoverColor === "token" ? global.hoverColorToken : void 0);
78831
+ return token === void 0 ? fallback : {
78832
+ type: "solid",
78833
+ colorToken: token
78834
+ };
78835
+ }
78836
+ function applyColourEffects(input) {
78837
+ let treatment = input.treatment;
78838
+ const nonColourEffects = [];
78839
+ for (const effect of input.effects ?? []) {
78840
+ const policy = getButtonEffectPolicy(effect.effectId);
78841
+ if (policy === null) return unknownEffect(input, effect);
78842
+ switch (policy.classification) {
78843
+ case "non-colour":
78844
+ nonColourEffects.push(effect);
78845
+ break;
78846
+ case "unsupported-colour":
78847
+ case "unsupported-background-overlay":
78848
+ case "not-button": return unsupportedEffect(input, effect, policy.reason);
78849
+ case "colour-transition":
78850
+ if (policy.transition.kind === "adjust-shade") {
78851
+ if (treatment.type !== "solid") return inapplicableEffect(input, effect, treatment);
78852
+ const amount = readShadeAmount(effect);
78853
+ if (amount === null) return invalidEffectOption(input, effect, "amount");
78854
+ const signedAmount = policy.transition.direction === "darker" ? amount : -amount;
78855
+ treatment = {
78856
+ type: "solid",
78857
+ colorToken: adjustShade(treatment.colorToken, signedAmount, input.palette)
78858
+ };
78859
+ break;
78860
+ }
78861
+ if (policy.transition.kind === "replace-background") {
78862
+ const colorToken = readOpaqueToken(effect, "colorToken", "neutral-800");
78863
+ if (colorToken === null) return invalidEffectOption(input, effect, "colorToken");
78864
+ treatment = {
78865
+ type: "solid",
78866
+ colorToken
78867
+ };
78868
+ break;
78869
+ }
78870
+ return unknownEffect(input, effect);
78871
+ }
78872
+ }
78873
+ return {
78874
+ ok: true,
78875
+ treatment,
78876
+ nonColourEffects
78877
+ };
78878
+ }
78879
+ function resolveTreatment(input) {
78880
+ const treatment = input.treatment;
78881
+ switch (treatment.type) {
78882
+ case "surface": return {
78883
+ ok: true,
78884
+ colour: {
78885
+ kind: "surface",
78886
+ role: treatment.role,
78887
+ backgroundCss: "transparent",
78888
+ foregroundCss: surfaceForegroundValue(treatment.role)
78889
+ }
78890
+ };
78891
+ case "solid": return resolveSolid(input, treatment.colorToken);
78892
+ case "gradient": return resolveGradient(input, treatment);
78893
+ }
78894
+ }
78895
+ function resolveFocusIndicator(colour) {
78896
+ switch (colour.kind) {
78897
+ case "solid": return {
78898
+ kind: "two-tone",
78899
+ innerCss: colour.foregroundCss,
78900
+ outerCss: colour.backgroundCss,
78901
+ minimumPairContrast: BUTTON_CONTRAST_POLICY.textMinimumRatio
78902
+ };
78903
+ case "gradient": return {
78904
+ kind: "two-tone",
78905
+ innerCss: colour.foregroundCss,
78906
+ outerCss: tokenCss(colour.backgroundTokens[0]),
78907
+ minimumPairContrast: BUTTON_CONTRAST_POLICY.textMinimumRatio
78908
+ };
78909
+ case "surface": return {
78910
+ kind: "surface-role",
78911
+ colorCss: colour.foregroundCss,
78912
+ minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
78913
+ };
78914
+ }
78915
+ }
78916
+ function resolveSolid(input, backgroundToken) {
78917
+ const backgroundHex = paletteHex(input, backgroundToken);
78918
+ if (!backgroundHex.ok) return backgroundHex;
78919
+ const foregroundToken = unsafeAsOpaqueButtonColourToken(onColorTokenName(backgroundToken));
78920
+ const foregroundHex = input.palette[foregroundToken];
78921
+ if (typeof foregroundHex !== "string") return {
78922
+ ok: false,
78923
+ error: {
78924
+ tag: "missing_on_colour",
78925
+ variantId: input.variantId,
78926
+ state: input.state,
78927
+ backgroundToken,
78928
+ foregroundToken
78929
+ }
78930
+ };
78931
+ const contrast = validateContrast({
78932
+ ...input,
78933
+ background: backgroundToken,
78934
+ backgroundHex: backgroundHex.hex,
78935
+ foreground: foregroundToken,
78936
+ foregroundHex
78937
+ });
78938
+ if (!contrast.ok) return contrast;
78939
+ return {
78940
+ ok: true,
78941
+ colour: {
78942
+ kind: "solid",
78943
+ backgroundToken,
78944
+ foregroundToken,
78945
+ backgroundCss: tokenCss(backgroundToken),
78946
+ foregroundCss: tokenCss(foregroundToken)
78947
+ }
78948
+ };
78949
+ }
78950
+ function resolveGradient(input, treatment) {
78951
+ const foregroundHex = paletteHex(input, treatment.foregroundToken);
78952
+ if (!foregroundHex.ok) return foregroundHex;
78953
+ const stopHexes = [];
78954
+ for (const token of treatment.stops) {
78955
+ const stop = paletteHex(input, token);
78956
+ if (!stop.ok) return stop;
78957
+ stopHexes.push(stop.hex);
78958
+ }
78959
+ for (let segment = 0; segment < stopHexes.length - 1; segment += 1) {
78960
+ const start = stopHexes[segment];
78961
+ const end = stopHexes[segment + 1];
78962
+ const startToken = treatment.stops[segment];
78963
+ const endToken = treatment.stops[segment + 1];
78964
+ if (start === void 0 || end === void 0 || startToken === void 0 || endToken === void 0) continue;
78965
+ for (let sample = 0; sample <= BUTTON_CONTRAST_POLICY.gradientSamplesPerSegment; sample += 1) {
78966
+ const position = sample / BUTTON_CONTRAST_POLICY.gradientSamplesPerSegment;
78967
+ const sampleHex = interpolateHex(start, end, position);
78968
+ const contrast = validateContrast({
78969
+ ...input,
78970
+ background: `${startToken}→${endToken}@${position.toFixed(2)}`,
78971
+ backgroundHex: sampleHex,
78972
+ foreground: treatment.foregroundToken,
78973
+ foregroundHex: foregroundHex.hex
78974
+ });
78975
+ if (!contrast.ok) return contrast;
78976
+ }
78977
+ }
78978
+ const direction = GRADIENT_DIRECTION_MAP$1[treatment.direction] ?? "to right";
78979
+ return {
78980
+ ok: true,
78981
+ colour: {
78982
+ kind: "gradient",
78983
+ backgroundTokens: treatment.stops,
78984
+ foregroundToken: treatment.foregroundToken,
78985
+ backgroundCss: `linear-gradient(${direction}, ${treatment.stops.map(tokenCss).join(", ")})`,
78986
+ foregroundCss: tokenCss(treatment.foregroundToken)
78987
+ }
78988
+ };
78989
+ }
78990
+ function paletteHex(input, token) {
78991
+ const hex = input.palette[token];
78992
+ return typeof hex === "string" ? {
78993
+ ok: true,
78994
+ hex
78995
+ } : {
78996
+ ok: false,
78997
+ error: {
78998
+ tag: "unknown_palette_token",
78999
+ variantId: input.variantId,
79000
+ state: input.state,
79001
+ token
79002
+ }
79003
+ };
79004
+ }
79005
+ function validateContrast(input) {
79006
+ const ratio = contrastRatio$1(input.backgroundHex, input.foregroundHex);
79007
+ return ratio >= BUTTON_CONTRAST_POLICY.textMinimumRatio ? { ok: true } : {
79008
+ ok: false,
79009
+ error: {
79010
+ tag: "insufficient_contrast",
79011
+ variantId: input.variantId,
79012
+ state: input.state,
79013
+ background: input.background,
79014
+ foreground: input.foreground,
79015
+ ratio,
79016
+ requiredRatio: BUTTON_CONTRAST_POLICY.textMinimumRatio
79017
+ }
79018
+ };
79019
+ }
79020
+ function tokenCss(token) {
79021
+ return `rgb(var(--tb-${token}))`;
79022
+ }
79023
+ function adjustShade(token, amount, palette) {
79024
+ const match = token.match(/^(.*)-(\d{2,3})$/);
79025
+ const base = match?.[1] ?? token;
79026
+ const currentShade = match?.[2] === void 0 ? 500 : Number(match[2]);
79027
+ const availableShades = [
79028
+ 50,
79029
+ 100,
79030
+ 200,
79031
+ 300,
79032
+ 400,
79033
+ 500,
79034
+ 600,
79035
+ 700,
79036
+ 800,
79037
+ 900,
79038
+ 950
79039
+ ].filter((shade) => typeof palette[`${base}-${shade}`] === "string");
79040
+ if (availableShades.length === 0) return token;
79041
+ const firstShade = availableShades[0];
79042
+ if (firstShade === void 0) return token;
79043
+ const exactIndex = availableShades.indexOf(currentShade);
79044
+ const startingIndex = exactIndex >= 0 ? exactIndex : availableShades.indexOf(availableShades.reduce((closestShade, shade) => Math.abs(shade - currentShade) < Math.abs(closestShade - currentShade) ? shade : closestShade, firstShade));
79045
+ const stepCount = Math.abs(amount) / 100;
79046
+ const direction = amount < 0 ? -1 : 1;
79047
+ const targetShade = availableShades[Math.max(0, Math.min(availableShades.length - 1, startingIndex + direction * stepCount))];
79048
+ return targetShade === void 0 ? token : unsafeAsOpaqueButtonColourToken(`${base}-${targetShade}`);
79049
+ }
79050
+ function readShadeAmount(effect) {
79051
+ const value = effect.options?.amount ?? 100;
79052
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 && value % 100 === 0 ? value : null;
79053
+ }
79054
+ function readOpaqueToken(effect, key, fallback) {
79055
+ return parseOpaqueButtonColourToken(effect.options?.[key] ?? fallback);
79056
+ }
79057
+ function unsupportedEffect(input, effect, reason) {
79058
+ return {
79059
+ ok: false,
79060
+ error: {
79061
+ tag: "unsupported_colour_effect",
79062
+ variantId: input.variantId,
79063
+ state: input.state,
79064
+ effectId: effect.effectId,
79065
+ reason
79066
+ }
79067
+ };
79068
+ }
79069
+ function invalidEffectOption(input, effect, option) {
79070
+ return {
79071
+ ok: false,
79072
+ error: {
79073
+ tag: "invalid_colour_effect_options",
79074
+ variantId: input.variantId,
79075
+ state: input.state,
79076
+ effectId: effect.effectId,
79077
+ option
79078
+ }
79079
+ };
79080
+ }
79081
+ function inapplicableEffect(input, effect, treatment) {
79082
+ return {
79083
+ ok: false,
79084
+ error: {
79085
+ tag: "inapplicable_colour_effect",
79086
+ variantId: input.variantId,
79087
+ state: input.state,
79088
+ effectId: effect.effectId,
79089
+ treatment: treatment.type
79090
+ }
79091
+ };
79092
+ }
79093
+ function unknownEffect(input, effect) {
79094
+ return {
79095
+ ok: false,
79096
+ error: {
79097
+ tag: "unknown_button_effect",
79098
+ variantId: input.variantId,
79099
+ state: input.state,
79100
+ effectId: effect.effectId
79101
+ }
79102
+ };
79103
+ }
79104
+ function interpolateHex(startHex, endHex, position) {
79105
+ const start = hexToRgb(startHex);
79106
+ const end = hexToRgb(endHex);
79107
+ const channel = (from, to) => Math.round(from + (to - from) * position).toString(16).padStart(2, "0");
79108
+ return `#${channel(start.r, end.r)}${channel(start.g, end.g)}${channel(start.b, end.b)}`;
79109
+ }
79110
+ //#endregion
79111
+ //#region ../theme-core/src/buttons/resolvedButtonCss.ts
79112
+ /**
79113
+ * Canonical colour declaration mapping shared by full themes and ThemeBridge.
79114
+ * Both background properties are always emitted so transitions cannot retain
79115
+ * a stale gradient or solid layer.
79116
+ */
79117
+ function resolvedButtonColourDeclarations(colour) {
79118
+ switch (colour.kind) {
79119
+ case "solid": return [
79120
+ ["background-color", colour.backgroundCss],
79121
+ ["background-image", "none"],
79122
+ ["color", colour.foregroundCss]
79123
+ ];
79124
+ case "gradient": return [
79125
+ ["background-color", "transparent"],
79126
+ ["background-image", colour.backgroundCss],
79127
+ ["color", colour.foregroundCss]
79128
+ ];
79129
+ case "surface": return [
79130
+ ["background-color", colour.backgroundCss],
79131
+ ["background-image", "none"],
79132
+ ["color", colour.foregroundCss]
79133
+ ];
79134
+ }
79135
+ }
79136
+ function resolvedButtonFocusDeclarations(indicator) {
79137
+ return indicator.kind === "two-tone" ? [
79138
+ ["outline", `2px solid ${indicator.innerCss}`],
79139
+ ["outline-offset", "2px"],
79140
+ ["box-shadow", `0 0 0 4px ${indicator.outerCss}`]
79141
+ ] : [["outline", `3px solid ${indicator.colorCss}`], ["outline-offset", "3px"]];
79142
+ }
79143
+ /**
79144
+ * Disabled buttons retain their validated colour pair and add a non-layout
79145
+ * visual affordance. `currentColor` keeps the cue inside the same contrast
79146
+ * relationship, while retaining pointer events lets the not-allowed cursor
79147
+ * remain observable.
79148
+ */
79149
+ const RESOLVED_BUTTON_DISABLED_DECLARATIONS = [
79150
+ ["cursor", "not-allowed"],
79151
+ ["transform", "none"],
79152
+ ["box-shadow", "none"],
79153
+ ["outline", "2px dashed currentColor"],
79154
+ ["outline-offset", "-4px"]
79155
+ ];
79156
+ //#endregion
78170
79157
  //#region ../theme-core/src/buttons/generateButtonCss.ts
78171
79158
  /**
78172
79159
  * Class the `button` runtime node adds when it renders its own trailing icon,
@@ -78233,6 +79220,7 @@ const STRUCTURAL_DECLARATIONS = [
78233
79220
  function generateButtonCss(options) {
78234
79221
  const { themeId, theme, buttonSystem: providedButtonSystem } = options;
78235
79222
  const tokens = new TokenResolver(theme);
79223
+ const palette = expandPalette(theme.palette);
78236
79224
  const buttonSystem = providedButtonSystem ?? generateDefaultButtonSystem(theme);
78237
79225
  const themeSizes = {
78238
79226
  ...DEFAULT_BUTTON_SIZES,
@@ -78241,34 +79229,109 @@ function generateButtonCss(options) {
78241
79229
  const enabledVariants = buttonSystem.variants.filter((v) => v.enabled);
78242
79230
  const aliasSource = resolveAliasSource(enabledVariants);
78243
79231
  const chunks = [];
78244
- for (const variant of enabledVariants) chunks.push(...variantChunks(variant, buttonSystem.global, themeSizes, themeId, tokens, theme));
79232
+ for (const variant of enabledVariants) {
79233
+ const compiled = compileRuntimeVariant(variant, buttonSystem.global, palette);
79234
+ if (compiled.fallbackError) chunks.push({ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` });
79235
+ chunks.push(...variantChunks(compiled.variant, compiled.global, themeSizes, themeId, tokens, theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects));
79236
+ }
78245
79237
  if (aliasSource) {
78246
- const alias = {
79238
+ const compiled = compileRuntimeVariant({
78247
79239
  ...aliasSource,
78248
79240
  id: DEFAULT_VARIANT_ALIAS_ID,
78249
79241
  name: "Default"
78250
- };
78251
- chunks.push(...variantChunks(alias, buttonSystem.global, themeSizes, themeId, tokens, theme));
79242
+ }, buttonSystem.global, palette);
79243
+ if (compiled.fallbackError) chunks.push({ raw: `/* ${formatButtonColourContractError(compiled.fallbackError)} Using contrast-safe surface fallback. */` });
79244
+ chunks.push(...variantChunks(compiled.variant, compiled.global, themeSizes, themeId, tokens, theme, compiled.colours, compiled.focusIndicator, compiled.nonColourEffects));
78252
79245
  }
78253
79246
  return chunks.map(renderChunk).join("\n\n");
78254
79247
  }
79248
+ function compileRuntimeVariant(variant, global, palette) {
79249
+ const result = compileButtonColourStates({
79250
+ variant,
79251
+ global,
79252
+ palette
79253
+ });
79254
+ if (result.ok) return {
79255
+ variant,
79256
+ global,
79257
+ colours: result.states,
79258
+ focusIndicator: result.focusIndicator,
79259
+ nonColourEffects: result.nonColourEffects
79260
+ };
79261
+ const fallbackVariant = {
79262
+ ...variant,
79263
+ background: {
79264
+ type: "surface",
79265
+ role: "link"
79266
+ },
79267
+ hoverBackgroundToken: void 0,
79268
+ effects: void 0
79269
+ };
79270
+ const fallbackGlobal = {
79271
+ ...global,
79272
+ hoverColor: "none",
79273
+ hoverColorToken: void 0
79274
+ };
79275
+ const fallback = compileButtonColourStates({
79276
+ variant: fallbackVariant,
79277
+ global: fallbackGlobal,
79278
+ palette
79279
+ });
79280
+ if (!fallback.ok) {
79281
+ const colour = {
79282
+ kind: "surface",
79283
+ role: "link",
79284
+ backgroundCss: "transparent",
79285
+ foregroundCss: surfaceForegroundValue("link")
79286
+ };
79287
+ return {
79288
+ variant: fallbackVariant,
79289
+ global: fallbackGlobal,
79290
+ colours: {
79291
+ base: colour,
79292
+ hover: colour,
79293
+ focus: colour,
79294
+ active: colour,
79295
+ disabled: colour
79296
+ },
79297
+ focusIndicator: {
79298
+ kind: "surface-role",
79299
+ colorCss: colour.foregroundCss,
79300
+ minimumSurfaceContrast: BUTTON_CONTRAST_POLICY.nonTextMinimumRatio
79301
+ },
79302
+ nonColourEffects: {},
79303
+ fallbackError: result.error
79304
+ };
79305
+ }
79306
+ return {
79307
+ variant: fallbackVariant,
79308
+ global: fallbackGlobal,
79309
+ colours: fallback.states,
79310
+ focusIndicator: fallback.focusIndicator,
79311
+ nonColourEffects: fallback.nonColourEffects,
79312
+ fallbackError: result.error
79313
+ };
79314
+ }
78255
79315
  /** Pick the highest-priority variant whose role we'll alias to `.default`. */
78256
79316
  function resolveAliasSource(enabled) {
78257
79317
  if (enabled.some((v) => v.id === "default")) return null;
78258
79318
  return enabled.slice().sort((a, b) => a.priority - b.priority)[0] ?? null;
78259
79319
  }
78260
- function variantChunks(variant, global, themeSizes, themeId, tokens, theme) {
79320
+ function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colours, focusIndicator, nonColourEffects) {
78261
79321
  const out = [];
78262
79322
  const variantId = parseButtonVariantIdForCss(variant.id);
78263
79323
  const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
78264
- out.push(variantBaseRule(variant, selector, global, tokens, theme));
79324
+ out.push(variantBaseRule(variant, selector, global, tokens, theme, colours.base));
78265
79325
  out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
78266
- const hoverBg = variantHoverBackgroundRule(variant, variantId, global, themeId, tokens);
78267
- if (hoverBg) out.push(hoverBg);
78268
- out.push(variantFocusVisibleRule(variantId, themeId));
78269
- const effects = variantEffectsCss(variant, themeId, tokens, theme);
79326
+ for (const state of [
79327
+ "hover",
79328
+ "focus",
79329
+ "active"
79330
+ ]) if (!resolvedColoursEqual(colours.base, colours[state])) out.push(variantStateColourRule(variantId, themeId, state, colours[state]));
79331
+ const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
78270
79332
  if (effects) out.push({ raw: effects });
78271
- const affordance = variantAffordanceRule(variant, selector, tokens);
79333
+ out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator));
79334
+ const affordance = variantAffordanceRule(variant, selector);
78272
79335
  if (affordance) out.push(affordance);
78273
79336
  out.push(...variantDisabledRules(variantId, themeId));
78274
79337
  out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
@@ -78283,12 +79346,11 @@ function variantChunks(variant, global, themeSizes, themeId, tokens, theme) {
78283
79346
  * one (node overrides personality). Colour comes from the affordance token, or
78284
79347
  * `currentColor` (the button text colour) when no token is given.
78285
79348
  */
78286
- function variantAffordanceRule(variant, selector, tokens) {
79349
+ function variantAffordanceRule(variant, selector) {
78287
79350
  const affordance = variant.affordance;
78288
79351
  if (!affordance) return null;
78289
79352
  const maskUrl = affordanceIconMaskUrl(affordance.iconId);
78290
79353
  if (!maskUrl) return null;
78291
- const color = affordance.colorToken ? variant.background.type === "transparent" ? surfaceLinkColor(tokens.getColor(affordance.colorToken)) : tokens.getColor(affordance.colorToken) : "currentColor";
78292
79354
  const mask = `url("${maskUrl}") no-repeat center / contain`;
78293
79355
  return rule(`${selector}:not(.${AFFORDANCE_SUPPRESS_CLASS})::after`, [
78294
79356
  ["content", "\"\""],
@@ -78297,7 +79359,7 @@ function variantAffordanceRule(variant, selector, tokens) {
78297
79359
  ["height", "1em"],
78298
79360
  ["margin-inline-start", "0.5em"],
78299
79361
  ["flex", "0 0 auto"],
78300
- ["background-color", color],
79362
+ ["background-color", "currentColor"],
78301
79363
  ["-webkit-mask", mask],
78302
79364
  ["mask", mask]
78303
79365
  ]);
@@ -78307,7 +79369,7 @@ function parseButtonVariantIdForCss(value) {
78307
79369
  if (!variantId) throw new Error("Button variant id must be a non-empty string");
78308
79370
  return variantId;
78309
79371
  }
78310
- function variantBaseRule(variant, selector, global, tokens, theme) {
79372
+ function variantBaseRule(variant, selector, global, tokens, theme, colour) {
78311
79373
  const decls = [];
78312
79374
  decls.push(["font-weight", String(global.fontWeight)]);
78313
79375
  decls.push(["font-family", resolveFontFamily(global)]);
@@ -78319,18 +79381,10 @@ function variantBaseRule(variant, selector, global, tokens, theme) {
78319
79381
  for (const decl of STRUCTURAL_DECLARATIONS) decls.push(decl);
78320
79382
  decls.push(["border-radius", resolveBorderRadius(variant, global)]);
78321
79383
  decls.push(["box-shadow", resolveBoxShadow(variant, global, theme, tokens)]);
78322
- if (variant.background.type === "solid") decls.push(["background-color", tokens.getColor(variant.background.colorToken)]);
78323
- else if (variant.background.type === "gradient") {
78324
- const colors = variant.background.stops.map((stop) => tokens.getColor(stop)).join(", ");
78325
- const direction = GRADIENT_DIRECTION_MAP$1[variant.background.direction] || "to right";
78326
- decls.push(["background-image", `linear-gradient(${direction}, ${colors})`]);
78327
- } else decls.push(["background-color", "transparent"]);
78328
- const foregroundColor = variant.background.type === "transparent" ? surfaceLinkColor(tokens.getColor(variant.textColorToken)) : tokens.getColor(variant.textColorToken);
78329
- decls.push(["color", foregroundColor]);
79384
+ decls.push(...resolvedButtonColourDeclarations(colour));
78330
79385
  if (variant.border) {
78331
79386
  const borderWidth = BORDER_WIDTH_MAP[variant.border.widthClass] || "1px";
78332
- const borderColor = variant.background.type === "transparent" ? surfaceLinkColor(tokens.getColor(variant.border.colorToken)) : tokens.getColor(variant.border.colorToken);
78333
- decls.push(["border", `${borderWidth} solid ${borderColor}`]);
79387
+ decls.push(["border", `${borderWidth} solid currentColor`]);
78334
79388
  }
78335
79389
  return rule(selector, decls);
78336
79390
  }
@@ -78341,30 +79395,22 @@ function variantBaseRule(variant, selector, global, tokens, theme) {
78341
79395
  * token fallback keeps buttons usable in contexts that do not provide that
78342
79396
  * contract (and preserves the existing theme behaviour there).
78343
79397
  */
78344
- function surfaceLinkColor(fallbackColor) {
78345
- return `var(--rb-surface-link-color, ${fallbackColor})`;
78346
- }
78347
- function variantHoverBackgroundRule(variant, variantId, global, themeId, tokens) {
78348
- let hoverToken = variant.hoverBackgroundToken;
78349
- if (!hoverToken && global.hoverColor === "token" && global.hoverColorToken) hoverToken = global.hoverColorToken;
78350
- if (!hoverToken) return null;
78351
- return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:hover`, [["background-color", tokens.getColor(hoverToken)]]);
79398
+ function variantStateColourRule(variantId, themeId, state, colour) {
79399
+ return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:${state}`, resolvedButtonColourDeclarations(colour));
78352
79400
  }
78353
- function variantFocusVisibleRule(variantId, themeId) {
78354
- return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, [["outline", "2px solid currentColor"], ["outline-offset", "3px"]]);
79401
+ function variantFocusVisibleRule(variantId, themeId, focusIndicator) {
79402
+ return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator));
78355
79403
  }
78356
- function variantEffectsCss(variant, themeId, tokens, theme) {
78357
- if (!variant.effects) return "";
79404
+ function variantEffectsCss(variant, effects, themeId, tokens, theme) {
79405
+ if (!effects) return "";
78358
79406
  const elementConfig = {
78359
- background: variant.background,
78360
- textColorToken: variant.textColorToken,
78361
- border: variant.border ? { colorToken: variant.border.colorToken } : void 0,
79407
+ background: variant.background.type === "surface" ? { type: "transparent" } : variant.background,
78362
79408
  shadow: variant.shadow
78363
79409
  };
78364
79410
  return generateEffectsCSS({
78365
79411
  themeId,
78366
79412
  variantId: variant.id,
78367
- effects: variant.effects,
79413
+ effects,
78368
79414
  elementConfig,
78369
79415
  tokens,
78370
79416
  theme
@@ -78379,18 +79425,15 @@ function variantDisabledRules(variantId, themeId) {
78379
79425
  `${base}:focus`
78380
79426
  ];
78381
79427
  const pseudoSelectors = [`${base}::before`, `${base}::after`];
78382
- return [rule(disabledSelectors, [
78383
- ["opacity", "0.5"],
78384
- ["cursor", "not-allowed"],
78385
- ["pointer-events", "none"],
78386
- ["transform", "none"],
78387
- ["box-shadow", "none"]
78388
- ]), rule(pseudoSelectors, [
79428
+ return [rule(disabledSelectors, [...RESOLVED_BUTTON_DISABLED_DECLARATIONS]), rule(pseudoSelectors, [
78389
79429
  ["opacity", "0"],
78390
79430
  ["animation", "none"],
78391
79431
  ["pointer-events", "none"]
78392
79432
  ])];
78393
79433
  }
79434
+ function resolvedColoursEqual(left, right) {
79435
+ return JSON.stringify(left) === JSON.stringify(right);
79436
+ }
78394
79437
  function variantSizeRules(variant, variantId, themeSizes, themeId) {
78395
79438
  const borderWidth = variant.border ? BORDER_WIDTH_MAP[variant.border.widthClass] || "1px" : "0px";
78396
79439
  const rules = [];
@@ -78516,7 +79559,7 @@ function defineButtonPersonality(input) {
78516
79559
  name: input.name,
78517
79560
  description: input.description,
78518
79561
  tags: input.tags,
78519
- buttonSystem: input.buttonSystem
79562
+ buttonSystem: buttonSystemSchema.parse(input.buttonSystem)
78520
79563
  };
78521
79564
  }
78522
79565
  //#endregion
@@ -78569,19 +79612,15 @@ const brushedWash = defineButtonPersonality({
78569
79612
  background: {
78570
79613
  type: "gradient",
78571
79614
  stops: ["primary", "accent"],
78572
- direction: "to-r"
79615
+ direction: "to-r",
79616
+ foregroundToken: "primaryForeground"
78573
79617
  },
78574
- textColorToken: "primaryForeground",
78575
79618
  borderRadius: "rounded-lg",
78576
79619
  shadow: {
78577
79620
  elevation: "low",
78578
79621
  softness: "soft",
78579
79622
  position: "bottom"
78580
- },
78581
- effects: { hover: [{
78582
- effectId: "opacity-reduce",
78583
- options: { reduction: -15 }
78584
- }] }
79623
+ }
78585
79624
  },
78586
79625
  {
78587
79626
  id: "secondary",
@@ -78591,32 +79630,27 @@ const brushedWash = defineButtonPersonality({
78591
79630
  background: {
78592
79631
  type: "gradient",
78593
79632
  stops: ["secondary", "accent"],
78594
- direction: "to-br"
79633
+ direction: "to-br",
79634
+ foregroundToken: "primaryForeground"
78595
79635
  },
78596
- textColorToken: "primaryForeground",
78597
79636
  borderRadius: "rounded-lg",
78598
79637
  shadow: {
78599
79638
  elevation: "low",
78600
79639
  softness: "soft",
78601
79640
  position: "bottom"
78602
- },
78603
- effects: { hover: [{
78604
- effectId: "opacity-reduce",
78605
- options: { reduction: -15 }
78606
- }] }
79641
+ }
78607
79642
  },
78608
79643
  {
78609
79644
  id: "outline",
78610
79645
  name: "Outline",
78611
79646
  enabled: true,
78612
79647
  priority: 3,
78613
- background: { type: "transparent" },
78614
- textColorToken: "primary",
78615
- borderRadius: "rounded-lg",
78616
- border: {
78617
- widthClass: "border",
78618
- colorToken: "primary"
79648
+ background: {
79649
+ type: "surface",
79650
+ role: "link"
78619
79651
  },
79652
+ borderRadius: "rounded-lg",
79653
+ border: { widthClass: "border" },
78620
79654
  effects: { hover: [{
78621
79655
  effectId: "background-on-hover",
78622
79656
  options: { colorToken: "surface" }
@@ -78627,8 +79661,10 @@ const brushedWash = defineButtonPersonality({
78627
79661
  name: "Ghost",
78628
79662
  enabled: true,
78629
79663
  priority: 3,
78630
- background: { type: "transparent" },
78631
- textColorToken: "text",
79664
+ background: {
79665
+ type: "surface",
79666
+ role: "link"
79667
+ },
78632
79668
  borderRadius: "rounded-lg",
78633
79669
  effects: { hover: [{
78634
79670
  effectId: "background-on-hover",
@@ -78674,7 +79710,6 @@ const confidentChip = defineButtonPersonality({
78674
79710
  type: "solid",
78675
79711
  colorToken: "primary"
78676
79712
  },
78677
- textColorToken: "primaryForeground",
78678
79713
  borderRadius: "rounded-md",
78679
79714
  shadow: {
78680
79715
  elevation: "medium",
@@ -78684,7 +79719,7 @@ const confidentChip = defineButtonPersonality({
78684
79719
  effects: {
78685
79720
  hover: [{
78686
79721
  effectId: "darken-background",
78687
- options: { amount: 60 }
79722
+ options: { amount: 100 }
78688
79723
  }],
78689
79724
  active: [{
78690
79725
  effectId: "scale-down",
@@ -78701,12 +79736,8 @@ const confidentChip = defineButtonPersonality({
78701
79736
  type: "solid",
78702
79737
  colorToken: "surface"
78703
79738
  },
78704
- textColorToken: "text",
78705
79739
  borderRadius: "rounded-md",
78706
- border: {
78707
- widthClass: "border",
78708
- colorToken: "border"
78709
- },
79740
+ border: { widthClass: "border" },
78710
79741
  effects: { hover: [{
78711
79742
  effectId: "background-on-hover",
78712
79743
  options: { colorToken: "background" }
@@ -78717,13 +79748,12 @@ const confidentChip = defineButtonPersonality({
78717
79748
  name: "Outline",
78718
79749
  enabled: true,
78719
79750
  priority: 3,
78720
- background: { type: "transparent" },
78721
- textColorToken: "primary",
78722
- borderRadius: "rounded-md",
78723
- border: {
78724
- widthClass: "border",
78725
- colorToken: "primary"
79751
+ background: {
79752
+ type: "surface",
79753
+ role: "link"
78726
79754
  },
79755
+ borderRadius: "rounded-md",
79756
+ border: { widthClass: "border" },
78727
79757
  effects: { hover: [{
78728
79758
  effectId: "background-on-hover",
78729
79759
  options: { colorToken: "surface" }
@@ -78734,8 +79764,10 @@ const confidentChip = defineButtonPersonality({
78734
79764
  name: "Ghost",
78735
79765
  enabled: true,
78736
79766
  priority: 3,
78737
- background: { type: "transparent" },
78738
- textColorToken: "primary",
79767
+ background: {
79768
+ type: "surface",
79769
+ role: "link"
79770
+ },
78739
79771
  borderRadius: "rounded-md",
78740
79772
  effects: { hover: [{
78741
79773
  effectId: "background-on-hover",
@@ -78798,7 +79830,6 @@ const earthPill = defineButtonPersonality({
78798
79830
  type: "solid",
78799
79831
  colorToken: "primary"
78800
79832
  },
78801
- textColorToken: "primaryForeground",
78802
79833
  borderRadius: "rounded-full",
78803
79834
  shadow: {
78804
79835
  elevation: "low",
@@ -78824,13 +79855,12 @@ const earthPill = defineButtonPersonality({
78824
79855
  name: "Secondary",
78825
79856
  enabled: true,
78826
79857
  priority: 2,
78827
- background: { type: "transparent" },
78828
- textColorToken: "primary",
78829
- borderRadius: "rounded-full",
78830
- border: {
78831
- widthClass: "border",
78832
- colorToken: "primary"
79858
+ background: {
79859
+ type: "surface",
79860
+ role: "link"
78833
79861
  },
79862
+ borderRadius: "rounded-full",
79863
+ border: { widthClass: "border" },
78834
79864
  effects: { hover: [{
78835
79865
  effectId: "background-on-hover",
78836
79866
  options: { colorToken: "muted" }
@@ -78841,13 +79871,12 @@ const earthPill = defineButtonPersonality({
78841
79871
  name: "Outline",
78842
79872
  enabled: true,
78843
79873
  priority: 3,
78844
- background: { type: "transparent" },
78845
- textColorToken: "text",
78846
- borderRadius: "rounded-full",
78847
- border: {
78848
- widthClass: "border",
78849
- colorToken: "border"
79874
+ background: {
79875
+ type: "surface",
79876
+ role: "link"
78850
79877
  },
79878
+ borderRadius: "rounded-full",
79879
+ border: { widthClass: "border" },
78851
79880
  effects: { hover: [{
78852
79881
  effectId: "background-on-hover",
78853
79882
  options: { colorToken: "surfaceAlt" }
@@ -78858,8 +79887,10 @@ const earthPill = defineButtonPersonality({
78858
79887
  name: "Ghost",
78859
79888
  enabled: true,
78860
79889
  priority: 3,
78861
- background: { type: "transparent" },
78862
- textColorToken: "primary",
79890
+ background: {
79891
+ type: "surface",
79892
+ role: "link"
79893
+ },
78863
79894
  borderRadius: "rounded-full",
78864
79895
  shadow: {
78865
79896
  elevation: "none",
@@ -78880,11 +79911,7 @@ const earthPill = defineButtonPersonality({
78880
79911
  padding: "0.625rem 0",
78881
79912
  fontSize: "text-xl"
78882
79913
  }
78883
- },
78884
- effects: { hover: [{
78885
- effectId: "opacity-reduce",
78886
- options: { reduction: 25 }
78887
- }] }
79914
+ }
78888
79915
  }
78889
79916
  ]
78890
79917
  }
@@ -78920,8 +79947,10 @@ const editorialLink = defineButtonPersonality({
78920
79947
  name: "Primary",
78921
79948
  enabled: true,
78922
79949
  priority: 1,
78923
- background: { type: "transparent" },
78924
- textColorToken: "text",
79950
+ background: {
79951
+ type: "surface",
79952
+ role: "link"
79953
+ },
78925
79954
  borderRadius: "rounded-none",
78926
79955
  sizes: {
78927
79956
  sm: { padding: "0.25rem 0" },
@@ -78943,8 +79972,10 @@ const editorialLink = defineButtonPersonality({
78943
79972
  name: "Secondary",
78944
79973
  enabled: true,
78945
79974
  priority: 2,
78946
- background: { type: "transparent" },
78947
- textColorToken: "mutedText",
79975
+ background: {
79976
+ type: "surface",
79977
+ role: "link"
79978
+ },
78948
79979
  borderRadius: "rounded-none",
78949
79980
  sizes: {
78950
79981
  sm: { padding: "0.25rem 0" },
@@ -78966,8 +79997,10 @@ const editorialLink = defineButtonPersonality({
78966
79997
  name: "Outline",
78967
79998
  enabled: true,
78968
79999
  priority: 3,
78969
- background: { type: "transparent" },
78970
- textColorToken: "accent",
80000
+ background: {
80001
+ type: "surface",
80002
+ role: "link"
80003
+ },
78971
80004
  borderRadius: "rounded-none",
78972
80005
  sizes: {
78973
80006
  sm: { padding: "0.25rem 0" },
@@ -78989,19 +80022,17 @@ const editorialLink = defineButtonPersonality({
78989
80022
  name: "Ghost",
78990
80023
  enabled: true,
78991
80024
  priority: 3,
78992
- background: { type: "transparent" },
78993
- textColorToken: "mutedText",
80025
+ background: {
80026
+ type: "surface",
80027
+ role: "link"
80028
+ },
78994
80029
  borderRadius: "rounded-none",
78995
80030
  sizes: {
78996
80031
  sm: { padding: "0.25rem 0" },
78997
80032
  md: { padding: "0.5rem 0" },
78998
80033
  lg: { padding: "0.625rem 0" },
78999
80034
  xl: { padding: "0.75rem 0" }
79000
- },
79001
- effects: { hover: [{
79002
- effectId: "opacity-reduce",
79003
- options: { reduction: -20 }
79004
- }] }
80035
+ }
79005
80036
  }
79006
80037
  ]
79007
80038
  }
@@ -79063,12 +80094,8 @@ const flatInk = defineButtonPersonality({
79063
80094
  type: "solid",
79064
80095
  colorToken: "primary"
79065
80096
  },
79066
- textColorToken: "primaryForeground",
79067
80097
  borderRadius: "rounded-lg",
79068
- affordance: {
79069
- iconId: "ArrowRight",
79070
- colorToken: "accent"
79071
- },
80098
+ affordance: { iconId: "ArrowRight" },
79072
80099
  effects: { hover: [{
79073
80100
  effectId: "lift",
79074
80101
  options: { translateY: "-2px" }
@@ -79082,13 +80109,12 @@ const flatInk = defineButtonPersonality({
79082
80109
  name: "Secondary",
79083
80110
  enabled: true,
79084
80111
  priority: 2,
79085
- background: { type: "transparent" },
79086
- textColorToken: "primary",
79087
- borderRadius: "rounded-lg",
79088
- border: {
79089
- widthClass: "border",
79090
- colorToken: "border"
80112
+ background: {
80113
+ type: "surface",
80114
+ role: "link"
79091
80115
  },
80116
+ borderRadius: "rounded-lg",
80117
+ border: { widthClass: "border" },
79092
80118
  effects: { hover: [{
79093
80119
  effectId: "lift",
79094
80120
  options: { translateY: "-2px" }
@@ -79106,12 +80132,8 @@ const flatInk = defineButtonPersonality({
79106
80132
  type: "solid",
79107
80133
  colorToken: "accent"
79108
80134
  },
79109
- textColorToken: "accentForeground",
79110
80135
  borderRadius: "rounded-lg",
79111
- affordance: {
79112
- iconId: "ArrowRight",
79113
- colorToken: "accentForeground"
79114
- },
80136
+ affordance: { iconId: "ArrowRight" },
79115
80137
  effects: { hover: [{
79116
80138
  effectId: "lift",
79117
80139
  options: { translateY: "-2px" }
@@ -79174,7 +80196,6 @@ const inkStamp = defineButtonPersonality({
79174
80196
  type: "solid",
79175
80197
  colorToken: "primary"
79176
80198
  },
79177
- textColorToken: "primaryForeground",
79178
80199
  borderRadius: "rounded-md",
79179
80200
  effects: {
79180
80201
  hover: [{
@@ -79195,13 +80216,12 @@ const inkStamp = defineButtonPersonality({
79195
80216
  name: "Secondary",
79196
80217
  enabled: true,
79197
80218
  priority: 2,
79198
- background: { type: "transparent" },
79199
- textColorToken: "primary",
79200
- borderRadius: "rounded-md",
79201
- border: {
79202
- widthClass: "border-2",
79203
- colorToken: "primary"
80219
+ background: {
80220
+ type: "surface",
80221
+ role: "link"
79204
80222
  },
80223
+ borderRadius: "rounded-md",
80224
+ border: { widthClass: "border-2" },
79205
80225
  effects: { hover: [{
79206
80226
  effectId: "background-on-hover",
79207
80227
  options: { colorToken: "surface" }
@@ -79212,13 +80232,12 @@ const inkStamp = defineButtonPersonality({
79212
80232
  name: "Outline",
79213
80233
  enabled: true,
79214
80234
  priority: 3,
79215
- background: { type: "transparent" },
79216
- textColorToken: "text",
79217
- borderRadius: "rounded-md",
79218
- border: {
79219
- widthClass: "border-2",
79220
- colorToken: "border"
80235
+ background: {
80236
+ type: "surface",
80237
+ role: "link"
79221
80238
  },
80239
+ borderRadius: "rounded-md",
80240
+ border: { widthClass: "border-2" },
79222
80241
  effects: { hover: [{
79223
80242
  effectId: "background-on-hover",
79224
80243
  options: { colorToken: "surface" }
@@ -79229,8 +80248,10 @@ const inkStamp = defineButtonPersonality({
79229
80248
  name: "Ghost",
79230
80249
  enabled: true,
79231
80250
  priority: 3,
79232
- background: { type: "transparent" },
79233
- textColorToken: "accent",
80251
+ background: {
80252
+ type: "surface",
80253
+ role: "link"
80254
+ },
79234
80255
  borderRadius: "rounded-none",
79235
80256
  sizes: {
79236
80257
  sm: {
@@ -79323,7 +80344,6 @@ const joyStamp = defineButtonPersonality({
79323
80344
  type: "solid",
79324
80345
  colorToken: "primary"
79325
80346
  },
79326
- textColorToken: "primaryForeground",
79327
80347
  borderRadius: "rounded-full",
79328
80348
  shadow: {
79329
80349
  elevation: "high",
@@ -79337,13 +80357,12 @@ const joyStamp = defineButtonPersonality({
79337
80357
  name: "Secondary",
79338
80358
  enabled: true,
79339
80359
  priority: 2,
79340
- background: { type: "transparent" },
79341
- textColorToken: "text",
79342
- borderRadius: "rounded-full",
79343
- border: {
79344
- widthClass: "border-2",
79345
- colorToken: "text"
80360
+ background: {
80361
+ type: "surface",
80362
+ role: "link"
79346
80363
  },
80364
+ borderRadius: "rounded-full",
80365
+ border: { widthClass: "border-2" },
79347
80366
  shadow: {
79348
80367
  elevation: "high",
79349
80368
  softness: "hard",
@@ -79408,12 +80427,8 @@ const ornateRitual = defineButtonPersonality({
79408
80427
  type: "solid",
79409
80428
  colorToken: "primary"
79410
80429
  },
79411
- textColorToken: "primaryForeground",
79412
80430
  borderRadius: "rounded-md",
79413
- border: {
79414
- widthClass: "border",
79415
- colorToken: "primary"
79416
- },
80431
+ border: { widthClass: "border" },
79417
80432
  effects: {
79418
80433
  hover: [{
79419
80434
  effectId: "background-on-hover",
@@ -79434,12 +80449,8 @@ const ornateRitual = defineButtonPersonality({
79434
80449
  type: "solid",
79435
80450
  colorToken: "secondary"
79436
80451
  },
79437
- textColorToken: "primaryForeground",
79438
80452
  borderRadius: "rounded-md",
79439
- border: {
79440
- widthClass: "border",
79441
- colorToken: "primary"
79442
- },
80453
+ border: { widthClass: "border" },
79443
80454
  effects: { hover: [{
79444
80455
  effectId: "background-on-hover",
79445
80456
  options: { colorToken: "surface" }
@@ -79450,13 +80461,12 @@ const ornateRitual = defineButtonPersonality({
79450
80461
  name: "Outline",
79451
80462
  enabled: true,
79452
80463
  priority: 3,
79453
- background: { type: "transparent" },
79454
- textColorToken: "primary",
79455
- borderRadius: "rounded-md",
79456
- border: {
79457
- widthClass: "border",
79458
- colorToken: "primary"
80464
+ background: {
80465
+ type: "surface",
80466
+ role: "link"
79459
80467
  },
80468
+ borderRadius: "rounded-md",
80469
+ border: { widthClass: "border" },
79460
80470
  effects: { hover: [{
79461
80471
  effectId: "background-on-hover",
79462
80472
  options: { colorToken: "muted" }
@@ -79467,8 +80477,10 @@ const ornateRitual = defineButtonPersonality({
79467
80477
  name: "Ghost",
79468
80478
  enabled: true,
79469
80479
  priority: 3,
79470
- background: { type: "transparent" },
79471
- textColorToken: "accent",
80480
+ background: {
80481
+ type: "surface",
80482
+ role: "link"
80483
+ },
79472
80484
  borderRadius: "rounded-none",
79473
80485
  sizes: {
79474
80486
  sm: {
@@ -79550,14 +80562,10 @@ const pebble = defineButtonPersonality({
79550
80562
  type: "solid",
79551
80563
  colorToken: "primary"
79552
80564
  },
79553
- textColorToken: "primaryForeground",
79554
80565
  borderRadius: "rounded-full",
79555
80566
  effects: { hover: [{
79556
- effectId: "background-on-hover-alpha",
79557
- options: {
79558
- colorToken: "primary",
79559
- opacity: 88
79560
- }
80567
+ effectId: "darken-background",
80568
+ options: { amount: 100 }
79561
80569
  }] }
79562
80570
  },
79563
80571
  {
@@ -79565,13 +80573,12 @@ const pebble = defineButtonPersonality({
79565
80573
  name: "Secondary",
79566
80574
  enabled: true,
79567
80575
  priority: 2,
79568
- background: { type: "transparent" },
79569
- textColorToken: "primary",
79570
- borderRadius: "rounded-full",
79571
- border: {
79572
- widthClass: "border-2",
79573
- colorToken: "accent"
80576
+ background: {
80577
+ type: "surface",
80578
+ role: "link"
79574
80579
  },
80580
+ borderRadius: "rounded-full",
80581
+ border: { widthClass: "border-2" },
79575
80582
  effects: { hover: [{
79576
80583
  effectId: "background-on-hover",
79577
80584
  options: { colorToken: "accent" }
@@ -79582,13 +80589,12 @@ const pebble = defineButtonPersonality({
79582
80589
  name: "Outline",
79583
80590
  enabled: true,
79584
80591
  priority: 3,
79585
- background: { type: "transparent" },
79586
- textColorToken: "text",
79587
- borderRadius: "rounded-full",
79588
- border: {
79589
- widthClass: "border",
79590
- colorToken: "border"
80592
+ background: {
80593
+ type: "surface",
80594
+ role: "link"
79591
80595
  },
80596
+ borderRadius: "rounded-full",
80597
+ border: { widthClass: "border" },
79592
80598
  effects: { hover: [{
79593
80599
  effectId: "background-on-hover",
79594
80600
  options: { colorToken: "surface" }
@@ -79599,8 +80605,10 @@ const pebble = defineButtonPersonality({
79599
80605
  name: "Ghost",
79600
80606
  enabled: true,
79601
80607
  priority: 3,
79602
- background: { type: "transparent" },
79603
- textColorToken: "primary",
80608
+ background: {
80609
+ type: "surface",
80610
+ role: "link"
80611
+ },
79604
80612
  borderRadius: "rounded-full",
79605
80613
  sizes: {
79606
80614
  sm: {
@@ -79616,11 +80624,7 @@ const pebble = defineButtonPersonality({
79616
80624
  padding: "0.75rem 1.5rem",
79617
80625
  fontSize: "text-xl"
79618
80626
  }
79619
- },
79620
- effects: { hover: [{
79621
- effectId: "opacity-reduce",
79622
- options: { reduction: 30 }
79623
- }] }
80627
+ }
79624
80628
  }
79625
80629
  ]
79626
80630
  }
@@ -79682,15 +80686,11 @@ const quietArrow = defineButtonPersonality({
79682
80686
  type: "solid",
79683
80687
  colorToken: "primary"
79684
80688
  },
79685
- textColorToken: "primaryForeground",
79686
80689
  borderRadius: "rounded-xl",
79687
80690
  affordance: { iconId: "ArrowRight" },
79688
80691
  effects: { hover: [{
79689
- effectId: "background-on-hover-alpha",
79690
- options: {
79691
- colorToken: "primary",
79692
- opacity: 90
79693
- }
80692
+ effectId: "darken-background",
80693
+ options: { amount: 100 }
79694
80694
  }] }
79695
80695
  },
79696
80696
  {
@@ -79698,13 +80698,12 @@ const quietArrow = defineButtonPersonality({
79698
80698
  name: "Secondary",
79699
80699
  enabled: true,
79700
80700
  priority: 2,
79701
- background: { type: "transparent" },
79702
- textColorToken: "primary",
79703
- borderRadius: "rounded-xl",
79704
- border: {
79705
- widthClass: "border",
79706
- colorToken: "primary"
80701
+ background: {
80702
+ type: "surface",
80703
+ role: "link"
79707
80704
  },
80705
+ borderRadius: "rounded-xl",
80706
+ border: { widthClass: "border" },
79708
80707
  affordance: { iconId: "ArrowRight" },
79709
80708
  effects: { hover: [{
79710
80709
  effectId: "background-on-hover",
@@ -79716,21 +80715,22 @@ const quietArrow = defineButtonPersonality({
79716
80715
  name: "Outline",
79717
80716
  enabled: true,
79718
80717
  priority: 3,
79719
- background: { type: "transparent" },
79720
- textColorToken: "primary",
80718
+ background: {
80719
+ type: "surface",
80720
+ role: "link"
80721
+ },
79721
80722
  borderRadius: "rounded-xl",
79722
- border: {
79723
- widthClass: "border",
79724
- colorToken: "primary"
79725
- }
80723
+ border: { widthClass: "border" }
79726
80724
  },
79727
80725
  {
79728
80726
  id: "ghost",
79729
80727
  name: "Ghost",
79730
80728
  enabled: true,
79731
80729
  priority: 3,
79732
- background: { type: "transparent" },
79733
- textColorToken: "primary",
80730
+ background: {
80731
+ type: "surface",
80732
+ role: "link"
80733
+ },
79734
80734
  borderRadius: "rounded-xl"
79735
80735
  }
79736
80736
  ]
@@ -79794,7 +80794,6 @@ const showtimePill = defineButtonPersonality({
79794
80794
  type: "solid",
79795
80795
  colorToken: "primary"
79796
80796
  },
79797
- textColorToken: "background",
79798
80797
  borderRadius: "rounded-full",
79799
80798
  effects: { hover: [{ effectId: "pop" }] }
79800
80799
  },
@@ -79803,13 +80802,12 @@ const showtimePill = defineButtonPersonality({
79803
80802
  name: "Secondary",
79804
80803
  enabled: true,
79805
80804
  priority: 2,
79806
- background: { type: "transparent" },
79807
- textColorToken: "primary",
79808
- borderRadius: "rounded-full",
79809
- border: {
79810
- widthClass: "border-2",
79811
- colorToken: "primary"
80805
+ background: {
80806
+ type: "surface",
80807
+ role: "link"
79812
80808
  },
80809
+ borderRadius: "rounded-full",
80810
+ border: { widthClass: "border-2" },
79813
80811
  effects: { hover: [{ effectId: "pop" }] }
79814
80812
  },
79815
80813
  {
@@ -79821,7 +80819,6 @@ const showtimePill = defineButtonPersonality({
79821
80819
  type: "solid",
79822
80820
  colorToken: "secondary"
79823
80821
  },
79824
- textColorToken: "primary",
79825
80822
  borderRadius: "rounded-full",
79826
80823
  effects: { hover: [{ effectId: "pop" }] }
79827
80824
  },
@@ -79834,12 +80831,8 @@ const showtimePill = defineButtonPersonality({
79834
80831
  type: "solid",
79835
80832
  colorToken: "background"
79836
80833
  },
79837
- textColorToken: "primary",
79838
80834
  borderRadius: "rounded-full",
79839
- border: {
79840
- widthClass: "border-2",
79841
- colorToken: "primary"
79842
- },
80835
+ border: { widthClass: "border-2" },
79843
80836
  effects: { hover: [{
79844
80837
  effectId: "background-on-hover",
79845
80838
  options: { colorToken: "surface" }
@@ -79850,13 +80843,12 @@ const showtimePill = defineButtonPersonality({
79850
80843
  name: "Outline",
79851
80844
  enabled: true,
79852
80845
  priority: 3,
79853
- background: { type: "transparent" },
79854
- textColorToken: "primary",
79855
- borderRadius: "rounded-full",
79856
- border: {
79857
- widthClass: "border-2",
79858
- colorToken: "primary"
80846
+ background: {
80847
+ type: "surface",
80848
+ role: "link"
79859
80849
  },
80850
+ borderRadius: "rounded-full",
80851
+ border: { widthClass: "border-2" },
79860
80852
  effects: { hover: [{
79861
80853
  effectId: "background-on-hover",
79862
80854
  options: { colorToken: "background" }
@@ -79867,8 +80859,10 @@ const showtimePill = defineButtonPersonality({
79867
80859
  name: "Ghost",
79868
80860
  enabled: true,
79869
80861
  priority: 3,
79870
- background: { type: "transparent" },
79871
- textColorToken: "primary",
80862
+ background: {
80863
+ type: "surface",
80864
+ role: "link"
80865
+ },
79872
80866
  borderRadius: "rounded-full",
79873
80867
  effects: { hover: [{
79874
80868
  effectId: "background-on-hover",
@@ -79914,7 +80908,6 @@ const softPill = defineButtonPersonality({
79914
80908
  type: "solid",
79915
80909
  colorToken: "primary"
79916
80910
  },
79917
- textColorToken: "primaryForeground",
79918
80911
  borderRadius: "rounded-full",
79919
80912
  shadow: {
79920
80913
  elevation: "low",
@@ -79937,13 +80930,12 @@ const softPill = defineButtonPersonality({
79937
80930
  name: "Secondary",
79938
80931
  enabled: true,
79939
80932
  priority: 2,
79940
- background: { type: "transparent" },
79941
- textColorToken: "primary",
79942
- borderRadius: "rounded-full",
79943
- border: {
79944
- widthClass: "border-2",
79945
- colorToken: "primary"
80933
+ background: {
80934
+ type: "surface",
80935
+ role: "link"
79946
80936
  },
80937
+ borderRadius: "rounded-full",
80938
+ border: { widthClass: "border-2" },
79947
80939
  effects: { hover: [{
79948
80940
  effectId: "background-on-hover",
79949
80941
  options: { colorToken: "surface" }
@@ -79954,13 +80946,12 @@ const softPill = defineButtonPersonality({
79954
80946
  name: "Outline",
79955
80947
  enabled: true,
79956
80948
  priority: 3,
79957
- background: { type: "transparent" },
79958
- textColorToken: "text",
79959
- borderRadius: "rounded-full",
79960
- border: {
79961
- widthClass: "border",
79962
- colorToken: "border"
80949
+ background: {
80950
+ type: "surface",
80951
+ role: "link"
79963
80952
  },
80953
+ borderRadius: "rounded-full",
80954
+ border: { widthClass: "border" },
79964
80955
  effects: { hover: [{
79965
80956
  effectId: "background-on-hover",
79966
80957
  options: { colorToken: "surface" }
@@ -79971,8 +80962,10 @@ const softPill = defineButtonPersonality({
79971
80962
  name: "Ghost",
79972
80963
  enabled: true,
79973
80964
  priority: 3,
79974
- background: { type: "transparent" },
79975
- textColorToken: "text",
80965
+ background: {
80966
+ type: "surface",
80967
+ role: "link"
80968
+ },
79976
80969
  borderRadius: "rounded-full",
79977
80970
  effects: { hover: [{
79978
80971
  effectId: "background-on-hover",
@@ -79991,9 +80984,8 @@ const solidSecondary = {
79991
80984
  priority: 2,
79992
80985
  background: {
79993
80986
  type: "solid",
79994
- colorToken: "secondary"
80987
+ colorToken: unsafeAsOpaqueButtonColourToken("secondary")
79995
80988
  },
79996
- textColorToken: "onSecondary",
79997
80989
  borderRadius: "rounded-full",
79998
80990
  shadow: {
79999
80991
  elevation: "none",
@@ -80055,6 +81047,27 @@ function parsePersistedButtonPersonalityId(value) {
80055
81047
  raw: value
80056
81048
  };
80057
81049
  }
81050
+ buttonPersonalities.map((personality) => ({
81051
+ id: personality.id,
81052
+ name: personality.name,
81053
+ description: personality.description,
81054
+ category: presetCategory(personality),
81055
+ buttonSystem: personality.buttonSystem,
81056
+ compatibility: {
81057
+ ...personality.tags.tone ? { tones: [personality.tags.tone] } : {},
81058
+ ...personality.tags.energy ? { energies: [personality.tags.energy] } : {}
81059
+ }
81060
+ }));
81061
+ function presetCategory(personality) {
81062
+ switch (personality.tags.era) {
81063
+ case "retro": return "retro";
81064
+ case "editorial": return "minimal";
81065
+ case "organic": return "artistic";
81066
+ case "modern": return personality.tags.tone === "bold" ? "modern" : "technical";
81067
+ case "technical": return "technical";
81068
+ case void 0: return "modern";
81069
+ }
81070
+ }
80058
81071
  //#endregion
80059
81072
  //#region ../path-utils/src/index.ts
80060
81073
  const PATH_SEPARATOR_REGEX = /\./g;
@@ -80227,7 +81240,8 @@ function validateRelativeStoragePath(value) {
80227
81240
  if (value.startsWith("sites/")) return fail({ tag: "SITE_SCOPED_PATH" });
80228
81241
  if (value.startsWith("/")) return fail({ tag: "LEADING_SLASH" });
80229
81242
  if (value.includes("//")) return fail({ tag: "DOUBLE_SLASH" });
80230
- if (value.split("/").some((segment) => segment === "..")) return fail({ tag: "TRAVERSAL" });
81243
+ if (value.includes("%")) return fail({ tag: "PERCENT_ENCODING" });
81244
+ if (value.split("/").some((segment) => segment === "." || segment === "..")) return fail({ tag: "TRAVERSAL" });
80231
81245
  return ok(value);
80232
81246
  }
80233
81247
  function brandRelativeStoragePath(value) {
@@ -84823,195 +85837,6 @@ function buildGoogleMapsDirectionsUrl(input) {
84823
85837
  return url.toString();
84824
85838
  }
84825
85839
  //#endregion
84826
- //#region ../theme-core/src/palette/utils/colorConversion.ts
84827
- const clamp01 = (x) => Math.max(0, Math.min(1, x));
84828
- const mod = (a, n) => (a % n + n) % n;
84829
- const deg = (x) => mod(x, 360);
84830
- function hexToRgb(hex) {
84831
- const h = hex.replace(/^#/, "");
84832
- const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
84833
- if (m.length !== 6) throw new Error("Bad hex");
84834
- const int = parseInt(m, 16);
84835
- return {
84836
- r: int >> 16 & 255,
84837
- g: int >> 8 & 255,
84838
- b: int & 255
84839
- };
84840
- }
84841
- function rgbToHex$1(r, g, b) {
84842
- const to = (n) => Math.round(n).toString(16).padStart(2, "0");
84843
- return `#${to(r)}${to(g)}${to(b)}`;
84844
- }
84845
- function srgbToLinear$1(u) {
84846
- const x = u / 255;
84847
- return x <= .04045 ? x / 12.92 : Math.pow((x + .055) / 1.055, 2.4);
84848
- }
84849
- function linearToSrgb(x) {
84850
- return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
84851
- }
84852
- function rgbToHsl$1(r, g, b) {
84853
- const R = r / 255, G = g / 255, B = b / 255;
84854
- const max = Math.max(R, G, B), min = Math.min(R, G, B);
84855
- const d = max - min;
84856
- let h = 0;
84857
- if (d !== 0) {
84858
- switch (max) {
84859
- case R:
84860
- h = (G - B) / d + (G < B ? 6 : 0);
84861
- break;
84862
- case G:
84863
- h = (B - R) / d + 2;
84864
- break;
84865
- case B:
84866
- h = (R - G) / d + 4;
84867
- break;
84868
- }
84869
- h *= 60;
84870
- }
84871
- const l = (max + min) / 2;
84872
- const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
84873
- return {
84874
- h,
84875
- s,
84876
- l
84877
- };
84878
- }
84879
- function srgbToOklab(r, g, b) {
84880
- const R = srgbToLinear$1(r), G = srgbToLinear$1(g), B = srgbToLinear$1(b);
84881
- const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
84882
- const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
84883
- const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
84884
- const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
84885
- return {
84886
- L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
84887
- a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
84888
- b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
84889
- };
84890
- }
84891
- function oklabToSrgb(L, a, b) {
84892
- const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
84893
- const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
84894
- const s_ = Math.pow(L - .0894841775 * a - 1.291485548 * b, 3);
84895
- const R = 4.0767416621 * l_ - 3.3077115913 * m_ + .2309699292 * s_;
84896
- const G = -1.2684380046 * l_ + 2.6097574011 * m_ - .3413193965 * s_;
84897
- const B = -.0041960863 * l_ - .7034186147 * m_ + 1.707614701 * s_;
84898
- return {
84899
- r: linearToSrgb(R),
84900
- g: linearToSrgb(G),
84901
- b: linearToSrgb(B)
84902
- };
84903
- }
84904
- function oklabToOklch(L, a, b) {
84905
- const C = Math.sqrt(a * a + b * b);
84906
- return {
84907
- L,
84908
- C,
84909
- h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
84910
- };
84911
- }
84912
- function oklchToOklab(L, C, h) {
84913
- const hr = h * Math.PI / 180;
84914
- return {
84915
- L,
84916
- a: C * Math.cos(hr),
84917
- b: C * Math.sin(hr)
84918
- };
84919
- }
84920
- function inSRGB(r, g, b) {
84921
- return r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255;
84922
- }
84923
- function oklchToHexGamut(L, C, h) {
84924
- let lo = 0, hi = C, best = 0;
84925
- for (let i = 0; i < 18; i++) {
84926
- const mid = (lo + hi) / 2;
84927
- const { a, b } = oklchToOklab(L, mid, h);
84928
- const { r, g, b: bb } = oklabToSrgb(L, a, b);
84929
- if (inSRGB(r, g, bb)) {
84930
- best = mid;
84931
- lo = mid;
84932
- } else hi = mid;
84933
- }
84934
- const { a, b } = oklchToOklab(L, best, h);
84935
- const { r, g, b: bb } = oklabToSrgb(L, a, b);
84936
- return rgbToHex$1(r, g, bb);
84937
- }
84938
- function featuresFromHex(hex) {
84939
- const { r, g, b } = hexToRgb(hex);
84940
- const { h, s, l } = rgbToHsl$1(r, g, b);
84941
- const { L, a, b: b2 } = srgbToOklab(r, g, b);
84942
- const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
84943
- return {
84944
- r,
84945
- g,
84946
- b,
84947
- h,
84948
- s,
84949
- l,
84950
- v: Math.max(r, g, b) / 255,
84951
- Y: .2126 * srgbToLinear$1(r) + .7152 * srgbToLinear$1(g) + .0722 * srgbToLinear$1(b),
84952
- chroma: s,
84953
- okL,
84954
- okC,
84955
- okH,
84956
- hex
84957
- };
84958
- }
84959
- //#endregion
84960
- //#region ../theme-core/src/palette/utils/contrast.ts
84961
- function relativeLuminance$1(r, g, b) {
84962
- const R = srgbToLinear$1(r), G = srgbToLinear$1(g), B = srgbToLinear$1(b);
84963
- return .2126 * R + .7152 * G + .0722 * B;
84964
- }
84965
- function contrastRatio$1(hex1, hex2) {
84966
- const { r: r1, g: g1, b: b1 } = hexToRgb(hex1);
84967
- const { r: r2, g: g2, b: b2 } = hexToRgb(hex2);
84968
- const L1 = relativeLuminance$1(r1, g1, b1);
84969
- const L2 = relativeLuminance$1(r2, g2, b2);
84970
- const [hi, lo] = L1 >= L2 ? [L1, L2] : [L2, L1];
84971
- return (hi + .05) / (lo + .05);
84972
- }
84973
- //#endregion
84974
- //#region ../theme-core/src/palette/utils/textColor.ts
84975
- /**
84976
- * Pick the better of black/white text for a given background using actual
84977
- * contrast ratios, not a simple luminance cutoff.
84978
- *
84979
- * @param background - Background color in hex or rgb/rgba format (e.g., '#FFFFFF' or 'rgb(255, 255, 255)')
84980
- * @param minContrast - Preferred minimum contrast ratio for body-sized text
84981
- * @returns '#000000' for light backgrounds, '#FFFFFF' for dark backgrounds
84982
- */
84983
- function pickBlackOrWhiteTextColor(background, minContrast = 4.5) {
84984
- const { r, g, b } = parseColorToRgb(background);
84985
- const luminance = relativeLuminance$1(r, g, b);
84986
- const blackContrast = (luminance + .05) / .05;
84987
- const whiteContrast = 1.05 / (luminance + .05);
84988
- if (blackContrast >= minContrast && whiteContrast < minContrast) return "#000000";
84989
- if (whiteContrast >= minContrast && blackContrast < minContrast) return "#FFFFFF";
84990
- return blackContrast >= whiteContrast ? "#000000" : "#FFFFFF";
84991
- }
84992
- /**
84993
- * Backwards-compatible alias for callers that want the best black/white text
84994
- * color for a background.
84995
- */
84996
- function getTextColorForBackground(background) {
84997
- return pickBlackOrWhiteTextColor(background);
84998
- }
84999
- function parseColorToRgb(input) {
85000
- const trimmed = input.trim();
85001
- if (trimmed.startsWith("#")) return hexToRgb(trimmed);
85002
- 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);
85003
- if (rgbMatch?.[1] && rgbMatch[2] && rgbMatch[3]) return {
85004
- r: clamp255(Number(rgbMatch[1])),
85005
- g: clamp255(Number(rgbMatch[2])),
85006
- b: clamp255(Number(rgbMatch[3]))
85007
- };
85008
- throw new Error("Unsupported color format");
85009
- }
85010
- function clamp255(value) {
85011
- if (Number.isNaN(value)) return 0;
85012
- return Math.max(0, Math.min(255, value));
85013
- }
85014
- //#endregion
85015
85840
  //#region ../theme-core/src/utils/tokenOrColor.ts
85016
85841
  /**
85017
85842
  * Runtime color-reference fields intentionally accept any string, including
@@ -87766,29 +88591,6 @@ function createTransformRegistry(definitions) {
87766
88591
  return registry;
87767
88592
  }
87768
88593
  //#endregion
87769
- //#region ../theme-core/src/palette/utils/onColor.ts
87770
- const BACKGROUND_ROLE_NAMES = /* @__PURE__ */ new Set([
87771
- "primary",
87772
- "secondary",
87773
- "accent",
87774
- "success",
87775
- "warning",
87776
- "destructive",
87777
- "info",
87778
- "background",
87779
- "surface",
87780
- "surfaceAlt",
87781
- "muted",
87782
- "neutral"
87783
- ]);
87784
- function onColorTokenName(backgroundToken) {
87785
- return `on${backgroundToken.split("-").filter((part) => part.length > 0).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("")}`;
87786
- }
87787
- function isOnColorBackgroundCandidateToken(token) {
87788
- const role = token.match(/^(.*?)(?:-\d{2,3})?$/)?.[1] ?? token;
87789
- return BACKGROUND_ROLE_NAMES.has(role);
87790
- }
87791
- //#endregion
87792
88594
  //#region ../theme-core/src/site-styles/accessibleSurfaces.ts
87793
88595
  const ON_BACKGROUND = { kind: "on-background" };
87794
88596
  const contrastThresholdByPolicy = {
@@ -88983,6 +89785,10 @@ const modernMinimalTheme = {
88983
89785
  name: "primary",
88984
89786
  hex: "#1f2937"
88985
89787
  },
89788
+ {
89789
+ name: "primaryForeground",
89790
+ hex: "#ffffff"
89791
+ },
88986
89792
  {
88987
89793
  name: "secondary",
88988
89794
  hex: "#6b7280"
@@ -89011,6 +89817,14 @@ const modernMinimalTheme = {
89011
89817
  name: "surface",
89012
89818
  hex: "#ffffff"
89013
89819
  },
89820
+ {
89821
+ name: "surfaceAlt",
89822
+ hex: "#f9fafb"
89823
+ },
89824
+ {
89825
+ name: "muted",
89826
+ hex: "#f3f4f6"
89827
+ },
89014
89828
  {
89015
89829
  name: "text",
89016
89830
  hex: "#1f2937"
@@ -89125,134 +89939,6 @@ function generateCssVars(palette) {
89125
89939
  return cssVars;
89126
89940
  }
89127
89941
  //#endregion
89128
- //#region ../theme-core/src/palette/neutralScale.ts
89129
- function generateNeutralScale({ background, steps = 11, warm = false }) {
89130
- const isDark = background === "#000000" || background.startsWith("#0") || background.startsWith("#1");
89131
- const shadeNames = [
89132
- 50,
89133
- 100,
89134
- 200,
89135
- 300,
89136
- 400,
89137
- 500,
89138
- 600,
89139
- 700,
89140
- 800,
89141
- 900,
89142
- 950
89143
- ];
89144
- const count = Math.min(steps, shadeNames.length);
89145
- const scale = [];
89146
- for (let i = 0; i < count; i++) {
89147
- const shadeName = shadeNames[i] ?? shadeNames[shadeNames.length - 1] ?? 950;
89148
- const t = i / (count - 1);
89149
- const hex = oklchToHexGamut(isDark ? mix(.06, .92, t) : mix(.98, .1, t), .02, warm ? 85 : 250);
89150
- const name = `neutral-${shadeName}`;
89151
- scale.push({
89152
- name,
89153
- hex
89154
- });
89155
- }
89156
- return scale;
89157
- }
89158
- function mix(a, b, t) {
89159
- return a + (b - a) * Math.max(0, Math.min(1, t));
89160
- }
89161
- //#endregion
89162
- //#region ../theme-core/src/palette/generateShades.ts
89163
- function generateShades(hexColor, name) {
89164
- const shadeSteps = [
89165
- 50,
89166
- 100,
89167
- 200,
89168
- 300,
89169
- 400,
89170
- 500,
89171
- 600,
89172
- 700,
89173
- 800,
89174
- 900,
89175
- 950
89176
- ];
89177
- const base = featuresFromHex(hexColor);
89178
- const hue = base.okH;
89179
- const baseChroma = base.okC;
89180
- const toneMap = {
89181
- 50: .975,
89182
- 100: .945,
89183
- 200: .89,
89184
- 300: .82,
89185
- 400: .74,
89186
- 500: .66,
89187
- 600: .58,
89188
- 700: .49,
89189
- 800: .4,
89190
- 900: .28,
89191
- 950: .16
89192
- };
89193
- const shadeDefs = shadeSteps.map((step, idx) => {
89194
- const t = idx / (shadeSteps.length - 1);
89195
- const L = toneMap[step];
89196
- const C = baseChroma * (.06 + .94 * Math.sin(Math.PI * t));
89197
- return {
89198
- name: `${name}-${step}`,
89199
- hex: oklchToHexGamut(L, C, hue)
89200
- };
89201
- });
89202
- shadeDefs.push({
89203
- name,
89204
- hex: hexColor
89205
- });
89206
- return shadeDefs;
89207
- }
89208
- //#endregion
89209
- //#region ../theme-core/src/palette/expandPalette.ts
89210
- function colorsToMap(palette) {
89211
- const map = {};
89212
- for (const c of palette.colors) map[c.name] = c.hex;
89213
- return map;
89214
- }
89215
- function isBackgroundDark(hex) {
89216
- try {
89217
- return featuresFromHex(hex).Y < .5;
89218
- } catch {
89219
- return false;
89220
- }
89221
- }
89222
- const nonShadeablePaletteRoleNames = /* @__PURE__ */ new Set([
89223
- "success",
89224
- "warning",
89225
- "destructive"
89226
- ]);
89227
- function expandPalette(palette) {
89228
- const base = colorsToMap(palette);
89229
- const expanded = { ...base };
89230
- generateNeutralScale({
89231
- background: base.background || base.surface || "#ffffff",
89232
- steps: 11,
89233
- warm: false
89234
- }).forEach((n) => {
89235
- expanded[n.name] = n.hex;
89236
- });
89237
- for (const [name, hex] of Object.entries(base)) {
89238
- if (nonShadeablePaletteRoleNames.has(name)) continue;
89239
- if (hex) generateShades(hex, name).forEach((shade) => {
89240
- expanded[shade.name] = shade.hex;
89241
- });
89242
- }
89243
- if (base.text) expanded.body = base.text;
89244
- if (base.danger && !base.destructive) expanded.destructive = base.danger;
89245
- const isDark = base.background ? isBackgroundDark(base.background) : false;
89246
- expanded.mutedText = palette.meta?.mode === "dark" || isDark ? expanded["neutral-600"] ?? "#666" : expanded["neutral-500"] ?? "#888";
89247
- for (const [token, hex] of Object.entries({ ...expanded })) {
89248
- if (!hex || !isOnColorBackgroundCandidateToken(token)) continue;
89249
- const onToken = onColorTokenName(token);
89250
- if (expanded[onToken]) continue;
89251
- expanded[onToken] = getTextColorForBackground(hex);
89252
- }
89253
- return expanded;
89254
- }
89255
- //#endregion
89256
89942
  //#region ../../node_modules/.pnpm/@vibrant+image@4.0.4/node_modules/@vibrant/image/dist/esm/histogram.js
89257
89943
  var Histogram = class {
89258
89944
  constructor(pixels, opts) {
@@ -93131,6 +93817,282 @@ const serifDisplayQuote = { style: "serif-display" };
93131
93817
  /** Punchy quotation mark in the secondary accent colour. Bold / accent styles. */
93132
93818
  const accentGlyphQuote = { style: "accent-glyph" };
93133
93819
  //#endregion
93820
+ //#region ../theme-core/src/gradients/types.ts
93821
+ /**
93822
+ * Gradient configuration types and schemas
93823
+ */
93824
+ /**
93825
+ * Gradient color stop
93826
+ */
93827
+ const gradientStopSchema = z$1.object({
93828
+ color: themeColorTokenSchema,
93829
+ position: z$1.number().min(0).max(100)
93830
+ });
93831
+ /**
93832
+ * Radial gradient shape. Optional; defaults to `circle` (the historical shape)
93833
+ * so existing radial gradients are byte-identical.
93834
+ *
93835
+ * Named `RadialGradientShape` to avoid clashing with `styles/gradients.ts`'s
93836
+ * `GradientShape` (which names the gradient *kind*: linear/radial/conic).
93837
+ */
93838
+ const radialGradientShapeSchema = z$1.enum(["circle", "ellipse"]);
93839
+ /**
93840
+ * Gradient configuration.
93841
+ *
93842
+ * `type` is optional and defaults to `'linear'` so gradients persisted without a
93843
+ * type (or with an explicit `'linear'`) render exactly as before. `'radial'` and
93844
+ * `'conic'` are additive kinds:
93845
+ * - linear: `angle` (degrees)
93846
+ * - radial: optional `shape` (circle/ellipse) + `position`
93847
+ * - conic: optional `angle` (from-angle, degrees) + `position`
93848
+ */
93849
+ const gradientConfigSchema = z$1.object({
93850
+ type: z$1.enum([
93851
+ "linear",
93852
+ "radial",
93853
+ "conic"
93854
+ ]).default("linear"),
93855
+ angle: z$1.number().min(0).max(360).optional(),
93856
+ shape: radialGradientShapeSchema.optional(),
93857
+ position: z$1.string().optional(),
93858
+ stops: z$1.array(gradientStopSchema).min(2)
93859
+ });
93860
+ /**
93861
+ * Curated library of gradient presets.
93862
+ * All gradients use theme color tokens, so they adapt to the site's palette.
93863
+ */
93864
+ const GRADIENT_PRESETS = [
93865
+ {
93866
+ id: "primary-secondary",
93867
+ name: "Primary to Secondary",
93868
+ description: "Blend your primary and secondary brand colors",
93869
+ type: "linear",
93870
+ angle: 135,
93871
+ stops: [{
93872
+ color: "primary-500",
93873
+ position: 0
93874
+ }, {
93875
+ color: "secondary-500",
93876
+ position: 100
93877
+ }]
93878
+ },
93879
+ {
93880
+ id: "primary-accent",
93881
+ name: "Primary to Accent",
93882
+ description: "Energetic gradient from primary to accent",
93883
+ type: "linear",
93884
+ angle: 135,
93885
+ stops: [{
93886
+ color: "primary-500",
93887
+ position: 0
93888
+ }, {
93889
+ color: "accent-500",
93890
+ position: 100
93891
+ }]
93892
+ },
93893
+ {
93894
+ id: "secondary-accent",
93895
+ name: "Secondary to Accent",
93896
+ description: "Vibrant secondary to accent blend",
93897
+ type: "linear",
93898
+ angle: 135,
93899
+ stops: [{
93900
+ color: "secondary-500",
93901
+ position: 0
93902
+ }, {
93903
+ color: "accent-500",
93904
+ position: 100
93905
+ }]
93906
+ },
93907
+ {
93908
+ id: "primary-light-dark",
93909
+ name: "Primary Light to Dark",
93910
+ description: "Subtle primary color fade",
93911
+ type: "linear",
93912
+ angle: 180,
93913
+ stops: [{
93914
+ color: "primary-500",
93915
+ position: 0
93916
+ }, {
93917
+ color: "primary-900",
93918
+ position: 100
93919
+ }]
93920
+ },
93921
+ {
93922
+ id: "primary-dark-light",
93923
+ name: "Primary Dark to Light",
93924
+ description: "Reverse primary fade",
93925
+ type: "linear",
93926
+ angle: 180,
93927
+ stops: [{
93928
+ color: "primary-900",
93929
+ position: 0
93930
+ }, {
93931
+ color: "primary-50",
93932
+ position: 100
93933
+ }]
93934
+ },
93935
+ {
93936
+ id: "secondary-light-dark",
93937
+ name: "Secondary Light to Dark",
93938
+ description: "Subtle secondary color fade",
93939
+ type: "linear",
93940
+ angle: 180,
93941
+ stops: [{
93942
+ color: "secondary-500",
93943
+ position: 0
93944
+ }, {
93945
+ color: "secondary-900",
93946
+ position: 100
93947
+ }]
93948
+ },
93949
+ {
93950
+ id: "accent-light-dark",
93951
+ name: "Accent Light to Dark",
93952
+ description: "Accent color depth fade",
93953
+ type: "linear",
93954
+ angle: 180,
93955
+ stops: [{
93956
+ color: "accent-500",
93957
+ position: 0
93958
+ }, {
93959
+ color: "accent-900",
93960
+ position: 100
93961
+ }]
93962
+ },
93963
+ {
93964
+ id: "background-surface",
93965
+ name: "Background to Surface",
93966
+ description: "Subtle depth using base colors",
93967
+ type: "linear",
93968
+ angle: 180,
93969
+ stops: [{
93970
+ color: "background",
93971
+ position: 0
93972
+ }, {
93973
+ color: "surface",
93974
+ position: 100
93975
+ }]
93976
+ },
93977
+ {
93978
+ id: "neutral-fade",
93979
+ name: "Neutral Gradient",
93980
+ description: "Elegant neutral color fade",
93981
+ type: "linear",
93982
+ angle: 180,
93983
+ stops: [{
93984
+ color: "neutral-900",
93985
+ position: 0
93986
+ }, {
93987
+ color: "neutral-50",
93988
+ position: 100
93989
+ }]
93990
+ },
93991
+ {
93992
+ id: "primary-glow",
93993
+ name: "Primary glow",
93994
+ description: "A soft top-centred glow using your primary palette",
93995
+ type: "radial",
93996
+ shape: "ellipse",
93997
+ position: "top center",
93998
+ stops: [{
93999
+ color: "primary-900",
94000
+ position: 0
94001
+ }, {
94002
+ color: "primary-950",
94003
+ position: 100
94004
+ }],
94005
+ foreground: {
94006
+ textColor: "onPrimary900",
94007
+ headingColor: "onPrimary900",
94008
+ linkColor: "onPrimary900",
94009
+ supportingColor: "onPrimary900"
94010
+ }
94011
+ },
94012
+ {
94013
+ id: "accent-glow",
94014
+ name: "Accent glow",
94015
+ description: "A soft top-centred glow using your accent palette",
94016
+ type: "radial",
94017
+ shape: "ellipse",
94018
+ position: "top center",
94019
+ stops: [{
94020
+ color: "accent-900",
94021
+ position: 0
94022
+ }, {
94023
+ color: "accent-950",
94024
+ position: 100
94025
+ }],
94026
+ foreground: {
94027
+ textColor: "onAccent900",
94028
+ headingColor: "onAccent900",
94029
+ linkColor: "onAccent900",
94030
+ supportingColor: "onAccent900"
94031
+ }
94032
+ },
94033
+ {
94034
+ id: "primary-secondary-accent",
94035
+ name: "Brand Trio",
94036
+ description: "All three brand colors in harmony",
94037
+ type: "linear",
94038
+ angle: 135,
94039
+ stops: [
94040
+ {
94041
+ color: "primary-500",
94042
+ position: 0
94043
+ },
94044
+ {
94045
+ color: "secondary-500",
94046
+ position: 50
94047
+ },
94048
+ {
94049
+ color: "accent-500",
94050
+ position: 100
94051
+ }
94052
+ ]
94053
+ }
94054
+ ].map((preset) => ({
94055
+ ...preset,
94056
+ id: preset.id,
94057
+ stops: preset.stops
94058
+ }));
94059
+ const GRADIENT_PRESET_IDS = GRADIENT_PRESETS.map((preset) => preset.id);
94060
+ const gradientPresetIdSet = new Set(GRADIENT_PRESET_IDS);
94061
+ const gradientPresetById = Object.fromEntries(GRADIENT_PRESETS.map((preset) => [preset.id, preset]));
94062
+ function parseGradientPresetId(value) {
94063
+ if (typeof value !== "string") return null;
94064
+ const normalized = value.trim();
94065
+ if (!gradientPresetIdSet.has(normalized)) return null;
94066
+ return normalized;
94067
+ }
94068
+ function getGradientPreset(id) {
94069
+ return gradientPresetById[id];
94070
+ }
94071
+ //#endregion
94072
+ //#region ../theme-core/src/gradients/utils.ts
94073
+ /**
94074
+ * Convert a GradientConfig to a CSS gradient string
94075
+ *
94076
+ * @param config - The gradient configuration using theme tokens
94077
+ * @param tokens - Map of theme color tokens to hex values
94078
+ * @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
94079
+ */
94080
+ function gradientToCss(config, tokens) {
94081
+ const stops = config.stops.map((stop) => {
94082
+ return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
94083
+ }).join(", ");
94084
+ const type = config.type ?? "linear";
94085
+ if (type === "radial") {
94086
+ const position = config.position ?? "center";
94087
+ return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
94088
+ }
94089
+ if (type === "conic") {
94090
+ const position = config.position ?? "center";
94091
+ return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
94092
+ }
94093
+ return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
94094
+ }
94095
+ //#endregion
93134
94096
  //#region ../theme-core/src/site-styles/customizableSurfaces.ts
93135
94097
  function uniqueLookIds(ids) {
93136
94098
  const result = [];
@@ -96192,47 +97154,6 @@ const FONT_WEIGHT_MAP = {
96192
97154
  black: "800"
96193
97155
  };
96194
97156
  //#endregion
96195
- //#region ../theme-core/src/gradients/types.ts
96196
- /**
96197
- * Gradient configuration types and schemas
96198
- */
96199
- /**
96200
- * Gradient color stop
96201
- */
96202
- const gradientStopSchema = z$1.object({
96203
- color: themeColorTokenSchema,
96204
- position: z$1.number().min(0).max(100)
96205
- });
96206
- /**
96207
- * Radial gradient shape. Optional; defaults to `circle` (the historical shape)
96208
- * so existing radial gradients are byte-identical.
96209
- *
96210
- * Named `RadialGradientShape` to avoid clashing with `styles/gradients.ts`'s
96211
- * `GradientShape` (which names the gradient *kind*: linear/radial/conic).
96212
- */
96213
- const radialGradientShapeSchema = z$1.enum(["circle", "ellipse"]);
96214
- /**
96215
- * Gradient configuration.
96216
- *
96217
- * `type` is optional and defaults to `'linear'` so gradients persisted without a
96218
- * type (or with an explicit `'linear'`) render exactly as before. `'radial'` and
96219
- * `'conic'` are additive kinds:
96220
- * - linear: `angle` (degrees)
96221
- * - radial: optional `shape` (circle/ellipse) + `position`
96222
- * - conic: optional `angle` (from-angle, degrees) + `position`
96223
- */
96224
- const gradientConfigSchema = z$1.object({
96225
- type: z$1.enum([
96226
- "linear",
96227
- "radial",
96228
- "conic"
96229
- ]).default("linear"),
96230
- angle: z$1.number().min(0).max(360).optional(),
96231
- shape: radialGradientShapeSchema.optional(),
96232
- position: z$1.string().optional(),
96233
- stops: z$1.array(gradientStopSchema).min(2)
96234
- });
96235
- //#endregion
96236
97157
  //#region ../theme-core/src/interactive/baseSchema.ts
96237
97158
  /**
96238
97159
  * Shared Base Schemas for Interactive Elements
@@ -97774,6 +98695,22 @@ z$1.object({
97774
98695
  }).strict();
97775
98696
  //#endregion
97776
98697
  //#region ../theme-core/src/site-styles/runtimeCompiler.ts
98698
+ function defineSectionForegroundRuntimeTokens(input) {
98699
+ return {
98700
+ textColor: requireThemeColorToken(input.textColor),
98701
+ headingColor: requireThemeColorToken(input.headingColor),
98702
+ linkColor: requireThemeColorToken(input.linkColor),
98703
+ supportingColor: requireThemeColorToken(input.supportingColor)
98704
+ };
98705
+ }
98706
+ function requireThemeColorToken(value) {
98707
+ const token = parseThemeColorToken(value);
98708
+ if (!token) throw new Error(`Invalid section foreground Theme color token: ${String(value)}`);
98709
+ return token;
98710
+ }
98711
+ function isGradientSectionSurfaceRuntimeRule(rule) {
98712
+ return rule.background?.type === "gradient";
98713
+ }
97777
98714
  const compiledRuntimeStyleFieldNames = [
97778
98715
  "_frameStyles",
97779
98716
  "_sectionStyles",
@@ -97952,8 +98889,7 @@ function compileSectionStyles(input) {
97952
98889
  const rule = input.rules.sectionSurfaces[input.surface];
97953
98890
  const background = compileSectionBackground({
97954
98891
  surface: input.surface,
97955
- background: rule.background,
97956
- foreground: rule.foreground,
98892
+ rule,
97957
98893
  surfaceResolutionContext: input.surfaceResolutionContext,
97958
98894
  heroLegibility: input.heroLegibility,
97959
98895
  imageSurfaceTreatment: input.imageSurfaceTreatment,
@@ -97987,15 +98923,24 @@ function sectionMinHeightForIntent(sectionHeight, surface) {
97987
98923
  return { minHeight: sectionHeight };
97988
98924
  }
97989
98925
  function compileSectionBackground(input) {
97990
- if (!input.background || input.background.type !== "image") return compileColorSectionBackground(input.surface, input.background, input.foreground, input.surfaceResolutionContext);
97991
- const treatmentBackground = compileImageSurfaceTreatmentBackground(input.background, input.imageSurfaceTreatment, input.foreground);
98926
+ if (isGradientSectionSurfaceRuntimeRule(input.rule)) return compileGradientSectionBackground(input.rule.background, input.rule.foreground);
98927
+ if (!input.rule.background || input.rule.background.type !== "image") return compileColorSectionBackground(input.surface, input.rule.background, input.rule.foreground, input.surfaceResolutionContext);
98928
+ const treatmentBackground = compileImageSurfaceTreatmentBackground(input.rule.background, input.imageSurfaceTreatment, input.rule.foreground);
97992
98929
  if (treatmentBackground) return withImageSurfaceMotion(treatmentBackground, input.imageSurfaceMotion);
97993
98930
  return withImageSurfaceMotion({
97994
- ...input.background,
98931
+ ...input.rule.background,
97995
98932
  overlay: input.heroLegibility === "none" ? null : input.rules.heroLegibility[input.heroLegibility],
97996
- ...input.foreground
98933
+ ...input.rule.foreground
97997
98934
  }, input.imageSurfaceMotion);
97998
98935
  }
98936
+ function compileGradientSectionBackground(background, foreground) {
98937
+ const preset = getGradientPreset(background.gradientPresetId);
98938
+ return {
98939
+ ...background,
98940
+ gradient: gradientToCss(preset, Object.fromEntries(preset.stops.map((stop) => [stop.color, `rgb(var(--tb-${stop.color}))`]))),
98941
+ ...foreground
98942
+ };
98943
+ }
97999
98944
  function compileColorSectionBackground(surface, background, foreground, surfaceResolutionContext) {
98000
98945
  if (!background || background.type !== "color") return background;
98001
98946
  const accessibleSurface = toAccessibleColorSurfaceIntent(surface);
@@ -98855,24 +99800,24 @@ const kirtanOrnateDesignRuntimeRules = defineDesignRuntimeRules({
98855
99800
  type: "color",
98856
99801
  color: "muted"
98857
99802
  },
98858
- foreground: {
99803
+ foreground: defineSectionForegroundRuntimeTokens({
98859
99804
  textColor: "text",
98860
99805
  headingColor: "primary",
98861
99806
  linkColor: "primary",
98862
99807
  supportingColor: "text"
98863
- }
99808
+ })
98864
99809
  },
98865
99810
  "brand-depth-band": {
98866
99811
  background: {
98867
99812
  type: "color",
98868
99813
  color: "primary-800"
98869
99814
  },
98870
- foreground: {
99815
+ foreground: defineSectionForegroundRuntimeTokens({
98871
99816
  textColor: "text",
98872
99817
  headingColor: "primary",
98873
99818
  linkColor: "primary",
98874
99819
  supportingColor: "text"
98875
- }
99820
+ })
98876
99821
  },
98877
99822
  "hero-image": {
98878
99823
  background: {
@@ -98880,12 +99825,32 @@ const kirtanOrnateDesignRuntimeRules = defineDesignRuntimeRules({
98880
99825
  opacity: 1,
98881
99826
  position: "center center"
98882
99827
  },
98883
- foreground: {
99828
+ foreground: defineSectionForegroundRuntimeTokens({
98884
99829
  textColor: "text",
98885
99830
  headingColor: "primary",
98886
99831
  linkColor: "primary",
98887
99832
  supportingColor: "text"
98888
- }
99833
+ })
99834
+ }
99835
+ }
99836
+ });
99837
+ const primaryGlowGradientPresetId = parseGradientPresetId("primary-glow");
99838
+ if (!primaryGlowGradientPresetId) throw new Error("Expected primary-glow in the Theme Core gradient catalog");
99839
+ const fulcrumDesignRuntimeRules = defineDesignRuntimeRules({
99840
+ ...defaultDesignRuntimeRules,
99841
+ sectionSurfaces: {
99842
+ ...defaultDesignRuntimeRules.sectionSurfaces,
99843
+ "accent-band": {
99844
+ background: {
99845
+ type: "gradient",
99846
+ gradientPresetId: primaryGlowGradientPresetId
99847
+ },
99848
+ foreground: defineSectionForegroundRuntimeTokens({
99849
+ textColor: "primaryForeground",
99850
+ headingColor: "primaryForeground",
99851
+ linkColor: "primaryForeground",
99852
+ supportingColor: "primaryForeground"
99853
+ })
98889
99854
  }
98890
99855
  }
98891
99856
  });
@@ -100273,6 +101238,8 @@ const curatedSiteStyles = [
100273
101238
  },
100274
101239
  compositionBudget: quietBudget,
100275
101240
  typography: fulcrumTypography,
101241
+ designRuntimeRules: fulcrumDesignRuntimeRules,
101242
+ recommendedAppearancePresetIds: ["cta-accent-band"],
100276
101243
  themeOverrides: {
100277
101244
  shadow: { colorToken: "primary" },
100278
101245
  accordions: {
@@ -101313,17 +102280,58 @@ function contentOwnedBackgroundEndpoint(content) {
101313
102280
  };
101314
102281
  }
101315
102282
  function preserveContentOwnedBackgroundFields(content, fields) {
101316
- const currentBackground = readRecord(readRecord(content._sectionStyles)?.background);
101317
- if (currentBackground?.contentOwner === "page-design-editor") return {
102283
+ const resolved = resolveSectionBackground(parseCanonicalRuntimeBackground(content), fields._sectionStyles?.background);
102284
+ if (resolved.kind === "look-default" || resolved.kind === "none") return fields;
102285
+ return {
101318
102286
  ...fields,
101319
102287
  _sectionStyles: {
101320
102288
  ...fields._sectionStyles,
101321
- background: mergeCompiledAndContentOwnedBackground(fields._sectionStyles?.background, currentBackground)
102289
+ background: resolved.background
102290
+ }
102291
+ };
102292
+ }
102293
+ function parseCanonicalRuntimeBackground(content) {
102294
+ const background = readRecord(readRecord(content._sectionStyles)?.background);
102295
+ if (!background) return { kind: "none" };
102296
+ return background.contentOwner === "page-design-editor" ? {
102297
+ kind: "page-design-override",
102298
+ background
102299
+ } : {
102300
+ kind: "block-authored",
102301
+ background
102302
+ };
102303
+ }
102304
+ function resolveSectionBackground(source, lookDefault) {
102305
+ if (source.kind === "page-design-override") return {
102306
+ kind: "page-design-override",
102307
+ background: completePageDesignOverrideForeground(lookDefault, source.background)
102308
+ };
102309
+ if (lookDefault) {
102310
+ if (source.kind === "block-authored" && Object.prototype.hasOwnProperty.call(source.background, "image")) return {
102311
+ kind: "block-authored",
102312
+ background: {
102313
+ ...lookDefault,
102314
+ ...pickExistingImageBackgroundFields(source.background)
102315
+ }
102316
+ };
102317
+ return {
102318
+ kind: "look-default",
102319
+ background: lookDefault
102320
+ };
102321
+ }
102322
+ if (source.kind === "block-authored" && Object.prototype.hasOwnProperty.call(source.background, "image")) return {
102323
+ kind: "block-authored",
102324
+ background: {
102325
+ type: "color",
102326
+ ...pickExistingImageBackgroundFields(source.background)
101322
102327
  }
101323
102328
  };
101324
- return preservePromotedBackgroundImageFields(content, fields);
102329
+ return source.kind === "block-authored" ? {
102330
+ kind: "block-authored",
102331
+ background: source.background
102332
+ } : { kind: "none" };
101325
102333
  }
101326
- function mergeCompiledAndContentOwnedBackground(compiledBackground, contentBackground) {
102334
+ function completePageDesignOverrideForeground(compiledBackground, contentBackground) {
101327
102335
  const merged = {
101328
102336
  ...compiledBackground ?? {},
101329
102337
  ...contentBackground
@@ -101346,22 +102354,6 @@ const promotedBackgroundImageFieldNames = [
101346
102354
  "scale",
101347
102355
  "position"
101348
102356
  ];
101349
- function preservePromotedBackgroundImageFields(content, fields) {
101350
- const currentBackground = readRecord(readRecord(content._sectionStyles)?.background);
101351
- if (!currentBackground || !Object.prototype.hasOwnProperty.call(currentBackground, "image")) return fields;
101352
- const imageBackgroundFields = pickExistingImageBackgroundFields(currentBackground);
101353
- const compiledBackground = fields._sectionStyles?.background ?? { type: "color" };
101354
- return {
101355
- ...fields,
101356
- _sectionStyles: {
101357
- ...fields._sectionStyles,
101358
- background: {
101359
- ...compiledBackground,
101360
- ...imageBackgroundFields
101361
- }
101362
- }
101363
- };
101364
- }
101365
102357
  function readRecord(value) {
101366
102358
  return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
101367
102359
  }
@@ -104164,6 +105156,20 @@ const blockCategoryEnum = z$1.enum([
104164
105156
  "layout",
104165
105157
  "interactive"
104166
105158
  ]);
105159
+ const blockContentSourceSchema = z$1.object({
105160
+ kind: z$1.enum([
105161
+ "inline",
105162
+ "entries",
105163
+ "mixed"
105164
+ ]),
105165
+ contentType: z$1.string().min(1).optional()
105166
+ }).superRefine((value, ctx) => {
105167
+ if (value.kind === "inline" && value.contentType) ctx.addIssue({
105168
+ code: z$1.ZodIssueCode.custom,
105169
+ path: ["contentType"],
105170
+ message: "contentType is not allowed when contentSource.kind is \"inline\""
105171
+ });
105172
+ });
104167
105173
  z$1.object({
104168
105174
  name: z$1.string().min(1),
104169
105175
  version: z$1.string().min(1),
@@ -104194,6 +105200,12 @@ z$1.object({
104194
105200
  }).optional()).optional(),
104195
105201
  category: blockCategoryEnum.optional(),
104196
105202
  contentTypes: z$1.array(z$1.string()).optional(),
105203
+ /**
105204
+ * Explicit content-source classification (inline / entries / mixed). Optional at the
105205
+ * schema level for backward compatibility with SDK-defined custom blocks, but every
105206
+ * registered SYSTEM block must declare it (enforced by a registry-wide test).
105207
+ */
105208
+ contentSource: blockContentSourceSchema.optional(),
104197
105209
  tags: z$1.array(z$1.string()).optional(),
104198
105210
  icon: z$1.string().optional()
104199
105211
  });
@@ -104568,9 +105580,15 @@ const heroCopyFragment = defineFragment({
104568
105580
  //#endregion
104569
105581
  //#region ../blocks/src/system/fields/ctas.ts
104570
105582
  function createCtasRepeater(options = {}) {
104571
- const { id = "ctas", label = "Calls to action", itemLabel = "CTA", minItems = 0, maxItems, button } = options;
105583
+ const { id = "ctas", label = "Calls to action", itemLabel = "CTA", minItems = 0, maxItems, button, defaultValue } = options;
105584
+ const fieldId = id;
105585
+ const buttonField = createButtonGroup({
105586
+ showGroupLabel: false,
105587
+ ...button ?? {},
105588
+ flattenInRepeater: true
105589
+ });
104572
105590
  return {
104573
- id,
105591
+ id: fieldId,
104574
105592
  type: "repeater",
104575
105593
  label,
104576
105594
  itemLabel,
@@ -104579,11 +105597,8 @@ function createCtasRepeater(options = {}) {
104579
105597
  maxItems,
104580
105598
  required: false,
104581
105599
  allowConversion: true,
104582
- schema: { fields: [createButtonGroup({
104583
- showGroupLabel: false,
104584
- ...button ?? {},
104585
- flattenInRepeater: true
104586
- })] }
105600
+ ...defaultValue !== void 0 ? { defaultValue: [...defaultValue] } : {},
105601
+ schema: { fields: [buttonField] }
104587
105602
  };
104588
105603
  }
104589
105604
  //#endregion
@@ -104633,6 +105648,7 @@ const heroCtaRowFragment = defineFragment({
104633
105648
  label: "Calls to action",
104634
105649
  itemLabel: "CTA",
104635
105650
  maxItems: 3,
105651
+ defaultValue: [],
104636
105652
  button: {
104637
105653
  variants: [
104638
105654
  {
@@ -104700,7 +105716,7 @@ const ctaCopyFragment = defineFragment({
104700
105716
  eyebrowPath: "content.eyebrow",
104701
105717
  titlePath: "content.title",
104702
105718
  className: "cta-heading"
104703
- }), richText({ className: "cta-content rb-prose rb-mx-auto rb-max-w-none" }, when("content.content"), bind$1("content.content"))]
105719
+ }), richText({ className: "cta-content rb-prose rb-mx-auto rb-max-w-none" }, when("content"), bind$1("content"))]
104704
105720
  });
104705
105721
  //#endregion
104706
105722
  //#region ../blocks/src/system/fragments/library/testimonialsHeading.ts
@@ -106680,6 +107696,7 @@ function createBlockManifest(config) {
106680
107696
  previewCustomize: config.previewCustomize,
106681
107697
  category: config.category,
106682
107698
  contentTypes: config.contentTypes ? [...config.contentTypes] : void 0,
107699
+ contentSource: config.contentSource,
106683
107700
  tags: config.tags ? [...config.tags] : [],
106684
107701
  icon: config.icon ?? "Box",
106685
107702
  layout,
@@ -107695,6 +108712,7 @@ const cartBlockDefinition = {
107695
108712
  paletteHidden: false
107696
108713
  },
107697
108714
  category: "interactive",
108715
+ contentSource: { kind: "inline" },
107698
108716
  tags: [
107699
108717
  "shop",
107700
108718
  "cart",
@@ -107777,6 +108795,7 @@ const checkoutBlockDefinition = {
107777
108795
  paletteHidden: false
107778
108796
  },
107779
108797
  category: "interactive",
108798
+ contentSource: { kind: "inline" },
107780
108799
  tags: [
107781
108800
  "shop",
107782
108801
  "checkout",
@@ -108027,6 +109046,7 @@ const courseRegistrationBlockDefinition = {
108027
109046
  titleSource: "heading",
108028
109047
  description: "Enrollment form for multi-session courses",
108029
109048
  category: "interactive",
109049
+ contentSource: { kind: "inline" },
108030
109050
  tags: [
108031
109051
  "courses",
108032
109052
  "enrollment",
@@ -108140,15 +109160,9 @@ const courseRegistrationBlockDefinition = {
108140
109160
  defaultValue: "Sign up",
108141
109161
  maxLength: 40
108142
109162
  },
108143
- {
108144
- id: "buttonVariant",
108145
- type: "select",
108146
- label: "Button style",
109163
+ createButtonVariantField({
108147
109164
  description: "Choose a button style from your theme",
108148
- required: false,
108149
- multiple: false,
108150
- defaultValue: "primary",
108151
- options: [
109165
+ variants: [
108152
109166
  {
108153
109167
  value: "primary",
108154
109168
  label: "Primary"
@@ -108161,9 +109175,8 @@ const courseRegistrationBlockDefinition = {
108161
109175
  value: "outline",
108162
109176
  label: "Outline"
108163
109177
  }
108164
- ],
108165
- ui: { intent: "style" }
108166
- }
109178
+ ]
109179
+ })
108167
109180
  ],
108168
109181
  layout: [styledSection({
108169
109182
  baseClass: "",
@@ -108410,6 +109423,7 @@ const giftingBlockDefinition = {
108410
109423
  paletteHidden: false
108411
109424
  },
108412
109425
  category: "interactive",
109426
+ contentSource: { kind: "entries" },
108413
109427
  tags: [
108414
109428
  "gifting",
108415
109429
  "gift cards",
@@ -108761,6 +109775,7 @@ const eventRegistrationBlockDefinition = {
108761
109775
  titleSource: "heading",
108762
109776
  description: "Multi-step event registration form",
108763
109777
  category: "interactive",
109778
+ contentSource: { kind: "inline" },
108764
109779
  tags: [
108765
109780
  "events",
108766
109781
  "registration",
@@ -108867,15 +109882,9 @@ const eventRegistrationBlockDefinition = {
108867
109882
  defaultValue: "Complete Registration",
108868
109883
  maxLength: 40
108869
109884
  },
108870
- {
108871
- id: "buttonVariant",
108872
- type: "select",
108873
- label: "Button style",
109885
+ createButtonVariantField({
108874
109886
  description: "Choose a button style from your theme",
108875
- required: false,
108876
- multiple: false,
108877
- defaultValue: "primary",
108878
- options: [
109887
+ variants: [
108879
109888
  {
108880
109889
  value: "primary",
108881
109890
  label: "Primary"
@@ -108888,9 +109897,8 @@ const eventRegistrationBlockDefinition = {
108888
109897
  value: "outline",
108889
109898
  label: "Outline"
108890
109899
  }
108891
- ],
108892
- ui: { intent: "style" }
108893
- }
109900
+ ]
109901
+ })
108894
109902
  ],
108895
109903
  layout: [styledSection({
108896
109904
  baseClass: "",
@@ -109183,6 +110191,7 @@ const formManifest = createBlockManifest({
109183
110191
  paletteHidden: false
109184
110192
  },
109185
110193
  category: "interactive",
110194
+ contentSource: { kind: "inline" },
109186
110195
  tags: [
109187
110196
  "form",
109188
110197
  "contact",
@@ -110312,6 +111321,7 @@ const eventCalendarBlockDefinition = {
110312
111321
  paletteHidden: false
110313
111322
  },
110314
111323
  category: "interactive",
111324
+ contentSource: { kind: "entries" },
110315
111325
  tags: [
110316
111326
  "events",
110317
111327
  "calendar",
@@ -110784,6 +111794,7 @@ const eventListingBlockDefinition = {
110784
111794
  paletteHidden: true
110785
111795
  },
110786
111796
  category: "interactive",
111797
+ contentSource: { kind: "entries" },
110787
111798
  tags: [
110788
111799
  "events",
110789
111800
  "listing",
@@ -111216,6 +112227,7 @@ const newsletterSignupBlockDefinition = {
111216
112227
  titleSource: "title",
111217
112228
  description: "Newsletter subscription form with configurable field presets.",
111218
112229
  category: "interactive",
112230
+ contentSource: { kind: "inline" },
111219
112231
  fragments: [{
111220
112232
  fragment: newsletterCopyFragment,
111221
112233
  fieldPriority: 0
@@ -111344,6 +112356,7 @@ const productDetailBlockDefinition = {
111344
112356
  paletteHidden: false
111345
112357
  },
111346
112358
  category: "interactive",
112359
+ contentSource: { kind: "entries" },
111347
112360
  tags: [
111348
112361
  "shop",
111349
112362
  "product",
@@ -111511,6 +112524,7 @@ const productListBlockDefinition = {
111511
112524
  paletteHidden: false
111512
112525
  },
111513
112526
  category: "interactive",
112527
+ contentSource: { kind: "entries" },
111514
112528
  tags: [
111515
112529
  "shop",
111516
112530
  "products",
@@ -111772,6 +112786,7 @@ const shopBlockDefinition = {
111772
112786
  paletteHidden: false
111773
112787
  },
111774
112788
  category: "interactive",
112789
+ contentSource: { kind: "entries" },
111775
112790
  tags: [
111776
112791
  "shop",
111777
112792
  "passes",
@@ -113345,6 +114360,7 @@ const heroBlockDefinition = { manifest: createBlockManifest({
113345
114360
  title: "Hero",
113346
114361
  titleSource: "headline",
113347
114362
  category: "layout",
114363
+ contentSource: { kind: "inline" },
113348
114364
  includeContainerStyles: true,
113349
114365
  promotedFields: ["_sectionStyles.background.image"],
113350
114366
  fragments: [
@@ -113618,6 +114634,7 @@ const introBlockDefinition = { manifest: createBlockManifest({
113618
114634
  id: "block.intro",
113619
114635
  title: "Intro",
113620
114636
  category: "layout",
114637
+ contentSource: { kind: "inline" },
113621
114638
  includeContainerStyles: true,
113622
114639
  titleSource: "title",
113623
114640
  previewCustomize: { quickFieldPriority: [
@@ -113803,6 +114820,7 @@ const bodyTextBlockDefinition = { manifest: createBlockManifest({
113803
114820
  title: "Body Text",
113804
114821
  titleSource: "heading",
113805
114822
  category: "content",
114823
+ contentSource: { kind: "inline" },
113806
114824
  fragments: [{
113807
114825
  fragment: bodyCopyFragment,
113808
114826
  fieldPriority: 0
@@ -113859,6 +114877,10 @@ const blogPostBlockDefinition = {
113859
114877
  description: "Highlights a single blog post with title, image, and excerpt.",
113860
114878
  category: "blog",
113861
114879
  contentTypes: ["post"],
114880
+ contentSource: {
114881
+ kind: "entries",
114882
+ contentType: "post"
114883
+ },
113862
114884
  tags: [
113863
114885
  "blog",
113864
114886
  "post",
@@ -114156,6 +115178,10 @@ const blogListingManifest = createBlockManifest({
114156
115178
  ],
114157
115179
  description: "Display a collection of blog posts in grid or stack layout.",
114158
115180
  contentTypes: ["post"],
115181
+ contentSource: {
115182
+ kind: "entries",
115183
+ contentType: "post"
115184
+ },
114159
115185
  tags: [
114160
115186
  "blog",
114161
115187
  "posts",
@@ -114198,6 +115224,7 @@ const ctaFullBlockDefinition = { manifest: createBlockManifest({
114198
115224
  id: "block.cta-full",
114199
115225
  title: "Full-width CTA",
114200
115226
  category: "marketing",
115227
+ contentSource: { kind: "inline" },
114201
115228
  fragments: [{
114202
115229
  fragment: ctaCopyFragment,
114203
115230
  fieldPriority: 0
@@ -114231,6 +115258,7 @@ const singleButtonBlockDefinition = { manifest: createBlockManifest({
114231
115258
  id: "block.single-button",
114232
115259
  title: "Single Button",
114233
115260
  category: "marketing",
115261
+ contentSource: { kind: "inline" },
114234
115262
  fragments: [{
114235
115263
  fragment: singleButtonFragment,
114236
115264
  fieldPriority: 0
@@ -114288,6 +115316,7 @@ const contactNewsletterBlockDefinition = {
114288
115316
  titleSource: "contactTitle",
114289
115317
  description: "Two-column newsletter signup and contact form section.",
114290
115318
  category: "interactive",
115319
+ contentSource: { kind: "inline" },
114291
115320
  layout: contactNewsletterLayout,
114292
115321
  defaultVariant: "default",
114293
115322
  variants: { default: contactNewsletterLayout },
@@ -114491,6 +115520,7 @@ const faqBlockDefinition = { manifest: createBlockManifest({
114491
115520
  title: "FAQ",
114492
115521
  titleSource: "title",
114493
115522
  category: "content",
115523
+ contentSource: { kind: "inline" },
114494
115524
  includeContainerStyles: true,
114495
115525
  fragments: [{
114496
115526
  fragment: faqHeadingFragment,
@@ -116100,6 +117130,7 @@ const siteHeaderManifest = createBlockManifest({
116100
117130
  id: "block.site-header",
116101
117131
  title: "Site Header",
116102
117132
  category: "layout",
117133
+ contentSource: { kind: "inline" },
116103
117134
  additionalFields: [{
116104
117135
  id: "mode",
116105
117136
  type: "select",
@@ -116305,6 +117336,7 @@ const siteFooterManifest = createBlockManifest({
116305
117336
  id: "block.site-footer",
116306
117337
  title: "Site Footer",
116307
117338
  category: "layout",
117339
+ contentSource: { kind: "inline" },
116308
117340
  skipSectionStyles: true,
116309
117341
  layout: section({
116310
117342
  background: "background",
@@ -116455,6 +117487,7 @@ const testimonialsBlockDefinition = {
116455
117487
  id: "block.testimonials",
116456
117488
  title: "Testimonials",
116457
117489
  category: "marketing",
117490
+ contentSource: { kind: "inline" },
116458
117491
  includeContainerStyles: true,
116459
117492
  previewCustomize: { quickFieldPriority: [
116460
117493
  "avatarLayout",
@@ -116613,6 +117646,7 @@ const columnsBlockDefinition = { manifest: createBlockManifest({
116613
117646
  id: "block.columns",
116614
117647
  title: "Columns",
116615
117648
  category: "layout",
117649
+ contentSource: { kind: "inline" },
116616
117650
  additionalFields: [
116617
117651
  parseFieldDefinition({
116618
117652
  id: "equalHeight",
@@ -116846,6 +117880,7 @@ const collectionBlockDefinition = { manifest: createBlockManifest({
116846
117880
  id: "block.collection",
116847
117881
  title: "Collection",
116848
117882
  category: "layout",
117883
+ contentSource: { kind: "inline" },
116849
117884
  additionalFields: [
116850
117885
  parseFieldDefinition({
116851
117886
  id: "layout",
@@ -117069,6 +118104,7 @@ const featureCardsBlockDefinition = { manifest: createBlockManifest({
117069
118104
  id: "block.feature-cards",
117070
118105
  title: "Feature Cards",
117071
118106
  category: "layout",
118107
+ contentSource: { kind: "inline" },
117072
118108
  includeContainerStyles: true,
117073
118109
  titleSource: "title",
117074
118110
  additionalFields: [
@@ -117452,6 +118488,7 @@ const mediaTextBlockDefinition = { manifest: createBlockManifest({
117452
118488
  id: "block.media-text",
117453
118489
  title: "Media and Text",
117454
118490
  category: "layout",
118491
+ contentSource: { kind: "inline" },
117455
118492
  includeContainerStyles: true,
117456
118493
  titleSource: "title",
117457
118494
  previewCustomize: { quickFieldPriority: [
@@ -117852,6 +118889,7 @@ const appointmentBookingBlockDefinition = {
117852
118889
  paletteHidden: false
117853
118890
  },
117854
118891
  category: "interactive",
118892
+ contentSource: { kind: "inline" },
117855
118893
  tags: [
117856
118894
  "booking",
117857
118895
  "appointment",
@@ -118016,6 +119054,7 @@ const weeklySlotAvailabilityManifest = createBlockManifest({
118016
119054
  paletteHidden: false
118017
119055
  },
118018
119056
  category: "interactive",
119057
+ contentSource: { kind: "inline" },
118019
119058
  tags: [
118020
119059
  "booking",
118021
119060
  "appointment",
@@ -118123,6 +119162,7 @@ const eventDetailsManifest = createBlockManifest({
118123
119162
  titleSource: "heading",
118124
119163
  description: "Date/time, venue, map, and other dates for an event",
118125
119164
  category: "content",
119165
+ contentSource: { kind: "entries" },
118126
119166
  tags: [
118127
119167
  "events",
118128
119168
  "venue",
@@ -118328,6 +119368,7 @@ const courseDetailsBlockDefinition = {
118328
119368
  titleSource: "heading",
118329
119369
  description: "Schedule, venue, price, and enrollment status for a course",
118330
119370
  category: "content",
119371
+ contentSource: { kind: "entries" },
118331
119372
  tags: [
118332
119373
  "courses",
118333
119374
  "schedule",
@@ -118619,6 +119660,7 @@ const eventSpotlightBlockDefinition = {
118619
119660
  paletteHidden: false
118620
119661
  },
118621
119662
  category: "content",
119663
+ contentSource: { kind: "entries" },
118622
119664
  tags: [
118623
119665
  "events",
118624
119666
  "featured",
@@ -119021,6 +120063,7 @@ const recurringScheduleBlockDefinition = {
119021
120063
  titleSource: "heading",
119022
120064
  description: "A compact weekly schedule with one row per recurring series.",
119023
120065
  category: "interactive",
120066
+ contentSource: { kind: "entries" },
119024
120067
  icon: "CalendarDays",
119025
120068
  tags: [
119026
120069
  "schedule",
@@ -119354,7 +120397,10 @@ const offeringsPreviewFields = [
119354
120397
  label: "Link"
119355
120398
  }
119356
120399
  ],
119357
- ui: { intent: "display" }
120400
+ ui: {
120401
+ intent: "display",
120402
+ widget: "buttonVariant"
120403
+ }
119358
120404
  },
119359
120405
  {
119360
120406
  id: "buttonText",
@@ -119407,6 +120453,7 @@ const offeringsPreviewManifest = createBlockManifest({
119407
120453
  paletteHidden: false
119408
120454
  },
119409
120455
  category: "content",
120456
+ contentSource: { kind: "mixed" },
119410
120457
  tags: [
119411
120458
  "offerings",
119412
120459
  "events",
@@ -119575,6 +120622,7 @@ const embedManifest = createBlockManifest({
119575
120622
  id: "block.embed",
119576
120623
  title: "Embed Content",
119577
120624
  category: "content",
120625
+ contentSource: { kind: "entries" },
119578
120626
  titleSource: "heading",
119579
120627
  additionalFields: [
119580
120628
  parseFieldDefinition({
@@ -120062,6 +121110,7 @@ const imageGalleryBlockDefinition = { manifest: createBlockManifest({
120062
121110
  id: "block.image-gallery",
120063
121111
  title: "Image Gallery",
120064
121112
  category: "content",
121113
+ contentSource: { kind: "inline" },
120065
121114
  previewCustomize: { quickFieldPriority: [
120066
121115
  "aspectRatio",
120067
121116
  "slidesToShow",
@@ -120714,6 +121763,7 @@ const videoGridBlockDefinition = { manifest: createBlockManifest({
120714
121763
  id: "block.video-grid",
120715
121764
  title: "Video Grid",
120716
121765
  category: "media",
121766
+ contentSource: { kind: "inline" },
120717
121767
  skipSectionStyles: true,
120718
121768
  additionalFields: parseFieldDefinitions([
120719
121769
  {
@@ -120884,6 +121934,7 @@ const audioPlayerBlockDefinition = { manifest: createBlockManifest({
120884
121934
  title: "Audio Player",
120885
121935
  titleSource: "title",
120886
121936
  category: "media",
121937
+ contentSource: { kind: "inline" },
120887
121938
  description: "Add a branded audio player for a single track.",
120888
121939
  tags: [
120889
121940
  "audio",
@@ -120995,6 +122046,7 @@ const fileDownloadBlockDefinition = { manifest: createBlockManifest({
120995
122046
  title: "File Download",
120996
122047
  titleSource: ["title", "file.filename"],
120997
122048
  category: "media",
122049
+ contentSource: { kind: "inline" },
120998
122050
  description: "Add a simple public download link for a document, ZIP, or audio file.",
120999
122051
  tags: [
121000
122052
  "file",
@@ -121176,6 +122228,7 @@ const teamMembersBlockDefinition = {
121176
122228
  id: "block.team-members",
121177
122229
  title: "Team Members",
121178
122230
  category: "content",
122231
+ contentSource: { kind: "mixed" },
121179
122232
  titleSource: "heading",
121180
122233
  additionalFields: [
121181
122234
  parseFieldDefinition({
@@ -121469,6 +122522,7 @@ const locationMapBlockDefinition = {
121469
122522
  titleSource: "heading",
121470
122523
  description: "Show a business location with an interactive map and directions link.",
121471
122524
  category: "content",
122525
+ contentSource: { kind: "inline" },
121472
122526
  tags: [
121473
122527
  "map",
121474
122528
  "location",
@@ -122492,213 +123546,6 @@ function listBlockDescriptors() {
122492
123546
  }));
122493
123547
  }
122494
123548
  //#endregion
122495
- //#region ../theme-core/src/gradients/presets.ts
122496
- /**
122497
- * Curated library of gradient presets
122498
- * All gradients use theme color tokens, so they adapt to the site's palette
122499
- */
122500
- const GRADIENT_PRESETS = [
122501
- {
122502
- id: "primary-secondary",
122503
- name: "Primary to Secondary",
122504
- description: "Blend your primary and secondary brand colors",
122505
- type: "linear",
122506
- angle: 135,
122507
- stops: [{
122508
- color: "primary-500",
122509
- position: 0
122510
- }, {
122511
- color: "secondary-500",
122512
- position: 100
122513
- }]
122514
- },
122515
- {
122516
- id: "primary-accent",
122517
- name: "Primary to Accent",
122518
- description: "Energetic gradient from primary to accent",
122519
- type: "linear",
122520
- angle: 135,
122521
- stops: [{
122522
- color: "primary-500",
122523
- position: 0
122524
- }, {
122525
- color: "accent-500",
122526
- position: 100
122527
- }]
122528
- },
122529
- {
122530
- id: "secondary-accent",
122531
- name: "Secondary to Accent",
122532
- description: "Vibrant secondary to accent blend",
122533
- type: "linear",
122534
- angle: 135,
122535
- stops: [{
122536
- color: "secondary-500",
122537
- position: 0
122538
- }, {
122539
- color: "accent-500",
122540
- position: 100
122541
- }]
122542
- },
122543
- {
122544
- id: "primary-light-dark",
122545
- name: "Primary Light to Dark",
122546
- description: "Subtle primary color fade",
122547
- type: "linear",
122548
- angle: 180,
122549
- stops: [{
122550
- color: "primary-500",
122551
- position: 0
122552
- }, {
122553
- color: "primary-900",
122554
- position: 100
122555
- }]
122556
- },
122557
- {
122558
- id: "primary-dark-light",
122559
- name: "Primary Dark to Light",
122560
- description: "Reverse primary fade",
122561
- type: "linear",
122562
- angle: 180,
122563
- stops: [{
122564
- color: "primary-900",
122565
- position: 0
122566
- }, {
122567
- color: "primary-50",
122568
- position: 100
122569
- }]
122570
- },
122571
- {
122572
- id: "secondary-light-dark",
122573
- name: "Secondary Light to Dark",
122574
- description: "Subtle secondary color fade",
122575
- type: "linear",
122576
- angle: 180,
122577
- stops: [{
122578
- color: "secondary-500",
122579
- position: 0
122580
- }, {
122581
- color: "secondary-900",
122582
- position: 100
122583
- }]
122584
- },
122585
- {
122586
- id: "accent-light-dark",
122587
- name: "Accent Light to Dark",
122588
- description: "Accent color depth fade",
122589
- type: "linear",
122590
- angle: 180,
122591
- stops: [{
122592
- color: "accent-500",
122593
- position: 0
122594
- }, {
122595
- color: "accent-900",
122596
- position: 100
122597
- }]
122598
- },
122599
- {
122600
- id: "background-surface",
122601
- name: "Background to Surface",
122602
- description: "Subtle depth using base colors",
122603
- type: "linear",
122604
- angle: 180,
122605
- stops: [{
122606
- color: "background",
122607
- position: 0
122608
- }, {
122609
- color: "surface",
122610
- position: 100
122611
- }]
122612
- },
122613
- {
122614
- id: "neutral-fade",
122615
- name: "Neutral Gradient",
122616
- description: "Elegant neutral color fade",
122617
- type: "linear",
122618
- angle: 180,
122619
- stops: [{
122620
- color: "neutral-900",
122621
- position: 0
122622
- }, {
122623
- color: "neutral-50",
122624
- position: 100
122625
- }]
122626
- },
122627
- {
122628
- id: "primary-radial",
122629
- name: "Primary Spotlight",
122630
- description: "Radial primary gradient from center",
122631
- type: "radial",
122632
- position: "center",
122633
- stops: [{
122634
- color: "primary-500",
122635
- position: 0
122636
- }, {
122637
- color: "primary-900",
122638
- position: 100
122639
- }]
122640
- },
122641
- {
122642
- id: "accent-radial",
122643
- name: "Accent Spotlight",
122644
- description: "Radial accent gradient from center",
122645
- type: "radial",
122646
- position: "center",
122647
- stops: [{
122648
- color: "accent-500",
122649
- position: 0
122650
- }, {
122651
- color: "accent-900",
122652
- position: 100
122653
- }]
122654
- },
122655
- {
122656
- id: "primary-secondary-accent",
122657
- name: "Brand Trio",
122658
- description: "All three brand colors in harmony",
122659
- type: "linear",
122660
- angle: 135,
122661
- stops: [
122662
- {
122663
- color: "primary-500",
122664
- position: 0
122665
- },
122666
- {
122667
- color: "secondary-500",
122668
- position: 50
122669
- },
122670
- {
122671
- color: "accent-500",
122672
- position: 100
122673
- }
122674
- ]
122675
- }
122676
- ];
122677
- //#endregion
122678
- //#region ../theme-core/src/gradients/utils.ts
122679
- /**
122680
- * Convert a GradientConfig to a CSS gradient string
122681
- *
122682
- * @param config - The gradient configuration using theme tokens
122683
- * @param tokens - Map of theme color tokens to hex values
122684
- * @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
122685
- */
122686
- function gradientToCss(config, tokens) {
122687
- const stops = config.stops.map((stop) => {
122688
- return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
122689
- }).join(", ");
122690
- const type = config.type ?? "linear";
122691
- if (type === "radial") {
122692
- const position = config.position ?? "center";
122693
- return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
122694
- }
122695
- if (type === "conic") {
122696
- const position = config.position ?? "center";
122697
- return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
122698
- }
122699
- return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
122700
- }
122701
- //#endregion
122702
123549
  //#region ../blocks/src/system/data/loaderEndpoints.ts
122703
123550
  const SUPPORTED_LOADER_ENDPOINTS = [
122704
123551
  "listPublishedEntries",
@@ -127493,6 +128340,7 @@ const CANONICAL_REFUND_PLANNER_ERROR_CODES = [
127493
128340
  "already_refunded",
127494
128341
  "idempotency_amount_mismatch",
127495
128342
  "idempotency_method_mismatch",
128343
+ "idempotency_receipt_mismatch",
127496
128344
  "refund_in_progress"
127497
128345
  ],
127498
128346
  "invalid_amount",
@@ -127505,7 +128353,12 @@ const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
127505
128353
  "payment_intent_not_found",
127506
128354
  "stripe_error",
127507
128355
  "stale_pending_missing_context",
127508
- "non_refundable_deposit_remaining"
128356
+ "non_refundable_deposit_remaining",
128357
+ "deposit_refund_override_required",
128358
+ "refund_revoke_requires_full_line_refund",
128359
+ "payment_receipt_not_found",
128360
+ "payment_receipt_not_refundable",
128361
+ "payment_receipt_attribution_required"
127509
128362
  ];
127510
128363
  [...CANONICAL_REFUND_PLANNER_ERROR_CODES];
127511
128364
  //#endregion
@@ -127518,7 +128371,10 @@ const STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
127518
128371
  "missing_credit_customer",
127519
128372
  "deposit_refund_override_required",
127520
128373
  "refund_revoke_requires_full_line_refund",
127521
- "unified_order_link_required"
128374
+ "unified_order_link_required",
128375
+ "payment_receipt_not_found",
128376
+ "payment_receipt_not_refundable",
128377
+ "payment_receipt_attribution_required"
127522
128378
  ];
127523
128379
  const EVENT_ATTENDEE_REFUND_INVALID_CODES = ["manual_booking_not_refundable", ...STANDARD_LINE_ITEM_REFUND_INVALID_CODES];
127524
128380
  [...CANONICAL_ADMIN_REFUND_FAILURE_CODES];
@@ -162226,24 +163082,55 @@ function planPaletteApplyCommand(input) {
162226
163082
  };
162227
163083
  }
162228
163084
  function buildApplySiteStyleSelectionBody(input) {
162229
- const palettePlan = planPaletteApplyCommand(input);
162230
- if (!palettePlan.ok) return {
163085
+ const styleChanged = input.base.siteStyleId !== input.previewed.siteStyleId;
163086
+ const changes = [];
163087
+ if (styleChanged) changes.push({
163088
+ kind: "set-site-style",
163089
+ siteStyleId: input.previewed.siteStyleId
163090
+ });
163091
+ if (styleChanged || input.base.buttonPersonalityId !== input.previewed.buttonPersonalityId) changes.push({
163092
+ kind: "set-button-personality",
163093
+ buttonPersonalityId: input.previewed.buttonPersonalityId
163094
+ });
163095
+ if (styleChanged || !paletteSelectionSnapshotsEqual(input.base.palette, input.previewed.palette)) {
163096
+ const palettePlan = planPaletteApplyCommand(input);
163097
+ if (!palettePlan.ok) return {
163098
+ ok: false,
163099
+ error: palettePlan.error
163100
+ };
163101
+ changes.push({
163102
+ kind: "set-palette",
163103
+ command: palettePlan.command
163104
+ });
163105
+ }
163106
+ if (styleChanged || !typographyObjectsEqual(input.base.typography, input.previewed.typography)) changes.push({
163107
+ kind: "set-typography",
163108
+ typography: input.previewed.typography
163109
+ });
163110
+ if (styleChanged || input.base.headerLookId !== input.previewed.headerLookId || input.base.headerLayoutId !== input.previewed.headerLayoutId || input.base.headerStyleId !== input.previewed.headerStyleId) changes.push({
163111
+ kind: "set-header",
163112
+ selection: {
163113
+ kind: "canonical",
163114
+ headerLookId: input.previewed.headerLookId,
163115
+ layoutId: input.previewed.headerLayoutId,
163116
+ styleId: input.previewed.headerStyleId
163117
+ }
163118
+ });
163119
+ if (styleChanged || input.base.footerLookId !== input.previewed.footerLookId) changes.push({
163120
+ kind: "set-footer-look",
163121
+ footerLookId: input.previewed.footerLookId
163122
+ });
163123
+ const [first, ...rest] = changes;
163124
+ if (!first) return {
162231
163125
  ok: false,
162232
- error: palettePlan.error
163126
+ error: "no-selection-changes"
162233
163127
  };
162234
163128
  return {
162235
163129
  ok: true,
162236
163130
  body: {
162237
- siteStyleId: input.previewed.siteStyleId,
162238
- buttonPersonalityId: input.previewed.buttonPersonalityId,
162239
- paletteCommand: palettePlan.command,
162240
- typography: input.previewed.typography,
162241
- headerLookId: input.previewed.headerLookId,
162242
- headerLayoutId: input.previewed.headerLayoutId,
162243
- headerStyleId: input.previewed.headerStyleId,
162244
- footerLookId: input.previewed.footerLookId,
162245
163131
  baseSelectionVersion: input.base.selectionVersion,
162246
- selectionId: input.selectionId ?? null
163132
+ selectionId: input.selectionId ?? null,
163133
+ changes: [first, ...rest]
162247
163134
  }
162248
163135
  };
162249
163136
  }
@@ -163659,4 +164546,4 @@ function useSiteChromeCustomizeOptional() {
163659
164546
  return useContext(SiteChromeCustomizeContext);
163660
164547
  }
163661
164548
  //#endregion
163662
- export { beginAutosaveBatch as $, resolveEventCalendarListPageSize as $a, getImageUrl as $c, RotateCcw as $d, NAV_LINK_LETTER_SPACING_MAP as $i, Input as $l, isInternalResolvedLinkValue as $n, resolveEventLinkProps as $o, augmentManifestWithStyleGroups as $r, resolveIconPickerPreset as $s, evaluateVisibility as $t, clsx as $u, deriveStyleConfiguratorCapabilities as A, generateCssVars as Aa, XIcon as Ac, unsafeAsAppointmentServiceId as Ad, CircleAlert as Af, mergeHeaderNavTypographyPreference as Ai, hasEmptyOption as Al, CSS$1 as An, generateCardCss as Ao, normalizeEventRegistrationPageSurfaceSubject as Ar, getFeatureCardIconCompletion as As, canUndoHistory as At, DropdownMenuItem as Au, previewButtonPersonality as B, isOfferingsPreviewSourceKey as Ba, resolveMediaNodeResponsiveImage as Bc, X as Bd, Archive as Bf, componentRuntimeRulesForTheme as Bi, Textarea as Bl, projectRecurringSchedule as Bn, normalizeLocationMapProps as Bo, buildCartDisplay as Br, resolveBlockIconRenderValue as Bs, createSnapshotFromPageRecord as Bt, __spreadArray as Bu, usePreviewThemeOverlay as C, curatedPalettes as Ca, MapPinIcon as Cc, publicEventTicketTypes as Cd, Crop as Cf, MQ_SM_UP as Ci, getFieldIntent as Cl, closestCenter as Cn, normalizeEventCategoryIdsCsv as Co, WIZARD_STEPS as Cr, ICON_CONFIG as Cs, useEntryController as Ct, Card as Cu, committedPaletteForSnapshot as D, paletteColorsEqual as Da, PlusIcon as Dc, parseMediaAssetId as Dd, CirclePlus as Df, boxStylesTransforms as Di, useBlockContext as Dl, useDroppable as Dn, normalizeEventSurfaceScope as Do, buildGiftingInteractiveIslandProps as Dr, FEATURE_CARD_GENERATED_ICON_SIZE_PX as Ds, useEditorUiStoreInstance as Dt, Surface as Du, cancelPreview as E, paletteColorEntries as Ea, PlayIcon as Ec, expectParsedBrandedId as Ed, Clock3 as Ef, getAnchorClasses as Ei, isNonEmptyValue as El, useDraggable as En, normalizeEventSurfacePresetsCsv as Eo, giftingBlockDefinition as Er, mediaSchema$1 as Es, useEditorUiStore as Et, CardTitle as Eu, markApplySaving as F, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as Fa, computeMediaTransformStyle as Fc, unsafeAsPositiveByteCount as Fd, ChevronDown as Ff, retargetCompiledBoundaryRuntimeForContentAdjacency as Fi, useField as Fl, isSupportedLoaderEndpoint as Fn, resolveOnColorForThemeToken as Fo, buildCheckoutInteractiveIslandProps as Fr, toFeatureCardIconSuggestionInputs as Fs, unsafeAsLinkedContentEntryId as Ft, __awaiter as Fu, previewSitePalette as G, resolveOfferingsPreviewGroupOrderEntries as Ga, attachRenderableMediaAssetFields as Gc, Ticket as Gd, isThemeV2NormalEditorRawStyleFieldName as Gi, SelectTrigger as Gl, planSiteOverlayHeaderClearance as Gn, formatEventPrice as Go, EMPTY_COMMERCE_CART_STATE as Gr, unwrapRichTextRoot as Gs, usePalette as Gt, useControllableState as Gu, previewFooterLook as H, normalizeOfferingsPreviewItemLimit as Ha, setContextResolveImageUrlContext as Hc, Undo2 as Hd, __exportAll as Hf, designRuntimeRulesForTheme as Hi, Select$1 as Hl, siteHeaderManifest as Hn, formatDate as Ho, buildProductDetailDisplay as Hr, parseGeneratedIconSetId as Hs, resolvePageRouteSlug as Ht, useId$1 as Hu, openRow as I, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as Ia, getCurrentResolveImageUrlContext as Ic, unsafeAsPositiveSeconds as Id, Check as If, retargetCompiledRuntimeFieldsForContentAdjacency as Ii, Tooltip as Il, gradientToCss as In, resolveTokenOrCssColorValue as Io, buildProductDetailInteractiveIslandProps as Ir, buildGeneratedBlockIconRenderAssetLookupFromUnknown as Is, recordsEqual as It, __extends as Iu, resetTypographyToSaved as J, resolveSpacing as Ja, formatAspectRatioToken as Jc, Sparkles as Jd, getComponentBorderWidthPx as Ji, Badge as Jl, mediaTransforms as Jn, formatTime as Jo, deriveCommerceCheckoutState as Jr, coerceInlineTextWithFallback as Js, validateBlockManifestIssues as Jt, Primitive as Ju, previewSiteStyle as K, resolveOfferingsPreviewGroups as Ka, isRotationDimensionSwap as Kc, Tablet as Kd, isThemeV2NormalEditorRawStylePath as Ki, SelectValue as Kl, visibleHeaderClearancePx as Kn, formatEventPriceDisplay as Ko, buildPassCartItem as Kr, isObjectRecord$1 as Ks, recoveryConflictCopy as Kt, createContextScope as Ku, paletteMutationCapability as L, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as La, renderAudio as Lc, err as Ld, Box as Lf, normalEditorCuratedPromotedFieldPaths as Li, TooltipContent as Ll, GRADIENT_PRESETS as Ln, getTextColorForBackground as Lo, buildProductListInteractiveIslandProps as Lr, getBlockIconSemanticId as Ls, useMultiAutosave as Lt, __generator as Lu, isPreviewingChange as M, runTransforms as Ma, ImagePresets as Mc, unsafeAsFormId as Md, ChevronUp as Mf, formatSiteChromeBackgroundTokenLabel as Mi, mapOptionValueForSelect as Ml, useCombinedRefs as Mn, normalizeBoxStylesCardVariant as Mo, checkoutBlockDefinition as Mr, resolveFeatureCardGeneratedIconSizePx as Ms, pushHistoryEntry as Mt, DropdownMenuSeparator as Mu, markApplyFailed as N, ctaButton as Na, MediaPlaceholder as Nc, unsafeAsMediaAssetId as Nd, ChevronRight as Nf, applyCompiledRuntimeFieldsToContent as Ni, unmapValueFromSelect as Nl, useIsomorphicLayoutEffect$1 as Nn, normalizeCardVariantRole as No, cartBlockDefinition as Nr, shouldReserveFeatureCardIconZone as Ns, redoHistory as Nt, DropdownMenuTrigger as Nu, createPalette as O, paletteColorsSchema as Oa, ShoppingCartIcon as Oc, parseSiteId as Od, CircleMinus as Of, resolveSurfaceForegroundStyles as Oi, SdkConfigProvider as Ol, useSensor as On, normalizeEventVenueId as Oo, courseRegistrationBlockDefinition as Or, FEATURE_CARD_ICON_TREATMENTS as Os, useOptionalEditorUiStoreInstance as Ot, DropdownMenu as Ou, markApplySaved as P, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as Pa, buildResolveImageUrlContext as Pc, unsafeAsPassId as Pd, ChevronLeft as Pf, compileEditorModelRuntime as Pi, FieldFrame as Pl, useUniqueId as Pn, isCssColorLiteral as Po, buildCartInteractiveIslandProps as Pr, suggestSemanticIconForFeatureCard as Ps, undoHistory as Pt, __assign as Pu, toggleRow as Q, getEventRuntimeFiltersKey as Qa, getDirectImageUrlForMediaAsset as Qc, Search as Qd, NAV_LINK_BORDER_RADIUS_MAP as Qi, PopoverTrigger as Ql, createManifestValidator as Qn, resolveEventCta as Qo, augmentManifest as Qr, isIconPickerPreset as Qs, FormRenderer as Qt, cn$1 as Qu, palettePreviewProjection as R, buildOfferingsPreviewRenderStates as Ra, renderVideo as Rc, ok$1 as Rd, ArrowUp as Rf, planPageDesignLayoutLookCompatibility as Ri, TooltipProvider as Rl, getBlockDefinition as Rn, featuresFromHex as Ro, buildShopInteractiveIslandProps as Rr, getGeneratedBlockIconStyleState as Rs, useDebouncedLatestSave as Rt, __read as Ru, PreviewThemeOverlayProvider as S, defaultThemeTokens as Sa, MailIcon as Sc, publicEventScalarPrice as Sd, EllipsisVertical as Sf, MQ_SM_DOWN as Si, useBackendWatch as Sl, PointerSensor as Sn, normalizeEventBlockKind as So, resolveRegistrationTarget as Sr, ACCORDION_TRIGGER_LETTER_SPACING as Ss, EntryControllerProvider as St, createCollapsibleScope as Su, applyTypographyDraftPatch as T, buildPaletteLibraryReadModel as Ta, PhoneIcon as Tc, assertNever$9 as Td, Copy as Tf, BACKGROUND_POSITION_PRESET_VALUES as Ti, isHeaderField as Tl, useDndContext as Tn, normalizeEventStaffMemberId as To, getWizardStepsForContext as Tr, PUBLIC_DOWNLOAD_MEDIA_TYPES as Ts, classifyHistoryShortcut as Tt, CardHeader as Tu, previewHeaderLayout as U, resolveOfferingsPreviewCoursePath as Ua, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as Uc, TriangleAlert as Ud, __toESM as Uf, getCuratedSiteStyle as Ui, SelectContent as Ul, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Un, formatEventCompactDateRail as Uo, formatCommercePrice as Ur, parseSiteIconStyleGuideVersionId as Us, resolveContentTitle as Ut, useDirection as Uu, previewCuratedPalette as V, normalizeOfferingsPreviewGroupOrder as Va, resolveMediaStorageUrl as Vc, Upload as Vd, __commonJSMin as Vf, curatedSiteStyles as Vi, Slider as Vl, siteFooterManifest as Vn, toLocationMapHydrationProps as Vo, buildProductCardDisplay as Vr, parseGeneratedIconAssetId as Vs, deriveRouteMetadataPresentation as Vt, __spreadArrays as Vu, previewHeaderStyle as W, resolveOfferingsPreviewGroupCta as Wa, resolveMediaSlotContract as Wc, Trash2 as Wd, surfaceResolutionContextFromTheme as Wi, SelectItem as Wl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Wn, formatEventDateParts as Wo, formatInterval as Wr, createRichTextDocFromMarkdown as Ws, PaletteProvider as Wt, createCollection as Wu, styleConfiguratorHistoryEntryForPersistedSelection as X, eventListPaginationActionSchema as Xa, resolveMediaTransformForAspect as Xc, SlidersHorizontal as Xd, parseBlockCustomCssRules as Xi, Popover as Xl, uiTransforms as Xn, getContainerClass as Xo, productItemKey as Xr, isInlineTextEmpty as Xs, createManifestFormAdapter as Xt, cva as Xu, setPaletteColors as Y, buildEventRuntimeFilters as Ya, parseAspectRatioValue as Yc, Smartphone as Yd, getComponentShadowVar as Yi, SearchInput as Yl, layoutTransforms as Yn, getCardOrientation as Yo, parseStoredCommerceCartState as Yr, inlineTextToPlainText as Ys, ManifestForm as Yt, Button$1 as Yu, syncStyleConfiguratorState as Z, eventPageSizeSchema as Za, asRecord as Zc, Settings as Zd, parseCustomCssRules as Zi, PopoverContent as Zl, formattingTransforms as Zn, groupEventsByDate as Zo, reduceCommerceCart as Zr, parseInlineTextFromUnknown as Zs, createManifestValidation as Zt, useComposedRefs as Zu, planSiteChromeFooterLayoutSelection as _, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as _a, FileArchiveIcon as _c, parseEventPageSurfaceSubject as _d, FilePlay as _f, PUBLIC_FILE_FIELD_KINDS as _i, rgbColorValue as _l, DEFAULT_LAUNCH_READINESS_INPUT as _n, when as _o, toRegistrationEvents as _r, asDesignBlockId as _s, EditorProvider as _t, CollapsibleContent as _u, previewDesignHistoryDomainForCommand as a, INPUT_SPACING_MAP as aa, ArrowRightIcon as ac, unsafeAsEditorBlockValues as ad, Monitor as af, blogFeaturedPostFragment as ai, generateButtonCss as al, createBlock as an, columnOptionSchema as ao, newsletterSignupBlockDefinition as ar, blockBookingPaymentTermsSchema as as, createOptimisticActionRunner as at, List as au, PreviewDesignCoordinatorProvider as b, foregroundTokenForBackgroundAppearanceColorToken as ba, FileTextIcon as bc, publicEventPricingMode as bd, Eye as bf, MQ_MD_DOWN as bi, surfaceForegroundDeclarations as bl, DndContext as bn, eventScheduleScopeValues as bo, resolveDiscountContext as br, ACCORDION_SPACING_MAP as bs, useUISelector as bt, Root$3 as bu, selectionSnapshotFromApplySiteStyleSelectionResponse as c, findFooterLook as ca, ChevronDownIcon as cc, formatBookingDateTime as cd, LoaderCircle as cf, formCopyFragment as ci, generateBaseInteractiveCSS as cl, deleteBlock as cn, eventLayoutSchema as co, buildEventListingInteractiveIslandProps as cr, defineInteractiveIslandMetaKeys as cs, PreviewRichTextEditor as ct, ScrollableDialogContent as cu, PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE as d, getHeaderStyle as da, ChevronUpIcon as dc, formatLocalScheduleDate as dd, ImagePlus as df, ctaCopyFragment as di, parseThemeButtonVariantId as dl, listEntryPageContentSlots as dn, weekStartSchema as do, buildEventCalendarListingDisplay as dr, defineProgressiveBlockRuntime as ds, useRichTextEditor as dt, DialogContent as du, NAV_LINK_PADDING_MAP as ea, SEMANTIC_ICON_DEFINITIONS as ec, parseFooterModuleId as ed, Redo2 as ef, richTextFragment as ei, getAtPath as el, createStoreBackend as en, resolveEventListPaginationAction as eo, ImageResolveContextProvider as er, getEventAvailability as es, confirmAutosaveBatch as et, Tabs as eu, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as f, boundaryRuntimeMetricsForTransition as fa, CircleMinusIcon as fc, getBookingLocalDateKey as fd, ImageOff as ff, heroCtaRowFragment as fi, themeButtonClassName as fl, mutateBlockContent as fn, eventCalendarListLayoutCompatibleDisplayModeValues as fo, buildEventCalendarListingRender as fr, EDITABLE_SURFACE_FORWARDING_PROP as fs, EMPTY_DOC as ft, DialogDescription as fu, cycleableSiteChromeOptions as g, sectionTransitionVariantForBoundaryOptionId as ga, ExternalLinkIcon as gc, toScheduledBookingDateTime as gd, FileSpreadsheet as gf, defineFragment as gi, mergeStyles as gl, decodePublicProductCategorySelectorQuery as gn, richText as go, buildEventRegistrationInteractiveIslandProps as gr, planSiteChromePlacement as gs, InlineTextEditor as gt, Collapsible as gu, cycleSiteChromeLookId as h, sectionTransitionFamilyForBoundaryOptionId as ha, DownloadIcon as hc, toBookingTimeZone as hd, FileText as hf, bodyCopyFragment as hi, cssVarValue as hl, reorderPageSurfaceSlotBlocks as hn, el as ho, eventRegistrationBlockDefinition as hr, splitPositioningClasses as hs, insertOrReplaceRichTextImage as ht, DialogTitle as hu, usePreviewDesignHistoryOrder as i, INPUT_FONT_SIZE_MAP as ia, ArrowLeftIcon as ic, unsafeAsEditorBlockId as id, Palette as if, faqHeadingFragment as ii, AFFORDANCE_SUPPRESS_CLASS as il, getPageDesignEditorState as in, calendarTabViewsSchema as io, productDetailBlockDefinition as ir, resolveRuntimeEventPricing as is, rejectAutosaveBatch as it, Content as iu, dismissWarnings as j, createTransformRegistry as ja, createIcon as jc, unsafeAsCustomerPassId as jd, ChevronsUpDown as jf, readHeaderNavFontSizePreference as ji, mapCurrentValueForSelect as jl, isKeyboardEvent as jn, generateShadowValue as jo, resolveEventRegistrationScopedEvents as jr, parseFeatureCardGeneratedIconSizePx as js, createHistoryState as jt, DropdownMenuLabel as ju, createStyleConfiguratorState as k, expandPalette as ka, UploadIcon as kc, unsafeAsAppointmentResourceId as kd, CircleCheck as kf, resolveBackgroundColorValue as ki, useSdkConfig as kl, useSensors as kn, publicEventSchema as ko, buildCourseRegistrationInteractiveIslandProps as kr, createFeatureCardIconKey as ks, canRedoHistory as kt, DropdownMenuContent as ku, resolveStyleConfiguratorInitialSnapshot as l, getFooterLayout as la, ChevronLeftIcon as lc, formatBookingInstant as ld, Image as lf, testimonialsCarouselFragment as li, generateInteractiveChildInheritanceCSS as ll, deleteEntrySlotBlock as ln, filterAutoShowSchema as lo, eventCalendarBlockDefinition as lr, createZodCodec as ls, PreviewInlineTextEditor as lt, Dialog as lu, buildSiteChromeLookModels as m, sectionTransitionFamilies as ma, ClockIcon as mc, resolveBookingTimeZoneId as md, File as mf, heroCopyFragment as mi, borderColorStyle as ml, reorderEntrySlotBlocks as mn, bind$1 as mo, buildFormInteractiveIslandProps as mr, markEditableSurfaceForwarding as ms, getRichTextImagePositionFromTarget as mt, DialogHeader as mu, useSiteChromeCustomizeOptional as n, NAV_LINK_TEXT_SIZE_MAP as na, isSemanticIconId as nc, createEditorRemoveBlockCommand as nd, Pencil as nf, cardFragment as ni, buttonPersonalities as nl, toRoutableLinkPayload as nn, normalizeCsvString as no, shopBlockDefinition as nr, getLocalDateKey as ns, enqueueTransaction as nt, TabsList as nu, selectPreviewDesignHistoryDomain as o, LABEL_FONT_SIZE_MAP as oa, CalendarIcon as oc, addLocalScheduleDays as od, Minus as of, singleButtonFragment as oi, generateEffectsCSS as ol, createEntrySlotBlock as on, eventButtonVariantSchema as oo, buildNewsletterFormInteractiveIslandProps as or, buildInteractiveIslandProps as os, resolvePreviewSidebarTab as ot, Root2$1 as ou, reportPreviewDesignError as p, defaultSectionTransitionVariantForFamily as pa, CirclePlusIcon as pc, parseBookingLocalDate as pd, GripVertical as pf, ctaRowFragment as pi, backgroundColorStyle as pl, reorderBlocks as pn, eventCalendarListLayoutOptions as po, formBlockDefinition as pr, composeHeaderSectionWrapperClassName as ps, RichTextEditorSurface as pt, DialogFooter as pu, reconcilePaletteLibraryActive as q, isSemanticSpacing as qa, normalizeRightAngle as qc, Star as qd, pageDesignEditorBackgroundOverrideOwner as qi, Label as ql, contentTransforms as qn, formatEventTeacherLine as qo, buildProductCartItem as qr, isRecord$10 as qs, unfinishedBlockCopy as qt, composeEventHandlers as qu, PreviewDesignHistoryOrderProvider as r, FONT_WEIGHT_MAP as ra, ArrowDownIcon as rc, createEditorReorderBlocksCommand as rd, PenLine as rf, faqAccordionFragment as ri, findButtonPersonality as rl, applyPageDesignEditorAction as rn, normalizeOptionalId as ro, productListBlockDefinition as rr, getLocalMinuteOfDay as rs, idleEditorTransactionQueueState as rt, TabsTrigger as ru, buildApplySiteStyleSelectionBody as s, requireEntriesForCuratedChoices as sa, CheckIcon as sc, formatBookingDate as sd, Maximize2 as sf, formEmbedFragment as si, generateShadowValue$1 as sl, createPageSurfaceSlotBlock as sn, eventCalendarDefaultViewSchema as so, eventListingBlockDefinition as sr, createInteractiveIslandCodec as ss, FooterComposerPanel as st, Trigger$2 as su, SiteChromeCustomizeProvider as t, NAV_LINK_PADDING_X_MAP as ta, getSemanticIconComponent as tc, createEditorInsertBlockCommand as td, Plus as tf, headingFragment as ti, siblingPath as tl, listContentTypes as tn, normalizeCsvIds as to, useImageResolveContextOptional as tr, getEventAvailabilityStatus as ts, deriveTransactionCapabilities as tt, TabsContent as tu, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as u, getHeaderLayout as ua, ChevronRightIcon as uc, formatBookingTime as ud, ImageUp as uf, testimonialsHeadingFragment as ui, TokenResolver as ul, deletePageSurfaceSlotBlock as un, previewStageSchema as uo, buildEventCalendarInteractiveIslandProps as ur, defineClientOwnedBlockRuntime as us, PreviewTextEditor as ut, DialogClose as uu, planSiteChromeLookSelection as v, backgroundAppearanceColorTokenNames as va, FileAudioIcon as vc, formatBookingPriceDisplay as vd, FileHeadphone as vf, siteOptionSources as vi, textColorStyle as vl, deriveLaunchReadiness as vn, bindingSchema as vo, findEventByOccurrenceId as vr, assertNever$8 as vs, useEditor$1 as vt, CollapsibleTrigger as vu, applyResolvedSelections as w, findCuratedPalette as wa, MinusIcon as wc, formatCurrencyAmount as wd, CreditCard as wf, MQ_TABLET_ONLY as wi, getModalConfig as wl, getClientRect as wn, normalizeEventScheduleScope as wo, getStepNumber as wr, ICON_SIZE_PX as ws, useEntryEditorController as wt, CardContent as wu, usePreviewDesignCoordinator as x, parseBackgroundAppearanceColorToken as xa, InfoIcon as xc, publicEventPricingType as xd, EyeOff as xf, MQ_MD_UP as xi, surfaceForegroundValue as xl, KeyboardCode as xn, eventSurfaceScopeValues as xo, resolveEventRequiresPayment as xr, ACCORDION_TRIGGER_FONT_SCALE as xs, EditableBlockProvider as xt, Trigger$3 as xu, planSiteStylePreviewChange as y, backgroundAppearanceQuickColorTokenNames as ya, FileSpreadsheetIcon as yc, publicEventPricingCurrency as yd, FileArchive as yf, MQ_LG_UP as yi, DEFAULT_SURFACE_TEXT_COLOR as yl, AMBIENT_BACKGROUND_ROLES as yn, eventBlockKindValues as yo, findPreSelectedEvent as yr, ACCORDION_OPEN_ACCENT_THICKNESS as ys, ContentFieldsForm as yt, Content$1 as yu, prepareStalePaletteRetry as z, inferLegacyOfferingsPreviewGroupOrder as za, resolveImageUrlWithContext as zc, lucide_react_exports as zd, ArrowDown as zf, resolveVisiblePromotedFieldPathsForEditorBlock as zi, TooltipTrigger as zl, listBlockDescriptors as zn, buildGoogleMapsDirectionsUrl as zo, getShopDisplayForItems as zr, parseBlockIconValue as zs, createRoutingHelpers as zt, __rest as zu };
164549
+ export { beginAutosaveBatch as $, eventPageSizeSchema as $a, getImageUrl as $c, SlidersHorizontal as $d, NAV_LINK_PADDING_X_MAP as $i, Popover as $l, useImageResolveContextOptional as $n, resolveEventLinkProps as $o, headingFragment as $r, resolveIconPickerPreset as $s, evaluateVisibility as $t, cva as $u, deriveStyleConfiguratorCapabilities as A, paletteColorsEqual as Aa, XIcon as Ac, parseMediaAssetId as Ad, CirclePlus as Af, formatSiteChromeBackgroundTokenLabel as Ai, useBlockContext as Al, CSS$1 as An, normalizeEventVenueId as Ao, checkoutBlockDefinition as Ar, getFeatureCardIconCompletion as As, canUndoHistory as At, Surface as Au, previewButtonPersonality as B, buildOfferingsPreviewRenderStates as Ba, resolveMediaNodeResponsiveImage as Bc, err as Bd, ArrowUp as Bf, designRuntimeRulesForTheme as Bi, TooltipContent as Bl, siteHeaderManifest as Bn, normalizeLocationMapProps as Bo, buildProductDetailDisplay as Br, resolveBlockIconRenderValue as Bs, createSnapshotFromPageRecord as Bt, __generator as Bu, usePreviewThemeOverlay as C, foregroundTokenForBackgroundAppearanceColorToken as Ca, MapPinIcon as Cc, publicEventPricingMode as Cd, Eye as Cf, BACKGROUND_POSITION_PRESET_VALUES as Ci, surfaceForegroundDeclarations as Cl, closestCenter as Cn, eventSurfaceScopeValues as Co, getWizardStepsForContext as Cr, ICON_CONFIG as Cs, useEntryController as Ct, Root$3 as Cu, committedPaletteForSnapshot as D, findCuratedPalette as Da, PlusIcon as Dc, formatCurrencyAmount as Dd, CreditCard as Df, resolveBackgroundColorValue as Di, getModalConfig as Dl, useDroppable as Dn, normalizeEventStaffMemberId as Do, buildCourseRegistrationInteractiveIslandProps as Dr, FEATURE_CARD_GENERATED_ICON_SIZE_PX as Ds, useEditorUiStoreInstance as Dt, CardContent as Du, cancelPreview as E, curatedPalettes as Ea, PlayIcon as Ec, publicEventTicketTypes as Ed, Crop as Ef, resolveSurfaceForegroundStyles as Ei, getFieldIntent as El, useDraggable as En, normalizeEventScheduleScope as Eo, courseRegistrationBlockDefinition as Er, mediaSchema$1 as Es, useEditorUiStore as Et, Card as Eu, markApplySaving as F, ctaButton as Fa, computeMediaTransformStyle as Fc, unsafeAsFormId as Fd, ChevronRight as Ff, normalEditorCuratedPromotedFieldPaths as Fi, mapOptionValueForSelect as Fl, isSupportedLoaderEndpoint as Fn, normalizeCardVariantRole as Fo, buildProductListInteractiveIslandProps as Fr, toFeatureCardIconSuggestionInputs as Fs, unsafeAsLinkedContentEntryId as Ft, DropdownMenuSeparator as Fu, previewSitePalette as G, resolveOfferingsPreviewCoursePath as Ga, attachRenderableMediaAssetFields as Gc, Undo2 as Gd, __toESM as Gf, pageDesignEditorBackgroundOverrideOwner as Gi, Select$1 as Gl, contentTransforms as Gn, formatEventPrice as Go, buildProductCartItem as Gr, unwrapRichTextRoot as Gs, usePalette as Gt, useId$1 as Gu, previewFooterLook as H, isOfferingsPreviewSourceKey as Ha, setContextResolveImageUrlContext as Hc, lucide_react_exports as Hd, Archive as Hf, surfaceResolutionContextFromTheme as Hi, TooltipTrigger as Hl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Hn, formatDate as Ho, formatInterval as Hr, parseGeneratedIconSetId as Hs, resolvePageRouteSlug as Ht, __rest as Hu, openRow as I, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as Ia, getCurrentResolveImageUrlContext as Ic, unsafeAsMediaAssetId as Id, ChevronLeft as If, planPageDesignLayoutLookCompatibility as Ii, unmapValueFromSelect as Il, getBlockDefinition as In, isCssColorLiteral as Io, buildShopInteractiveIslandProps as Ir, buildGeneratedBlockIconRenderAssetLookupFromUnknown as Is, recordsEqual as It, DropdownMenuTrigger as Iu, resetTypographyToSaved as J, resolveOfferingsPreviewGroups as Ja, formatAspectRatioToken as Jc, Ticket as Jd, parseBlockCustomCssRules as Ji, SelectTrigger as Jl, uiTransforms as Jn, formatTime as Jo, productItemKey as Jr, coerceInlineTextWithFallback as Js, validateBlockManifestIssues as Jt, useControllableState as Ju, previewSiteStyle as K, resolveOfferingsPreviewGroupCta as Ka, isRotationDimensionSwap as Kc, TriangleAlert as Kd, getComponentBorderWidthPx as Ki, SelectContent as Kl, mediaTransforms as Kn, formatEventPriceDisplay as Ko, deriveCommerceCheckoutState as Kr, isObjectRecord$1 as Ks, recoveryConflictCopy as Kt, useDirection as Ku, paletteMutationCapability as L, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as La, renderAudio as Lc, unsafeAsPassId as Ld, ChevronDown as Lf, resolveVisiblePromotedFieldPathsForEditorBlock as Li, FieldFrame as Ll, listBlockDescriptors as Ln, resolveOnColorForThemeToken as Lo, getShopDisplayForItems as Lr, getBlockIconSemanticId as Ls, useMultiAutosave as Lt, __assign as Lu, isPreviewingChange as M, generateCssVars as Ma, ImagePresets as Mc, unsafeAsAppointmentResourceId as Md, CircleCheck as Mf, compileEditorModelRuntime as Mi, useSdkConfig as Ml, useCombinedRefs as Mn, generateCardCss as Mo, buildCartInteractiveIslandProps as Mr, resolveFeatureCardGeneratedIconSizePx as Ms, pushHistoryEntry as Mt, DropdownMenuContent as Mu, markApplyFailed as N, createTransformRegistry as Na, MediaPlaceholder as Nc, unsafeAsAppointmentServiceId as Nd, CircleAlert as Nf, retargetCompiledBoundaryRuntimeForContentAdjacency as Ni, hasEmptyOption as Nl, useIsomorphicLayoutEffect$1 as Nn, generateShadowValue as No, buildCheckoutInteractiveIslandProps as Nr, shouldReserveFeatureCardIconZone as Ns, redoHistory as Nt, DropdownMenuItem as Nu, createPalette as O, buildPaletteLibraryReadModel as Oa, ShoppingCartIcon as Oc, assertNever$9 as Od, Copy as Of, mergeHeaderNavTypographyPreference as Oi, isHeaderField as Ol, useSensor as On, normalizeEventSurfacePresetsCsv as Oo, normalizeEventRegistrationPageSurfaceSubject as Or, FEATURE_CARD_ICON_TREATMENTS as Os, useOptionalEditorUiStoreInstance as Ot, CardHeader as Ou, markApplySaved as P, runTransforms as Pa, buildResolveImageUrlContext as Pc, unsafeAsCustomerPassId as Pd, ChevronsUpDown as Pf, retargetCompiledRuntimeFieldsForContentAdjacency as Pi, mapCurrentValueForSelect as Pl, useUniqueId as Pn, normalizeBoxStylesCardVariant as Po, buildProductDetailInteractiveIslandProps as Pr, suggestSemanticIconForFeatureCard as Ps, undoHistory as Pt, DropdownMenuLabel as Pu, toggleRow as Q, eventListPaginationActionSchema as Qa, getDirectImageUrlForMediaAsset as Qc, Smartphone as Qd, NAV_LINK_PADDING_MAP as Qi, SearchInput as Ql, ImageResolveContextProvider as Qn, resolveEventCta as Qo, richTextFragment as Qr, isIconPickerPreset as Qs, FormRenderer as Qt, Button$1 as Qu, palettePreviewProjection as R, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as Ra, renderVideo as Rc, unsafeAsPositiveByteCount as Rd, Check as Rf, componentRuntimeRulesForTheme as Ri, useField as Rl, projectRecurringSchedule as Rn, resolveTokenOrCssColorValue as Ro, buildCartDisplay as Rr, getGeneratedBlockIconStyleState as Rs, useDebouncedLatestSave as Rt, __awaiter as Ru, PreviewThemeOverlayProvider as S, backgroundAppearanceQuickColorTokenNames as Sa, MailIcon as Sc, publicEventPricingCurrency as Sd, FileArchive as Sf, MQ_TABLET_ONLY as Si, DEFAULT_SURFACE_TEXT_COLOR as Sl, PointerSensor as Sn, eventScheduleScopeValues as So, getStepNumber as Sr, ACCORDION_TRIGGER_LETTER_SPACING as Ss, EntryControllerProvider as St, Content$1 as Su, applyTypographyDraftPatch as T, defaultThemeTokens as Ta, PhoneIcon as Tc, publicEventScalarPrice as Td, EllipsisVertical as Tf, boxStylesTransforms as Ti, useBackendWatch as Tl, useDndContext as Tn, normalizeEventCategoryIdsCsv as To, buildGiftingInteractiveIslandProps as Tr, PUBLIC_DOWNLOAD_MEDIA_TYPES as Ts, classifyHistoryShortcut as Tt, createCollapsibleScope as Tu, previewHeaderLayout as U, normalizeOfferingsPreviewGroupOrder as Ua, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as Uc, X as Ud, __commonJSMin as Uf, isThemeV2NormalEditorRawStyleFieldName as Ui, Textarea as Ul, planSiteOverlayHeaderClearance as Un, formatEventCompactDateRail as Uo, EMPTY_COMMERCE_CART_STATE as Ur, parseSiteIconStyleGuideVersionId as Us, resolveContentTitle as Ut, __spreadArray as Uu, previewCuratedPalette as V, inferLegacyOfferingsPreviewGroupOrder as Va, resolveMediaStorageUrl as Vc, ok$1 as Vd, ArrowDown as Vf, getCuratedSiteStyle as Vi, TooltipProvider as Vl, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Vn, toLocationMapHydrationProps as Vo, formatCommercePrice as Vr, parseGeneratedIconAssetId as Vs, deriveRouteMetadataPresentation as Vt, __read as Vu, previewHeaderStyle as W, normalizeOfferingsPreviewItemLimit as Wa, resolveMediaSlotContract as Wc, Upload as Wd, __exportAll as Wf, isThemeV2NormalEditorRawStylePath as Wi, Slider as Wl, visibleHeaderClearancePx as Wn, formatEventDateParts as Wo, buildPassCartItem as Wr, createRichTextDocFromMarkdown as Ws, PaletteProvider as Wt, __spreadArrays as Wu, styleConfiguratorHistoryEntryForPersistedSelection as X, resolveSpacing as Xa, resolveMediaTransformForAspect as Xc, Star as Xd, NAV_LINK_BORDER_RADIUS_MAP as Xi, Label as Xl, createManifestValidator as Xn, getContainerClass as Xo, augmentManifest as Xr, isInlineTextEmpty as Xs, createManifestFormAdapter as Xt, composeEventHandlers as Xu, setPaletteColors as Y, isSemanticSpacing as Ya, parseAspectRatioValue as Yc, Tablet as Yd, parseCustomCssRules as Yi, SelectValue as Yl, formattingTransforms as Yn, getCardOrientation as Yo, reduceCommerceCart as Yr, inlineTextToPlainText as Ys, ManifestForm as Yt, createContextScope as Yu, syncStyleConfiguratorState as Z, buildEventRuntimeFilters as Za, asRecord as Zc, Sparkles as Zd, NAV_LINK_LETTER_SPACING_MAP as Zi, Badge as Zl, isInternalResolvedLinkValue as Zn, groupEventsByDate as Zo, augmentManifestWithStyleGroups as Zr, parseInlineTextFromUnknown as Zs, createManifestValidation as Zt, Primitive as Zu, planSiteChromeFooterLayoutSelection as _, sectionTransitionFamilies as _a, FileArchiveIcon as _c, resolveBookingTimeZoneId as _d, File as _f, MQ_LG_UP as _i, borderColorStyle as _l, DEFAULT_LAUNCH_READINESS_INPUT as _n, el as _o, findPreSelectedEvent as _r, asDesignBlockId as _s, EditorProvider as _t, DialogHeader as _u, previewDesignHistoryDomainForCommand as a, requireEntriesForCuratedChoices as aa, ArrowRightIcon as ac, createEditorRemoveBlockCommand as ad, Pencil as af, formEmbedFragment as ai, generateButtonCss as al, createBlock as an, normalizeOptionalId as ao, eventListingBlockDefinition as ar, blockBookingPaymentTermsSchema as as, createOptimisticActionRunner as at, TabsList as au, PreviewDesignCoordinatorProvider as b, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as ba, FileTextIcon as bc, parseEventPageSurfaceSubject as bd, FilePlay as bf, MQ_SM_DOWN as bi, rgbColorValue as bl, DndContext as bn, bindingSchema as bo, resolveRegistrationTarget as br, ACCORDION_SPACING_MAP as bs, useUISelector as bt, CollapsibleContent as bu, selectionSnapshotFromApplySiteStyleSelectionResponse as c, getHeaderLayout as ca, ChevronDownIcon as cc, unsafeAsEditorBlockValues as cd, Monitor as cf, testimonialsHeadingFragment as ci, featuresFromHex as cl, deleteBlock as cn, eventButtonVariantSchema as co, buildEventCalendarInteractiveIslandProps as cr, defineInteractiveIslandMetaKeys as cs, PreviewRichTextEditor as ct, List as cu, PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE as d, GRADIENT_PRESETS as da, ChevronUpIcon as dc, formatBookingDateTime as dd, LoaderCircle as df, ctaRowFragment as di, generateBaseInteractiveCSS as dl, listEntryPageContentSlots as dn, filterAutoShowSchema as do, formBlockDefinition as dr, defineProgressiveBlockRuntime as ds, useRichTextEditor as dt, ScrollableDialogContent as du, NAV_LINK_TEXT_SIZE_MAP as ea, SEMANTIC_ICON_DEFINITIONS as ec, useComposedRefs as ed, Settings as ef, cardFragment as ei, getAtPath as el, createStoreBackend as en, getEventRuntimeFiltersKey as eo, shopBlockDefinition as er, getEventAvailability as es, confirmAutosaveBatch as et, PopoverContent as eu, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as f, GRADIENT_PRESET_IDS as fa, CircleMinusIcon as fc, formatBookingInstant as fd, Image as ff, heroCopyFragment as fi, generateInteractiveChildInheritanceCSS as fl, mutateBlockContent as fn, previewStageSchema as fo, buildFormInteractiveIslandProps as fr, EDITABLE_SURFACE_FORWARDING_PROP as fs, EMPTY_DOC as ft, Dialog as fu, cycleableSiteChromeOptions as g, defaultSectionTransitionVariantForFamily as ga, ExternalLinkIcon as gc, parseBookingLocalDate as gd, GripVertical as gf, siteOptionSources as gi, backgroundColorStyle as gl, decodePublicProductCategorySelectorQuery as gn, bind$1 as go, findEventByOccurrenceId as gr, planSiteChromePlacement as gs, InlineTextEditor as gt, DialogFooter as gu, cycleSiteChromeLookId as h, boundaryRuntimeMetricsForTransition as ha, DownloadIcon as hc, getBookingLocalDateKey as hd, ImageOff as hf, PUBLIC_FILE_FIELD_KINDS as hi, themeButtonClassName as hl, reorderPageSurfaceSlotBlocks as hn, eventCalendarListLayoutOptions as ho, toRegistrationEvents as hr, splitPositioningClasses as hs, insertOrReplaceRichTextImage as ht, DialogDescription as hu, usePreviewDesignHistoryOrder as i, LABEL_FONT_SIZE_MAP as ia, ArrowLeftIcon as ic, createEditorInsertBlockCommand as id, Plus as if, singleButtonFragment as ii, AFFORDANCE_SUPPRESS_CLASS as il, getPageDesignEditorState as in, normalizeCsvString as io, buildNewsletterFormInteractiveIslandProps as ir, resolveRuntimeEventPricing as is, rejectAutosaveBatch as it, TabsContent as iu, dismissWarnings as j, paletteColorsSchema as ja, createIcon as jc, parseSiteId as jd, CircleMinus as jf, applyCompiledRuntimeFieldsToContent as ji, SdkConfigProvider as jl, isKeyboardEvent as jn, publicEventSchema as jo, cartBlockDefinition as jr, parseFeatureCardGeneratedIconSizePx as js, createHistoryState as jt, DropdownMenu as ju, createStyleConfiguratorState as k, paletteColorEntries as ka, UploadIcon as kc, expectParsedBrandedId as kd, Clock3 as kf, readHeaderNavFontSizePreference as ki, isNonEmptyValue as kl, useSensors as kn, normalizeEventSurfaceScope as ko, resolveEventRegistrationScopedEvents as kr, createFeatureCardIconKey as ks, canRedoHistory as kt, CardTitle as ku, resolveStyleConfiguratorInitialSnapshot as l, getHeaderStyle as la, ChevronLeftIcon as lc, addLocalScheduleDays as ld, Minus as lf, ctaCopyFragment as li, generateEffectsCSS as ll, deleteEntrySlotBlock as ln, eventCalendarDefaultViewSchema as lo, buildEventCalendarListingDisplay as lr, createZodCodec as ls, PreviewInlineTextEditor as lt, Root2$1 as lu, buildSiteChromeLookModels as m, parseGradientPresetId as ma, ClockIcon as mc, formatLocalScheduleDate as md, ImagePlus as mf, defineFragment as mi, parseThemeButtonVariantId as ml, reorderEntrySlotBlocks as mn, eventCalendarListLayoutCompatibleDisplayModeValues as mo, buildEventRegistrationInteractiveIslandProps as mr, markEditableSurfaceForwarding as ms, getRichTextImagePositionFromTarget as mt, DialogContent as mu, useSiteChromeCustomizeOptional as n, INPUT_FONT_SIZE_MAP as na, isSemanticIconId as nc, clsx as nd, RotateCcw as nf, faqHeadingFragment as ni, buttonPersonalities as nl, toRoutableLinkPayload as nn, resolveEventListPaginationAction as no, productDetailBlockDefinition as nr, getLocalDateKey as ns, enqueueTransaction as nt, Input as nu, selectPreviewDesignHistoryDomain as o, findFooterLook as oa, CalendarIcon as oc, createEditorReorderBlocksCommand as od, PenLine as of, formCopyFragment as oi, expandPalette as ol, createEntrySlotBlock as on, calendarTabViewsSchema as oo, buildEventListingInteractiveIslandProps as or, buildInteractiveIslandProps as os, resolvePreviewSidebarTab as ot, TabsTrigger as ou, reportPreviewDesignError as p, getGradientPreset as pa, CirclePlusIcon as pc, formatBookingTime as pd, ImageUp as pf, bodyCopyFragment as pi, TokenResolver as pl, reorderBlocks as pn, weekStartSchema as po, eventRegistrationBlockDefinition as pr, composeHeaderSectionWrapperClassName as ps, RichTextEditorSurface as pt, DialogClose as pu, reconcilePaletteLibraryActive as q, resolveOfferingsPreviewGroupOrderEntries as qa, normalizeRightAngle as qc, Trash2 as qd, getComponentShadowVar as qi, SelectItem as ql, layoutTransforms as qn, formatEventTeacherLine as qo, parseStoredCommerceCartState as qr, isRecord$10 as qs, unfinishedBlockCopy as qt, createCollection as qu, PreviewDesignHistoryOrderProvider as r, INPUT_SPACING_MAP as ra, ArrowDownIcon as rc, parseFooterModuleId as rd, Redo2 as rf, blogFeaturedPostFragment as ri, findButtonPersonality as rl, applyPageDesignEditorAction as rn, normalizeCsvIds as ro, newsletterSignupBlockDefinition as rr, getLocalMinuteOfDay as rs, idleEditorTransactionQueueState as rt, Tabs as ru, buildApplySiteStyleSelectionBody as s, getFooterLayout as sa, CheckIcon as sc, unsafeAsEditorBlockId as sd, Palette as sf, testimonialsCarouselFragment as si, getTextColorForBackground as sl, createPageSurfaceSlotBlock as sn, columnOptionSchema as so, eventCalendarBlockDefinition as sr, createInteractiveIslandCodec as ss, FooterComposerPanel as st, Content as su, SiteChromeCustomizeProvider as t, FONT_WEIGHT_MAP as ta, getSemanticIconComponent as tc, cn$1 as td, Search as tf, faqAccordionFragment as ti, siblingPath as tl, listContentTypes as tn, resolveEventCalendarListPageSize as to, productListBlockDefinition as tr, getEventAvailabilityStatus as ts, deriveTransactionCapabilities as tt, PopoverTrigger as tu, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as u, gradientToCss as ua, ChevronRightIcon as uc, formatBookingDate as ud, Maximize2 as uf, heroCtaRowFragment as ui, generateShadowValue$1 as ul, deletePageSurfaceSlotBlock as un, eventLayoutSchema as uo, buildEventCalendarListingRender as ur, defineClientOwnedBlockRuntime as us, PreviewTextEditor as ut, Trigger$2 as uu, planSiteChromeLookSelection as v, sectionTransitionFamilyForBoundaryOptionId as va, FileAudioIcon as vc, toBookingTimeZone as vd, FileText as vf, MQ_MD_DOWN as vi, cssVarValue as vl, deriveLaunchReadiness as vn, richText as vo, resolveDiscountContext as vr, assertNever$8 as vs, useEditor$1 as vt, DialogTitle as vu, applyResolvedSelections as w, parseBackgroundAppearanceColorToken as wa, MinusIcon as wc, publicEventPricingType as wd, EyeOff as wf, getAnchorClasses as wi, surfaceForegroundValue as wl, getClientRect as wn, normalizeEventBlockKind as wo, giftingBlockDefinition as wr, ICON_SIZE_PX as ws, useEntryEditorController as wt, Trigger$3 as wu, usePreviewDesignCoordinator as x, backgroundAppearanceColorTokenNames as xa, InfoIcon as xc, formatBookingPriceDisplay as xd, FileHeadphone as xf, MQ_SM_UP as xi, textColorStyle as xl, KeyboardCode as xn, eventBlockKindValues as xo, WIZARD_STEPS as xr, ACCORDION_TRIGGER_FONT_SCALE as xs, EditableBlockProvider as xt, CollapsibleTrigger as xu, planSiteStylePreviewChange as y, sectionTransitionVariantForBoundaryOptionId as ya, FileSpreadsheetIcon as yc, toScheduledBookingDateTime as yd, FileSpreadsheet as yf, MQ_MD_UP as yi, mergeStyles as yl, AMBIENT_BACKGROUND_ROLES as yn, when as yo, resolveEventRequiresPayment as yr, ACCORDION_OPEN_ACCENT_THICKNESS as ys, ContentFieldsForm as yt, Collapsible as yu, prepareStalePaletteRetry as z, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as za, resolveImageUrlWithContext as zc, unsafeAsPositiveSeconds as zd, Box as zf, curatedSiteStyles as zi, Tooltip as zl, siteFooterManifest as zn, buildGoogleMapsDirectionsUrl as zo, buildProductCardDisplay as zr, parseBlockIconValue as zs, createRoutingHelpers as zt, __extends as zu };