@feedmepos/mf-miniprogram-v2 0.1.0-dev.27 → 0.1.0-dev.28
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
package/dist/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PreviewBridgeElement } from './types';
|
|
2
|
-
export type AnnotationStyleKey = 'color' | 'backgroundColor' | 'borderColor' | 'opacity' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'letterSpacing' | 'textAlign' | 'borderRadius' | 'borderWidth' | 'width' | 'height' | 'padding' | 'margin';
|
|
2
|
+
export type AnnotationStyleKey = 'color' | 'backgroundColor' | 'borderColor' | 'opacity' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'letterSpacing' | 'textAlign' | 'borderRadius' | 'borderWidth' | 'width' | 'height' | 'padding' | 'margin' | 'objectFit' | 'aspectRatio' | 'fill' | 'stroke' | 'display' | 'gap' | 'justifyContent' | 'alignItems';
|
|
3
3
|
/** Which editor a property gets. The bridge validates every value with
|
|
4
4
|
* `CSS.supports` and rejects the whole patch on a miss, so controls must only
|
|
5
5
|
* ever emit complete values — never the intermediate state of a keystroke. */
|
|
6
|
-
export type AnnotationControlKind = 'color' | 'length' | 'ratio' | '
|
|
6
|
+
export type AnnotationControlKind = 'color' | 'length' | 'ratio' | 'choice' | 'align' | 'font' | 'box';
|
|
7
7
|
export interface AnnotationChoice {
|
|
8
8
|
value: string;
|
|
9
9
|
label: string;
|
|
@@ -41,6 +41,18 @@ export interface AnnotationSection {
|
|
|
41
41
|
defaultOpen: boolean;
|
|
42
42
|
}
|
|
43
43
|
export declare const ANNOTATION_SECTIONS: readonly AnnotationSection[];
|
|
44
|
+
export type AnnotationElementKind = 'media' | 'text' | 'container' | 'control';
|
|
45
|
+
/** Which family of controls the element deserves. Deliberately a heuristic used
|
|
46
|
+
* only to order and pre-collapse sections — never to remove a control — because
|
|
47
|
+
* a `<span style="display:block">` or a div used purely as a label would
|
|
48
|
+
* otherwise lose the properties it actually needs. */
|
|
49
|
+
export declare function annotationElementKind(element: PreviewBridgeElement | null): AnnotationElementKind;
|
|
50
|
+
/** Sections ordered for the element, with the relevant ones expanded. */
|
|
51
|
+
export declare function annotationSectionsFor(kind: AnnotationElementKind): AnnotationSection[];
|
|
52
|
+
/** CSS ignores width, height and vertical padding on a non-replaced inline box.
|
|
53
|
+
* The control still works, so this only feeds a tooltip — silently doing
|
|
54
|
+
* nothing is what makes the panel feel broken. */
|
|
55
|
+
export declare function ignoredOnInline(element: PreviewBridgeElement | null, key: AnnotationStyleKey): boolean;
|
|
44
56
|
export interface AnnotationStyleDiff {
|
|
45
57
|
property: AnnotationStyleKey;
|
|
46
58
|
before: string;
|
|
@@ -95,6 +107,10 @@ export declare function brandKitPresets(colors: Record<string, string>, fonts: R
|
|
|
95
107
|
colors: Record<string, string>;
|
|
96
108
|
fonts: Record<string, string>;
|
|
97
109
|
}): BrandKitPreset[];
|
|
110
|
+
/** An `<img>` reports no nearby text, so without its src and alt the agent is
|
|
111
|
+
* told only that "some image" changed and has to guess which file — the failure
|
|
112
|
+
* mode being an invented asset path that breaks the build. */
|
|
113
|
+
export declare function annotationAssetContext(element: PreviewBridgeElement | null): string | null;
|
|
98
114
|
export declare function serializeAnnotationPrompt(input: {
|
|
99
115
|
id: number;
|
|
100
116
|
route: string;
|