@bluepic/embed 0.6.50 → 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.
@@ -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
+ };
@@ -1,14 +1,44 @@
1
+ /**
2
+ * The bar above a page gallery. Two modes:
3
+ * - `anchors` (default): jump links to sections on one page; the active one
4
+ * carries `aria-current`.
5
+ * - `tabs`: real tabs (`tablist` / `tab`, roving tabindex, Left / Right /
6
+ * Home / End). The host renders only the active panel and labels it with
7
+ * `tabElementId(activeTab)` (see `idPrefix`).
8
+ *
9
+ * A tab is a plain string (id = label, the old API) or `{ id, label }`, so two
10
+ * entries may share a label. Many tabs scroll horizontally; soft fades mark the
11
+ * hidden ones and the active tab is scrolled into view.
12
+ */
13
+ type TabEntry = string | {
14
+ id: string;
15
+ label: string;
16
+ };
1
17
  type __VLS_Props = {
2
- tabs: string[];
18
+ tabs: TabEntry[];
19
+ mode?: 'anchors' | 'tabs';
20
+ ariaLabel?: string;
21
+ /** `tabs` mode: id of the panel the tabs control. */
22
+ panelId?: string;
23
+ /** Prefix of every tab button's DOM id (`<prefix>-<tab id>`). */
24
+ idPrefix?: string;
3
25
  };
26
+ declare function tabElementId(id: string): string;
4
27
  type __VLS_PublicProps = __VLS_Props & {
5
28
  'activeTab': string;
6
29
  };
7
- declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
31
+ tabElementId: typeof tabElementId;
32
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
33
  "click:category": (tab: string) => any;
9
34
  "update:activeTab": (value: string) => any;
10
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
36
  "onClick:category"?: ((tab: string) => any) | undefined;
12
37
  "onUpdate:activeTab"?: ((value: string) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
+ }>, {
39
+ ariaLabel: string;
40
+ mode: "anchors" | "tabs";
41
+ panelId: string;
42
+ idPrefix: string;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
44
  export default _default;
@@ -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
+ };
@@ -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;
@@ -13416,12 +13442,12 @@ export declare class BluepicEmbed extends EventTarget {
13416
13442
  thumbnailPending: boolean;
13417
13443
  createdAt: string;
13418
13444
  updatedAt: string;
13419
- pinnedBy: string[];
13420
13445
  assets?: {
13421
13446
  assetId: string;
13422
13447
  title?: string | null | undefined;
13423
13448
  description?: string | null | undefined;
13424
13449
  }[] | undefined;
13450
+ pinnedBy?: string[] | undefined;
13425
13451
  } | undefined, {
13426
13452
  id: number;
13427
13453
  uid: string;
@@ -13592,12 +13618,12 @@ export declare class BluepicEmbed extends EventTarget {
13592
13618
  thumbnailPending: boolean;
13593
13619
  createdAt: string;
13594
13620
  updatedAt: string;
13595
- pinnedBy: string[];
13596
13621
  assets?: {
13597
13622
  assetId: string;
13598
13623
  title?: string | null | undefined;
13599
13624
  description?: string | null | undefined;
13600
13625
  }[] | undefined;
13626
+ pinnedBy?: string[] | undefined;
13601
13627
  } | undefined>;
13602
13628
  bxCoreVersion: Ref<string | undefined, string | undefined>;
13603
13629
  allowPanAndZoom: Ref<boolean, boolean>;