@feedmepos/mf-miniprogram-v2 0.1.0-dev.28 → 0.1.0-dev.29

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/app.js CHANGED
@@ -3,7 +3,7 @@ const n = [
3
3
  {
4
4
  path: "/",
5
5
  name: "miniprogram-v2-control",
6
- component: () => import("./ControlPlaneView-CWOvqYJU.js")
6
+ component: () => import("./ControlPlaneView-D9JAV8cA.js")
7
7
  },
8
8
  {
9
9
  path: "/:pathMatch(.*)*",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-miniprogram-v2",
3
- "version": "0.1.0-dev.28",
3
+ "version": "0.1.0-dev.29",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -120,4 +120,11 @@ export declare function serializeAnnotationPrompt(input: {
120
120
  styleDiffs: AnnotationStyleDiff[];
121
121
  textBefore?: string;
122
122
  textAfter?: string;
123
+ /** Images the user attached to this marker. One message carries every
124
+ * annotation, so the filename prefix is what pairs a saved upload with the
125
+ * marker it was dropped on. */
126
+ attachments?: {
127
+ count: number;
128
+ prefix: string;
129
+ };
123
130
  }): string;
@@ -0,0 +1,23 @@
1
+ import type { OutgoingAttachment } from './types';
2
+ export interface PendingImage extends OutgoingAttachment {
3
+ id: string;
4
+ }
5
+ export declare const ACCEPTED_IMAGE_MIME: Set<string>;
6
+ export declare const MAX_ATTACHMENT_BYTES: number;
7
+ export declare const MAX_ATTACHMENTS = 4;
8
+ export declare function readAsDataUrl(file: File): Promise<string>;
9
+ export declare function imageFilesFromPaste(event: ClipboardEvent): File[];
10
+ export declare function imageFilesFromDrop(event: DragEvent): File[];
11
+ /** Reads files into pending attachments. Returns rather than mutates so each
12
+ * caller keeps ownership of its own list (the chat has one, an annotation has
13
+ * one per marker). */
14
+ export declare function collectImages(files: File[], existingCount: number, max?: number): Promise<{
15
+ added: PendingImage[];
16
+ error: string | null;
17
+ }>;
18
+ /** One chat message carries every annotation, so an image has to say which
19
+ * marker it belongs to. The upload endpoint keeps the name it is given (after
20
+ * sanitizing and adding a timestamp prefix), so the marker survives into the
21
+ * saved path and the agent can pair them up. */
22
+ export declare function annotationAttachmentPrefix(marker: number): string;
23
+ export declare function annotationAttachmentName(marker: number, filename?: string): string;