@feedmepos/mf-miniprogram-v2 0.1.0-dev.25 → 0.1.0-dev.27
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/ControlPlaneView-Dz-wlq8R.js +13215 -0
- package/dist/app.js +1 -1
- package/dist/package.json +2 -2
- package/dist/src/components/AnnotationColorField.vue.d.ts +14 -0
- package/dist/src/components/AnnotationPropertyPanel.vue.d.ts +32 -0
- package/dist/src/components/AnnotationStyleControl.vue.d.ts +14 -0
- package/dist/src/components/MessageItem.vue.d.ts +7 -1
- package/dist/src/composables/annotationEditing.d.ts +107 -0
- package/dist/src/composables/localPreference.d.ts +10 -0
- package/dist/src/composables/previewAnnotations.d.ts +14 -0
- package/dist/src/composables/types.d.ts +70 -2
- package/dist/src/composables/useChat.d.ts +7 -0
- package/dist/src/composables/useProject.d.ts +107 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/ControlPlaneView-BEYuTjG6.js +0 -13204
- package/dist/src/components/QuickEditBoxControl.vue.d.ts +0 -22
- package/dist/src/components/QuickEditFieldControl.vue.d.ts +0 -20
- package/dist/src/components/QuickEditMessage.vue.d.ts +0 -7
- package/dist/src/components/QuickEditSidebar.vue.d.ts +0 -34
- package/dist/src/composables/quickEdit.d.ts +0 -125
- package/dist/src/composables/quickEditClasses.d.ts +0 -92
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { QuickEditOption } from '../composables/quickEdit';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
label: string;
|
|
4
|
-
/** `T|R|B|L`; an empty segment means that side is not set by any class. */
|
|
5
|
-
value: string;
|
|
6
|
-
options: QuickEditOption[];
|
|
7
|
-
invalid?: string | null;
|
|
8
|
-
/**
|
|
9
|
-
* Effective value from the cascade, shown when no class sets this group.
|
|
10
|
-
* Deliberately NOT named `computed`: <script setup> exposes imported bindings
|
|
11
|
-
* to the template, so a prop of that name is shadowed by Vue's own `computed`
|
|
12
|
-
* import and the template renders the function's source instead.
|
|
13
|
-
*/
|
|
14
|
-
cascade?: string;
|
|
15
|
-
};
|
|
16
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
|
-
change: (value: string) => any;
|
|
18
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onChange?: ((value: string) => any) | undefined;
|
|
20
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const _default: typeof __VLS_export;
|
|
22
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { QuickEditField, QuickEditFieldStatus, QuickEditValue } from '../composables/quickEdit';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
prop: string;
|
|
4
|
-
field: QuickEditField;
|
|
5
|
-
value: QuickEditValue;
|
|
6
|
-
status?: QuickEditFieldStatus;
|
|
7
|
-
invalid?: string | null;
|
|
8
|
-
hint?: string | null;
|
|
9
|
-
uploading?: boolean;
|
|
10
|
-
uploadDisabled?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
change: (value: QuickEditValue) => any;
|
|
14
|
-
"pick-image": (file: File) => any;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onChange?: ((value: QuickEditValue) => any) | undefined;
|
|
17
|
-
"onPick-image"?: ((file: File) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
declare const _default: typeof __VLS_export;
|
|
20
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { QuickEditHistoryItem } from '../composables/quickEdit';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
item: QuickEditHistoryItem;
|
|
4
|
-
};
|
|
5
|
-
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
|
-
declare const _default: typeof __VLS_export;
|
|
7
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type QuickEditFieldStatus, type QuickEditSelection, type QuickEditValue } from '../composables/quickEdit';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
selection: QuickEditSelection;
|
|
4
|
-
/** Innermost-first candidate path from one click; drives the path selector. */
|
|
5
|
-
targets?: QuickEditSelection[];
|
|
6
|
-
/** Index of the entry currently shown, so the path can mark it. */
|
|
7
|
-
activeTarget?: number;
|
|
8
|
-
statuses: Record<string, QuickEditFieldStatus>;
|
|
9
|
-
reasons: Record<string, string>;
|
|
10
|
-
busy?: boolean;
|
|
11
|
-
error?: string | null;
|
|
12
|
-
uploadAsset: (file: File) => Promise<string>;
|
|
13
|
-
};
|
|
14
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
|
-
change: (payload: {
|
|
16
|
-
prop: string;
|
|
17
|
-
value: QuickEditValue;
|
|
18
|
-
}) => any;
|
|
19
|
-
confirm: () => any;
|
|
20
|
-
cancel: () => any;
|
|
21
|
-
retarget: (index: number) => any;
|
|
22
|
-
"preview-target": (index: number | null) => any;
|
|
23
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
-
onChange?: ((payload: {
|
|
25
|
-
prop: string;
|
|
26
|
-
value: QuickEditValue;
|
|
27
|
-
}) => any) | undefined;
|
|
28
|
-
onConfirm?: (() => any) | undefined;
|
|
29
|
-
onCancel?: (() => any) | undefined;
|
|
30
|
-
onRetarget?: ((index: number) => any) | undefined;
|
|
31
|
-
"onPreview-target"?: ((index: number | null) => any) | undefined;
|
|
32
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
-
declare const _default: typeof __VLS_export;
|
|
34
|
-
export default _default;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { type QuickEditClassGroupId, type QuickEditClassSection } from './quickEditClasses.ts';
|
|
2
|
-
export type QuickEditControl = 'text' | 'textarea' | 'image' | 'color' | 'select' | 'number' | 'boolean'
|
|
3
|
-
/** Four-side padding/margin editor; value is the `T|R|B|L` encoding. */
|
|
4
|
-
| 'box';
|
|
5
|
-
export interface QuickEditOption {
|
|
6
|
-
value: string;
|
|
7
|
-
label: string;
|
|
8
|
-
}
|
|
9
|
-
export interface QuickEditField {
|
|
10
|
-
control: QuickEditControl;
|
|
11
|
-
label: string;
|
|
12
|
-
binding?: 'static' | 'data';
|
|
13
|
-
maxLength?: number;
|
|
14
|
-
accept?: string[];
|
|
15
|
-
options?: QuickEditOption[];
|
|
16
|
-
min?: number;
|
|
17
|
-
max?: number;
|
|
18
|
-
step?: number;
|
|
19
|
-
/** Which Appearance subsection a style pseudo-field belongs to. */
|
|
20
|
-
section?: QuickEditClassSection;
|
|
21
|
-
/** Effective value from the cascade, shown when the group is unset. */
|
|
22
|
-
computed?: string;
|
|
23
|
-
/** Tailwind arbitrary-value example, e.g. `[15px]`. */
|
|
24
|
-
arbitraryHint?: string;
|
|
25
|
-
}
|
|
26
|
-
export type QuickEditValue = string | number | boolean;
|
|
27
|
-
export type QuickEditLocate = 'usage-site' | 'component-own' | 'ambiguous-vfor';
|
|
28
|
-
export type QuickEditTargetKind = 'component' | 'element';
|
|
29
|
-
export interface QuickEditSelection {
|
|
30
|
-
matched: true;
|
|
31
|
-
/** Absent on a component target from an older bridge. */
|
|
32
|
-
kind?: QuickEditTargetKind;
|
|
33
|
-
component: string;
|
|
34
|
-
label: string;
|
|
35
|
-
schema: Record<string, QuickEditField>;
|
|
36
|
-
values: Record<string, QuickEditValue>;
|
|
37
|
-
presentProps?: Record<string, boolean>;
|
|
38
|
-
tag?: string;
|
|
39
|
-
ownerLabel?: string;
|
|
40
|
-
classAttr?: string | null;
|
|
41
|
-
classEditable?: boolean;
|
|
42
|
-
hasText?: boolean;
|
|
43
|
-
/** Computed `display`, used to gate flex-only groups. */
|
|
44
|
-
display?: string;
|
|
45
|
-
/** Effective cascade values per group id, for display only. */
|
|
46
|
-
computed?: Record<string, string>;
|
|
47
|
-
/** How many rendered elements share this source location (see the scope hint). */
|
|
48
|
-
instances?: number;
|
|
49
|
-
rect: {
|
|
50
|
-
x: number;
|
|
51
|
-
y: number;
|
|
52
|
-
width: number;
|
|
53
|
-
height: number;
|
|
54
|
-
} | null;
|
|
55
|
-
source: {
|
|
56
|
-
usageFile: string;
|
|
57
|
-
componentFile: string;
|
|
58
|
-
inspector: string | null;
|
|
59
|
-
inspectorVia?: 'vnode' | 'dom' | null;
|
|
60
|
-
locate: QuickEditLocate;
|
|
61
|
-
inVFor: boolean;
|
|
62
|
-
instanceKey: string | number | null;
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export type QuickEditFieldStatus = 'idle' | 'applying' | 'applied' | 'escalated' | 'error';
|
|
66
|
-
export interface QuickEditApplyResult {
|
|
67
|
-
prop: string;
|
|
68
|
-
status: 'applied' | 'escalated';
|
|
69
|
-
reason?: string;
|
|
70
|
-
}
|
|
71
|
-
export interface QuickEditApplyResponse {
|
|
72
|
-
ok: boolean;
|
|
73
|
-
applied: QuickEditApplyResult[];
|
|
74
|
-
escalated: QuickEditApplyResult[];
|
|
75
|
-
results: QuickEditApplyResult[];
|
|
76
|
-
preview: boolean;
|
|
77
|
-
}
|
|
78
|
-
export interface QuickEditHistoryItem {
|
|
79
|
-
component: string;
|
|
80
|
-
file: string;
|
|
81
|
-
edits: Array<{
|
|
82
|
-
prop: string;
|
|
83
|
-
value: QuickEditValue;
|
|
84
|
-
reason?: string;
|
|
85
|
-
}>;
|
|
86
|
-
fallback: boolean;
|
|
87
|
-
}
|
|
88
|
-
export declare function wrapQuickEditPayload(item: QuickEditHistoryItem): string;
|
|
89
|
-
export declare function parseQuickEditMessage(text: string): QuickEditHistoryItem | null;
|
|
90
|
-
export declare function quickEditValueError(field: QuickEditField, value: unknown): string | null;
|
|
91
|
-
export declare const QUICK_EDIT_STYLE_PREFIX = "style:";
|
|
92
|
-
export declare function quickEditStyleGroupId(prop: string): QuickEditClassGroupId | null;
|
|
93
|
-
export declare function isQuickEditStyleProp(prop: string): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Schema + current values for the style groups a target exposes. Values are read
|
|
96
|
-
* from the element's own class list, so the sidebar shows what the element is
|
|
97
|
-
* actually styled with — the thing an edit will replace.
|
|
98
|
-
*/
|
|
99
|
-
export declare function quickEditStyleFields(selection: QuickEditSelection): {
|
|
100
|
-
schema: Record<string, QuickEditField>;
|
|
101
|
-
values: Record<string, QuickEditValue>;
|
|
102
|
-
};
|
|
103
|
-
/** Collapse every style pseudo-field back into one class string. */
|
|
104
|
-
export declare function quickEditClassFromStyles(baseClassAttr: string | null | undefined, values: Record<string, QuickEditValue>): string;
|
|
105
|
-
/**
|
|
106
|
-
* Which entry of the candidate path to open by default.
|
|
107
|
-
*
|
|
108
|
-
* Not simply the innermost: a card is routinely a stack of positioning wrappers
|
|
109
|
-
* (`absolute inset-0`) with identical bounds, and the topmost one carries no class
|
|
110
|
-
* this tool can edit. Defaulting to it opens a panel whose every row reads
|
|
111
|
-
* "Default" while the styled layer and the enclosing component sit unreachable
|
|
112
|
-
* one level out. So prefer the innermost entry that has something actually set,
|
|
113
|
-
* and let the path UI reach the rest.
|
|
114
|
-
*/
|
|
115
|
-
export declare function quickEditPreferredTargetIndex(targets: QuickEditSelection[]): number;
|
|
116
|
-
/** Short path label for the candidate breadcrumb, e.g. `<p>` or `Order method tile`. */
|
|
117
|
-
export declare function quickEditTargetPathLabel(target: QuickEditSelection): string;
|
|
118
|
-
/** Human-readable scope warning: an edit here changes every instance. */
|
|
119
|
-
export declare function quickEditScopeHint(selection: QuickEditSelection): string | null;
|
|
120
|
-
export declare function quickEditShortFile(path: string): string;
|
|
121
|
-
export declare function buildQuickEditFallbackPrompt(selection: QuickEditSelection, edits: Array<{
|
|
122
|
-
prop: string;
|
|
123
|
-
value: QuickEditValue;
|
|
124
|
-
reason: string;
|
|
125
|
-
}>): string;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
export type QuickEditClassGroupId = 'fontSize' | 'fontWeight' | 'fontFamily' | 'textColor' | 'textAlign' | 'lineHeight' | 'letterSpacing' | 'textTransform' | 'fontStyle' | 'textDecoration' | 'backgroundColor' | 'borderRadius' | 'borderWidth' | 'borderColor' | 'borderStyle' | 'boxShadow' | 'opacity' | 'gap' | 'justifyContent' | 'alignItems';
|
|
2
|
-
export type QuickEditBoxGroupId = 'padding' | 'margin';
|
|
3
|
-
export type QuickEditClassSection = 'typography' | 'box' | 'layout';
|
|
4
|
-
/** `flex` groups are offered only when the element is a flex/grid container. */
|
|
5
|
-
export type QuickEditClassApplies = 'always' | 'flex';
|
|
6
|
-
export type QuickEditBoxSide = 'top' | 'right' | 'bottom' | 'left';
|
|
7
|
-
/**
|
|
8
|
-
* Stands for a group step that is Tailwind's *bare* utility (`rounded`, `border`,
|
|
9
|
-
* `shadow`). Without a sentinel it would encode as an empty string, which the
|
|
10
|
-
* sidebar already uses for "unset / inherit from the cascade".
|
|
11
|
-
*/
|
|
12
|
-
export declare const QUICK_EDIT_BARE_VALUE = "__bare__";
|
|
13
|
-
export interface QuickEditClassOption {
|
|
14
|
-
value: string;
|
|
15
|
-
label: string;
|
|
16
|
-
}
|
|
17
|
-
export interface QuickEditClassGroup {
|
|
18
|
-
id: QuickEditClassGroupId;
|
|
19
|
-
label: string;
|
|
20
|
-
/** Utility prefix, `''` for bare utilities such as `uppercase`. */
|
|
21
|
-
prefix: string;
|
|
22
|
-
options: QuickEditClassOption[];
|
|
23
|
-
arbitraryHint?: string;
|
|
24
|
-
section: QuickEditClassSection;
|
|
25
|
-
applies: QuickEditClassApplies;
|
|
26
|
-
}
|
|
27
|
-
export interface QuickEditBoxGroup {
|
|
28
|
-
id: QuickEditBoxGroupId;
|
|
29
|
-
label: string;
|
|
30
|
-
prefix: 'p' | 'm';
|
|
31
|
-
options: QuickEditClassOption[];
|
|
32
|
-
section: QuickEditClassSection;
|
|
33
|
-
}
|
|
34
|
-
export declare const QUICK_EDIT_CLASS_GROUPS: QuickEditClassGroup[];
|
|
35
|
-
export declare const QUICK_EDIT_BOX_GROUPS: QuickEditBoxGroup[];
|
|
36
|
-
export declare function quickEditClassGroup(id: QuickEditClassGroupId): QuickEditClassGroup;
|
|
37
|
-
export declare function quickEditBoxGroup(id: QuickEditBoxGroupId): QuickEditBoxGroup;
|
|
38
|
-
/** The class token a group + value pair writes. */
|
|
39
|
-
export declare function quickEditClassToken(group: QuickEditClassGroup, value: string): string;
|
|
40
|
-
/**
|
|
41
|
-
* Which single-slot group a class token belongs to, or `null`.
|
|
42
|
-
*
|
|
43
|
-
* Variant-prefixed (`sm:text-lg`, `active:scale-95`) and `!important` tokens are
|
|
44
|
-
* deliberately unclaimed: Quick Edit edits the base state only, so a responsive
|
|
45
|
-
* or state override must survive untouched.
|
|
46
|
-
*/
|
|
47
|
-
export declare function classifyQuickEditClass(token: string): QuickEditClassGroupId | null;
|
|
48
|
-
export interface QuickEditBoxToken {
|
|
49
|
-
group: QuickEditBoxGroupId;
|
|
50
|
-
sides: QuickEditBoxSide[];
|
|
51
|
-
value: string;
|
|
52
|
-
precedence: number;
|
|
53
|
-
}
|
|
54
|
-
/** Which box group (and which sides) a spacing token drives, or `null`. */
|
|
55
|
-
export declare function classifyQuickEditBoxClass(token: string): QuickEditBoxToken | null;
|
|
56
|
-
/** `T|R|B|L`; an empty segment means that side is not set by any class. */
|
|
57
|
-
export declare function encodeQuickEditBox(sides: Partial<Record<QuickEditBoxSide, string>>): string;
|
|
58
|
-
export declare function decodeQuickEditBox(value: string): Record<QuickEditBoxSide, string>;
|
|
59
|
-
export declare function splitClassAttr(classAttr: string | null | undefined): string[];
|
|
60
|
-
export interface QuickEditClassState {
|
|
61
|
-
/** Group value present on the element (`lg`, `brand-primary/80`, `[15px]`), or null. */
|
|
62
|
-
value: string | null;
|
|
63
|
-
/** True when the value is an arbitrary/modified value with no matching option. */
|
|
64
|
-
custom: boolean;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Current value per single-slot group, read from the element's class list. This is
|
|
68
|
-
* what makes the sidebar truthful: it reports what the element is actually styled
|
|
69
|
-
* with, which is exactly the thing an edit will replace.
|
|
70
|
-
*/
|
|
71
|
-
export declare function parseQuickEditClasses(classAttr: string | null | undefined): Partial<Record<QuickEditClassGroupId, QuickEditClassState>>;
|
|
72
|
-
/** Resolve a box group's four sides through Tailwind's all → axis → side cascade. */
|
|
73
|
-
export declare function parseQuickEditBox(classAttr: string | null | undefined, id: QuickEditBoxGroupId): {
|
|
74
|
-
value: string;
|
|
75
|
-
custom: boolean;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Re-emit a box group as the **minimal** token set: `p-4` when all four sides
|
|
79
|
-
* agree, `px-3 py-2` when the axes agree, per-side otherwise. A side left empty
|
|
80
|
-
* emits nothing, so "unset" stays unset rather than being forced to zero.
|
|
81
|
-
*/
|
|
82
|
-
export declare function applyQuickEditBox(classAttr: string | null | undefined, id: QuickEditBoxGroupId, encoded: string): string;
|
|
83
|
-
/**
|
|
84
|
-
* Replace a single-slot group's class, preserving order and every unrelated
|
|
85
|
-
* token. An empty `value` removes the group (falls back to the cascade).
|
|
86
|
-
*
|
|
87
|
-
* The new token is appended rather than spliced in place so the result stays
|
|
88
|
-
* stable: a designer flipping between two values does not shuffle the class list.
|
|
89
|
-
*/
|
|
90
|
-
export declare function applyQuickEditClass(classAttr: string | null | undefined, id: QuickEditClassGroupId, value: string): string;
|
|
91
|
-
/** Single-slot groups offerable for a target, given its computed display mode. */
|
|
92
|
-
export declare function quickEditClassGroupsFor(display: string | undefined): QuickEditClassGroup[];
|