@bluepic/embed 0.4.0-next.98 → 0.5.0

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.
Files changed (122) hide show
  1. package/dist/bluepic-embed.iife.js +402 -178
  2. package/dist/bluepic-embed.umd.js +402 -178
  3. package/dist/c-B4BAHWS4.cjs +1 -0
  4. package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
  5. package/dist/components/AssetViewer/AssetViewer.vue.d.ts +71 -0
  6. package/dist/components/BxAudioPlayButton.vue.d.ts +24 -0
  7. package/dist/components/BxCard.vue.d.ts +35 -0
  8. package/dist/components/BxInput.vue.d.ts +7 -1
  9. package/dist/components/BxList.vue.d.ts +9 -0
  10. package/dist/components/BxListItem.vue.d.ts +13 -1
  11. package/dist/components/BxPopover.vue.d.ts +7 -0
  12. package/dist/components/BxPreviewLayer.vue.d.ts +18 -0
  13. package/dist/components/BxScrollbar.vue.d.ts +7 -0
  14. package/dist/components/BxSelect.vue.d.ts +16 -2
  15. package/dist/components/BxTable.vue.d.ts +109 -0
  16. package/dist/components/BxTabs.vue.d.ts +7 -0
  17. package/dist/components/BxWaveformThumb.vue.d.ts +27 -0
  18. package/dist/components/CollectionFieldPopup.vue.d.ts +4 -0
  19. package/dist/components/PopoverElement.vue.d.ts +10 -1
  20. package/dist/components/TemplateEditor/BatchCell.vue.d.ts +18 -0
  21. package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +264 -0
  22. package/dist/components/TemplateEditor/BatchExportPopup.vue.d.ts +68 -0
  23. package/dist/components/TemplateEditor/BatchImportPopup.vue.d.ts +25 -0
  24. package/dist/components/TemplateEditor/BxLiveTemplate.vue.d.ts +8 -0
  25. package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +285 -16
  26. package/dist/components/TemplateEditor/FieldHintsLayer.vue.d.ts +86 -0
  27. package/dist/components/TemplateEditor/TemplateView.vue.d.ts +77 -2
  28. package/dist/components/User/UserInfo.vue.d.ts +12 -1
  29. package/dist/components/directives/usePopup.d.ts +5 -0
  30. package/dist/components/fields/Collection.vue.d.ts +3 -0
  31. package/dist/components/fields/Image.vue.d.ts +19 -5
  32. package/dist/components/fields/ImageEdit.vue.d.ts +6 -1
  33. package/dist/components/fields/Text.vue.d.ts +1 -1
  34. package/dist/cpp-BfO2fOQK.cjs +1 -0
  35. package/dist/{cpp-CH0U-pDu.js → cpp-DxGBPWa5.js} +60 -39
  36. package/dist/{css-DXX4BvrO.js → css-Cx1gP-zj.js} +13 -8
  37. package/dist/css-DTF39MN3.cjs +1 -0
  38. package/dist/embed/embed.d.ts +1024 -228
  39. package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
  40. package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
  41. package/dist/{index-CWm6zOv7.js → index-C99_zLhc.js} +9 -9
  42. package/dist/index-D8N6IfRw.cjs +1 -0
  43. package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
  44. package/dist/java-DFXAwvvK.cjs +1 -0
  45. package/dist/javascript-C2jY0XE6.cjs +1 -0
  46. package/dist/{javascript-BAHKs5qZ.js → javascript-CgRUYx2b.js} +1 -0
  47. package/dist/main.cjs +240 -162
  48. package/dist/main.d.ts +20 -0
  49. package/dist/main.mjs +79357 -68780
  50. package/dist/markdown-BmL9j9cU.cjs +1 -0
  51. package/dist/{markdown-ga2-2-T7.js → markdown-D19noYwn.js} +9 -10
  52. package/dist/markdown-it-5-ieF6Bh.js +3790 -0
  53. package/dist/markdown-it-CLB5Jta6.cjs +16 -0
  54. package/dist/postal-mime-Df-WB8Vq.js +3337 -0
  55. package/dist/postal-mime-_7WF5UBe.cjs +28 -0
  56. package/dist/{python-CymlFLB0.js → python-BBUuE3AY.js} +20 -15
  57. package/dist/python-Clt6L10q.cjs +1 -0
  58. package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
  59. package/dist/rust-_vvcEGSJ.cjs +1 -0
  60. package/dist/{scss-DybQU0yX.js → scss-BWo_aR1L.js} +6 -1
  61. package/dist/scss-ex7iHSUb.cjs +1 -0
  62. package/dist/style.css +1 -1
  63. package/dist/theme/bridge.d.ts +14 -0
  64. package/dist/theme/color.d.ts +80 -0
  65. package/dist/theme/css.d.ts +8 -0
  66. package/dist/theme/index.d.ts +19 -0
  67. package/dist/theme/legacy.d.ts +3 -0
  68. package/dist/theme/resolve.d.ts +10 -0
  69. package/dist/theme/tokens.d.ts +129 -0
  70. package/dist/theme/types-contract.d.ts +13 -0
  71. package/dist/theme.cjs +1 -0
  72. package/dist/theme.mjs +1313 -0
  73. package/dist/{typescript-BRD67TAB.js → typescript-BHqLHF13.js} +1 -0
  74. package/dist/typescript-DYRnLHqF.cjs +1 -0
  75. package/dist/util/analytics.d.ts +16 -0
  76. package/dist/util/assetAuth.d.ts +35 -0
  77. package/dist/util/audioPreview.d.ts +8 -0
  78. package/dist/util/batch/csv.d.ts +58 -0
  79. package/dist/util/batch/export.d.ts +92 -0
  80. package/dist/util/batch/fields.d.ts +22 -0
  81. package/dist/util/batch/parseCSV.d.ts +72 -0
  82. package/dist/util/batch/useBatchRows.d.ts +67 -0
  83. package/dist/util/cloneDeep.d.ts +5 -5
  84. package/dist/util/cloudflareImages.d.ts +8 -1
  85. package/dist/util/contextCapture.d.ts +19 -0
  86. package/dist/util/export.d.ts +65 -18
  87. package/dist/util/fieldHints/chipAction.d.ts +23 -0
  88. package/dist/util/fieldHints/fieldFocus.d.ts +81 -0
  89. package/dist/util/fieldHints/geometry.d.ts +52 -0
  90. package/dist/util/fieldHints/index.d.ts +20 -0
  91. package/dist/util/fieldHints/probe.d.ts +84 -0
  92. package/dist/util/fieldHints/resolve.d.ts +55 -0
  93. package/dist/util/fieldHints/textProbe.d.ts +71 -0
  94. package/dist/util/fieldHints/useCanvasTextEditing.d.ts +125 -0
  95. package/dist/util/fieldHints/useChipHighlight.d.ts +29 -0
  96. package/dist/util/fieldHints/useFieldHitboxes.d.ts +5601 -0
  97. package/dist/util/fieldHints/useHintReveal.d.ts +10 -0
  98. package/dist/util/fieldTree.d.ts +20 -0
  99. package/dist/util/fields.d.ts +1 -1
  100. package/dist/util/gallery.d.ts +78 -32
  101. package/dist/util/popoverArrow.d.ts +33 -0
  102. package/dist/util/popupHeaderTools.d.ts +26 -0
  103. package/dist/util/scrollPassthrough.d.ts +9 -0
  104. package/dist/util/useTheme.d.ts +36 -1
  105. package/dist/util/visualViewport.d.ts +47 -0
  106. package/dist/xlsx-BopDBbWb.js +24176 -0
  107. package/dist/xlsx-qn1xoUuv.cjs +105 -0
  108. package/dist/{xml-B7THKYqr.js → xml-Bse49fPV.js} +9 -16
  109. package/dist/{xml-CII3FKiI.cjs → xml-CVmug_x4.cjs} +1 -1
  110. package/package.json +18 -5
  111. package/dist/c-C_Sx7N-F.cjs +0 -1
  112. package/dist/cpp-CEORmSCT.cjs +0 -1
  113. package/dist/css-l--Pv1Vb.cjs +0 -1
  114. package/dist/index-DFXQWOGQ.cjs +0 -1
  115. package/dist/java-BIk0G-rH.cjs +0 -1
  116. package/dist/javascript-NPBda6fN.cjs +0 -1
  117. package/dist/markdown-BbPYOuo6.cjs +0 -1
  118. package/dist/python-B6_9AjJr.cjs +0 -1
  119. package/dist/rust-DKnYCg2f.cjs +0 -1
  120. package/dist/scss-C_iicH8I.cjs +0 -1
  121. package/dist/typescript-ro3bsRwC.cjs +0 -1
  122. package/dist/util/backgroundRemoval.d.ts +0 -51
