@bluepic/embed 0.4.0-next.145 → 0.4.0-next.148
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 +181 -173
- package/dist/bluepic-embed.umd.js +181 -173
- package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +134 -0
- package/dist/components/TemplateEditor/FieldHintsLayer.vue.d.ts +49 -0
- package/dist/components/TemplateEditor/TemplateView.vue.d.ts +47 -0
- package/dist/embed/embed.d.ts +402 -0
- package/dist/main.cjs +106 -98
- package/dist/main.mjs +25655 -25062
- package/dist/style.css +1 -1
- package/dist/util/fieldHints/chipAction.d.ts +23 -0
- package/dist/util/fieldHints/fieldFocus.d.ts +1 -1
- package/dist/util/fieldHints/index.d.ts +8 -2
- package/dist/util/fieldHints/placement.d.ts +72 -0
- package/dist/util/fieldHints/probe.d.ts +11 -0
- package/dist/util/fieldHints/textProbe.d.ts +71 -0
- package/dist/util/fieldHints/useCanvasTextEditing.d.ts +125 -0
- package/dist/util/fieldHints/useFieldHitboxes.d.ts +51 -152
- package/dist/util/fieldHints/useHintReveal.d.ts +1 -1
- package/dist/util/fields.d.ts +0 -16
- package/dist/util/gallery.d.ts +2 -2
- package/dist/util/popoverArrow.d.ts +33 -0
- package/package.json +2 -2
- package/dist/util/fieldHints/interact.d.ts +0 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
export declare function useHintReveal(enabled: Ref<boolean>): {
|
|
3
|
-
revealed:
|
|
3
|
+
revealed: import("vue").ComputedRef<boolean>;
|
|
4
4
|
hide: () => void;
|
|
5
5
|
onPointerEnter: (event: PointerEvent) => void;
|
|
6
6
|
onPointerLeave: (event: PointerEvent) => void;
|
package/dist/util/fields.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
54
54
|
maxWidth: string;
|
|
55
55
|
};
|
|
56
56
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
57
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
58
57
|
frameIndex?: number;
|
|
59
58
|
} | {
|
|
60
59
|
props: {
|
|
@@ -71,7 +70,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
71
70
|
maxWidth: string;
|
|
72
71
|
};
|
|
73
72
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
74
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
75
73
|
frameIndex?: number;
|
|
76
74
|
} | {
|
|
77
75
|
props: {
|
|
@@ -89,7 +87,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
89
87
|
maxWidth: string;
|
|
90
88
|
};
|
|
91
89
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
92
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
93
90
|
frameIndex?: number;
|
|
94
91
|
} | {
|
|
95
92
|
props: {
|
|
@@ -104,7 +101,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
104
101
|
maxWidth: string;
|
|
105
102
|
};
|
|
106
103
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
107
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
108
104
|
frameIndex?: number;
|
|
109
105
|
} | {
|
|
110
106
|
props: {
|
|
@@ -121,7 +117,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
121
117
|
maxWidth: string;
|
|
122
118
|
};
|
|
123
119
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
124
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
125
120
|
frameIndex?: number;
|
|
126
121
|
} | {
|
|
127
122
|
props: {
|
|
@@ -138,7 +133,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
138
133
|
maxWidth: string;
|
|
139
134
|
};
|
|
140
135
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
141
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
142
136
|
frameIndex?: number;
|
|
143
137
|
} | {
|
|
144
138
|
props: {
|
|
@@ -155,7 +149,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
155
149
|
maxWidth: string;
|
|
156
150
|
};
|
|
157
151
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
158
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
159
152
|
frameIndex?: number;
|
|
160
153
|
} | {
|
|
161
154
|
props: {
|
|
@@ -172,7 +165,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
172
165
|
maxWidth: string;
|
|
173
166
|
};
|
|
174
167
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
175
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
176
168
|
frameIndex?: number;
|
|
177
169
|
} | {
|
|
178
170
|
props: {
|
|
@@ -189,7 +181,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
189
181
|
maxWidth: string;
|
|
190
182
|
};
|
|
191
183
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
192
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
193
184
|
frameIndex?: number;
|
|
194
185
|
} | {
|
|
195
186
|
props: {
|
|
@@ -206,7 +197,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
206
197
|
maxWidth: string;
|
|
207
198
|
};
|
|
208
199
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
209
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
210
200
|
frameIndex?: number;
|
|
211
201
|
} | {
|
|
212
202
|
props: {
|
|
@@ -223,7 +213,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
223
213
|
maxWidth: string;
|
|
224
214
|
};
|
|
225
215
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
226
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
227
216
|
frameIndex?: number;
|
|
228
217
|
} | {
|
|
229
218
|
props: {
|
|
@@ -240,7 +229,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
240
229
|
maxWidth: string;
|
|
241
230
|
};
|
|
242
231
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
243
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
244
232
|
frameIndex?: number;
|
|
245
233
|
} | {
|
|
246
234
|
props: {
|
|
@@ -257,7 +245,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
257
245
|
maxWidth: string;
|
|
258
246
|
};
|
|
259
247
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
260
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
261
248
|
frameIndex?: number;
|
|
262
249
|
} | {
|
|
263
250
|
props: {
|
|
@@ -274,7 +261,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
274
261
|
maxWidth: string;
|
|
275
262
|
};
|
|
276
263
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
277
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
278
264
|
frameIndex?: number;
|
|
279
265
|
} | {
|
|
280
266
|
props: {
|
|
@@ -289,7 +275,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
289
275
|
maxWidth: string;
|
|
290
276
|
};
|
|
291
277
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
292
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
293
278
|
frameIndex?: number;
|
|
294
279
|
} | {
|
|
295
280
|
props: {
|
|
@@ -306,7 +291,6 @@ export declare function stringifyField(field: BluepicField): {
|
|
|
306
291
|
maxWidth: string;
|
|
307
292
|
};
|
|
308
293
|
hitbox?: import("@bluepic/types").Hitbox;
|
|
309
|
-
hintType?: import("@bluepic/types").FieldHintType;
|
|
310
294
|
frameIndex?: number;
|
|
311
295
|
};
|
|
312
296
|
export declare function renderFieldIcon(fieldType: BluepicField['type']): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
package/dist/util/gallery.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export declare function groupTemplatesByName(templates: {
|
|
|
20
20
|
dpi?: number | undefined;
|
|
21
21
|
canvases?: {
|
|
22
22
|
id: string;
|
|
23
|
-
label: string;
|
|
24
23
|
width: number;
|
|
25
24
|
height: number;
|
|
25
|
+
label?: string | undefined;
|
|
26
26
|
preview?: string | null | undefined;
|
|
27
27
|
}[] | undefined;
|
|
28
28
|
};
|
|
@@ -57,9 +57,9 @@ export declare function groupPortalItemsByCategory(templates: {
|
|
|
57
57
|
dpi?: number | undefined;
|
|
58
58
|
canvases?: {
|
|
59
59
|
id: string;
|
|
60
|
-
label: string;
|
|
61
60
|
width: number;
|
|
62
61
|
height: number;
|
|
62
|
+
label?: string | undefined;
|
|
63
63
|
preview?: string | null | undefined;
|
|
64
64
|
}[] | undefined;
|
|
65
65
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The popover/tooltip arrow artwork, shared by everything that needs to point
|
|
3
|
+
* at something.
|
|
4
|
+
*
|
|
5
|
+
* The arrow isn't a CSS triangle: it has a rounded tip and flared sides, drawn
|
|
6
|
+
* as an SVG path, and it renders as TWO masked layers — a fill layer tinted
|
|
7
|
+
* with the surface colour, and a border layer tinted with the border colour,
|
|
8
|
+
* built from an outline-only mask so the arrow's outline continues the
|
|
9
|
+
* bubble's. That's what makes it read as part of the bubble rather than a
|
|
10
|
+
* triangle stuck to it.
|
|
11
|
+
*
|
|
12
|
+
* The shape is authored pointing LEFT. Every other direction is a CSS rotation
|
|
13
|
+
* of the same mask at the call site, so there is one source of truth for the
|
|
14
|
+
* geometry and callers only own their placement.
|
|
15
|
+
*
|
|
16
|
+
* Extracted from `PopoverElement.vue` so the field-hint overlay can reuse the
|
|
17
|
+
* same arrow instead of growing a second, subtly different one.
|
|
18
|
+
*/
|
|
19
|
+
declare const ARROW_VIEWBOX: readonly [0, 0, 540, 810];
|
|
20
|
+
/** Outer silhouette — the arrow as the reader sees it. */
|
|
21
|
+
declare const ARROW_SHAPE = "\n<g transform=\"matrix(-1,0,-0,-1,539.059,810)\">\n <path d=\"M11.046,422.072C-6.191,410.25 -0.941,397.5 11.046,387.928L539.059,0L539.059,810L11.046,422.072Z\"/>\n</g>\n";
|
|
22
|
+
/**
|
|
23
|
+
* Slightly inset copy of the silhouette. Subtracting it from the outer shape
|
|
24
|
+
* leaves a constant-width outline — the border layer. A plain stroke would
|
|
25
|
+
* thicken unevenly around the curved tip.
|
|
26
|
+
*/
|
|
27
|
+
declare const ARROW_INNER_SHAPE = "\n<g transform=\"matrix(-0.926069,0,-0,-0.926069,499.205868,780.057974)\">\n <path d=\"M0.498,414.688C-13.575,404.976 -4.105,398.555 4.717,392.147L539.059,0L539.059,810L0.498,414.688Z\"/>\n</g>\n";
|
|
28
|
+
declare const ARROW_STROKE_WIDTH = 100;
|
|
29
|
+
/** `mask-image` value for the arrow's filled body. */
|
|
30
|
+
export declare function popoverArrowMaskImage(): string;
|
|
31
|
+
/** `mask-image` value for the arrow's outline. */
|
|
32
|
+
export declare function popoverArrowBorderMaskImage(): string;
|
|
33
|
+
export { ARROW_VIEWBOX, ARROW_SHAPE, ARROW_INNER_SHAPE, ARROW_STROKE_WIDTH };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluepic/embed",
|
|
3
|
-
"version": "0.4.0-next.
|
|
3
|
+
"version": "0.4.0-next.148",
|
|
4
4
|
"description": "Bluepic embed sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@auth0/auth0-vue": "^2.4.0",
|
|
48
|
-
"@bluepic/types": "^0.6.
|
|
48
|
+
"@bluepic/types": "^0.6.499",
|
|
49
49
|
"@hono/zod-openapi": "^1.1.4",
|
|
50
50
|
"@types/css": "^0.0.38",
|
|
51
51
|
"@types/downloadjs": "^1.4.6",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { BluepicField } from '@bluepic/types';
|
|
2
|
-
/**
|
|
3
|
-
* What an `interact` hint does when clicked.
|
|
4
|
-
*
|
|
5
|
-
* - `inline-text` — expand into a text input on the overlay, editing the value
|
|
6
|
-
* in place. Only for plain-text fields: a richtext field's value is a run
|
|
7
|
-
* array with its own toolbar, and a bare input would silently flatten it.
|
|
8
|
-
* - `activate` — run the field's own flow (image picker / upload dialog),
|
|
9
|
-
* via the activator the field component registered.
|
|
10
|
-
* - `focus` — nothing better available; jump to the control in the panel.
|
|
11
|
-
*/
|
|
12
|
-
export type InteractMode = 'inline-text' | 'activate' | 'focus';
|
|
13
|
-
/**
|
|
14
|
-
* `field.props` entries may be author expressions (functions) rather than
|
|
15
|
-
* literals, so a prop can only be read through the host's evaluator — the same
|
|
16
|
-
* `wrapFieldProps` treatment `FieldsList` gives every field component.
|
|
17
|
-
*/
|
|
18
|
-
export declare function readFieldProp<T>(value: T | (() => T), evaluate?: (fn: Function) => unknown): T | undefined;
|
|
19
|
-
export declare function interactModeFor(field: BluepicField, evaluate?: (fn: Function) => unknown): InteractMode;
|
|
20
|
-
/** The binding an inline text editor reads and writes. */
|
|
21
|
-
export declare function inlineTextBinding(field: BluepicField): string | undefined;
|