@coras-io/embed 0.5.1 → 0.6.1

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 (375) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +15 -2
  3. package/dist/components/accordion/accordion-item/accordion-item.component.js +9 -3
  4. package/dist/components/accordion/accordion-item/accordion-item.styles.js +4 -0
  5. package/dist/components/accordion/accordion.component.js +8 -0
  6. package/dist/components/alert/alert.component.d.ts +1 -1
  7. package/dist/components/alert/alert.component.js +4 -3
  8. package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +0 -2
  9. package/dist/components/attraction-card/base/attraction-card.mixin.js +0 -6
  10. package/dist/components/attraction-card/base/attraction-card.types.d.ts +0 -1
  11. package/dist/components/basket-mobile/basket-mobile.component.d.ts +14 -3
  12. package/dist/components/basket-mobile/basket-mobile.component.js +71 -15
  13. package/dist/components/better-carousel/better-carousel.component.d.ts +3 -5
  14. package/dist/components/better-carousel/better-carousel.component.js +13 -34
  15. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +5 -12
  16. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +13 -5
  17. package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
  18. package/dist/components/breadcrumbs/breadcrumbs.component.js +5 -8
  19. package/dist/components/breadcrumbs/breadcrumbs.styles.js +8 -2
  20. package/dist/components/button/button.constants.d.ts +1 -2
  21. package/dist/components/button/button.constants.js +0 -1
  22. package/dist/components/calendar/base/calendar.mixin.js +5 -1
  23. package/dist/components/calendar/multi/multi.component.d.ts +2 -2
  24. package/dist/components/calendar/multi/multi.component.js +12 -19
  25. package/dist/components/carousel/carousel.component.js +9 -2
  26. package/dist/components/categories-tree/categories-tree.component.d.ts +5 -3
  27. package/dist/components/categories-tree/categories-tree.component.js +22 -21
  28. package/dist/components/checkbox/checkbox.component.js +5 -1
  29. package/dist/components/checkbox-group/checkbox-group.component.js +1 -1
  30. package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
  31. package/dist/components/chip/chip.component.js +8 -3
  32. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +6 -0
  33. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +15 -1
  34. package/dist/components/currencies-list/currencies-list.component.js +0 -1
  35. package/dist/components/dialog/dialog.component.js +52 -21
  36. package/dist/components/drawer/drawer.component.d.ts +3 -2
  37. package/dist/components/drawer/drawer.component.js +13 -18
  38. package/dist/components/drawer/drawer.styles.js +5 -2
  39. package/dist/components/dropdown/dropdown.component.js +6 -9
  40. package/dist/components/expiration-timer/expiration-timer.component.d.ts +2 -3
  41. package/dist/components/expiration-timer/expiration-timer.component.js +10 -8
  42. package/dist/components/explore-card/explore-card.component.js +3 -1
  43. package/dist/components/explore-card/explore-card.styles.js +31 -0
  44. package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
  45. package/dist/components/flag-icon/flag-icon.component.d.ts +4 -2
  46. package/dist/components/flag-icon/flag-icon.component.js +16 -4
  47. package/dist/components/icon/icon.component.js +15 -2
  48. package/dist/components/image/image.component.js +4 -3
  49. package/dist/components/image-viewer/image-viewer.component.js +6 -4
  50. package/dist/components/input-field/input-field.component.js +10 -6
  51. package/dist/components/layout/layout.styles.js +1 -1
  52. package/dist/components/locales-list/locales-list.component.js +0 -1
  53. package/dist/components/location-image/location-image.component.d.ts +4 -4
  54. package/dist/components/location-image/location-image.component.js +6 -7
  55. package/dist/components/locations-results/locations-results.component.d.ts +10 -0
  56. package/dist/components/locations-results/locations-results.component.js +22 -15
  57. package/dist/components/locations-results/locations-results.styles.js +4 -1
  58. package/dist/components/message-card/message-card.component.d.ts +1 -1
  59. package/dist/components/message-card/message-card.component.js +4 -3
  60. package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +0 -1
  61. package/dist/components/mobile-menu-item/mobile-menu-item.component.js +14 -16
  62. package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +9 -5
  63. package/dist/components/option-group/option-chip/option-chip.component.d.ts +4 -1
  64. package/dist/components/option-group/option-chip/option-chip.component.js +23 -10
  65. package/dist/components/option-group/option-group.component.d.ts +3 -1
  66. package/dist/components/option-group/option-group.component.js +10 -3
  67. package/dist/components/overlay/overlay.component.d.ts +0 -5
  68. package/dist/components/overlay/overlay.component.js +3 -15
  69. package/dist/components/phone-country-code/phone-country-code.component.d.ts +4 -0
  70. package/dist/components/phone-country-code/phone-country-code.component.js +37 -0
  71. package/dist/components/phone-country-codes/phone-country-codes.component.js +1 -1
  72. package/dist/components/phone-field/phone-field.component.js +2 -2
  73. package/dist/components/search-button/search-button.component.d.ts +1 -1
  74. package/dist/components/search-button/search-button.component.js +13 -7
  75. package/dist/components/seated-selector/seated-selector.component.js +3 -3
  76. package/dist/components/seats-io/seats-io.component.d.ts +3 -2
  77. package/dist/components/seats-io/seats-io.component.js +31 -13
  78. package/dist/components/seats-io/seats-io.constants.d.ts +0 -2
  79. package/dist/components/seats-io/seats-io.constants.js +0 -3
  80. package/dist/components/seats-io/seats-io.transform.d.ts +1 -6
  81. package/dist/components/seats-io/seats-io.transform.js +1 -20
  82. package/dist/components/select-list/select-list.component.js +7 -2
  83. package/dist/components/select-list/select-option/select-option.component.d.ts +3 -1
  84. package/dist/components/select-list/select-option/select-option.component.js +10 -3
  85. package/dist/components/tabs/tabs.component.d.ts +2 -0
  86. package/dist/components/tabs/tabs.component.js +59 -5
  87. package/dist/components/time-tag/time-tag.component.js +1 -1
  88. package/dist/containers/basket/basket.component.d.ts +1 -1
  89. package/dist/containers/basket/basket.component.js +21 -20
  90. package/dist/containers/navbar/navbar.component.d.ts +12 -8
  91. package/dist/containers/navbar/navbar.component.js +108 -62
  92. package/dist/containers/navbar/navbar.styles.js +23 -5
  93. package/dist/containers/navbar/navbar.utils.js +4 -4
  94. package/dist/contexts/basket/basket.provider.d.ts +3 -4
  95. package/dist/contexts/basket/basket.provider.js +46 -61
  96. package/dist/contexts/basket/basket.types.d.ts +0 -2
  97. package/dist/controllers/time-expiration.d.ts +15 -2
  98. package/dist/controllers/time-expiration.js +47 -17
  99. package/dist/core/api/client.d.ts +9 -0
  100. package/dist/core/api/client.js +26 -0
  101. package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +0 -2
  102. package/dist/core/api/middlewares/booking-session/booking-session.constants.js +0 -2
  103. package/dist/core/api/middlewares/booking-session/booking-session.js +3 -12
  104. package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +0 -1
  105. package/dist/core/api/middlewares/booking-session/booking-session.utils.js +6 -28
  106. package/dist/core/api/middlewares/error-handler/error-handler.js +5 -1
  107. package/dist/core/api/middlewares/retry/retry.constants.d.ts +3 -0
  108. package/dist/core/api/middlewares/retry/retry.constants.js +7 -0
  109. package/dist/core/api/middlewares/retry/retry.d.ts +2 -0
  110. package/dist/core/api/middlewares/retry/retry.js +48 -0
  111. package/dist/core/api/queries.d.ts +13 -38
  112. package/dist/core/api/queries.js +16 -99
  113. package/dist/core/events.d.ts +2 -4
  114. package/dist/core/i18n/date.d.ts +14 -5
  115. package/dist/core/i18n/date.js +47 -20
  116. package/dist/core/i18n/localization.js +10 -3
  117. package/dist/core/images/helpers.js +6 -5
  118. package/dist/core/images/srcset.js +2 -2
  119. package/dist/core/logger.d.ts +17 -0
  120. package/dist/core/logger.js +13 -0
  121. package/dist/core/types/api-schema.d.ts +7872 -0
  122. package/dist/core/types/seats-config.d.ts +5 -4
  123. package/dist/core/types/seats-config.js +10 -3
  124. package/dist/core/utils/crypto-address.d.ts +12 -0
  125. package/dist/core/utils/crypto-address.js +17 -0
  126. package/dist/core/utils/datetime.d.ts +13 -11
  127. package/dist/core/utils/datetime.js +41 -51
  128. package/dist/core/utils/loyalty.d.ts +8 -0
  129. package/dist/core/utils/loyalty.js +10 -0
  130. package/dist/core/utils/redaction.d.ts +9 -0
  131. package/dist/core/utils/redaction.js +58 -0
  132. package/dist/core/utils/time.js +2 -3
  133. package/dist/helpers/helpers.d.ts +6 -0
  134. package/dist/helpers/helpers.js +33 -16
  135. package/dist/locales/ar-SA.d.ts +38 -21
  136. package/dist/locales/ar-SA.js +38 -21
  137. package/dist/locales/da-DK.d.ts +38 -21
  138. package/dist/locales/da-DK.js +38 -21
  139. package/dist/locales/de-DE.d.ts +38 -21
  140. package/dist/locales/de-DE.js +38 -21
  141. package/dist/locales/en-IE.d.ts +38 -21
  142. package/dist/locales/en-IE.js +38 -21
  143. package/dist/locales/en-US.d.ts +38 -21
  144. package/dist/locales/en-US.js +38 -21
  145. package/dist/locales/es-ES.d.ts +38 -21
  146. package/dist/locales/es-ES.js +38 -21
  147. package/dist/locales/fr-FR.d.ts +38 -21
  148. package/dist/locales/fr-FR.js +38 -21
  149. package/dist/locales/fr-MA.d.ts +38 -21
  150. package/dist/locales/fr-MA.js +38 -21
  151. package/dist/locales/is-IS.d.ts +38 -21
  152. package/dist/locales/is-IS.js +38 -21
  153. package/dist/locales/it-IT.d.ts +38 -21
  154. package/dist/locales/it-IT.js +38 -21
  155. package/dist/locales/ms-MY.d.ts +38 -21
  156. package/dist/locales/ms-MY.js +38 -21
  157. package/dist/locales/nb-NO.d.ts +38 -21
  158. package/dist/locales/nb-NO.js +38 -21
  159. package/dist/locales/pl-PL.d.ts +38 -21
  160. package/dist/locales/pl-PL.js +38 -21
  161. package/dist/locales/pt-PT.d.ts +38 -21
  162. package/dist/locales/pt-PT.js +38 -21
  163. package/dist/locales/sv-SE.d.ts +38 -21
  164. package/dist/locales/sv-SE.js +38 -21
  165. package/dist/locales/th-TH.d.ts +38 -21
  166. package/dist/locales/th-TH.js +38 -21
  167. package/dist/locales/tr-TR.d.ts +38 -21
  168. package/dist/locales/tr-TR.js +38 -21
  169. package/dist/locales/zh-CN.d.ts +38 -21
  170. package/dist/locales/zh-CN.js +38 -21
  171. package/dist/locales/zh-HK.d.ts +38 -21
  172. package/dist/locales/zh-HK.js +38 -21
  173. package/dist/mixins/base.mixin.d.ts +3 -1
  174. package/dist/mixins/base.mixin.js +10 -7
  175. package/dist/mixins/coinbase.mixin.d.ts +13 -17
  176. package/dist/mixins/coinbase.mixin.js +251 -288
  177. package/dist/mixins/error-modal.mixin.js +8 -4
  178. package/dist/mixins/location-search/location-search.d.ts +13 -1
  179. package/dist/mixins/location-search/location-search.js +35 -27
  180. package/dist/mixins/overlay/overlay-mixin.js +39 -3
  181. package/dist/mixins/overlay/types.d.ts +1 -0
  182. package/dist/mixins/search-mixin/search-mixin.js +8 -5
  183. package/dist/sdk/diagnostics.js +2 -0
  184. package/dist/sdk/mount.d.ts +10 -0
  185. package/dist/sdk/mount.js +20 -1
  186. package/dist/sdk/page-registry.js +5 -0
  187. package/dist/sdk/params.d.ts +53 -0
  188. package/dist/sdk/params.js +180 -0
  189. package/dist/sdk/redaction.d.ts +1 -4
  190. package/dist/sdk/redaction.js +2 -41
  191. package/dist/sdk/types.d.ts +21 -7
  192. package/dist/sdk/url.d.ts +1 -1
  193. package/dist/sdk/url.js +12 -5
  194. package/dist/sdk/validation.d.ts +1 -26
  195. package/dist/sdk/validation.js +8 -145
  196. package/dist/styles/tokens.d.ts +1 -1
  197. package/dist/styles/tokens.generated.d.ts +1 -1
  198. package/dist/styles/tokens.generated.js +1 -1
  199. package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +30 -0
  200. package/dist/views/chrome-only-page/chrome-only-page.component.js +24 -0
  201. package/dist/views/chrome-only-page/chrome-only-page.d.ts +8 -0
  202. package/dist/views/chrome-only-page/chrome-only-page.js +6 -0
  203. package/dist/views/chrome-only-page/chrome-only-page.styles.js +13 -0
  204. package/dist/views/details-page/details-page.component.d.ts +11 -4
  205. package/dist/views/details-page/details-page.component.js +263 -237
  206. package/dist/views/details-page/details-page.utilts.d.ts +63 -3
  207. package/dist/views/details-page/details-page.utilts.js +53 -5
  208. package/dist/views/details-page/partials/location-categories/location-categories.component.d.ts +29 -0
  209. package/dist/views/details-page/partials/location-categories/location-categories.component.js +149 -0
  210. package/dist/views/details-page/partials/location-categories/location-categories.d.ts +8 -0
  211. package/dist/views/details-page/partials/location-categories/location-categories.js +6 -0
  212. package/dist/views/details-page/partials/location-categories/location-categories.styles.js +35 -0
  213. package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +26 -0
  214. package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +158 -0
  215. package/dist/views/details-page/partials/location-highlights/location-highlights.d.ts +8 -0
  216. package/dist/views/details-page/partials/location-highlights/location-highlights.js +6 -0
  217. package/dist/views/details-page/partials/location-highlights/location-highlights.styles.js +42 -0
  218. package/dist/views/details-page/partials/tour-description/tour-description.component.js +1 -4
  219. package/dist/views/help-page/help-page.component.d.ts +2 -0
  220. package/dist/views/help-page/help-page.component.js +37 -18
  221. package/dist/views/help-page/help-page.utils.js +6 -5
  222. package/dist/views/landing-page/landing-page.component.d.ts +5 -8
  223. package/dist/views/landing-page/landing-page.component.js +82 -97
  224. package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +10 -4
  225. package/dist/views/payment-page/controllers/crypto-auth.controller.js +53 -31
  226. package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +9 -5
  227. package/dist/views/payment-page/controllers/crypto-transfer.controller.js +26 -39
  228. package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +6 -1
  229. package/dist/views/payment-page/controllers/payment-flow.controller.js +1 -0
  230. package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +20 -2
  231. package/dist/views/payment-page/controllers/stripe-payment.controller.js +42 -19
  232. package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +2 -0
  233. package/dist/views/payment-page/partials/activity-details/activity-details.component.js +6 -3
  234. package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +2 -0
  235. package/dist/views/payment-page/partials/billing-address/billing-address.component.js +5 -1
  236. package/dist/views/payment-page/partials/confirmation/confirmation.component.js +2 -3
  237. package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
  238. package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +3 -3
  239. package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +2 -0
  240. package/dist/views/payment-page/partials/stripe/stripe.component.js +36 -7
  241. package/dist/views/payment-page/partials/stripe/stripe.utils.js +0 -3
  242. package/dist/views/payment-page/payment-page.component.d.ts +39 -6
  243. package/dist/views/payment-page/payment-page.component.js +302 -178
  244. package/dist/views/payment-page/payment-page.constants.d.ts +1 -27
  245. package/dist/views/payment-page/payment-page.constants.js +3 -30
  246. package/dist/views/payment-page/payment-page.types.d.ts +1 -19
  247. package/dist/views/payment-page/payment-page.utils.d.ts +22 -13
  248. package/dist/views/payment-page/payment-page.utils.js +57 -75
  249. package/dist/views/payment-page/services/payment-api.service.d.ts +16 -34
  250. package/dist/views/payment-page/services/payment-api.service.js +19 -27
  251. package/dist/views/search-page/search-page.component.d.ts +2 -0
  252. package/dist/views/search-page/search-page.component.js +39 -20
  253. package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
  254. package/dist/views/suggestion-widget/suggestion-widget.component.js +6 -5
  255. package/package.json +24 -20
  256. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +0 -10
  257. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +0 -43
  258. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +0 -8
  259. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +0 -6
  260. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +0 -23
  261. package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +0 -10
  262. package/dist/components/attraction-discovery/attraction-discovery.component.js +0 -52
  263. package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +0 -4
  264. package/dist/components/attraction-discovery/attraction-discovery.constants.js +0 -5
  265. package/dist/components/attraction-discovery/attraction-discovery.d.ts +0 -8
  266. package/dist/components/attraction-discovery/attraction-discovery.js +0 -6
  267. package/dist/components/attraction-discovery/attraction-discovery.styles.js +0 -193
  268. package/dist/components/basket-rewards/basket-rewards.component.d.ts +0 -10
  269. package/dist/components/basket-rewards/basket-rewards.component.js +0 -52
  270. package/dist/components/basket-rewards/basket-rewards.d.ts +0 -8
  271. package/dist/components/basket-rewards/basket-rewards.js +0 -6
  272. package/dist/components/basket-rewards/basket-rewards.styles.js +0 -18
  273. package/dist/components/filter-chip/filter-chip.component.d.ts +0 -12
  274. package/dist/components/filter-chip/filter-chip.component.js +0 -68
  275. package/dist/components/filter-chip/filter-chip.constants.d.ts +0 -2
  276. package/dist/components/filter-chip/filter-chip.constants.js +0 -2
  277. package/dist/components/filter-chip/filter-chip.d.ts +0 -8
  278. package/dist/components/filter-chip/filter-chip.js +0 -6
  279. package/dist/components/filter-chip/filter-chip.styles.d.ts +0 -2
  280. package/dist/components/filter-chip/filter-chip.styles.js +0 -162
  281. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +0 -10
  282. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +0 -43
  283. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +0 -8
  284. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +0 -6
  285. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +0 -2
  286. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +0 -28
  287. package/dist/components/image-carousel/image-carousel.component.d.ts +0 -8
  288. package/dist/components/image-carousel/image-carousel.component.js +0 -36
  289. package/dist/components/image-carousel/image-carousel.d.ts +0 -8
  290. package/dist/components/image-carousel/image-carousel.js +0 -6
  291. package/dist/components/image-carousel/image-carousel.styles.d.ts +0 -2
  292. package/dist/components/image-carousel/image-carousel.styles.js +0 -72
  293. package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +0 -9
  294. package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +0 -45
  295. package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +0 -8
  296. package/dist/components/itinerary/itinerary-item/itinerary-item.js +0 -6
  297. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +0 -2
  298. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +0 -70
  299. package/dist/components/itinerary/itinerary.component.d.ts +0 -7
  300. package/dist/components/itinerary/itinerary.component.js +0 -23
  301. package/dist/components/itinerary/itinerary.d.ts +0 -8
  302. package/dist/components/itinerary/itinerary.js +0 -6
  303. package/dist/components/itinerary/itinerary.styles.d.ts +0 -2
  304. package/dist/components/itinerary/itinerary.styles.js +0 -15
  305. package/dist/components/marketing-tag/marketing-tag.component.d.ts +0 -5
  306. package/dist/components/marketing-tag/marketing-tag.component.js +0 -8
  307. package/dist/components/marketing-tag/marketing-tag.d.ts +0 -8
  308. package/dist/components/marketing-tag/marketing-tag.js +0 -6
  309. package/dist/components/marketing-tag/marketing-tag.styles.d.ts +0 -2
  310. package/dist/components/marketing-tag/marketing-tag.styles.js +0 -36
  311. package/dist/components/price/price.component.d.ts +0 -12
  312. package/dist/components/price/price.component.js +0 -38
  313. package/dist/components/price/price.d.ts +0 -8
  314. package/dist/components/price/price.js +0 -6
  315. package/dist/components/reviews/review/review.component.d.ts +0 -9
  316. package/dist/components/reviews/review/review.component.js +0 -41
  317. package/dist/components/reviews/review/review.d.ts +0 -8
  318. package/dist/components/reviews/review/review.js +0 -6
  319. package/dist/components/reviews/review/review.styles.d.ts +0 -2
  320. package/dist/components/reviews/review/review.styles.js +0 -45
  321. package/dist/components/reviews/reviews.component.d.ts +0 -9
  322. package/dist/components/reviews/reviews.component.js +0 -56
  323. package/dist/components/reviews/reviews.d.ts +0 -8
  324. package/dist/components/reviews/reviews.js +0 -6
  325. package/dist/components/reviews/reviews.styles.d.ts +0 -2
  326. package/dist/components/reviews/reviews.styles.js +0 -73
  327. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +0 -10
  328. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +0 -51
  329. package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +0 -8
  330. package/dist/components/selected-tickets-preview/selected-tickets-preview.js +0 -6
  331. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +0 -2
  332. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +0 -89
  333. package/dist/components/tag/tag.component.d.ts +0 -8
  334. package/dist/components/tag/tag.component.js +0 -33
  335. package/dist/components/tag/tag.constants.d.ts +0 -1
  336. package/dist/components/tag/tag.constants.js +0 -1
  337. package/dist/components/tag/tag.d.ts +0 -8
  338. package/dist/components/tag/tag.js +0 -6
  339. package/dist/components/tag/tag.styles.d.ts +0 -2
  340. package/dist/components/tag/tag.styles.js +0 -56
  341. package/dist/components/tooltip/tooltip.component.d.ts +0 -19
  342. package/dist/components/tooltip/tooltip.component.js +0 -124
  343. package/dist/components/tooltip/tooltip.d.ts +0 -8
  344. package/dist/components/tooltip/tooltip.js +0 -6
  345. package/dist/components/tooltip/tooltip.styles.d.ts +0 -2
  346. package/dist/components/tooltip/tooltip.styles.js +0 -79
  347. package/dist/core/signals.d.ts +0 -2
  348. package/dist/core/signals.js +0 -3
  349. package/dist/core/storybook/argTypes.d.ts +0 -1
  350. package/dist/core/storybook/argTypes.js +0 -46
  351. package/dist/core/storybook/cssprops.d.ts +0 -30
  352. package/dist/core/storybook/cssprops.js +0 -46
  353. package/dist/core/storybook/demo.d.ts +0 -4
  354. package/dist/core/storybook/demo.js +0 -17
  355. package/dist/core/types/api-errors.d.ts +0 -8
  356. package/dist/core/types/api-errors.js +0 -1
  357. package/dist/styles/contrast-fixtures.d.ts +0 -5
  358. package/dist/styles/contrast-fixtures.js +0 -131
  359. package/dist/views/payment-page/domain/payment-mappers.d.ts +0 -7
  360. package/dist/views/payment-page/domain/payment-mappers.js +0 -7
  361. package/dist/views/payment-page/domain/payment-validators.d.ts +0 -6
  362. package/dist/views/payment-page/domain/payment-validators.js +0 -6
  363. package/dist/views/payment-page/domain/recovery-payload.d.ts +0 -8
  364. package/dist/views/payment-page/domain/recovery-payload.js +0 -7
  365. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +0 -22
  366. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +0 -65
  367. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +0 -8
  368. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +0 -6
  369. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +0 -2
  370. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +0 -12
  371. package/dist/views/payment-page/payment-page.validation-schema.d.ts +0 -28
  372. package/dist/views/payment-page/payment-page.validation-schema.js +0 -42
  373. /package/dist/{components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.d.ts → views/chrome-only-page/chrome-only-page.styles.d.ts} +0 -0
  374. /package/dist/{components/attraction-discovery/attraction-discovery.styles.d.ts → views/details-page/partials/location-categories/location-categories.styles.d.ts} +0 -0
  375. /package/dist/{components/basket-rewards/basket-rewards.styles.d.ts → views/details-page/partials/location-highlights/location-highlights.styles.d.ts} +0 -0
