@bluepic/embed 0.4.0-next.99 → 0.5.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 +402 -178
- package/dist/bluepic-embed.umd.js +402 -178
- package/dist/components/AssetViewer/AssetViewer.vue.d.ts +71 -0
- package/dist/components/BxAudioPlayButton.vue.d.ts +24 -0
- package/dist/components/BxCard.vue.d.ts +35 -0
- package/dist/components/BxInput.vue.d.ts +7 -1
- package/dist/components/BxList.vue.d.ts +9 -0
- package/dist/components/BxListItem.vue.d.ts +13 -1
- package/dist/components/BxPopover.vue.d.ts +7 -0
- package/dist/components/BxPreviewLayer.vue.d.ts +18 -0
- package/dist/components/BxScrollbar.vue.d.ts +7 -0
- package/dist/components/BxSelect.vue.d.ts +16 -2
- package/dist/components/BxTable.vue.d.ts +109 -0
- package/dist/components/BxTabs.vue.d.ts +7 -0
- package/dist/components/BxWaveformThumb.vue.d.ts +27 -0
- package/dist/components/CollectionFieldPopup.vue.d.ts +4 -0
- package/dist/components/PopoverElement.vue.d.ts +10 -1
- package/dist/components/TemplateEditor/BatchCell.vue.d.ts +18 -0
- package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +264 -0
- package/dist/components/TemplateEditor/BatchExportPopup.vue.d.ts +68 -0
- package/dist/components/TemplateEditor/BatchImportPopup.vue.d.ts +25 -0
- package/dist/components/TemplateEditor/BxLiveTemplate.vue.d.ts +8 -0
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +285 -16
- package/dist/components/TemplateEditor/FieldHintsLayer.vue.d.ts +86 -0
- package/dist/components/TemplateEditor/TemplateView.vue.d.ts +77 -2
- package/dist/components/User/UserInfo.vue.d.ts +12 -1
- package/dist/components/directives/usePopup.d.ts +5 -0
- package/dist/components/fields/Collection.vue.d.ts +3 -0
- package/dist/components/fields/Image.vue.d.ts +19 -5
- package/dist/components/fields/ImageEdit.vue.d.ts +6 -1
- package/dist/components/fields/Text.vue.d.ts +1 -1
- package/dist/embed/embed.d.ts +1024 -228
- package/dist/{index-CWm6zOv7.js → index-C99_zLhc.js} +9 -9
- package/dist/index-D8N6IfRw.cjs +1 -0
- package/dist/main.cjs +240 -162
- package/dist/main.d.ts +20 -0
- package/dist/main.mjs +79043 -68465
- package/dist/markdown-it-5-ieF6Bh.js +3790 -0
- package/dist/markdown-it-CLB5Jta6.cjs +16 -0
- package/dist/postal-mime-Df-WB8Vq.js +3337 -0
- package/dist/postal-mime-_7WF5UBe.cjs +28 -0
- package/dist/style.css +1 -1
- package/dist/theme/bridge.d.ts +14 -0
- package/dist/theme/color.d.ts +80 -0
- package/dist/theme/css.d.ts +8 -0
- package/dist/theme/index.d.ts +19 -0
- package/dist/theme/legacy.d.ts +3 -0
- package/dist/theme/resolve.d.ts +10 -0
- package/dist/theme/tokens.d.ts +129 -0
- package/dist/theme/types-contract.d.ts +13 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.mjs +1313 -0
- package/dist/util/assetAuth.d.ts +35 -0
- package/dist/util/audioPreview.d.ts +8 -0
- package/dist/util/batch/csv.d.ts +58 -0
- package/dist/util/batch/export.d.ts +92 -0
- package/dist/util/batch/fields.d.ts +22 -0
- package/dist/util/batch/parseCSV.d.ts +72 -0
- package/dist/util/batch/useBatchRows.d.ts +67 -0
- package/dist/util/cloneDeep.d.ts +5 -5
- package/dist/util/cloudflareImages.d.ts +8 -1
- package/dist/util/contextCapture.d.ts +19 -0
- package/dist/util/export.d.ts +65 -18
- package/dist/util/fieldHints/chipAction.d.ts +23 -0
- package/dist/util/fieldHints/fieldFocus.d.ts +81 -0
- package/dist/util/fieldHints/geometry.d.ts +52 -0
- package/dist/util/fieldHints/index.d.ts +20 -0
- package/dist/util/fieldHints/probe.d.ts +84 -0
- package/dist/util/fieldHints/resolve.d.ts +55 -0
- package/dist/util/fieldHints/textProbe.d.ts +71 -0
- package/dist/util/fieldHints/useCanvasTextEditing.d.ts +125 -0
- package/dist/util/fieldHints/useChipHighlight.d.ts +29 -0
- package/dist/util/fieldHints/useFieldHitboxes.d.ts +5601 -0
- package/dist/util/fieldHints/useHintReveal.d.ts +10 -0
- package/dist/util/fieldTree.d.ts +20 -0
- package/dist/util/fields.d.ts +1 -1
- package/dist/util/gallery.d.ts +78 -30
- package/dist/util/popoverArrow.d.ts +33 -0
- package/dist/util/popupHeaderTools.d.ts +26 -0
- package/dist/util/scrollPassthrough.d.ts +9 -0
- package/dist/util/useTheme.d.ts +36 -1
- package/dist/util/visualViewport.d.ts +47 -0
- package/dist/xlsx-BopDBbWb.js +24176 -0
- package/dist/xlsx-qn1xoUuv.cjs +105 -0
- package/package.json +18 -5
- package/dist/index-DFXQWOGQ.cjs +0 -1
- package/dist/util/backgroundRemoval.d.ts +0 -51
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type AssetAuth } from '../../util/assetAuth';
|
|
2
|
+
/**
|
|
3
|
+
* Brand Portal — the asset viewer.
|
|
4
|
+
*
|
|
5
|
+
* Renders inside the existing overlay API (usePopup / injectPortal), the same
|
|
6
|
+
* surface as the image cropper, rather than sending the visitor to a browser
|
|
7
|
+
* tab.
|
|
8
|
+
*
|
|
9
|
+
* Efficiency rules that are load-bearing, not polish:
|
|
10
|
+
* - page rendering is INJECTED by the host (`renderPage`) rather than importing
|
|
11
|
+
* @bluepic/raster here. Embed ships a UMD build, and raster's root entry
|
|
12
|
+
* carries CommonJS interop that Rollup cannot express in UMD (it emits an
|
|
13
|
+
* invalid `var main.commonjsGlobal`). Injection also keeps the heavy engines
|
|
14
|
+
* out of embed entirely — the host loads them only if it has documents.
|
|
15
|
+
* Without a `renderPage`, paged types degrade to the download-only panel;
|
|
16
|
+
* - one page is rendered at a time, at a DPR clamped to 2;
|
|
17
|
+
* - at most PAGE_CACHE_LIMIT rendered pages are retained, so a 400-page PDF
|
|
18
|
+
* cannot hold 400 canvases;
|
|
19
|
+
* - in-flight work is abandoned on close/page-change — an orphaned
|
|
20
|
+
* Ghostscript-WASM job otherwise keeps a phone warm long after the user left.
|
|
21
|
+
*/
|
|
22
|
+
export type ViewerAsset = {
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
filename: string;
|
|
26
|
+
mime: string;
|
|
27
|
+
size: number;
|
|
28
|
+
kind: 'image' | 'file';
|
|
29
|
+
previewUrl: string | null;
|
|
30
|
+
description?: string | null;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
pageCount?: number;
|
|
34
|
+
/** Gated URL. Used both to fetch bytes for rasterization and to display media. */
|
|
35
|
+
downloadUrl: string;
|
|
36
|
+
/**
|
|
37
|
+
* A paginated, browser-renderable form: the file for a PDF, the server-made
|
|
38
|
+
* PDF derivative for Office/ODF. Its presence is what turns a .docx into
|
|
39
|
+
* something with pages instead of a download button.
|
|
40
|
+
*/
|
|
41
|
+
documentUrl?: string;
|
|
42
|
+
};
|
|
43
|
+
type __VLS_Props = {
|
|
44
|
+
asset: ViewerAsset;
|
|
45
|
+
/**
|
|
46
|
+
* Render one page of a document into the supplied canvas. Supplied by the
|
|
47
|
+
* host (bx-template passes @bluepic/raster). Absent → no paged preview.
|
|
48
|
+
*/
|
|
49
|
+
renderPage?: (bytes: ArrayBuffer, canvas: HTMLCanvasElement, opts: {
|
|
50
|
+
page: number;
|
|
51
|
+
dpi: number;
|
|
52
|
+
}) => Promise<void>;
|
|
53
|
+
/** Page count for a paged document, when the host can determine it. */
|
|
54
|
+
getPageCount?: (bytes: ArrayBuffer) => Promise<number>;
|
|
55
|
+
/**
|
|
56
|
+
* Proof of access for a PROTECTED campaign — the password it was unlocked
|
|
57
|
+
* with and/or the signed-in visitor's access token. Every `fetch()` here
|
|
58
|
+
* sends it as headers; the media elements, which cannot, get it as query
|
|
59
|
+
* parameters (see `util/assetAuth`). Absent for a public campaign, which
|
|
60
|
+
* leaves every request exactly as it was.
|
|
61
|
+
*/
|
|
62
|
+
assetAuth?: AssetAuth | null;
|
|
63
|
+
};
|
|
64
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
65
|
+
close: () => any;
|
|
66
|
+
download: (asset: ViewerAsset) => any;
|
|
67
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
68
|
+
onClose?: (() => any) | undefined;
|
|
69
|
+
onDownload?: ((asset: ViewerAsset) => any) | undefined;
|
|
70
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
71
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The round play/pause control that sits in the middle of an audio card, with
|
|
3
|
+
* its own progress ring.
|
|
4
|
+
*
|
|
5
|
+
* Lives in the embed so the studio library and the portal show the SAME control
|
|
6
|
+
* — the two surfaces render audio assets side by side in a user's mind, and a
|
|
7
|
+
* different affordance in each is how they drift apart.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
playing?: boolean;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** 0–1. */
|
|
13
|
+
progress?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
|
+
toggle: () => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onToggle?: (() => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
progress: number;
|
|
21
|
+
playing: boolean;
|
|
22
|
+
loading: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -9,6 +9,38 @@ type __VLS_Props = {
|
|
|
9
9
|
coverWidth?: string;
|
|
10
10
|
hoverable?: boolean;
|
|
11
11
|
dividers?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Corner rounding. `none` is for cards that tile edge to edge, where a
|
|
14
|
+
* radius reads as a gap that is not there.
|
|
15
|
+
*/
|
|
16
|
+
radius?: 'none' | 'sm' | 'md' | 'lg';
|
|
17
|
+
/**
|
|
18
|
+
* Stack the content slot with a gap. Without it the content is a plain
|
|
19
|
+
* block, which is why almost every caller re-declared
|
|
20
|
+
* `display:flex; flex-direction:column; gap:…` and, from there, went on to
|
|
21
|
+
* hand-roll the whole card.
|
|
22
|
+
*/
|
|
23
|
+
contentGap?: 'none' | 'sm' | 'md' | 'lg';
|
|
24
|
+
/**
|
|
25
|
+
* Let the CONTENT scroll inside the card.
|
|
26
|
+
*
|
|
27
|
+
* The wrapper sits OUTSIDE the padding and the content carries it instead,
|
|
28
|
+
* so the scrollbar rail runs along the card's edge rather than floating in
|
|
29
|
+
* the middle of a 15px gutter — and the first line of content is not
|
|
30
|
+
* clipped against the top of the scrollport when it moves.
|
|
31
|
+
*
|
|
32
|
+
* Every caller that tried this from outside got it wrong the same way: a
|
|
33
|
+
* `max-height` on a `bx-scrollbar` is inert, because the scrollbar is
|
|
34
|
+
* `height: 100%` and the percentage resolves against an auto-height parent.
|
|
35
|
+
* Here the card gives it a definite height to fill.
|
|
36
|
+
*/
|
|
37
|
+
scrollable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The cap the content scrolls within — any CSS length. Without one the card
|
|
40
|
+
* grows to its content and nothing scrolls, which is the right behaviour
|
|
41
|
+
* for a card that fits.
|
|
42
|
+
*/
|
|
43
|
+
maxContentHeight?: string;
|
|
12
44
|
state?: 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
13
45
|
};
|
|
14
46
|
type __VLS_Slots = {
|
|
@@ -27,6 +59,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
27
59
|
bordered: boolean;
|
|
28
60
|
hoverable: boolean;
|
|
29
61
|
dividers: boolean;
|
|
62
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
63
|
+
contentGap: "none" | "sm" | "md" | "lg";
|
|
64
|
+
scrollable: boolean;
|
|
30
65
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
66
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
67
|
export default _default;
|
|
@@ -27,7 +27,13 @@ type __VLS_Props = {
|
|
|
27
27
|
noStyleLabel: Localized<string>;
|
|
28
28
|
mixedStyleLabel: Localized<string>;
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Explicit CSS max-height for the (textarea/richtext) input. When omitted, a
|
|
32
|
+
* textarea auto-grows up to `maxRows` lines.
|
|
33
|
+
*/
|
|
30
34
|
maxHeight?: string;
|
|
35
|
+
/** Maximum number of visible lines a `textarea` grows to before it scrolls. */
|
|
36
|
+
maxRows?: number;
|
|
31
37
|
minHeight?: string;
|
|
32
38
|
readonly?: boolean;
|
|
33
39
|
readonlyMessage?: string;
|
|
@@ -77,7 +83,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
77
83
|
ring: boolean;
|
|
78
84
|
clearable: boolean;
|
|
79
85
|
resizeable: boolean;
|
|
80
|
-
|
|
86
|
+
maxRows: number;
|
|
81
87
|
readonly: boolean;
|
|
82
88
|
readonlyMessage: string;
|
|
83
89
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
divider?: boolean;
|
|
4
|
+
/** Outer border and rounding, so a list can stand on its own surface. */
|
|
5
|
+
bordered?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* `plain` is a run of rows. `card` gives every row its own surface with a
|
|
8
|
+
* gap between them, for lists whose items are objects rather than lines.
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'plain' | 'card';
|
|
4
11
|
};
|
|
5
12
|
type __VLS_Slots = {
|
|
6
13
|
default: () => VNode[] | VNode;
|
|
7
14
|
};
|
|
8
15
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
bordered: boolean;
|
|
9
17
|
divider: boolean;
|
|
18
|
+
variant: "plain" | "card";
|
|
10
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
20
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
12
21
|
export default _default;
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Whether clicking the row does something. Rows used to get a pointer
|
|
5
|
+
* cursor and a hover background unconditionally, which is why static lists
|
|
6
|
+
* were hand-rolled as <ul>s instead: a row that looks clickable and is not
|
|
7
|
+
* is worse than no component. Defaults to `true` so no existing list
|
|
8
|
+
* changes.
|
|
9
|
+
*/
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
};
|
|
2
12
|
type __VLS_Slots = {
|
|
3
13
|
default: () => VNode[] | VNode;
|
|
4
14
|
prefix?: () => VNode[] | VNode;
|
|
5
15
|
suffix?: () => VNode[] | VNode;
|
|
6
16
|
};
|
|
7
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
interactive: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
20
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
9
21
|
export default _default;
|
|
10
22
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -19,6 +19,12 @@ type __VLS_Props = {
|
|
|
19
19
|
role?: string;
|
|
20
20
|
killExistingRoleEntriesOnHoverShow?: boolean;
|
|
21
21
|
maxPopoverHeight?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Override the scroll pass-through decision. Defaults to "on whenever there
|
|
24
|
+
* is no darkened background", which is what makes a non-modal popover stop
|
|
25
|
+
* freezing the page behind it.
|
|
26
|
+
*/
|
|
27
|
+
scrollPassthrough?: boolean;
|
|
22
28
|
};
|
|
23
29
|
type __VLS_Slots = {
|
|
24
30
|
trigger: () => VNode[] | VNode;
|
|
@@ -39,6 +45,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
39
45
|
allowedPlacements: Placement[];
|
|
40
46
|
arrow: boolean;
|
|
41
47
|
overflowVisible: boolean;
|
|
48
|
+
scrollPassthrough: boolean;
|
|
42
49
|
leaveLazyness: number;
|
|
43
50
|
closeOnClickOutside: boolean;
|
|
44
51
|
showLeazyness: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AssetProxyConfig } from '../util/assetProxy';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** The template's own committed preview (Cloudflare Images) — generic, shared by every viewer. */
|
|
4
|
+
basePreview?: string | null;
|
|
5
|
+
/**
|
|
6
|
+
* An individually pre-populated render (e.g. an `image.bluepic.io
|
|
7
|
+
* ?role=preview` URL). Pass this ONLY when prepopulation actually applies
|
|
8
|
+
* to what's being shown — omit it and this behaves like a plain
|
|
9
|
+
* single-image skeleton over `basePreview`.
|
|
10
|
+
*/
|
|
11
|
+
personalizedSrc?: string | null;
|
|
12
|
+
assetProxy?: AssetProxyConfig;
|
|
13
|
+
alt?: string;
|
|
14
|
+
/** Width hint for `optimizePreviewUrl` on the base layer. */
|
|
15
|
+
baseWidth?: number;
|
|
16
|
+
};
|
|
17
|
+
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>;
|
|
18
|
+
export default _default;
|
|
@@ -5,6 +5,12 @@ type __VLS_Props = {
|
|
|
5
5
|
scrollDelay?: number;
|
|
6
6
|
/** Delay in ms before the scrollbar fades out after mouse leaves */
|
|
7
7
|
leaveDelay?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Briefly reveal the rail the first time the content turns out to be
|
|
10
|
+
* scrollable. The rails are otherwise hover/scroll-only, which on a touch
|
|
11
|
+
* screen means a clipped list gives no cue at all that there is more.
|
|
12
|
+
*/
|
|
13
|
+
hintScrollable?: boolean;
|
|
8
14
|
};
|
|
9
15
|
declare var __VLS_1: {};
|
|
10
16
|
type __VLS_Slots = {} & {
|
|
@@ -18,6 +24,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
18
24
|
xScrollable: boolean;
|
|
19
25
|
scrollDelay: number;
|
|
20
26
|
leaveDelay: number;
|
|
27
|
+
hintScrollable: boolean;
|
|
21
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
29
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
30
|
export default _default;
|
|
@@ -14,8 +14,22 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
14
14
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
15
15
|
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
16
16
|
readonly "onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
17
|
-
|
|
17
|
+
readonly "onUpdate:values"?: ((values: T[]) => any) | undefined;
|
|
18
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:show" | "onUpdate:values"> & ({
|
|
18
19
|
modelValue?: T;
|
|
20
|
+
/**
|
|
21
|
+
* Multi-select: options toggle, the menu stays open, and the selection is
|
|
22
|
+
* carried by `values` (`v-model:values`) rather than `modelValue`.
|
|
23
|
+
*
|
|
24
|
+
* The selection deliberately lives in its OWN prop instead of overloading
|
|
25
|
+
* `modelValue` with `T | T[]`. Options may legitimately have array values
|
|
26
|
+
* (see StrokeDasharrayInput, where `T = number[]`), and a union there makes
|
|
27
|
+
* the generic ambiguous — it silently re-infers `T` and breaks unrelated
|
|
28
|
+
* callers. One extra prop is cheaper than that class of surprise.
|
|
29
|
+
*/
|
|
30
|
+
multiple?: boolean;
|
|
31
|
+
/** Selected values when `multiple` is set. */
|
|
32
|
+
values?: T[];
|
|
19
33
|
size?: "tiny" | "small" | "medium" | "large";
|
|
20
34
|
trigger?: "click" | "hover" | "manual";
|
|
21
35
|
options: BxSelectOption<T>[];
|
|
@@ -70,7 +84,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
70
84
|
value?: T;
|
|
71
85
|
}) => VNode[];
|
|
72
86
|
};
|
|
73
|
-
emit: ((evt: "update:modelValue", value: T) => void) & ((evt: "update:show", value: boolean) => void);
|
|
87
|
+
emit: (((evt: "update:modelValue", value: T) => void) & ((evt: "update:values", values: T[]) => void)) & ((evt: "update:show", value: boolean) => void);
|
|
74
88
|
}>) => import("vue").VNode & {
|
|
75
89
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
76
90
|
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface BxTableColumn {
|
|
3
|
+
/** Identity only; the caller writes the cells. */
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
align?: 'left' | 'center' | 'right';
|
|
7
|
+
width?: string;
|
|
8
|
+
/** Header text for assistive tech only, e.g. an actions column. */
|
|
9
|
+
srOnlyLabel?: boolean;
|
|
10
|
+
/** Class(es) put on the header cell — the caller puts the same on its `<td>`s. */
|
|
11
|
+
class?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Pin the column while the table scrolls sideways. Pinned columns must be
|
|
14
|
+
* the outermost ones (the first N / the last N); anything else is ignored.
|
|
15
|
+
*/
|
|
16
|
+
sticky?: 'left' | 'right';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A table's chrome: the scroll container, the border, the header, row hover,
|
|
20
|
+
* per-column alignment, pinned header/columns and row states.
|
|
21
|
+
*
|
|
22
|
+
* The BODY is a slot rather than a `rows` prop on purpose. Real tables wrap
|
|
23
|
+
* their rows — the studio's org list puts every `<tr>` inside a
|
|
24
|
+
* visibility-observer for infinite scroll — and a data-driven table cannot
|
|
25
|
+
* express that without growing a render-prop for the wrapper. So the caller
|
|
26
|
+
* keeps its `<tr>`s and this owns everything around them, which is the part
|
|
27
|
+
* that was being re-written per app.
|
|
28
|
+
*
|
|
29
|
+
* Alignment and pinning reach app-authored cells through custom properties
|
|
30
|
+
* rather than classes the caller would have to remember: each column publishes
|
|
31
|
+
* `--col-N-align` (and, when pinned, `--col-N-position/left/right/z`), and the
|
|
32
|
+
* static rules below read them. Twenty-four columns is the supported width.
|
|
33
|
+
*
|
|
34
|
+
* Row states are read off ATTRIBUTES on the caller's `<tr>`, so a table stays
|
|
35
|
+
* a table for assistive tech:
|
|
36
|
+
* - `aria-current="true"` → the ACTIVE row (themed inset ring)
|
|
37
|
+
* - `aria-selected="true"` → a SELECTED row (soft primary background)
|
|
38
|
+
*/
|
|
39
|
+
type __VLS_Props = {
|
|
40
|
+
columns?: BxTableColumn[];
|
|
41
|
+
/** Outer border, so the table can sit on the page unwrapped. */
|
|
42
|
+
bordered?: boolean;
|
|
43
|
+
/** Corner rounding, same scale as BxCard. */
|
|
44
|
+
radius?: 'none' | 'sm' | 'md' | 'lg';
|
|
45
|
+
/**
|
|
46
|
+
* `plain` is a table on the page's own ground. `card` puts it on a raised
|
|
47
|
+
* surface, for a table that reads as a block of its own rather than a
|
|
48
|
+
* region of the page. (Note this differs from BxList's `card`, where each
|
|
49
|
+
* ROW is a surface; a table's rows cannot be separated without breaking
|
|
50
|
+
* column alignment, which is the whole point of a table.)
|
|
51
|
+
*/
|
|
52
|
+
variant?: 'plain' | 'card';
|
|
53
|
+
/** Row highlight on hover. Off unless rows actually do something. */
|
|
54
|
+
hoverable?: boolean;
|
|
55
|
+
dense?: boolean;
|
|
56
|
+
/** Keep the header row visible while the body scrolls vertically. */
|
|
57
|
+
stickyHeader?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Fill the parent (a flex column) and scroll INSIDE the wrapper in both
|
|
60
|
+
* axes, instead of growing with the rows. Momentum scrolling and contained
|
|
61
|
+
* overscroll come with it, so the page never scrolls sideways.
|
|
62
|
+
*/
|
|
63
|
+
fill?: boolean;
|
|
64
|
+
/** Cap the wrapper's height; the body scrolls beyond it. */
|
|
65
|
+
maxHeight?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Pin the first `left` / last `right` columns while scrolling sideways.
|
|
68
|
+
* The per-column `sticky` field is the other way to say the same thing.
|
|
69
|
+
*/
|
|
70
|
+
stickyColumns?: {
|
|
71
|
+
left?: number;
|
|
72
|
+
right?: number;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
type __VLS_Slots = {
|
|
76
|
+
default?: () => VNode[] | VNode;
|
|
77
|
+
/** Replaces a header cell's label; the column def and its index come along. */
|
|
78
|
+
'header-cell'?: (scope: {
|
|
79
|
+
column: BxTableColumn;
|
|
80
|
+
index: number;
|
|
81
|
+
}) => VNode[] | VNode;
|
|
82
|
+
};
|
|
83
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
84
|
+
/** The outer box — query rows from here (`scrollIntoView` finds the scroller itself). */
|
|
85
|
+
wrapperRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
86
|
+
/** BxScrollbar's inner container: the element that actually scrolls. */
|
|
87
|
+
scrollEl: import("vue").ComputedRef<HTMLElement | undefined>;
|
|
88
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
89
|
+
fill: boolean;
|
|
90
|
+
bordered: boolean;
|
|
91
|
+
hoverable: boolean;
|
|
92
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
93
|
+
maxHeight: string;
|
|
94
|
+
variant: "plain" | "card";
|
|
95
|
+
columns: BxTableColumn[];
|
|
96
|
+
dense: boolean;
|
|
97
|
+
stickyHeader: boolean;
|
|
98
|
+
stickyColumns: {
|
|
99
|
+
left?: number;
|
|
100
|
+
right?: number;
|
|
101
|
+
};
|
|
102
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
103
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
104
|
+
export default _default;
|
|
105
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
106
|
+
new (): {
|
|
107
|
+
$slots: S;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
@@ -4,6 +4,13 @@ type __VLS_Props = {
|
|
|
4
4
|
name: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
icon?: () => VNode[] | VNode;
|
|
7
|
+
/**
|
|
8
|
+
* Rendered AFTER the label — a count, a status dot. Separate from `icon`
|
|
9
|
+
* because it trails the name rather than introducing it, and because a
|
|
10
|
+
* tab that carries a number wants that number to read as part of the tab
|
|
11
|
+
* rather than as a second word in its name.
|
|
12
|
+
*/
|
|
13
|
+
suffix?: () => VNode[] | VNode;
|
|
7
14
|
}[];
|
|
8
15
|
secondary?: boolean;
|
|
9
16
|
size?: 'tiny' | 'small' | 'medium' | 'large';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The generated waveform of an audio asset, painted in the CURRENT THEME's ink.
|
|
3
|
+
*
|
|
4
|
+
* bx-files renders an audio thumbnail as white bars on transparency (see
|
|
5
|
+
* `audioToPng`), which is only half a decision: it makes the image take the
|
|
6
|
+
* card's background, but it also makes it INVISIBLE on any light surface —
|
|
7
|
+
* white bars on a white card. Since a portal's theme is the customer's choice
|
|
8
|
+
* and half the presets are light, "white" is not a colour a waveform can be.
|
|
9
|
+
*
|
|
10
|
+
* The fix is to stop treating the PNG as a picture and treat it as a SHAPE: its
|
|
11
|
+
* alpha channel is the waveform, so it is used as a mask over `currentColor`.
|
|
12
|
+
* The bars then inherit whatever ink the surrounding text uses, in every theme,
|
|
13
|
+
* with no second asset, no server round-trip and no re-render of files already
|
|
14
|
+
* uploaded.
|
|
15
|
+
*
|
|
16
|
+
* Lives in the embed, next to `BxAudioPlayButton`, for the same reason: the
|
|
17
|
+
* studio library and the portal show the same audio card, and a treatment that
|
|
18
|
+
* exists in only one of them is how the two drift apart.
|
|
19
|
+
*/
|
|
20
|
+
type __VLS_Props = {
|
|
21
|
+
/** URL of the generated waveform PNG (white-on-transparent). */
|
|
22
|
+
src: string;
|
|
23
|
+
/** Accessible name — normally the asset's title. */
|
|
24
|
+
alt?: string;
|
|
25
|
+
};
|
|
26
|
+
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>;
|
|
27
|
+
export default _default;
|
|
@@ -10,8 +10,12 @@ declare const _default: <T extends {
|
|
|
10
10
|
description?: string;
|
|
11
11
|
detailedDescription?: string;
|
|
12
12
|
bridge: FieldsBridge;
|
|
13
|
+
defaultObject?: T;
|
|
14
|
+
/** @deprecated old prop name for `defaultObject`. */
|
|
13
15
|
defaultValue?: T;
|
|
14
16
|
mobile?: boolean;
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
15
19
|
} & {
|
|
16
20
|
modelValue: T[];
|
|
17
21
|
}) & Partial<{}>> & import("vue").PublicProps;
|
|
@@ -12,12 +12,20 @@ type __VLS_Props = {
|
|
|
12
12
|
bxPopoverId: string;
|
|
13
13
|
noPointerEvents: boolean;
|
|
14
14
|
overflowVisible: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Let wheel/touch gestures that land beside the popover scroll the app
|
|
17
|
+
* behind it. Set for popovers opened WITHOUT a scrim — with one, freezing
|
|
18
|
+
* the page is the intended modal behaviour. See useScrollPassthrough.
|
|
19
|
+
*/
|
|
20
|
+
scrollPassthrough?: boolean;
|
|
15
21
|
capturedContext?: Record<string | symbol, any>;
|
|
16
22
|
popoverMaxHeight?: string;
|
|
17
23
|
};
|
|
18
|
-
declare var __VLS_1: {};
|
|
24
|
+
declare var __VLS_1: {}, __VLS_6: {};
|
|
19
25
|
type __VLS_Slots = {} & {
|
|
20
26
|
default?: (props: typeof __VLS_1) => any;
|
|
27
|
+
} & {
|
|
28
|
+
default?: (props: typeof __VLS_6) => any;
|
|
21
29
|
};
|
|
22
30
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
31
|
close: () => any;
|
|
@@ -33,6 +41,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
33
41
|
capturedContext: Record<string | symbol, any>;
|
|
34
42
|
floatingPadding: number;
|
|
35
43
|
noPointerEvents: boolean;
|
|
44
|
+
scrollPassthrough: boolean;
|
|
36
45
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
46
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
38
47
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BluepicField } from '@bluepic/types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
field: BluepicField;
|
|
4
|
+
/** The row's data object — mutated in place. */
|
|
5
|
+
data: Record<string, unknown>;
|
|
6
|
+
labelId?: string;
|
|
7
|
+
/** Header bulk control: route every write through `onBulkUpdate` instead. */
|
|
8
|
+
bulk?: boolean;
|
|
9
|
+
onBulkUpdate?: (bindingKey: string, value: unknown) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
change: (bindingKey: string, value: unknown) => any;
|
|
13
|
+
activate: () => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onChange?: ((bindingKey: string, value: unknown) => any) | undefined;
|
|
16
|
+
onActivate?: (() => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|