unika-components 1.2.9 → 1.3.0

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.
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export type * from './src/index'
@@ -10,6 +10,7 @@ declare const _default: import("vue").DefineComponent<{
10
10
  required: true;
11
11
  };
12
12
  }, {
13
+ hasRealGiftQR: import("vue").ComputedRef<boolean>;
13
14
  name: import("vue").Ref<string>;
14
15
  content: import("vue").Ref<string>;
15
16
  showPopup: import("vue").Ref<boolean>;
@@ -0,0 +1,95 @@
1
+ import { PropType } from 'vue';
2
+ import type { ElementData } from '../../defaultProps';
3
+ import type { GuestPosterService, GuestPosterState, PosterStyleOption } from '../../constants/guestAIWeddingPosterTypes';
4
+ import '../../assets/css/guestAIWeddingPoster.css';
5
+ declare const _default: import("vue").DefineComponent<{
6
+ element: {
7
+ type: PropType<ElementData & Record<string, unknown>>;
8
+ required: true;
9
+ };
10
+ isEditing: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ env: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ invitationId: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ global: {
23
+ type: PropType<Record<string, unknown> | null>;
24
+ default: null;
25
+ };
26
+ guestPosterService: {
27
+ type: PropType<GuestPosterService | null>;
28
+ default: null;
29
+ };
30
+ }, {
31
+ config: import("vue").ComputedRef<import("../../constants/guestAIWeddingPosterTypes").GuestAIWeddingPosterConfig>;
32
+ uiState: import("vue").Ref<GuestPosterState>;
33
+ guestPreviewUrl: import("vue").Ref<string>;
34
+ enabledStyles: import("vue").ComputedRef<PosterStyleOption[]>;
35
+ selectedStyleId: import("vue").Ref<string>;
36
+ errorMessage: import("vue").Ref<string>;
37
+ toastText: import("vue").Ref<string>;
38
+ resultList: import("vue").Ref<{
39
+ id: string;
40
+ imageUrl: string;
41
+ thumbnailUrl?: string | undefined;
42
+ width?: number | undefined;
43
+ height?: number | undefined;
44
+ }[]>;
45
+ regenerateLeft: import("vue").ComputedRef<number>;
46
+ statusHint: import("vue").ComputedRef<"正在提交…" | "排队中…" | "正在生成你与新人的专属邀请函…">;
47
+ canSubmit: import("vue").ComputedRef<boolean>;
48
+ quotaText: import("vue").ComputedRef<string>;
49
+ rootStyle: import("vue").ComputedRef<Record<string, string>>;
50
+ fileInputRef: import("vue").Ref<HTMLInputElement | null>;
51
+ onUploadAreaClick: () => void;
52
+ triggerFilePick: () => void;
53
+ onFileChange: (ev: Event) => Promise<void>;
54
+ clearPhoto: () => void;
55
+ onStyleChange: (ev: Event) => void;
56
+ onGenerateClick: () => Promise<void>;
57
+ onRegenerate: () => void;
58
+ onDownload: () => void;
59
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("trigger" | "track" | "error")[], "trigger" | "track" | "error", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
60
+ element: {
61
+ type: PropType<ElementData & Record<string, unknown>>;
62
+ required: true;
63
+ };
64
+ isEditing: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ env: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ invitationId: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
76
+ global: {
77
+ type: PropType<Record<string, unknown> | null>;
78
+ default: null;
79
+ };
80
+ guestPosterService: {
81
+ type: PropType<GuestPosterService | null>;
82
+ default: null;
83
+ };
84
+ }>> & {
85
+ onTrigger?: ((...args: any[]) => any) | undefined;
86
+ onTrack?: ((...args: any[]) => any) | undefined;
87
+ onError?: ((...args: any[]) => any) | undefined;
88
+ }, {
89
+ isEditing: boolean;
90
+ env: string;
91
+ invitationId: string;
92
+ global: Record<string, unknown> | null;
93
+ guestPosterService: GuestPosterService | null;
94
+ }, {}>;
95
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import UniGuestAiWeddingPoster from './UniGuestAiWeddingPoster.vue';
2
+ export default UniGuestAiWeddingPoster;
3
+ /** Public alias matching product name */
4
+ export { UniGuestAiWeddingPoster as GuestAIWeddingPoster };
@@ -6,6 +6,10 @@ declare const _default: import("vue").DefineComponent<{
6
6
  type: PropType<ElementData>;
7
7
  required: true;
8
8
  };
9
+ env: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
9
13
  }, {
10
14
  properties: import("vue").ComputedRef<{
11
15
  visible: boolean;
@@ -74,12 +78,14 @@ declare const _default: import("vue").DefineComponent<{
74
78
  mapImg?: string | undefined;
75
79
  mapChange?: string | undefined;
76
80
  }>;
81
+ displaySrc: import("vue").ComputedRef<string | undefined>;
77
82
  containerStyle: import("vue").ComputedRef<{
78
83
  left: string;
79
84
  top: string;
80
85
  width: string;
81
86
  height: string;
82
87
  transform: string;
88
+ '--img-bg-pos': string;
83
89
  }>;
84
90
  imageStyle: import("vue").ComputedRef<{
85
91
  fontFamily: string | undefined;
@@ -95,19 +101,13 @@ declare const _default: import("vue").DefineComponent<{
95
101
  backgroundPosition: string;
96
102
  }>;
97
103
  imgTagStyle: import("vue").ComputedRef<{
98
- height: string;
99
- width: string;
100
- position: string;
101
- left: string;
102
- transform: string;
103
- top?: undefined;
104
- } | {
105
104
  width: string;
106
105
  height: string;
107
- position: string;
106
+ position: "absolute";
107
+ left: string;
108
108
  top: string;
109
- transform: string;
110
- left?: undefined;
109
+ objectFit: "cover";
110
+ objectPosition: string;
111
111
  }>;
112
112
  maskStyle: import("vue").ComputedRef<{
113
113
  '-webkit-mask-box-image-source': string;
@@ -132,7 +132,13 @@ declare const _default: import("vue").DefineComponent<{
132
132
  type: PropType<ElementData>;
133
133
  required: true;
134
134
  };
135
+ env: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ };
135
139
  }>> & {
136
140
  onTrigger?: ((...args: any[]) => any) | undefined;
137
- }, {}, {}>;
141
+ }, {
142
+ env: string;
143
+ }, {}>;
138
144
  export default _default;
@@ -1,5 +1,6 @@
1
1
  import { ComponentPublicInstance } from 'vue';
2
2
  import { WorkData, GlobalData, PageData, PersonalData } from '../../defaultProps';
3
+ import { optimizeCssImageUrl } from '../../utils/optimizeImage';
3
4
  import '../../assets/css/workRenderH5.css';
4
5
  import '../../assets/css/animate.css';
5
6
  import { px2rem } from '@/composables/px2rem';
@@ -17,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
17
18
  default: string;
18
19
  };
