@bluepic/embed 0.4.0-next.146 → 0.4.0-next.149

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.
@@ -122,8 +122,31 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
122
122
  accessibilityDescription?: string;
123
123
  fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
124
124
  hintsRevealed?: boolean;
125
+ textState?: import("../../util/fieldHints").CanvasTextState;
126
+ editingElementId?: string;
125
127
  }> & Readonly<{
128
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
126
129
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
130
+ "onSelect-start"?: ((args_0: {
131
+ x: number;
132
+ y: number;
133
+ }) => any) | undefined;
134
+ "onSelect-move"?: ((args_0: {
135
+ x: number;
136
+ y: number;
137
+ }) => any) | undefined;
138
+ "onSelect-end"?: (() => any) | undefined;
139
+ "onHandle-grab"?: ((args_0: {
140
+ handle: import("../../util/fieldHints").SelectionHandle;
141
+ point: {
142
+ x: number;
143
+ y: number;
144
+ };
145
+ }) => any) | undefined;
146
+ "onSelect-word"?: ((args_0: {
147
+ x: number;
148
+ y: number;
149
+ }) => any) | undefined;
127
150
  }>, {
128
151
  currentlyFocusedFrame: import("vue").ComputedRef<{
129
152
  x: number;
@@ -775,7 +798,28 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
775
798
  }) | undefined>;
776
799
  isMultiFrame: import("vue").ComputedRef<boolean>;
777
800
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
801
+ "activate-field": (args_0: BluepicField) => any;
778
802
  "focus-field": (args_0: BluepicField) => any;
803
+ "select-start": (args_0: {
804
+ x: number;
805
+ y: number;
806
+ }) => any;
807
+ "select-move": (args_0: {
808
+ x: number;
809
+ y: number;
810
+ }) => any;
811
+ "select-end": () => any;
812
+ "handle-grab": (args_0: {
813
+ handle: import("../../util/fieldHints").SelectionHandle;
814
+ point: {
815
+ x: number;
816
+ y: number;
817
+ };
818
+ }) => any;
819
+ "select-word": (args_0: {
820
+ x: number;
821
+ y: number;
822
+ }) => any;
779
823
  }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
780
824
  P: {};
781
825
  B: {};
@@ -802,8 +846,31 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
802
846
  accessibilityDescription?: string;
803
847
  fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
804
848
  hintsRevealed?: boolean;