@@ -0,0 +1,86 @@
1
+ import type { BluepicField } from '@bluepic/types';
2
+ import type { FieldHitbox } from '../../util/fieldHints';
3
+ import type { CanvasTextState, SelectionHandle } from '../../util/fieldHints/useCanvasTextEditing';
4
+ type __VLS_Props = {
5
+ hitboxes: FieldHitbox[];
6
+ /**
7
+ * zoompinch's slot function. Takes CANVAS-pixel coordinates — and since the
8
+ * live template is sized to `serial.width × serial.height` (exactly as
9
+ * bx-studio sizes its SerialWrapper), those are serial coordinates. The
10
+ * canvas dimensions are still threaded through below rather than assumed,
11
+ * because the `serialWidth`/`serialHeight` prop path can render without a
12
+ * serial at all.
13
+ */
14
+ composePoint: (x: number, y: number) => [number, number];
15
+ canvasWidth: number;
16
+ canvasHeight: number;
17
+ serialWidth: number;
18
+ serialHeight: number;
19
+ /**
20
+ * Not read — a reactivity dependency. `composePoint` is a plain function
21
+ * closing over zoompinch's engine state, so nothing about calling it tells
22
+ * Vue to recompute when the user pans. Naming the live transform as a prop
23
+ * is what re-runs `placed` on every gesture frame.
24
+ */
25
+ transform: unknown;
26
+ /** On multi-frame templates, only the focused frame's hints are shown. */
27
+ activeFrameIndex?: number;
28
+ /** Paint only. The hitboxes stay clickable either way — see the stylesheet. */
29
+ revealed: boolean;
30
+ /** Live caret + selection in SERIAL coordinates, or absent when not editing. */
31
+ textState?: CanvasTextState;
32
+ /** Element whose text is being edited — its hitbox becomes a selection surface. */
33
+ editingElementId?: string;
34
+ /** zoompinch's inverse projection, for turning a pointer position into serial coords. */
35
+ normalizeClientCoords: (clientX: number, clientY: number) => [number, number];
36
+ };
37
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
+ "activate-field": (args_0: BluepicField) => any;
39
+ "focus-field": (args_0: BluepicField) => any;
40
+ "hover-field": (args_0: BluepicField | undefined) => any;
41
+ "select-start": (args_0: {
42
+ x: number;
43
+ y: number;
44
+ }) => any;
45
+ "select-move": (args_0: {
46
+ x: number;
47
+ y: number;
48
+ }) => any;
49
+ "select-end": () => any;
50
+ "handle-grab": (args_0: {
51
+ handle: SelectionHandle;
52
+ point: {
53
+ x: number;
54
+ y: number;
55
+ };
56
+ }) => any;
57
+ "select-word": (args_0: {
58
+ x: number;
59
+ y: number;
60
+ }) => any;
61
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
62
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
63
+ "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
64
+ "onHover-field"?: ((args_0: BluepicField | undefined) => any) | undefined;
65
+ "onSelect-start"?: ((args_0: {
66
+ x: number;
67
+ y: number;
68
+ }) => any) | undefined;
69
+ "onSelect-move"?: ((args_0: {
70
+ x: number;
71
+ y: number;
72
+ }) => any) | undefined;
73
+ "onSelect-end"?: (() => any) | undefined;
74
+ "onHandle-grab"?: ((args_0: {
75
+ handle: SelectionHandle;
76
+ point: {
77
+ x: number;
78
+ y: number;
79
+ };
80
+ }) => any) | undefined;
81
+ "onSelect-word"?: ((args_0: {
82
+ x: number;
83
+ y: number;
84
+ }) => any) | undefined;
85
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
86
+ export default _default;
@@ -1,6 +1,8 @@
1
1
  import { Transform } from '@zoompinch/vue';