19
20
  }, {
21
+ optimizeCssImageUrl: typeof optimizeCssImageUrl;
20
22
  personalData: import("vue").ComputedRef<PersonalData>;
21
23
  global: import("vue").ComputedRef<GlobalData>;
22
24
  inviteRender: import("vue").ComputedRef<import("../../defaultProps").InviteRenderData | null>;
@@ -0,0 +1,16 @@
1
+ import { type InjectionKey } from 'vue';
2
+ import type { GuestPosterService } from '../constants/guestAIWeddingPosterTypes';
3
+ export declare const GUEST_POSTER_SERVICE_KEY: InjectionKey<GuestPosterService>;
4
+ /** Resolve runtime service: inject → provided callbacks → mock (never call vendor APIs here). */
5
+ export declare function resolveGuestPosterService(injectedOrProvided?: GuestPosterService | null): GuestPosterService;
6
+ export declare function guestPosterJobStorageKey(componentId: string): string;
7
+ export declare function loadStoredJobId(componentId: string): string | null;
8
+ export declare function saveStoredJobId(componentId: string, jobId: string | null): void;
9
+ export declare function mapJobStatusToUi(status: string): 'queued' | 'generating' | 'completed' | 'failed';
10
+ export declare function guestPosterErrorMessage(code?: string | null, fallback?: string | null): string;
11
+ export declare function detectImageMime(file: File): Promise<string | null>;
12
+ export declare function readImageSize(file: File): Promise<{
13
+ width: number;
14
+ height: number;
15
+ } | null>;
16
+ export declare function createIdempotencyKey(componentId: string): string;
@@ -0,0 +1,11 @@
1
+ /** App.vue / WorkRender 本地测试用元素 */
2
+ export declare function createGuestAIWeddingPosterDemoElement(overrides?: Record<string, unknown>): {
3
+ id: string;
4
+ type: string;
5
+ layerName: string;
6
+ invitationImage: {
7
+ invitationImageId: string;
8
+ invitationImageUrl: string;
9
+ };
10
+ css: any;
11
+ };
@@ -0,0 +1,63 @@
1
+ import { type GuestAIWeddingPosterConfig } from './guestAIWeddingPosterTypes';
2
+ /** Demo invitation — real couple wedding invite (Jim & …). Served from /public/demo */
3
+ export declare const DEMO_INVITATION_IMAGE_URL = "/demo/guest-invitation.jpg";
4
+ export declare const defaultGuestAIWeddingPosterConfig: GuestAIWeddingPosterConfig;
5
+ /** Default ElementData seed for editors */
6
+ export declare const guestAIWeddingPosterDefaultProps: {
7
+ css: {
8
+ borderWidth: number;
9
+ borderStyle: string;
10
+ borderColor: string;
11
+ opacity: number;
12
+ backgroundColor: string;
13
+ width: number;
14
+ height: number;
15
+ borderRadius: number;
16
+ top: number;
17
+ left: number;
18
+ transform: number;
19
+ };
20
+ properties: {
21
+ visible: boolean;
22
+ isLock: boolean;
23
+ required: boolean;
24
+ musicName: string;
25
+ musicLink: string;
26
+ musicHash: string;
27
+ shadowSize: number;
28
+ shadowColor: string;
29
+ shadowX: number;
30
+ shadowY: number;
31
+ shadowBlur: number;
32
+ shadowPoint: number;
33
+ aniOrigin: string;
34
+ animations: never[];
35
+ };
36
+ triggers: {
37
+ event: string;
38
+ link: string;
39
+ go: string;
40
+ phone: string;
41
+ musicName: string;
42
+ musicLink: string;
43
+ musicHash: string;
44
+ };
45
+ version: number;
46
+ title: string;
47
+ description: string;
48
+ buttonText: string;
49
+ invitationImage: import("./guestAIWeddingPosterTypes").GuestPosterInvitationImage;
50
+ styles: import("./guestAIWeddingPosterTypes").PosterStyleOption[];
51
+ result: import("./guestAIWeddingPosterTypes").GuestPosterResultConfig;
52
+ privacy: import("./guestAIWeddingPosterTypes").GuestPosterPrivacyConfig;
53
+ upload: import("./guestAIWeddingPosterTypes").GuestPosterUploadConfig;
54
+ output: import("./guestAIWeddingPosterTypes").GuestPosterOutputConfig;
55
+ appearance: import("./guestAIWeddingPosterTypes").GuestPosterAppearanceConfig;
56
+ id: string;
57
+ pid: string;
58
+ type: string;
59
+ layerName: string;
60
+ sign: boolean;
61
+ signSort: number;
62
+ };
63
+ export default guestAIWeddingPosterDefaultProps;
@@ -0,0 +1,20 @@
1
+ import { type GuestAIWeddingPosterConfig } from './guestAIWeddingPosterTypes';
2
+ export interface GuestPosterSchemaIssue {
3
+ path: string;
4
+ message: string;
5
+ }
6
+ export interface GuestPosterSchemaResult {
7
+ ok: boolean;
8
+ issues: GuestPosterSchemaIssue[];
9
+ value?: GuestAIWeddingPosterConfig;
10
+ }
11
+ export declare function validateGuestAIWeddingPosterConfig(input: unknown, options?: {
12
+ requireReferences?: boolean;
13
+ }): GuestPosterSchemaResult;
14
+ export declare const guestAIWeddingPosterSchema: {
15
+ validate: typeof validateGuestAIWeddingPosterConfig;
16
+ version: number;
17
+ };
18
+ export declare function mergeGuestAIWeddingPosterConfig(partial: Record<string, unknown> | GuestAIWeddingPosterConfig | null | undefined): GuestAIWeddingPosterConfig;
19
+ export declare function migrateGuestAIWeddingPosterConfig(config: unknown, fromVersion?: number, toVersion?: number): GuestAIWeddingPosterConfig;
20
+ export declare function resolveGuestAIWeddingPosterConfig(element: Record<string, unknown> | null | undefined): GuestAIWeddingPosterConfig;
@@ -0,0 +1,221 @@
1
+ /** Stable component type — shared across unika-components / biz-editor / ai-wedding / h5-server */
2
+ export declare const GUEST_AI_WEDDING_POSTER_TYPE = "guest-ai-wedding-poster";
3
+ export declare const GUEST_AI_WEDDING_POSTER_VERSION = 1;
4
+ export type GuestPosterState = 'idle' | 'uploading' | 'photo-ready' | 'configuring' | 'submitting' | 'queued' | 'generating' | 'completed' | 'failed';
5
+ export type PosterJobStatus = 'queued' | 'preprocessing' | 'generating' | 'safety-check' | 'completed' | 'failed' | 'cancelled';
6
+ export type PosterAspectRatio = '3:4' | '4:5' | '9:16';
7
+ export type PosterButtonStyle = 'solid' | 'gradient';
8
+ export interface PosterStyleOption {
9
+ id: string;
10
+ name: string;
11
+ thumbnail: string;
12
+ promptTemplateId: string;
13
+ enabled: boolean;
14
+ sort: number;
15
+ }
16
+ /** Single wedding invitation image (contains couple). Editable in editor; not shown as upload UI at runtime. */
17
+ export interface GuestPosterInvitationImage {
18
+ invitationImageId?: string;
19
+ invitationImageUrl?: string;
20
+ }
21
+ export interface GuestPosterResultConfig {
22
+ allowRegenerate: boolean;
23
+ allowDownload: boolean;
24
+ allowShare: boolean;
25
+ maxRegenerateCount?: number;
26
+ }
27
+ export interface GuestPosterPrivacyConfig {
28
+ requireConsent: boolean;
29
+ consentText: string;
30
+ noticeUrl?: string;
31
+ autoDeleteAfterDays: number;
32
+ }
33
+ export interface GuestPosterUploadConfig {
34
+ maxFileSizeMB: number;
35
+ allowedTypes: string[];
36
+ minWidth?: number;
37
+ minHeight?: number;
38
+ requireSingleFace: boolean;
39
+ }
40
+ export interface GuestPosterOutputConfig {
41
+ aspectRatio: PosterAspectRatio;
42
+ count: number;
43
+ }
44
+ export interface GuestPosterAppearanceConfig {
45
+ backgroundColor?: string;
46
+ textColor?: string;
47
+ primaryColor?: string;
48
+ borderRadius?: number;
49
+ buttonStyle?: PosterButtonStyle;
50
+ compact?: boolean;
51
+ paddingY?: number;
52
+ paddingX?: number;
53
+ }
54
+ /** Business config stored on the element (merged with defaults at load). */
55
+ export interface GuestAIWeddingPosterConfig {
56
+ version: number;
57
+ title: string;
58
+ description: string;
59
+ buttonText: string;
60
+ /** Wedding invitation image with couple — configured in editor */
61
+ invitationImage: GuestPosterInvitationImage;
62
+ styles: PosterStyleOption[];
63
+ result: GuestPosterResultConfig;
64
+ privacy: GuestPosterPrivacyConfig;
65
+ upload: GuestPosterUploadConfig;
66
+ output: GuestPosterOutputConfig;
67
+ appearance: GuestPosterAppearanceConfig;
68
+ }
69
+ export interface UploadedGuestPhoto {
70
+ assetId: string;
71
+ previewUrl?: string;
72
+ width?: number;
73
+ height?: number;
74
+ }
75
+ export interface PosterGenerationRequest {
76
+ invitationId: string;
77
+ componentId: string;
78
+ guestPhotoAssetId: string;
79
+ /** Signed/CDN URL of guest photo — required for real AI generation */
80
+ guestPhotoUrl?: string;
81
+ /** Invitation card image that already contains bride & groom (图1). Guest is placed beside them. */
82
+ invitationImageId: string;
83
+ invitationImageUrl?: string;
84
+ /** Style look — e.g. chibi-figure produces 图2-like hand-crafted group invite */
85
+ styleId: string;
86
+ promptTemplateId: string;
87
+ output: {
88
+ aspectRatio: PosterAspectRatio;
89
+ count: number;
90
+ };
91
+ consent: {
92
+ accepted: boolean;
93
+ acceptedAt: string;
94
+ privacyVersion?: string;
95
+ };
96
+ idempotencyKey: string;
97
+ }
98
+ export interface PosterResult {
99
+ id: string;
100
+ imageUrl: string;
101
+ thumbnailUrl?: string;
102
+ width?: number;
103
+ height?: number;
104
+ }
105
+ export interface PosterJob {
106
+ id: string;
107
+ status: PosterJobStatus;
108
+ stage?: string | null;
109
+ progressHint?: string;
110
+ results?: PosterResult[];
111
+ errorCode?: string | null;
112
+ errorMessage?: string | null;
113
+ createdAt?: string;
114
+ updatedAt?: string;
115
+ }
116
+ export interface PosterError {
117
+ code: string;
118
+ message: string;
119
+ retryable?: boolean;
120
+ }
121
+ export interface GuestPosterContext {
122
+ invitationId?: string;
123
+ componentId: string;
124
+ }
125
+ export interface GuestPosterService {
126
+ uploadGuestPhoto(file: File, context: GuestPosterContext): Promise<UploadedGuestPhoto>;
127
+ createPosterJob(request: PosterGenerationRequest): Promise<PosterJob>;
128
+ getPosterJob(jobId: string): Promise<PosterJob>;
129
+ cancelPosterJob?(jobId: string): Promise<void>;
130
+ downloadResult?(resultId: string): Promise<Blob>;
131
+ /** Per-work quota (no login). used / maxPerWork */
132
+ getQuota?(invitationId: string): Promise<{
133
+ used: number;
134
+ maxPerWork: number;
135
+ remaining: number;
136
+ }>;
137
+ }
138
+ /** Declarative inspector fields — shared by desktop/mobile editors */
139
+ export declare const guestAIWeddingPosterInspectorConfig: {
140
+ readonly content: readonly [{
141
+ readonly key: "title";
142
+ readonly label: "组件标题";
143
+ readonly control: "text";
144
+ }, {
145
+ readonly key: "description";
146
+ readonly label: "引导文案";
147
+ readonly control: "textarea";
148
+ }, {
149
+ readonly key: "buttonText";
150
+ readonly label: "按钮文字";
151
+ readonly control: "text";
152
+ }, {
153
+ readonly key: "invitationImage";
154
+ readonly label: "婚礼邀请函图片";
155
+ readonly control: "invitation-image-upload";
156
+ }, {
157
+ readonly key: "styles";
158
+ readonly label: "风格选项";
159
+ readonly control: "poster-style-manager";
160
+ }, {
161
+ readonly key: "result";
162
+ readonly label: "结果操作";
163
+ readonly control: "result-actions";
164
+ }];
165
+ readonly appearance: readonly [{
166
+ readonly key: "appearance.backgroundColor";
167
+ readonly label: "背景颜色";
168
+ readonly control: "color";
169
+ }, {
170
+ readonly key: "appearance.textColor";
171
+ readonly label: "文字颜色";
172
+ readonly control: "color";
173
+ }, {
174
+ readonly key: "appearance.primaryColor";
175
+ readonly label: "主题色";
176
+ readonly control: "color";
177
+ }, {
178
+ readonly key: "appearance.borderRadius";
179
+ readonly label: "圆角";
180
+ readonly control: "slider";
181
+ }, {
182
+ readonly key: "appearance.buttonStyle";
183
+ readonly label: "按钮样式";
184
+ readonly control: "select";
185
+ }, {
186
+ readonly key: "appearance.compact";
187
+ readonly label: "紧凑模式";
188
+ readonly control: "switch";
189
+ }];
190
+ readonly ai: readonly [{
191
+ readonly key: "output.aspectRatio";
192
+ readonly label: "输出比例";
193
+ readonly control: "select";
194
+ }, {
195
+ readonly key: "output.count";
196
+ readonly label: "生成数量";
197
+ readonly control: "number";
198
+ }, {
199
+ readonly key: "upload.maxFileSizeMB";
200
+ readonly label: "照片最大大小(MB)";
201
+ readonly control: "number";
202
+ }, {
203
+ readonly key: "privacy.autoDeleteAfterDays";
204
+ readonly label: "照片自动删除(天)";
205
+ readonly control: "select";
206
+ }];
207
+ };
208
+ /** @deprecated kept for type alias compatibility */
209
+ export type InterestOption = {
210
+ id: string;
211
+ label: string;
212
+ enabled: boolean;
213
+ sort: number;
214
+ };
215
+ export type GuestPosterReferences = GuestPosterInvitationImage;
216
+ export type GuestPosterInterestsConfig = {
217
+ enabled: boolean;
218
+ maxSelections: number;
219
+ allowCustom: boolean;
220
+ options: InterestOption[];
221
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Browser HTTP adapter for GuestPosterService → biz-editor-server /api/ai-guest-poster/*
3
+ * Used by unika-components App.vue local test when not using Mock.
4
+ */
5
+ import type { GuestPosterService } from './guestAIWeddingPosterTypes';
6
+ export declare function createHttpGuestPosterService(options?: {
7
+ baseUrl?: string;
8
+ }): GuestPosterService;
@@ -0,0 +1,13 @@
1
+ import type { GuestPosterService } from './guestAIWeddingPosterTypes';
2
+ /**
3
+ * Mock GuestPosterService for editor preview / local development.
4
+ * REPLACE with a real API adapter in ai-wedding / h5-server runtime.
5
+ * Do not scatter fake data inside the Vue component.
6
+ */
7
+ export declare function createMockGuestPosterService(options?: {
8
+ failUpload?: boolean;
9
+ failGenerate?: boolean;
10
+ delayMs?: number;
11
+ /** Optional demo result image (e.g. /demo/guest-poster-result-example.jpg) */
12
+ resultImageUrl?: string;
13
+ }): GuestPosterService;
@@ -1,3 +1,5 @@
1
+ export declare const PLACEHOLDER_GIFT_QR_CODE = "https://h5cdn.unika.cc/static/img/uniComponents/giftqrcode.png";
2
+ export declare function isRealGiftQRCode(url?: string | null): boolean;
1
3
  export declare const toolbarDefaultProps: {
2
4
  open: boolean;
3
5
  gift: boolean;
@@ -226,6 +226,7 @@ export interface CssData {
226
226
  transform: number;
227
227
  flipHorizontal?: boolean;
228
228
  flipVertical?: boolean;
229
+ backgroundPosition?: string;
229
230
  padding?: number;
230
231
  backgroundColor?: string;
231
232
  textIndent?: number;
@@ -28,6 +28,7 @@ import UniMenuReceipt from './components/UniMenuReceipt';
28
28
  import UniMenuMap from './components/UniMenuMap';
29
29
  import UniWatermark from './components/UniWatermark';
30
30
  import UniInvite from './components/UniInvite';
31
+ import UniGuestAiWeddingPoster from './components/UniGuestAiWeddingPoster';
31
32
  declare const install: (app: App) => void;
32
33
  export { applyTextAnimation, applyTextAnimationsForPage, restoreTextAnimation } from './utils/applyTextAnimation';
33
34
  export { default as inviteDefaultProps } from './constants/inviteProps';
@@ -43,6 +44,13 @@ export { default as callDefaultProps } from './constants/callProps';
43
44
  export { default as buttonDefaultProps } from './constants/buttonProps';
44
45
  export { default as formInputDefaultProps } from './constants/formInputProps';
45
46
  export { default as formSubmitDefaultProps } from './constants/formsubmitProps';
47
+ export { GUEST_AI_WEDDING_POSTER_TYPE, GUEST_AI_WEDDING_POSTER_VERSION, guestAIWeddingPosterInspectorConfig } from './constants/guestAIWeddingPosterTypes';
48
+ export { defaultGuestAIWeddingPosterConfig, guestAIWeddingPosterDefaultProps } from './constants/guestAIWeddingPosterProps';
49
+ export { guestAIWeddingPosterSchema, validateGuestAIWeddingPosterConfig, migrateGuestAIWeddingPosterConfig, mergeGuestAIWeddingPosterConfig, resolveGuestAIWeddingPosterConfig } from './constants/guestAIWeddingPosterSchema';
50
+ export { createMockGuestPosterService } from './constants/mockGuestPosterService';
51
+ export { createHttpGuestPosterService } from './constants/httpGuestPosterService';
52
+ export { GUEST_POSTER_SERVICE_KEY, resolveGuestPosterService } from './composables/guestPosterHelpers';
53
+ export type { GuestAIWeddingPosterConfig, GuestPosterState, PosterStyleOption, InterestOption, PosterGenerationRequest, PosterJob, PosterResult, PosterError, GuestPosterService, GuestPosterContext, UploadedGuestPhoto, PosterJobStatus, PosterAspectRatio } from './constants/guestAIWeddingPosterTypes';
46
54
  export { INVITE_COVER_TEMPLATES, getInviteTemplateById } from './constants/inviteTemplates';
47
55
  export { INVITE_QUICK_PHRASES } from './constants/invitePhrases';
48
56
  export { useInviteManager } from './composables/inviteManager';
@@ -50,7 +58,7 @@ export { applyTemplateToInviteItem } from './utils/inviteTemplate';
50
58
  export { resolveInviteRenderData, isValidInviteItem, getInviteRenderFromGlobal, applyInviteStateToGlobal } from './utils/resolveInviteRender';
51
59
  export { getInviteDismissDelay } from './utils/inviteAnimation';
52
60
  export type { InviteConfig, InviteItem, InviteCoverTemplate, InviteRenderData, InviteLayoutType } from './defaultProps';
53
- export { UniText, UniImage, UniShape, UniMusic, UniVideo, UniCalendar, UniCountdown, UniMap, UniCall, UniEffect, UniLottie, UniButton, UniBarrage, WorkRenderH5, WorkRenderLong, WorkRender, UniFormInput, UniFormSubmit, UniFormSelect, UniFormSingle, UniFormMultiple, UniFormContainer, UniMenu, UniMenuVideo, UniMenuTel, UniMenuReceipt, UniMenuMap, UniWatermark, UniInvite, install };
61
+ export { UniText, UniImage, UniShape, UniMusic, UniVideo, UniCalendar, UniCountdown, UniMap, UniCall, UniEffect, UniLottie, UniButton, UniBarrage, WorkRenderH5, WorkRenderLong, WorkRender, UniFormInput, UniFormSubmit, UniFormSelect, UniFormSingle, UniFormMultiple, UniFormContainer, UniMenu, UniMenuVideo, UniMenuTel, UniMenuReceipt, UniMenuMap, UniWatermark, UniInvite, UniGuestAiWeddingPoster, UniGuestAiWeddingPoster as GuestAIWeddingPoster, install };
54
62
  declare const _default: {
55
63
  install: (app: App<any>) => void;
56
64
  };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 元素宽度转为设计稿 px,h5-server 渲染前会把数字转成 rem 字符串
3
+ */
4
+ export declare function toDesignPx(value: unknown): number;
5
+ /**
6
+ * @param src 图片地址
7
+ * @param designWidth 显示宽度(设计稿 px),未知时传 0
8
+ */
9
+ export declare function optimizeImageUrl<T extends string | undefined>(src: T, designWidth?: number): T | string;
10
+ /**
11
+ * 处理 CSS 中的 url(...),如页面背景 `url("https://...")`
12
+ */
13
+ export declare function optimizeCssImageUrl<T extends string | undefined>(value: T, designWidth?: number): T | string;
@@ -0,0 +1 @@
1
+ export {};