849
+ textState?: import("../../util/fieldHints").CanvasTextState;
850
+ editingElementId?: string;
805
851
  }> & Readonly<{
852
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
806
853
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
854
+ "onSelect-start"?: ((args_0: {
855
+ x: number;
856
+ y: number;
857
+ }) => any) | undefined;
858
+ "onSelect-move"?: ((args_0: {
859
+ x: number;
860
+ y: number;
861
+ }) => any) | undefined;
862
+ "onSelect-end"?: (() => any) | undefined;
863
+ "onHandle-grab"?: ((args_0: {
864
+ handle: import("../../util/fieldHints").SelectionHandle;
865
+ point: {
866
+ x: number;
867
+ y: number;
868
+ };
869
+ }) => any) | undefined;
870
+ "onSelect-word"?: ((args_0: {
871
+ x: number;
872
+ y: number;
873
+ }) => any) | undefined;
807
874
  }>, {
808
875
  currentlyFocusedFrame: import("vue").ComputedRef<{
809
876
  x: number;
@@ -1473,8 +1540,31 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
1473
1540
  accessibilityDescription?: string;
1474
1541
  fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
1475
1542
  hintsRevealed?: boolean;
1543
+ textState?: import("../../util/fieldHints").CanvasTextState;
1544
+ editingElementId?: string;
1476
1545
  }> & Readonly<{
1546
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
1477
1547
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
1548
+ "onSelect-start"?: ((args_0: {
1549
+ x: number;
1550
+ y: number;
1551
+ }) => any) | undefined;
1552
+ "onSelect-move"?: ((args_0: {
1553
+ x: number;
1554
+ y: number;
1555
+ }) => any) | undefined;
1556
+ "onSelect-end"?: (() => any) | undefined;
1557
+ "onHandle-grab"?: ((args_0: {
1558
+ handle: import("../../util/fieldHints").SelectionHandle;
1559
+ point: {
1560
+ x: number;
1561
+ y: number;
1562
+ };
1563
+ }) => any) | undefined;
1564
+ "onSelect-word"?: ((args_0: {
1565
+ x: number;
1566
+ y: number;
1567
+ }) => any) | undefined;
1478
1568
  }>, {
1479
1569
  currentlyFocusedFrame: import("vue").ComputedRef<{
1480
1570
  x: number;
@@ -2126,7 +2216,28 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
2126
2216
  }) | undefined>;
2127
2217
  isMultiFrame: import("vue").ComputedRef<boolean>;
2128
2218
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2219
+ "activate-field": (args_0: BluepicField) => any;
2129
2220
  "focus-field": (args_0: BluepicField) => any;
2221
+ "select-start": (args_0: {
2222
+ x: number;
2223
+ y: number;
2224
+ }) => any;
2225
+ "select-move": (args_0: {
2226
+ x: number;
2227
+ y: number;
2228
+ }) => any;
2229
+ "select-end": () => any;
2230
+ "handle-grab": (args_0: {
2231
+ handle: import("../../util/fieldHints").SelectionHandle;
2232
+ point: {
2233
+ x: number;
2234
+ y: number;
2235
+ };
2236
+ }) => any;
2237
+ "select-word": (args_0: {
2238
+ x: number;
2239
+ y: number;
2240
+ }) => any;
2130
2241
  }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
2131
2242
  P: {};
2132
2243
  B: {};
@@ -2153,8 +2264,31 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
2153
2264
  accessibilityDescription?: string;
2154
2265
  fieldHitboxes?: import("../../util/fieldHints").FieldHitbox[];
2155
2266
  hintsRevealed?: boolean;
