@bluepic/embed 0.4.0-next.197 → 0.4.0-next.199

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.
@@ -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;
@@ -16,12 +16,27 @@ type __VLS_Props = {
16
16
  field?: BluepicField;
17
17
  };
18
18
  type __VLS_PublicProps = __VLS_Props & {
19
- '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;
20
35
  };
21
36
  declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
- "update:modelValue": (value: string) => any;
37
+ "update:modelValue": (value: string | Template.ImageValue) => any;
23
38
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
39
+ "onUpdate:modelValue"?: ((value: string | Template.ImageValue) => any) | undefined;
25
40
  }>, {
26
41
  maxSize: number;
27
42
  uploadLabel: string;