@eldrajs/ui 0.3.12 → 0.3.14

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 (41) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +18 -1
  3. package/dist/{PhoneInput-BVH32MEg.js → PhoneInput-B5AgJJVE.js} +1 -1
  4. package/dist/{VariantPicker-9sOtHHEk.js → VariantPicker-Buz_8mHq.js} +2 -2
  5. package/dist/components/autocomplete/Autocomplete.vue.d.ts +2 -0
  6. package/dist/components/chip/Chip.vue.d.ts +2 -0
  7. package/dist/components/dialog/Dialog.vue.d.ts +2 -0
  8. package/dist/components/drawer/Drawer.vue.d.ts +2 -0
  9. package/dist/components/filter-panel/FilterGroup.vue.d.ts +2 -0
  10. package/dist/components/filter-panel/FilterPanel.vue.d.ts +2 -0
  11. package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +2 -0
  12. package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +2 -0
  13. package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +2 -0
  14. package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +2 -0
  15. package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +2 -0
  16. package/dist/components/lightbox/Lightbox.vue.d.ts +3 -0
  17. package/dist/components/lightbox/types.d.ts +9 -1
  18. package/dist/components/lightbox/zoom.d.ts +32 -0
  19. package/dist/components/nav-menu/NavMenu.vue.d.ts +2 -0
  20. package/dist/components/pagination/Pagination.vue.d.ts +2 -0
  21. package/dist/components/range-slider/RangeSlider.vue.d.ts +2 -0
  22. package/dist/components/search-bar/SearchBar.vue.d.ts +2 -0
  23. package/dist/components/search-modal/SearchModal.vue.d.ts +2 -0
  24. package/dist/components/select/MultiSelect.vue.d.ts +2 -0
  25. package/dist/components/select/Select.vue.d.ts +2 -0
  26. package/dist/components/site-form/SiteForm.vue.d.ts +2 -0
  27. package/dist/components/toast/Toast.vue.d.ts +2 -0
  28. package/dist/components/toast/Toaster.vue.d.ts +2 -0
  29. package/dist/components.css +58 -0
  30. package/dist/composables/dialogStack.d.ts +2 -1
  31. package/dist/index.js +419 -39
  32. package/dist/messages/en-US.d.ts +4 -0
  33. package/dist/messages/is-IS.js +2 -0
  34. package/dist/phone/PhoneInput.vue.d.ts +2 -0
  35. package/dist/phone/vee-validate.js +2 -2
  36. package/dist/phone.js +1 -1
  37. package/dist/style.css +58 -0
  38. package/dist/{useMessages-CYnyGVRG.js → useMessages-CrSnIuLt.js} +4 -0
  39. package/dist/vee-validate.js +2 -2
  40. package/dist/vue-i18n.js +1 -1
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ Release-please writes the generated notes from commit messages and does not repl
7
7
 
8
8
  ### Added
9
9
 
10
+ - **`--eldra-scrollbar-width`** on `<html>` while a `Dialog`, `Drawer`, `Lightbox` or `SearchModal` is open: the width of the scrollbar the scroll lock hid (`0px` when none). A `position: fixed` element that spans the window, such as a fixed site header, pads itself with it (`padding-right: var(--eldra-scrollbar-width, 0px)`) so it does not widen when a modal opens.
11
+ - **`Lightbox` `zoom`** (default `false`) enlarges the current image to its real size: over the image the cursor is a magnifier and a zoom button shows, a click or the button zooms in, the mouse or the arrow keys pan, and a click, the button or `Esc` zooms out. An image under 1.25× its shown size offers no zoom; phones keep pinch-zoom. New part `zoomButton`; new messages `lightboxZoomIn` ("Zoom in" / "Stækka mynd") and `lightboxZoomOut` ("Zoom out" / "Minnka mynd"), also through `@eldrajs/ui/vue-i18n`.
10
12
  - **`Autocomplete`** — a free-text field with a list of suggestions under it: an `Input` (same box, sizes, states, clear button and `FieldWrapper` wiring) that is an ARIA combobox with list autocomplete. `suggestions` (`{ value, label, description?, disabled? }[]`) are supplied by the consumer for the text now in the field; `loading`, `minLength` (default `1`), `messages`, `classes`, and `Input`'s `size`, `id`, `name`, `placeholder`, `autocomplete`, `inputmode`, `leadingIcon`, `clearable`, `invalid`, `describedBy`, `required`, `readonly`, `disabled`. The value is always the text: choosing a row emits `update:modelValue` with its `label`, then `select` with the suggestion, and anything else may be typed and kept. Slots `option` (`{ suggestion, active }`) and `footer`, plus `Input`'s three. With no suggestions the panel is closed. New parts `busy`, `panel`, `listbox`, `option`, `optionLabel`, `optionDescription`, `footer`; new message `suggestions` ("Suggestions" / "Tillögur"), also through `@eldrajs/ui/vue-i18n`; new types `AutocompleteProps`, `AutocompleteSuggestion`, `AutocompletePart`, `AutocompleteOptionSlotProps`; `<EldraAutocomplete>` through the resolver.