2
2
  import { Ref } from 'vue';
3
- import { Template } from '@bluepic/types';
3
+ import { BluepicField, Template } from '@bluepic/types';
4
+ import type { FieldHitbox } from '../../util/fieldHints';
5
+ import type { CanvasTextState, SelectionHandle } from '../../util/fieldHints/useCanvasTextEditing';
4
6
  import type { AssetProxyConfig } from '../../util/assetProxy';
5
7
  type __VLS_Props = {
6
8
  bxCoreVersion?: string;
@@ -12,6 +14,8 @@ type __VLS_Props = {
12
14
  serialWidth?: number;
13
15
  serialHeight?: number;
14
16
  preview?: string;
17
+ /** Passed straight through to BxLiveTemplate's skeleton — see its own doc. */
18
+ personalizedPreviewSrc?: string | null;
15
19
  offset: {
16
20
  top: number;
17
21
  right: number;
@@ -27,6 +31,17 @@ type __VLS_Props = {
27
31
  * reflects the currently rendered graphic.
28
32
  */
29
33
  accessibilityDescription?: string;
34
+ /** Derived field-hint targets in serial coordinates. Empty = no overlay. */
35
+ fieldHitboxes?: FieldHitbox[];
36
+ /**
37
+ * Whether the hint overlay is PAINTED (hover on desktop, tap on mobile). The
38
+ * hitboxes stay clickable regardless — see `FieldHintsLayer`.
39
+ */
40
+ hintsRevealed?: boolean;
41
+ /** Live caret + selection in serial coordinates while a hint-focused field is edited. */
42
+ textState?: CanvasTextState;
43
+ /** Element whose text is being edited. */
44
+ editingElementId?: string;
30
45
  };
31
46
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
32
47
  currentlyFocusedFrame: import("vue").ComputedRef<{
@@ -47,6 +62,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
47
62
  serialWidth?: number;
48
63
  serialHeight?: number;
49
64
  preview?: string;
65
+ personalizedPreviewSrc?: string | null;
50
66
  data?: {
51
67
  [k: string]: unknown;
52
68
  };
@@ -73,6 +89,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
73
89
  watermark: boolean;
74
90
  resultType: "blob";
75
91
  externalCanvas: HTMLCanvasElement | null;
92
+ svgLoadWaitDelay?: number;
76
93
  }): Promise<Blob>;
77
94
  (options: {
78
95
  type: "image/png" | "image/jpeg" | "image/jpge" | "image/webp";
@@ -87,6 +104,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
87
104
  watermark: boolean;
88
105
  resultType: "canvas";
89
106
  externalCanvas: HTMLCanvasElement | null;
107
+ svgLoadWaitDelay?: number;
90
108
  }): Promise<HTMLCanvasElement>;
91
109
  };
92
110
  aspectRatio: import("vue").ComputedRef<number>;
@@ -118,6 +136,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
118
136
  serialWidth?: number;
119
137
  serialHeight?: number;
120
138
  preview?: string;
139
+ personalizedPreviewSrc?: string | null;
121
140
  data?: {
122
141
  [k: string]: unknown;
123
142
  };
@@ -144,6 +163,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
144
163
  watermark: boolean;
145
164
  resultType: "blob";
146
165
  externalCanvas: HTMLCanvasElement | null;
166
+ svgLoadWaitDelay?: number;
147
167
  }): Promise<Blob>;
