@bluepic/embed 0.5.9 → 0.5.11
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 +72 -72
- package/dist/bluepic-embed.umd.js +72 -72
- package/dist/components/BxPreviewLayer.vue.d.ts +11 -0
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +8 -0
- package/dist/components/TemplateEditor/FieldHintsLayer.vue.d.ts +9 -0
- package/dist/components/TemplateEditor/ImageBusyLayer.vue.d.ts +14 -0
- package/dist/components/TemplateEditor/TemplateView.vue.d.ts +9 -0
- package/dist/embed/embed.d.ts +32 -0
- package/dist/main.cjs +24 -24
- package/dist/main.mjs +1873 -1614
- package/dist/style.css +1 -1
- package/dist/util/imageStates/index.d.ts +4 -0
- package/dist/util/imageStates/probe.d.ts +83 -0
- package/dist/util/imageStates/useImageStates.d.ts +63 -0
- package/package.json +3 -2
|
@@ -30,6 +30,17 @@ type __VLS_Props = {
|
|
|
30
30
|
* finishing IS the end of the wait.
|
|
31
31
|
*/
|
|
32
32
|
busy?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Draw a spinner over the blurred base while the personalized render is in
|
|
35
|
+
* flight. For the gallery card, where the blur and the shimmer are the only
|
|
36
|
+
* things on screen and neither says "working" loudly enough on its own.
|
|
37
|
+
*
|
|
38
|
+
* Left OFF in the editor (`BxLiveTemplate`), on purpose: there the whole
|
|
39
|
+
* layer already sits under a `busy` shimmer that runs until the sandbox is
|
|
40
|
+
* up, and a spinner for the preview underneath it would be a second loading
|
|
41
|
+
* indicator for a shorter wait nested inside the first one.
|
|
42
|
+
*/
|
|
43
|
+
spinner?: boolean;
|
|
33
44
|
};
|
|
34
45
|
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>;
|
|
35
46
|
export default _default;
|
|
@@ -160,6 +160,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
160
160
|
watermark: boolean;
|
|
161
161
|
accessibilityDescription?: string;
|
|
162
162
|
fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
|
|
163
|
+
imageOverlays?: import("../../util/imageStates").ImageOverlay[];
|
|
164
|
+
coveredElementIds?: Set<string>;
|
|
163
165
|
hintsRevealed?: boolean;
|
|
164
166
|
textState?: import("../../util/fieldHints").CanvasTextState;
|
|
165
167
|
editingElementId?: string;
|
|
@@ -903,6 +905,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
903
905
|
watermark: boolean;
|
|
904
906
|
accessibilityDescription?: string;
|
|
905
907
|
fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
|
|
908
|
+
imageOverlays?: import("../../util/imageStates").ImageOverlay[];
|
|
909
|
+
coveredElementIds?: Set<string>;
|
|
906
910
|
hintsRevealed?: boolean;
|
|
907
911
|
textState?: import("../../util/fieldHints").CanvasTextState;
|
|
908
912
|
editingElementId?: string;
|
|
@@ -1615,6 +1619,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
1615
1619
|
watermark: boolean;
|
|
1616
1620
|
accessibilityDescription?: string;
|
|
1617
1621
|
fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
|
|
1622
|
+
imageOverlays?: import("../../util/imageStates").ImageOverlay[];
|
|
1623
|
+
coveredElementIds?: Set<string>;
|
|
1618
1624
|
hintsRevealed?: boolean;
|
|
1619
1625
|
textState?: import("../../util/fieldHints").CanvasTextState;
|
|
1620
1626
|
editingElementId?: string;
|
|
@@ -2358,6 +2364,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
2358
2364
|
watermark: boolean;
|
|
2359
2365
|
accessibilityDescription?: string;
|
|
2360
2366
|
fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
|
|
2367
|
+
imageOverlays?: import("../../util/imageStates").ImageOverlay[];
|
|
2368
|
+
coveredElementIds?: Set<string>;
|
|
2361
2369
|
hintsRevealed?: boolean;
|
|
2362
2370
|
textState?: import("../../util/fieldHints").CanvasTextState;
|
|
2363
2371
|
editingElementId?: string;
|
|
@@ -27,6 +27,15 @@ type __VLS_Props = {
|
|
|
27
27
|
activeFrameIndex?: number;
|
|
28
28
|
/** Paint only. The hitboxes stay clickable either way — see the stylesheet. */
|
|
29
29
|
revealed: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Rendered instance ids whose picture is currently being replaced, and which
|
|
32
|
+
* `ImageBusyLayer` has covered. Their hints stand down entirely — not dimmed,
|
|
33
|
+
* withdrawn: the hitbox would invite a click on a picture that is about to
|
|
34
|
+
* become a different one, and the upload chip sits exactly where the spinner
|
|
35
|
+
* does. Keyed by `dataId`, so one instance of an iterated element can be
|
|
36
|
+
* suppressed while its siblings stay live.
|
|
37
|
+
*/
|
|
38
|
+
coveredElementIds?: Set<string>;
|
|
30
39
|
/** Live caret + selection in SERIAL coordinates, or absent when not editing. */
|
|
31
40
|
textState?: CanvasTextState;
|
|
32
41
|
/** Element whose text is being edited — its hitbox becomes a selection surface. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ImageOverlay } from '../../util/imageStates';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
overlays: ImageOverlay[];
|
|
4
|
+
/** zoompinch's slot projection — serial coordinates in, screen pixels out. */
|
|
5
|
+
composePoint: (x: number, y: number) => [number, number];
|
|
6
|
+
/**
|
|
7
|
+
* Not read — a reactivity dependency, exactly as in FieldHintsLayer.
|
|
8
|
+
* `composePoint` closes over zoompinch's engine state, so nothing about
|
|
9
|
+
* calling it tells Vue to recompute when the user pans.
|
|
10
|
+
*/
|
|
11
|
+
transform: unknown;
|
|
12
|
+
};
|
|
13
|
+
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>;
|
|
14
|
+
export default _default;
|
|
@@ -2,6 +2,7 @@ import { Transform } from '@zoompinch/vue';
|
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { BluepicField, Template } from '@bluepic/types';
|
|
4
4
|
import type { FieldHitbox } from '../../util/fieldHints';
|
|
5
|
+
import type { ImageOverlay } from '../../util/imageStates';
|
|
5
6
|
import type { CanvasTextState, SelectionHandle } from '../../util/fieldHints/useCanvasTextEditing';
|
|
6
7
|
import type { AssetProxyConfig } from '../../util/assetProxy';
|
|
7
8
|
type __VLS_Props = {
|
|
@@ -33,6 +34,14 @@ type __VLS_Props = {
|
|
|
33
34
|
accessibilityDescription?: string;
|
|
34
35
|
/** Derived field-hint targets in serial coordinates. Empty = no overlay. */
|
|
35
36
|
fieldHitboxes?: FieldHitbox[];
|
|
37
|
+
/** Pictures currently in flight, with the frame to cover — see `useImageStates`. */
|
|
38
|
+
imageOverlays?: ImageOverlay[];
|
|
39
|
+
/**
|
|
40
|
+
* Rendered instance ids covered by that overlay. Their hints stand down for
|
|
41
|
+
* the duration: a hitbox and an upload chip over a blurred, spinning panel
|
|
42
|
+
* would be three affordances arguing about the same picture.
|
|
43
|
+
*/
|
|
44
|
+
coveredElementIds?: Set<string>;
|
|
36
45
|
/**
|
|
37
46
|
* Whether the hint overlay is PAINTED (hover on desktop, tap on mobile). The
|
|
38
47
|
* hitboxes stay clickable regardless — see `FieldHintsLayer`.
|
package/dist/embed/embed.d.ts
CHANGED
|
@@ -176,6 +176,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
176
176
|
watermark: boolean;
|
|
177
177
|
accessibilityDescription?: string;
|
|
178
178
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
179
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
180
|
+
coveredElementIds?: Set<string>;
|
|
179
181
|
hintsRevealed?: boolean;
|
|
180
182
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
181
183
|
editingElementId?: string;
|
|
@@ -919,6 +921,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
919
921
|
watermark: boolean;
|
|
920
922
|
accessibilityDescription?: string;
|
|
921
923
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
924
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
925
|
+
coveredElementIds?: Set<string>;
|
|
922
926
|
hintsRevealed?: boolean;
|
|
923
927
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
924
928
|
editingElementId?: string;
|
|
@@ -1631,6 +1635,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
1631
1635
|
watermark: boolean;
|
|
1632
1636
|
accessibilityDescription?: string;
|
|
1633
1637
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
1638
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
1639
|
+
coveredElementIds?: Set<string>;
|
|
1634
1640
|
hintsRevealed?: boolean;
|
|
1635
1641
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
1636
1642
|
editingElementId?: string;
|
|
@@ -2374,6 +2380,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
2374
2380
|
watermark: boolean;
|
|
2375
2381
|
accessibilityDescription?: string;
|
|
2376
2382
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
2383
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
2384
|
+
coveredElementIds?: Set<string>;
|
|
2377
2385
|
hintsRevealed?: boolean;
|
|
2378
2386
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
2379
2387
|
editingElementId?: string;
|
|
@@ -3212,6 +3220,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3212
3220
|
watermark: boolean;
|
|
3213
3221
|
accessibilityDescription?: string;
|
|
3214
3222
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
3223
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
3224
|
+
coveredElementIds?: Set<string>;
|
|
3215
3225
|
hintsRevealed?: boolean;
|
|
3216
3226
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
3217
3227
|
editingElementId?: string;
|
|
@@ -3955,6 +3965,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
3955
3965
|
watermark: boolean;
|
|
3956
3966
|
accessibilityDescription?: string;
|
|
3957
3967
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
3968
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
3969
|
+
coveredElementIds?: Set<string>;
|
|
3958
3970
|
hintsRevealed?: boolean;
|
|
3959
3971
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
3960
3972
|
editingElementId?: string;
|
|
@@ -4667,6 +4679,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
4667
4679
|
watermark: boolean;
|
|
4668
4680
|
accessibilityDescription?: string;
|
|
4669
4681
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
4682
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
4683
|
+
coveredElementIds?: Set<string>;
|
|
4670
4684
|
hintsRevealed?: boolean;
|
|
4671
4685
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
4672
4686
|
editingElementId?: string;
|
|
@@ -5410,6 +5424,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
5410
5424
|
watermark: boolean;
|
|
5411
5425
|
accessibilityDescription?: string;
|
|
5412
5426
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
5427
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
5428
|
+
coveredElementIds?: Set<string>;
|
|
5413
5429
|
hintsRevealed?: boolean;
|
|
5414
5430
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
5415
5431
|
editingElementId?: string;
|
|
@@ -6278,6 +6294,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
6278
6294
|
watermark: boolean;
|
|
6279
6295
|
accessibilityDescription?: string;
|
|
6280
6296
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
6297
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
6298
|
+
coveredElementIds?: Set<string>;
|
|
6281
6299
|
hintsRevealed?: boolean;
|
|
6282
6300
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
6283
6301
|
editingElementId?: string;
|
|
@@ -7021,6 +7039,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
7021
7039
|
watermark: boolean;
|
|
7022
7040
|
accessibilityDescription?: string;
|
|
7023
7041
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
7042
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
7043
|
+
coveredElementIds?: Set<string>;
|
|
7024
7044
|
hintsRevealed?: boolean;
|
|
7025
7045
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
7026
7046
|
editingElementId?: string;
|
|
@@ -7733,6 +7753,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
7733
7753
|
watermark: boolean;
|
|
7734
7754
|
accessibilityDescription?: string;
|
|
7735
7755
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
7756
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
7757
|
+
coveredElementIds?: Set<string>;
|
|
7736
7758
|
hintsRevealed?: boolean;
|
|
7737
7759
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
7738
7760
|
editingElementId?: string;
|
|
@@ -8476,6 +8498,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
8476
8498
|
watermark: boolean;
|
|
8477
8499
|
accessibilityDescription?: string;
|
|
8478
8500
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
8501
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
8502
|
+
coveredElementIds?: Set<string>;
|
|
8479
8503
|
hintsRevealed?: boolean;
|
|
8480
8504
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
8481
8505
|
editingElementId?: string;
|
|
@@ -9314,6 +9338,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
9314
9338
|
watermark: boolean;
|
|
9315
9339
|
accessibilityDescription?: string;
|
|
9316
9340
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
9341
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
9342
|
+
coveredElementIds?: Set<string>;
|
|
9317
9343
|
hintsRevealed?: boolean;
|
|
9318
9344
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
9319
9345
|
editingElementId?: string;
|
|
@@ -10057,6 +10083,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
10057
10083
|
watermark: boolean;
|
|
10058
10084
|
accessibilityDescription?: string;
|
|
10059
10085
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
10086
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
10087
|
+
coveredElementIds?: Set<string>;
|
|
10060
10088
|
hintsRevealed?: boolean;
|
|
10061
10089
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
10062
10090
|
editingElementId?: string;
|
|
@@ -10769,6 +10797,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
10769
10797
|
watermark: boolean;
|
|
10770
10798
|
accessibilityDescription?: string;
|
|
10771
10799
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
10800
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
10801
|
+
coveredElementIds?: Set<string>;
|
|
10772
10802
|
hintsRevealed?: boolean;
|
|
10773
10803
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
10774
10804
|
editingElementId?: string;
|
|
@@ -11512,6 +11542,8 @@ export declare class BluepicEmbed extends EventTarget {
|
|
|
11512
11542
|
watermark: boolean;
|
|
11513
11543
|
accessibilityDescription?: string;
|
|
11514
11544
|
fieldHitboxes?: import("../util/fieldHints").FieldHitbox[];
|
|
11545
|
+
imageOverlays?: import("../util/imageStates").ImageOverlay[];
|
|
11546
|
+
coveredElementIds?: Set<string>;
|
|
11515
11547
|
hintsRevealed?: boolean;
|
|
11516
11548
|
textState?: import("../util/fieldHints").CanvasTextState;
|
|
11517
11549
|
editingElementId?: string;
|