11
13
  - **`FieldAutocomplete`** in `@eldrajs/ui/vee-validate` — `Autocomplete` bound to a vee-validate field, with the typed-control validation defaults. New type `FieldAutocompleteProps`.
12
14
  - **`MultiSelect` `selectAll`** adds a "Select all" button to the footer, before Clear. It adds every enabled option the list is showing to the selection, so with a search typed it selects the matches only, and it is disabled once they are all selected. New part `footerSelectAll` and message `selectAll` ("Select all" / "Velja allt"). On by default: an existing `MultiSelect` gains the button; `:select-all="false"` leaves it out.
@@ -169,6 +171,8 @@ Release-please writes the generated notes from commit messages and does not repl
169
171
 
170
172
  ### Fixed
171
173
 
174
+ - **`SearchModal` shows its results in Safari, and long results scroll.** The results area took no height in Safari, so the dialog drew only the field and the footer. In every browser, results taller than the dialog's max height were cut off instead of scrolling. The `results` part is now a flex column sized by its content (`flex-auto`, was `flex-1`), and the panel inside it fills it and scrolls (`flex-auto`, was `h-full`).
175
+ - **Opening a `Dialog`, `Drawer`, `Lightbox` or `SearchModal` no longer shifts the page sideways.** The scroll lock hid the page's scrollbar and the content widened into its space; `<html>` is now padded on the right by the scrollbar's width while a modal is open, added to any padding it already has and restored on close. Nothing changes with overlay scrollbars or on a page that does not scroll. A `position: fixed` element that spans the window pads itself with `--eldra-scrollbar-width` (under Added) to stay still too.
172
176
  - **`Input` follows a `leadingIcon`, `prefix` or `suffix` slot given or taken away after mount.** The end padding and the slot's row were decided from the slots the field was mounted with, so a `<template #suffix v-if="…">` toggled later was not drawn.
173
177
  - **A press on empty space in a `FieldWrapper` blurs the focused input again**, as on any other empty space. 0.3.4 cancelled that press, which kept the focus in the input; that change is reverted.
174
178
  - **A field's 2px error boundary no longer splits into two lines at 90%, 110% or 125% zoom.** `Input`, `Textarea`, `UnitInput`, `Select`, `MultiSelect` (and `SearchBar`, `CurrencyInput` through them) draw the second line as the focus ring's resting band in `danger`, a `box-shadow` against the outside of the border, instead of a pseudo-element inset on the field's root. `eldra-field-invalid` now sits on the control (the input, textarea, select trigger, or the `MultiSelect` field holding inside tags), and `--eldra-field-invalid-radius` is gone. On focus the line moves out to become the focus ring.
package/README.md CHANGED
@@ -652,7 +652,13 @@ spec's own non-negotiable 2):
652
652
  while another is already open is simply left open, underneath). `Esc` and a backdrop click,
653
653
  though, only ever act on the **topmost** entry (`isTop` below); a lower dialog ignores both, even
654
654
  one dispatched at it directly. The scroll lock is held while the stack is non-empty, released only
655
- once every open modal has closed. `TOAST_HOST_KEY` (exported) is a plain
655
+ once every open modal has closed. While held, `<html>` is padded on the right by the width of
656
+ the scrollbar the lock hid, so the page does not shift sideways, and carries that width as
657
+ `--eldra-scrollbar-width` (`0px` when no scrollbar was hidden; unset while no modal is open). A
658
+ `position: fixed` element is laid out against the viewport, not `<html>`'s padded box, so a
659
+ full-width fixed header or bar still widens into the freed strip unless it pads itself by the
660
+ variable: `padding-right: var(--eldra-scrollbar-width, 0px)` (`pr-[var(--eldra-scrollbar-width,0px)]`).
661
+ `TOAST_HOST_KEY` (exported) is a plain
656
662
  `Ref<HTMLDialogElement | null>` tracking the **topmost** dialog, **not a Vue injection key**
