@cntrl-site/components 1.0.116-alpha.0 → 1.0.116
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/dist/{Burger-DyORh_vF.mjs → Burger-BkVgNMGU.mjs} +1 -1
- package/dist/{Burger-B4kXX9aY.js → Burger-C3yVbQcq.js} +1 -1
- package/dist/Chronicles-BNvvaFYY.mjs +744 -0
- package/dist/Chronicles-Dj1gvNjE.js +196 -0
- package/dist/{ChroniclesComponent-jh4v7wp6.mjs → ChroniclesComponent-0ZWBPdbh.mjs} +542 -491
- package/dist/ChroniclesComponent-D4_6w8f7.js +1 -0
- package/dist/Components/Chronicles/Chronicles.d.ts +7 -1
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +26 -2
- package/dist/Components/LightboxJournal/LightboxJournal.d.ts +1 -0
- package/dist/Components/LightboxStrip/LightboxStrip.d.ts +1 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +0 -7
- package/dist/{ControlSlider-DB4nbVLT.js → ControlSlider-C8ckUIDm.js} +1 -1
- package/dist/{ControlSlider-3w-bHQEg.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
- package/dist/{FAQ-GmiwRdFq.mjs → FAQ-CJHCMSBa.mjs} +1 -1
- package/dist/{FAQ-7HEkaoU6.js → FAQ-DLh63Utr.js} +1 -1
- package/dist/{Grid-BzarI5Mc.js → Grid-OvzWvUW9.js} +1 -1
- package/dist/{Grid-Z2JZyUdC.mjs → Grid-t07NDMzY.mjs} +1 -1
- package/dist/{Hive-34KvKNsa.js → Hive-CzabuuCc.js} +1 -1
- package/dist/{Hive-7xHXyMM1.mjs → Hive-DyxYd5eg.mjs} +1 -1
- package/dist/{HiveLightboxTitles-BCoL46-V.mjs → HiveLightboxTitles-DhEeFKWs.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DEeyQGcf.js → HiveLightboxTitles-DlyptAaK.js} +1 -1
- package/dist/{Lightbox-DzPqgKP4.mjs → Lightbox-BY99NS14.mjs} +1 -1
- package/dist/{Lightbox-Cb7lyaNt.js → Lightbox-DZckgBzK.js} +1 -1
- package/dist/LightboxJournal-Bmw2zm4t.js +549 -0
- package/dist/{LightboxJournal-C_q7_s-B.mjs → LightboxJournal-gePVKQJ4.mjs} +429 -403
- package/dist/{LightboxStrip-BrNj7ipX.mjs → LightboxStrip-BPQiQhd3.mjs} +461 -435
- package/dist/LightboxStrip-CTxRwLYk.js +412 -0
- package/dist/{Mercury-BmhtFYOw.js → Mercury-B-s2Kvuq.js} +1 -1
- package/dist/{Mercury-Q788wrYQ.mjs → Mercury-CCW0Es-s.mjs} +1 -1
- package/dist/{OnelinerForm-D8WIB9Qy.mjs → OnelinerForm-BEu7_sho.mjs} +1 -1
- package/dist/{OnelinerForm-CUmY-bXL.js → OnelinerForm-C2Y_XMCY.js} +1 -1
- package/dist/{SimpleButton-DTpzfmb6.mjs → SimpleButton-C-o2W9bS.mjs} +1 -1
- package/dist/{SimpleButton-DtaCYa3y.js → SimpleButton-nGEcO2gB.js} +1 -1
- package/dist/{Slider20-q0iGgnE3.js → Slider20-BOmjDRf2.js} +1 -1
- package/dist/{Slider20-CKngROrc.mjs → Slider20-DUi6qwnd.mjs} +1 -1
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/{TestimonialSingle-CpEUendN.js → TestimonialSingle-BORQom3u.js} +1 -1
- package/dist/{TestimonialSingle-Bax71Hyo.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
- package/dist/{Waterfall-znaoynn5.mjs → Waterfall-3kKioKh2.mjs} +1 -1
- package/dist/{Waterfall-B9YWMhrg.js → Waterfall-DII4-WV5.js} +1 -1
- package/dist/components-B8MjlzLL.js +1 -0
- package/dist/{components-C9Fu28pp.mjs → components-BQjon_-7.mjs} +29 -653
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +23 -24
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +38 -61
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/sources.js +124 -25
- package/dist/sources.mjs +131 -32
- package/dist/types/Component.d.ts +0 -7
- package/dist/types/SchemaV1.d.ts +3 -3
- package/package.json +1 -1
- package/dist/Chronicles-Cy2h3jlZ.mjs +0 -724
- package/dist/Chronicles-D0ojQzOP.js +0 -196
- package/dist/ChroniclesComponent-DYPJBI3d.js +0 -1
- package/dist/Components/PopupMenu/PopupMenu.d.ts +0 -73
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +0 -594
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +0 -203
- package/dist/Components/PopupMenu/popupMenuSnap.d.ts +0 -61
- package/dist/LightboxJournal-BFF5aKRz.js +0 -523
- package/dist/LightboxStrip-CC2e0_9A.js +0 -386
- package/dist/PopupMenu-CYdDyzEt.mjs +0 -1372
- package/dist/PopupMenu-Di1fHgho.js +0 -409
- package/dist/SvgImage-CwRq9-ec.mjs +0 -56
- package/dist/SvgImage-_QN8ngad.js +0 -1
- package/dist/components-6QFLq5OI.js +0 -1
- package/dist/loadSvgMaskUrl-B6kHUyof.js +0 -1
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +0 -39
package/dist/elements.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var d=(e,n,
|
|
1
|
+
"use strict";var h=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var d=(e,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of c(r))!f.call(e,i)&&i!==n&&a(e,i,{get:()=>r[i],enumerable:!(o=u(r,i))||o.enumerable});return e};var t=(e,r,n)=>(n=e!=null?h(g(e)):{},d(r||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m={"basic-burger":()=>import(/* webpackFetchPriority: "high" */ "./Burger-C3yVbQcq.js").then(e=>e.Burger),chronicles:()=>import(/* webpackFetchPriority: "high" */ "./Chronicles-Dj1gvNjE.js").then(e=>e.Chronicles),"click-gallerie":()=>import(/* webpackFetchPriority: "high" */ "./ClickGallerie-DYbc-rDp.js").then(e=>e.ClickGallerie),"control-slider":()=>import(/* webpackFetchPriority: "high" */ "./ControlSlider-C8ckUIDm.js").then(e=>e.ControlSlider),faq:()=>import(/* webpackFetchPriority: "high" */ "./FAQ-DLh63Utr.js").then(e=>e.FAQ),form:()=>import(/* webpackFetchPriority: "high" */ "./Form-Dn-6A1He.js").then(e=>e.Form),grid:()=>import(/* webpackFetchPriority: "high" */ "./Grid-OvzWvUW9.js").then(e=>e.Grid),helix:()=>import(/* webpackFetchPriority: "high" */ "./Helix-BpLo9FD3.js").then(e=>e.Helix),hive:()=>import(/* webpackFetchPriority: "high" */ "./Hive-CzabuuCc.js").then(e=>e.Hive),"control-image-reveal":()=>import(/* webpackFetchPriority: "high" */ "./ImageRevealSlider-DlxudBUy.js").then(e=>e.ImageRevealSlider),lightbox:()=>import(/* webpackFetchPriority: "high" */ "./Lightbox-DZckgBzK.js").then(e=>e.LightboxGallery),"lightbox-journal":()=>import(/* webpackFetchPriority: "high" */ "./LightboxJournal-Bmw2zm4t.js").then(e=>e.LightboxJournal),"lightbox-strip":()=>import(/* webpackFetchPriority: "high" */ "./LightboxStrip-CTxRwLYk.js").then(e=>e.LightboxStrip),list:()=>import(/* webpackFetchPriority: "high" */ "./List-DVvpQ24J.js").then(e=>e.List),marquee:()=>import(/* webpackFetchPriority: "high" */ "./Marquee-DDKigLBo.js").then(e=>e.Marquee),"marquee-text":()=>import(/* webpackFetchPriority: "high" */ "./MarqueeText-B5hqB0HA.js").then(e=>e.MarqueeText),mercury:()=>import(/* webpackFetchPriority: "high" */ "./Mercury-B-s2Kvuq.js").then(e=>e.Mercury),"oneliner-form":()=>import(/* webpackFetchPriority: "high" */ "./OnelinerForm-C2Y_XMCY.js").then(e=>e.OnelinerForm),pretext:()=>import(/* webpackFetchPriority: "high" */ "./Pretext-DvQ3xsni.js").then(e=>e.Pretext),scale:()=>import(/* webpackFetchPriority: "high" */ "./Scale-Bg3bGICG.js").then(e=>e.Scale),"simple-button":()=>import(/* webpackFetchPriority: "high" */ "./SimpleButton-nGEcO2gB.js").then(e=>e.SimpleButton),"slider-2-0":()=>import(/* webpackFetchPriority: "high" */ "./Slider20-BOmjDRf2.js").then(e=>e.Slider20),testimonials:()=>import(/* webpackFetchPriority: "high" */ "./TestimonialGrid-BHZazEVX.js").then(e=>e.TestimonialGrid),"testimonial-single":()=>import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-BORQom3u.js").then(e=>e.TestimonialSingle),waterfall:()=>import(/* webpackFetchPriority: "high" */ "./Waterfall-DII4-WV5.js").then(e=>e.Waterfall)},b=Object.keys(m),y=3,E=2e3,s=new Map,l=new Map;function p(e){return Object.prototype.hasOwnProperty.call(m,e)}function x(e){return s.get(e)}function C(e){var r;return(((r=l.get(e))==null?void 0:r.failures)??0)>0}const S=e=>!e.loading&&e.failures>0&&e.failures<y&&Date.now()>=e.retryAt;function M(e){if(!p(e))return Promise.resolve(void 0);const r=l.get(e);if(r&&!S(r))return r.request;const n={loading:!0,failures:(r==null?void 0:r.failures)??0,retryAt:0,request:m[e]().then(o=>(s.set(e,o),n.failures=0,o),o=>{throw n.failures+=1,n.retryAt=Date.now()+E*2**(n.failures-1),o}).finally(()=>{n.loading=!1})};return l.set(e,n),n.request}exports.componentElementIds=b;exports.getComponentElement=x;exports.hasComponentElement=p;exports.hasComponentElementFailed=C;exports.loadComponentElement=M;
|
package/dist/elements.mjs
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
const i = {
|
|
2
|
-
"basic-burger": () => import(/* webpackFetchPriority: "high" */ "./Burger-
|
|
3
|
-
chronicles: () => import(/* webpackFetchPriority: "high" */ "./Chronicles-
|
|
2
|
+
"basic-burger": () => import(/* webpackFetchPriority: "high" */ "./Burger-BkVgNMGU.mjs").then((e) => e.Burger),
|
|
3
|
+
chronicles: () => import(/* webpackFetchPriority: "high" */ "./Chronicles-BNvvaFYY.mjs").then((e) => e.Chronicles),
|
|
4
4
|
"click-gallerie": () => import(/* webpackFetchPriority: "high" */ "./ClickGallerie-Cjc_1Gxy.mjs").then((e) => e.ClickGallerie),
|
|
5
|
-
"control-slider": () => import(/* webpackFetchPriority: "high" */ "./ControlSlider-
|
|
6
|
-
faq: () => import(/* webpackFetchPriority: "high" */ "./FAQ-
|
|
5
|
+
"control-slider": () => import(/* webpackFetchPriority: "high" */ "./ControlSlider-DqKfaKMG.mjs").then((e) => e.ControlSlider),
|
|
6
|
+
faq: () => import(/* webpackFetchPriority: "high" */ "./FAQ-CJHCMSBa.mjs").then((e) => e.FAQ),
|
|
7
7
|
form: () => import(/* webpackFetchPriority: "high" */ "./Form-BX5_41nb.mjs").then((e) => e.Form),
|
|
8
|
-
grid: () => import(/* webpackFetchPriority: "high" */ "./Grid-
|
|
8
|
+
grid: () => import(/* webpackFetchPriority: "high" */ "./Grid-t07NDMzY.mjs").then((e) => e.Grid),
|
|
9
9
|
helix: () => import(/* webpackFetchPriority: "high" */ "./Helix-CidI3ucE.mjs").then((e) => e.Helix),
|
|
10
|
-
hive: () => import(/* webpackFetchPriority: "high" */ "./Hive-
|
|
10
|
+
hive: () => import(/* webpackFetchPriority: "high" */ "./Hive-DyxYd5eg.mjs").then((e) => e.Hive),
|
|
11
11
|
"control-image-reveal": () => import(/* webpackFetchPriority: "high" */ "./ImageRevealSlider-DifEXySR.mjs").then((e) => e.ImageRevealSlider),
|
|
12
|
-
lightbox: () => import(/* webpackFetchPriority: "high" */ "./Lightbox-
|
|
13
|
-
"lightbox-journal": () => import(/* webpackFetchPriority: "high" */ "./LightboxJournal-
|
|
14
|
-
"lightbox-strip": () => import(/* webpackFetchPriority: "high" */ "./LightboxStrip-
|
|
12
|
+
lightbox: () => import(/* webpackFetchPriority: "high" */ "./Lightbox-BY99NS14.mjs").then((e) => e.LightboxGallery),
|
|
13
|
+
"lightbox-journal": () => import(/* webpackFetchPriority: "high" */ "./LightboxJournal-gePVKQJ4.mjs").then((e) => e.LightboxJournal),
|
|
14
|
+
"lightbox-strip": () => import(/* webpackFetchPriority: "high" */ "./LightboxStrip-BPQiQhd3.mjs").then((e) => e.LightboxStrip),
|
|
15
15
|
list: () => import(/* webpackFetchPriority: "high" */ "./List-Bh_-l9vD.mjs").then((e) => e.List),
|
|
16
16
|
marquee: () => import(/* webpackFetchPriority: "high" */ "./Marquee-_xVuf-zp.mjs").then((e) => e.Marquee),
|
|
17
17
|
"marquee-text": () => import(/* webpackFetchPriority: "high" */ "./MarqueeText-C2E6UDsb.mjs").then((e) => e.MarqueeText),
|
|
18
|
-
mercury: () => import(/* webpackFetchPriority: "high" */ "./Mercury-
|
|
19
|
-
"oneliner-form": () => import(/* webpackFetchPriority: "high" */ "./OnelinerForm-
|
|
20
|
-
"popup-menu": () => import(/* webpackFetchPriority: "high" */ "./PopupMenu-CYdDyzEt.mjs").then((e) => e.A).then((e) => e.PopupMenu),
|
|
18
|
+
mercury: () => import(/* webpackFetchPriority: "high" */ "./Mercury-CCW0Es-s.mjs").then((e) => e.Mercury),
|
|
19
|
+
"oneliner-form": () => import(/* webpackFetchPriority: "high" */ "./OnelinerForm-BEu7_sho.mjs").then((e) => e.OnelinerForm),
|
|
21
20
|
pretext: () => import(/* webpackFetchPriority: "high" */ "./Pretext-10CcyP1E.mjs").then((e) => e.Pretext),
|
|
22
21
|
scale: () => import(/* webpackFetchPriority: "high" */ "./Scale-TnkWtRrs.mjs").then((e) => e.Scale),
|
|
23
|
-
"simple-button": () => import(/* webpackFetchPriority: "high" */ "./SimpleButton-
|
|
24
|
-
"slider-2-0": () => import(/* webpackFetchPriority: "high" */ "./Slider20-
|
|
22
|
+
"simple-button": () => import(/* webpackFetchPriority: "high" */ "./SimpleButton-C-o2W9bS.mjs").then((e) => e.SimpleButton),
|
|
23
|
+
"slider-2-0": () => import(/* webpackFetchPriority: "high" */ "./Slider20-DUi6qwnd.mjs").then((e) => e.Slider20),
|
|
25
24
|
testimonials: () => import(/* webpackFetchPriority: "high" */ "./TestimonialGrid-C-8IDzWu.mjs").then((e) => e.TestimonialGrid),
|
|
26
|
-
"testimonial-single": () => import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-
|
|
27
|
-
waterfall: () => import(/* webpackFetchPriority: "high" */ "./Waterfall-
|
|
28
|
-
},
|
|
29
|
-
function
|
|
25
|
+
"testimonial-single": () => import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-DrnyReim.mjs").then((e) => e.TestimonialSingle),
|
|
26
|
+
waterfall: () => import(/* webpackFetchPriority: "high" */ "./Waterfall-3kKioKh2.mjs").then((e) => e.Waterfall)
|
|
27
|
+
}, p = Object.keys(i), a = 3, m = 2e3, l = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
28
|
+
function s(e) {
|
|
30
29
|
return Object.prototype.hasOwnProperty.call(i, e);
|
|
31
30
|
}
|
|
32
31
|
function u(e) {
|
|
@@ -36,11 +35,11 @@ function c(e) {
|
|
|
36
35
|
var t;
|
|
37
36
|
return (((t = o.get(e)) == null ? void 0 : t.failures) ?? 0) > 0;
|
|
38
37
|
}
|
|
39
|
-
const
|
|
38
|
+
const h = (e) => !e.loading && e.failures > 0 && e.failures < a && Date.now() >= e.retryAt;
|
|
40
39
|
function f(e) {
|
|
41
|
-
if (!
|
|
40
|
+
if (!s(e)) return Promise.resolve(void 0);
|
|
42
41
|
const t = o.get(e);
|
|
43
|
-
if (t && !
|
|
42
|
+
if (t && !h(t)) return t.request;
|
|
44
43
|
const r = {
|
|
45
44
|
loading: !0,
|
|
46
45
|
failures: (t == null ? void 0 : t.failures) ?? 0,
|
|
@@ -48,7 +47,7 @@ function f(e) {
|
|
|
48
47
|
request: i[e]().then(
|
|
49
48
|
(n) => (l.set(e, n), r.failures = 0, n),
|
|
50
49
|
(n) => {
|
|
51
|
-
throw r.failures += 1, r.retryAt = Date.now() +
|
|
50
|
+
throw r.failures += 1, r.retryAt = Date.now() + m * 2 ** (r.failures - 1), n;
|
|
52
51
|
}
|
|
53
52
|
).finally(() => {
|
|
54
53
|
r.loading = !1;
|
|
@@ -57,9 +56,9 @@ function f(e) {
|
|
|
57
56
|
return o.set(e, r), r.request;
|
|
58
57
|
}
|
|
59
58
|
export {
|
|
60
|
-
|
|
59
|
+
p as componentElementIds,
|
|
61
60
|
u as getComponentElement,
|
|
62
|
-
|
|
61
|
+
s as hasComponentElement,
|
|
63
62
|
c as hasComponentElementFailed,
|
|
64
63
|
f as loadComponentElement
|
|
65
64
|
};
|
package/dist/elements.node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-B8MjlzLL.js"),n=new Map(t.components.map(e=>[e.id,e.element])),o=[...n.keys()];function m(e){return n.has(e)}function l(e){return n.get(e)}function s(e){return!1}function r(e){return Promise.resolve(n.get(e))}exports.componentElementIds=o;exports.getComponentElement=l;exports.hasComponentElement=m;exports.hasComponentElementFailed=s;exports.loadComponentElement=r;
|
package/dist/elements.node.mjs
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentDefaultNavigationPosition, type ComponentNavigationPosition, type
|
|
2
|
-
export type { ComponentSchemaV1, ComponentContentSchema, ComponentContentSettings, ComponentContentProperty, ContentKey, ContentLink, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaPanelAvailability, SchemaDisplay } from './types/SchemaV1';
|
|
1
|
+
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentDefaultNavigationPosition, type ComponentNavigationPosition, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
2
|
+
export type { ComponentSchemaV1, ComponentContentSchema, ComponentContentSettings, ComponentContentProperty, ContentKey, ContentFormat, ContentLink, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaPanelAvailability, SchemaDisplay } from './types/SchemaV1';
|
|
3
3
|
export { components } from './Components/components';
|
|
4
4
|
export { getPostFieldBindings } from './content/postFieldBindings';
|
|
5
5
|
export type { ContentValue, PostFieldBinding, PostFieldEntry, PostFieldPage } from './content/postFieldBindings';
|
|
6
6
|
export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './Components/utils/panelAvailability';
|
|
7
7
|
export type { PanelAvailabilityContext } from './Components/utils/panelAvailability';
|
|
8
8
|
export { nonForkableComponentIds } from './forking';
|
|
9
|
-
export { generatePopupMenuLayout, movePopupMenuBlock, resizePopupMenuBlock, settlePopupMenuLayout, snapPopupMenuTop, snapPopupMenuHeight, fitPopupMenuLayoutToGrid, isSamePopupMenuGrid, getPopupMenuHeight, getPopupMenuHeightPercent, getPopupMenuWidth, POPUP_MENU_ALIGNS, DEFAULT_POPUP_MENU_VIEWPORT_RATIO, getPopupMenuSides, getPopupMenuGrid, DEFAULT_POPUP_MENU_GRID, defaultPopupMenuLayoutRules, DEFAULT_POPUP_MENU_HEIGHT, getDefaultPopupMenuPlacement, getPopupMenuColumnEdges, getPopupMenuColumnWidth, getPopupMenuColumnsPlacement, getPopupMenuGridWidth, normalizePopupMenuLayout, toPopupMenuPlacement, } from './Components/PopupMenu/popupMenuLayout';
|
|
10
|
-
export type { PopupMenuAlign, PopupMenuBlockType, PopupMenuColumnPlacement, PopupMenuGrid, PopupMenuGridLayout, PopupMenuGridSettings, PopupMenuSides, PopupMenuSidesSetting, PopupMenuLayout, PopupMenuLayoutRules, PopupMenuMeasure, PopupMenuPlacement, PopupMenuSavedLayout } from './Components/PopupMenu/popupMenuLayout';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./components-B8MjlzLL.js"),s=require("./panelAvailability-DnOe0rQ4.js");function p(e){return e.type==="object"&&e.version===1}function o(e){return{assetId:e,name:"",type:"image",objectFit:"cover"}}function d(e,{text:n,images:t}){switch(e){case"media-pair-list-input":return t.map(l=>({media:[o(l),o("")]}));case"media-list-input":return t.map(o);case"media-input":return t.length>0?o(t[0]):{assetId:"",name:""};case"rich-text":return[{type:"paragraph",children:[{text:n}]}];case"link-input":return{type:"url",value:"",target:"self"};default:return n}}function m(e,n){var t;return n==="year"?((t=e.match(/\d{4}/))==null?void 0:t[0])??e:e}function g(e,{pageId:n,slug:t}){return e==="link-input"?{type:"page",value:n,target:"self"}:`/${t}`}function b(e){var t;const n=((t=e==null?void 0:e.items)==null?void 0:t.properties)??{};return Object.entries(n).map(([l,i])=>{var c;const u=(c=i.display)==null?void 0:c.type;return{fieldKey:l,...i.contentKey!==void 0?{contentKey:i.contentKey}:{},fromEntry:a=>d(u,{...a,text:m(a.text,i.contentFormat)}),toPage:a=>g(u,a)}})}const f=[r.ControlSliderComponent.id,r.ControlImageRevealSliderComponent.id,r.LightboxComponent.id];exports.components=r.components;exports.getAvailableStatePanels=s.getAvailableStatePanels;exports.getUnavailableStates=s.getUnavailableStates;exports.isPanelAvailable=s.isPanelAvailable;exports.getPostFieldBindings=b;exports.isSchemaV1=p;exports.nonForkableComponentIds=f;
|
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { c as
|
|
3
|
-
import { g as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return e.type === "object" && e.version === 1;
|
|
1
|
+
import { C as u, a as p, L as c } from "./components-BQjon_-7.mjs";
|
|
2
|
+
import { c as P } from "./components-BQjon_-7.mjs";
|
|
3
|
+
import { g as F, a as h, i as j } from "./panelAvailability-D179wwJx.mjs";
|
|
4
|
+
function y(t) {
|
|
5
|
+
return t.type === "object" && t.version === 1;
|
|
7
6
|
}
|
|
8
|
-
function
|
|
9
|
-
return { assetId:
|
|
7
|
+
function i(t) {
|
|
8
|
+
return { assetId: t, name: "", type: "image", objectFit: "cover" };
|
|
10
9
|
}
|
|
11
|
-
function
|
|
12
|
-
switch (
|
|
10
|
+
function d(t, { text: n, images: e }) {
|
|
11
|
+
switch (t) {
|
|
13
12
|
case "media-pair-list-input":
|
|
14
|
-
return
|
|
13
|
+
return e.map((o) => ({ media: [i(o), i("")] }));
|
|
15
14
|
case "media-list-input":
|
|
16
|
-
return
|
|
15
|
+
return e.map(i);
|
|
17
16
|
case "media-input":
|
|
18
|
-
return
|
|
17
|
+
return e.length > 0 ? i(e[0]) : { assetId: "", name: "" };
|
|
19
18
|
case "rich-text":
|
|
20
19
|
return [{ type: "paragraph", children: [{ text: n }] }];
|
|
21
20
|
case "link-input":
|
|
@@ -24,60 +23,38 @@ function m(e, { text: n, images: t }) {
|
|
|
24
23
|
return n;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
26
|
+
function m(t, n) {
|
|
27
|
+
var e;
|
|
28
|
+
return n === "year" ? ((e = t.match(/\d{4}/)) == null ? void 0 : e[0]) ?? t : t;
|
|
29
29
|
}
|
|
30
|
-
function f(e) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
function f(t, { pageId: n, slug: e }) {
|
|
31
|
+
return t === "link-input" ? { type: "page", value: n, target: "self" } : `/${e}`;
|
|
32
|
+
}
|
|
33
|
+
function v(t) {
|
|
34
|
+
var e;
|
|
35
|
+
const n = ((e = t == null ? void 0 : t.items) == null ? void 0 : e.properties) ?? {};
|
|
36
|
+
return Object.entries(n).map(([o, r]) => {
|
|
37
|
+
var s;
|
|
38
|
+
const l = (s = r.display) == null ? void 0 : s.type;
|
|
36
39
|
return {
|
|
37
40
|
fieldKey: o,
|
|
38
|
-
...
|
|
39
|
-
fromEntry: (
|
|
40
|
-
toPage: (
|
|
41
|
+
...r.contentKey !== void 0 ? { contentKey: r.contentKey } : {},
|
|
42
|
+
fromEntry: (a) => d(l, { ...a, text: m(a.text, r.contentFormat) }),
|
|
43
|
+
toPage: (a) => f(l, a)
|
|
41
44
|
};
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
d.id
|
|
47
|
+
const b = [
|
|
48
|
+
u.id,
|
|
49
|
+
p.id,
|
|
50
|
+
c.id
|
|
49
51
|
];
|
|
50
52
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
k as generatePopupMenuLayout,
|
|
59
|
-
C as getAvailableStatePanels,
|
|
60
|
-
D as getDefaultPopupMenuPlacement,
|
|
61
|
-
F as getPopupMenuColumnEdges,
|
|
62
|
-
x as getPopupMenuColumnWidth,
|
|
63
|
-
H as getPopupMenuColumnsPlacement,
|
|
64
|
-
N as getPopupMenuGrid,
|
|
65
|
-
R as getPopupMenuGridWidth,
|
|
66
|
-
j as getPopupMenuHeight,
|
|
67
|
-
W as getPopupMenuHeightPercent,
|
|
68
|
-
B as getPopupMenuSides,
|
|
69
|
-
K as getPopupMenuWidth,
|
|
70
|
-
f as getPostFieldBindings,
|
|
71
|
-
L as getUnavailableStates,
|
|
72
|
-
b as isPanelAvailable,
|
|
73
|
-
w as isSamePopupMenuGrid,
|
|
74
|
-
M as isSchemaV1,
|
|
75
|
-
z as movePopupMenuBlock,
|
|
76
|
-
y as nonForkableComponentIds,
|
|
77
|
-
V as normalizePopupMenuLayout,
|
|
78
|
-
q as resizePopupMenuBlock,
|
|
79
|
-
$ as settlePopupMenuLayout,
|
|
80
|
-
J as snapPopupMenuHeight,
|
|
81
|
-
Q as snapPopupMenuTop,
|
|
82
|
-
X as toPopupMenuPlacement
|
|
53
|
+
P as components,
|
|
54
|
+
F as getAvailableStatePanels,
|
|
55
|
+
v as getPostFieldBindings,
|
|
56
|
+
h as getUnavailableStates,
|
|
57
|
+
j as isPanelAvailable,
|
|
58
|
+
y as isSchemaV1,
|
|
59
|
+
b as nonForkableComponentIds
|
|
83
60
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=new Map;function s(t){return t.startsWith("data:")||t.startsWith("blob:")}function c(t){if(s(t))return Promise.resolve(t);const r=n.get(t);if(r)return r;const a=fetch(t,{mode:"cors",cache:"reload"}).then(e=>{if(!e.ok)throw new Error(String(e.status));return e.blob()}).then(e=>URL.createObjectURL(e)).catch(e=>{throw n.delete(t),e});return n.set(t,a),a}exports.isInlineMaskUrl=s;exports.loadSvgMaskUrl=c;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const n = /* @__PURE__ */ new Map();
|
|
2
|
+
function c(t) {
|
|
3
|
+
return t.startsWith("data:") || t.startsWith("blob:");
|
|
4
|
+
}
|
|
5
|
+
function o(t) {
|
|
6
|
+
if (c(t)) return Promise.resolve(t);
|
|
7
|
+
const r = n.get(t);
|
|
8
|
+
if (r) return r;
|
|
9
|
+
const a = fetch(t, { mode: "cors", cache: "reload" }).then((e) => {
|
|
10
|
+
if (!e.ok) throw new Error(String(e.status));
|
|
11
|
+
return e.blob();
|
|
12
|
+
}).then((e) => URL.createObjectURL(e)).catch((e) => {
|
|
13
|
+
throw n.delete(t), e;
|
|
14
|
+
});
|
|
15
|
+
return n.set(t, a), a;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
c as i,
|
|
19
|
+
o as l
|
|
20
|
+
};
|
package/dist/sources.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./ChroniclesComponent-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./ChroniclesComponent-D4_6w8f7.js"),e=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
2
2
|
import { CommonComponentProps } from '../props';
|
|
3
3
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
4
4
|
import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
|
|
@@ -2694,8 +2694,21 @@ import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
|
|
|
2694
2694
|
export const CHRONICLES_EXTRA_TITLE_KEYS = ['title2', 'title3', 'title4'] as const;
|
|
2695
2695
|
export const CHRONICLES_COLUMN_WIDTH_KEYS = ['column1Width', 'column2Width', 'column3Width', 'column4Width'] as const;
|
|
2696
2696
|
export const CHRONICLES_COLUMN_STYLE_PREFIXES = ['column1', 'column2', 'column3', 'column4', 'column5'] as const;
|
|
2697
|
+
export const CHRONICLES_COLUMN_KEYS = ['group', 'title', ...CHRONICLES_EXTRA_TITLE_KEYS] as const;
|
|
2698
|
+
export const CHRONICLES_COLUMN_LETTERS = ['A', 'B', 'C', 'D', 'E'] as const;
|
|
2697
2699
|
|
|
2698
|
-
|
|
2700
|
+
export type ChroniclesColumnKey = typeof CHRONICLES_COLUMN_KEYS[number];
|
|
2701
|
+
|
|
2702
|
+
export const CHRONICLES_COLUMN_STYLE_PREFIX_BY_KEY = Object.fromEntries(
|
|
2703
|
+
CHRONICLES_COLUMN_KEYS.map((key, index) => [key, CHRONICLES_COLUMN_STYLE_PREFIXES[index]]),
|
|
2704
|
+
) as Record<ChroniclesColumnKey, typeof CHRONICLES_COLUMN_STYLE_PREFIXES[number]>;
|
|
2705
|
+
|
|
2706
|
+
export function getChroniclesColumnsOrder(order: unknown): ChroniclesColumnKey[] {
|
|
2707
|
+
const saved = Array.isArray(order)
|
|
2708
|
+
? order.filter((key): key is ChroniclesColumnKey => (CHRONICLES_COLUMN_KEYS as readonly unknown[]).includes(key))
|
|
2709
|
+
: [];
|
|
2710
|
+
return [...new Set([...saved, ...CHRONICLES_COLUMN_KEYS])];
|
|
2711
|
+
}
|
|
2699
2712
|
|
|
2700
2713
|
const PANEL_POSITION_OFFSETS = {
|
|
2701
2714
|
center: { x: '50%', y: '50%' },
|
|
@@ -2739,7 +2752,7 @@ const COLOR_VAR_MAP = {
|
|
|
2739
2752
|
|
|
2740
2753
|
const PADDING_CONTROLS = [
|
|
2741
2754
|
{ side: 'top', axis: 'y', variant: 'row-padding' },
|
|
2742
|
-
{ side: 'bottom', axis: 'y', variant: 'row-padding',
|
|
2755
|
+
{ side: 'bottom', axis: 'y', variant: 'row-padding',},
|
|
2743
2756
|
{ side: 'left', axis: 'x', variant: 'column-padding', opposite: 'right' },
|
|
2744
2757
|
{ side: 'right', axis: 'x', variant: 'column-padding', opposite: 'left', reverse: true },
|
|
2745
2758
|
] as const;
|
|
@@ -2789,6 +2802,7 @@ type PrefixedTextStyle<Prefix extends string> = {
|
|
|
2789
2802
|
|
|
2790
2803
|
type ColumnLayoutSettings = Partial<Record<ColumnWidthKey, number>> & {
|
|
2791
2804
|
columns: number;
|
|
2805
|
+
columnsOrder?: string[];
|
|
2792
2806
|
columnGap: number;
|
|
2793
2807
|
panelWidth: number;
|
|
2794
2808
|
panelPadding: Padding;
|
|
@@ -2830,14 +2844,33 @@ export function getChroniclesEqualColumnWidths(settings: ColumnLayoutSettings):
|
|
|
2830
2844
|
return Object.fromEntries(CHRONICLES_COLUMN_WIDTH_KEYS.slice(0, settings.columns - 1).map((key) => [key, width]));
|
|
2831
2845
|
}
|
|
2832
2846
|
|
|
2833
|
-
export function
|
|
2847
|
+
export function applyChroniclesLayoutSettingsChange(
|
|
2834
2848
|
nextSettings: Record<string, any>,
|
|
2835
2849
|
prevSettings: Record<string, any>,
|
|
2836
2850
|
): Record<string, any> {
|
|
2837
|
-
|
|
2851
|
+
const merged = { ...prevSettings, ...nextSettings } as ColumnLayoutSettings;
|
|
2852
|
+
if (typeof nextSettings.columns === 'number' && nextSettings.columns !== prevSettings.columns) {
|
|
2853
|
+
return { ...nextSettings, ...getChroniclesEqualColumnWidths(merged) };
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
const nextOrder = getChroniclesColumnsOrder(nextSettings.columnsOrder);
|
|
2857
|
+
const prevOrder = getChroniclesColumnsOrder(prevSettings.columnsOrder);
|
|
2858
|
+
if (typeof merged.columns !== 'number' || nextOrder.every((key, index) => key === prevOrder[index])) {
|
|
2838
2859
|
return nextSettings;
|
|
2839
2860
|
}
|
|
2840
|
-
|
|
2861
|
+
|
|
2862
|
+
const prevWidths = resolveColumnWidths(merged);
|
|
2863
|
+
const prevShown = prevOrder.slice(0, merged.columns);
|
|
2864
|
+
const nextShown = nextOrder.slice(0, merged.columns);
|
|
2865
|
+
const freedWidths = prevShown.flatMap((key, slot) => (nextShown.includes(key) ? [] : [prevWidths[slot]]));
|
|
2866
|
+
const widths = nextShown.map((key) => {
|
|
2867
|
+
const prevSlot = prevShown.indexOf(key);
|
|
2868
|
+
return prevSlot >= 0 ? prevWidths[prevSlot] : freedWidths.shift() ?? 0;
|
|
2869
|
+
});
|
|
2870
|
+
return {
|
|
2871
|
+
...nextSettings,
|
|
2872
|
+
...Object.fromEntries(CHRONICLES_COLUMN_WIDTH_KEYS.slice(0, merged.columns - 1).map((key, slot) => [key, widths[slot]])),
|
|
2873
|
+
};
|
|
2841
2874
|
}
|
|
2842
2875
|
|
|
2843
2876
|
function resolveColumnWidths(settings: ColumnLayoutSettings): number[] {
|
|
@@ -2856,11 +2889,11 @@ function getGridTemplateColumns(widths: number[]): string {
|
|
|
2856
2889
|
return widths.map((width) => \`minmax(0, \${total > 0 ? (width / total) * 100 : 1}fr)\`).join(' ');
|
|
2857
2890
|
}
|
|
2858
2891
|
|
|
2859
|
-
//
|
|
2860
|
-
function groupRows(items: ChroniclesItem[]): ChroniclesGroup[] {
|
|
2892
|
+
// The first column groups the rows: a row with it empty continues the group above it.
|
|
2893
|
+
function groupRows(items: ChroniclesItem[], groupKey: ChroniclesColumnKey): ChroniclesGroup[] {
|
|
2861
2894
|
const groups: ChroniclesGroup[] = [];
|
|
2862
2895
|
items.forEach((item, index) => {
|
|
2863
|
-
const label = item
|
|
2896
|
+
const label = item[groupKey]?.trim() ?? '';
|
|
2864
2897
|
const current = groups[groups.length - 1];
|
|
2865
2898
|
if (!current || (label !== '' && label !== current.label)) {
|
|
2866
2899
|
groups.push({ label, rows: [{ item, index }] });
|
|
@@ -3292,11 +3325,13 @@ export function Chronicles({
|
|
|
3292
3325
|
const scopedCss = useMemo(() => getCSS(P), [P]);
|
|
3293
3326
|
const panelOffset = PANEL_POSITION_OFFSETS[panelPosition];
|
|
3294
3327
|
const columnWidths = resolveColumnWidths(settings);
|
|
3295
|
-
const
|
|
3328
|
+
const shownKeys = getChroniclesColumnsOrder(settings.columnsOrder).slice(0, columns);
|
|
3296
3329
|
const hasGroupColumn = columns > 1;
|
|
3330
|
+
const groupKey = shownKeys[0];
|
|
3331
|
+
const rowKeys = hasGroupColumn ? shownKeys.slice(1) : shownKeys;
|
|
3297
3332
|
const groups = useMemo<ChroniclesGroup[]>(() => (
|
|
3298
|
-
hasGroupColumn ? groupRows(items) : [{ label: '', rows: items.map((item, index) => ({ item, index })) }]
|
|
3299
|
-
), [items, hasGroupColumn]);
|
|
3333
|
+
hasGroupColumn ? groupRows(items, groupKey) : [{ label: '', rows: items.map((item, index) => ({ item, index })) }]
|
|
3334
|
+
), [items, hasGroupColumn, groupKey]);
|
|
3300
3335
|
|
|
3301
3336
|
const activeMedia = activeIndex === null ? [] : getRowMedia(items[activeIndex]);
|
|
3302
3337
|
const shownAsset = activeMedia[activeMediaIndex];
|
|
@@ -3479,9 +3514,11 @@ export function Chronicles({
|
|
|
3479
3514
|
};
|
|
3480
3515
|
|
|
3481
3516
|
const triggerTypographyCss = omitTextColors(textStylesToCss(resolveTextStyle(settings, 'trigger'), isEditor));
|
|
3482
|
-
|
|
3483
|
-
|
|
3517
|
+
// one per shown column, in slot order
|
|
3518
|
+
const columnTypographyCss = shownKeys.map((key) => (
|
|
3519
|
+
omitTextColors(textStylesToCss(resolveTextStyle(settings, CHRONICLES_COLUMN_STYLE_PREFIX_BY_KEY[key]), isEditor))
|
|
3484
3520
|
));
|
|
3521
|
+
const rowTypographyCss = hasGroupColumn ? columnTypographyCss.slice(1) : columnTypographyCss;
|
|
3485
3522
|
const labelLineHeight = columnTypographyCss[0].lineHeight;
|
|
3486
3523
|
const titleLineHeight = columnTypographyCss[1]?.lineHeight;
|
|
3487
3524
|
const groupLabelOffset = labelLineHeight !== undefined && titleLineHeight !== undefined
|
|
@@ -3560,7 +3597,6 @@ export function Chronicles({
|
|
|
3560
3597
|
data-controls="groupGap"
|
|
3561
3598
|
data-controls-paired=""
|
|
3562
3599
|
data-controls-axis="y"
|
|
3563
|
-
data-controls-reverse=""
|
|
3564
3600
|
data-controls-min="0"
|
|
3565
3601
|
className={\`\${P}-control-anchor\`}
|
|
3566
3602
|
style={{ left: 0, width: '100%', height: scaled(Math.max(groupGap, MIN_HANDLE_SIZE)) }}
|
|
@@ -3600,11 +3636,8 @@ export function Chronicles({
|
|
|
3600
3636
|
{...linkProps}
|
|
3601
3637
|
{...hoverProps}
|
|
3602
3638
|
>
|
|
3603
|
-
{
|
|
3604
|
-
<div className={\`\${P}-title\`} style={
|
|
3605
|
-
)}
|
|
3606
|
-
{titleKeys.map((key, titleIndex) => (
|
|
3607
|
-
<div key={key} className={\`\${P}-title\`} style={columnTypographyCss[titleIndex + 1]}>{item[key]}</div>
|
|
3639
|
+
{rowKeys.map((key, cellIndex) => (
|
|
3640
|
+
<div key={key} className={\`\${P}-title\`} style={rowTypographyCss[cellIndex]}>{item[key]}</div>
|
|
3608
3641
|
))}
|
|
3609
3642
|
</RowElement>
|
|
3610
3643
|
);
|
|
@@ -10994,6 +11027,11 @@ import { getAspectRatio, isImageRatioCover, type ImageRatioFit } from '../utils/
|
|
|
10994
11027
|
import { LightboxOverlay } from './LightboxOverlay';
|
|
10995
11028
|
import { buildJournalSlides, findJournalUrlSlideNumber, getEntryImages, hasJournalUrlParam, removeJournalUrlParam, setJournalUrlParam, slideNumberToIndex } from './utils';
|
|
10996
11029
|
|
|
11030
|
+
const HOVER_ANIM_MS = 400;
|
|
11031
|
+
const HOVER_EASING = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
|
|
11032
|
+
const HOVER_ZOOM = 1.1;
|
|
11033
|
+
const HOVER_ZOOM_INSET = \`\${(((1 - 1 / HOVER_ZOOM) / 2) * 100).toFixed(4)}%\`;
|
|
11034
|
+
|
|
10997
11035
|
function getCSS(P: string): string {
|
|
10998
11036
|
return \`
|
|
10999
11037
|
.\${P}-wrapper {
|
|
@@ -11040,6 +11078,32 @@ function getCSS(P: string): string {
|
|
|
11040
11078
|
max-width: 100%;
|
|
11041
11079
|
}
|
|
11042
11080
|
|
|
11081
|
+
.\${P}-hover-zoom-in .\${P}-cover-image {
|
|
11082
|
+
clip-path: inset(0);
|
|
11083
|
+
transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING}, clip-path \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11084
|
+
}
|
|
11085
|
+
|
|
11086
|
+
.\${P}-hover-scale-down .\${P}-cover-image {
|
|
11087
|
+
transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11088
|
+
}
|
|
11089
|
+
|
|
11090
|
+
.\${P}-hover-greyscale .\${P}-cover-image {
|
|
11091
|
+
transition: filter \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11092
|
+
}
|
|
11093
|
+
|
|
11094
|
+
@media (hover: hover) {
|
|
11095
|
+
.\${P}-hover-zoom-in .\${P}-cover:hover .\${P}-cover-image {
|
|
11096
|
+
transform: scale(\${HOVER_ZOOM});
|
|
11097
|
+
clip-path: inset(\${HOVER_ZOOM_INSET});
|
|
11098
|
+
}
|
|
11099
|
+
.\${P}-hover-scale-down .\${P}-cover:hover .\${P}-cover-image {
|
|
11100
|
+
transform: scale(0.9);
|
|
11101
|
+
}
|
|
11102
|
+
.\${P}-hover-greyscale .\${P}-cover:hover .\${P}-cover-image {
|
|
11103
|
+
filter: grayscale(1);
|
|
11104
|
+
}
|
|
11105
|
+
}
|
|
11106
|
+
|
|
11043
11107
|
.\${P}-lightbox {
|
|
11044
11108
|
position: fixed;
|
|
11045
11109
|
inset: 0;
|
|
@@ -11545,7 +11609,8 @@ type LightboxJournalProps = {
|
|
|
11545
11609
|
export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId, metadata }: LightboxJournalProps) => {
|
|
11546
11610
|
const { prefix: P } = useScopedStyles();
|
|
11547
11611
|
const itemId = metadata?.itemId ?? null;
|
|
11548
|
-
const { cover, coverFit, type } = settings;
|
|
11612
|
+
const { cover, coverFit, type, hover = 'none' } = settings;
|
|
11613
|
+
const hoverEffectClass = hover !== 'none' && (!isEditor || isPreviewMode) ? \` \${P}-hover-\${hover}\` : '';
|
|
11549
11614
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
11550
11615
|
const [lightboxOpen, setLightboxOpen] = useState(false);
|
|
11551
11616
|
const [lightboxInitialSlideIndex, setLightboxInitialSlideIndex] = useState(0);
|
|
@@ -11638,7 +11703,7 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
|
|
|
11638
11703
|
|
|
11639
11704
|
return (
|
|
11640
11705
|
<>
|
|
11641
|
-
<div ref={wrapperRef} className={\`\${P}-wrapper\`}>
|
|
11706
|
+
<div ref={wrapperRef} className={\`\${P}-wrapper\${hoverEffectClass}\`}>
|
|
11642
11707
|
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
11643
11708
|
{cover ? (
|
|
11644
11709
|
<button
|
|
@@ -11692,6 +11757,7 @@ export const LightboxJournal = ({ settings, content, isEditor, isEditMode, isPre
|
|
|
11692
11757
|
export type LightboxJournalSettings = {
|
|
11693
11758
|
cover: string | null;
|
|
11694
11759
|
coverFit: ImageRatioFit;
|
|
11760
|
+
hover?: 'none' | 'zoom-in' | 'greyscale' | 'scale-down';
|
|
11695
11761
|
type: 'A' | 'B';
|
|
11696
11762
|
maxWidth: number;
|
|
11697
11763
|
maxHeight: number;
|
|
@@ -11775,6 +11841,11 @@ export type {
|
|
|
11775
11841
|
StripTitleWidthKey,
|
|
11776
11842
|
} from './utils';
|
|
11777
11843
|
|
|
11844
|
+
const HOVER_ANIM_MS = 400;
|
|
11845
|
+
const HOVER_EASING = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
|
|
11846
|
+
const HOVER_ZOOM = 1.1;
|
|
11847
|
+
const HOVER_ZOOM_INSET = \`\${(((1 - 1 / HOVER_ZOOM) / 2) * 100).toFixed(4)}%\`;
|
|
11848
|
+
|
|
11778
11849
|
function getCSS(P: string): string {
|
|
11779
11850
|
return \`
|
|
11780
11851
|
.\${P}-wrapper {
|
|
@@ -11821,6 +11892,32 @@ function getCSS(P: string): string {
|
|
|
11821
11892
|
max-width: 100%;
|
|
11822
11893
|
}
|
|
11823
11894
|
|
|
11895
|
+
.\${P}-hover-zoom-in .\${P}-cover-image {
|
|
11896
|
+
clip-path: inset(0);
|
|
11897
|
+
transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING}, clip-path \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11898
|
+
}
|
|
11899
|
+
|
|
11900
|
+
.\${P}-hover-scale-down .\${P}-cover-image {
|
|
11901
|
+
transition: transform \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11902
|
+
}
|
|
11903
|
+
|
|
11904
|
+
.\${P}-hover-greyscale .\${P}-cover-image {
|
|
11905
|
+
transition: filter \${HOVER_ANIM_MS}ms \${HOVER_EASING};
|
|
11906
|
+
}
|
|
11907
|
+
|
|
11908
|
+
@media (hover: hover) {
|
|
11909
|
+
.\${P}-hover-zoom-in .\${P}-cover:hover .\${P}-cover-image {
|
|
11910
|
+
transform: scale(\${HOVER_ZOOM});
|
|
11911
|
+
clip-path: inset(\${HOVER_ZOOM_INSET});
|
|
11912
|
+
}
|
|
11913
|
+
.\${P}-hover-scale-down .\${P}-cover:hover .\${P}-cover-image {
|
|
11914
|
+
transform: scale(0.9);
|
|
11915
|
+
}
|
|
11916
|
+
.\${P}-hover-greyscale .\${P}-cover:hover .\${P}-cover-image {
|
|
11917
|
+
filter: grayscale(1);
|
|
11918
|
+
}
|
|
11919
|
+
}
|
|
11920
|
+
|
|
11824
11921
|
.\${P}-lightbox {
|
|
11825
11922
|
position: fixed;
|
|
11826
11923
|
inset: 0;
|
|
@@ -12178,6 +12275,7 @@ export type LightboxStripItem = {
|
|
|
12178
12275
|
export type LightboxStripSettings = {
|
|
12179
12276
|
cover: string | null;
|
|
12180
12277
|
coverFit: ImageRatioFit;
|
|
12278
|
+
hover?: 'none' | 'zoom-in' | 'greyscale' | 'scale-down';
|
|
12181
12279
|
backgroundColor: string;
|
|
12182
12280
|
thumbnailVisibility: 'on' | 'off';
|
|
12183
12281
|
thumbnailSize: number;
|
|
@@ -12242,7 +12340,8 @@ type LightboxStripProps = {
|
|
|
12242
12340
|
|
|
12243
12341
|
export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: LightboxStripProps) => {
|
|
12244
12342
|
const { prefix: P } = useScopedStyles();
|
|
12245
|
-
const { cover, coverFit } = settings;
|
|
12343
|
+
const { cover, coverFit, hover = 'none' } = settings;
|
|
12344
|
+
const hoverEffectClass = hover !== 'none' && (!isEditor || isPreviewMode) ? \` \${P}-hover-\${hover}\` : '';
|
|
12246
12345
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
12247
12346
|
const [lightboxOpen, setLightboxOpen] = useState(false);
|
|
12248
12347
|
const items = content ?? [];
|
|
@@ -12260,7 +12359,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
12260
12359
|
|
|
12261
12360
|
return (
|
|
12262
12361
|
<>
|
|
12263
|
-
<div ref={wrapperRef} className={\`\${P}-wrapper\`}>
|
|
12362
|
+
<div ref={wrapperRef} className={\`\${P}-wrapper\${hoverEffectClass}\`}>
|
|
12264
12363
|
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
12265
12364
|
{cover && (
|
|
12266
12365
|
<div
|
|
@@ -25204,4 +25303,4 @@ export function Waterfall({
|
|
|
25204
25303
|
</>
|
|
25205
25304
|
);
|
|
25206
25305
|
}
|
|
25207
|
-
`,
|
|
25306
|
+
`,C={[n.BurgerComponent.id]:e,[n.ChroniclesComponent.id]:t,[n.ClickGallerieComponent.id]:i,[n.FAQComponent.id]:o,[n.FormComponent.id]:r,[n.GridComponent.id]:a,[n.HelixComponent.id]:s,[n.HiveComponent.id]:l,[n.LightboxJournalComponent.id]:c,[n.LightboxStripComponent.id]:d,[n.ListComponent.id]:u,[n.MarqueeComponent.id]:g,[n.MarqueeTextComponent.id]:m,[n.MercuryComponent.id]:p,[n.OnelinerFormComponent.id]:h,[n.PretextComponent.id]:f,[n.ScaleComponent.id]:v,[n.SimpleButtonComponent.id]:P,[n.Slider20Component.id]:x,[n.TestimonialGridComponent.id]:b,[n.TestimonialSingleComponent.id]:y,[n.WaterfallComponent.id]:S};exports.componentSources=C;
|