@@ -2,73 +2,48 @@ import type { Client } from "openapi-fetch";
2
2
  import type { PathsWithMethod, RequestBodyJSON, ResponseObjectMap, SuccessResponse } from "openapi-typescript-helpers";
3
3
  import type { paths } from "../types/api-schema.js";
4
4
  import type { SupportedLocales } from "../types/index.js";
5
- export declare const apiGet: <TPath extends PathsWithMethod<paths, "get">>({ client, distributorID, locale, endpoint, query, path: customPath, bookingSession, }: {
5
+ type RequestConfig = {
6
6
  client: Client<paths>;
7
7
  distributorID: string;
8
8
  locale: SupportedLocales;
9
+ bookingSession?: string | null;
10
+ path?: Record<string, string>;
11
+ query?: Record<string, unknown>;
12
+ headers?: Record<string, string>;
13
+ body?: unknown;
14
+ };
15
+ export declare const apiGet: <TPath extends PathsWithMethod<paths, "get">>({ endpoint, ...config }: RequestConfig & {
9
16
  endpoint: TPath;
10
17
  query?: paths[TPath]["get"]["parameters"]["query"];
11
- path?: Record<string, string>;
12
- bookingSession?: string | null;
13
18
  }) => Promise<{
14
19
  data: SuccessResponse<ResponseObjectMap<paths[TPath]["get"]>>;
15
20
  response: Response;
16
21
  }>;
17
- export declare const apiPost: <TPath extends PathsWithMethod<paths, "post">>({ client, distributorID, locale, endpoint, body, path: customPath, bookingSession, headers: customHeaders, }: {
18
- client: Client<paths>;
19
- distributorID: string;
20
- locale: SupportedLocales;
22
+ export declare const apiPost: <TPath extends PathsWithMethod<paths, "post">>({ endpoint, ...config }: RequestConfig & {
21
23
  endpoint: TPath;
22
24
  body: RequestBodyJSON<paths[TPath]["post"]>;
23
- path?: Record<string, string>;
24
- bookingSession?: string | null;
25
- headers?: Record<string, string>;
26
25
  }) => Promise<{
27
26
  data: SuccessResponse<ResponseObjectMap<paths[TPath]["post"]>>;
28
27
  response: Response;
29
28
  }>;
30
- export declare const apiPut: <TPath extends PathsWithMethod<paths, "put">>({ client, distributorID, locale, endpoint, body, path: customPath, bookingSession, headers: customHeaders, }: {
31
- client: Client<paths>;
32
- distributorID: string;
33
- locale: SupportedLocales;
29
+ export declare const apiPut: <TPath extends PathsWithMethod<paths, "put">>({ endpoint, ...config }: RequestConfig & {
34
30
  endpoint: TPath;
35
31
  body: RequestBodyJSON<paths[TPath]["put"]>;
36
- path?: Record<string, string>;
37
- bookingSession?: string | null;
38
- headers?: Record<string, string>;
39
32
  }) => Promise<{
40
33
  data: SuccessResponse<ResponseObjectMap<paths[TPath]["put"]>>;
41
34
  response: Response;
42
35
  }>;
43
- export declare const apiPatch: <TPath extends PathsWithMethod<paths, "patch">>({ client, distributorID, locale, endpoint, path: customPath, query: customQuery, body, bookingSession, }: {
44
- client: Client<paths>;
45
- distributorID: string;
46
- locale: SupportedLocales;
36
+ export declare const apiPatch: <TPath extends PathsWithMethod<paths, "patch">>({ endpoint, ...config }: RequestConfig & {
47
37
  endpoint: TPath;
48
- path?: Record<string, string>;
49
- query?: Record<string, string | null | undefined>;
50
38
  body?: RequestBodyJSON<paths[TPath]["patch"]>;
51
- bookingSession?: string | null;
52
39
  }) => Promise<{
53
40
  data: SuccessResponse<ResponseObjectMap<paths[TPath]["patch"]>>;
54
41
  response: Response;
55
42
  }>;
56
- export declare const apiDelete: <TPath extends PathsWithMethod<paths, "delete">>({ client, distributorID, locale, endpoint, path: customPath, bookingSession, }: {
57
- client: Client<paths>;
58
- distributorID: string;
59
- locale: SupportedLocales;
43
+ export declare const apiDelete: <TPath extends PathsWithMethod<paths, "delete">>({ endpoint, ...config }: RequestConfig & {
60
44
  endpoint: TPath;
61
- path?: Record<string, string>;
62
- bookingSession?: string | null;
63
45
  }) => Promise<{
64
46
  data: SuccessResponse<ResponseObjectMap<paths[TPath]["delete"]>>;
65
47
  response: Response;
66
48
  }>;
67
- export declare function withErrorHandling<T>(promise: Promise<{
68
- data: T;
69
- response: Response;
70
- }>): Promise<{
71
- data: T | undefined;
72
- response: Response | undefined;
73
- error: unknown;
74
- }>;
49
+ export {};
@@ -14,108 +14,25 @@ const createBaseRequestConfig = (distributorID, locale, customBookingSession) =>
14
14
  const language_code = getApiLanguageCode(locale);
15
15
  return { headers, path, language_code };
16
16
  };
17
- export const apiGet = async ({ client, distributorID, locale, endpoint, query, path: customPath, bookingSession, }) => {
17
+ // The wrappers below carry the schema-derived types; this builder only merges
18
+ // the shared headers, API version, and language code into the openapi-fetch
19
+ // init. Its argument shape is assembled from loosely typed records, so it
20
+ // cannot satisfy the per-endpoint init type and is cast once here. The result
21
+ // is cast too: the error middleware throws on every non-ok response, so the
22
+ // success branch is the only one a caller can observe.
23
+ const request = (method, endpoint, { client, distributorID, locale, bookingSession, path: customPath, query: customQuery, headers: customHeaders, body, }) => {
18
24
  const { headers, path, language_code } = createBaseRequestConfig(distributorID, locale, bookingSession);
19
- const { data, response } = await client.GET(endpoint, {
25
+ return client.request(method, endpoint, {
20
26
  params: {
21
- header: headers,
22
- path: {
23
- ...path,
24
- ...(customPath || {}),
25
- },
26
- query: {
27
- ...(query || {}),
28
- language_code,
29
- },
30
- },
31
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
- });
33
- return { data, response };
34
- };
35
- export const apiPost = async ({ client, distributorID, locale, endpoint, body, path: customPath, bookingSession, headers: customHeaders, }) => {
36
- const { headers, path, language_code } = createBaseRequestConfig(distributorID, locale, bookingSession);
37
- const { data, response } = await client.POST(endpoint, {
38
- params: {
39
- header: {
40
- ...headers,
41
- ...(customHeaders || {}),
42
- },
43
- path: {
44
- ...path,
45
- ...(customPath || {}),
46
- },
47
- query: {
48
- language_code,
49
- },
50
- },
51
- body,
52
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
- });
54
- return { data, response };
55
- };
56
- export const apiPut = async ({ client, distributorID, locale, endpoint, body, path: customPath, bookingSession, headers: customHeaders, }) => {
57
- const { headers, path, language_code } = createBaseRequestConfig(distributorID, locale, bookingSession);
58
- const { data, response } = await client.PUT(endpoint, {
59
- params: {
60
- header: {
61
- ...headers,
62
- ...(customHeaders || {}),
63
- },
64
- path: {
65
- ...path,
66
- ...(customPath || {}),
67
- },
68
- query: {
69
- language_code,
70
- },
27
+ header: { ...headers, ...customHeaders },
28
+ path: { ...path, ...customPath },
29
+ query: { ...customQuery, language_code },
71
30
  },
72
31
  body,
73
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
- });
75
- return { data, response };
76
- };
77
- export const apiPatch = async ({ client, distributorID, locale, endpoint, path: customPath, query: customQuery, body, bookingSession, }) => {
78
- const { headers, path, language_code } = createBaseRequestConfig(distributorID, locale, bookingSession);
79
- const { data, response } = await client.PATCH(endpoint, {
80
- params: {
81
- header: headers,
82
- path: {
83
- ...path,
84
- ...(customPath || {}),
85
- },
86
- query: {
87
- language_code,
88
- ...(customQuery || {}),
89
- },
90
- },
91
- body,
92
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
- });
94
- return { data, response };
95
- };
96
- export const apiDelete = async ({ client, distributorID, locale, endpoint, path: customPath, bookingSession, }) => {
97
- const { headers, path, language_code } = createBaseRequestConfig(distributorID, locale, bookingSession);
98
- const { data, response } = await client.DELETE(endpoint, {
99
- params: {
100
- header: headers,
101
- path: {
102
- ...path,
103
- ...(customPath || {}),
104
- },
105
- query: {
106
- language_code,
107
- },
108
- },
109
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
32
  });
111
- return { data, response };
112
33
  };
113
- export async function withErrorHandling(promise) {
114
- try {
115
- const { data, response } = await promise;
116
- return { data, response, error: null };
117
- }
118
- catch (error) {
119
- return { data: undefined, response: undefined, error };
120
- }
121
- }
34
+ export const apiGet = ({ endpoint, ...config }) => request("get", endpoint, config);
35
+ export const apiPost = ({ endpoint, ...config }) => request("post", endpoint, config);
36
+ export const apiPut = ({ endpoint, ...config }) => request("put", endpoint, config);
37
+ export const apiPatch = ({ endpoint, ...config }) => request("patch", endpoint, config);
38
+ export const apiDelete = ({ endpoint, ...config }) => request("delete", endpoint, config);
@@ -4,6 +4,7 @@ import type { components } from "./types/api-schema.js";
4
4
  import type { CorasHostEventMap, CorasHostEventName } from "../sdk/types.js";
5
5
  import type { PaymentFiatMethodType } from "../components/payment-fiat-method/payment-fiat-method.types.js";
6
6
  import type { PhoneCodeSelection } from "../components/phone-field/phone-field.types.js";
7
+ import type { GeolocationFailedEventDetail } from "../components/locations-results/locations-results.component.js";
7
8
  export interface ValueChangedEventDetail {
8
9
  value: unknown;
9
10
  fieldName?: string;
@@ -42,9 +43,6 @@ export interface MarketingChangedEventDetail {
42
43
  export interface EmailChangedEventDetail {
43
44
  value: string;
44
45
  }
45
- export interface TermsChangedEventDetail {
46
- value: boolean;
47
- }
48
46
  export interface StripeInitializedEventDetail {
49
47
  stripe: Stripe;
50
48
  }
@@ -82,7 +80,6 @@ export interface InternalEventMap {
82
80
  "selection-changed": SelectionChangeEventDetail;
83
81
  "code-selected": PhoneCodeSelection;
84
82
  "phone-code-selected": PhoneCodeSelection;
85
- "terms-changed": TermsChangedEventDetail;
86
83
  "email-changed": EmailChangedEventDetail;
87
84
  "marketing-changed": MarketingChangedEventDetail;
88
85
  "date-selected": DateSelectedEventDetail;
@@ -121,6 +118,7 @@ export interface InternalEventMap {
121
118
  "seats-unavailable": Record<string, never>;
122
119
  "seats-confirmed": SeatsConfirmedEventDetail;
123
120
  "geolocation-selected": GeolocationSelectedEventDetail;
121
+ "geolocation-failed": GeolocationFailedEventDetail;
124
122
  "tab-changed": TabChangeEventDetail;
125
123
  "chip-removed": Record<string, never>;
126
124
  "coras-image-load": Record<string, never>;
@@ -1,7 +1,16 @@
1
1
  import { type Locale } from "date-fns";
2
2
  import type { allLocales } from "./locale-codes.js";
3
- export declare const localeMapping: Partial<Record<(typeof allLocales)[number], Locale>>;
4
- export declare const getCalendarLocale: (locale: (typeof allLocales)[number]) => Locale;
5
- export declare const weekdayNames: (locale: (typeof allLocales)[number]) => (string | undefined)[];
6
- export declare const formatDate: (date: Date | string, locale: (typeof allLocales)[number], showYear?: boolean) => string;
7
- export declare const getDateRangeLabel: (startDate: string, endDate: string, locale: (typeof allLocales)[number]) => string | undefined;
3
+ type SupportedLocale = (typeof allLocales)[number];
4
+ export declare const localeMapping: Partial<Record<SupportedLocale, Locale>>;
5
+ /**
6
+ * Loads the date-fns pack for `locale` into `localeMapping`. A pack that fails
7
+ * to load (typically a stale chunk after a deployment) is left unset, so the
8
+ * calendar quietly renders with the en-GB fallback instead of failing the
9
+ * locale switch; there is no per-mount logger below the SDK to report it to.
10
+ */
11
+ export declare const loadCalendarLocale: (locale: SupportedLocale) => Promise<void>;
12
+ export declare const getCalendarLocale: (locale: SupportedLocale) => Locale;
13
+ export declare const weekdayNames: (locale: SupportedLocale) => (string | undefined)[];
14
+ export declare const formatDate: (date: Date | string, locale: SupportedLocale, showYear?: boolean) => string;
15
+ export declare const getDateRangeLabel: (startDate: string, endDate: string, locale: SupportedLocale) => string | undefined;
16
+ export {};
@@ -1,26 +1,53 @@
1
1
  import { addDays, format, parseISO, startOfWeek } from "date-fns";
2
- import { arSA, da, de, enGB, enIE, enUS, es, fr, is, it, ms, nb, pl, pt, sv, th, tr, zhCN, zhHK, } from "date-fns/locale";
2
+ import { enGB } from "date-fns/locale/en-GB";
3
+ // One chunk per pack, so a visitor downloads the pack for their locale rather
4
+ // than all nineteen. The specifiers are written out because bundlers only
5
+ // expand a dynamic import over relative paths, never over a bare package
6
+ // subpath.
7
+ const calendarLocaleLoaders = {
8
+ "ar-SA": () => import("date-fns/locale/ar-SA").then((m) => m.arSA),
9
+ "da-DK": () => import("date-fns/locale/da").then((m) => m.da),
10
+ "de-DE": () => import("date-fns/locale/de").then((m) => m.de),
11
+ "en-GB": () => Promise.resolve(enGB),
12
+ "en-IE": () => import("date-fns/locale/en-IE").then((m) => m.enIE),
13
+ "en-US": () => import("date-fns/locale/en-US").then((m) => m.enUS),
14
+ "es-ES": () => import("date-fns/locale/es").then((m) => m.es),
15
+ "fr-FR": () => import("date-fns/locale/fr").then((m) => m.fr),
16
+ "fr-MA": () => import("date-fns/locale/fr").then((m) => m.fr),
17
+ "is-IS": () => import("date-fns/locale/is").then((m) => m.is),
18
+ "it-IT": () => import("date-fns/locale/it").then((m) => m.it),
19
+ "ms-MY": () => import("date-fns/locale/ms").then((m) => m.ms),
20
+ "nb-NO": () => import("date-fns/locale/nb").then((m) => m.nb),
21
+ "pl-PL": () => import("date-fns/locale/pl").then((m) => m.pl),
22
+ "pt-PT": () => import("date-fns/locale/pt").then((m) => m.pt),
23
+ "sv-SE": () => import("date-fns/locale/sv").then((m) => m.sv),
24
+ "th-TH": () => import("date-fns/locale/th").then((m) => m.th),
25
+ "tr-TR": () => import("date-fns/locale/tr").then((m) => m.tr),
26
+ "zh-CN": () => import("date-fns/locale/zh-CN").then((m) => m.zhCN),
27
+ "zh-HK": () => import("date-fns/locale/zh-HK").then((m) => m.zhHK),
28
+ };
29
+ // The packs loaded so far. `loadLocale` in localization.ts fills it alongside
30
+ // the lit message bundle, so every synchronous render path that calls
31
+ // `getCalendarLocale` finds the pack of the active locale. The source locale
32
+ // is seeded because lit-localize never calls `loadLocale` for it.
3
33
  export const localeMapping = {
4
- "ar-SA": arSA,
5
- "da-DK": da,
6
- "de-DE": de,
7
34
  "en-GB": enGB,
8
- "en-IE": enIE,
9
- "en-US": enUS,
10
- "es-ES": es,
11
- "fr-MA": fr,
12
- "fr-FR": fr,
13
- "is-IS": is,
14
- "it-IT": it,
15
- "ms-MY": ms,
16
- "nb-NO": nb,
17
- "pl-PL": pl,
18
- "pt-PT": pt,
19
- "sv-SE": sv,
20
- "th-TH": th,
21
- "tr-TR": tr,
22
- "zh-CN": zhCN,
23
- "zh-HK": zhHK,
35
+ };
36
+ /**
37
+ * Loads the date-fns pack for `locale` into `localeMapping`. A pack that fails
38
+ * to load (typically a stale chunk after a deployment) is left unset, so the
39
+ * calendar quietly renders with the en-GB fallback instead of failing the
40
+ * locale switch; there is no per-mount logger below the SDK to report it to.
41
+ */
42
+ export const loadCalendarLocale = async (locale) => {
43
+ if (localeMapping[locale])
44
+ return;
45
+ try {
46
+ localeMapping[locale] = await calendarLocaleLoaders[locale]();
47
+ }
48
+ catch {
49
+ // Fallback documented above.
50
+ }
24
51
  };
25
52
  export const getCalendarLocale = (locale) => localeMapping[locale] || enGB;
26
53
  export const weekdayNames = (locale) => {
@@ -1,12 +1,19 @@
1
1
  /// <reference types="vite/client" />
2
2
  import { configureLocalization } from "@lit/localize";
3
+ import { loadCalendarLocale } from "./date.js";
3
4
  import { sourceLocale, targetLocales } from "./locale-codes.js";
4
5
  export const { getLocale, setLocale } = configureLocalization({
5
6
  sourceLocale,
6
7
  targetLocales,
7
- // Stale chunks vanish after deployment - catch to fall back to source locale
8
- // rather than producing unhandled rejections.
9
- loadLocale: (locale) => import(`../../locales/${locale}.js`).catch(() => ({ templates: {} })),
8
+ // The date-fns pack loads with the message bundle so both are in place when
9
+ // `setLocale` resolves and the components re-render. Stale chunks vanish
10
+ // after deployment - each import falls back on its own (source-locale
11
+ // messages, en-GB calendar names) rather than producing unhandled rejections.
12
+ loadLocale: (locale) => Promise.all([
13
+ import(`../../locales/${locale}.js`).catch(() => ({ templates: {} })),
14
+ // lit-localize only calls this with an entry of `targetLocales`.
15
+ loadCalendarLocale(locale),
16
+ ]).then(([messages]) => messages),
10
17
  });
11
18
  // Prevent full page reload on HMR - accept the module update
12
19
  // This is stripped from production builds
@@ -9,12 +9,13 @@ import { DEFAULT_LOCATION_IMAGE } from "./constants.js";
9
9
  */
10
10
  export function getLocationImageURL({ baseURL, country = "", city = "", imageExtension, params, }) {
11
11
  const query = params ? `?${new URLSearchParams(params).toString()}` : "";
12
- // TODO: improve it
13
- if (city && country !== "" && city !== "") {
14
- return `${baseURL}/${country}/${city}.${imageExtension}${query}`;
12
+ // Country and city come from API data and can hold spaces, accents or a
13
+ // slash, so each is encoded as a single path segment.
14
+ if (country !== "" && city !== "") {
15
+ return `${baseURL}/${encodeURIComponent(country)}/${encodeURIComponent(city)}.${imageExtension}${query}`;
15
16
  }
16
- else if (country !== "" && city === "") {
17
- return `${baseURL}/${country}.${imageExtension}${query}`;
17
+ else if (country !== "") {
18
+ return `${baseURL}/${encodeURIComponent(country)}.${imageExtension}${query}`;
18
19
  }
19
20
  else {
20
21
  return `${baseURL}/${DEFAULT_LOCATION_IMAGE}${query}`;
@@ -38,14 +38,14 @@ export function buildSrcset(src, widths = RESPONSIVE_WIDTHS, options = {}) {
38
38
  * - `carousel-hero` - better-carousel item on the details page
39
39
  * - `gallery` - image-carousel item (legacy 780px hero)
40
40
  * - `thumbnail` - basket-item, tour-ticket-type thumbs
41
- * - `header-banner` - location-image banner, capped at 952px by its own CSS
41
+ * - `header-banner` - location-image banner, 918px of page content width
42
42
  */
43
43
  const SIZES_PRESETS = {
44
44
  "card-grid": "(min-width: 1001px) 25vw, (min-width: 501px) 50vw, 100vw",
45
45
  "carousel-hero": "(min-width: 1024px) 480px, 90vw",
46
46
  gallery: "(min-width: 1024px) 780px, 100vw",
47
47
  thumbnail: "70px",
48
- "header-banner": "952px",
48
+ "header-banner": "918px",
49
49
  };
50
50
  export function buildSizes(preset) {
51
51
  return SIZES_PRESETS[preset];
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Structurally identical to the SDK's `CorasLogger`, with both methods
3
+ * required so callers never optional-chain. Core must not import from the SDK.
4
+ */
5
+ export type Logger = {
6
+ warn(message: string, data?: unknown): void;
7
+ error(error: unknown, data?: unknown): void;
8
+ };
9
+ export declare const NOOP_LOGGER: Logger;
10
+ /** Wraps a host logger whose methods are optional into a `Logger`. */
11
+ export declare function toLogger(input?: {
12
+ warn?: Logger["warn"];
13
+ error?: Logger["error"];
14
+ }): Logger;
15
+ export declare const loggerContext: {
16
+ __context__: Logger;
17
+ };
@@ -0,0 +1,13 @@
1
+ import { createContext } from "@lit/context";
2
+ export const NOOP_LOGGER = {
3
+ warn() { },
4
+ error() { },
5
+ };
6
+ /** Wraps a host logger whose methods are optional into a `Logger`. */
7
+ export function toLogger(input) {
8
+ return {
9
+ warn: (message, data) => input?.warn?.(message, data),
10
+ error: (error, data) => input?.error?.(error, data),
11
+ };
12
+ }
13
+ export const loggerContext = createContext(Symbol("logger-context"));