@cntrl-site/components 1.0.113 → 1.0.115-alpha.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/dist/{Burger-C3yVbQcq.js → Burger-B4kXX9aY.js} +1 -1
- package/dist/{Burger-BkVgNMGU.mjs → Burger-DyORh_vF.mjs} +1 -1
- package/dist/ChroniclesComponent-BHZu7BbK.js +1 -0
- package/dist/{ChroniclesComponent-Cu34ANdc.mjs → ChroniclesComponent-DRf1Xd9_.mjs} +15 -22
- package/dist/Components/FAQ/FAQ.d.ts +0 -1
- package/dist/Components/PopupMenu/PopupMenu.d.ts +70 -0
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +597 -0
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +176 -0
- package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +7 -0
- package/dist/{ControlSlider-DqKfaKMG.mjs → ControlSlider-3w-bHQEg.mjs} +1 -1
- package/dist/{ControlSlider-C8ckUIDm.js → ControlSlider-DB4nbVLT.js} +1 -1
- package/dist/FAQ-7HEkaoU6.js +166 -0
- package/dist/{FAQ-BS-vO0l-.mjs → FAQ-GmiwRdFq.mjs} +77 -78
- package/dist/{Grid-CU1dsdoO.js → Grid-BXUT_Hn6.js} +1 -1
- package/dist/{Grid-qbqchSLi.mjs → Grid-Dn44dvgx.mjs} +1 -1
- package/dist/{Hive-CzabuuCc.js → Hive-34KvKNsa.js} +1 -1
- package/dist/{Hive-DyxYd5eg.mjs → Hive-7xHXyMM1.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DhEeFKWs.mjs → HiveLightboxTitles-BCoL46-V.mjs} +1 -1
- package/dist/{HiveLightboxTitles-DlyptAaK.js → HiveLightboxTitles-DEeyQGcf.js} +1 -1
- package/dist/{Lightbox-DZckgBzK.js → Lightbox-Cb7lyaNt.js} +1 -1
- package/dist/{Lightbox-BY99NS14.mjs → Lightbox-DzPqgKP4.mjs} +1 -1
- package/dist/{LightboxJournal-DAEZOPDi.js → LightboxJournal-BFF5aKRz.js} +1 -1
- package/dist/{LightboxJournal-D59ex6wH.mjs → LightboxJournal-C_q7_s-B.mjs} +1 -1
- package/dist/{LightboxStrip-YspzBP8N.mjs → LightboxStrip-BrNj7ipX.mjs} +1 -1
- package/dist/{LightboxStrip-BDjI1jyH.js → LightboxStrip-CC2e0_9A.js} +1 -1
- package/dist/{Mercury-B-s2Kvuq.js → Mercury-BmhtFYOw.js} +1 -1
- package/dist/{Mercury-CCW0Es-s.mjs → Mercury-Q788wrYQ.mjs} +1 -1
- package/dist/{OnelinerForm-C2Y_XMCY.js → OnelinerForm-CUmY-bXL.js} +1 -1
- package/dist/{OnelinerForm-BEu7_sho.mjs → OnelinerForm-D8WIB9Qy.mjs} +1 -1
- package/dist/PopupMenu-On4dKyT3.js +369 -0
- package/dist/PopupMenu-RPz8MN6s.mjs +1026 -0
- package/dist/{SimpleButton-C-o2W9bS.mjs → SimpleButton-DTpzfmb6.mjs} +1 -1
- package/dist/{SimpleButton-nGEcO2gB.js → SimpleButton-DtaCYa3y.js} +1 -1
- package/dist/{Slider20-DUi6qwnd.mjs → Slider20-CKngROrc.mjs} +1 -1
- package/dist/{Slider20-BOmjDRf2.js → Slider20-q0iGgnE3.js} +1 -1
- package/dist/SvgImage-CwRq9-ec.mjs +56 -0
- package/dist/SvgImage-_QN8ngad.js +1 -0
- package/dist/{TestimonialSingle-DrnyReim.mjs → TestimonialSingle-Bax71Hyo.mjs} +1 -1
- package/dist/{TestimonialSingle-BORQom3u.js → TestimonialSingle-CpEUendN.js} +1 -1
- package/dist/{Waterfall-DII4-WV5.js → Waterfall-B9YWMhrg.js} +1 -1
- package/dist/{Waterfall-3kKioKh2.mjs → Waterfall-znaoynn5.mjs} +1 -1
- package/dist/components-DScrkzXw.js +1 -0
- package/dist/{components-CBovHrnR.mjs → components-y6LC2ILa.mjs} +652 -29
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +23 -22
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +48 -27
- package/dist/loadSvgMaskUrl-B6kHUyof.js +1 -0
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +39 -0
- package/dist/sources.js +2 -6
- package/dist/sources.mjs +2 -6
- package/dist/types/Component.d.ts +7 -0
- package/dist/types/SchemaV1.d.ts +4 -0
- package/package.json +1 -1
- package/dist/ChroniclesComponent-D7ICTnJp.js +0 -1
- package/dist/FAQ-Ct0YfqX1.js +0 -166
- package/dist/SvgImage-B5mR9y6q.mjs +0 -51
- package/dist/SvgImage-DFlmxAoL.js +0 -1
- package/dist/components-Nib9fOfN.js +0 -1
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +0 -1
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +0 -20
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,r,
|
|
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,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of c(n))!f.call(e,i)&&i!==r&&a(e,i,{get:()=>n[i],enumerable:!(o=u(n,i))||o.enumerable});return e};var t=(e,n,r)=>(r=e!=null?h(g(e)):{},d(n||!e||!e.__esModule?a(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m={"basic-burger":()=>import(/* webpackFetchPriority: "high" */ "./Burger-B4kXX9aY.js").then(e=>e.Burger),chronicles:()=>import(/* webpackFetchPriority: "high" */ "./Chronicles-D0ojQzOP.js").then(e=>e.Chronicles),"click-gallerie":()=>import(/* webpackFetchPriority: "high" */ "./ClickGallerie-DYbc-rDp.js").then(e=>e.ClickGallerie),"control-slider":()=>import(/* webpackFetchPriority: "high" */ "./ControlSlider-DB4nbVLT.js").then(e=>e.ControlSlider),faq:()=>import(/* webpackFetchPriority: "high" */ "./FAQ-7HEkaoU6.js").then(e=>e.FAQ),form:()=>import(/* webpackFetchPriority: "high" */ "./Form-Dn-6A1He.js").then(e=>e.Form),grid:()=>import(/* webpackFetchPriority: "high" */ "./Grid-BXUT_Hn6.js").then(e=>e.Grid),helix:()=>import(/* webpackFetchPriority: "high" */ "./Helix-BpLo9FD3.js").then(e=>e.Helix),hive:()=>import(/* webpackFetchPriority: "high" */ "./Hive-34KvKNsa.js").then(e=>e.Hive),"control-image-reveal":()=>import(/* webpackFetchPriority: "high" */ "./ImageRevealSlider-DlxudBUy.js").then(e=>e.ImageRevealSlider),lightbox:()=>import(/* webpackFetchPriority: "high" */ "./Lightbox-Cb7lyaNt.js").then(e=>e.LightboxGallery),"lightbox-journal":()=>import(/* webpackFetchPriority: "high" */ "./LightboxJournal-BFF5aKRz.js").then(e=>e.LightboxJournal),"lightbox-strip":()=>import(/* webpackFetchPriority: "high" */ "./LightboxStrip-CC2e0_9A.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-BmhtFYOw.js").then(e=>e.Mercury),"oneliner-form":()=>import(/* webpackFetchPriority: "high" */ "./OnelinerForm-CUmY-bXL.js").then(e=>e.OnelinerForm),"popup-menu":()=>import(/* webpackFetchPriority: "high" */ "./PopupMenu-On4dKyT3.js").then(e=>e.PopupMenu$1).then(e=>e.PopupMenu),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-DtaCYa3y.js").then(e=>e.SimpleButton),"slider-2-0":()=>import(/* webpackFetchPriority: "high" */ "./Slider20-q0iGgnE3.js").then(e=>e.Slider20),testimonials:()=>import(/* webpackFetchPriority: "high" */ "./TestimonialGrid-BHZazEVX.js").then(e=>e.TestimonialGrid),"testimonial-single":()=>import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-CpEUendN.js").then(e=>e.TestimonialSingle),waterfall:()=>import(/* webpackFetchPriority: "high" */ "./Waterfall-B9YWMhrg.js").then(e=>e.Waterfall)},b=Object.keys(m),y=3,E=2e3,p=new Map,l=new Map;function s(e){return Object.prototype.hasOwnProperty.call(m,e)}function x(e){return p.get(e)}function C(e){var n;return(((n=l.get(e))==null?void 0:n.failures)??0)>0}const M=e=>!e.loading&&e.failures>0&&e.failures<y&&Date.now()>=e.retryAt;function S(e){if(!s(e))return Promise.resolve(void 0);const n=l.get(e);if(n&&!M(n))return n.request;const r={loading:!0,failures:(n==null?void 0:n.failures)??0,retryAt:0,request:m[e]().then(o=>(p.set(e,o),r.failures=0,o),o=>{throw r.failures+=1,r.retryAt=Date.now()+E*2**(r.failures-1),o}).finally(()=>{r.loading=!1})};return l.set(e,r),r.request}exports.componentElementIds=b;exports.getComponentElement=x;exports.hasComponentElement=s;exports.hasComponentElementFailed=C;exports.loadComponentElement=S;
|
package/dist/elements.mjs
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
const i = {
|
|
2
|
-
"basic-burger": () => import(/* webpackFetchPriority: "high" */ "./Burger-
|
|
2
|
+
"basic-burger": () => import(/* webpackFetchPriority: "high" */ "./Burger-DyORh_vF.mjs").then((e) => e.Burger),
|
|
3
3
|
chronicles: () => import(/* webpackFetchPriority: "high" */ "./Chronicles-Cy2h3jlZ.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-3w-bHQEg.mjs").then((e) => e.ControlSlider),
|
|
6
|
+
faq: () => import(/* webpackFetchPriority: "high" */ "./FAQ-GmiwRdFq.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-Dn44dvgx.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-7xHXyMM1.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-DzPqgKP4.mjs").then((e) => e.LightboxGallery),
|
|
13
|
+
"lightbox-journal": () => import(/* webpackFetchPriority: "high" */ "./LightboxJournal-C_q7_s-B.mjs").then((e) => e.LightboxJournal),
|
|
14
|
+
"lightbox-strip": () => import(/* webpackFetchPriority: "high" */ "./LightboxStrip-BrNj7ipX.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-
|
|
18
|
+
mercury: () => import(/* webpackFetchPriority: "high" */ "./Mercury-Q788wrYQ.mjs").then((e) => e.Mercury),
|
|
19
|
+
"oneliner-form": () => import(/* webpackFetchPriority: "high" */ "./OnelinerForm-D8WIB9Qy.mjs").then((e) => e.OnelinerForm),
|
|
20
|
+
"popup-menu": () => import(/* webpackFetchPriority: "high" */ "./PopupMenu-RPz8MN6s.mjs").then((e) => e.u).then((e) => e.PopupMenu),
|
|
20
21
|
pretext: () => import(/* webpackFetchPriority: "high" */ "./Pretext-10CcyP1E.mjs").then((e) => e.Pretext),
|
|
21
22
|
scale: () => import(/* webpackFetchPriority: "high" */ "./Scale-TnkWtRrs.mjs").then((e) => e.Scale),
|
|
22
|
-
"simple-button": () => import(/* webpackFetchPriority: "high" */ "./SimpleButton-
|
|
23
|
-
"slider-2-0": () => import(/* webpackFetchPriority: "high" */ "./Slider20-
|
|
23
|
+
"simple-button": () => import(/* webpackFetchPriority: "high" */ "./SimpleButton-DTpzfmb6.mjs").then((e) => e.SimpleButton),
|
|
24
|
+
"slider-2-0": () => import(/* webpackFetchPriority: "high" */ "./Slider20-CKngROrc.mjs").then((e) => e.Slider20),
|
|
24
25
|
testimonials: () => import(/* webpackFetchPriority: "high" */ "./TestimonialGrid-C-8IDzWu.mjs").then((e) => e.TestimonialGrid),
|
|
25
|
-
"testimonial-single": () => import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-
|
|
26
|
-
waterfall: () => import(/* webpackFetchPriority: "high" */ "./Waterfall-
|
|
27
|
-
},
|
|
28
|
-
function
|
|
26
|
+
"testimonial-single": () => import(/* webpackFetchPriority: "high" */ "./TestimonialSingle-Bax71Hyo.mjs").then((e) => e.TestimonialSingle),
|
|
27
|
+
waterfall: () => import(/* webpackFetchPriority: "high" */ "./Waterfall-znaoynn5.mjs").then((e) => e.Waterfall)
|
|
28
|
+
}, h = Object.keys(i), m = 3, a = 2e3, l = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
29
|
+
function p(e) {
|
|
29
30
|
return Object.prototype.hasOwnProperty.call(i, e);
|
|
30
31
|
}
|
|
31
32
|
function u(e) {
|
|
@@ -35,11 +36,11 @@ function c(e) {
|
|
|
35
36
|
var t;
|
|
36
37
|
return (((t = o.get(e)) == null ? void 0 : t.failures) ?? 0) > 0;
|
|
37
38
|
}
|
|
38
|
-
const
|
|
39
|
+
const s = (e) => !e.loading && e.failures > 0 && e.failures < m && Date.now() >= e.retryAt;
|
|
39
40
|
function f(e) {
|
|
40
|
-
if (!
|
|
41
|
+
if (!p(e)) return Promise.resolve(void 0);
|
|
41
42
|
const t = o.get(e);
|
|
42
|
-
if (t && !
|
|
43
|
+
if (t && !s(t)) return t.request;
|
|
43
44
|
const r = {
|
|
44
45
|
loading: !0,
|
|
45
46
|
failures: (t == null ? void 0 : t.failures) ?? 0,
|
|
@@ -47,7 +48,7 @@ function f(e) {
|
|
|
47
48
|
request: i[e]().then(
|
|
48
49
|
(n) => (l.set(e, n), r.failures = 0, n),
|
|
49
50
|
(n) => {
|
|
50
|
-
throw r.failures += 1, r.retryAt = Date.now() +
|
|
51
|
+
throw r.failures += 1, r.retryAt = Date.now() + a * 2 ** (r.failures - 1), n;
|
|
51
52
|
}
|
|
52
53
|
).finally(() => {
|
|
53
54
|
r.loading = !1;
|
|
@@ -56,9 +57,9 @@ function f(e) {
|
|
|
56
57
|
return o.set(e, r), r.request;
|
|
57
58
|
}
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
h as componentElementIds,
|
|
60
61
|
u as getComponentElement,
|
|
61
|
-
|
|
62
|
+
p as hasComponentElement,
|
|
62
63
|
c as hasComponentElementFailed,
|
|
63
64
|
f as loadComponentElement
|
|
64
65
|
};
|
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-DScrkzXw.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,4 +1,4 @@
|
|
|
1
|
-
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentDefaultNavigationPosition, type ComponentNavigationPosition, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
1
|
+
export { type Breakpoint, type Component, type ComponentDefaultSize, type ComponentDefaultNavigationPosition, type ComponentNavigationPosition, type ComponentNavigationLayout, type ComponentSize, isSchemaV1 } from './types/Component';
|
|
2
2
|
export type { ComponentSchemaV1, ComponentContentSchema, ComponentContentSettings, ComponentContentProperty, ContentKey, 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';
|
|
@@ -6,3 +6,5 @@ export type { ContentValue, PostFieldBinding, PostFieldEntry, PostFieldPage } fr
|
|
|
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, randomPopupMenuSeed, defaultPopupMenuLayoutRules, DEFAULT_POPUP_MENU_HEIGHT, } from './Components/PopupMenu/popupMenuLayout';
|
|
10
|
+
export type { PopupMenuAlign, PopupMenuBlockType, PopupMenuGrid, PopupMenuGridLayout, PopupMenuGridSettings, PopupMenuSides, PopupMenuSidesSetting, PopupMenuLayout, PopupMenuLayoutRules, PopupMenuMeasure, PopupMenuPlacement } 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 u=require("./components-DScrkzXw.js"),r=require("./panelAvailability-DnOe0rQ4.js"),e=require("./PopupMenu-On4dKyT3.js");function d(t){return t.type==="object"&&t.version===1}function p(t){return{assetId:t,name:"",type:"image",objectFit:"cover"}}function M(t,{text:o,images:n}){switch(t){case"media-pair-list-input":return n.map(i=>({media:[p(i),p("")]}));case"media-list-input":return n.map(p);case"media-input":return n.length>0?p(n[0]):{assetId:"",name:""};case"rich-text":return[{type:"paragraph",children:[{text:o}]}];case"link-input":return{type:"url",value:"",target:"self"};default:return o}}function g(t,{pageId:o,slug:n}){return t==="link-input"?{type:"page",value:o,target:"self"}:`/${n}`}function c(t){var n;const o=((n=t==null?void 0:t.items)==null?void 0:n.properties)??{};return Object.entries(o).map(([i,a])=>{var s;const l=(s=a.display)==null?void 0:s.type;return{fieldKey:i,...a.contentKey!==void 0?{contentKey:a.contentKey}:{},fromEntry:P=>M(l,P),toPage:P=>g(l,P)}})}const m=[u.ControlSliderComponent.id,u.ControlImageRevealSliderComponent.id,u.LightboxComponent.id,u.PopupMenuComponent.id];exports.components=u.components;exports.getAvailableStatePanels=r.getAvailableStatePanels;exports.getUnavailableStates=r.getUnavailableStates;exports.isPanelAvailable=r.isPanelAvailable;exports.DEFAULT_POPUP_MENU_GRID=e.DEFAULT_POPUP_MENU_GRID;exports.DEFAULT_POPUP_MENU_HEIGHT=e.DEFAULT_POPUP_MENU_HEIGHT;exports.DEFAULT_POPUP_MENU_VIEWPORT_RATIO=e.DEFAULT_POPUP_MENU_VIEWPORT_RATIO;exports.POPUP_MENU_ALIGNS=e.POPUP_MENU_ALIGNS;exports.defaultPopupMenuLayoutRules=e.defaultPopupMenuLayoutRules;exports.fitPopupMenuLayoutToGrid=e.fitPopupMenuLayoutToGrid;exports.generatePopupMenuLayout=e.generatePopupMenuLayout;exports.getPopupMenuGrid=e.getPopupMenuGrid;exports.getPopupMenuHeight=e.getPopupMenuHeight;exports.getPopupMenuHeightPercent=e.getPopupMenuHeightPercent;exports.getPopupMenuSides=e.getPopupMenuSides;exports.getPopupMenuWidth=e.getPopupMenuWidth;exports.isSamePopupMenuGrid=e.isSamePopupMenuGrid;exports.movePopupMenuBlock=e.movePopupMenuBlock;exports.randomPopupMenuSeed=e.randomPopupMenuSeed;exports.resizePopupMenuBlock=e.resizePopupMenuBlock;exports.settlePopupMenuLayout=e.settlePopupMenuLayout;exports.snapPopupMenuHeight=e.snapPopupMenuHeight;exports.snapPopupMenuTop=e.snapPopupMenuTop;exports.getPostFieldBindings=c;exports.isSchemaV1=d;exports.nonForkableComponentIds=m;
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { C as s, a as
|
|
2
|
-
import { c as
|
|
3
|
-
import { g as
|
|
4
|
-
|
|
1
|
+
import { C as s, a as P, L as l, P as d } from "./components-y6LC2ILa.mjs";
|
|
2
|
+
import { c as E } from "./components-y6LC2ILa.mjs";
|
|
3
|
+
import { g as L, a as b, i as S } from "./panelAvailability-D179wwJx.mjs";
|
|
4
|
+
import { k as I, o as T, D as h, P as A, n as O, f as k, g as F, j as G, c as x, d as D, h as H, e as N, i as R, m as j, l as B, r as K, s as V, b as W, a as w } from "./PopupMenu-RPz8MN6s.mjs";
|
|
5
|
+
function M(e) {
|
|
5
6
|
return e.type === "object" && e.version === 1;
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function a(e) {
|
|
8
9
|
return { assetId: e, name: "", type: "image", objectFit: "cover" };
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function c(e, { text: n, images: t }) {
|
|
11
12
|
switch (e) {
|
|
12
13
|
case "media-pair-list-input":
|
|
13
|
-
return t.map((
|
|
14
|
+
return t.map((o) => ({ media: [a(o), a("")] }));
|
|
14
15
|
case "media-list-input":
|
|
15
|
-
return t.map(
|
|
16
|
+
return t.map(a);
|
|
16
17
|
case "media-input":
|
|
17
|
-
return t.length > 0 ?
|
|
18
|
+
return t.length > 0 ? a(t[0]) : { assetId: "", name: "" };
|
|
18
19
|
case "rich-text":
|
|
19
20
|
return [{ type: "paragraph", children: [{ text: n }] }];
|
|
20
21
|
case "link-input":
|
|
@@ -26,31 +27,51 @@ function d(e, { text: n, images: t }) {
|
|
|
26
27
|
function m(e, { pageId: n, slug: t }) {
|
|
27
28
|
return e === "link-input" ? { type: "page", value: n, target: "self" } : `/${t}`;
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function f(e) {
|
|
30
31
|
var t;
|
|
31
32
|
const n = ((t = e == null ? void 0 : e.items) == null ? void 0 : t.properties) ?? {};
|
|
32
|
-
return Object.entries(n).map(([
|
|
33
|
-
var
|
|
34
|
-
const
|
|
33
|
+
return Object.entries(n).map(([o, p]) => {
|
|
34
|
+
var r;
|
|
35
|
+
const i = (r = p.display) == null ? void 0 : r.type;
|
|
35
36
|
return {
|
|
36
|
-
fieldKey:
|
|
37
|
-
...
|
|
38
|
-
fromEntry: (
|
|
39
|
-
toPage: (
|
|
37
|
+
fieldKey: o,
|
|
38
|
+
...p.contentKey !== void 0 ? { contentKey: p.contentKey } : {},
|
|
39
|
+
fromEntry: (u) => c(i, u),
|
|
40
|
+
toPage: (u) => m(i, u)
|
|
40
41
|
};
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
+
const y = [
|
|
44
45
|
s.id,
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
P.id,
|
|
47
|
+
l.id,
|
|
48
|
+
d.id
|
|
47
49
|
];
|
|
48
50
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
I as DEFAULT_POPUP_MENU_GRID,
|
|
52
|
+
T as DEFAULT_POPUP_MENU_HEIGHT,
|
|
53
|
+
h as DEFAULT_POPUP_MENU_VIEWPORT_RATIO,
|
|
54
|
+
A as POPUP_MENU_ALIGNS,
|
|
55
|
+
E as components,
|
|
56
|
+
O as defaultPopupMenuLayoutRules,
|
|
57
|
+
k as fitPopupMenuLayoutToGrid,
|
|
58
|
+
F as generatePopupMenuLayout,
|
|
59
|
+
L as getAvailableStatePanels,
|
|
60
|
+
G as getPopupMenuGrid,
|
|
61
|
+
x as getPopupMenuHeight,
|
|
62
|
+
D as getPopupMenuHeightPercent,
|
|
63
|
+
H as getPopupMenuSides,
|
|
64
|
+
N as getPopupMenuWidth,
|
|
65
|
+
f as getPostFieldBindings,
|
|
66
|
+
b as getUnavailableStates,
|
|
67
|
+
S as isPanelAvailable,
|
|
68
|
+
R as isSamePopupMenuGrid,
|
|
69
|
+
M as isSchemaV1,
|
|
70
|
+
j as movePopupMenuBlock,
|
|
71
|
+
y as nonForkableComponentIds,
|
|
72
|
+
B as randomPopupMenuSeed,
|
|
73
|
+
K as resizePopupMenuBlock,
|
|
74
|
+
V as settlePopupMenuLayout,
|
|
75
|
+
W as snapPopupMenuHeight,
|
|
76
|
+
w as snapPopupMenuTop
|
|
56
77
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=new Map,i=new Map;function r(t){return t.startsWith("data:")||t.startsWith("blob:")}function c(t){return/^data:image\/svg\+xml[;,]/i.test(t.trim())}async function o(t){const e=t.type.toLowerCase();if(e.startsWith("image/svg+xml"))return!0;if(e.startsWith("image/")||e.startsWith("video/"))return!1;const s=(await t.slice(0,1024).text()).trimStart().toLowerCase();return s.startsWith("<svg")||s.startsWith("<?xml")&&s.includes("<svg")}function h(t){if(t.startsWith("data:"))return Promise.resolve(c(t));const e=i.get(t);if(e)return e;const s=fetch(t).then(n=>n.blob()).then(o).catch(()=>!1);return i.set(t,s),s}function g(t){if(r(t))return Promise.resolve(t);const e=a.get(t);if(e)return e;const s=fetch(t,{mode:"cors",cache:"reload"}).then(n=>{if(!n.ok)throw new Error(String(n.status));return n.blob()}).then(n=>URL.createObjectURL(n)).catch(n=>{throw a.delete(t),n});return a.set(t,s),s}exports.isInlineMaskUrl=r;exports.isInlineSvgUrl=h;exports.isSvgDataUrl=c;exports.loadSvgMaskUrl=g;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
2
|
+
function i(t) {
|
|
3
|
+
return t.startsWith("data:") || t.startsWith("blob:");
|
|
4
|
+
}
|
|
5
|
+
function c(t) {
|
|
6
|
+
return /^data:image\/svg\+xml[;,]/i.test(t.trim());
|
|
7
|
+
}
|
|
8
|
+
async function o(t) {
|
|
9
|
+
const e = t.type.toLowerCase();
|
|
10
|
+
if (e.startsWith("image/svg+xml")) return !0;
|
|
11
|
+
if (e.startsWith("image/") || e.startsWith("video/")) return !1;
|
|
12
|
+
const s = (await t.slice(0, 1024).text()).trimStart().toLowerCase();
|
|
13
|
+
return s.startsWith("<svg") || s.startsWith("<?xml") && s.includes("<svg");
|
|
14
|
+
}
|
|
15
|
+
function h(t) {
|
|
16
|
+
if (t.startsWith("data:")) return Promise.resolve(c(t));
|
|
17
|
+
const e = r.get(t);
|
|
18
|
+
if (e) return e;
|
|
19
|
+
const s = fetch(t).then((a) => a.blob()).then(o).catch(() => !1);
|
|
20
|
+
return r.set(t, s), s;
|
|
21
|
+
}
|
|
22
|
+
function g(t) {
|
|
23
|
+
if (i(t)) return Promise.resolve(t);
|
|
24
|
+
const e = n.get(t);
|
|
25
|
+
if (e) return e;
|
|
26
|
+
const s = fetch(t, { mode: "cors", cache: "reload" }).then((a) => {
|
|
27
|
+
if (!a.ok) throw new Error(String(a.status));
|
|
28
|
+
return a.blob();
|
|
29
|
+
}).then((a) => URL.createObjectURL(a)).catch((a) => {
|
|
30
|
+
throw n.delete(t), a;
|
|
31
|
+
});
|
|
32
|
+
return n.set(t, s), s;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
c as a,
|
|
36
|
+
h as b,
|
|
37
|
+
i,
|
|
38
|
+
g as l
|
|
39
|
+
};
|
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-BHZu7BbK.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';
|
|
@@ -4244,7 +4244,6 @@ type FAQSettings = {
|
|
|
4244
4244
|
cellMinHeight?: number;
|
|
4245
4245
|
dividerWidth?: number;
|
|
4246
4246
|
dividerStyle?: 'solid' | 'dashed' | 'dotted';
|
|
4247
|
-
entryHoverEffect?: 'none' | 'default';
|
|
4248
4247
|
autoclose?: 'on' | 'off';
|
|
4249
4248
|
icon?: string | null;
|
|
4250
4249
|
iconMaxWidth?: number;
|
|
@@ -4554,7 +4553,6 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
4554
4553
|
cellMinHeight = 0,
|
|
4555
4554
|
dividerWidth = 0.000694,
|
|
4556
4555
|
dividerStyle = 'solid',
|
|
4557
|
-
entryHoverEffect = 'default',
|
|
4558
4556
|
autoclose = 'off',
|
|
4559
4557
|
icon,
|
|
4560
4558
|
iconMaxWidth = 0.00833,
|
|
@@ -4626,9 +4624,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
4626
4624
|
}, [openIndices]);
|
|
4627
4625
|
|
|
4628
4626
|
const isItemOpen = useCallback((index: number) => openIndices.has(index), [openIndices]);
|
|
4629
|
-
const entryHoverClass = isInteractive
|
|
4630
|
-
? \`\${P}-entry-hover-default\`
|
|
4631
|
-
: '';
|
|
4627
|
+
const entryHoverClass = isInteractive ? \`\${P}-entry-hover-default\` : '';
|
|
4632
4628
|
const iconSrc = icon ?? '';
|
|
4633
4629
|
const useCustomIcon = iconSrc !== '';
|
|
4634
4630
|
const iconAnimSuffix = iconAnimation.replace(/^rotate /, '');
|
package/dist/sources.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as n, b as e, T as t, g as i, f as o, S as r, P as a, O as s, h as l, a as c, M as d, L as u, d as g, e as m, H as p, i as h, G as f, F as v, c as P, C as x, j as b, B as y } from "./ChroniclesComponent-
|
|
1
|
+
import { W as n, b as e, T as t, g as i, f as o, S as r, P as a, O as s, h as l, a as c, M as d, L as u, d as g, e as m, H as p, i as h, G as f, F as v, c as P, C as x, j as b, B as y } from "./ChroniclesComponent-DRf1Xd9_.mjs";
|
|
2
2
|
const S = `import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
3
3
|
import { CommonComponentProps } from '../props';
|
|
4
4
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
@@ -4245,7 +4245,6 @@ type FAQSettings = {
|
|
|
4245
4245
|
cellMinHeight?: number;
|
|
4246
4246
|
dividerWidth?: number;
|
|
4247
4247
|
dividerStyle?: 'solid' | 'dashed' | 'dotted';
|
|
4248
|
-
entryHoverEffect?: 'none' | 'default';
|
|
4249
4248
|
autoclose?: 'on' | 'off';
|
|
4250
4249
|
icon?: string | null;
|
|
4251
4250
|
iconMaxWidth?: number;
|
|
@@ -4555,7 +4554,6 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
4555
4554
|
cellMinHeight = 0,
|
|
4556
4555
|
dividerWidth = 0.000694,
|
|
4557
4556
|
dividerStyle = 'solid',
|
|
4558
|
-
entryHoverEffect = 'default',
|
|
4559
4557
|
autoclose = 'off',
|
|
4560
4558
|
icon,
|
|
4561
4559
|
iconMaxWidth = 0.00833,
|
|
@@ -4627,9 +4625,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
4627
4625
|
}, [openIndices]);
|
|
4628
4626
|
|
|
4629
4627
|
const isItemOpen = useCallback((index: number) => openIndices.has(index), [openIndices]);
|
|
4630
|
-
const entryHoverClass = isInteractive
|
|
4631
|
-
? \`\${P}-entry-hover-default\`
|
|
4632
|
-
: '';
|
|
4628
|
+
const entryHoverClass = isInteractive ? \`\${P}-entry-hover-default\` : '';
|
|
4633
4629
|
const iconSrc = icon ?? '';
|
|
4634
4630
|
const useCustomIcon = iconSrc !== '';
|
|
4635
4631
|
const iconAnimSuffix = iconAnimation.replace(/^rotate /, '');
|
|
@@ -8,6 +8,11 @@ export type ComponentSize = {
|
|
|
8
8
|
export type ComponentDefaultSize = Partial<Record<Breakpoint, ComponentSize>>;
|
|
9
9
|
export type ComponentNavigationPosition = 'default' | 'stickyTop' | 'switch';
|
|
10
10
|
export type ComponentDefaultNavigationPosition = Partial<Record<Breakpoint, ComponentNavigationPosition>>;
|
|
11
|
+
/**
|
|
12
|
+
* How a navigation component is laid out: across the page's width ('full-width'), or placed and sized
|
|
13
|
+
* like an item, staying put on the screen ('freeform').
|
|
14
|
+
*/
|
|
15
|
+
export type ComponentNavigationLayout = 'full-width' | 'freeform';
|
|
11
16
|
export type Component = {
|
|
12
17
|
element: (props: any) => React.ReactElement;
|
|
13
18
|
id: string;
|
|
@@ -17,6 +22,8 @@ export type Component = {
|
|
|
17
22
|
layoutMode?: 'freeform' | 'structured' | 'navigation';
|
|
18
23
|
defaultSize?: ComponentDefaultSize;
|
|
19
24
|
defaultNavigationPosition?: ComponentDefaultNavigationPosition;
|
|
25
|
+
/** For a `layoutMode: 'navigation'` component; none is 'full-width'. */
|
|
26
|
+
navigationLayout?: ComponentNavigationLayout;
|
|
20
27
|
schema: any;
|
|
21
28
|
preview?: {
|
|
22
29
|
type: 'image' | 'video';
|
package/dist/types/SchemaV1.d.ts
CHANGED
|
@@ -97,6 +97,9 @@ export type ComponentContentProperty = {
|
|
|
97
97
|
min?: number;
|
|
98
98
|
max?: number;
|
|
99
99
|
default?: unknown;
|
|
100
|
+
/** How the field is drawn instead in a row whose `type` is one of these keys, laid over the rest; a display
|
|
101
|
+
* with `visible: false` leaves the field out of those rows. */
|
|
102
|
+
byRowType?: Record<string, Pick<ComponentContentProperty, 'placeholder' | 'display'>>;
|
|
100
103
|
};
|
|
101
104
|
export type ComponentContentSchema = {
|
|
102
105
|
type: 'array';
|
|
@@ -117,6 +120,7 @@ export type ComponentContentSchema = {
|
|
|
117
120
|
export type SchemaSection = {
|
|
118
121
|
sizing?: string;
|
|
119
122
|
hasLinkParameter?: boolean;
|
|
123
|
+
hideOpacityParameter?: boolean;
|
|
120
124
|
properties: Record<string, SchemaProperty>;
|
|
121
125
|
layout?: LayoutItem[];
|
|
122
126
|
defaults: Record<string, unknown>;
|