657
663
  despite the name matching this package's `*_KEY` convention — see its own doc comment for why: a
658
664
  `Toaster` mounted near an app's root is a sibling of whatever opens a `Dialog` elsewhere in the
@@ -1512,6 +1518,17 @@ during development, outside this repository's own history.
1512
1518
  Things this package ships that design spec 1 does not name at all. Each is listed here so a reader
1513
1519
  comparing the package against the spec can tell an addition from a drift.
1514
1520
 
1521
+ - **`Lightbox`'s `zoom`** (default `false`): for clothing and other detail shots. Over the painted
1522
+ image itself (not its letterbox, the caption or the empty stage) the cursor is `zoom-in` and a
1523
+ zoom button (`zoomButton`, "Zoom in" / "Zoom out", `lightboxZoomIn` / `lightboxZoomOut`) shows in
1524
+ the stage's corner; on a device with no hover the button always shows, and it shows whenever it
1525
+ has keyboard focus. A click on the image or the button enlarges the current image to its real
1526
+ size (`width` / `height`), never past it; an image under 1.25× its shown size offers no zoom.
1527
+ While zoomed, the pointer's position over the stage picks the part shown, the arrow keys pan a
1528
+ tenth of the way per press, the previous/next arrows step aside, swiping and wheel scrolling
1529
+ between images pause, and a click, the button or `Esc` zooms out (`Esc` again closes). Changing
1530
+ image or closing zooms out. Phones keep the browser's own pinch-zoom; there is no touch pan. The
1531
+ zoom is a CSS transform on the same `<img>`, so no larger file is fetched.
1515
1532
  - **`PhoneInput`** (`@eldrajs/ui/phone`, WS-1006): a phone number field with a country picker, as-you-type
1516
1533
  spacing and per-country validation. The spec has no phone field; its anatomy, properties, states,
1517
1534
  keyboard and accessibility are written up under [`./phone`](#phone) above. Two utilities came
@@ -1,6 +1,6 @@
1
1
  import { $ as FIELD_KEY, W as FIELD_RADIUS, Y as FIELD_TEXT, d as useEldraUiLocale, i as SelectPanel_default, nt as joinIds, p as usePopover, r as useOptionList, rt as useUiId, tt as useControllableModel, y as useListbox } from "./useOptionList-CPHHDvPF.js";
2
2
  import { r as useEldraScope } from "./useEldraScope-BDbGzt7R.js";
3
- import { i as enUS, r as useMessages } from "./useMessages-CYnyGVRG.js";
3
+ import { i as enUS, r as useMessages } from "./useMessages-CrSnIuLt.js";
4
4
  import { t as CountryFlag_default } from "./CountryFlag-DOa8lOHp.js";
5
5
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, nextTick, normalizeClass, onMounted, openBlock, ref, renderSlot, toDisplayString, toValue, unref, watch, withCtx } from "vue";
6
6
  import { comparator } from "@eldrajs/sdk/format";
@@ -1,6 +1,6 @@
1
1
  import { $ as FIELD_KEY, A as ICON_STROKE_WIDTH$1, C as optionClass, D as optionSwatchClass, E as optionLabelClass, F as FIELD_CLEAR_BUTTON, G as FIELD_SEARCH_APPEARANCE, H as FIELD_PREFIX_PAD, I as FIELD_CLEAR_BUTTON_BOX, J as FIELD_SUFFIX_ROW_BASE, K as FIELD_SIZE, L as FIELD_CLEAR_SIZE, M as FIELD_ACTION_ROOM_REM, N as FIELD_BASE, O as panelClass, P as FIELD_BOX, Q as fieldState, S as listboxClass, T as optionIconClass, U as FIELD_PREFIX_ROW, V as FIELD_LIVE, W as FIELD_RADIUS, X as FIELD_TRAILING_PAD, Y as FIELD_TEXT, Z as FIELD_TRAILING_PAD_PAIR, b as TRIGGER_VALUE_CELL, d as useEldraUiLocale, et as mergeClass, f as Spinner_default, i as SelectPanel_default, j as FIELD_ACTION_PAIR_SIZE, k as ICON_SIZE_CLASS, n as matchRange, nt as joinIds, p as usePopover, q as FIELD_SUFFIX_ROW, r as useOptionList, rt as useUiId, tt as useControllableModel, w as optionHintClass, x as TRIGGER_VALUE_STACK, y as useListbox, z as FIELD_LEADING_ICON } from "./useOptionList-CPHHDvPF.js";
