unika-components 1.2.4 → 1.2.6

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.
Files changed (66) hide show
  1. package/dist/assets/css/invite.css +712 -0
  2. package/dist/index.html +53 -0
  3. package/dist/js/app.js +3325 -0
  4. package/dist/js/chunk-vendors.js +1638 -0
  5. package/dist/src/components/UniCall/UniCall.vue.d.ts +11 -1
  6. package/dist/src/components/UniCountdown/UniCountdown.vue.d.ts +12 -1
  7. package/dist/src/components/UniFormInput/UniFormInput.vue.d.ts +13 -1
  8. package/dist/src/components/UniImage/UniImage.vue.d.ts +0 -3
  9. package/dist/src/components/UniInvite/UniInvite.vue.d.ts +57 -0
  10. package/dist/src/components/UniInvite/index.d.ts +2 -0
  11. package/dist/src/components/UniMap/UniMap.vue.d.ts +11 -1
  12. package/dist/src/components/WorkRender/WorkRender.vue.d.ts +1 -0
  13. package/dist/src/composables/inviteManager.d.ts +13 -0
  14. package/dist/src/constants/invitePhrases.d.ts +3 -0
  15. package/dist/src/constants/inviteProps.d.ts +4 -0
  16. package/dist/src/constants/inviteTemplates.d.ts +5 -0
  17. package/dist/src/defaultProps.d.ts +49 -0
  18. package/dist/src/index.d.ts +22 -1
  19. package/dist/src/utils/inviteAnimation.d.ts +3 -0
  20. package/dist/src/utils/inviteTemplate.d.ts +4 -0
  21. package/dist/src/utils/resolveInviteRender.d.ts +12 -0
  22. package/dist/unika-components.css +1984 -1251
  23. package/dist/unika-components.esm.js +1673 -545
  24. package/dist/unika-components.umd.js +1723 -571
  25. package/package.json +4 -3
  26. package/dist/.DS_Store +0 -0
  27. package/dist/src/components/LongPage/LongPage.vue.d.ts +0 -20
  28. package/dist/src/components/LongPage/index.d.ts +0 -2
  29. package/dist/src/components/SwiperPage/SwiperAnimate.d.ts +0 -3
  30. package/dist/src/components/SwiperPage/SwiperPage.vue.d.ts +0 -36
  31. package/dist/src/components/SwiperPage/index.d.ts +0 -2
  32. package/dist/src/components/UniBackground/UniBackground.vue.d.ts +0 -11
  33. package/dist/src/components/UniBackground/index.d.ts +0 -2
  34. package/dist/src/components/UniBulidUp/UniBulidUp.vue.d.ts +0 -12
  35. package/dist/src/components/UniBulidUp/index.d.ts +0 -2
  36. package/dist/src/components/UniCalendar/Calendar.vue.d.ts +0 -165
  37. package/dist/src/components/UniEffect/sonw.d.ts +0 -2
  38. package/dist/src/components/UniFormMultiple/validators.d.ts +0 -20
  39. package/dist/src/components/UniFormSelect/validators.d.ts +0 -1
  40. package/dist/src/components/UniFormSingle/validators.d.ts +0 -20
  41. package/dist/src/components/UniLike/UniLike.vue.d.ts +0 -14
  42. package/dist/src/components/UniLike/index.d.ts +0 -2
  43. package/dist/src/components/UniLotties/UniLotties.vue.d.ts +0 -340
  44. package/dist/src/components/UniLotties/index.d.ts +0 -2
  45. package/dist/src/components/UniRegisterForm/UniRegisterForm.vue.d.ts +0 -28
  46. package/dist/src/components/UniRegisterForm/index.d.ts +0 -2
  47. package/dist/src/components/UniSvg/UniSvg.vue.d.ts +0 -12
  48. package/dist/src/components/UniSvg/index.d.ts +0 -2
  49. package/dist/src/components/UniSwiper/UniSwiper.vue.d.ts +0 -12
  50. package/dist/src/components/UniSwiper/index.d.ts +0 -2
  51. package/dist/src/components/UniTanmu/Barrage.vue.d.ts +0 -76
  52. package/dist/src/components/UniTanmu/UniTanmu.vue.d.ts +0 -59
  53. package/dist/src/components/UniTanmu/index.d.ts +0 -2
  54. package/dist/src/components/UniTest/index.d.ts +0 -2
  55. package/dist/src/components/UniTextBk/index.d.ts +0 -2
  56. package/dist/src/components/WorkRender/DynamicElement.vue.d.ts +0 -59
  57. package/dist/src/components/WorkRender/PageIndicator.vue.d.ts +0 -110
  58. package/dist/src/components/WorkRender/SwiperAnimate.d.ts +0 -3
  59. package/dist/src/components/WorkRender/WorkRenderer.vue.d.ts +0 -59
  60. package/dist/src/components/WorkRenderLong/test.vue.d.ts +0 -72
  61. package/dist/src/composables/useElementProps.d.ts +0 -8
  62. package/dist/src/composables/useElementStyle.d.ts +0 -18
  63. package/dist/src/constants/countdown.d.ts +0 -65
  64. package/dist/src/constants/toolbar.d.ts +0 -13
  65. package/dist/src/hooks/useComponentClick.d.ts +0 -2
  66. package/dist/src/hooks/useStylePick.d.ts +0 -3