148
168
  (options: {
149
169
  type: "image/png" | "image/jpeg" | "image/jpge" | "image/webp";
@@ -158,6 +178,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
158
178
  watermark: boolean;
159
179
  resultType: "canvas";
160
180
  externalCanvas: HTMLCanvasElement | null;
181
+ svgLoadWaitDelay?: number;
161
182
  }): Promise<HTMLCanvasElement>;
162
183
  };
163
184
  aspectRatio: import("vue").ComputedRef<number>;
@@ -174,6 +195,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
174
195
  serialWidth?: number;
175
196
  serialHeight?: number;
176
197
  preview?: string;
198
+ personalizedPreviewSrc?: string | null;
177
199
  data?: {
178
200
  [k: string]: unknown;
179
201
  };
@@ -200,6 +222,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
200
222
  watermark: boolean;
201
223
  resultType: "blob";
202
224
  externalCanvas: HTMLCanvasElement | null;
225
+ svgLoadWaitDelay?: number;
203
226
  }): Promise<Blob>;
204
227
  (options: {
205
228
  type: "image/png" | "image/jpeg" | "image/jpge" | "image/webp";
@@ -214,6 +237,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
214
237
  watermark: boolean;
215
238
  resultType: "canvas";
216
239
  externalCanvas: HTMLCanvasElement | null;
240
+ svgLoadWaitDelay?: number;
217
241
  }): Promise<HTMLCanvasElement>;
218
242
  };
219
243
  aspectRatio: import("vue").ComputedRef<number>;
@@ -245,6 +269,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
245
269
  serialWidth?: number;
246
270
  serialHeight?: number;
247
271
  preview?: string;
272
+ personalizedPreviewSrc?: string | null;
248
273
  data?: {
249
274
  [k: string]: unknown;
250
275
  };
@@ -271,6 +296,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
271
296
  watermark: boolean;
272
297
  resultType: "blob";
273
298
  externalCanvas: HTMLCanvasElement | null;
299
+ svgLoadWaitDelay?: number;
274
300
  }): Promise<Blob>;
