@bluepic/embed 0.6.51 → 0.7.0-layouts.1
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 +129 -129
- package/dist/bluepic-embed.umd.js +129 -129
- package/dist/components/BxThemeScope.vue.d.ts +32 -0
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +21 -0
- package/dist/components/TemplateEditor/editorArrangement.d.ts +20 -0
- package/dist/embed/embed.d.ts +28 -2
- package/dist/main.cjs +41 -41
- package/dist/main.d.ts +2 -0
- package/dist/main.mjs +3278 -3149
- 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/package.json +4 -2
|
@@ -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
|
+
};
|
|
@@ -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
|
+
};
|
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;
|