@orangelogic/design-system 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
- package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.DTLA2CFh.js} +435 -415
- package/library/chunks/{button.D1YIxtv-.js → button.cbDkxJHn.js} +3 -3
- package/library/chunks/button.styles.D3GdfF7I.js +5 -0
- package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.CZSeCrot.js} +3279 -2903
- package/library/chunks/color.CIHdfM_a.js +187 -0
- package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Dvgoz-oA.js} +4 -4
- package/library/chunks/content-builder.CBBdfVOl.js +55 -0
- package/library/chunks/{dialog.BbQ4Du0M.js → dialog.BvSMV36r.js} +2 -2
- package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.BLdEjbza.js} +11 -10
- package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
- package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CukHxNBk.js} +1 -1
- package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.DAZQRdLq.js} +5 -5
- package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
- package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
- package/library/chunks/{header.BioJzPlg.js → header.2RH_nPmz.js} +132 -90
- package/library/chunks/{i18n.rtxrs1c1.js → i18n.BSPmBQ73.js} +94 -12
- package/library/chunks/{icon-button.CbUddcgI.js → icon-button.DV5Fks8j.js} +1 -1
- package/library/chunks/{iframe.y7iCAVZP.js → iframe.ddX2kGu3.js} +1 -1
- package/library/chunks/{image.A2hE1WoV.js → image.BM7bPTub.js} +407 -276
- package/library/chunks/index.DKKvxBAi.js +1130 -0
- package/library/chunks/{input.D1FFprPl.js → input.7pumTpdu.js} +3 -3
- package/library/chunks/{markdown.Dd_GFJK8.js → markdown.LHSzm035.js} +3 -3
- package/library/chunks/{menu-item.CbqZ66to.js → menu-item.CqPvDGeN.js} +1 -1
- package/library/chunks/{option.CkhHTlpl.js → option.dBUWN4sF.js} +1 -1
- package/library/chunks/{pagination.BlQRt932.js → pagination.C2f8lUVb.js} +6 -6
- package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
- package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
- package/library/chunks/responsive.BmBJSzC4.js +17 -0
- package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
- package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DOnaT12G.js} +312 -310
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Dm-pK2ft.js +352 -0
- package/library/chunks/{tree.B7IKBX3n.js → tree.CHQ1WjZV.js} +1 -1
- package/library/chunks/{types.MwUT4xFk.js → types.PdpKNndx.js} +77402 -54714
- package/library/chunks/typography.BLYdTF0n.js +102 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +161 -159
- package/library/components/audio.js +4 -4
- package/library/components/bicolor-picker.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/box.d.ts +3 -0
- package/library/components/box.js +22 -0
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/card.js +7 -7
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +36 -32
- package/library/components/color-swatch-group.js +8 -7
- package/library/components/color-swatch.js +246 -22
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +19 -19
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +5 -5
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +95 -92
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +12 -12
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +6 -3
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +5 -4
- package/library/components/input-group.js +1 -1
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +4 -4
- package/library/components/masonry.js +70 -56
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +4 -4
- package/library/components/mutation-observer.js +25 -23
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +2 -2
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/range.js +3 -3
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +6 -6
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +16 -16
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +3 -3
- package/library/components/types.js +496 -487
- package/library/components/typography.js +3 -2
- package/library/components/video.js +5277 -5209
- package/library/css/ol-base.css +1 -0
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/box/box.d.ts +26 -0
- package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
- package/library/packages/atoms/src/components/button/button.d.ts +4 -0
- package/library/packages/atoms/src/components/card/card.d.ts +1 -0
- package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
- package/library/packages/atoms/src/components/details/details.d.ts +6 -1
- package/library/packages/atoms/src/components/header/header.d.ts +38 -2
- package/library/packages/atoms/src/components/image/image.d.ts +30 -0
- package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
- package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
- package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
- package/library/packages/atoms/src/components/video/video.d.ts +24 -0
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
- package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
- package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
- package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
- package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
- package/library/packages/molecules/src/index.d.ts +0 -1
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
- package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
- package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +32 -9
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
- package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +3 -1
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
- package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +168 -13
- package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
- package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
- package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
- package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
- package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +11 -5
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +176 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
- package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
- package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/asset-link-format.d.ts +0 -1
- package/library/packages/types/src/button.d.ts +1 -1
- package/library/packages/types/src/color-swatch-group.d.ts +56 -0
- package/library/packages/types/src/color-swatch.d.ts +22 -0
- package/library/packages/types/src/column.d.ts +13 -0
- package/library/packages/types/src/content-builder.d.ts +73 -4
- package/library/packages/types/src/details-group.d.ts +80 -0
- package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
- package/library/packages/types/src/font-kit.d.ts +19 -0
- package/library/packages/types/src/font-picker.d.ts +2 -0
- package/library/packages/types/src/gallery-item.d.ts +3 -1
- package/library/packages/types/src/gallery.d.ts +2 -1
- package/library/packages/types/src/index.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/types/src/position-picker.d.ts +6 -0
- package/library/packages/types/src/sb-button.d.ts +7 -0
- package/library/packages/types/src/search-box.d.ts +4 -0
- package/library/packages/utils/src/color/color.d.ts +27 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +86 -0
- package/library/packages/utils/src/font/font.d.ts +12 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
- package/library/react-web-component.d.ts +514 -156
- package/library/utils.js +415 -395
- package/package.json +1 -1
- package/library/chunks/button.styles.BWgHrfLD.js +0 -5
- package/library/chunks/color-swatch.DdsUysbF.js +0 -223
- package/library/chunks/color.LzSGBy7o.js +0 -164
- package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
- package/library/chunks/index.BO_sT6SH.js +0 -20123
- package/library/chunks/toast.BOkYwUIj.js +0 -109
- package/library/chunks/transformation.B8m0Nbao.js +0 -384
- package/library/chunks/typography.T72DuoCa.js +0 -52
- package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
- /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
|
@@ -1,145 +1,146 @@
|
|
|
1
|
-
import { r as
|
|
1
|
+
import { r as $e, R as je, H as K, a as ie, b as oe } from "./resizable-component.styles.kMFDlGgv.js";
|
|
2
2
|
import { c as He } from "./component.styles.CAS3c9pM.js";
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
3
|
+
import { a as re } from "./index.Cpamj0jB.js";
|
|
4
|
+
import { P as Ae } from "./position-picker.qkbJlboF.js";
|
|
5
|
+
import { c as Te } from "./custom-element.L4WJXn1j.js";
|
|
5
6
|
import { d as Oe } from "./debounce.DaHuiSGU.js";
|
|
6
|
-
import { L as
|
|
7
|
+
import { L as Ze } from "./i18n.BSPmBQ73.js";
|
|
7
8
|
import { w as M } from "./watch.DJF5K-8U.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { i as
|
|
9
|
+
import { a as Ie } from "./url.CGdWC06g.js";
|
|
10
|
+
import { i as he, E as X, x as R } from "./lit-element.jLBm65_O.js";
|
|
10
11
|
import { n as p } from "./lib-cortex-element.CVMmyPMC.js";
|
|
11
12
|
import { r as E } from "./state.CSDxrqLd.js";
|
|
12
13
|
import { e as G } from "./query.BBf1UFkC.js";
|
|
13
|
-
import { e as
|
|
14
|
-
import { o as
|
|
15
|
-
import { i as
|
|
16
|
-
import { o as
|
|
14
|
+
import { e as L } from "./class-map.BiVq-cVR.js";
|
|
15
|
+
import { o as S } from "./if-defined.BRoBj_Rp.js";
|
|
16
|
+
import { i as Me } from "./keyed.DdOUTIg-.js";
|
|
17
|
+
import { o as Pe } from "./style-map.llVFPd__.js";
|
|
17
18
|
import { n as A } from "./when.Dr1es41R.js";
|
|
18
|
-
import { C as
|
|
19
|
-
import
|
|
19
|
+
import { C as Fe } from "./icon.BLXWp6CU.js";
|
|
20
|
+
import _e from "../components/popup.js";
|
|
20
21
|
import Ne from "../components/resize-observer.js";
|
|
21
22
|
import We from "../components/skeleton.js";
|
|
22
23
|
import Be from "../components/space.js";
|
|
23
|
-
var I = /* @__PURE__ */ ((
|
|
24
|
+
var I = /* @__PURE__ */ ((e) => (e.Automatic = "automatic", e.Manual = "manual", e))(I || {});
|
|
24
25
|
/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
|
|
25
|
-
var $ = Object.assign || function(
|
|
26
|
-
for (var
|
|
27
|
-
var o = arguments[
|
|
28
|
-
for (var
|
|
29
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
30
|
-
}
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
-
return
|
|
34
|
-
},
|
|
35
|
-
return NodeList.prototype.isPrototypeOf(
|
|
36
|
-
},
|
|
37
|
-
return
|
|
38
|
-
},
|
|
39
|
-
var o =
|
|
26
|
+
var $ = Object.assign || function(e) {
|
|
27
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
+
var o = arguments[i];
|
|
29
|
+
for (var h in o)
|
|
30
|
+
Object.prototype.hasOwnProperty.call(o, h) && (e[h] = o[h]);
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
33
|
+
}, W = function(i) {
|
|
34
|
+
return i.tagName === "IMG";
|
|
35
|
+
}, Ue = function(i) {
|
|
36
|
+
return NodeList.prototype.isPrototypeOf(i);
|
|
37
|
+
}, B = function(i) {
|
|
38
|
+
return i && i.nodeType === 1;
|
|
39
|
+
}, ae = function(i) {
|
|
40
|
+
var o = i.currentSrc || i.src;
|
|
40
41
|
return o.substr(-4).toLowerCase() === ".svg";
|
|
41
|
-
},
|
|
42
|
+
}, ne = function(i) {
|
|
42
43
|
try {
|
|
43
|
-
return Array.isArray(
|
|
44
|
+
return Array.isArray(i) ? i.filter(W) : Ue(i) ? [].slice.call(i).filter(W) : B(i) ? [i].filter(W) : typeof i == "string" ? [].slice.call(document.querySelectorAll(i)).filter(W) : [];
|
|
44
45
|
} catch {
|
|
45
46
|
throw new TypeError(`The provided selector is invalid.
|
|
46
47
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
47
48
|
See: https://github.com/francoischalifour/medium-zoom`);
|
|
48
49
|
}
|
|
49
|
-
},
|
|
50
|
+
}, De = function(i) {
|
|
50
51
|
var o = document.createElement("div");
|
|
51
|
-
return o.classList.add("medium-zoom-overlay"), o.style.background =
|
|
52
|
-
},
|
|
53
|
-
var o =
|
|
54
|
-
return
|
|
55
|
-
},
|
|
56
|
-
var
|
|
52
|
+
return o.classList.add("medium-zoom-overlay"), o.style.background = i, o;
|
|
53
|
+
}, qe = function(i) {
|
|
54
|
+
var o = i.getBoundingClientRect(), h = o.top, d = o.left, C = o.width, k = o.height, z = i.cloneNode(), U = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, P = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
55
|
+
return z.removeAttribute("id"), z.style.position = "absolute", z.style.top = h + U + "px", z.style.left = d + P + "px", z.style.width = C + "px", z.style.height = k + "px", z.style.transform = "", z;
|
|
56
|
+
}, T = function(i, o) {
|
|
57
|
+
var h = $({
|
|
57
58
|
bubbles: !1,
|
|
58
59
|
cancelable: !1,
|
|
59
60
|
detail: void 0
|
|
60
61
|
}, o);
|
|
61
62
|
if (typeof window.CustomEvent == "function")
|
|
62
|
-
return new CustomEvent(
|
|
63
|
-
var
|
|
64
|
-
return
|
|
65
|
-
},
|
|
66
|
-
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
67
|
-
function
|
|
63
|
+
return new CustomEvent(i, h);
|
|
64
|
+
var d = document.createEvent("CustomEvent");
|
|
65
|
+
return d.initCustomEvent(i, h.bubbles, h.cancelable, h.detail), d;
|
|
66
|
+
}, Ve = function e(i) {
|
|
67
|
+
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = window.Promise || function(r) {
|
|
68
|
+
function n() {
|
|
68
69
|
}
|
|
69
|
-
r(
|
|
70
|
-
},
|
|
71
|
-
var
|
|
72
|
-
if (
|
|
70
|
+
r(n, n);
|
|
71
|
+
}, d = function(r) {
|
|
72
|
+
var n = r.target;
|
|
73
|
+
if (n === _) {
|
|
73
74
|
x();
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
|
-
y.indexOf(
|
|
77
|
+
y.indexOf(n) !== -1 && Q({ target: n });
|
|
77
78
|
}, C = function() {
|
|
78
|
-
if (!(
|
|
79
|
+
if (!(j || !t.original)) {
|
|
79
80
|
var r = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
80
|
-
Math.abs(ee - r) >
|
|
81
|
+
Math.abs(ee - r) > c.scrollOffset && setTimeout(x, 150);
|
|
81
82
|
}
|
|
82
83
|
}, k = function(r) {
|
|
83
|
-
var
|
|
84
|
-
(
|
|
85
|
-
},
|
|
86
|
-
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
87
|
-
if (r.background && (
|
|
88
|
-
var m =
|
|
89
|
-
|
|
84
|
+
var n = r.key || r.keyCode;
|
|
85
|
+
(n === "Escape" || n === "Esc" || n === 27) && x();
|
|
86
|
+
}, z = function() {
|
|
87
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r;
|
|
88
|
+
if (r.background && (_.style.background = r.background), r.container && r.container instanceof Object && (n.container = $({}, c.container, r.container)), r.template) {
|
|
89
|
+
var m = B(r.template) ? r.template : document.querySelector(r.template);
|
|
90
|
+
n.template = m;
|
|
90
91
|
}
|
|
91
|
-
return
|
|
92
|
-
g.dispatchEvent(
|
|
92
|
+
return c = $({}, c, n), y.forEach(function(g) {
|
|
93
|
+
g.dispatchEvent(T("medium-zoom:update", {
|
|
93
94
|
detail: { zoom: u }
|
|
94
95
|
}));
|
|
95
96
|
}), u;
|
|
96
97
|
}, U = function() {
|
|
97
98
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
98
|
-
return
|
|
99
|
-
},
|
|
100
|
-
for (var r = arguments.length,
|
|
101
|
-
|
|
102
|
-
var g =
|
|
103
|
-
return [].concat(s,
|
|
99
|
+
return e($({}, c, r));
|
|
100
|
+
}, P = function() {
|
|
101
|
+
for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
|
|
102
|
+
n[m] = arguments[m];
|
|
103
|
+
var g = n.reduce(function(s, v) {
|
|
104
|
+
return [].concat(s, ne(v));
|
|
104
105
|
}, []);
|
|
105
106
|
return g.filter(function(s) {
|
|
106
107
|
return y.indexOf(s) === -1;
|
|
107
108
|
}).forEach(function(s) {
|
|
108
109
|
y.push(s), s.classList.add("medium-zoom-image");
|
|
109
|
-
}),
|
|
110
|
-
var v = s.type,
|
|
110
|
+
}), F.forEach(function(s) {
|
|
111
|
+
var v = s.type, b = s.listener, H = s.options;
|
|
111
112
|
g.forEach(function(w) {
|
|
112
|
-
w.addEventListener(v,
|
|
113
|
+
w.addEventListener(v, b, H);
|
|
113
114
|
});
|
|
114
115
|
}), u;
|
|
115
|
-
},
|
|
116
|
-
for (var r = arguments.length,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var g =
|
|
120
|
-
return [].concat(s,
|
|
116
|
+
}, me = function() {
|
|
117
|
+
for (var r = arguments.length, n = Array(r), m = 0; m < r; m++)
|
|
118
|
+
n[m] = arguments[m];
|
|
119
|
+
t.zoomed && x();
|
|
120
|
+
var g = n.length > 0 ? n.reduce(function(s, v) {
|
|
121
|
+
return [].concat(s, ne(v));
|
|
121
122
|
}, []) : y;
|
|
122
123
|
return g.forEach(function(s) {
|
|
123
|
-
s.classList.remove("medium-zoom-image"), s.dispatchEvent(
|
|
124
|
+
s.classList.remove("medium-zoom-image"), s.dispatchEvent(T("medium-zoom:detach", {
|
|
124
125
|
detail: { zoom: u }
|
|
125
126
|
}));
|
|
126
127
|
}), y = y.filter(function(s) {
|
|
127
128
|
return g.indexOf(s) === -1;
|
|
128
129
|
}), u;
|
|
129
|
-
},
|
|
130
|
+
}, ge = function(r, n) {
|
|
130
131
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
131
132
|
return y.forEach(function(g) {
|
|
132
|
-
g.addEventListener("medium-zoom:" + r,
|
|
133
|
-
}),
|
|
134
|
-
},
|
|
133
|
+
g.addEventListener("medium-zoom:" + r, n, m);
|
|
134
|
+
}), F.push({ type: "medium-zoom:" + r, listener: n, options: m }), u;
|
|
135
|
+
}, ue = function(r, n) {
|
|
135
136
|
var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
136
137
|
return y.forEach(function(g) {
|
|
137
|
-
g.removeEventListener("medium-zoom:" + r,
|
|
138
|
-
}),
|
|
139
|
-
return !(g.type === "medium-zoom:" + r && g.listener.toString() ===
|
|
138
|
+
g.removeEventListener("medium-zoom:" + r, n, m);
|
|
139
|
+
}), F = F.filter(function(g) {
|
|
140
|
+
return !(g.type === "medium-zoom:" + r && g.listener.toString() === n.toString());
|
|
140
141
|
}), u;
|
|
141
142
|
}, J = function() {
|
|
142
|
-
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
143
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r.target, m = function() {
|
|
143
144
|
var s = {
|
|
144
145
|
width: document.documentElement.clientWidth,
|
|
145
146
|
height: document.documentElement.clientHeight,
|
|
@@ -147,136 +148,136 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
147
148
|
top: 0,
|
|
148
149
|
right: 0,
|
|
149
150
|
bottom: 0
|
|
150
|
-
}, v = void 0,
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
s = $({}, s,
|
|
151
|
+
}, v = void 0, b = void 0;
|
|
152
|
+
if (c.container)
|
|
153
|
+
if (c.container instanceof Object)
|
|
154
|
+
s = $({}, s, c.container), v = s.width - s.left - s.right - c.margin * 2, b = s.height - s.top - s.bottom - c.margin * 2;
|
|
154
155
|
else {
|
|
155
|
-
var
|
|
156
|
+
var H = B(c.container) ? c.container : document.querySelector(c.container), w = H.getBoundingClientRect(), D = w.width, ye = w.height, be = w.left, ze = w.top;
|
|
156
157
|
s = $({}, s, {
|
|
157
158
|
width: D,
|
|
158
|
-
height:
|
|
159
|
-
left:
|
|
160
|
-
top:
|
|
159
|
+
height: ye,
|
|
160
|
+
left: be,
|
|
161
|
+
top: ze
|
|
161
162
|
});
|
|
162
163
|
}
|
|
163
|
-
v = v || s.width -
|
|
164
|
-
var Z =
|
|
165
|
-
|
|
164
|
+
v = v || s.width - c.margin * 2, b = b || s.height - c.margin * 2;
|
|
165
|
+
var Z = t.zoomedHd || t.original, xe = ae(Z) ? v : Z.naturalWidth || v, we = ae(Z) ? b : Z.naturalHeight || b, N = Z.getBoundingClientRect(), Ee = N.top, Ce = N.left, q = N.width, V = N.height, ke = Math.min(Math.max(q, xe), v) / q, Re = Math.min(Math.max(V, we), b) / V, Y = Math.min(ke, Re), Le = (-Ce + (v - q) / 2 + c.margin + s.left) / Y, Se = (-Ee + (b - V) / 2 + c.margin + s.top) / Y, te = "scale(" + Y + ") translate3d(" + Le + "px, " + Se + "px, 0)";
|
|
166
|
+
t.zoomed.style.transform = te, t.zoomedHd && (t.zoomedHd.style.transform = te);
|
|
166
167
|
};
|
|
167
|
-
return new
|
|
168
|
-
if (
|
|
168
|
+
return new h(function(g) {
|
|
169
|
+
if (n && y.indexOf(n) === -1) {
|
|
169
170
|
g(u);
|
|
170
171
|
return;
|
|
171
172
|
}
|
|
172
173
|
var s = function D() {
|
|
173
|
-
|
|
174
|
+
j = !1, t.zoomed.removeEventListener("transitionend", D), t.original.dispatchEvent(T("medium-zoom:opened", {
|
|
174
175
|
detail: { zoom: u }
|
|
175
176
|
})), g(u);
|
|
176
177
|
};
|
|
177
|
-
if (
|
|
178
|
+
if (t.zoomed) {
|
|
178
179
|
g(u);
|
|
179
180
|
return;
|
|
180
181
|
}
|
|
181
|
-
if (
|
|
182
|
-
|
|
182
|
+
if (n)
|
|
183
|
+
t.original = n;
|
|
183
184
|
else if (y.length > 0) {
|
|
184
185
|
var v = y;
|
|
185
|
-
|
|
186
|
+
t.original = v[0];
|
|
186
187
|
} else {
|
|
187
188
|
g(u);
|
|
188
189
|
return;
|
|
189
190
|
}
|
|
190
|
-
if (
|
|
191
|
+
if (t.original.dispatchEvent(T("medium-zoom:open", {
|
|
191
192
|
detail: { zoom: u }
|
|
192
|
-
})), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0,
|
|
193
|
-
var
|
|
194
|
-
|
|
193
|
+
})), ee = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, j = !0, t.zoomed = qe(t.original), document.body.appendChild(_), c.template) {
|
|
194
|
+
var b = B(c.template) ? c.template : document.querySelector(c.template);
|
|
195
|
+
t.template = document.createElement("div"), t.template.appendChild(b.content.cloneNode(!0)), document.body.appendChild(t.template);
|
|
195
196
|
}
|
|
196
|
-
if (
|
|
197
|
+
if (t.original.parentElement && t.original.parentElement.tagName === "PICTURE" && t.original.currentSrc && (t.zoomed.src = t.original.currentSrc), document.body.appendChild(t.zoomed), window.requestAnimationFrame(function() {
|
|
197
198
|
document.body.classList.add("medium-zoom--opened");
|
|
198
|
-
}),
|
|
199
|
-
|
|
200
|
-
clearInterval(
|
|
199
|
+
}), t.original.classList.add("medium-zoom-image--hidden"), t.zoomed.classList.add("medium-zoom-image--opened"), t.zoomed.addEventListener("click", x), t.zoomed.addEventListener("transitionend", s), t.original.getAttribute("data-zoom-src")) {
|
|
200
|
+
t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("srcset"), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading"), t.zoomedHd.src = t.zoomed.getAttribute("data-zoom-src"), t.zoomedHd.onerror = function() {
|
|
201
|
+
clearInterval(H), console.warn("Unable to reach the zoom image target " + t.zoomedHd.src), t.zoomedHd = null, m();
|
|
201
202
|
};
|
|
202
|
-
var
|
|
203
|
-
|
|
203
|
+
var H = setInterval(function() {
|
|
204
|
+
t.zoomedHd.complete && (clearInterval(H), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m());
|
|
204
205
|
}, 10);
|
|
205
|
-
} else if (
|
|
206
|
-
|
|
207
|
-
var w =
|
|
208
|
-
|
|
206
|
+
} else if (t.original.hasAttribute("srcset")) {
|
|
207
|
+
t.zoomedHd = t.zoomed.cloneNode(), t.zoomedHd.removeAttribute("sizes"), t.zoomedHd.removeAttribute("loading");
|
|
208
|
+
var w = t.zoomedHd.addEventListener("load", function() {
|
|
209
|
+
t.zoomedHd.removeEventListener("load", w), t.zoomedHd.classList.add("medium-zoom-image--opened"), t.zoomedHd.addEventListener("click", x), document.body.appendChild(t.zoomedHd), m();
|
|
209
210
|
});
|
|
210
211
|
} else
|
|
211
212
|
m();
|
|
212
213
|
});
|
|
213
214
|
}, x = function() {
|
|
214
|
-
return new
|
|
215
|
-
if (
|
|
215
|
+
return new h(function(r) {
|
|
216
|
+
if (j || !t.original) {
|
|
216
217
|
r(u);
|
|
217
218
|
return;
|
|
218
219
|
}
|
|
219
|
-
var
|
|
220
|
-
|
|
220
|
+
var n = function m() {
|
|
221
|
+
t.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(t.zoomed), t.zoomedHd && document.body.removeChild(t.zoomedHd), document.body.removeChild(_), t.zoomed.classList.remove("medium-zoom-image--opened"), t.template && document.body.removeChild(t.template), j = !1, t.zoomed.removeEventListener("transitionend", m), t.original.dispatchEvent(T("medium-zoom:closed", {
|
|
221
222
|
detail: { zoom: u }
|
|
222
|
-
})),
|
|
223
|
+
})), t.original = null, t.zoomed = null, t.zoomedHd = null, t.template = null, r(u);
|
|
223
224
|
};
|
|
224
|
-
|
|
225
|
+
j = !0, document.body.classList.remove("medium-zoom--opened"), t.zoomed.style.transform = "", t.zoomedHd && (t.zoomedHd.style.transform = ""), t.template && (t.template.style.transition = "opacity 150ms", t.template.style.opacity = 0), t.original.dispatchEvent(T("medium-zoom:close", {
|
|
225
226
|
detail: { zoom: u }
|
|
226
|
-
})),
|
|
227
|
+
})), t.zoomed.addEventListener("transitionend", n);
|
|
227
228
|
});
|
|
228
229
|
}, Q = function() {
|
|
229
|
-
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
230
|
-
return
|
|
231
|
-
}, ge = function() {
|
|
232
|
-
return d;
|
|
233
|
-
}, ue = function() {
|
|
234
|
-
return y;
|
|
230
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = r.target;
|
|
231
|
+
return t.original ? x() : J({ target: n });
|
|
235
232
|
}, pe = function() {
|
|
236
|
-
return
|
|
237
|
-
},
|
|
233
|
+
return c;
|
|
234
|
+
}, fe = function() {
|
|
235
|
+
return y;
|
|
236
|
+
}, ve = function() {
|
|
237
|
+
return t.original;
|
|
238
|
+
}, y = [], F = [], j = !1, ee = 0, c = o, t = {
|
|
238
239
|
original: null,
|
|
239
240
|
zoomed: null,
|
|
240
241
|
zoomedHd: null,
|
|
241
242
|
template: null
|
|
242
243
|
// If the selector is omitted, it's replaced by the options
|
|
243
244
|
};
|
|
244
|
-
Object.prototype.toString.call(
|
|
245
|
+
Object.prototype.toString.call(i) === "[object Object]" ? c = i : (i || typeof i == "string") && P(i), c = $({
|
|
245
246
|
margin: 0,
|
|
246
247
|
background: "#fff",
|
|
247
248
|
scrollOffset: 40,
|
|
248
249
|
container: null,
|
|
249
250
|
template: null
|
|
250
|
-
},
|
|
251
|
-
var
|
|
252
|
-
document.addEventListener("click",
|
|
251
|
+
}, c);
|
|
252
|
+
var _ = De(c.background);
|
|
253
|
+
document.addEventListener("click", d), document.addEventListener("keyup", k), document.addEventListener("scroll", C), window.addEventListener("resize", x);
|
|
253
254
|
var u = {
|
|
254
255
|
open: J,
|
|
255
256
|
close: x,
|
|
256
257
|
toggle: Q,
|
|
257
|
-
update:
|
|
258
|
+
update: z,
|
|
258
259
|
clone: U,
|
|
259
|
-
attach:
|
|
260
|
-
detach:
|
|
261
|
-
on:
|
|
262
|
-
off:
|
|
263
|
-
getOptions:
|
|
264
|
-
getImages:
|
|
265
|
-
getZoomedImage:
|
|
260
|
+
attach: P,
|
|
261
|
+
detach: me,
|
|
262
|
+
on: ge,
|
|
263
|
+
off: ue,
|
|
264
|
+
getOptions: pe,
|
|
265
|
+
getImages: fe,
|
|
266
|
+
getZoomedImage: ve
|
|
266
267
|
};
|
|
267
268
|
return u;
|
|
268
269
|
};
|
|
269
|
-
function Ye(
|
|
270
|
-
|
|
271
|
-
var o =
|
|
270
|
+
function Ye(e, i) {
|
|
271
|
+
i === void 0 && (i = {});
|
|
272
|
+
var o = i.insertAt;
|
|
272
273
|
if (!(typeof document > "u")) {
|
|
273
|
-
var
|
|
274
|
-
|
|
274
|
+
var h = document.head || document.getElementsByTagName("head")[0], d = document.createElement("style");
|
|
275
|
+
d.type = "text/css", o === "top" && h.firstChild ? h.insertBefore(d, h.firstChild) : h.appendChild(d), d.styleSheet ? d.styleSheet.cssText = e : d.appendChild(document.createTextNode(e));
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
|
-
var
|
|
278
|
-
Ye(
|
|
279
|
-
const
|
|
278
|
+
var Ke = ".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";
|
|
279
|
+
Ye(Ke);
|
|
280
|
+
const Xe = he`:host([effect=jump]) .container,:host([effect=text-reveal]) .container,:host([effect=zoom]) .container{overflow:initial}:host([effect=jump]) .highlighter{transition:all var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=jump]) .highlighter:hover{transform:translateY(calc(var(--highlightable-item-effect-jump-distance,0) * -1))}:host([effect=zoom][zoom-style=pop-out]){overflow-clip-margin:var(--column-padding,10px);overflow:clip}.highlighter--effect-text-reveal,:host([effect=zoom]) .highlighter--zoom-style-within-borders{overflow:hidden}:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{z-index:3;animation:none}:host([effect=zoom][zoom-style=pop-out]) .highlighter:not(:hover){animation:drop-z var(--transition-transform-duration) forwards}@keyframes drop-z{0%{z-index:2}99%{z-index:2}to{z-index:0}}.highlighter--can-hover:hover:after,.highlighter--selected:after,.highlighter--color-overlay:after{content:"";pointer-events:none;width:100%;height:100%;transition:all var(--transition-duration,.5s) var(--easing,linear);position:absolute;top:0;left:0}.highlighter--can-hover:hover:after,.highlighter--selected:after{outline:2px solid var(--cx-color-primary)}.highlighter--border:hover .image{border-color:var(--highlightable-item-highlight-border-color,var(--cx-color-primary))}.highlighter--color-overlay:after{border-radius:var(--border-radius,none)}.highlighter--color-overlay:hover:after{background-color:var(--highlightable-item-highlight-color-overlay-color,transparent)}.highlighter--drop-shadow:hover .image{box-shadow:var(--highlightable-item-highlight-drop-shadow,none)}.highlighter--background:hover .highlightable-item{--content-background-color:var(--highlightable-item-highlight-background,transparent);--highlightable-item-background-color:var(--highlightable-item-highlight-background,transparent)}.highlighter--opacity{opacity:var(--highlightable-item-highlight-opacity,1)}:host([effect=zoom][zoom-style=within-borders]) .highlighter .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter{transition:transform var(--transition-transform-duration,.5s) var(--easing,linear)}:host([effect=zoom][zoom-style=within-borders]) .highlighter:hover .image,:host([effect=zoom][zoom-style=pop-out]) .highlighter:hover{transform:scale(var(--highlightable-item-effect-zoom-scale,1))}.highlightable-item{transition:background-color var(--transition-duration,.5s) var(--easing,linear), border-color var(--transition-duration,.5s) var(--easing,linear), box-shadow var(--transition-duration,.5s) var(--easing,linear), opacity var(--transition-duration,.5s) var(--easing,linear), transform var(--transition-transform-duration,.5s) var(--easing,linear), visibility var(--transition-duration,.5s) var(--easing,linear)}`, Ge = he`
|
|
280
281
|
:host {
|
|
281
282
|
--justify-content: flex-start;
|
|
282
283
|
--border-radius: 0px;
|
|
@@ -330,7 +331,7 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
330
331
|
max-height: 100%;
|
|
331
332
|
}
|
|
332
333
|
|
|
333
|
-
${
|
|
334
|
+
${Xe}
|
|
334
335
|
|
|
335
336
|
:host([block]) {
|
|
336
337
|
width: 100%;
|
|
@@ -404,6 +405,19 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
404
405
|
outline: none;
|
|
405
406
|
}
|
|
406
407
|
|
|
408
|
+
.highlighter--loading-ratio {
|
|
409
|
+
aspect-ratio: var(--image-loading-aspect-ratio);
|
|
410
|
+
height: auto;
|
|
411
|
+
min-height: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* Jump/Zoom put the image in the popup's anchor slot; its host is display: contents. */
|
|
415
|
+
.highlighter--loading-ratio > .highlightable-item,
|
|
416
|
+
.highlighter--loading-ratio > .popup-container > .highlightable-item[slot='anchor'] {
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
407
421
|
.highlighter--centered {
|
|
408
422
|
display: flex;
|
|
409
423
|
justify-content: center;
|
|
@@ -424,6 +438,56 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
424
438
|
cursor: pointer;
|
|
425
439
|
}
|
|
426
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Only used under object-fit: contain, where the image shrinks to fit and object-position
|
|
443
|
+
* has no free space to shift content within the <img> box — so the focal point is applied
|
|
444
|
+
* by aligning the <img> itself within this flex parent instead.
|
|
445
|
+
*/
|
|
446
|
+
.highlightable-item--crop-focus-top-left {
|
|
447
|
+
align-items: flex-start;
|
|
448
|
+
justify-content: flex-start;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.highlightable-item--crop-focus-top-center {
|
|
452
|
+
align-items: flex-start;
|
|
453
|
+
justify-content: center;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.highlightable-item--crop-focus-top-right {
|
|
457
|
+
align-items: flex-start;
|
|
458
|
+
justify-content: flex-end;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.highlightable-item--crop-focus-center-left {
|
|
462
|
+
align-items: center;
|
|
463
|
+
justify-content: flex-start;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.highlightable-item--crop-focus-center-center {
|
|
467
|
+
align-items: center;
|
|
468
|
+
justify-content: center;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.highlightable-item--crop-focus-center-right {
|
|
472
|
+
align-items: center;
|
|
473
|
+
justify-content: flex-end;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.highlightable-item--crop-focus-bottom-left {
|
|
477
|
+
align-items: flex-end;
|
|
478
|
+
justify-content: flex-start;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.highlightable-item--crop-focus-bottom-center {
|
|
482
|
+
align-items: flex-end;
|
|
483
|
+
justify-content: center;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.highlightable-item--crop-focus-bottom-right {
|
|
487
|
+
align-items: flex-end;
|
|
488
|
+
justify-content: flex-end;
|
|
489
|
+
}
|
|
490
|
+
|
|
427
491
|
.image {
|
|
428
492
|
border-radius: var(--border-radius);
|
|
429
493
|
border: var(--border) solid;
|
|
@@ -455,6 +519,42 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
455
519
|
object-fit: scale-down;
|
|
456
520
|
}
|
|
457
521
|
|
|
522
|
+
.image--crop-focus-top-left {
|
|
523
|
+
object-position: left top;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.image--crop-focus-top-center {
|
|
527
|
+
object-position: center top;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.image--crop-focus-top-right {
|
|
531
|
+
object-position: right top;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.image--crop-focus-center-left {
|
|
535
|
+
object-position: left center;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.image--crop-focus-center-center {
|
|
539
|
+
object-position: center center;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.image--crop-focus-center-right {
|
|
543
|
+
object-position: right center;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.image--crop-focus-bottom-left {
|
|
547
|
+
object-position: left bottom;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.image--crop-focus-bottom-center {
|
|
551
|
+
object-position: center bottom;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.image--crop-focus-bottom-right {
|
|
555
|
+
object-position: right bottom;
|
|
556
|
+
}
|
|
557
|
+
|
|
458
558
|
.image--hidden {
|
|
459
559
|
display: none;
|
|
460
560
|
}
|
|
@@ -468,13 +568,13 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
468
568
|
}
|
|
469
569
|
|
|
470
570
|
.image--contain.image--landscape {
|
|
471
|
-
width: 100
|
|
571
|
+
width: var(--image-contain-fill, 100%);
|
|
472
572
|
height: auto;
|
|
473
573
|
}
|
|
474
574
|
|
|
475
575
|
.image--contain.image--portrait {
|
|
476
576
|
width: auto;
|
|
477
|
-
height: 100
|
|
577
|
+
height: var(--image-contain-fill, 100%);
|
|
478
578
|
}
|
|
479
579
|
|
|
480
580
|
.popup-container::part(popup) {
|
|
@@ -535,16 +635,16 @@ const Ke = se`:host([effect=jump]) .container,:host([effect=text-reveal]) .conta
|
|
|
535
635
|
color: var(--fallback-icon-color);
|
|
536
636
|
}
|
|
537
637
|
`;
|
|
538
|
-
var
|
|
539
|
-
throw TypeError(
|
|
540
|
-
},
|
|
541
|
-
for (var
|
|
542
|
-
(k =
|
|
543
|
-
return
|
|
544
|
-
},
|
|
545
|
-
let
|
|
638
|
+
var Je = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, ce = (e) => {
|
|
639
|
+
throw TypeError(e);
|
|
640
|
+
}, l = (e, i, o, h) => {
|
|
641
|
+
for (var d = h > 1 ? void 0 : h ? Qe(i, o) : i, C = e.length - 1, k; C >= 0; C--)
|
|
642
|
+
(k = e[C]) && (d = (h ? k(i, o, d) : k(d)) || d);
|
|
643
|
+
return h && d && Je(i, o, d), d;
|
|
644
|
+
}, de = (e, i, o) => i.has(e) || ce("Cannot " + o), se = (e, i, o) => (de(e, i, "read from private field"), o ? o.call(e) : i.get(e)), et = (e, i, o) => i.has(e) ? ce("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, o), le = (e, i, o, h) => (de(e, i, "write to private field"), i.set(e, o), o), O;
|
|
645
|
+
let a = class extends je {
|
|
546
646
|
constructor() {
|
|
547
|
-
super(...arguments), this.localize = new
|
|
647
|
+
super(...arguments), this.localize = new Ze(this), this.retryCount = 0, this.retryTimer = null, this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryIndex = 0, this.src = "", this.aspectRatio = 0, this.srcset = "", this.sizes = "", this.placeholder = "", this.alt = "", this.objectFit = re.Fill, this.cropFocus = Ae.CenterCenter, this.skeleton = !1, this.fallback = !1, this.canZoom = !1, this.loading = !1, this.block = !1, this.htmlLoading = "lazy", this.noCrossorigin = !1, this.clickHandlerType = I.Automatic, this.retryOnError = !1, this.maxRetries = 10, this.isZoomed = !1, this.imageRatio = 1, this.parsedAlt = "", this.parsedAltDarkMode = "", this.zoom = null, this.lastPatchedWidth = null, et(this, O, "");
|
|
548
648
|
}
|
|
549
649
|
get currentAltValue() {
|
|
550
650
|
return this.alt;
|
|
@@ -558,21 +658,44 @@ let n = class extends Re {
|
|
|
558
658
|
get highlighterRole() {
|
|
559
659
|
return this.hasZoomAction && this.clickHandlerType === I.Automatic ? "button" : "img";
|
|
560
660
|
}
|
|
661
|
+
/**
|
|
662
|
+
* `object-position` only shifts content already stretched to fill the `<img>` box, so
|
|
663
|
+
* under `contain` (where the image shrinks to fit and never fills that box on both axes)
|
|
664
|
+
* the focal point must instead be applied by aligning the `<img>` within this flex parent.
|
|
665
|
+
*/
|
|
666
|
+
get highlighterCropFocusClass() {
|
|
667
|
+
return this.objectFit === re.Contain ? { [`highlightable-item--crop-focus-${this.cropFocus}`]: !0 } : {};
|
|
668
|
+
}
|
|
561
669
|
get highlighterClass() {
|
|
562
670
|
return {
|
|
563
671
|
"highlightable-item": !0,
|
|
564
672
|
"highlightable-item--effect-text-reveal": this.effect === K.TextReveal,
|
|
565
|
-
[`highlightable-item--text-reveal-style-${this.textRevealStyle}`]: !0
|
|
673
|
+
[`highlightable-item--text-reveal-style-${this.textRevealStyle}`]: !0,
|
|
674
|
+
...this.highlighterCropFocusClass
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
get currentAspectRatio() {
|
|
678
|
+
return this.aspectRatio;
|
|
679
|
+
}
|
|
680
|
+
get loadingAspectRatio() {
|
|
681
|
+
const e = this.currentAspectRatio;
|
|
682
|
+
return this.heightMode === ie.Auto && !this.isLoaded && !this.isEmpty && Number.isFinite(e) && e > 0 ? e : void 0;
|
|
683
|
+
}
|
|
684
|
+
getHighlighterClass(e = !1) {
|
|
685
|
+
return {
|
|
686
|
+
...super.getHighlighterClass(e),
|
|
687
|
+
"highlighter--loading-ratio": this.loadingAspectRatio !== void 0
|
|
566
688
|
};
|
|
567
689
|
}
|
|
568
690
|
get imageClass() {
|
|
569
|
-
let
|
|
570
|
-
const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width),
|
|
571
|
-
return
|
|
691
|
+
let e = "landscape", i = this.ratio;
|
|
692
|
+
const o = this.width.endsWith("%") ? this.clientWidth : Number.parseFloat(this.width), h = this.isResizing ? this.resizeSize.width : o, d = this.isResizing ? this.resizeSize.height : Number.parseFloat(this.height);
|
|
693
|
+
return h && d && (i = h / d), i > this.imageRatio && (e = "portrait"), {
|
|
572
694
|
image: !0,
|
|
573
695
|
[`image--${this.objectFit}`]: !0,
|
|
574
|
-
[`image--${
|
|
696
|
+
[`image--${e}`]: !0,
|
|
575
697
|
[`image--height-${this.heightMode}`]: !0,
|
|
698
|
+
[`image--crop-focus-${this.cropFocus}`]: !0,
|
|
576
699
|
"image--can-zoom": this.canZoom,
|
|
577
700
|
"image--has-action": this.hasZoomAction,
|
|
578
701
|
"image--hidden": this.isEmpty || this.isError || this.isRetrying
|
|
@@ -630,8 +753,8 @@ let n = class extends Re {
|
|
|
630
753
|
handleBlur() {
|
|
631
754
|
this.isZoomed && this.zoom?.close();
|
|
632
755
|
}
|
|
633
|
-
handleKeyDown(
|
|
634
|
-
|
|
756
|
+
handleKeyDown(e) {
|
|
757
|
+
e.target === this.highlighterElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.highlighterElement.click());
|
|
635
758
|
}
|
|
636
759
|
async handleCanZoomChange() {
|
|
637
760
|
await this.updateComplete, this.hasZoomAction ? this.initZoom() : (this.zoom?.detach(), this.zoom = null);
|
|
@@ -640,23 +763,23 @@ let n = class extends Re {
|
|
|
640
763
|
await this.updateComplete, this.requestUpdate();
|
|
641
764
|
}
|
|
642
765
|
handleSrcChange() {
|
|
643
|
-
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0,
|
|
766
|
+
this.isLoaded = !1, this.isError = !1, this.isRetrying = !1, this.retryCount = 0, this.retryIndex = 0, le(this, O, ""), this.clearRetryTimer();
|
|
644
767
|
}
|
|
645
768
|
clearRetryTimer() {
|
|
646
769
|
this.retryTimer !== null && (clearTimeout(this.retryTimer), this.retryTimer = null);
|
|
647
770
|
}
|
|
648
771
|
scheduleRetry() {
|
|
649
|
-
const
|
|
772
|
+
const e = Math.min(1e3 * Math.pow(2, this.retryCount - 1), 1e4);
|
|
650
773
|
this.retryTimer = setTimeout(() => {
|
|
651
|
-
this.retryTimer = null,
|
|
652
|
-
},
|
|
774
|
+
this.retryTimer = null, le(this, O, `${this.retryCount}-${Math.random().toString(36).slice(2)}`), this.retryIndex += 1;
|
|
775
|
+
}, e);
|
|
653
776
|
}
|
|
654
777
|
/** Appends the retry cache-bust param to `src` while a retry attempt is in flight, so a CDN edge caching a corrupted/truncated response is bypassed in favor of a fresh origin fetch. */
|
|
655
|
-
applyRetryCacheBust(
|
|
656
|
-
return this.retryIndex === 0 || !
|
|
778
|
+
applyRetryCacheBust(e) {
|
|
779
|
+
return this.retryIndex === 0 || !se(this, O) || !e ? e : Ie(e, "cachebust", se(this, O));
|
|
657
780
|
}
|
|
658
781
|
async initZoom() {
|
|
659
|
-
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom =
|
|
782
|
+
this.zoomImageElement && !this.zoom && this.isLoaded && (this.zoom = Ve(this.zoomImageElement, {
|
|
660
783
|
background: "light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.8))",
|
|
661
784
|
margin: 0,
|
|
662
785
|
scrollOffset: 0
|
|
@@ -666,12 +789,12 @@ let n = class extends Re {
|
|
|
666
789
|
this.emit("cx-image-zoom-close"), this.isZoomed = !1;
|
|
667
790
|
}));
|
|
668
791
|
}
|
|
669
|
-
handleLoad(
|
|
670
|
-
const
|
|
671
|
-
if (!
|
|
792
|
+
handleLoad(e) {
|
|
793
|
+
const i = e?.currentTarget ?? this.imageElement;
|
|
794
|
+
if (!i)
|
|
672
795
|
return;
|
|
673
|
-
const { naturalHeight: o, naturalWidth:
|
|
674
|
-
this.imageRatio =
|
|
796
|
+
const { naturalHeight: o, naturalWidth: h } = i;
|
|
797
|
+
this.imageRatio = h / o, this.clearRetryTimer(), this.retryCount = 0, this.isRetrying = !1, this.isLoaded || this.emit("cx-load"), this.isLoaded = !0, this.isError = !1;
|
|
675
798
|
}
|
|
676
799
|
handleError() {
|
|
677
800
|
if (this.retryOnError && this.retryCount < this.maxRetries) {
|
|
@@ -681,178 +804,186 @@ let n = class extends Re {
|
|
|
681
804
|
this.isRetrying = !1, this.emit("cx-error"), this.isLoaded = !0, this.isError = !0;
|
|
682
805
|
}
|
|
683
806
|
handleSizeChange() {
|
|
684
|
-
const
|
|
685
|
-
|
|
807
|
+
const e = this.resizeDirection !== oe.Vertical, i = this.resizeDirection !== oe.Horizontal, o = this.isResizing ? `${this.resizeSize.width}px` : this.width, h = this.isResizing ? `${this.resizeSize.height}px` : this.height;
|
|
808
|
+
e && (this.width || this.isResizing ? this.style.setProperty("--width", o) : this.style.removeProperty("--width")), i && (this.heightMode !== ie.Auto && (this.height || this.isResizing) ? this.style.setProperty("--height", h) : this.style.removeProperty("--height"));
|
|
686
809
|
}
|
|
687
|
-
handleResize(
|
|
688
|
-
const { entries:
|
|
689
|
-
for (const o of
|
|
810
|
+
handleResize(e) {
|
|
811
|
+
const { entries: i } = e.detail;
|
|
812
|
+
for (const o of i)
|
|
690
813
|
o.target === this.highlighterElement && this.width.endsWith("%") && !this.isResizing && Math.abs(o.contentRect.width - (this.lastPatchedWidth ?? 0)) > 1 && this.updateLastPatchedWidth(o.contentRect.width);
|
|
691
814
|
}
|
|
692
|
-
updateLastPatchedWidth(
|
|
693
|
-
this.lastPatchedWidth =
|
|
815
|
+
updateLastPatchedWidth(e) {
|
|
816
|
+
this.lastPatchedWidth = e, this.requestUpdate();
|
|
694
817
|
}
|
|
695
818
|
/**
|
|
696
819
|
* Support CMS5 click action for the image.
|
|
697
820
|
*/
|
|
698
|
-
handleClickAction(
|
|
699
|
-
!(
|
|
821
|
+
handleClickAction(e) {
|
|
822
|
+
!(e.target instanceof HTMLElement) || this.clickHandlerType === I.Manual || this.canZoom && this.openZoom();
|
|
700
823
|
}
|
|
701
|
-
updated(
|
|
702
|
-
super.updated(
|
|
824
|
+
updated(e) {
|
|
825
|
+
super.updated(e);
|
|
826
|
+
const i = this.loadingAspectRatio;
|
|
827
|
+
i !== void 0 ? this.style.setProperty("--image-loading-aspect-ratio", String(i)) : this.style.removeProperty("--image-loading-aspect-ratio"), (e.has("width") || e.has("height") || e.has("heightMode") || e.has("resizeSize")) && this.handleSizeChange();
|
|
703
828
|
}
|
|
704
829
|
openZoom() {
|
|
705
830
|
this.zoom && this.zoom.open();
|
|
706
831
|
}
|
|
707
832
|
renderContent() {
|
|
708
|
-
const
|
|
833
|
+
const e = this.applyRetryCacheBust(this.currentSrc), i = this.currentAltValue;
|
|
709
834
|
if (this.retryOnError) {
|
|
710
835
|
if (this.isError && this.retryCount >= this.maxRetries)
|
|
711
836
|
return X;
|
|
712
837
|
} else if (this.isError)
|
|
713
838
|
return X;
|
|
714
|
-
return
|
|
839
|
+
return R`<div part="content" slot="anchor" class=${L(this.highlighterClass)}>${Me(
|
|
715
840
|
this.retryIndex,
|
|
716
|
-
|
|
841
|
+
R`<img part="image" class=${L(this.imageClass)} src=${e || this.placeholder} srcset=${S(this.srcset || void 0)} sizes=${S(this.sizes || void 0)} alt=${i} aria-label=${i} crossorigin=${S(this.crossorigin)} @load=${this.handleLoad} @error=${this.handleError} loading=${this.retryIndex > 0 ? "eager" : this.htmlLoading} decoding="async" width=${S(this.width || void 0)} height=${S(this.height || void 0)}>`
|
|
717
842
|
)}</div>`;
|
|
718
843
|
}
|
|
719
844
|
render() {
|
|
720
|
-
const
|
|
721
|
-
return
|
|
845
|
+
const e = this.hasZoomAction, i = this.currentAltValue;
|
|
846
|
+
return R`<div part="base" class=${L({
|
|
722
847
|
container: !0,
|
|
723
848
|
"container--empty": this.isEmpty,
|
|
724
849
|
"container--loading": this.loading,
|
|
725
850
|
"container--resizing": this.resizable && this.isResizeActive
|
|
726
|
-
})} style=${
|
|
851
|
+
})} style=${Pe({
|
|
727
852
|
"--easing": this.easeCSSVariable
|
|
728
|
-
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${
|
|
853
|
+
})} data-empty-label=${this.localize.term("emptyImage")} @click=${this.startResizing} @keydown=${this.handleKeyDown}><cx-resize-observer @cx-resize=${this.handleResize}><div part="highlighter" tabindex=${S(this.highlighterTabindex)} role=${this.highlighterRole} aria-label=${i} aria-roledescription=${this.localize.term("image")} class=${L(this.isEmpty ? {} : this.getHighlighterClass(this.isError))} @click=${this.handleClickAction} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave} @blur=${this.handleBlur}>${A(
|
|
729
854
|
this.isEmpty,
|
|
730
855
|
() => X,
|
|
731
856
|
() => A(
|
|
732
857
|
this.effect === K.Jump || this.effect === K.Zoom,
|
|
733
|
-
() =>
|
|
858
|
+
() => R`<cx-popup class="popup-container" strategy="absolute" active placement="center" sync="both">${this.renderContent()}</cx-popup>`,
|
|
734
859
|
() => this.renderContent()
|
|
735
860
|
)
|
|
736
861
|
)}<div class="zoom-image-container">${A(
|
|
737
|
-
|
|
738
|
-
() =>
|
|
862
|
+
e,
|
|
863
|
+
() => R`<img part="zoom-image" class=${L({
|
|
739
864
|
"zoom-image": !0,
|
|
740
865
|
"zoom-image--hidden": !this.isZoomed
|
|
741
|
-
})} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${
|
|
742
|
-
)}</div>${A(this.showPlaceholderSkeleton, () =>
|
|
866
|
+
})} src=${this.applyRetryCacheBust(this.currentSrc) || this.placeholder} alt="" aria-hidden="true" decoding="async" draggable="false" crossorigin=${S(this.crossorigin)}>`
|
|
867
|
+
)}</div>${A(this.showPlaceholderSkeleton, () => R`<slot name="skeleton" part="skeleton"><div class=${L({
|
|
743
868
|
skeleton: !0
|
|
744
869
|
})}><cx-skeleton effect="none" role="status" aria-live="polite" aria-label=${this.localize.term("loading")}></cx-skeleton></div></slot>`)}
|
|
745
|
-
${A(this.isError, () =>
|
|
870
|
+
${A(this.isError, () => R`<slot name="fallback" part="fallback"><cx-space class=${L({ fallback: !0 })} direction="column" align-items="center" justify-content="center"><cx-icon name="hide_image" part="fallback-icon"> </cx-icon></cx-space></slot>`)}</div></cx-resize-observer>${A(this.resizable && this.isResizeActive, () => this.renderResizer())}</div>`;
|
|
746
871
|
}
|
|
747
872
|
};
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
"cx-icon":
|
|
752
|
-
"cx-popup":
|
|
873
|
+
O = /* @__PURE__ */ new WeakMap();
|
|
874
|
+
a.styles = [He, $e, Ge];
|
|
875
|
+
a.dependencies = {
|
|
876
|
+
"cx-icon": Fe,
|
|
877
|
+
"cx-popup": _e,
|
|
753
878
|
"cx-resize-observer": Ne,
|
|
754
879
|
"cx-skeleton": We,
|
|
755
880
|
"cx-space": Be
|
|
756
881
|
};
|
|
757
|
-
|
|
882
|
+
l([
|
|
758
883
|
G(".image")
|
|
759
|
-
],
|
|
760
|
-
|
|
884
|
+
], a.prototype, "imageElement", 2);
|
|
885
|
+
l([
|
|
761
886
|
G(".zoom-image")
|
|
762
|
-
],
|
|
763
|
-
|
|
887
|
+
], a.prototype, "zoomImageElement", 2);
|
|
888
|
+
l([
|
|
764
889
|
G(".highlighter")
|
|
765
|
-
],
|
|
766
|
-
|
|
890
|
+
], a.prototype, "highlighterElement", 2);
|
|
891
|
+
l([
|
|
767
892
|
E()
|
|
768
|
-
],
|
|
769
|
-
|
|
893
|
+
], a.prototype, "isLoaded", 2);
|
|
894
|
+
l([
|
|
770
895
|
E()
|
|
771
|
-
],
|
|
772
|
-
|
|
896
|
+
], a.prototype, "isError", 2);
|
|
897
|
+
l([
|
|
773
898
|
E()
|
|
774
|
-
],
|
|
775
|
-
|
|
899
|
+
], a.prototype, "isRetrying", 2);
|
|
900
|
+
l([
|
|
776
901
|
E()
|
|
777
|
-
],
|
|
778
|
-
|
|
902
|
+
], a.prototype, "retryIndex", 2);
|
|
903
|
+
l([
|
|
779
904
|
p({ reflect: !0, type: String })
|
|
780
|
-
],
|
|
781
|
-
|
|
905
|
+
], a.prototype, "src", 2);
|
|
906
|
+
l([
|
|
907
|
+
p({ attribute: "aspect-ratio", reflect: !0, type: Number })
|
|
908
|
+
], a.prototype, "aspectRatio", 2);
|
|
909
|
+
l([
|
|
782
910
|
p({ reflect: !0, type: String })
|
|
783
|
-
],
|
|
784
|
-
|
|
911
|
+
], a.prototype, "srcset", 2);
|
|
912
|
+
l([
|
|
785
913
|
p({ reflect: !0, type: String })
|
|
786
|
-
],
|
|
787
|
-
|
|
914
|
+
], a.prototype, "sizes", 2);
|
|
915
|
+
l([
|
|
788
916
|
p({ reflect: !0, type: String })
|
|
789
|
-
],
|
|
790
|
-
|
|
917
|
+
], a.prototype, "placeholder", 2);
|
|
918
|
+
l([
|
|
791
919
|
p({ reflect: !0, type: String })
|
|
792
|
-
],
|
|
793
|
-
|
|
920
|
+
], a.prototype, "alt", 2);
|
|
921
|
+
l([
|
|
794
922
|
p({ attribute: "object-fit", reflect: !0 })
|
|
795
|
-
],
|
|
796
|
-
|
|
923
|
+
], a.prototype, "objectFit", 2);
|
|
924
|
+
l([
|
|
925
|
+
p({ attribute: "crop-focus", reflect: !0 })
|
|
926
|
+
], a.prototype, "cropFocus", 2);
|
|
927
|
+
l([
|
|
797
928
|
p({ reflect: !0, type: Boolean })
|
|
798
|
-
],
|
|
799
|
-
|
|
929
|
+
], a.prototype, "skeleton", 2);
|
|
930
|
+
l([
|
|
800
931
|
p({ reflect: !0, type: Boolean })
|
|
801
|
-
],
|
|
802
|
-
|
|
932
|
+
], a.prototype, "fallback", 2);
|
|
933
|
+
l([
|
|
803
934
|
p({ attribute: "can-zoom", reflect: !0, type: Boolean })
|
|
804
|
-
],
|
|
805
|
-
|
|
935
|
+
], a.prototype, "canZoom", 2);
|
|
936
|
+
l([
|
|
806
937
|
p({ reflect: !0, type: Boolean })
|
|
807
|
-
],
|
|
808
|
-
|
|
938
|
+
], a.prototype, "loading", 2);
|
|
939
|
+
l([
|
|
809
940
|
p({ reflect: !0, type: Boolean })
|
|
810
|
-
],
|
|
811
|
-
|
|
941
|
+
], a.prototype, "block", 2);
|
|
942
|
+
l([
|
|
812
943
|
p({ attribute: "html-loading", reflect: !0, type: String })
|
|
813
|
-
],
|
|
814
|
-
|
|
944
|
+
], a.prototype, "htmlLoading", 2);
|
|
945
|
+
l([
|
|
815
946
|
p({ attribute: "no-crossorigin", reflect: !0, type: Boolean })
|
|
816
|
-
],
|
|
817
|
-
|
|
947
|
+
], a.prototype, "noCrossorigin", 2);
|
|
948
|
+
l([
|
|
818
949
|
p({ attribute: "click-handler-type", reflect: !0, type: String })
|
|
819
|
-
],
|
|
820
|
-
|
|
950
|
+
], a.prototype, "clickHandlerType", 2);
|
|
951
|
+
l([
|
|
821
952
|
p({ attribute: "retry-on-error", reflect: !0, type: Boolean })
|
|
822
|
-
],
|
|
823
|
-
|
|
953
|
+
], a.prototype, "retryOnError", 2);
|
|
954
|
+
l([
|
|
824
955
|
p({ attribute: "max-retries", type: Number })
|
|
825
|
-
],
|
|
826
|
-
|
|
956
|
+
], a.prototype, "maxRetries", 2);
|
|
957
|
+
l([
|
|
827
958
|
E()
|
|
828
|
-
],
|
|
829
|
-
|
|
959
|
+
], a.prototype, "isZoomed", 2);
|
|
960
|
+
l([
|
|
830
961
|
E()
|
|
831
|
-
],
|
|
832
|
-
|
|
962
|
+
], a.prototype, "imageRatio", 2);
|
|
963
|
+
l([
|
|
833
964
|
E()
|
|
834
|
-
],
|
|
835
|
-
|
|
965
|
+
], a.prototype, "parsedAlt", 2);
|
|
966
|
+
l([
|
|
836
967
|
E()
|
|
837
|
-
],
|
|
838
|
-
|
|
968
|
+
], a.prototype, "parsedAltDarkMode", 2);
|
|
969
|
+
l([
|
|
839
970
|
M("isLoaded"),
|
|
840
971
|
M("canZoom", { waitUntilFirstUpdate: !0 })
|
|
841
|
-
],
|
|
842
|
-
|
|
972
|
+
], a.prototype, "handleCanZoomChange", 1);
|
|
973
|
+
l([
|
|
843
974
|
M("objectFit", { waitUntilFirstUpdate: !0 })
|
|
844
|
-
],
|
|
845
|
-
|
|
975
|
+
], a.prototype, "handleObjectFitChange", 1);
|
|
976
|
+
l([
|
|
846
977
|
M("src"),
|
|
847
978
|
M("srcDarkMode")
|
|
848
|
-
],
|
|
849
|
-
|
|
979
|
+
], a.prototype, "handleSrcChange", 1);
|
|
980
|
+
l([
|
|
850
981
|
Oe(100)
|
|
851
|
-
],
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
],
|
|
982
|
+
], a.prototype, "updateLastPatchedWidth", 1);
|
|
983
|
+
a = l([
|
|
984
|
+
Te("cx-image")
|
|
985
|
+
], a);
|
|
855
986
|
export {
|
|
856
|
-
|
|
987
|
+
a as C,
|
|
857
988
|
I as a
|
|
858
989
|
};
|