275
301
  (options: {
276
302
  type: "image/png" | "image/jpeg" | "image/jpge" | "image/webp";
@@ -285,6 +311,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
285
311
  watermark: boolean;
286
312
  resultType: "canvas";
287
313
  externalCanvas: HTMLCanvasElement | null;
314
+ svgLoadWaitDelay?: number;
288
315
  }): Promise<HTMLCanvasElement>;
289
316
  };
290
317
  aspectRatio: import("vue").ComputedRef<number>;
@@ -678,5 +705,53 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
678
705
  };
679
706
  }) | undefined>;
680
707
  isMultiFrame: import("vue").ComputedRef<boolean>;
681
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
708
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
709
+ "activate-field": (args_0: BluepicField) => any;
710
+ "focus-field": (args_0: BluepicField) => any;
711
+ "hover-field": (args_0: BluepicField | undefined) => any;
712
+ "select-start": (args_0: {
713
+ x: number;
714
+ y: number;
715
+ }) => any;
716
+ "select-move": (args_0: {
717
+ x: number;
718
+ y: number;
719
+ }) => any;
720
+ "select-end": () => any;
721
+ "handle-grab": (args_0: {
722
+ handle: SelectionHandle;
723
+ point: {
724
+ x: number;
725
+ y: number;
726
+ };
727
+ }) => any;
728
+ "select-word": (args_0: {
729
+ x: number;
730
+ y: number;
731
+ }) => any;
732
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
733
+ "onActivate-field"?: ((args_0: BluepicField) => any) | undefined;
734
+ "onFocus-field"?: ((args_0: BluepicField) => any) | undefined;
735
+ "onHover-field"?: ((args_0: BluepicField | undefined) => any) | undefined;
736
+ "onSelect-start"?: ((args_0: {
737
+ x: number;
738
+ y: number;
739
+ }) => any) | undefined;
740
+ "onSelect-move"?: ((args_0: {
741
+ x: number;
742
+ y: number;
743
+ }) => any) | undefined;
744
+ "onSelect-end"?: (() => any) | undefined;
745
+ "onHandle-grab"?: ((args_0: {
746
+ handle: SelectionHandle;
747
+ point: {
748
+ x: number;
749
+ y: number;
750
+ };
751
+ }) => any) | undefined;
752
+ "onSelect-word"?: ((args_0: {
753
+ x: number;
754
+ y: number;
755
+ }) => any) | undefined;
756
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
682
757
  export default _default;
@@ -1,11 +1,16 @@
1
1
  import { z } from '@hono/zod-openapi';
2
2
  import { Studio } from '@bluepic/types';
3
3
  import type { User } from '@auth0/auth0-vue';
4
+ import type { VNode } from 'vue';
4
5
  type __VLS_Props = {
5
6
  user: z.infer<typeof Studio.auth0UserViaManagementAPISchema> | User;
6
7
  showSettings?: boolean;
7
8
  };
8
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ type __VLS_Slots = {
10
+ /** Host content between the identity block and the Settings / Logout actions. */
11
+ default?: () => VNode[] | VNode;
12
+ };
13
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
14
  logout: () => any;
10
15
  settings: () => any;
