@feedmepos/mf-miniprogram-v2 0.1.0-dev.39 → 0.1.0-dev.40

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-BkNnhN9g.js")
6
+ component: () => import("./ControlPlaneView-DcNJs7QW.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.39",
3
+ "version": "0.1.0-dev.40",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -1,6 +1,7 @@
1
1
  import type { PreviewAnnotationItem } from '../composables/previewAnnotations';
2
2
  type __VLS_Props = {
3
3
  items: PreviewAnnotationItem[];
4
+ text?: string;
4
5
  };
5
6
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
7
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,73 @@
1
+ import type { OutgoingAttachment } from './types';
2
+ import type { PreviewAnnotationItem } from './previewAnnotations';
3
+ /**
4
+ * Staging area shared by the preview panel, which places markers, and the chat
5
+ * composer, which sends them.
6
+ *
7
+ * Annotations used to pile up in a list beside the preview and were sent from
8
+ * there. That split the conversation in two — you asked in one place and read
9
+ * the answer in another — and a stack of open note cards buried the preview it
10
+ * was annotating. A marker now lands in the composer as a chip the moment it is
11
+ * placed, so one Send carries the typed message together with every marker, and
12
+ * the preview panel only ever shows the one marker being edited.
13
+ *
14
+ * Only a flat summary lives here. The annotation itself — its inspected element,
15
+ * temporary style overrides, attached images — stays in the preview panel,
16
+ * because that is the only place that can revert an override inside the iframe.
17
+ * The panel registers a controller so the composer can act on a chip without
18
+ * owning any of that state.
19
+ */
20
+ /** What the composer needs to render one staged marker. */
21
+ export interface AnnotationChip {
22
+ id: number;
23
+ /** Human label for the annotated element, e.g. `<button> “Order now”`. */
24
+ label: string;
25
+ note: string;
26
+ changeCount: number;
27
+ attachmentCount: number;
28
+ /** The element is still being inspected; the chip is sendable either way. */
29
+ pending: boolean;
30
+ }
31
+ export interface StagedAnnotations {
32
+ /** Agent-facing prose, one block per marker. */
33
+ blocks: string;
34
+ items: PreviewAnnotationItem[];
35
+ files: OutgoingAttachment[];
36
+ }
37
+ export interface AnnotationTrayController {
38
+ /** Reopens a marker in the preview panel's editor. */
39
+ focus(id: number): void;
40
+ /** Drops a marker and reverts its temporary overrides in the preview. */
41
+ remove(id: number): void;
42
+ clear(): void;
43
+ build(): StagedAnnotations | null;
44
+ }
45
+ export declare function useAnnotationTray(): {
46
+ chips: import("vue").Ref<{
47
+ id: number;
48
+ label: string;
49
+ note: string;
50
+ changeCount: number;
51
+ attachmentCount: number;
52
+ pending: boolean;
53
+ }[], AnnotationChip[] | {
54
+ id: number;
55
+ label: string;
56
+ note: string;
57
+ changeCount: number;
58
+ attachmentCount: number;
59
+ pending: boolean;
60
+ }[]>;
61
+ attachmentCount: import("vue").ComputedRef<number>;
62
+ annotationAttachments: import("vue").ComputedRef<number>;
63
+ composerAttachments: import("vue").Ref<number, number>;
64
+ setChips(next: AnnotationChip[]): void;
65
+ setComposerAttachmentCount(count: number): void;
66
+ /** Called by the preview panel on mount, and with null on unmount — nothing
67
+ * staged can be sent once the panel that owns it is gone. */
68
+ connect(next: AnnotationTrayController | null): void;
69
+ focus(id: number): void;
70
+ remove(id: number): void;
71
+ clear(): void;
72
+ build(): StagedAnnotations | null;
73
+ };
@@ -19,5 +19,20 @@ export interface PreviewAnnotationItem {
19
19
  hasProperties?: boolean;
20
20
  source?: string;
21
21
  }
22
- export declare function wrapAnnotationPayload(items: PreviewAnnotationItem[]): string;
23
- export declare function parseAnnotationMessage(text: string): PreviewAnnotationItem[] | null;
22
+ export interface PreviewAnnotationMessage {
23
+ /** What the user typed in the composer alongside the markers. Empty for a
24
+ * message that was nothing but annotations. */
25
+ text: string;
26
+ items: PreviewAnnotationItem[];
27
+ }
28
+ export declare function wrapAnnotationPayload(items: PreviewAnnotationItem[], text?: string): string;
29
+ export declare function parseAnnotationMessage(text: string): PreviewAnnotationMessage | null;
30
+ /** Assembles the single message the composer sends: the user's own words first,
31
+ * then the agent-facing marker blocks, then the card payload. The markers are
32
+ * where a request applies, so when the user typed something the prose leads and
33
+ * the blocks are introduced as its targets rather than as a second request. */
34
+ export declare function composeAnnotationMessage(input: {
35
+ text: string;
36
+ blocks: string;
37
+ items: PreviewAnnotationItem[];
38
+ }): string;