@cntrl-site/components 1.0.111-alpha.0 → 1.0.111-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Burger-C3yVbQcq.js → Burger-B4kXX9aY.js} +1 -1
- package/dist/{Burger-BkVgNMGU.mjs → Burger-DyORh_vF.mjs} +1 -1
- package/dist/{ChroniclesComponent-FFenN7yL.js → ChroniclesComponent-B6L-8Gn2.js} +1 -1
- package/dist/{ChroniclesComponent-cZLqN307.mjs → ChroniclesComponent-adaAqTy8.mjs} +12 -12
- package/dist/Components/PopupMenu/PopupMenu.d.ts +18 -5
- package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +125 -134
- package/dist/Components/PopupMenu/popupMenuLayout.d.ts +70 -34
- 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-BS-vO0l-.mjs → FAQ-BjLLn81l.mjs} +1 -1
- package/dist/{FAQ-Ct0YfqX1.js → FAQ-C5evIqbl.js} +1 -1
- 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-BYZy1R1y.js +356 -0
- package/dist/PopupMenu-DXWVDnPf.mjs +972 -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-ByRCe3b5.js → components-Ce8GmbzS.js} +1 -1
- package/dist/{components-DbxkGNoB.mjs → components-QxlSJUUn.mjs} +176 -144
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +15 -15
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +39 -34
- package/dist/loadSvgMaskUrl-B6kHUyof.js +1 -0
- package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +39 -0
- package/dist/sources.js +1 -1
- package/dist/sources.mjs +1 -1
- package/dist/types/SchemaV1.d.ts +2 -1
- package/package.json +1 -1
- package/dist/PopupMenu-BVc8Y4Tt.mjs +0 -929
- package/dist/PopupMenu-Dty5qHl8.js +0 -348
- package/dist/SvgImage-B5mR9y6q.mjs +0 -51
- package/dist/SvgImage-DFlmxAoL.js +0 -1
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +0 -1
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +0 -20
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Form as vt } from "./Form-BX5_41nb.mjs";
|
|
2
|
-
import { OnelinerForm as Ft } from "./OnelinerForm-
|
|
2
|
+
import { OnelinerForm as Ft } from "./OnelinerForm-D8WIB9Qy.mjs";
|
|
3
3
|
import { Marquee as Ct } from "./Marquee-_xVuf-zp.mjs";
|
|
4
4
|
import { MarqueeText as Tt } from "./MarqueeText-C2E6UDsb.mjs";
|
|
5
5
|
import { TestimonialGrid as Mt } from "./TestimonialGrid-C-8IDzWu.mjs";
|
|
6
|
-
import { TestimonialSingle as Lt } from "./TestimonialSingle-
|
|
7
|
-
import { Grid as wt } from "./Grid-
|
|
8
|
-
import { Hive as Ht } from "./Hive-
|
|
6
|
+
import { TestimonialSingle as Lt } from "./TestimonialSingle-Bax71Hyo.mjs";
|
|
7
|
+
import { Grid as wt } from "./Grid-Dn44dvgx.mjs";
|
|
8
|
+
import { Hive as Ht } from "./Hive-7xHXyMM1.mjs";
|
|
9
9
|
import { J as v, w as i, x as yt, y as mt, z as Wt } from "./utils-FxC9rcxw.mjs";
|
|
10
10
|
import { createListTextStylePanelTab as It, LIST_TEXT_STYLE_PREFIXES as E, applyListColumnCountChange as Pt, List as At, getListColumnTextSettingKey as l, COLUMN_TEXT_PREFIXES as kt, COLUMN_CONTENT_KEYS as B, normalizeListColumnVerticalAlign as zt, CUT_LABEL_TEXT_PREFIX as D, COLUMN_VALIGN_BASIC_OPTIONS as q } from "./List-Bh_-l9vD.mjs";
|
|
11
|
-
import { FAQ as Et } from "./FAQ-
|
|
12
|
-
import { STRIP_TEXT_STYLE_PREFIXES as H, createStripTextStylePanelTab as Bt, LightboxStrip as Dt, getStripTextStyleSettingKey as p } from "./LightboxStrip-
|
|
13
|
-
import { LightboxJournal as _t } from "./LightboxJournal-
|
|
11
|
+
import { FAQ as Et } from "./FAQ-BjLLn81l.mjs";
|
|
12
|
+
import { STRIP_TEXT_STYLE_PREFIXES as H, createStripTextStylePanelTab as Bt, LightboxStrip as Dt, getStripTextStyleSettingKey as p } from "./LightboxStrip-BrNj7ipX.mjs";
|
|
13
|
+
import { LightboxJournal as _t } from "./LightboxJournal-C_q7_s-B.mjs";
|
|
14
14
|
import { ClickGallerie as jt } from "./ClickGallerie-Cjc_1Gxy.mjs";
|
|
15
15
|
import { Scale as Rt } from "./Scale-TnkWtRrs.mjs";
|
|
16
|
-
import { SimpleButton as Gt } from "./SimpleButton-
|
|
17
|
-
import { Waterfall as Nt } from "./Waterfall-
|
|
18
|
-
import { Slider20 as Qt } from "./Slider20-
|
|
19
|
-
import { Mercury as Xt } from "./Mercury-
|
|
16
|
+
import { SimpleButton as Gt } from "./SimpleButton-DTpzfmb6.mjs";
|
|
17
|
+
import { Waterfall as Nt } from "./Waterfall-znaoynn5.mjs";
|
|
18
|
+
import { Slider20 as Qt } from "./Slider20-CKngROrc.mjs";
|
|
19
|
+
import { Mercury as Xt } from "./Mercury-Q788wrYQ.mjs";
|
|
20
20
|
import { Helix as Ot } from "./Helix-CidI3ucE.mjs";
|
|
21
|
-
import { Burger as Vt, isBurgerOpenMenuAvailable as $t } from "./Burger-
|
|
21
|
+
import { Burger as Vt, isBurgerOpenMenuAvailable as $t } from "./Burger-DyORh_vF.mjs";
|
|
22
22
|
import { settingsForEditablePreset as gt, SHAPE_IDS as ut, Pretext as qt } from "./Pretext-10CcyP1E.mjs";
|
|
23
23
|
import { CHRONICLES_COLUMN_STYLE_PREFIXES as _, CHRONICLES_PANEL_POSITIONS as Kt, applyChroniclesColumnCountChange as Yt, Chronicles as Jt, getChroniclesEqualColumnWidths as Zt, CHRONICLES_COLUMN_WIDTH_KEYS as Ut, CHRONICLES_EXTRA_TITLE_KEYS as J } from "./Chronicles-Cy2h3jlZ.mjs";
|
|
24
24
|
const te = [
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { CommonComponentProps } from '../props';
|
|
2
|
-
import { PopupMenuBlockType, PopupMenuGridSettings, PopupMenuSidesSetting, PopupMenuLayout } from './popupMenuLayout';
|
|
2
|
+
import { PopupMenuAlign, PopupMenuBlockType, PopupMenuGridSettings, PopupMenuSidesSetting, PopupMenuLayout } from './popupMenuLayout';
|
|
3
|
+
/** How the popup comes in as it opens and goes as it closes; the overlay behind it fades with it, but for 'none'. */
|
|
4
|
+
export declare const POPUP_MENU_TRANSITIONS: readonly ["slide down", "slide up", "fade", "scale", "none"];
|
|
5
|
+
export type PopupMenuTransition = (typeof POPUP_MENU_TRANSITIONS)[number];
|
|
3
6
|
export declare const POPUP_MENU_TRIGGER_TYPES: readonly ["burger", "plus", "image", "text"];
|
|
4
7
|
export type PopupMenuTriggerType = (typeof POPUP_MENU_TRIGGER_TYPES)[number];
|
|
5
8
|
type PopupMenuImage = {
|
|
@@ -21,15 +24,23 @@ type PopupMenuSettings = PopupMenuGridSettings & {
|
|
|
21
24
|
triggerLabel?: string;
|
|
22
25
|
triggerIcon?: string | null;
|
|
23
26
|
triggerIconSize?: number;
|
|
24
|
-
triggerPosition?: 'left' | 'center' | 'right';
|
|
25
27
|
/** The room round the trigger's icon or text; a menu saved before it had one has none. */
|
|
26
28
|
triggerPadding?: PopupMenuSidesSetting;
|
|
29
|
+
/** A percentage of the screen's height, 100 at most. */
|
|
27
30
|
popupHeight?: number;
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
/** Where the popup sits across the screen; none is the centre. Set in the editor's item panel, as a block's align is. */
|
|
32
|
+
popupAlign?: PopupMenuAlign;
|
|
33
|
+
/** How far the popup is moved right from where it is aligned, or left where negative, in fractions of the layout width. */
|
|
34
|
+
popupOffset?: number;
|
|
35
|
+
/** How far the popup is moved down from the screen's top, or up where negative, in fractions of the layout width. */
|
|
36
|
+
popupOffsetTop?: number;
|
|
30
37
|
titleGap?: number;
|
|
31
38
|
popupRadius?: number;
|
|
32
39
|
imageRadius?: number;
|
|
40
|
+
/** How the popup shows and hides; none, as in a menu saved before there was a choice, slides down. */
|
|
41
|
+
popupTransition?: PopupMenuTransition;
|
|
42
|
+
/** How far the page behind the open popup is blurred, in fractions of the layout width; none, not at all. */
|
|
43
|
+
overlayBlur?: number;
|
|
33
44
|
barBackgroundColor?: string;
|
|
34
45
|
triggerColor?: string;
|
|
35
46
|
overlayColor?: string;
|
|
@@ -51,7 +62,9 @@ type PopupMenuProps = {
|
|
|
51
62
|
isEditMode?: boolean;
|
|
52
63
|
isPreviewMode?: boolean;
|
|
53
64
|
layoutId?: string;
|
|
65
|
+
/** Where the open popup is portalled to, so that it covers the screen rather than the element; none, the body. */
|
|
66
|
+
portalId?: string;
|
|
54
67
|
onOpenChange?: (isOpen: boolean) => void;
|
|
55
68
|
} & CommonComponentProps;
|
|
56
|
-
export declare function PopupMenu({ settings, content, isEditor, isEditMode, isPreviewMode, layoutId, currentState, unavailableStates, onOpenChange, onUpdateSettings, }: PopupMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function PopupMenu({ settings, content, isEditor, isEditMode, isPreviewMode, layoutId, portalId, currentState, unavailableStates, onOpenChange, onUpdateSettings, }: PopupMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
57
70
|
export {};
|
|
@@ -5,26 +5,20 @@ export declare const PopupMenuComponent: {
|
|
|
5
5
|
name: string;
|
|
6
6
|
category: string;
|
|
7
7
|
version: number;
|
|
8
|
-
layoutMode: "navigation";
|
|
9
8
|
defaultSize: {
|
|
10
9
|
d: {
|
|
11
|
-
width:
|
|
10
|
+
width: number;
|
|
12
11
|
height: number;
|
|
13
12
|
};
|
|
14
13
|
t: {
|
|
15
|
-
width:
|
|
14
|
+
width: number;
|
|
16
15
|
height: number;
|
|
17
16
|
};
|
|
18
17
|
m: {
|
|
19
|
-
width:
|
|
18
|
+
width: number;
|
|
20
19
|
height: number;
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
|
-
defaultNavigationPosition: {
|
|
24
|
-
readonly d: "stickyTop";
|
|
25
|
-
readonly t: "stickyTop";
|
|
26
|
-
readonly m: "stickyTop";
|
|
27
|
-
};
|
|
28
22
|
schema: {
|
|
29
23
|
type: "object";
|
|
30
24
|
version: 1;
|
|
@@ -55,6 +49,14 @@ export declare const PopupMenuComponent: {
|
|
|
55
49
|
display: {
|
|
56
50
|
type: string;
|
|
57
51
|
};
|
|
52
|
+
byRowType: {
|
|
53
|
+
image: {
|
|
54
|
+
display: {
|
|
55
|
+
type: string;
|
|
56
|
+
visible: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
58
60
|
};
|
|
59
61
|
text: {
|
|
60
62
|
label: string;
|
|
@@ -63,10 +65,10 @@ export declare const PopupMenuComponent: {
|
|
|
63
65
|
type: string;
|
|
64
66
|
};
|
|
65
67
|
byRowType: {
|
|
66
|
-
|
|
67
|
-
placeholder: string;
|
|
68
|
+
image: {
|
|
68
69
|
display: {
|
|
69
70
|
type: string;
|
|
71
|
+
visible: boolean;
|
|
70
72
|
};
|
|
71
73
|
};
|
|
72
74
|
};
|
|
@@ -77,6 +79,14 @@ export declare const PopupMenuComponent: {
|
|
|
77
79
|
display: {
|
|
78
80
|
type: string;
|
|
79
81
|
};
|
|
82
|
+
byRowType: {
|
|
83
|
+
[k: string]: {
|
|
84
|
+
display: {
|
|
85
|
+
type: string;
|
|
86
|
+
visible: boolean;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
80
90
|
properties: {
|
|
81
91
|
assetId: {
|
|
82
92
|
type: "string";
|
|
@@ -125,37 +135,43 @@ export declare const PopupMenuComponent: {
|
|
|
125
135
|
type: string;
|
|
126
136
|
};
|
|
127
137
|
};
|
|
128
|
-
|
|
129
|
-
type: "
|
|
130
|
-
scope: "layout";
|
|
131
|
-
title: string;
|
|
132
|
-
min: number;
|
|
133
|
-
max: number;
|
|
134
|
-
display: {
|
|
135
|
-
type: string;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
gridColumnWidth: {
|
|
139
|
-
type: "number";
|
|
138
|
+
gridLayout: {
|
|
139
|
+
type: "grid-layout";
|
|
140
140
|
scope: "layout";
|
|
141
|
-
title: string;
|
|
142
|
-
min: number;
|
|
143
|
-
max: number;
|
|
144
141
|
display: {
|
|
145
142
|
type: string;
|
|
146
143
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
gridParams: {
|
|
145
|
+
type: "object";
|
|
146
|
+
properties: {
|
|
147
|
+
columnsCount: {
|
|
148
|
+
type: "number";
|
|
149
|
+
title: string;
|
|
150
|
+
min: number;
|
|
151
|
+
max: number;
|
|
152
|
+
display: {
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
wrapperWidth: {
|
|
157
|
+
type: "number";
|
|
158
|
+
title: string;
|
|
159
|
+
min: number;
|
|
160
|
+
};
|
|
161
|
+
entryWidth: {
|
|
162
|
+
type: "number";
|
|
163
|
+
title: string;
|
|
164
|
+
min: number;
|
|
165
|
+
};
|
|
166
|
+
horizontalGap: {
|
|
167
|
+
type: "number";
|
|
168
|
+
title: string;
|
|
169
|
+
min: number;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
156
172
|
};
|
|
157
173
|
};
|
|
158
|
-
|
|
174
|
+
verticalGap: {
|
|
159
175
|
type: "number";
|
|
160
176
|
scope: "layout";
|
|
161
177
|
title: string;
|
|
@@ -202,16 +218,6 @@ export declare const PopupMenuComponent: {
|
|
|
202
218
|
visible: boolean;
|
|
203
219
|
};
|
|
204
220
|
};
|
|
205
|
-
triggerPosition: {
|
|
206
|
-
type: "string";
|
|
207
|
-
scope: "layout";
|
|
208
|
-
title: string;
|
|
209
|
-
enum: string[];
|
|
210
|
-
display: {
|
|
211
|
-
type: string;
|
|
212
|
-
enum: string[];
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
221
|
triggerPadding: {
|
|
216
222
|
type: "object";
|
|
217
223
|
scope: "layout";
|
|
@@ -244,51 +250,30 @@ export declare const PopupMenuComponent: {
|
|
|
244
250
|
type: string;
|
|
245
251
|
};
|
|
246
252
|
};
|
|
247
|
-
|
|
248
|
-
type: "
|
|
253
|
+
popupAlign: {
|
|
254
|
+
type: "string";
|
|
249
255
|
scope: "layout";
|
|
250
|
-
|
|
251
|
-
display: {
|
|
252
|
-
type: string;
|
|
253
|
-
};
|
|
254
|
-
properties: {
|
|
255
|
-
top: {
|
|
256
|
-
type: "number";
|
|
257
|
-
};
|
|
258
|
-
right: {
|
|
259
|
-
type: "number";
|
|
260
|
-
};
|
|
261
|
-
bottom: {
|
|
262
|
-
type: "number";
|
|
263
|
-
};
|
|
264
|
-
left: {
|
|
265
|
-
type: "number";
|
|
266
|
-
};
|
|
267
|
-
};
|
|
256
|
+
enum: ("center" | "left" | "right")[];
|
|
268
257
|
};
|
|
269
|
-
|
|
270
|
-
type: "
|
|
258
|
+
popupOffset: {
|
|
259
|
+
type: "number";
|
|
260
|
+
scope: "layout";
|
|
261
|
+
};
|
|
262
|
+
popupOffsetTop: {
|
|
263
|
+
type: "number";
|
|
264
|
+
scope: "layout";
|
|
265
|
+
};
|
|
266
|
+
titleGap: {
|
|
267
|
+
type: "number";
|
|
271
268
|
scope: "layout";
|
|
272
269
|
title: string;
|
|
270
|
+
min: number;
|
|
271
|
+
max: number;
|
|
273
272
|
display: {
|
|
274
273
|
type: string;
|
|
275
274
|
};
|
|
276
|
-
properties: {
|
|
277
|
-
top: {
|
|
278
|
-
type: "number";
|
|
279
|
-
};
|
|
280
|
-
right: {
|
|
281
|
-
type: "number";
|
|
282
|
-
};
|
|
283
|
-
bottom: {
|
|
284
|
-
type: "number";
|
|
285
|
-
};
|
|
286
|
-
left: {
|
|
287
|
-
type: "number";
|
|
288
|
-
};
|
|
289
|
-
};
|
|
290
275
|
};
|
|
291
|
-
|
|
276
|
+
popupRadius: {
|
|
292
277
|
type: "number";
|
|
293
278
|
scope: "layout";
|
|
294
279
|
title: string;
|
|
@@ -298,7 +283,7 @@ export declare const PopupMenuComponent: {
|
|
|
298
283
|
type: string;
|
|
299
284
|
};
|
|
300
285
|
};
|
|
301
|
-
|
|
286
|
+
imageRadius: {
|
|
302
287
|
type: "number";
|
|
303
288
|
scope: "layout";
|
|
304
289
|
title: string;
|
|
@@ -308,7 +293,16 @@ export declare const PopupMenuComponent: {
|
|
|
308
293
|
type: string;
|
|
309
294
|
};
|
|
310
295
|
};
|
|
311
|
-
|
|
296
|
+
popupTransition: {
|
|
297
|
+
type: "string";
|
|
298
|
+
scope: "common";
|
|
299
|
+
title: string;
|
|
300
|
+
display: {
|
|
301
|
+
type: string;
|
|
302
|
+
enum: ("none" | "scale" | "fade" | "slide down" | "slide up")[];
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
overlayBlur: {
|
|
312
306
|
type: "number";
|
|
313
307
|
scope: "layout";
|
|
314
308
|
title: string;
|
|
@@ -402,7 +396,7 @@ export declare const PopupMenuComponent: {
|
|
|
402
396
|
triggerType: string;
|
|
403
397
|
triggerLabel: string;
|
|
404
398
|
triggerIcon: null;
|
|
405
|
-
|
|
399
|
+
popupTransition: string;
|
|
406
400
|
barBackgroundColor: string;
|
|
407
401
|
triggerColor: string;
|
|
408
402
|
overlayColor: string;
|
|
@@ -446,26 +440,22 @@ export declare const PopupMenuComponent: {
|
|
|
446
440
|
left: number;
|
|
447
441
|
};
|
|
448
442
|
triggerIconSize: number;
|
|
449
|
-
popupInset: {
|
|
450
|
-
top: number;
|
|
451
|
-
right: number;
|
|
452
|
-
bottom: number;
|
|
453
|
-
left: number;
|
|
454
|
-
};
|
|
455
|
-
popupPadding: {
|
|
456
|
-
top: number;
|
|
457
|
-
right: number;
|
|
458
|
-
bottom: number;
|
|
459
|
-
left: number;
|
|
460
|
-
};
|
|
461
443
|
popupHeight: number;
|
|
444
|
+
popupAlign: string;
|
|
445
|
+
popupOffset: number;
|
|
446
|
+
popupOffsetTop: number;
|
|
462
447
|
titleGap: number;
|
|
463
448
|
popupRadius: number;
|
|
464
449
|
imageRadius: number;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
450
|
+
overlayBlur: number;
|
|
451
|
+
gridLayout: {
|
|
452
|
+
columnsCount: number;
|
|
453
|
+
wrapperWidth: number;
|
|
454
|
+
entryWidth: number;
|
|
455
|
+
horizontalGap: number;
|
|
456
|
+
lockedParam: string;
|
|
457
|
+
};
|
|
458
|
+
verticalGap: number;
|
|
469
459
|
};
|
|
470
460
|
t: {
|
|
471
461
|
triggerPadding: {
|
|
@@ -475,26 +465,22 @@ export declare const PopupMenuComponent: {
|
|
|
475
465
|
left: number;
|
|
476
466
|
};
|
|
477
467
|
triggerIconSize: number;
|
|
478
|
-
popupInset: {
|
|
479
|
-
top: number;
|
|
480
|
-
right: number;
|
|
481
|
-
bottom: number;
|
|
482
|
-
left: number;
|
|
483
|
-
};
|
|
484
|
-
popupPadding: {
|
|
485
|
-
top: number;
|
|
486
|
-
right: number;
|
|
487
|
-
bottom: number;
|
|
488
|
-
left: number;
|
|
489
|
-
};
|
|
490
468
|
popupHeight: number;
|
|
469
|
+
popupAlign: string;
|
|
470
|
+
popupOffset: number;
|
|
471
|
+
popupOffsetTop: number;
|
|
491
472
|
titleGap: number;
|
|
492
473
|
popupRadius: number;
|
|
493
474
|
imageRadius: number;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
475
|
+
overlayBlur: number;
|
|
476
|
+
gridLayout: {
|
|
477
|
+
columnsCount: number;
|
|
478
|
+
wrapperWidth: number;
|
|
479
|
+
entryWidth: number;
|
|
480
|
+
horizontalGap: number;
|
|
481
|
+
lockedParam: string;
|
|
482
|
+
};
|
|
483
|
+
verticalGap: number;
|
|
498
484
|
};
|
|
499
485
|
m: {
|
|
500
486
|
triggerPadding: {
|
|
@@ -504,26 +490,22 @@ export declare const PopupMenuComponent: {
|
|
|
504
490
|
left: number;
|
|
505
491
|
};
|
|
506
492
|
triggerIconSize: number;
|
|
507
|
-
popupInset: {
|
|
508
|
-
top: number;
|
|
509
|
-
right: number;
|
|
510
|
-
bottom: number;
|
|
511
|
-
left: number;
|
|
512
|
-
};
|
|
513
|
-
popupPadding: {
|
|
514
|
-
top: number;
|
|
515
|
-
right: number;
|
|
516
|
-
bottom: number;
|
|
517
|
-
left: number;
|
|
518
|
-
};
|
|
519
493
|
popupHeight: number;
|
|
494
|
+
popupAlign: string;
|
|
495
|
+
popupOffset: number;
|
|
496
|
+
popupOffsetTop: number;
|
|
520
497
|
titleGap: number;
|
|
521
498
|
popupRadius: number;
|
|
522
499
|
imageRadius: number;
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
500
|
+
overlayBlur: number;
|
|
501
|
+
gridLayout: {
|
|
502
|
+
columnsCount: number;
|
|
503
|
+
wrapperWidth: number;
|
|
504
|
+
entryWidth: number;
|
|
505
|
+
horizontalGap: number;
|
|
506
|
+
lockedParam: string;
|
|
507
|
+
};
|
|
508
|
+
verticalGap: number;
|
|
527
509
|
};
|
|
528
510
|
};
|
|
529
511
|
};
|
|
@@ -535,6 +517,15 @@ export declare const PopupMenuComponent: {
|
|
|
535
517
|
layout: (string | {
|
|
536
518
|
type: "row";
|
|
537
519
|
items: string[];
|
|
520
|
+
title?: undefined;
|
|
521
|
+
} | {
|
|
522
|
+
type: "row";
|
|
523
|
+
title: string;
|
|
524
|
+
items: {
|
|
525
|
+
type: "group";
|
|
526
|
+
title: string;
|
|
527
|
+
items: string[];
|
|
528
|
+
}[];
|
|
538
529
|
})[];
|
|
539
530
|
} | {
|
|
540
531
|
id: string;
|
|
@@ -4,15 +4,17 @@ export type PopupMenuGrid = {
|
|
|
4
4
|
columns: number;
|
|
5
5
|
columnWidth: number;
|
|
6
6
|
gutter: number;
|
|
7
|
+
/** The least room kept between two blocks one above the other in a column; none is the gutter. */
|
|
8
|
+
rowGap?: number;
|
|
7
9
|
/** The vertical rhythm's step, which blocks' tops snap to; none, or 0, leaves them free. */
|
|
8
10
|
beat?: number;
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* A block's place in the popup: `column` skipped from the left edge, `span` columns wide, and `top` down from
|
|
12
|
-
* the popup's top
|
|
13
|
-
*
|
|
14
|
-
* `height`, set once
|
|
15
|
-
* rhythm
|
|
14
|
+
* the popup's top, in fractions of the layout width like the popup's other sizes. A block is always drawn at
|
|
15
|
+
* its top; one reaching below the popup's bottom is scrolled to, the popup scrolling down as far as it reaches.
|
|
16
|
+
* `height`, set once an image block was resized by its top or bottom edge, holds it to that many beats of the
|
|
17
|
+
* rhythm, the image cut to fill it. Without it, the block is as tall as its content, as text and lists always are.
|
|
16
18
|
*/
|
|
17
19
|
export type PopupMenuPlacement = {
|
|
18
20
|
column: number;
|
|
@@ -20,37 +22,79 @@ export type PopupMenuPlacement = {
|
|
|
20
22
|
top: number;
|
|
21
23
|
height?: number;
|
|
22
24
|
};
|
|
23
|
-
/** The popup's height when none is set, the
|
|
24
|
-
export declare const DEFAULT_POPUP_MENU_HEIGHT
|
|
25
|
-
/** The
|
|
25
|
+
/** The popup's height when none is set, as a percentage of the screen's height. */
|
|
26
|
+
export declare const DEFAULT_POPUP_MENU_HEIGHT = 60;
|
|
27
|
+
/** The screen's height as a fraction of the layout width, where it is not known: a 1440 × 900 desktop. */
|
|
28
|
+
export declare const DEFAULT_POPUP_MENU_VIEWPORT_RATIO: number;
|
|
29
|
+
/** Where the popup sits across the screen, as a structured block, Catalogue's say, is aligned in the article. */
|
|
30
|
+
export declare const POPUP_MENU_ALIGNS: readonly ["left", "center", "right"];
|
|
31
|
+
export type PopupMenuAlign = (typeof POPUP_MENU_ALIGNS)[number];
|
|
32
|
+
/** The popup's grid when none is set, the desktop default: 12 columns of 99 with gutters of 20. */
|
|
26
33
|
export declare const DEFAULT_POPUP_MENU_GRID: PopupMenuGrid;
|
|
34
|
+
/**
|
|
35
|
+
* The popup's columns as the editor's grid-layout control sets them, as Catalogue's are: `columnsCount` columns
|
|
36
|
+
* `entryWidth` wide with `horizontalGap` between them, within `wrapperWidth`, which is at least as wide as they
|
|
37
|
+
* are and keeps them centred. `lockedParam` is the size the control holds while the others are changed.
|
|
38
|
+
*/
|
|
39
|
+
export type PopupMenuGridLayout = {
|
|
40
|
+
columnsCount?: number;
|
|
41
|
+
wrapperWidth?: number;
|
|
42
|
+
entryWidth?: number;
|
|
43
|
+
horizontalGap?: number;
|
|
44
|
+
lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
|
|
45
|
+
};
|
|
27
46
|
/** The popup's own grid as it is set, sizes in fractions of the layout width like the popup's other sizes. */
|
|
28
47
|
export type PopupMenuGridSettings = {
|
|
48
|
+
gridLayout?: PopupMenuGridLayout | null;
|
|
49
|
+
verticalGap?: number;
|
|
50
|
+
/** @deprecated a column count, width and gutter of their own, as a menu saved before `gridLayout` has them */
|
|
29
51
|
gridColumns?: number;
|
|
52
|
+
/** @deprecated see gridColumns */
|
|
30
53
|
gridColumnWidth?: number;
|
|
54
|
+
/** @deprecated see gridColumns */
|
|
31
55
|
gridGutter?: number;
|
|
32
|
-
gridRowHeight?: number;
|
|
33
56
|
};
|
|
34
57
|
/**
|
|
35
|
-
* The grid the popup's blocks are placed on, from its settings: whole columns, at least one, of the width
|
|
36
|
-
* with the gutter set between them
|
|
37
|
-
*
|
|
58
|
+
* The grid the popup's blocks are placed on, from its settings: whole columns, at least one, of the entry width
|
|
59
|
+
* set, with the gutter set between them and the vertical gap between blocks one above the other. Blocks' tops and
|
|
60
|
+
* heights are free, with no rhythm to snap to: the vertical gap alone keeps them apart, and a row height a menu
|
|
61
|
+
* was saved with is left behind. A menu saved before `gridLayout` keeps its own columns, width and gutter; what is
|
|
62
|
+
* not set at all, as in a menu saved before the popup had a grid of its own, is `fallback`'s, and a vertical gap
|
|
63
|
+
* never set is the gutter, the room blocks kept one above the other before it could be set apart.
|
|
38
64
|
*/
|
|
39
65
|
export declare function getPopupMenuGrid(settings: PopupMenuGridSettings, fallback?: PopupMenuGrid): PopupMenuGrid;
|
|
40
|
-
/** The room
|
|
41
|
-
export declare function
|
|
66
|
+
/** The least room kept between two blocks one above the other: the vertical gap, or, none set, the gutter. */
|
|
67
|
+
export declare function getPopupMenuRowGap(grid: PopupMenuGrid): number;
|
|
68
|
+
/** The popup's height as set: a percentage of the screen's height, from 0 to 100. */
|
|
69
|
+
export declare function getPopupMenuHeightPercent(settings: {
|
|
42
70
|
popupHeight?: number;
|
|
43
|
-
popupPadding?: PopupMenuSidesSetting;
|
|
44
71
|
}): number;
|
|
72
|
+
/**
|
|
73
|
+
* The room the popup's blocks are placed in: its whole height, as it has no padding, in fractions of the layout
|
|
74
|
+
* width. `viewportRatio` is the screen's height as a fraction of the layout width, a desktop's where not known;
|
|
75
|
+
* the popup is measured as drawn once open, so this only places blocks before it is.
|
|
76
|
+
*/
|
|
77
|
+
export declare function getPopupMenuHeight(settings: {
|
|
78
|
+
popupHeight?: number;
|
|
79
|
+
}, viewportRatio?: number): number;
|
|
80
|
+
/** Where the popup is aligned across the screen; none set, as in a menu saved before it could be, is the centre. */
|
|
81
|
+
export declare function getPopupMenuAlign(settings: {
|
|
82
|
+
popupAlign?: unknown;
|
|
83
|
+
}): PopupMenuAlign;
|
|
84
|
+
/**
|
|
85
|
+
* The popup's width, in fractions of the layout width: its grid's Width, as a structured block, Catalogue's say,
|
|
86
|
+
* is as wide as its grid's. A menu saved before its grid had a Width is as wide as its columns and gutters.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getPopupMenuWidth(settings: PopupMenuGridSettings, grid: PopupMenuGrid): number;
|
|
45
89
|
export type PopupMenuSides = {
|
|
46
90
|
top: number;
|
|
47
91
|
right: number;
|
|
48
92
|
bottom: number;
|
|
49
93
|
left: number;
|
|
50
94
|
};
|
|
51
|
-
/**
|
|
95
|
+
/** A margin or padding as set: a side each, or, saved before it had four, one for every side. */
|
|
52
96
|
export type PopupMenuSidesSetting = number | Partial<PopupMenuSides> | null;
|
|
53
|
-
/**
|
|
97
|
+
/** A margin or padding on every side, in fractions of the layout width; a side not set is none. */
|
|
54
98
|
export declare function getPopupMenuSides(sides: PopupMenuSidesSetting | undefined): PopupMenuSides;
|
|
55
99
|
export type PopupMenuLayout = {
|
|
56
100
|
seed: number;
|
|
@@ -91,7 +135,7 @@ export declare function getPopupMenuMinHeight(grid: PopupMenuGrid): number;
|
|
|
91
135
|
* the most the block may be for it to end inside the popup: past it, the most beats that still fit.
|
|
92
136
|
*/
|
|
93
137
|
export declare function snapPopupMenuHeight(grid: PopupMenuGrid, height: number, room?: number): number;
|
|
94
|
-
/** Whether two grids place blocks alike: the same columns, column width, gutter and rhythm. */
|
|
138
|
+
/** Whether two grids place blocks alike: the same columns, column width, gutter, vertical gap and rhythm. */
|
|
95
139
|
export declare function isSamePopupMenuGrid(a: PopupMenuGrid, b: PopupMenuGrid): boolean;
|
|
96
140
|
/**
|
|
97
141
|
* The layout on another grid, the layout grid as it is now rather than as it was when the layout was saved.
|
|
@@ -99,27 +143,19 @@ export declare function isSamePopupMenuGrid(a: PopupMenuGrid, b: PopupMenuGrid):
|
|
|
99
143
|
* column. Tops and set heights snap to the new rhythm. A layout already on `grid` comes back as it is.
|
|
100
144
|
*/
|
|
101
145
|
export declare function fitPopupMenuLayoutToGrid(layout: PopupMenuLayout, grid: PopupMenuGrid): PopupMenuLayout;
|
|
102
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* The room blocks are placed in and every block's height, in fractions of the layout width, as drawn. Blocks are
|
|
148
|
+
* moved within the room; settled, they are kept within it where they can be.
|
|
149
|
+
*/
|
|
103
150
|
export type PopupMenuMeasure = {
|
|
104
151
|
height: number;
|
|
105
152
|
heights: readonly number[];
|
|
106
153
|
};
|
|
107
|
-
/**
|
|
108
|
-
* Where a block is drawn, given its measured `height`, and how tall it may be there: at its top, and no taller
|
|
109
|
-
* than the room left below it in whole beats, so that it ends inside the popup, on the rhythm, rather than be
|
|
110
|
-
* pushed up over a block above. Where its top leaves less than a quarter of the popup and it is taller than
|
|
111
|
-
* what is left, it is raised, no further than that quarter takes, onto a beat. It may always grow to that
|
|
112
|
-
* quarter, so that a block measured short, an image still loading, shows it needs raising once it is not.
|
|
113
|
-
*/
|
|
114
|
-
export declare function drawPopupMenuBlock(top: number, height: number, room: number, beat?: number): {
|
|
115
|
-
top: number;
|
|
116
|
-
maxHeight: number;
|
|
117
|
-
};
|
|
118
154
|
/**
|
|
119
155
|
* The layout with one block moved to another column and top, keeping its span, its top snapped to the
|
|
120
156
|
* grid's rhythm and, given the popup measured, held where the block still ends inside it. Null when the
|
|
121
157
|
* column is off the grid, or, measured, when the block would cover part of another or come within a
|
|
122
|
-
*
|
|
158
|
+
* vertical gap of one above or below it.
|
|
123
159
|
*/
|
|
124
160
|
export declare function movePopupMenuBlock(layout: PopupMenuLayout, index: number, column: number, top: number, measure?: PopupMenuMeasure): PopupMenuLayout | null;
|
|
125
161
|
/**
|
|
@@ -129,12 +165,12 @@ export declare function movePopupMenuBlock(layout: PopupMenuLayout, index: numbe
|
|
|
129
165
|
*/
|
|
130
166
|
export declare function resizePopupMenuBlock(layout: PopupMenuLayout, index: number, next: PopupMenuPlacement, measure?: PopupMenuMeasure): PopupMenuLayout | null;
|
|
131
167
|
/**
|
|
132
|
-
* The layout with every block that comes within
|
|
168
|
+
* The layout with every block that comes within the vertical gap of one above it, in a column they share, pushed down
|
|
133
169
|
* below it onto the next beat. A generated layout spreads its rows without knowing how tall the blocks turn
|
|
134
170
|
* out, so a tall image or list can reach into the next row. Blocks are taken from the top down, each below
|
|
135
171
|
* every one already settled, so a pushed block pushes the ones under it in turn. A block pushed so low that it
|
|
136
|
-
* would
|
|
137
|
-
*
|
|
138
|
-
*
|
|
172
|
+
* would reach below the popup's bottom, `measure.height`, moves instead to the columns nearest it where it is
|
|
173
|
+
* pushed least and still ends inside the popup, and stays where it was pushed, the popup scrolling to it, only
|
|
174
|
+
* where none does. A layout that crowds nowhere comes back as it is.
|
|
139
175
|
*/
|
|
140
176
|
export declare function settlePopupMenuLayout(layout: PopupMenuLayout, measure: PopupMenuMeasure): PopupMenuLayout;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export declare function isInlineMaskUrl(url: string): boolean;
|
|
2
|
+
/** A data: URL holds an SVG only when its media type says so. */
|
|
3
|
+
export declare function isSvgDataUrl(url: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Whether a data: or blob: URL holds an SVG. A blob: URL, as an image is shown by in the
|
|
6
|
+
* editor while it uploads, says nothing of its type, so its blob is looked at.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isInlineSvgUrl(url: string): Promise<boolean>;
|
|
2
9
|
export declare function loadSvgMaskUrl(url: string): Promise<string>;
|