2
2
  import { r as useEldraScope } from "./useEldraScope-BDbGzt7R.js";
3
- import { r as useMessages } from "./useMessages-CYnyGVRG.js";
3
+ import { r as useMessages } from "./useMessages-CrSnIuLt.js";
4
4
  import { Comment, Fragment, Teleport, Text, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toValue, unref, useAttrs, useSlots, watch, watchPostEffect, withCtx, withModifiers } from "vue";
5
5
  import { numberFormat } from "@eldrajs/sdk/format";
6
6
  // src/utils/mask.ts
@@ -6076,7 +6076,7 @@ var SearchResultsPanel_default = /* @__PURE__ */ defineComponent({
6076
6076
  * class list for a `teleport: false` search bar; the inline `position` from `useFloating` (`fixed`
6077
6077
  * once teleported) is on the element and wins over it either way.
6078
6078
  */
6079
- const panelClass = computed(() => [props.flat ? ["eldra:flex eldra:h-full eldra:min-h-0 eldra:flex-col eldra:overflow-y-auto eldra:overscroll-contain eldra:p-2", "eldra:text-[color:var(--eldra-select-panel-text)]"] : [
6079
+ const panelClass = computed(() => [props.flat ? ["eldra:flex eldra:min-h-0 eldra:flex-auto eldra:flex-col eldra:overflow-y-auto eldra:overscroll-contain eldra:p-2", "eldra:text-[color:var(--eldra-select-panel-text)]"] : [
6080
6080
  "eldra:absolute eldra:z-popover eldra:flex eldra:flex-col eldra:overflow-y-auto eldra:overscroll-contain eldra:p-1.5",
6081
6081
  "eldra:eldra-search-panel-height",
6082
6082
  "eldra:rounded-lg eldra:border eldra:shadow-md",
@@ -93,6 +93,8 @@ declare const __VLS_base: import('vue').DefineComponent<AutocompleteProps, {
93
93
  imageOf: (position: number, total: number) => string;
94
94
  goToImage: (n: number) => string;
95
95
  lightboxImages: string;
96
+ lightboxZoomIn: string;
97
+ lightboxZoomOut: string;
96
98
  charactersLeft: (n: number) => string;
97
99
  overLimit: (n: number) => string;
98
100
  soldOut: string;
@@ -74,6 +74,8 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
74
74
  imageOf: (position: number, total: number) => string;
75
75
  goToImage: (n: number) => string;
76
76
  lightboxImages: string;
77
+ lightboxZoomIn: string;
78
+ lightboxZoomOut: string;
77
79
  charactersLeft: (n: number) => string;
78
80
  overLimit: (n: number) => string;
79
81
  soldOut: string;
@@ -75,6 +75,8 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
75
75
  imageOf: (position: number, total: number) => string;
76
76
  goToImage: (n: number) => string;
77
77
  lightboxImages: string;
78
+ lightboxZoomIn: string;
79
+ lightboxZoomOut: string;
78
80
  charactersLeft: (n: number) => string;
79
81
  overLimit: (n: number) => string;
80
82
  soldOut: string;
@@ -76,6 +76,8 @@ declare const __VLS_base: import('vue').DefineComponent<DrawerProps, {
76
76
  imageOf: (position: number, total: number) => string;
77
77
  goToImage: (n: number) => string;
78
78
  lightboxImages: string;
79
+ lightboxZoomIn: string;
80
+ lightboxZoomOut: string;
79
81
  charactersLeft: (n: number) => string;
80
82
  overLimit: (n: number) => string;
81
83
  soldOut: string;
@@ -87,6 +87,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
87
87
  imageOf: (position: number, total: number) => string;
88
88
  goToImage: (n: number) => string;
89
89
  lightboxImages: string;
90
+ lightboxZoomIn: string;
91
+ lightboxZoomOut: string;
90
92
  charactersLeft: (n: number) => string;
91
93
  overLimit: (n: number) => string;
92
94
  soldOut: string;
@@ -106,6 +106,8 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
106
106
  imageOf: (position: number, total: number) => string;
107
107
  goToImage: (n: number) => string;
108
108
  lightboxImages: string;
109
+ lightboxZoomIn: string;
110
+ lightboxZoomOut: string;
109
111
  charactersLeft: (n: number) => string;
110
112
  overLimit: (n: number) => string;
111
113
  soldOut: string;
@@ -56,6 +56,8 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
56
56
  imageOf: (position: number, total: number) => string;
57
57
  goToImage: (n: number) => string;
58
58
  lightboxImages: string;
59
+ lightboxZoomIn: string;
60
+ lightboxZoomOut: string;
59
61
  charactersLeft: (n: number) => string;
60
62
  overLimit: (n: number) => string;
61
63
  soldOut: string;
@@ -56,6 +56,8 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
56
56
  imageOf: (position: number, total: number) => string;
57
57
  goToImage: (n: number) => string;
58
58
  lightboxImages: string;
59
+ lightboxZoomIn: string;
60
+ lightboxZoomOut: string;
59
61
  charactersLeft: (n: number) => string;
60
62
  overLimit: (n: number) => string;
61
63
  soldOut: string;
@@ -62,6 +62,8 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
62
62
  imageOf: (position: number, total: number) => string;
63
63
  goToImage: (n: number) => string;
64
64
  lightboxImages: string;
65
+ lightboxZoomIn: string;
66
+ lightboxZoomOut: string;
65
67
  charactersLeft: (n: number) => string;
66
68
  overLimit: (n: number) => string;
67
69
  soldOut: string;
@@ -56,6 +56,8 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
56
56
  imageOf: (position: number, total: number) => string;
57
57
  goToImage: (n: number) => string;
58
58
  lightboxImages: string;
59
+ lightboxZoomIn: string;
60
+ lightboxZoomOut: string;
59
61
  charactersLeft: (n: number) => string;
60
62
  overLimit: (n: number) => string;
61
63
  soldOut: string;
@@ -56,6 +56,8 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
56
56
  imageOf: (position: number, total: number) => string;
57
57
  goToImage: (n: number) => string;
58
58
  lightboxImages: string;
59
+ lightboxZoomIn: string;
60
+ lightboxZoomOut: string;
59
61
  charactersLeft: (n: number) => string;
60
62
  overLimit: (n: number) => string;
61
63
  soldOut: string;
@@ -9,6 +9,7 @@ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
9
9
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
10
10
  "onUpdate:index"?: ((value: number) => any) | undefined;
11
11
  }>, {
12
+ zoom: boolean;
12
13
  modelValue: boolean;
13
14
  classes: Partial<Record<import('./types.js').LightboxPart, string>>;
14
15
  messages: Partial<{
@@ -62,6 +63,8 @@ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
62
63
  imageOf: (position: number, total: number) => string;
63
64
  goToImage: (n: number) => string;
64
65
  lightboxImages: string;
66
+ lightboxZoomIn: string;
67
+ lightboxZoomOut: string;
65
68
  charactersLeft: (n: number) => string;
66
69
  overLimit: (n: number) => string;
67
70
  soldOut: string;
@@ -2,7 +2,7 @@ import { UiMessages } from '../../composables/useMessages.js';
2
2
  /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
3
3
  * (spec "Lightbox" → Anatomy) plus the API contract's own `thumbnails`/`thumbnail` pair, which the
4
4
  * spec describes ("With thumbnails" variant) but does not number. */
5
- export type LightboxPart = 'panel' | 'close' | 'track' | 'slide' | 'image' | 'caption' | 'prev' | 'next' | 'counter' | 'thumbnails' | 'thumbnail';
5
+ export type LightboxPart = 'panel' | 'close' | 'track' | 'slide' | 'image' | 'caption' | 'prev' | 'next' | 'counter' | 'thumbnails' | 'thumbnail' | 'zoomButton';
6
6
  /**
7
7
  * One image in the gallery (spec "Lightbox" → Properties, `images` row). `width`/`height` are the
8
8
  * asset's real intrinsic pixel size — passed straight through to `Image` as `ratio="auto"`'s own
@@ -40,6 +40,14 @@ export interface LightboxProps {
40
40
  /** Shows the thumbnail strip under the caption (spec "Variants" → "With thumbnails"). Default
41
41
  * `false`. Ignored for a single image, which has nothing to pick between. */
42
42
  thumbnails?: boolean;
43
+ /**
44
+ * Lets the shopper enlarge the current image to its real size: over the image the cursor is a
45
+ * zoom-in magnifier, and a click (or the zoom button, which `Tab` reaches) zooms in. While zoomed,
46
+ * moving the mouse or the arrow keys pan, and a click, the button or `Esc` zooms out. An image
47
+ * whose real size is under 1.25× what is shown offers no zoom. Phones keep the browser's own
48
+ * pinch-zoom. Default `false`.
49
+ */
50
+ zoom?: boolean;
43
51
  /** Message overrides. See `useMessages`. */
44
52
  messages?: Partial<UiMessages>;
45
53
  /**
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The Lightbox zoom's geometry, kept apart from the component so it can be tested with no layout.
3
+ * Every rect is in the same coordinate space (`getBoundingClientRect()`'s, in practice).
4
+ */
5
+ export interface ZoomRect {
6
+ left: number;
7
+ top: number;
8
+ width: number;
9
+ height: number;
10
+ }
11
+ /** Below this, the image is already shown near its real size and the Lightbox offers no zoom. */
12
+ export declare const MIN_ZOOM_SCALE = 1.25;
13
+ /**
14
+ * The box an `object-fit: contain` image of `naturalWidth` × `naturalHeight` paints inside `frame`,
15
+ * centred. The frame is only the image's own box on a stage wide enough for it; on a narrower one
16
+ * the frame is taller than the picture, and the strips above and below are letterbox, not image.
17
+ */
18
+ export declare function containedRect(frame: ZoomRect, naturalWidth: number, naturalHeight: number): ZoomRect;
19
+ /** How far the painted image may grow before it passes its real size. */
20
+ export declare function zoomScale(naturalWidth: number, paintedWidth: number): number;
21
+ /**
22
+ * The `translate` (px) that goes with `scale(scale)` about the painted box's centre. `focus` says
23
+ * which part of a zoomed image larger than the stage shows, per axis: `0` its leading edge, `1` its
24
+ * trailing edge, clamped. An axis the zoomed image still fits on is centred in the stage instead.
25
+ */
26
+ export declare function zoomTransform(painted: ZoomRect, stage: ZoomRect, scale: number, focus: {
27
+ x: number;
28
+ y: number;
29
+ }): {
30
+ x: number;
31
+ y: number;
32
+ };
@@ -92,6 +92,8 @@ declare const __VLS_base: import('vue').DefineComponent<NavMenuProps, {
92
92
  imageOf: (position: number, total: number) => string;
93
93
  goToImage: (n: number) => string;
94
94
  lightboxImages: string;
95
+ lightboxZoomIn: string;
96
+ lightboxZoomOut: string;
95
97
  charactersLeft: (n: number) => string;
96
98
  overLimit: (n: number) => string;
97
99
  soldOut: string;
@@ -57,6 +57,8 @@ declare const __VLS_export: import('vue').DefineComponent<PaginationProps, {}, {
57
57
  imageOf: (position: number, total: number) => string;
58
58
  goToImage: (n: number) => string;
59
59
  lightboxImages: string;
60
+ lightboxZoomIn: string;
61
+ lightboxZoomOut: string;
60
62
  charactersLeft: (n: number) => string;
61
63
  overLimit: (n: number) => string;
62
64
  soldOut: string;
@@ -80,6 +80,8 @@ declare const __VLS_base: import('vue').DefineComponent<RangeSliderProps, {}, {}
80
80
  imageOf: (position: number, total: number) => string;
81
81
  goToImage: (n: number) => string;
82
82
  lightboxImages: string;
83
+ lightboxZoomIn: string;
84
+ lightboxZoomOut: string;
83
85
  charactersLeft: (n: number) => string;
84
86
  overLimit: (n: number) => string;
85
87
  soldOut: string;
@@ -81,6 +81,8 @@ declare const __VLS_base: import('vue').DefineComponent<SearchBarProps, {}, {},
81
81
  imageOf: (position: number, total: number) => string;
82
82
  goToImage: (n: number) => string;
83
83
  lightboxImages: string;
84
+ lightboxZoomIn: string;
85
+ lightboxZoomOut: string;
84
86
  charactersLeft: (n: number) => string;
85
87
  overLimit: (n: number) => string;
86
88
  soldOut: string;
@@ -86,6 +86,8 @@ declare const __VLS_base: import('vue').DefineComponent<SearchModalProps, {
86
86
  imageOf: (position: number, total: number) => string;
87
87
  goToImage: (n: number) => string;
88
88
  lightboxImages: string;
89
+ lightboxZoomIn: string;
90
+ lightboxZoomOut: string;
89
91
  charactersLeft: (n: number) => string;
90
92
  overLimit: (n: number) => string;
91
93
  soldOut: string;
@@ -146,6 +146,8 @@ declare const __VLS_base: import('vue').DefineComponent<MultiSelectProps, {}, {}
146
146
  imageOf: (position: number, total: number) => string;
147
147
  goToImage: (n: number) => string;
148
148
  lightboxImages: string;
149
+ lightboxZoomIn: string;
150
+ lightboxZoomOut: string;
149
151
  charactersLeft: (n: number) => string;
150
152
  overLimit: (n: number) => string;
151
153
  soldOut: string;
@@ -117,6 +117,8 @@ declare const __VLS_base: import('vue').DefineComponent<SelectProps, {}, {}, {},
117
117
  imageOf: (position: number, total: number) => string;
118
118
  goToImage: (n: number) => string;
119
119
  lightboxImages: string;
120
+ lightboxZoomIn: string;
121
+ lightboxZoomOut: string;
120
122
  charactersLeft: (n: number) => string;
121
123
  overLimit: (n: number) => string;
122
124
  soldOut: string;
@@ -74,6 +74,8 @@ declare const __VLS_base: import('vue').DefineComponent<SiteFormProps, {}, {}, {
74
74
  imageOf: (position: number, total: number) => string;
75
75
  goToImage: (n: number) => string;
76
76
  lightboxImages: string;
77
+ lightboxZoomIn: string;
78
+ lightboxZoomOut: string;
77
79
  charactersLeft: (n: number) => string;
78
80
  overLimit: (n: number) => string;
79
81
  soldOut: string;
@@ -59,6 +59,8 @@ declare const __VLS_export: import('vue').DefineComponent<ToastProps, {}, {}, {}
59
59
  imageOf: (position: number, total: number) => string;
60
60
  goToImage: (n: number) => string;
61
61
  lightboxImages: string;
62
+ lightboxZoomIn: string;
63
+ lightboxZoomOut: string;
62
64
  charactersLeft: (n: number) => string;
63
65
  overLimit: (n: number) => string;
64
66
  soldOut: string;
@@ -59,6 +59,8 @@ declare const __VLS_export: import('vue').DefineComponent<ToasterProps, {}, {},
59
59
  imageOf: (position: number, total: number) => string;
60
60
  goToImage: (n: number) => string;
61
61
  lightboxImages: string;
62
+ lightboxZoomIn: string;
63
+ lightboxZoomOut: string;
62
64
  charactersLeft: (n: number) => string;
63
65
  overLimit: (n: number) => string;
64
66
  soldOut: string;
@@ -479,6 +479,10 @@
479
479
  bottom: 0;
480
480
  }
481
481
 
482
+ .eldra\:bottom-3 {
483
+ bottom: var(--eldra-space-3);
484
+ }
485
+
482
486
  .eldra\:bottom-4 {
483
487
  bottom: var(--eldra-space-4);
484
488
  }
@@ -1364,6 +1368,10 @@
1364
1368
  flex: 14rem;
1365
1369
  }
1366
1370
 
1371
+ .eldra\:flex-auto {
1372
+ flex: auto;
1373
+ }
1374
+
1367
1375
  .eldra\:shrink-0 {
1368
1376
  flex-shrink: 0;
1369
1377
  }
@@ -1547,6 +1555,14 @@
1547
1555
  cursor: progress;
1548
1556
  }
1549
1557
 
1558
+ .eldra\:cursor-zoom-in {
1559
+ cursor: zoom-in;
1560
+ }
1561
+
1562
+ .eldra\:cursor-zoom-out {
1563
+ cursor: zoom-out;
1564
+ }
1565
+
1550
1566
  .eldra\:touch-pan-x {
1551
1567
  --tw-pan-x: pan-x;
1552
1568
  touch-action: var(--tw-pan-x, ) var(--tw-pan-y, ) var(--tw-pinch-zoom, );
@@ -2199,6 +2215,16 @@
2199
2215
  }
2200
2216
  }
2201
2217
 
2218
+ .eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_60\%\,transparent\)\] {
2219
+ background-color: var(--eldra-color-text);
2220
+ }
2221
+
2222
+ @supports (color: color-mix(in lab, red, red)) {
2223
+ .eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_60\%\,transparent\)\] {
2224
+ background-color: color-mix(in oklab,var(--eldra-color-text) 60%,transparent);
2225
+ }
2226
+ }
2227
+
2202
2228
  .eldra\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_94\%\,transparent\)\] {
2203
2229
  background-color: var(--eldra-color-text);
2204
2230
  }
@@ -4050,6 +4076,16 @@
4050
4076
  }
4051
4077
  }
4052
4078
 
4079
+ .eldra\:hover\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_80\%\,transparent\)\]:hover {
4080
+ background-color: var(--eldra-color-text);
4081
+ }
4082
+
4083
+ @supports (color: color-mix(in lab, red, red)) {
4084
+ .eldra\:hover\:bg-\[color-mix\(in_oklab\,var\(--eldra-color-text\)_80\%\,transparent\)\]:hover {
4085
+ background-color: color-mix(in oklab,var(--eldra-color-text) 80%,transparent);
4086
+ }
4087
+ }
4088
+
4053
4089
  .eldra\:hover\:bg-\[color-mix\(in_oklab\,var\(--eldra-dialog-text\,var\(--eldra-color-text\)\)\,transparent_94\%\)\]:hover {
4054
4090
  background-color: var(--eldra-dialog-text, var(--eldra-color-text));
4055
4091
  }
@@ -4145,6 +4181,10 @@
4145
4181
  }
