@bluepic/embed 0.4.0-next.193 → 0.4.0-next.195
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 +161 -161
- package/dist/bluepic-embed.umd.js +161 -161
- package/dist/embed/embed.d.ts +0 -2
- package/dist/main.cjs +84 -84
- package/dist/main.mjs +18096 -17363
- package/dist/style.css +1 -1
- package/dist/util/fieldHints/index.d.ts +1 -0
- package/dist/util/fieldHints/useChipHighlight.d.ts +29 -0
- package/dist/util/fieldHints/useHintReveal.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export type { OrderableHitbox } from './geometry';
|
|
|
7
7
|
export { useFieldHitboxes } from './useFieldHitboxes';
|
|
8
8
|
export type { FieldHitbox } from './useFieldHitboxes';
|
|
9
9
|
export { useHintReveal } from './useHintReveal';
|
|
10
|
+
export { useChipHighlight } from './useChipHighlight';
|
|
10
11
|
export { createFieldElementRegistry, provideFieldFocus, revealFieldElement, useFieldFocus, FIELD_FOCUS_KEY, FIELD_FOCUS_FLASH_CLASS, FIELD_HOVER_CLASS, } from './fieldFocus';
|
|
11
12
|
export type { FieldFocusController } from './fieldFocus';
|
|
12
13
|
export { chipActionFor, fieldHasChip, readFieldProp } from './chipAction';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which hint is highlighted, and which chip is on screen — two answers, because
|
|
3
|
+
* they are not the same question.
|
|
4
|
+
*
|
|
5
|
+
* The OUTLINE follows the pointer exactly: whatever it is over is the element
|
|
6
|
+
* being asked about, and nothing else may be lit.
|
|
7
|
+
*
|
|
8
|
+
* The CHIP cannot, because of where it sits. It is centred on its picture, so
|
|
9
|
+
* reaching it means travelling ACROSS that picture — and pictures nest (a logo,
|
|
10
|
+
* a portrait, a badge over a background), so the trip regularly crosses another
|
|
11
|
+
* hitbox. Handing the chip straight over to whatever the pointer touched on the
|
|
12
|
+
* way pulled it out from under a pointer already aimed at it, and the click
|
|
13
|
+
* landed on the element underneath instead: the upload dialog simply never
|
|
14
|
+
* opened. A chip that has just lost the highlight therefore stays painted (and
|
|
15
|
+
* clickable) for a moment longer.
|
|
16
|
+
*
|
|
17
|
+
* That grace period is not a lifetime: arriving on the chip re-activates it
|
|
18
|
+
* (`activate` from the chip's own `pointerenter`), so it only ever has to
|
|
19
|
+
* outlast the trip.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useChipHighlight({ lingerMs }?: {
|
|
22
|
+
lingerMs?: number;
|
|
23
|
+
}): {
|
|
24
|
+
activeKey: import("vue").Ref<string | undefined, string | undefined>;
|
|
25
|
+
chipShown: (key: string) => boolean;
|
|
26
|
+
activate: (key: string) => void;
|
|
27
|
+
release: (key: string) => boolean;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
};
|
|
@@ -3,6 +3,7 @@ export declare function useHintReveal(enabled: Ref<boolean>): {
|
|
|
3
3
|
revealed: import("vue").ComputedRef<boolean>;
|
|
4
4
|
reveal: () => void;
|
|
5
5
|
onPointerEnter: (event: PointerEvent) => void;
|
|
6
|
+
onPointerMove: (event: PointerEvent) => void;
|
|
6
7
|
onPointerLeave: (event: PointerEvent) => void;
|
|
7
8
|
onPointerDown: (event: PointerEvent) => void;
|
|
8
9
|
onPointerUp: (event: PointerEvent) => void;
|