@kinxcdn/commerce-player 1.0.0 → 1.0.3

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,159 @@
1
+ import React from 'react';
2
+ import { MobilePlayerProps } from '@src/components/MobilePlayer';
3
+ import { InstaWidgetPlayerProps, YoutubeWidgetPlayerProps } from '@src/components/WidgetPlayer/WidgetPlayer.types';
4
+
5
+ interface Collection {
6
+ uuid?: string;
7
+ userId: number;
8
+ title: string;
9
+ target: string;
10
+ thumbPath: string;
11
+ createdAt: string;
12
+ contents: Shortform[];
13
+ player: {
14
+ layout: UIOption;
15
+ shoppingPlayer: {
16
+ controlbar: boolean;
17
+ autopass: boolean;
18
+ comment: boolean;
19
+ };
20
+ };
21
+ widget: {
22
+ iconForm: ICON_FORM;
23
+ iconShape: ICON_SHAPE;
24
+ iconSize: number;
25
+ borderLine: BORDER_LINE;
26
+ exposeTitle: boolean;
27
+ player: WIDGET_PLAYER_TYPE;
28
+ };
29
+ colId: string;
30
+ }
31
+ declare enum ICON_FORM {
32
+ INSTA = "INSTA",
33
+ "YOUTUBE" = "YOUTUBE"
34
+ }
35
+ declare enum ICON_SHAPE {
36
+ "MANY" = "MANY",
37
+ "ONE" = "ONE"
38
+ }
39
+ declare enum BORDER_LINE {
40
+ "ALWAYS" = "ALWAYS",
41
+ "DAY" = "DAY",
42
+ "DISAPPEAR" = "DISAPPEAR"
43
+ }
44
+ declare enum WIDGET_PLAYER_TYPE {
45
+ "POPUP" = "POPUP",
46
+ "PLATFORM" = "PLATFORM",
47
+ "TABLET" = "TABLET",
48
+ "HIGHLIGHT" = "HIGHLIGHT"
49
+ }
50
+
51
+ declare enum UIOption {
52
+ PLATFORM = 1,
53
+ GRID = 2,
54
+ VERTICAL = 3,
55
+ HORIZONTAL = 4
56
+ }
57
+ type ShortformProps = {
58
+ shortform: Shortform;
59
+ isMobile?: boolean;
60
+ };
61
+ type CollectionProps = {
62
+ collection: Collection;
63
+ isMobile?: boolean;
64
+ };
65
+ type ShoppingPlayerProps = ShortformProps | CollectionProps;
66
+
67
+ interface Shortform {
68
+ [key: string]: unknown;
69
+ uuid?: string;
70
+ userId: number;
71
+ shortsId: string;
72
+ brand: Brand | null;
73
+ title: string;
74
+ productsInfo: Product[];
75
+ description?: string;
76
+ logo: {
77
+ thumbPath: string;
78
+ logoName: string;
79
+ } | null;
80
+ media: {
81
+ mediaId?: string;
82
+ objectId: string;
83
+ duration: string;
84
+ width: number;
85
+ height: number;
86
+ [key: string]: unknown;
87
+ };
88
+ hasProductInfo?: boolean;
89
+ thumbPath: string;
90
+ player: {
91
+ layout: UIOption;
92
+ shoppingPlayer: {
93
+ replay: boolean;
94
+ controlbar: boolean;
95
+ like: boolean;
96
+ autoplay: boolean;
97
+ comment: boolean;
98
+ vFill: boolean;
99
+ share: boolean;
100
+ autopass: boolean;
101
+ pip: boolean;
102
+ height: number;
103
+ };
104
+ viewPlayer: {
105
+ controlbar: boolean;
106
+ replay: boolean;
107
+ vFill: boolean;
108
+ height: number;
109
+ width: number;
110
+ ratio: string;
111
+ autoplay: boolean;
112
+ block: boolean;
113
+ };
114
+ };
115
+ }
116
+ interface Brand {
117
+ brandName: string;
118
+ thumbPath: string;
119
+ identifier: string;
120
+ brandId: number;
121
+ createdAt?: string;
122
+ connShorts: number | null;
123
+ }
124
+ interface Product {
125
+ productId: string;
126
+ productName: string;
127
+ thumbPath: string;
128
+ price: number;
129
+ sellingPrice: number;
130
+ discount: number;
131
+ linkPath: string | null;
132
+ salesStatus: SalesStatus;
133
+ hflag?: HflagStatus;
134
+ dflg?: number;
135
+ orderIdx?: number;
136
+ eventProductId: number;
137
+ brand: Brand | null;
138
+ }
139
+ declare enum HflagStatus {
140
+ UNLIVE = 0,
141
+ LIVE = 1
142
+ }
143
+ declare enum SalesStatus {
144
+ NOT_ON_SALE = 0,
145
+ ON_SALE = 1
146
+ }
147
+
148
+ type ViewPlayerProps = {
149
+ shortform: Shortform;
150
+ };
151
+ declare const ViewPlayer: React.FC<ViewPlayerProps>;
152
+
153
+ declare const ShoppingPlayer: React.FC<ShoppingPlayerProps>;
154
+
155
+ declare const PreviewPlayer: React.FC<MobilePlayerProps>;
156
+
157
+ declare const WidgetPlayer: React.FC<InstaWidgetPlayerProps | YoutubeWidgetPlayerProps>;
158
+
159
+ export { PreviewPlayer, ShoppingPlayer, ViewPlayer, WidgetPlayer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinxcdn/commerce-player",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "author": "Soyeong Choi",
5
5
  "module": "dist/react/esm/index.js",
6
6
  "types": "dist/react/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "/dist/react"
11
11
  ],
12
12
  "scripts": {
13
- "rollup": "rm -rf dist/react && rollup -c --bundleConfigAsCjs",
13
+ "rollup": "NODE_ENV=prod rm -rf dist/react && rollup -c --bundleConfigAsCjs",
14
14
  "rollup:dev": "NODE_ENV=dev rm -rf dist/react && rollup -c --bundleConfigAsCjs",
15
15
  "rollup:web": "rm -rf dist/web && rollup --config rollup.web.config.js --bundleConfigAsCjs",
16
16
  "storybook": "storybook dev -p 6006",