@@ -5,6 +5,10 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: () => ElementData;
6
6
  required: true;
7
7
  };
8
+ isEditing: {
9
+ type: BooleanConstructor;
10
+ default: boolean;
11
+ };
8
12
  }, {
9
13
  css: import("vue").ComputedRef<import("../../defaultProps").CssData>;
10
14
  btnText: import("vue").ComputedRef<string>;
@@ -37,5 +41,11 @@ declare const _default: import("vue").DefineComponent<{
37
41
  type: () => ElementData;
38
42
  required: true;
39
43
  };
40
- }>>, {}, {}>;
44
+ isEditing: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ }>>, {
49
+ isEditing: boolean;
50
+ }, {}>;
41
51
  export default _default;
@@ -40,6 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  height: string;
41
41
  transform: string;
42
42
  opacity: number | undefined;
43
+ overflow: string;
43
44
  }>;
44
45
  textContainerStyle: import("vue").ComputedRef<{
45
46
  transform: string;
@@ -47,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
47
48
  borderRadius: string;
48
49
  borderStyle: string | undefined;
49
50
  borderWidth: string;
51
+ display: string | undefined;
52
+ flexDirection: string | undefined;
53
+ alignItems: string | undefined;
54
+ justifyContent: string | undefined;
50
55
  }>;