11
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -14,4 +19,10 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
14
19
  }>, {
15
20
  showSettings: boolean;
16
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
17
23
  export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -91,6 +91,11 @@ export type PopoverCreationOptions = {
91
91
  capturedContext?: Record<string | symbol, any>;
92
92
  content: () => VNode[] | VNode;
93
93
  noPointerEvents?: boolean;
94
+ /**
95
+ * Override scroll pass-through. Defaults to `!darkenBackground`: a popover
96
+ * without a scrim lets wheel/touch gestures beside it scroll the app.
97
+ */
98
+ scrollPassthrough?: boolean;
94
99
  closeOnClickOutside?: boolean;
95
100
  transitionDuration?: number;
96
101
  };
@@ -10,6 +10,9 @@ declare const _default: <T extends {
10
10
  description?: string;
11
11
  detailedDescription?: string;
12
12
  bridge: FieldsBridge;
13
+ /** Authored per-entry defaults — this is the `defaultObject` key of the Collection field type. */
14
+ defaultObject?: T;
15
+ /** @deprecated old prop name for `defaultObject`; kept so existing direct consumers stay valid. */
13
16
  defaultValue?: T;
14
17
  mobile?: boolean;
15
18
  min?: number;
@@ -1,4 +1,4 @@
1
- import { BluepicField, FieldsBridge, ImageLibrary, ImageMime } from '@bluepic/types';
1
+ import { BluepicField, FieldsBridge, ImageLibrary, ImageMime, Template } from '@bluepic/types';
2
2
  type __VLS_Props = {
3
3
  layout: 'compact' | 'normal';
4
4
  allowUploadFromDevice: boolean;
@@ -8,7 +8,6 @@ type __VLS_Props = {
8
8
  convertTo?: ImageMime;
9
9
  quality: number;
10
10
  imageLibraries: ImageLibrary[];
11
- removeBackground: boolean;
12
11
  uploadLabel?: string;
13
12
  actionsLabel?: string;
14
13
  maxSize?: number;
@@ -17,12 +16,27 @@ type __VLS_Props = {
17
16
  field?: BluepicField;
18
17
  };
19
18
  type __VLS_PublicProps = __VLS_Props & {
20
- 'modelValue': string;
19
+ /**
20
+ * The bound value.
21
+ *
22
+ * Typed as `ImageValue | string` because BOTH shapes occur in the wild: a
23
+ * template whose image element is bound straight to a src holds a plain string,
24
+ * while one where the element's image value carries settings of its own (crop,
25
+ * mirror flags, `removeBackground`) holds the whole object — `setPropertyValue`
26
+ * in bx-studio writes the object INTO the binding whenever the element's
27
+ * property expression is a simple binding key.
28
+ *
29
+ * Reading is via `imageSource`; writing MUST go through `handleImageSelection`,
30
+ * which preserves the object. Assigning a bare string here would silently drop
31
+ * every other key on the value — that is exactly how background removal was
32
+ * lost on the first upload.
33
+ */
34
+ 'modelValue': Template.ImageValue | string;
21
35
  };
22
36
  declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
- "update:modelValue": (value: string) => any;
37
+ "update:modelValue": (value: string | Template.ImageValue) => any;
24
38
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
+ "onUpdate:modelValue"?: ((value: string | Template.ImageValue) => any) | undefined;
26
40
  }>, {
27
41
  maxSize: number;
28
42
  uploadLabel: string;
@@ -7,13 +7,17 @@ type __VLS_Props = {
7
7
  convertTo?: ImageMime;
8
8
  quality: number;
9
9
  imageLibraries: ImageLibrary[];
10
- removeBackground: boolean;
11
10
  uploadLabel?: string;
12
11
  editLabel?: string;
13
12
  actionsLabel?: string;
14
13
  maxSize?: number;
15
14
  bridge: FieldsBridge;
16
15
  mobile?: boolean;
16
+ /**
17
+ * Table-cell layout (batch editor): a small thumbnail with icon-only
18
+ * actions in a row, instead of the card layout with labelled buttons.
19
+ */
20
+ compact?: boolean;
17
21
  field?: BluepicField;
18
22
  allowCropImage: boolean;
19
23
  aspectRatio: number;
@@ -45,6 +49,7 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
45
49
  uploadLabel: string;
46
50
  actionsLabel: string;
47
51
  mobile: boolean;
52
+ compact: boolean;
48
53
  resetCropOnChange: boolean;
49
54
  allowPadding: boolean;
50
55
  autoCrop: boolean;
@@ -17,7 +17,7 @@ type __VLS_Props = {
17
17
  mixedStyleLabel: Localized<string>;
18
18
  };
19
19
  bridge: FieldsBridge;
20
- maxHeight: string | null;
20
+ maxHeight?: string | null;
21
21
  labelId?: string;
22
22
  minWidth: string;
23
23
  maxWidth: string;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function w(e){const n=e.regex,a=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),_="decltype\\(auto\\)",c="[a-zA-Z_]\\w*::",m="(?!struct)("+_+"|"+n.optional(c)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},r={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},i={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},E={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},r,{scope:"string",begin:/<.*?>/},a,e.C_BLOCK_COMMENT_MODE]},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(r,{className:"string"}),a,e.C_BLOCK_COMMENT_MODE]},o=[E,f],g={className:"title",begin:n.optional(c)+e.IDENT_RE,relevance:0},u=n.optional(c)+e.IDENT_RE+"\\s*\\(",b=12,d=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],N=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],t={type:N,keyword:d,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},p={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:n.concat(/\b/,`(?!${d.join("|")})`,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},l=[p,...o,s,a,e.C_BLOCK_COMMENT_MODE,i,r],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:t,contains:l.concat([{begin:/\(/,end:/\)/,keywords:t,contains:l.concat(["self"]),relevance:0}]),relevance:0},O={className:"function",begin:"("+m+"[\\*&\\s]+){1,"+b+"}"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:_,keywords:t,relevance:0},{begin:u,returnBegin:!0,contains:[g],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[r,i]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[a,e.C_BLOCK_COMMENT_MODE,r,i,s,{begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:["self",a,e.C_BLOCK_COMMENT_MODE,r,i,s]}]},s,a,e.C_BLOCK_COMMENT_MODE,...o]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:t,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(y,O,p,l,[...o,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:t,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:t},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}exports.default=w;
