@bluepic/embed 0.6.51 → 0.7.0-layouts.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/bluepic-embed.iife.js +110 -110
- package/dist/bluepic-embed.umd.js +110 -110
- package/dist/components/BxCarousel.vue.d.ts +55 -0
- package/dist/components/BxChips.vue.d.ts +35 -0
- package/dist/components/BxDrawer.vue.d.ts +27 -1
- package/dist/components/BxDrawerSheetBody.vue.d.ts +18 -0
- package/dist/components/BxNavMenu.vue.d.ts +35 -0
- package/dist/components/BxThemeScope.vue.d.ts +32 -0
- package/dist/components/BxTreeNav.vue.d.ts +47 -0
- package/dist/components/BxTreeNavBranch.vue.d.ts +7 -0
- package/dist/components/Tabs.vue.d.ts +10 -0
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +21 -0
- package/dist/components/TemplateEditor/editorArrangement.d.ts +20 -0
- package/dist/components/treeNav.d.ts +32 -0
- package/dist/embed/embed.d.ts +28 -2
- package/dist/main.cjs +41 -41
- package/dist/main.d.ts +11 -0
- package/dist/main.mjs +12662 -11285
- package/dist/style.css +1 -1
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/scope.d.ts +27 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +516 -473
- package/dist/util/a11y/reducedMotion.d.ts +5 -0
- package/dist/util/layout/scrollLock.d.ts +1 -0
- package/dist/util/layout/useScrollSpy.d.ts +24 -0
- package/dist/util/pageView.d.ts +127 -0
- package/package.json +6 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
3
|
+
readonly "onUpdate:index"?: ((value: number) => any) | undefined;
|
|
4
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:index"> & ({
|
|
5
|
+
items: readonly T[];
|
|
6
|
+
mode?: "3d" | "flat";
|
|
7
|
+
/** Stable key of an item. Default: its index. */
|
|
8
|
+
itemKey?: (item: T, index: number) => string | number;
|
|
9
|
+
/** Wrap around at the ends. */
|
|
10
|
+
loop?: boolean;
|
|
11
|
+
/** Side cards per side on the 3D stage. */
|
|
12
|
+
visible?: number;
|
|
13
|
+
/** CSS width of a card. */
|
|
14
|
+
cardWidth?: string;
|
|
15
|
+
/** Gap between cards in flat mode. */
|
|
16
|
+
gap?: string;
|
|
17
|
+
arrows?: boolean;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
/** Accessible name of a slide, also announced after a change. */
|
|
20
|
+
slideLabel?: (index: number, count: number) => string;
|
|
21
|
+
prevLabel?: string;
|
|
22
|
+
nextLabel?: string;
|
|
23
|
+
/** Extra attributes on the flat row (for example a host's sortable contract). */
|
|
24
|
+
listAttrs?: Record<string, string | number | boolean | undefined>;
|
|
25
|
+
/** Extra attributes per card. */
|
|
26
|
+
itemAttrs?: (item: T, index: number) => Record<string, string | number | boolean | undefined>;
|
|
27
|
+
} & {
|
|
28
|
+
index?: number;
|
|
29
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
30
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
31
|
+
go: (i: number) => void;
|
|
32
|
+
mode: import("vue").ComputedRef<"flat" | "3d">;
|
|
33
|
+
}>): void;
|
|
34
|
+
attrs: any;
|
|
35
|
+
slots: {
|
|
36
|
+
/** The front card. Optional: without it the front card renders `item` too. */
|
|
37
|
+
front?: (scope: {
|
|
38
|
+
item: T;
|
|
39
|
+
index: number;
|
|
40
|
+
}) => unknown;
|
|
41
|
+
item?: (scope: {
|
|
42
|
+
item: T;
|
|
43
|
+
index: number;
|
|
44
|
+
active: boolean;
|
|
45
|
+
offset: number;
|
|
46
|
+
}) => unknown;
|
|
47
|
+
};
|
|
48
|
+
emit: (evt: "update:index", value: number) => void;
|
|
49
|
+
}>) => import("vue").VNode & {
|
|
50
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_PrettifyLocal<T> = {
|
|
54
|
+
[K in keyof T]: T[K];
|
|
55
|
+
} & {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BxChipOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number | null;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
options: readonly BxChipOption[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
/** Label of a leading "all" chip. Omitted: no such chip. */
|
|
11
|
+
allLabel?: string | null;
|
|
12
|
+
/** Wrap onto several lines instead of scrolling sideways. */
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
size?: 'small' | 'medium';
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
ariaLabelledby?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
19
|
+
modelValue?: string | null | string[];
|
|
20
|
+
};
|
|
21
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
toggle: (id: string | null, selected: boolean) => any;
|
|
23
|
+
"update:modelValue": (value: string | string[] | null) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
onToggle?: ((id: string | null, selected: boolean) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
ariaLabelledby: string;
|
|
30
|
+
multiple: boolean;
|
|
31
|
+
size: "small" | "medium";
|
|
32
|
+
wrap: boolean;
|
|
33
|
+
allLabel: string | null;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Side drawer on the global popup stack. Focus trap, Escape and focus return
|
|
3
|
+
* come from the popup provider (`useFocusTrap`).
|
|
4
|
+
*
|
|
5
|
+
* `sheet` (opt-in, default off) turns it into a modal editor sheet:
|
|
6
|
+
* `role="dialog"` + `aria-modal`, named by its heading; focus moves to the
|
|
7
|
+
* heading on open; full screen below `fullscreenBelow` px viewport width
|
|
8
|
+
* (default 600); safe-area insets; the page behind does not scroll
|
|
9
|
+
* (`lockScroll`); a sticky `footer` slot. Without `sheet` nothing changes.
|
|
10
|
+
*/
|
|
11
|
+
import { type VNode } from 'vue';
|
|
2
12
|
export type DrawerPlacement = 'left' | 'right' | 'top' | 'bottom';
|
|
3
13
|
type __VLS_Props = {
|
|
4
14
|
trigger?: 'manual' | 'click';
|
|
@@ -11,6 +21,14 @@ type __VLS_Props = {
|
|
|
11
21
|
customClasses?: string[];
|
|
12
22
|
wrapperCustomClasses?: string[];
|
|
13
23
|
disableBackgroundEffect?: boolean;
|
|
24
|
+
/** Modal editor sheet (see above). Default false: today's drawer. */
|
|
25
|
+
sheet?: boolean;
|
|
26
|
+
/** Sheet only: below this viewport width (px) the sheet covers the screen. 0 = never. Default 600. */
|
|
27
|
+
fullscreenBelow?: number;
|
|
28
|
+
/** Sheet only: lock the page scroll while open. `true` locks the document; an element locks that scroll container. Default true. */
|
|
29
|
+
lockScroll?: boolean | HTMLElement | null;
|
|
30
|
+
/** Sheet only: accessible name when there is no heading. */
|
|
31
|
+
ariaLabel?: string;
|
|
14
32
|
};
|
|
15
33
|
type __VLS_Slots = {
|
|
16
34
|
default: (scope: {
|
|
@@ -26,12 +44,17 @@ type __VLS_Slots = {
|
|
|
26
44
|
['close-btn']?: (scope: {
|
|
27
45
|
close: () => void;
|
|
28
46
|
}) => VNode[];
|
|
47
|
+
/** Sheet only: sticky bar at the bottom (actions). */
|
|
48
|
+
footer?: (scope: {
|
|
49
|
+
close: () => void;
|
|
50
|
+
}) => VNode[];
|
|
29
51
|
};
|
|
30
52
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
53
|
"update:show": (args_0: boolean) => any;
|
|
32
54
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
55
|
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
34
56
|
}>, {
|
|
57
|
+
ariaLabel: string;
|
|
35
58
|
width: string;
|
|
36
59
|
disableBackgroundEffect: boolean;
|
|
37
60
|
wrapperCustomClasses: string[];
|
|
@@ -41,6 +64,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
41
64
|
closeable: boolean;
|
|
42
65
|
customClasses: string[];
|
|
43
66
|
height: string;
|
|
67
|
+
sheet: boolean;
|
|
68
|
+
fullscreenBelow: number;
|
|
69
|
+
lockScroll: boolean | HTMLElement | null;
|
|
44
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
71
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
46
72
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
headingId: string;
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
} & {
|
|
9
|
+
footer?: (props: typeof __VLS_3) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BxNavItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
count?: number | null;
|
|
5
|
+
href?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: readonly BxNavItem[] | null;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
items: readonly BxNavItem[];
|
|
11
|
+
overflow?: 'more' | 'scroll' | 'wrap';
|
|
12
|
+
align?: 'start' | 'center' | 'end';
|
|
13
|
+
moreLabel?: string;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
};
|
|
16
|
+
declare function measure(): void;
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
18
|
+
'active'?: string | null;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
21
|
+
close: () => null;
|
|
22
|
+
measure: typeof measure;
|
|
23
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
select: (item: BxNavItem) => any;
|
|
25
|
+
"update:active": (value: string | null) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
onSelect?: ((item: BxNavItem) => any) | undefined;
|
|
28
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
align: "start" | "center" | "end";
|
|
32
|
+
overflow: "more" | "scroll" | "wrap";
|
|
33
|
+
moreLabel: string;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ThemeInput } from '../theme/tokens';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Band colour, any CSS colour. Empty or unparseable: no scope. */
|
|
4
|
+
surface?: string | null;
|
|
5
|
+
/** Page theme. Overrides the injected one. */
|
|
6
|
+
input?: ThemeInput | null;
|
|
7
|
+
/** Root element. */
|
|
8
|
+
as?: string;
|
|
9
|
+
/** Paint the band: `background-color: var(--bx-surface)` and `color: var(--bx-text)`. */
|
|
10
|
+
paint?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_6: {
|
|
13
|
+
mode: "light" | "dark" | null;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
default?: (props: typeof __VLS_6) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
19
|
+
scope: import("vue").ComputedRef<import("../theme").ThemeScope | null>;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
input: ThemeInput | null;
|
|
22
|
+
surface: string | null;
|
|
23
|
+
as: string;
|
|
24
|
+
paint: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type BxTreeNode } from './treeNav';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
nodes: readonly BxTreeNode[];
|
|
4
|
+
showCounts?: boolean;
|
|
5
|
+
/** Selecting a node with children also opens it. */
|
|
6
|
+
expandOnSelect?: boolean;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
ariaLabelledby?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
/** Replaces the label text of a row. */
|
|
12
|
+
label?: (scope: {
|
|
13
|
+
node: BxTreeNode;
|
|
14
|
+
level: number;
|
|
15
|
+
expanded: boolean;
|
|
16
|
+
active: boolean;
|
|
17
|
+
}) => unknown;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
20
|
+
'active'?: string | null;
|
|
21
|
+
'expanded'?: string[];
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
24
|
+
focus: () => void | "";
|
|
25
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
select: (node: BxTreeNode) => any;
|
|
27
|
+
toggle: (id: string, expanded: boolean) => any;
|
|
28
|
+
"update:active": (value: string | null) => any;
|
|
29
|
+
"update:expanded": (value: string[]) => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
31
|
+
onSelect?: ((node: BxTreeNode) => any) | undefined;
|
|
32
|
+
onToggle?: ((id: string, expanded: boolean) => any) | undefined;
|
|
33
|
+
"onUpdate:active"?: ((value: string | null) => any) | undefined;
|
|
34
|
+
"onUpdate:expanded"?: ((value: string[]) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
ariaLabel: string;
|
|
37
|
+
ariaLabelledby: string;
|
|
38
|
+
showCounts: boolean;
|
|
39
|
+
expandOnSelect: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BxTreeNode } from './treeNav';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
nodes: readonly BxTreeNode[];
|
|
4
|
+
level: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
* A tab is a plain string (id = label, the old API) or `{ id, label }`, so two
|
|
10
10
|
* entries may share a label. Many tabs scroll horizontally; soft fades mark the
|
|
11
11
|
* hidden ones and the active tab is scrolled into view.
|
|
12
|
+
*
|
|
13
|
+
* `variant`: `boxed` (default, bordered buttons), `underline` (a bar with an
|
|
14
|
+
* indicator under the active tab), `pill` (rounded, the active one filled).
|
|
15
|
+
* An object tab may carry a `count`, shown after the label.
|
|
12
16
|
*/
|
|
13
17
|
type TabEntry = string | {
|
|
14
18
|
id: string;
|
|
15
19
|
label: string;
|
|
20
|
+
count?: number | null;
|
|
16
21
|
};
|
|
17
22
|
type __VLS_Props = {
|
|
18
23
|
tabs: TabEntry[];
|
|
@@ -22,6 +27,9 @@ type __VLS_Props = {
|
|
|
22
27
|
panelId?: string;
|
|
23
28
|
/** Prefix of every tab button's DOM id (`<prefix>-<tab id>`). */
|
|
24
29
|
idPrefix?: string;
|
|
30
|
+
variant?: 'boxed' | 'underline' | 'pill';
|
|
31
|
+
/** `start`: tabs start at the left edge instead of centring. */
|
|
32
|
+
align?: 'center' | 'start';
|
|
25
33
|
};
|
|
26
34
|
declare function tabElementId(id: string): string;
|
|
27
35
|
type __VLS_PublicProps = __VLS_Props & {
|
|
@@ -38,6 +46,8 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
38
46
|
}>, {
|
|
39
47
|
ariaLabel: string;
|
|
40
48
|
mode: "anchors" | "tabs";
|
|
49
|
+
variant: "boxed" | "underline" | "pill";
|
|
50
|
+
align: "center" | "start";
|
|
41
51
|
panelId: string;
|
|
42
52
|
idPrefix: string;
|
|
43
53
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -10,6 +10,7 @@ import 'swiper/css/scrollbar';
|
|
|
10
10
|
import type { EditorCanvas } from '../../util/canvases';
|
|
11
11
|
import type { ExportAnalyticsSink } from '../../util/analytics';
|
|
12
12
|
import { nextTick } from 'vue';
|
|
13
|
+
import { type BxTemplateEditorChrome, type BxTemplateEditorFieldsPlacement } from './editorArrangement';
|
|
13
14
|
type __VLS_Props = {
|
|
14
15
|
bxCoreVersion?: string;
|
|
15
16
|
/** Override the sandbox host (defaults to sandbox.bluepic.io). e.g. sandbox.bluepic.eu */
|
|
@@ -166,6 +167,24 @@ type __VLS_Props = {
|
|
|
166
167
|
* …). With `fieldStatus` they count as done whatever their value.
|
|
167
168
|
*/
|
|
168
169
|
prefilledKeys?: string[];
|
|
170
|
+
/**
|
|
171
|
+
* Header arrangement. `full` (default): back, branding, legal, mode switch, batch nav,
|
|
172
|
+
* export, format switcher. `actions`: only Export, the format switcher and
|
|
173
|
+
* `navbar-right`, right-aligned, without the bar background (the host page owns the rest).
|
|
174
|
+
*/
|
|
175
|
+
chrome?: BxTemplateEditorChrome;
|
|
176
|
+
/**
|
|
177
|
+
* Desktop list arrangement. `side` (default): fields beside the preview. `below`: fields
|
|
178
|
+
* under a width-fitted preview; the editor then sizes to its content instead of filling
|
|
179
|
+
* its parent. Phones (`layout: 'mobile'`) and batch mode keep their arrangement.
|
|
180
|
+
*/
|
|
181
|
+
fieldsPlacement?: BxTemplateEditorFieldsPlacement;
|
|
182
|
+
/**
|
|
183
|
+
* Desktop list only: show the first `fieldLimit - 1` fields and fold the rest into a
|
|
184
|
+
* "More fields (n)" button that expands in place. Exactly `fieldLimit` fields: all show.
|
|
185
|
+
* Unset (default): no limit.
|
|
186
|
+
*/
|
|
187
|
+
fieldLimit?: number;
|
|
169
188
|
};
|
|
170
189
|
type __VLS_Slots = {
|
|
171
190
|
/**
|
|
@@ -3365,6 +3384,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
3365
3384
|
bottom: number;
|
|
3366
3385
|
left: number;
|
|
3367
3386
|
};
|
|
3387
|
+
chrome: BxTemplateEditorChrome;
|
|
3388
|
+
fieldsPlacement: BxTemplateEditorFieldsPlacement;
|
|
3368
3389
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3369
3390
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
3370
3391
|
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Additive arrangement options of BxTemplateEditor (webpage layouts). Defaults equal the
|
|
3
|
+
* editor's historical behaviour, so hosts that pass none of them see no change.
|
|
4
|
+
*/
|
|
5
|
+
/** `full`: today's header. `actions`: only Export, canvas switcher and `navbar-right`, right-aligned, no bar background. */
|
|
6
|
+
export type BxTemplateEditorChrome = 'full' | 'actions';
|
|
7
|
+
/** Desktop list arrangement. `side`: fields beside the preview (today). `below`: fields under a width-fitted preview. */
|
|
8
|
+
export type BxTemplateEditorFieldsPlacement = 'side' | 'below';
|
|
9
|
+
/**
|
|
10
|
+
* How many fields the desktop list shows for a `fieldLimit`.
|
|
11
|
+
*
|
|
12
|
+
* - no limit (undefined, not finite, < 1) or everything fits: all fields.
|
|
13
|
+
* - more fields than the limit: the first `limit - 1`, the rest behind "More fields (n)".
|
|
14
|
+
* Folding a single field behind a disclosure would cost a row and save none, which is
|
|
15
|
+
* why exactly `limit` fields all show.
|
|
16
|
+
*/
|
|
17
|
+
export declare function fieldLimitSplit<T>(fields: readonly T[], limit: number | undefined, expanded: boolean): {
|
|
18
|
+
shown: T[];
|
|
19
|
+
hiddenCount: number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { InjectionKey, Slot } from 'vue';
|
|
2
|
+
export type BxTreeNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Shown after the label. */
|
|
6
|
+
count?: number | null;
|
|
7
|
+
/** Hover text (`title`). */
|
|
8
|
+
description?: string | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
children?: readonly BxTreeNode[] | null;
|
|
11
|
+
};
|
|
12
|
+
export type BxTreeNavContext = {
|
|
13
|
+
isExpanded: (id: string) => boolean;
|
|
14
|
+
isActive: (id: string) => boolean;
|
|
15
|
+
isTabbable: (id: string) => boolean;
|
|
16
|
+
showCounts: () => boolean;
|
|
17
|
+
activate: (node: BxTreeNode) => void;
|
|
18
|
+
toggle: (node: BxTreeNode) => void;
|
|
19
|
+
focus: (id: string) => void;
|
|
20
|
+
setItemEl: (id: string, el: HTMLElement | null) => void;
|
|
21
|
+
labelSlot: () => Slot | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const TREE_NAV_KEY: InjectionKey<BxTreeNavContext>;
|
|
24
|
+
export type TreeRow = {
|
|
25
|
+
node: BxTreeNode;
|
|
26
|
+
level: number;
|
|
27
|
+
parentId: string | null;
|
|
28
|
+
};
|
|
29
|
+
/** Rows a keyboard user can reach: every node whose ancestors are all expanded, in display order. */
|
|
30
|
+
export declare function visibleTreeRows(nodes: readonly BxTreeNode[], isExpanded: (id: string) => boolean, level?: number, parentId?: string | null, out?: TreeRow[]): TreeRow[];
|
|
31
|
+
/** Ids from the root down to the node's parent, or null when the id is not in the tree. */
|
|
32
|
+
export declare function treeAncestors(nodes: readonly BxTreeNode[], id: string, path?: string[]): string[] | null;
|
package/dist/embed/embed.d.ts
CHANGED
|
@@ -76,6 +76,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
76
76
|
readonly batchRows?: import("../util/batch/useBatchRows").BatchRow[] | undefined;
|
|
77
77
|
readonly fieldStatus?: boolean | undefined;
|
|
78
78
|
readonly prefilledKeys?: string[] | undefined;
|
|
79
|
+
readonly chrome?: import("../main").BxTemplateEditorChrome | undefined;
|
|
80
|
+
readonly fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement | undefined;
|
|
81
|
+
readonly fieldLimit?: number | undefined;
|
|
79
82
|
readonly "onUpdate:data"?: ((args_0: {
|
|
80
83
|
[k: string]: unknown;
|
|
81
84
|
}) => any) | undefined;
|
|
@@ -163,6 +166,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
163
166
|
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
164
167
|
fieldStatus?: boolean;
|
|
165
168
|
prefilledKeys?: string[];
|
|
169
|
+
chrome?: import("../main").BxTemplateEditorChrome;
|
|
170
|
+
fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement;
|
|
171
|
+
fieldLimit?: number;
|
|
166
172
|
}> & Readonly<{
|
|
167
173
|
"onUpdate:data"?: ((args_0: {
|
|
168
174
|
[k: string]: unknown;
|
|
@@ -3350,6 +3356,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3350
3356
|
bottom: number;
|
|
3351
3357
|
left: number;
|
|
3352
3358
|
};
|
|
3359
|
+
chrome: import("../main").BxTemplateEditorChrome;
|
|
3360
|
+
fieldsPlacement: import("../main").BxTemplateEditorFieldsPlacement;
|
|
3353
3361
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
3354
3362
|
beforeCreate?: (() => void) | (() => void)[];
|
|
3355
3363
|
created?: (() => void) | (() => void)[];
|
|
@@ -3387,6 +3395,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3387
3395
|
bottom: number;
|
|
3388
3396
|
left: number;
|
|
3389
3397
|
};
|
|
3398
|
+
chrome: import("../main").BxTemplateEditorChrome;
|
|
3399
|
+
fieldsPlacement: import("../main").BxTemplateEditorFieldsPlacement;
|
|
3390
3400
|
}> & Omit<Readonly<{
|
|
3391
3401
|
bxCoreVersion?: string;
|
|
3392
3402
|
cloudflarePagesHostname?: string;
|
|
@@ -3451,6 +3461,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3451
3461
|
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
3452
3462
|
fieldStatus?: boolean;
|
|
3453
3463
|
prefilledKeys?: string[];
|
|
3464
|
+
chrome?: import("../main").BxTemplateEditorChrome;
|
|
3465
|
+
fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement;
|
|
3466
|
+
fieldLimit?: number;
|
|
3454
3467
|
}> & Readonly<{
|
|
3455
3468
|
"onUpdate:data"?: ((args_0: {
|
|
3456
3469
|
[k: string]: unknown;
|
|
@@ -3458,7 +3471,7 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3458
3471
|
onBack?: (() => any) | undefined;
|
|
3459
3472
|
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
3460
3473
|
"onSwitch-canvas"?: ((canvasId: string, snapshotUrl: string | undefined) => any) | undefined;
|
|
3461
|
-
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile")> & import("vue").ShallowUnwrapRef<{
|
|
3474
|
+
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile" | "chrome" | "fieldsPlacement")> & import("vue").ShallowUnwrapRef<{
|
|
3462
3475
|
templateViewRef: Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
3463
3476
|
bxCoreVersion?: string;
|
|
3464
3477
|
cloudflarePagesHostname?: string;
|
|
@@ -6690,6 +6703,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
6690
6703
|
readonly batchRows?: import("../util/batch/useBatchRows").BatchRow[] | undefined;
|
|
6691
6704
|
readonly fieldStatus?: boolean | undefined;
|
|
6692
6705
|
readonly prefilledKeys?: string[] | undefined;
|
|
6706
|
+
readonly chrome?: import("../main").BxTemplateEditorChrome | undefined;
|
|
6707
|
+
readonly fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement | undefined;
|
|
6708
|
+
readonly fieldLimit?: number | undefined;
|
|
6693
6709
|
readonly "onUpdate:data"?: ((args_0: {
|
|
6694
6710
|
[k: string]: unknown;
|
|
6695
6711
|
}) => any) | undefined;
|
|
@@ -6777,6 +6793,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
6777
6793
|
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
6778
6794
|
fieldStatus?: boolean;
|
|
6779
6795
|
prefilledKeys?: string[];
|
|
6796
|
+
chrome?: import("../main").BxTemplateEditorChrome;
|
|
6797
|
+
fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement;
|
|
6798
|
+
fieldLimit?: number;
|
|
6780
6799
|
}> & Readonly<{
|
|
6781
6800
|
"onUpdate:data"?: ((args_0: {
|
|
6782
6801
|
[k: string]: unknown;
|
|
@@ -9964,6 +9983,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
9964
9983
|
bottom: number;
|
|
9965
9984
|
left: number;
|
|
9966
9985
|
};
|
|
9986
|
+
chrome: import("../main").BxTemplateEditorChrome;
|
|
9987
|
+
fieldsPlacement: import("../main").BxTemplateEditorFieldsPlacement;
|
|
9967
9988
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
9968
9989
|
beforeCreate?: (() => void) | (() => void)[];
|
|
9969
9990
|
created?: (() => void) | (() => void)[];
|
|
@@ -10001,6 +10022,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
10001
10022
|
bottom: number;
|
|
10002
10023
|
left: number;
|
|
10003
10024
|
};
|
|
10025
|
+
chrome: import("../main").BxTemplateEditorChrome;
|
|
10026
|
+
fieldsPlacement: import("../main").BxTemplateEditorFieldsPlacement;
|
|
10004
10027
|
}> & Omit<Readonly<{
|
|
10005
10028
|
bxCoreVersion?: string;
|
|
10006
10029
|
cloudflarePagesHostname?: string;
|
|
@@ -10065,6 +10088,9 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
10065
10088
|
batchRows?: import("../util/batch/useBatchRows").BatchRow[];
|
|
10066
10089
|
fieldStatus?: boolean;
|
|
10067
10090
|
prefilledKeys?: string[];
|
|
10091
|
+
chrome?: import("../main").BxTemplateEditorChrome;
|
|
10092
|
+
fieldsPlacement?: import("../main").BxTemplateEditorFieldsPlacement;
|
|
10093
|
+
fieldLimit?: number;
|
|
10068
10094
|
}> & Readonly<{
|
|
10069
10095
|
"onUpdate:data"?: ((args_0: {
|
|
10070
10096
|
[k: string]: unknown;
|
|
@@ -10072,7 +10098,7 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
10072
10098
|
onBack?: (() => any) | undefined;
|
|
10073
10099
|
"onUpdate:batchRows"?: ((args_0: import("../util/batch/useBatchRows").BatchRow[]) => any) | undefined;
|
|
10074
10100
|
"onSwitch-canvas"?: ((canvasId: string, snapshotUrl: string | undefined) => any) | undefined;
|
|
10075
|
-
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile")> & import("vue").ShallowUnwrapRef<{
|
|
10101
|
+
}>, "templateViewRef" | ("zoomAndPan" | "editMode" | "videoBatchMaxSize" | "preCacheLocalRendering" | "liveViewOffsetDesktop" | "liveViewOffsetMobile" | "chrome" | "fieldsPlacement")> & import("vue").ShallowUnwrapRef<{
|
|
10076
10102
|
templateViewRef: Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
10077
10103
|
bxCoreVersion?: string;
|
|
10078
10104
|
cloudflarePagesHostname?: string;
|