2267
+ textState?: import("../../util/fieldHints").CanvasTextState;
2268
+ editingElementId?: string;
2156
2269
  }> & Readonly<{
2270
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
2157
2271
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
2272
+ "onSelect-start"?: ((args_0: {
2273
+ x: number;
2274
+ y: number;
2275
+ }) => any) | undefined;
2276
+ "onSelect-move"?: ((args_0: {
2277
+ x: number;
2278
+ y: number;
2279
+ }) => any) | undefined;
2280
+ "onSelect-end"?: (() => any) | undefined;
2281
+ "onHandle-grab"?: ((args_0: {
2282
+ handle: import("../../util/fieldHints").SelectionHandle;
2283
+ point: {
2284
+ x: number;
2285
+ y: number;
2286
+ };
2287
+ }) => any) | undefined;
2288
+ "onSelect-word"?: ((args_0: {
2289
+ x: number;
2290
+ y: number;
2291
+ }) => any) | undefined;
2158
2292
  }>, {
2159
2293
  currentlyFocusedFrame: import("vue").ComputedRef<{
2160
2294
  x: number;
@@ -1,5 +1,6 @@
1
1
  import type { BluepicField } from '@bluepic/types';
2
2
  import type { FieldHitbox } from '../../util/fieldHints';
3
+ import type { CanvasTextState, SelectionHandle } from '../../util/fieldHints/useCanvasTextEditing';
3
4
  type __VLS_Props = {
4
5
  hitboxes: FieldHitbox[];
5
6
  /**
@@ -25,10 +26,58 @@ type __VLS_Props = {
25
26
  /** On multi-frame templates, only the focused frame's hints are shown. */
26
27
  activeFrameIndex?: number;
27
28
  revealed: boolean;
29
+ /** Live caret + selection in SERIAL coordinates, or absent when not editing. */
30
+ textState?: CanvasTextState;
31
+ /** Element whose text is being edited — its hitbox becomes a selection surface. */
32
+ editingElementId?: string;
33
+ /** zoompinch's inverse projection, for turning a pointer position into serial coords. */
34
+ normalizeClientCoords: (clientX: number, clientY: number) => [number, number];
28
35
  };
29
36
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
+ "activate-field": (args_0: BluepicField) => any;
30
38
  "focus-field": (args_0: BluepicField) => any;
39
+ "select-start": (args_0: {
40
+ x: number;
41
+ y: number;
42
+ }) => any;
43
+ "select-move": (args_0: {
44
+ x: number;
45
+ y: number;
46
+ }) => any;
47
+ "select-end": () => any;
48
+ "handle-grab": (args_0: {
49
+ handle: SelectionHandle;
50
+ point: {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ }) => any;
55
+ "select-word": (args_0: {
56
+ x: number;
57
+ y: number;
58
+ }) => any;
31
59
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
60
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
32
61
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
62
+ "onSelect-start"?: ((args_0: {
63
+ x: number;
64
+ y: number;
65
+ }) => any) | undefined;
66
+ "onSelect-move"?: ((args_0: {
67
+ x: number;
68
+ y: number;
69
+ }) => any) | undefined;
70
+ "onSelect-end"?: (() => any) | undefined;
71
+ "onHandle-grab"?: ((args_0: {
72
+ handle: SelectionHandle;
73
+ point: {
74
+ x: number;
75
+ y: number;
76
+ };
77
+ }) => any) | undefined;
78
+ "onSelect-word"?: ((args_0: {
79
+ x: number;
80
+ y: number;
81
+ }) => any) | undefined;
33
82
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
83
  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 { CanvasTextState, SelectionHandle } from '../../util/fieldHints/useCanvasTextEditing';
5
6
  import type { AssetProxyConfig } from '../../util/assetProxy';
6
7
  type __VLS_Props = {
7
8
  bxCoreVersion?: string;
@@ -32,6 +33,10 @@ type __VLS_Props = {
32
33
  fieldHitboxes?: FieldHitbox[];
33
34
  /** Whether the hint overlay is currently shown (hover on desktop, tap on mobile). */
34
35
  hintsRevealed?: boolean;
36
+ /** Live caret + selection in serial coordinates while a hint-focused field is edited. */
37
+ textState?: CanvasTextState;
38
+ /** Element whose text is being edited. */
39
+ editingElementId?: string;
35
40
  };
36
41
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
37
42
  currentlyFocusedFrame: import("vue").ComputedRef<{
@@ -684,8 +689,50 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
684
689
  }) | undefined>;
685
690
  isMultiFrame: import("vue").ComputedRef<boolean>;
686
691
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
692
+ "activate-field": (args_0: BluepicField) => any;
687
693
  "focus-field": (args_0: BluepicField) => any;
694
+ "select-start": (args_0: {
695
+ x: number;
696
+ y: number;
697
+ }) => any;
698
+ "select-move": (args_0: {
699
+ x: number;
700
+ y: number;
701
+ }) => any;
702
+ "select-end": () => any;
703
+ "handle-grab": (args_0: {
704
+ handle: SelectionHandle;
705
+ point: {
706
+ x: number;
707
+ y: number;
708
+ };
709
+ }) => any;
710
+ "select-word": (args_0: {
711
+ x: number;
712
+ y: number;
713
+ }) => any;
688
714
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
715
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
689
716
  "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
717
+ "onSelect-start"?: ((args_0: {
718
+ x: number;
719
+ y: number;
720
+ }) => any) | undefined;
721
+ "onSelect-move"?: ((args_0: {
722
+ x: number;
723
+ y: number;
724
+ }) => any) | undefined;
725
+ "onSelect-end"?: (() => any) | undefined;
726
+ "onHandle-grab"?: ((args_0: {
727
+ handle: SelectionHandle;
728
+ point: {
729
+ x: number;
730
+ y: number;
731
+ };
732
+ }) => any) | undefined;
733
+ "onSelect-word"?: ((args_0: {
734
+ x: number;
735
+ y: number;
736
+ }) => any) | undefined;
690
737
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
691
738
  export default _default;