@coras-io/embed 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -1
- package/README.md +1 -1
- package/dist/components/accordion/accordion-item/accordion-item.component.d.ts +1 -1
- package/dist/components/accordion/accordion.component.d.ts +1 -1
- package/dist/components/alert/alert.component.d.ts +2 -2
- package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +3 -3
- package/dist/components/attraction-card/base/attraction-card.mixin.js +1 -1
- package/dist/components/attraction-card/base/attraction-card.types.d.ts +2 -2
- package/dist/components/attraction-card/long/attraction-long-card.component.d.ts +1 -1
- package/dist/components/attraction-card/long/attraction-long-card.component.js +1 -1
- package/dist/components/attraction-card/short/attraction-short-card.component.d.ts +1 -1
- package/dist/components/attraction-card/short/attraction-short-card.component.js +1 -1
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +1 -1
- package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +1 -1
- package/dist/components/attraction-header/attraction-header.component.d.ts +3 -3
- package/dist/components/attraction-header/attraction-header.utils.d.ts +3 -3
- package/dist/components/attraction-option/attraction-option.component.d.ts +1 -1
- package/dist/components/basket/basket.component.d.ts +2 -2
- package/dist/components/basket-empty/basket-empty.component.d.ts +1 -1
- package/dist/components/basket-item/basket-item.component.d.ts +1 -1
- package/dist/components/basket-item-ticket/basket-item-ticket.component.d.ts +1 -1
- package/dist/components/basket-mobile/basket-mobile.component.d.ts +1 -1
- package/dist/components/basket-rewards/basket-rewards.component.d.ts +1 -1
- package/dist/components/better-carousel/better-carousel-item/better-carousel-item.component.d.ts +1 -1
- package/dist/components/better-carousel/better-carousel.component.d.ts +1 -1
- package/dist/components/bottom-drawer/bottom-drawer.component.d.ts +1 -1
- package/dist/components/bottom-drawer/bottom-drawer.component.js +1 -1
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +1 -1
- package/dist/components/button/button.component.d.ts +2 -2
- package/dist/components/calendar/base/calendar.mixin.d.ts +2 -2
- package/dist/components/calendar/base/calendar.types.d.ts +2 -2
- package/dist/components/calendar/dual/dual.component.d.ts +1 -1
- package/dist/components/calendar/month/month.component.d.ts +1 -1
- package/dist/components/calendar/month/month.component.js +1 -1
- package/dist/components/calendar/multi/multi.component.d.ts +1 -1
- package/dist/components/carousel/carousel-item/carousel-item.component.d.ts +1 -1
- package/dist/components/carousel/carousel-item/carousel-item.component.js +1 -1
- package/dist/components/carousel/carousel.component.d.ts +1 -1
- package/dist/components/carousel/carousel.component.js +2 -2
- package/dist/components/carousel/carousel.styles.js +10 -0
- package/dist/components/categories-tree/categories-tree.component.d.ts +2 -2
- package/dist/components/category-tag/category-tag.component.d.ts +2 -2
- package/dist/components/category-tag/category-tag.types.d.ts +1 -1
- package/dist/components/checkbox/checkbox.component.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.component.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +1 -1
- package/dist/components/chip/chip.component.d.ts +2 -2
- package/dist/components/collect-fida/collect-fida.component.d.ts +1 -1
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +2 -2
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +2 -2
- package/dist/components/currencies-list/currencies-list.component.d.ts +2 -2
- package/dist/components/currencies-list/currencies-list.component.js +1 -1
- package/dist/components/dialog/dialog.component.d.ts +2 -2
- package/dist/components/drawer/drawer.component.d.ts +1 -1
- package/dist/components/drawer/drawer.component.js +1 -1
- package/dist/components/dropdown/dropdown.component.d.ts +1 -1
- package/dist/components/dropdown/dropdown.component.js +1 -1
- package/dist/components/expiration-timer/expiration-timer.component.d.ts +1 -1
- package/dist/components/explore-card/explore-card.component.d.ts +1 -1
- package/dist/components/explore-card/explore-card.component.js +1 -1
- package/dist/components/explore-card/explore-card.styles.js +23 -0
- package/dist/components/filter-chip/filter-chip.component.d.ts +2 -2
- package/dist/components/filter-chip/filter-chip.component.js +1 -1
- package/dist/components/filters-drawer/filters-drawer.component.d.ts +1 -1
- package/dist/components/flag-icon/flag-icon.component.d.ts +2 -2
- package/dist/components/footer-menu/footer-menu-item/footer-menu-item.component.d.ts +1 -1
- package/dist/components/footer-menu/footer-menu.component.d.ts +1 -1
- package/dist/components/icon/icon.component.d.ts +2 -2
- package/dist/components/icon/icon.component.js +1 -1
- package/dist/components/icon-list/icon-list-item/icon-list-item.component.d.ts +2 -2
- package/dist/components/icon-list/icon-list.component.d.ts +1 -1
- package/dist/components/image/image.component.d.ts +3 -3
- package/dist/components/image/image.component.js +1 -1
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +1 -1
- package/dist/components/image-carousel/image-carousel.component.d.ts +1 -1
- package/dist/components/image-chip/image-chip.component.d.ts +1 -1
- package/dist/components/image-viewer/image-viewer.component.d.ts +1 -1
- package/dist/components/input-field/input-field.component.d.ts +2 -2
- package/dist/components/input-field/input-field.types.d.ts +2 -0
- package/dist/components/input-field/input-field.types.js +1 -0
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +1 -1
- package/dist/components/itinerary/itinerary.component.d.ts +1 -1
- package/dist/components/joined-fields/joined-fields.component.d.ts +1 -1
- package/dist/components/joined-fields/joined-fields.component.js +1 -1
- package/dist/components/layout/layout.component.d.ts +1 -1
- package/dist/components/list/list-item/list-item.component.d.ts +2 -2
- package/dist/components/list/list.component.d.ts +1 -1
- package/dist/components/loading-spinner/loading-spinner.component.d.ts +2 -2
- package/dist/components/locales-list/locales-list.component.d.ts +2 -2
- package/dist/components/locales-list/locales-list.component.js +1 -1
- package/dist/components/locales-list/locales-list.constants.d.ts +1 -1
- package/dist/components/location-image/location-image.component.d.ts +2 -2
- package/dist/components/location-image/location-image.component.js +1 -1
- package/dist/components/locations-results/locations-results.component.d.ts +2 -2
- package/dist/components/locations-results/locations-results.component.js +1 -1
- package/dist/components/marketing-tag/marketing-tag.component.d.ts +1 -1
- package/dist/components/message-card/message-card.component.d.ts +2 -2
- package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +1 -1
- package/dist/components/option-group/option-chip/option-chip.component.d.ts +1 -1
- package/dist/components/option-group/option-chip/option-chip.component.js +1 -1
- package/dist/components/option-group/option-group.component.d.ts +1 -1
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.component.d.ts +1 -1
- package/dist/components/order-confirmation/order-confirmation.component.d.ts +1 -1
- package/dist/components/order-confirmation/order-confirmation.component.js +1 -1
- package/dist/components/otp/otp.component.d.ts +1 -1
- package/dist/components/overlay/overlay.component.d.ts +1 -1
- package/dist/components/pay-in/pay-in.component.d.ts +2 -2
- package/dist/components/payment-fiat-method/payment-fiat-method.component.d.ts +3 -2
- package/dist/components/payment-fiat-method/payment-fiat-method.types.d.ts +1 -0
- package/dist/components/payment-fiat-method/payment-fiat-method.types.js +1 -0
- package/dist/components/payment-option/payment-option.component.d.ts +2 -2
- package/dist/components/payment-option/payment-option.component.js +1 -1
- package/dist/components/performance-time/performance-time.component.d.ts +1 -1
- package/dist/components/phone-country-code/phone-country-code.component.d.ts +1 -1
- package/dist/components/phone-country-codes/phone-country-codes.component.d.ts +2 -2
- package/dist/components/phone-field/phone-field.component.d.ts +3 -3
- package/dist/components/phone-field/phone-field.utils.d.ts +1 -1
- package/dist/components/points/points.component.d.ts +1 -1
- package/dist/components/price/price.component.d.ts +2 -2
- package/dist/components/reservation-preview/reservation-preview.component.d.ts +1 -1
- package/dist/components/reservation-preview-item/reservation-preview-item.component.d.ts +1 -1
- package/dist/components/reviews/review/review.component.d.ts +1 -1
- package/dist/components/reviews/reviews.component.d.ts +1 -1
- package/dist/components/search-button/search-button.component.d.ts +1 -1
- package/dist/components/search-results-item/search-results-item.d.ts +3 -3
- package/dist/components/seated-selector/seated-selector.component.d.ts +1 -1
- package/dist/components/seated-selector/seated-selector.component.js +3 -3
- package/dist/components/seats-io/seats-io.component.d.ts +4 -4
- package/dist/components/seats-io/seats-io.component.js +1 -1
- package/dist/components/seats-io/seats-io.transform.d.ts +2 -2
- package/dist/components/select-list/select-list.component.d.ts +1 -1
- package/dist/components/select-list/select-option/select-option.component.d.ts +1 -1
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +1 -1
- package/dist/components/sort-dropdown/sort-dropdown.component.d.ts +1 -1
- package/dist/components/sort-list/sort-list.component.d.ts +1 -1
- package/dist/components/sport-options/sport-option/sport-option.component.d.ts +1 -1
- package/dist/components/sport-options/sport-options.component.d.ts +1 -1
- package/dist/components/star-rating/star-rating.component.d.ts +1 -1
- package/dist/components/star-rating/star-rating.component.js +1 -1
- package/dist/components/tab/tab.component.d.ts +1 -1
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tabs/tabs.component.d.ts +1 -1
- package/dist/components/tag/tag.component.d.ts +2 -2
- package/dist/components/text-section/text-section.component.d.ts +1 -1
- package/dist/components/time-tag/time-tag.component.d.ts +2 -2
- package/dist/components/tooltip/tooltip.component.d.ts +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-counter-button/tour-ticket-counter-button.component.d.ts +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.component.d.ts +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.d.ts +1 -1
- package/dist/components/transfer-modal/transfer-modal.component.d.ts +1 -1
- package/dist/components/transfer-modal/transfer-modal.component.js +1 -1
- package/dist/containers/footer/footer.component.d.ts +1 -1
- package/dist/containers/navbar/navbar.component.d.ts +6 -6
- package/dist/containers/navbar/navbar.utils.d.ts +2 -2
- package/dist/contexts/basket/basket.context.d.ts +1 -1
- package/dist/contexts/basket/basket.provider.d.ts +4 -4
- package/dist/contexts/basket/basket.provider.js +1 -1
- package/dist/contexts/basket/basket.types.d.ts +2 -2
- package/dist/contexts/client.context.d.ts +2 -2
- package/dist/contexts/current-page.context.d.ts +1 -1
- package/dist/contexts/events.context.d.ts +3 -3
- package/dist/contexts/types.d.ts +2 -2
- package/dist/controllers/time-expiration.d.ts +1 -1
- package/dist/core/api/middlewares/booking-session/booking-session.d.ts +1 -1
- package/dist/core/api/middlewares/error-handler/error-handler.d.ts +1 -1
- package/dist/core/api/queries.d.ts +2 -2
- package/dist/core/currency/constants.d.ts +1 -1
- package/dist/core/currency/index.d.ts +3 -5
- package/dist/core/currency/index.js +16 -6
- package/dist/core/events.d.ts +2 -2
- package/dist/core/i18n/date.d.ts +2 -2
- package/dist/core/i18n/localization.js +1 -1
- package/dist/core/images/constants.d.ts +1 -1
- package/dist/core/images/constants.js +1 -1
- package/dist/core/images/filters.d.ts +2 -2
- package/dist/core/images/filters.js +2 -2
- package/dist/core/images/selection.d.ts +3 -3
- package/dist/core/images/selection.js +3 -3
- package/dist/core/images/srcset.d.ts +1 -1
- package/dist/core/images/srcset.js +6 -6
- package/dist/core/images/url.d.ts +1 -1
- package/dist/core/images/url.js +1 -1
- package/dist/core/pages.d.ts +1 -1
- package/dist/core/storybook/cssprops.d.ts +1 -1
- package/dist/core/types/core/base.d.ts +2 -2
- package/dist/core/types/core/category.d.ts +1 -1
- package/dist/core/types/core/currency.d.ts +1 -1
- package/dist/core/types/core/locale.d.ts +1 -1
- package/dist/core/types/core/sorting.d.ts +1 -1
- package/dist/core/types/currencies.d.ts +1 -1
- package/dist/core/types/locales.d.ts +2 -2
- package/dist/core/types/seats-config.d.ts +1 -1
- package/dist/core/utils/datetime.d.ts +1 -1
- package/dist/core/utils/locale.d.ts +2 -2
- package/dist/core/utils/scroll-lock.d.ts +2 -2
- package/dist/core/utils/scroll-lock.js +3 -3
- package/dist/core/utils/time.d.ts +1 -1
- package/dist/custom-elements.json +444 -355
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mixins/base.mixin.d.ts +6 -6
- package/dist/mixins/base.mixin.js +2 -2
- package/dist/mixins/coinbase-chains.d.ts +1 -0
- package/dist/mixins/coinbase-chains.js +7 -0
- package/dist/mixins/coinbase.mixin.d.ts +4 -4
- package/dist/mixins/coinbase.mixin.js +19 -7
- package/dist/mixins/error-modal.mixin.d.ts +2 -2
- package/dist/mixins/location-search/location-search.d.ts +3 -3
- package/dist/mixins/location-search/location-search.js +1 -1
- package/dist/mixins/location-search/types.d.ts +2 -2
- package/dist/mixins/overlay/overlay-mixin.d.ts +2 -2
- package/dist/mixins/overlay/types.d.ts +1 -1
- package/dist/mixins/points/points.d.ts +2 -2
- package/dist/mixins/points/types.d.ts +1 -1
- package/dist/mixins/search-mixin/search-mixin.d.ts +3 -3
- package/dist/mixins/search-mixin/types.d.ts +2 -2
- package/dist/sdk/chrome.js +9 -5
- package/dist/sdk/diagnostics.d.ts +9 -0
- package/dist/sdk/diagnostics.js +25 -0
- package/dist/sdk/mount.js +42 -0
- package/dist/sdk/once.d.ts +9 -0
- package/dist/sdk/once.js +18 -0
- package/dist/sdk/page-registry.d.ts +2 -2
- package/dist/sdk/page-registry.js +10 -10
- package/dist/sdk/theme.js +1 -1
- package/dist/sdk/types.d.ts +11 -11
- package/dist/sdk/validation.d.ts +2 -2
- package/dist/sdk/validation.js +7 -6
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/tokens.d.ts +1 -1
- package/dist/styles/tokens.generated.d.ts +1 -1
- package/dist/styles/tokens.generated.js +2 -2
- package/dist/views/constants.d.ts +1 -1
- package/dist/views/details-page/details-page.component.d.ts +4 -4
- package/dist/views/details-page/details-page.component.js +2 -2
- package/dist/views/details-page/details-page.utilts.d.ts +2 -2
- package/dist/views/details-page/partials/theater-description/theater-description.component.d.ts +3 -3
- package/dist/views/details-page/partials/tour-description/tour-description.component.d.ts +4 -4
- package/dist/views/help-page/help-page.component.d.ts +2 -2
- package/dist/views/help-page/help-page.component.js +1 -1
- package/dist/views/help-page/help-page.types.d.ts +1 -1
- package/dist/views/help-page/help-page.utils.d.ts +2 -2
- package/dist/views/landing-page/landing-page.component.d.ts +4 -4
- package/dist/views/landing-page/landing-page.component.js +1 -1
- package/dist/views/landing-page/landing-page.types.d.ts +1 -1
- package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +3 -3
- package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +3 -3
- package/dist/views/payment-page/controllers/crypto-transfer.controller.js +1 -1
- package/dist/views/payment-page/controllers/form-validation.controller.d.ts +5 -5
- package/dist/views/payment-page/controllers/layout.controller.d.ts +1 -1
- package/dist/views/payment-page/controllers/layout.controller.js +1 -1
- package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +1 -1
- package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +3 -3
- package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +5 -5
- package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +4 -4
- package/dist/views/payment-page/partials/confirmation/confirmation.component.d.ts +2 -2
- package/dist/views/payment-page/partials/country-field/country-field.component.d.ts +2 -2
- package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
- package/dist/views/payment-page/partials/hotel-pickup-field/hotel-pickup-field.component.d.ts +3 -3
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.component.d.ts +2 -2
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.d.ts +3 -3
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +1 -1
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +1 -1
- package/dist/views/payment-page/partials/stripe/stripe.component.js +1 -1
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +1 -1
- package/dist/views/payment-page/payment-page.component.d.ts +3 -3
- package/dist/views/payment-page/payment-page.component.js +7 -7
- package/dist/views/payment-page/payment-page.types.d.ts +3 -3
- package/dist/views/payment-page/payment-page.utils.d.ts +8 -8
- package/dist/views/payment-page/payment-page.utils.js +5 -5
- package/dist/views/payment-page/payment-page.validation-schema.d.ts +1 -1
- package/dist/views/payment-page/services/payment-api.service.d.ts +2 -2
- package/dist/views/payment-page/services/payment-api.service.js +1 -1
- package/dist/views/search-page/search-page.component.d.ts +4 -4
- package/dist/views/search-page/search-page.component.js +1 -1
- package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +10 -5
- package/dist/views/suggestion-widget/suggestion-widget.component.js +118 -42
- package/dist/views/suggestion-widget/suggestion-widget.styles.js +57 -4
- package/package.json +9 -1
|
@@ -35,13 +35,13 @@ const SLOTS = {
|
|
|
35
35
|
* Pick the best `MediaAsset` for a slot.
|
|
36
36
|
*
|
|
37
37
|
* Selection runs three tiers and stops at the first non-empty result:
|
|
38
|
-
* 1. Strict
|
|
38
|
+
* 1. Strict - the slot's full rules (min-resolution, aspect filter).
|
|
39
39
|
* 2. Drop the min-resolution floor; keep the aspect filter.
|
|
40
40
|
* 3. Drop the aspect filter; accept any candidate with dimensions.
|
|
41
41
|
*
|
|
42
42
|
* Returns `null` only when no candidate carries usable dimensions. A small or
|
|
43
43
|
* off-aspect image beats a blank card; the slot rules are a preference, not a
|
|
44
|
-
* cliff. Catalog quality is enforced backend-side (see P-068c)
|
|
44
|
+
* cliff. Catalog quality is enforced backend-side (see P-068c) - the SDK
|
|
45
45
|
* degrades gracefully when an attraction was uploaded with sub-spec assets.
|
|
46
46
|
*/
|
|
47
47
|
export function selectCorasImage(images, options) {
|
|
@@ -72,7 +72,7 @@ function chooseEligible(images, config, minResolution) {
|
|
|
72
72
|
/**
|
|
73
73
|
* Filter a list of `MediaAsset` candidates to those eligible for a slot.
|
|
74
74
|
* Use when you need every passing candidate (e.g. an image carousel), not
|
|
75
|
-
* just the single best
|
|
75
|
+
* just the single best - `selectCorasImage` is the single-pick variant.
|
|
76
76
|
*/
|
|
77
77
|
export function filterForSlot(images, slot, minResolution) {
|
|
78
78
|
const config = SLOTS[slot];
|
|
@@ -12,7 +12,7 @@ interface BuildSrcsetOptions extends Omit<ImgixOptions, "w" | "h" | "dpr"> {
|
|
|
12
12
|
* Mutually exclusive with a fixed `height`.
|
|
13
13
|
*/
|
|
14
14
|
aspectRatio?: number;
|
|
15
|
-
/** Fixed height (px). Rare
|
|
15
|
+
/** Fixed height (px). Rare - only set for fixed-height surfaces. */
|
|
16
16
|
height?: number;
|
|
17
17
|
/** Maximum width to emit; candidates wider than this are dropped. */
|
|
18
18
|
maxWidth?: number;
|
|
@@ -31,14 +31,14 @@ export function buildSrcset(src, widths = RESPONSIVE_WIDTHS, options = {}) {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Slot presets for the `sizes` attribute. These describe the rendered size of
|
|
34
|
-
* the image in the layout, NOT the viewport
|
|
34
|
+
* the image in the layout, NOT the viewport - which is exactly what `sizes`
|
|
35
35
|
* is for. Numbers are taken from the actual layouts:
|
|
36
36
|
*
|
|
37
|
-
* - `card-grid`
|
|
38
|
-
* - `carousel-hero`
|
|
39
|
-
* - `gallery`
|
|
40
|
-
* - `thumbnail`
|
|
41
|
-
* - `header-banner`
|
|
37
|
+
* - `card-grid` - attraction cards in landing/search grids
|
|
38
|
+
* - `carousel-hero` - better-carousel item on the details page
|
|
39
|
+
* - `gallery` - image-carousel item (legacy 780px hero)
|
|
40
|
+
* - `thumbnail` - basket-item, tour-ticket-type thumbs
|
|
41
|
+
* - `header-banner` - location-image full-width banner
|
|
42
42
|
*/
|
|
43
43
|
const SIZES_PRESETS = {
|
|
44
44
|
"card-grid": "(min-width: 1001px) 25vw, (min-width: 501px) 50vw, 100vw",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical imgix URL builder. Single source of truth for all image params
|
|
3
|
-
* across the SDK
|
|
3
|
+
* across the SDK - replaces the four near-duplicates that grew in
|
|
4
4
|
* `details-page`, `attraction-card`, `image-viewer`, and `location-image`.
|
|
5
5
|
*
|
|
6
6
|
* The builder is non-opinionated about whether `src` is an imgix URL: it
|
package/dist/core/images/url.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical imgix URL builder. Single source of truth for all image params
|
|
3
|
-
* across the SDK
|
|
3
|
+
* across the SDK - replaces the four near-duplicates that grew in
|
|
4
4
|
* `details-page`, `attraction-card`, `image-viewer`, and `location-image`.
|
|
5
5
|
*
|
|
6
6
|
* The builder is non-opinionated about whether `src` is an imgix URL: it
|
package/dist/core/pages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SupportedCurrencies } from "./currency.js";
|
|
2
|
-
import { SupportedLocales } from "./locale.js";
|
|
1
|
+
import type { SupportedCurrencies } from "./currency.js";
|
|
2
|
+
import type { SupportedLocales } from "./locale.js";
|
|
3
3
|
export type CorasBaseConfig = {
|
|
4
4
|
apiHost: string;
|
|
5
5
|
distributorID: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CorasCategoryTag } from "../../../components/category-tag/category-tag.js";
|
|
1
|
+
import type { CorasCategoryTag } from "../../../components/category-tag/category-tag.js";
|
|
2
2
|
export type Category = keyof typeof CorasCategoryTag.prototype.variants | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { supportedCurrencies } from "../../currency/constants.js";
|
|
1
|
+
import type { supportedCurrencies } from "../../currency/constants.js";
|
|
2
2
|
export type SupportedCurrencies = (typeof supportedCurrencies)[number];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { allLocales } from "../../i18n/locale-codes.js";
|
|
1
|
+
import type { allLocales } from "../../i18n/locale-codes.js";
|
|
2
2
|
export type SupportedLocales = (typeof allLocales)[number];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { components } from "../api-schema.js";
|
|
1
|
+
import type { components } from "../api-schema.js";
|
|
2
2
|
export type Sorting = components["schemas"]["SortingGetResponse"]["value"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { supportedCurrencies } from "../currency/constants.js";
|
|
1
|
+
import type { supportedCurrencies } from "../currency/constants.js";
|
|
2
2
|
export type Currency = (typeof supportedCurrencies)[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { allLocales } from "../i18n/locale-codes.js";
|
|
2
|
-
import { SupportedLocales } from "./core/index.js";
|
|
1
|
+
import type { allLocales } from "../i18n/locale-codes.js";
|
|
2
|
+
import type { SupportedLocales } from "./core/index.js";
|
|
3
3
|
export type Locale = (typeof allLocales)[number];
|
|
4
4
|
export type LocalePrefix = SupportedLocales extends `${infer P}-${string}` ? P : never;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SupportedLocales } from "../types/index.js";
|
|
2
|
-
import { LocalePrefix } from "../types/locales.js";
|
|
1
|
+
import type { SupportedLocales } from "../types/index.js";
|
|
2
|
+
import type { LocalePrefix } from "../types/locales.js";
|
|
3
3
|
export declare function getLocalePrefix(locale: SupportedLocales): LocalePrefix;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Centralized scroll lock manager using reference counting.
|
|
3
3
|
*
|
|
4
4
|
* Only the first `lock()` saves the original body state and scroll position.
|
|
5
|
-
* Only the last `unlock()` (count → 0) restores them
|
|
5
|
+
* Only the last `unlock()` (count → 0) restores them - and the restore is
|
|
6
6
|
* **deferred** to the next animation frame so that dialog-to-dialog transitions
|
|
7
7
|
* within the same Lit render cycle can cancel it by calling `lock()` again.
|
|
8
8
|
*
|
|
@@ -39,7 +39,7 @@ declare class ScrollLockManager {
|
|
|
39
39
|
get lockCount(): number;
|
|
40
40
|
/**
|
|
41
41
|
* Reset all internal state. Intended ONLY for test cleanup.
|
|
42
|
-
* Does NOT restore body styles
|
|
42
|
+
* Does NOT restore body styles - the caller (test afterEach)
|
|
43
43
|
* should handle that.
|
|
44
44
|
*/
|
|
45
45
|
_resetForTesting(): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Centralized scroll lock manager using reference counting.
|
|
3
3
|
*
|
|
4
4
|
* Only the first `lock()` saves the original body state and scroll position.
|
|
5
|
-
* Only the last `unlock()` (count → 0) restores them
|
|
5
|
+
* Only the last `unlock()` (count → 0) restores them - and the restore is
|
|
6
6
|
* **deferred** to the next animation frame so that dialog-to-dialog transitions
|
|
7
7
|
* within the same Lit render cycle can cancel it by calling `lock()` again.
|
|
8
8
|
*
|
|
@@ -23,7 +23,7 @@ class ScrollLockManager {
|
|
|
23
23
|
* increment the reference count.
|
|
24
24
|
*/
|
|
25
25
|
lock() {
|
|
26
|
-
// If a deferred restore is pending, cancel it
|
|
26
|
+
// If a deferred restore is pending, cancel it - we still need the lock
|
|
27
27
|
if (this._pendingRestore !== null) {
|
|
28
28
|
cancelAnimationFrame(this._pendingRestore);
|
|
29
29
|
this._pendingRestore = null;
|
|
@@ -91,7 +91,7 @@ class ScrollLockManager {
|
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Reset all internal state. Intended ONLY for test cleanup.
|
|
94
|
-
* Does NOT restore body styles
|
|
94
|
+
* Does NOT restore body styles - the caller (test afterEach)
|
|
95
95
|
* should handle that.
|
|
96
96
|
*/
|
|
97
97
|
_resetForTesting() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SupportedLocales } from "../types/index.js";
|
|
1
|
+
import type { SupportedLocales } from "../types/index.js";
|
|
2
2
|
export declare const formatMinutesDuration: (minutes: number, locale: SupportedLocales) => string;
|