4146
4182
  }
4147
4183
 
4184
+ .eldra\:focus-visible\:opacity-100:focus-visible {
4185
+ opacity: 1;
4186
+ }
4187
+
4148
4188
  .eldra\:active\:scale-\[0\.98\]:active {
4149
4189
  scale: .98;
4150
4190
  }
@@ -4307,6 +4347,14 @@
4307
4347
  user-select: none;
4308
4348
  }
4309
4349
 
4350
+ .eldra\:data-\[zoomed\=true\]\:overflow-hidden[data-zoomed="true"] {
4351
+ overflow: hidden;
4352
+ }
4353
+
4354
+ .eldra\:data-\[zoomed\=true\]\:overflow-x-hidden[data-zoomed="true"] {
4355
+ overflow-x: hidden;
4356
+ }
4357
+
4310
4358
  @media (prefers-reduced-motion: reduce) {
4311
4359
  .eldra\:motion-reduce\:animate-eldra-dialog-in-reduced {
4312
4360
  animation: .2s linear eldra-dialog-in-reduced;
@@ -4781,6 +4829,16 @@
4781
4829
  .eldra\:\[\&\>a\:first-child\]\:me-auto > a:first-child {
4782
4830
  margin-inline-end: auto;
4783
4831
  }
4832
+
4833
+ @media (hover: none) {
4834
+ .eldra\:\[\@media\(hover\:none\)\]\:opacity-100 {
4835
+ opacity: 1;
4836
+ }
4837
+ }
4838
+
4839
+ [data-zoomed="true"] .eldra\:\[\[data-zoomed\=true\]_\&\]\:overflow-visible {
4840
+ overflow: visible;
4841
+ }
4784
4842
  }
4785
4843
 
4786
4844
  @layer utilities;
@@ -31,7 +31,8 @@ export declare const TOAST_HOST_KEY: Ref<HTMLDialogElement | null>;
31
31
  *
32
32
  * The *first* claim (the stack going from empty to non-empty) locks the page's scroll (`<html>`
33
33
  * gets `overflow: hidden`, the shared modal rule: "While any modal surface is open … the root
34
- * element does not scroll") — later pushes leave it locked, already true. `TOAST_HOST_KEY` always
34
+ * element does not scroll"), padding `<html>` by the scrollbar's width so nothing shifts — later
35
+ * pushes leave it locked, already true. `TOAST_HOST_KEY` always
35
36
  * points at the new top.
36
37
  */
37
38
  export declare function openDialog(dialog: HTMLDialogElement): void;