51
56
  textContentStyle: import("vue").ComputedRef<{
52
57
  opacity: number | undefined;
@@ -57,8 +62,13 @@ declare const _default: import("vue").DefineComponent<{
57
62
  flipStyle: import("vue").ComputedRef<{
58
63
  transform: string;
59
64
  opacity: number | undefined;
65
+ display: string;
60
66
  flexDirection: string;
61
- alignItems: boolean;
67
+ alignItems: string;
68
+ justifyContent: string;
69
+ width: string;
70
+ height: string;
71
+ minHeight: string | undefined;
62
72
  }>;
63
73
  comStyle: import("vue").ComputedRef<{
64
74
  borderColor: string | undefined;
@@ -67,6 +77,7 @@ declare const _default: import("vue").DefineComponent<{
67
77
  borderRadius: string;
68
78
  backgroundColor: string | undefined;
69
79
  margin: string;
80
+ flexShrink: number;
70
81
  }>;
71
82
  numStyle: import("vue").ComputedRef<{
72
83
  color: string | undefined;
@@ -9,6 +9,10 @@ declare const _default: import("vue").DefineComponent<{
9
9
  type: () => ElementData;
10
10
  required: true;
11
11
  };
12
+ isEditing: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
12
16
  }, {
13
17
  inputValue: import("vue").Ref<string>;
14
18
  hasError: import("vue").Ref<boolean>;
@@ -39,6 +43,8 @@ declare const _default: import("vue").DefineComponent<{
39
43
  '--placeholder-color': string;
40
44
  }>;
41
45
  handleBlur: () => void;
46
+ onInputPointerDown: (e: Event) => void;
47
+ isEditing: import("vue").ComputedRef<boolean>;
42
48
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
49
  global: {
44
50
  type: () => GlobalData;
@@ -48,5 +54,11 @@ declare const _default: import("vue").DefineComponent<{
48
54
  type: () => ElementData;
49
55
  required: true;
50
56
  };
51
- }>>, {}, {}>;
57
+ isEditing: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ }>>, {
62
+ isEditing: boolean;
63
+ }, {}>;
52
64
  export default _default;
@@ -87,9 +87,6 @@ declare const _default: import("vue").DefineComponent<{
87
87
  color: string | undefined;
88
88
  opacity: number | undefined;
89
89
  borderRadius: string;
90
- borderWidth: string;
91
- borderStyle: string | undefined;
92
- borderColor: string | undefined;
93
90
  boxShadow: string;
94
91
  }>;
95
92
  bgImageStyle: import("vue").ComputedRef<{
@@ -0,0 +1,57 @@
1
+ import { InviteRenderData, InviteLayoutType } from '../../defaultProps';
2
+ import '../../assets/css/invite.css';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ inviteRender: {
5
+ type: () => InviteRenderData | null;
6
+ default: null;
7
+ };
8
+ sceneId: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ forceShow: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ preview: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ }, {
21
+ visible: import("vue").ComputedRef<boolean>;
22
+ isOpening: import("vue").Ref<boolean>;
23
+ layoutType: import("vue").ComputedRef<InviteLayoutType>;
24
+ titleChars: import("vue").ComputedRef<[string, string]>;
25
+ inviteStyle: import("vue").ComputedRef<{
26
+ fontFamily: string;
27
+ color: string;
28
+ }>;
29
+ item: import("vue").ComputedRef<import("../../defaultProps").InviteItem | null>;
30
+ handleClick: () => void;
31
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("dismiss" | "click")[], "dismiss" | "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
32
+ inviteRender: {
33
+ type: () => InviteRenderData | null;
34
+ default: null;
35
+ };
36
+ sceneId: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ forceShow: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ preview: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ }>> & {
49
+ onDismiss?: ((...args: any[]) => any) | undefined;
50
+ onClick?: ((...args: any[]) => any) | undefined;
51
+ }, {
52
+ inviteRender: InviteRenderData | null;
53
+ sceneId: string;
54
+ forceShow: boolean;
55
+ preview: boolean;
56
+ }, {}>;
57
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import UniInvite from './UniInvite.vue';
2
+ export default UniInvite;
@@ -6,6 +6,10 @@ declare const _default: import("vue").DefineComponent<{
6
6
  type: PropType<ElementData>;
7
7
  required: true;
8
8
  };
9
+ isEditing: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
9
13
  }, {
10
14
  handleNavigation: () => void;
11
15
  shadowStyle: import("vue").ComputedRef<string>;
@@ -41,5 +45,11 @@ declare const _default: import("vue").DefineComponent<{
41
45
  type: PropType<ElementData>;
42
46
  required: true;
43
47
  };
44
- }>>, {}, {}>;
48
+ isEditing: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ }>>, {
53
+ isEditing: boolean;
54
+ }, {}>;
45
55
  export default _default;
@@ -19,6 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  }, {
20
20
  personalData: import("vue").ComputedRef<PersonalData>;
21
21
  global: import("vue").ComputedRef<GlobalData>;
22
+ inviteRender: import("vue").ComputedRef<import("../../defaultProps").InviteRenderData | null>;
22
23
  shouldShowWatermark: import("vue").ComputedRef<boolean>;
23
24
  pages: import("vue").ComputedRef<[] | PageData[]>;
24
25
  currentPageId: import("vue").Ref<string>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 送呈显示逻辑:
3
+ * - 每次进入/刷新页面都显示
4
+ * - 点击打开后当前页不再显示
5
+ * - 刷新 URL 后重新显示(不使用 localStorage)
6
+ */
7
+ export declare function useInviteManager(): {
8
+ isDismissed: import("vue").Ref<boolean>;
9
+ shouldShow: import("vue").ComputedRef<boolean>;
10
+ dismiss: () => void;
11
+ reset: () => void;
12
+ };
13
+ export default useInviteManager;
@@ -0,0 +1,3 @@
1
+ /** 送呈快捷短语 — 开发/编辑器 fallback;生产环境由 biz-editor-server API 提供 */
2
+ export declare const INVITE_QUICK_PHRASES: string[];
3
+ export default INVITE_QUICK_PHRASES;
@@ -0,0 +1,4 @@
1
+ import { InviteConfig } from '../defaultProps';
2
+ /** global.invite 默认结构 — 仅含渲染字段,不含 templates/phrases */
3
+ export declare const inviteDefaultProps: InviteConfig;
4
+ export default inviteDefaultProps;
@@ -0,0 +1,5 @@
1
+ import { InviteCoverTemplate } from '../defaultProps';
2
+ /** 送呈封面模板 — 开发 fallback,生产由 biz-editor-server 提供 */
3
+ export declare const INVITE_COVER_TEMPLATES: InviteCoverTemplate[];
4
+ export declare function getInviteTemplateById(id: string): InviteCoverTemplate | undefined;
5
+ export default INVITE_COVER_TEMPLATES;
@@ -74,6 +74,54 @@ export interface MusicData {
74
74
  originalUrl?: string;
75
75
  crop?: string | null;
76
76
  }
77
+ /** 送呈封面模板(仅编辑器/API 使用,不写入 global.invite) */
78
+ export type InviteLayoutType = 'type1' | 'type2' | 'type3' | 'type4' | 'type5' | 'type6';
79
+ export interface InviteCoverTemplate {
80
+ id: string;
81
+ name: string;
82
+ vip?: boolean;
83
+ layout?: InviteLayoutType;
84
+ img1: string;
85
+ img2: string;
86
+ img3: string;
87
+ divider?: string;
88
+ fontFamily?: string;
89
+ fontColor?: string;
90
+ }
91
+ /** 单条送呈 — 保存时已解析好图片 URL,组件直接渲染 */
92
+ export interface InviteItem {
93
+ id: string;
94
+ name: string;
95
+ phrase: string;
96
+ /** 编辑器回显用,H5 渲染不依赖 */
97
+ templateId?: string;
98
+ templateName?: string;
99
+ layout?: InviteLayoutType;
100
+ img1: string;
101
+ img2: string;
102
+ img3: string;
103
+ divider?: string;
104
+ fontFamily?: string;
105
+ fontColor?: string;
106
+ createdAt?: string;
107
+ }
108
+ /** 送呈全局配置(与 music 同级,仅存渲染数据) */
109
+ export interface InviteConfig {
110
+ open: boolean;
111
+ items: InviteItem[];
112
+ /** 封面标题文字,默认泰语 ["บัตร", "เชิญ"] */
113
+ titleChars?: [string, string];
114
+ /**
115
+ * 运行时渲染条目(h5-server 根据 ?state= 解析后填入,不写入 DB)
116
+ * 有 renderItem 且有效时才显示 UniInvite
117
+ */
118
+ renderItem?: InviteItem | null;
119
+ }
120
+ /** H5 运行时单条送呈渲染数据(由 h5-server 根据 ?state= 解析后传入) */
121
+ export interface InviteRenderData {
122
+ titleChars?: [string, string];
123
+ item: InviteItem;
124
+ }
77
125
  export interface GlobalData {
78
126
  id: number;
79
127
  type?: string;
@@ -124,6 +172,7 @@ export interface GlobalData {
124
172
  g?: boolean;
125
173
  };
126
174
  music: MusicData;
175
+ invite?: InviteConfig;
127
176
  useFont?: Record<string, {
128
177
  name: string;
129
178
  content: string;
@@ -27,9 +27,30 @@ import UniMenuTel from './components/UniMenuTel';
27
27
  import UniMenuReceipt from './components/UniMenuReceipt';
28
28
  import UniMenuMap from './components/UniMenuMap';
29
29
  import UniWatermark from './components/UniWatermark';
30
+ import UniInvite from './components/UniInvite';
30
31
  declare const install: (app: App) => void;
31
32
  export { applyTextAnimation, applyTextAnimationsForPage, restoreTextAnimation } from './utils/applyTextAnimation';
32
- 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, install };
33
+ export { default as inviteDefaultProps } from './constants/inviteProps';
34
+ export { default as musicDefaultProps } from './constants/musicProps';
35
+ export { default as calendarDefaultProps } from './constants/calendarProps';
36
+ export { default as mapDefaultProps } from './constants/mapProps';
37
+ export { default as countdownDefaultProps } from './constants/countdownProps';
38
+ export { default as effectDefaultProps } from './constants/effectProps';
39
+ export { default as shapeDefaultProps } from './constants/shapeProps';
40
+ export { default as lottieDefaultProps } from './constants/lottieProps';
41
+ export { default as videoDefaultProps } from './constants/videoProps';
42
+ export { default as callDefaultProps } from './constants/callProps';
43
+ export { default as buttonDefaultProps } from './constants/buttonProps';
44
+ export { default as formInputDefaultProps } from './constants/formInputProps';
45
+ export { default as formSubmitDefaultProps } from './constants/formsubmitProps';
46
+ export { INVITE_COVER_TEMPLATES, getInviteTemplateById } from './constants/inviteTemplates';
47
+ export { INVITE_QUICK_PHRASES } from './constants/invitePhrases';
48
+ export { useInviteManager } from './composables/inviteManager';
49
+ export { applyTemplateToInviteItem } from './utils/inviteTemplate';
50
+ export { resolveInviteRenderData, isValidInviteItem, getInviteRenderFromGlobal, applyInviteStateToGlobal } from './utils/resolveInviteRender';
51
+ export { getInviteDismissDelay } from './utils/inviteAnimation';
52
+ 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 };
33
54
  declare const _default: {
34
55
  install: (app: App<any>) => void;
35
56
  };
@@ -0,0 +1,3 @@
1
+ import { InviteLayoutType } from '../defaultProps';
2
+ export declare function getInviteDismissDelay(layout?: InviteLayoutType): number;
3
+ export default getInviteDismissDelay;
@@ -0,0 +1,4 @@
1
+ import { InviteCoverTemplate, InviteItem } from '../defaultProps';
2
+ /** 将模板图片解析进送呈条目(编辑器选封面时调用,结果写入 global.invite) */
3
+ export declare function applyTemplateToInviteItem(item: InviteItem, template: InviteCoverTemplate): InviteItem;
4
+ export default applyTemplateToInviteItem;
@@ -0,0 +1,12 @@
1
+ import { GlobalData, InviteConfig, InviteItem, InviteRenderData } from '../defaultProps';
2
+ export declare function isPlaceholderInviteStateId(stateId: string | undefined | null): boolean;
3
+ export declare function isValidInviteItem(item: InviteItem | null | undefined): boolean;
4
+ /** 根据 URL state 从 global.invite 解析单条送呈渲染数据 */
5
+ export declare function resolveInviteRenderData(invite: InviteConfig | undefined | null, stateId: string | undefined | null): InviteRenderData | null;
6
+ /** 从 global.invite.renderItem 得到 UniInvite 渲染数据 */
7
+ export declare function getInviteRenderFromGlobal(invite: InviteConfig | undefined | null): InviteRenderData | null;
8
+ /**
9
+ * h5-server:根据 ?state= 将解析结果写入 global.invite.renderItem(不修改 items)
10
+ */
11
+ export declare function applyInviteStateToGlobal(global: GlobalData, stateId?: string | null): GlobalData;
12
+ export default resolveInviteRenderData;