@@ -1,8 +1,8 @@
1
- function h(e) {
2
- const n = e.regex, a = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), _ = "decltype\\(auto\\)", c = "[a-zA-Z_]\\w*::", m = "(?!struct)(" + _ + "|" + n.optional(c) + "[a-zA-Z_]\\w*" + n.optional("<[^<>]+>") + ")", r = {
1
+ function S(e) {
2
+ const n = e.regex, a = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), _ = "decltype\\(auto\\)", c = "[a-zA-Z_]\\w*::", m = "(?!struct)(" + _ + "|" + n.optional(c) + "[a-zA-Z_]\\w*" + n.optional("<[^<>]+>") + ")", s = {
3
3
  className: "type",
4
4
  begin: "\\b[a-z\\d_]*_t\\b"
5
- }, s = {
5
+ }, r = {
6
6
  className: "string",
7
7
  variants: [
8
8
  {
@@ -16,9 +16,13 @@ function h(e) {
16
16
  end: "'",
17
17
  illegal: "."
18
18
  },
19
+ // https://en.cppreference.com/w/cpp/language/string_literal
20
+ // a d-char-sequence never contains parentheses, backslashes or whitespace;
21
+ // quotes are excluded as well so the closing delimiter cannot swallow the
22
+ // quote that actually terminates the literal
19
23
  e.END_SAME_AS_BEGIN({
20
- begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
21
- end: /\)([^()\\ ]{0,16})"/
24
+ begin: /(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,
25
+ end: /\)([^()\\\s"]{0,16})"/
22
26
  })
23
27
  ]
24
28
  }, i = {
@@ -26,7 +30,7 @@ function h(e) {
26
30
  variants: [
27
31
  // Floating-point literal.
28
32
  {
29
- begin: "[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"
33
+ begin: "[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"
30
34
  },
31
35
  // Integer literal.
32
36
  {
@@ -36,7 +40,25 @@ function h(e) {
36
40
  }
37
41
  ],
38
42
  relevance: 0
39
- }, o = {
43
+ }, E = {
44
+ scope: "meta",
45
+ begin: /#\s*include\b/,
46
+ end: /$/,
47
+ keywords: { keyword: "include" },
48
+ contains: [
49
+ {
50
+ // the `\` at the end of a line signaling continuation
51
+ begin: /\\\n/
52
+ },
53
+ r,
54
+ {
55
+ scope: "string",
56
+ begin: /<.*?>/
57
+ },
58
+ a,
59
+ e.C_BLOCK_COMMENT_MODE
60
+ ]
61
+ }, f = {
40
62
  className: "meta",
41
63
  begin: /#\s*[a-z]+\b/,
42
64
  end: /$/,
@@ -46,19 +68,18 @@ function h(e) {
46
68
  begin: /\\\n/,
47
69
  relevance: 0
48
70
  },
49
- e.inherit(s, { className: "string" }),
50
- {
51
- className: "string",
52
- begin: /<.*?>/
53
- },
71
+ e.inherit(r, { className: "string" }),
54
72
  a,
55
73
  e.C_BLOCK_COMMENT_MODE
56
74
  ]
57
- }, E = {
75
+ }, o = [
76
+ E,
77
+ f
78
+ ], g = {
58
79
  className: "title",
59
80
  begin: n.optional(c) + e.IDENT_RE,
60
81
  relevance: 0
61
- }, u = n.optional(c) + e.IDENT_RE + "\\s*\\(", d = [
82
+ }, u = n.optional(c) + e.IDENT_RE + "\\s*\\(", b = 12, d = [
62
83
  "alignas",
63
84
  "alignof",
64
85
  "and",
@@ -146,7 +167,7 @@ function h(e) {
146
167
  "while",
147
168
  "xor",
148
169
  "xor_eq"
149
- ], f = [
170
+ ], N = [
150
171
  "bool",
151
172
  "char",
152
173
  "char16_t",
@@ -163,7 +184,7 @@ function h(e) {
163
184
  "signed",
164
185
  "const",
165
186
  "static"
166
- ], g = [
187
+ ], T = [
167
188
  "any",
168
189
  "auto_ptr",
169
190
  "barrier",
@@ -221,7 +242,7 @@ function h(e) {
221
242
  "weak_ptr",
222
243
  "wstring",
223
244
  "wstring_view"
224
- ], b = [
245
+ ], C = [
225
246
  "abort",
226
247
  "abs",
227
248
  "acos",
@@ -323,7 +344,7 @@ function h(e) {
323
344
  "vprintf",
324
345
  "vsprintf"
325
346
  ], t = {
326
- type: f,
347
+ type: N,
327
348
  keyword: d,
328
349
  literal: [
329
350
  "NULL",
@@ -333,13 +354,13 @@ function h(e) {
333
354
  "true"
334
355
  ],
335
356
  built_in: ["_Pragma"],
336
- _type_hints: g
357
+ _type_hints: T
337
358
  }, p = {
338
359
  className: "function.dispatch",
339
360
  relevance: 0,
340
361
  keywords: {
341
362
  // Only for relevance, not highlighting.
342
- _hint: b
363
+ _hint: C
343
364
  },
344
365
  begin: n.concat(
345
366
  /\b/,
@@ -349,13 +370,13 @@ function h(e) {
349
370
  )
350
371
  }, l = [
351
372
  p,
352
- o,
353
- r,
373
+ ...o,
374
+ s,
354
375
  a,
355
376
  e.C_BLOCK_COMMENT_MODE,
356
377
  i,
357
- s
358
- ], N = {
378
+ r
379
+ ], y = {
359
380
  // This mode covers expression context where we can't expect a function
360
381
  // definition and shouldn't highlight anything that looks like one:
361
382
  // `return some()`, `else if()`, `(x*sum(1, 2))`
@@ -384,9 +405,9 @@ function h(e) {
384
405
  }
385
406
  ]),
386
407
  relevance: 0
387
- }, T = {
408
+ }, O = {
388
409
  className: "function",
389
- begin: "(" + m + "[\\*&\\s]+)+" + u,
410
+ begin: "(" + m + "[\\*&\\s]+){1," + b + "}" + u,
390
411
  returnBegin: !0,
391
412
  end: /[{;=]/,
392
413
  excludeEnd: !0,
@@ -402,7 +423,7 @@ function h(e) {
402
423
  {
403
424
  begin: u,
404
425
  returnBegin: !0,
405
- contains: [E],
426
+ contains: [g],
406
427
  relevance: 0
407
428
  },
408
429
  // needed because we do not have look-behind on the below rule
@@ -416,7 +437,7 @@ function h(e) {
416
437
  begin: /:/,
417
438
  endsWithParent: !0,
418
439
  contains: [
419
- s,
440
+ r,
420
441
  i
421
442
  ]
422
443
  },
@@ -435,9 +456,9 @@ function h(e) {
435
456
  contains: [
436
457
  a,
437
458
  e.C_BLOCK_COMMENT_MODE,
438
- s,
439
- i,
440
459
  r,
460
+ i,
461
+ s,
441
462
  // Count matching parentheses.
442
463
  {
443
464
  begin: /\(/,
@@ -448,17 +469,17 @@ function h(e) {
448
469
  "self",
449
470
  a,
450
471
  e.C_BLOCK_COMMENT_MODE,
451
- s,
472
+ r,
452
473
  i,
453
- r
474
+ s
454
475
  ]
455
476
  }
456
477
  ]
457
478
  },
458
- r,
479
+ s,
459
480
  a,
460
481
  e.C_BLOCK_COMMENT_MODE,
461
- o
482
+ ...o
462
483
  ]
463
484
  };
464
485
  return {
@@ -476,12 +497,12 @@ function h(e) {
476
497
  illegal: "</",
477
498
  classNameAliases: { "function.dispatch": "built_in" },
478
499
  contains: [].concat(
479
- N,
480
- T,
500
+ y,
501
+ O,
481
502
  p,
482
503
  l,
483
504
  [
484
- o,
505
+ ...o,
485
506
  {
486
507
  // containers: ie, `vector <int> rooms (9);`
487
508
  begin: "\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",
@@ -489,7 +510,7 @@ function h(e) {
489
510
  keywords: t,
490
511
  contains: [
491
512
  "self",
492
- r
513
+ s
493
514
  ]
494
515
  },
495
516
  {
@@ -513,5 +534,5 @@ function h(e) {
513
534
  };
514
535
  }
515
536
  export {
516
- h as default
537
+ S as default
517
538
  };