spoclip-kit 1.1.0 → 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.
- package/dist/index.cjs +153 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +148 -1
- package/dist/index.d.ts +148 -1
- package/dist/index.js +150 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +13 -6
- package/dist/types.d.ts +13 -6
- package/package.json +11 -1
package/dist/index.cjs
CHANGED
|
@@ -20,9 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
colorV2: () => colorV2,
|
|
23
24
|
getClipVideoDownloadCost: () => getClipVideoDownloadCost,
|
|
24
25
|
getRawVideoDownloadCost: () => getRawVideoDownloadCost,
|
|
25
|
-
getVideoDownloadCost: () => getVideoDownloadCost
|
|
26
|
+
getVideoDownloadCost: () => getVideoDownloadCost,
|
|
27
|
+
typo: () => typo
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(src_exports);
|
|
28
30
|
|
|
@@ -60,10 +62,159 @@ function getClipVideoDownloadCost({
|
|
|
60
62
|
function getRawVideoDownloadCost() {
|
|
61
63
|
return { cost: 20, isPlusFree: false };
|
|
62
64
|
}
|
|
65
|
+
|
|
66
|
+
// src/styles/color.ts
|
|
67
|
+
var colorV2 = {
|
|
68
|
+
primary: "#242535",
|
|
69
|
+
primary2: "#2B2C3D",
|
|
70
|
+
secondary: "#38394D",
|
|
71
|
+
bgColor: "#F3F4F6",
|
|
72
|
+
error: "#EA2E2E",
|
|
73
|
+
white: "#FFFFFF",
|
|
74
|
+
black: "#111111",
|
|
75
|
+
gray1: "#424242",
|
|
76
|
+
gray2: "#616161",
|
|
77
|
+
gray3: "#8E8E8E",
|
|
78
|
+
gray4: "#BDBDBD",
|
|
79
|
+
gray5: "#E0E0E0",
|
|
80
|
+
gray6: "#EDEDED"
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/styles/typo.ts
|
|
84
|
+
var typo = {
|
|
85
|
+
"h1-24b": {
|
|
86
|
+
fontSize: 24,
|
|
87
|
+
fontWeight: 700,
|
|
88
|
+
lineHeight: 1.5,
|
|
89
|
+
letterSpacing: 0
|
|
90
|
+
},
|
|
91
|
+
"h1-24m": {
|
|
92
|
+
fontSize: 24,
|
|
93
|
+
fontWeight: 500,
|
|
94
|
+
lineHeight: 1.5,
|
|
95
|
+
letterSpacing: 0
|
|
96
|
+
},
|
|
97
|
+
"h1-24": {
|
|
98
|
+
fontSize: 24,
|
|
99
|
+
fontWeight: 400,
|
|
100
|
+
lineHeight: 1.5,
|
|
101
|
+
letterSpacing: 0
|
|
102
|
+
},
|
|
103
|
+
"h2-20b": {
|
|
104
|
+
fontSize: 20,
|
|
105
|
+
fontWeight: 700,
|
|
106
|
+
lineHeight: 1.5,
|
|
107
|
+
letterSpacing: 0
|
|
108
|
+
},
|
|
109
|
+
"h2-20m": {
|
|
110
|
+
fontSize: 20,
|
|
111
|
+
fontWeight: 500,
|
|
112
|
+
lineHeight: 1.5,
|
|
113
|
+
letterSpacing: 0
|
|
114
|
+
},
|
|
115
|
+
"h2-20": {
|
|
116
|
+
fontSize: 20,
|
|
117
|
+
fontWeight: 400,
|
|
118
|
+
lineHeight: 1.5,
|
|
119
|
+
letterSpacing: 0
|
|
120
|
+
},
|
|
121
|
+
"h3-18b": {
|
|
122
|
+
fontSize: 18,
|
|
123
|
+
fontWeight: 700,
|
|
124
|
+
lineHeight: 1.5,
|
|
125
|
+
letterSpacing: 0
|
|
126
|
+
},
|
|
127
|
+
"h3-18m": {
|
|
128
|
+
fontSize: 18,
|
|
129
|
+
fontWeight: 500,
|
|
130
|
+
lineHeight: 1.5,
|
|
131
|
+
letterSpacing: 0
|
|
132
|
+
},
|
|
133
|
+
"h3-18": {
|
|
134
|
+
fontSize: 18,
|
|
135
|
+
fontWeight: 400,
|
|
136
|
+
lineHeight: 1.5,
|
|
137
|
+
letterSpacing: 0
|
|
138
|
+
},
|
|
139
|
+
"b1-16b": {
|
|
140
|
+
fontSize: 16,
|
|
141
|
+
fontWeight: 700,
|
|
142
|
+
lineHeight: 1.5,
|
|
143
|
+
letterSpacing: 0
|
|
144
|
+
},
|
|
145
|
+
"b1-16m": {
|
|
146
|
+
fontSize: 16,
|
|
147
|
+
fontWeight: 500,
|
|
148
|
+
lineHeight: 1.5,
|
|
149
|
+
letterSpacing: 0
|
|
150
|
+
},
|
|
151
|
+
"b1-16": {
|
|
152
|
+
fontSize: 16,
|
|
153
|
+
fontWeight: 400,
|
|
154
|
+
lineHeight: 1.5,
|
|
155
|
+
letterSpacing: 0
|
|
156
|
+
},
|
|
157
|
+
"b2-14b": {
|
|
158
|
+
fontSize: 14,
|
|
159
|
+
fontWeight: 700,
|
|
160
|
+
lineHeight: 1.5,
|
|
161
|
+
letterSpacing: 0
|
|
162
|
+
},
|
|
163
|
+
"b2-14m": {
|
|
164
|
+
fontSize: 14,
|
|
165
|
+
fontWeight: 500,
|
|
166
|
+
lineHeight: 1.5,
|
|
167
|
+
letterSpacing: 0
|
|
168
|
+
},
|
|
169
|
+
"b2-14": {
|
|
170
|
+
fontSize: 14,
|
|
171
|
+
fontWeight: 400,
|
|
172
|
+
lineHeight: 1.5,
|
|
173
|
+
letterSpacing: 0
|
|
174
|
+
},
|
|
175
|
+
"b3-12b": {
|
|
176
|
+
fontSize: 12,
|
|
177
|
+
fontWeight: 700,
|
|
178
|
+
lineHeight: 1.5,
|
|
179
|
+
letterSpacing: 0
|
|
180
|
+
},
|
|
181
|
+
"b3-12m": {
|
|
182
|
+
fontSize: 12,
|
|
183
|
+
fontWeight: 500,
|
|
184
|
+
lineHeight: 1.5,
|
|
185
|
+
letterSpacing: 0
|
|
186
|
+
},
|
|
187
|
+
"b3-12": {
|
|
188
|
+
fontSize: 12,
|
|
189
|
+
fontWeight: 400,
|
|
190
|
+
lineHeight: 1.5,
|
|
191
|
+
letterSpacing: 0
|
|
192
|
+
},
|
|
193
|
+
"s1-10b": {
|
|
194
|
+
fontSize: 10,
|
|
195
|
+
fontWeight: 700,
|
|
196
|
+
lineHeight: 1.5,
|
|
197
|
+
letterSpacing: 0
|
|
198
|
+
},
|
|
199
|
+
"s1-10m": {
|
|
200
|
+
fontSize: 10,
|
|
201
|
+
fontWeight: 500,
|
|
202
|
+
lineHeight: 1.5,
|
|
203
|
+
letterSpacing: 0
|
|
204
|
+
},
|
|
205
|
+
"s1-10": {
|
|
206
|
+
fontSize: 10,
|
|
207
|
+
fontWeight: 400,
|
|
208
|
+
lineHeight: 1.5,
|
|
209
|
+
letterSpacing: 0
|
|
210
|
+
}
|
|
211
|
+
};
|
|
63
212
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
213
|
0 && (module.exports = {
|
|
214
|
+
colorV2,
|
|
65
215
|
getClipVideoDownloadCost,
|
|
66
216
|
getRawVideoDownloadCost,
|
|
67
|
-
getVideoDownloadCost
|
|
217
|
+
getVideoDownloadCost,
|
|
218
|
+
typo
|
|
68
219
|
});
|
|
69
220
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/libs/cost.ts"],"sourcesContent":["// Main entry point for spoclip-kit\nexport * from './libs';\nexport * from './types';\n","import type { TicketCode } from '@/types/membership';\n\nconst CLIP_COST_PER_SECOND = 1 / 60;\n\n/**\n * 비디오 다운로드 비용을 계산합니다.\n *\n * @description\n * - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨\n * - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료\n * - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작\n * - 55초부터는 1.92xx 이므로 반올림 시 1.9톨\n * - 59초부터는 1.98xx 이므로 반올림 시 2톨\n * - 60초부터는 2.00xx 이므로 반올림 시 2톨\n * - 62초부터는 2.03xx 이므로 반올림 시 2톨\n * - 63초부터는 2.05xx 이므로 반올림 시 2.1톨\n *\n */\n\ntype GetVideoDownloadCostParams = {\n duration: number;\n quality: '2K' | '4K';\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n\n /** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */\n isFullTime?: boolean;\n};\n\nexport function getVideoDownloadCost({\n duration,\n quality,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetVideoDownloadCostParams) {\n if (quality === '4K') {\n return getRawVideoDownloadCost();\n }\n\n return getClipVideoDownloadCost({\n duration,\n ticketCode,\n remainingFreeDownloads,\n });\n}\n\ntype GetClipVideoDownloadCostParams = {\n duration: number;\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n};\n\nexport function getClipVideoDownloadCost({\n duration,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetClipVideoDownloadCostParams) {\n const durationInSeconds = duration / 1000;\n const isUnder61 = durationInSeconds < 61;\n const isPlus = ticketCode === 'PLUS';\n\n if (isPlus && remainingFreeDownloads > 0 && isUnder61) {\n return { cost: 0, isPlusFree: true };\n }\n\n const cost = Math.round(durationInSeconds * CLIP_COST_PER_SECOND * 10) / 10;\n return { cost, isPlusFree: false };\n}\n\nexport function getRawVideoDownloadCost() {\n return { cost: 20, isPlusFree: false };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,IAAM,uBAAuB,IAAI;AA2B1B,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,yBAAyB;AAC3B,GAA+B;AAC7B,MAAI,YAAY,MAAM;AACpB,WAAO,wBAAwB;AAAA,EACjC;AAEA,SAAO,yBAAyB;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAQO,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA,aAAa;AAAA,EACb,yBAAyB;AAC3B,GAAmC;AACjC,QAAM,oBAAoB,WAAW;AACrC,QAAM,YAAY,oBAAoB;AACtC,QAAM,SAAS,eAAe;AAE9B,MAAI,UAAU,yBAAyB,KAAK,WAAW;AACrD,WAAO,EAAE,MAAM,GAAG,YAAY,KAAK;AAAA,EACrC;AAEA,QAAM,OAAO,KAAK,MAAM,oBAAoB,uBAAuB,EAAE,IAAI;AACzE,SAAO,EAAE,MAAM,YAAY,MAAM;AACnC;AAEO,SAAS,0BAA0B;AACxC,SAAO,EAAE,MAAM,IAAI,YAAY,MAAM;AACvC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/libs/cost.ts","../src/styles/color.ts","../src/styles/typo.ts"],"sourcesContent":["// Main entry point for spoclip-kit\nexport * from './libs';\nexport * from './types';\nexport * from './styles';\n","import type { TicketCode } from '@/types/membership';\n\nconst CLIP_COST_PER_SECOND = 1 / 60;\n\n/**\n * 비디오 다운로드 비용을 계산합니다.\n *\n * @description\n * - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨\n * - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료\n * - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작\n * - 55초부터는 1.92xx 이므로 반올림 시 1.9톨\n * - 59초부터는 1.98xx 이므로 반올림 시 2톨\n * - 60초부터는 2.00xx 이므로 반올림 시 2톨\n * - 62초부터는 2.03xx 이므로 반올림 시 2톨\n * - 63초부터는 2.05xx 이므로 반올림 시 2.1톨\n *\n */\n\ntype GetVideoDownloadCostParams = {\n duration: number;\n quality: '2K' | '4K';\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n\n /** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */\n isFullTime?: boolean;\n};\n\nexport function getVideoDownloadCost({\n duration,\n quality,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetVideoDownloadCostParams) {\n if (quality === '4K') {\n return getRawVideoDownloadCost();\n }\n\n return getClipVideoDownloadCost({\n duration,\n ticketCode,\n remainingFreeDownloads,\n });\n}\n\ntype GetClipVideoDownloadCostParams = {\n duration: number;\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n};\n\nexport function getClipVideoDownloadCost({\n duration,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetClipVideoDownloadCostParams) {\n const durationInSeconds = duration / 1000;\n const isUnder61 = durationInSeconds < 61;\n const isPlus = ticketCode === 'PLUS';\n\n if (isPlus && remainingFreeDownloads > 0 && isUnder61) {\n return { cost: 0, isPlusFree: true };\n }\n\n const cost = Math.round(durationInSeconds * CLIP_COST_PER_SECOND * 10) / 10;\n return { cost, isPlusFree: false };\n}\n\nexport function getRawVideoDownloadCost() {\n return { cost: 20, isPlusFree: false };\n}\n","const colorV2 = {\n primary: '#242535',\n primary2: '#2B2C3D',\n secondary: '#38394D',\n bgColor: '#F3F4F6',\n error: '#EA2E2E',\n\n white: '#FFFFFF',\n black: '#111111',\n gray1: '#424242',\n gray2: '#616161',\n gray3: '#8E8E8E',\n gray4: '#BDBDBD',\n gray5: '#E0E0E0',\n gray6: '#EDEDED',\n} as const;\n\nexport { colorV2 };\n","const typo = {\n 'h1-24b': {\n fontSize: 24,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h1-24m': {\n fontSize: 24,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h1-24': {\n fontSize: 24,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'h2-20b': {\n fontSize: 20,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h2-20m': {\n fontSize: 20,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h2-20': {\n fontSize: 20,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18b': {\n fontSize: 18,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18m': {\n fontSize: 18,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18': {\n fontSize: 18,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16b': {\n fontSize: 16,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16m': {\n fontSize: 16,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16': {\n fontSize: 16,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'b2-14b': {\n fontSize: 14,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b2-14m': {\n fontSize: 14,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b2-14': {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'b3-12b': {\n fontSize: 12,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b3-12m': {\n fontSize: 12,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b3-12': {\n fontSize: 12,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 's1-10b': {\n fontSize: 10,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 's1-10m': {\n fontSize: 10,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 's1-10': {\n fontSize: 10,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n} as const;\n\nexport { typo };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,IAAM,uBAAuB,IAAI;AA2B1B,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA,aAAa;A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ACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EAEA,UAAU;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AACF;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,150 @@
|
|
|
1
1
|
export { getClipVideoDownloadCost, getRawVideoDownloadCost, getVideoDownloadCost } from './libs.cjs';
|
|
2
2
|
export { T as TicketCode } from './membership-DWX-PuXh.cjs';
|
|
3
|
-
export { APIResponse } from './types.cjs';
|
|
3
|
+
export { APIErrorResponse, APIResponse, APIResponseBase } from './types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const colorV2: {
|
|
6
|
+
readonly primary: "#242535";
|
|
7
|
+
readonly primary2: "#2B2C3D";
|
|
8
|
+
readonly secondary: "#38394D";
|
|
9
|
+
readonly bgColor: "#F3F4F6";
|
|
10
|
+
readonly error: "#EA2E2E";
|
|
11
|
+
readonly white: "#FFFFFF";
|
|
12
|
+
readonly black: "#111111";
|
|
13
|
+
readonly gray1: "#424242";
|
|
14
|
+
readonly gray2: "#616161";
|
|
15
|
+
readonly gray3: "#8E8E8E";
|
|
16
|
+
readonly gray4: "#BDBDBD";
|
|
17
|
+
readonly gray5: "#E0E0E0";
|
|
18
|
+
readonly gray6: "#EDEDED";
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const typo: {
|
|
22
|
+
readonly 'h1-24b': {
|
|
23
|
+
readonly fontSize: 24;
|
|
24
|
+
readonly fontWeight: 700;
|
|
25
|
+
readonly lineHeight: 1.5;
|
|
26
|
+
readonly letterSpacing: 0;
|
|
27
|
+
};
|
|
28
|
+
readonly 'h1-24m': {
|
|
29
|
+
readonly fontSize: 24;
|
|
30
|
+
readonly fontWeight: 500;
|
|
31
|
+
readonly lineHeight: 1.5;
|
|
32
|
+
readonly letterSpacing: 0;
|
|
33
|
+
};
|
|
34
|
+
readonly 'h1-24': {
|
|
35
|
+
readonly fontSize: 24;
|
|
36
|
+
readonly fontWeight: 400;
|
|
37
|
+
readonly lineHeight: 1.5;
|
|
38
|
+
readonly letterSpacing: 0;
|
|
39
|
+
};
|
|
40
|
+
readonly 'h2-20b': {
|
|
41
|
+
readonly fontSize: 20;
|
|
42
|
+
readonly fontWeight: 700;
|
|
43
|
+
readonly lineHeight: 1.5;
|
|
44
|
+
readonly letterSpacing: 0;
|
|
45
|
+
};
|
|
46
|
+
readonly 'h2-20m': {
|
|
47
|
+
readonly fontSize: 20;
|
|
48
|
+
readonly fontWeight: 500;
|
|
49
|
+
readonly lineHeight: 1.5;
|
|
50
|
+
readonly letterSpacing: 0;
|
|
51
|
+
};
|
|
52
|
+
readonly 'h2-20': {
|
|
53
|
+
readonly fontSize: 20;
|
|
54
|
+
readonly fontWeight: 400;
|
|
55
|
+
readonly lineHeight: 1.5;
|
|
56
|
+
readonly letterSpacing: 0;
|
|
57
|
+
};
|
|
58
|
+
readonly 'h3-18b': {
|
|
59
|
+
readonly fontSize: 18;
|
|
60
|
+
readonly fontWeight: 700;
|
|
61
|
+
readonly lineHeight: 1.5;
|
|
62
|
+
readonly letterSpacing: 0;
|
|
63
|
+
};
|
|
64
|
+
readonly 'h3-18m': {
|
|
65
|
+
readonly fontSize: 18;
|
|
66
|
+
readonly fontWeight: 500;
|
|
67
|
+
readonly lineHeight: 1.5;
|
|
68
|
+
readonly letterSpacing: 0;
|
|
69
|
+
};
|
|
70
|
+
readonly 'h3-18': {
|
|
71
|
+
readonly fontSize: 18;
|
|
72
|
+
readonly fontWeight: 400;
|
|
73
|
+
readonly lineHeight: 1.5;
|
|
74
|
+
readonly letterSpacing: 0;
|
|
75
|
+
};
|
|
76
|
+
readonly 'b1-16b': {
|
|
77
|
+
readonly fontSize: 16;
|
|
78
|
+
readonly fontWeight: 700;
|
|
79
|
+
readonly lineHeight: 1.5;
|
|
80
|
+
readonly letterSpacing: 0;
|
|
81
|
+
};
|
|
82
|
+
readonly 'b1-16m': {
|
|
83
|
+
readonly fontSize: 16;
|
|
84
|
+
readonly fontWeight: 500;
|
|
85
|
+
readonly lineHeight: 1.5;
|
|
86
|
+
readonly letterSpacing: 0;
|
|
87
|
+
};
|
|
88
|
+
readonly 'b1-16': {
|
|
89
|
+
readonly fontSize: 16;
|
|
90
|
+
readonly fontWeight: 400;
|
|
91
|
+
readonly lineHeight: 1.5;
|
|
92
|
+
readonly letterSpacing: 0;
|
|
93
|
+
};
|
|
94
|
+
readonly 'b2-14b': {
|
|
95
|
+
readonly fontSize: 14;
|
|
96
|
+
readonly fontWeight: 700;
|
|
97
|
+
readonly lineHeight: 1.5;
|
|
98
|
+
readonly letterSpacing: 0;
|
|
99
|
+
};
|
|
100
|
+
readonly 'b2-14m': {
|
|
101
|
+
readonly fontSize: 14;
|
|
102
|
+
readonly fontWeight: 500;
|
|
103
|
+
readonly lineHeight: 1.5;
|
|
104
|
+
readonly letterSpacing: 0;
|
|
105
|
+
};
|
|
106
|
+
readonly 'b2-14': {
|
|
107
|
+
readonly fontSize: 14;
|
|
108
|
+
readonly fontWeight: 400;
|
|
109
|
+
readonly lineHeight: 1.5;
|
|
110
|
+
readonly letterSpacing: 0;
|
|
111
|
+
};
|
|
112
|
+
readonly 'b3-12b': {
|
|
113
|
+
readonly fontSize: 12;
|
|
114
|
+
readonly fontWeight: 700;
|
|
115
|
+
readonly lineHeight: 1.5;
|
|
116
|
+
readonly letterSpacing: 0;
|
|
117
|
+
};
|
|
118
|
+
readonly 'b3-12m': {
|
|
119
|
+
readonly fontSize: 12;
|
|
120
|
+
readonly fontWeight: 500;
|
|
121
|
+
readonly lineHeight: 1.5;
|
|
122
|
+
readonly letterSpacing: 0;
|
|
123
|
+
};
|
|
124
|
+
readonly 'b3-12': {
|
|
125
|
+
readonly fontSize: 12;
|
|
126
|
+
readonly fontWeight: 400;
|
|
127
|
+
readonly lineHeight: 1.5;
|
|
128
|
+
readonly letterSpacing: 0;
|
|
129
|
+
};
|
|
130
|
+
readonly 's1-10b': {
|
|
131
|
+
readonly fontSize: 10;
|
|
132
|
+
readonly fontWeight: 700;
|
|
133
|
+
readonly lineHeight: 1.5;
|
|
134
|
+
readonly letterSpacing: 0;
|
|
135
|
+
};
|
|
136
|
+
readonly 's1-10m': {
|
|
137
|
+
readonly fontSize: 10;
|
|
138
|
+
readonly fontWeight: 500;
|
|
139
|
+
readonly lineHeight: 1.5;
|
|
140
|
+
readonly letterSpacing: 0;
|
|
141
|
+
};
|
|
142
|
+
readonly 's1-10': {
|
|
143
|
+
readonly fontSize: 10;
|
|
144
|
+
readonly fontWeight: 400;
|
|
145
|
+
readonly lineHeight: 1.5;
|
|
146
|
+
readonly letterSpacing: 0;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export { colorV2, typo };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,150 @@
|
|
|
1
1
|
export { getClipVideoDownloadCost, getRawVideoDownloadCost, getVideoDownloadCost } from './libs.js';
|
|
2
2
|
export { T as TicketCode } from './membership-DWX-PuXh.js';
|
|
3
|
-
export { APIResponse } from './types.js';
|
|
3
|
+
export { APIErrorResponse, APIResponse, APIResponseBase } from './types.js';
|
|
4
|
+
|
|
5
|
+
declare const colorV2: {
|
|
6
|
+
readonly primary: "#242535";
|
|
7
|
+
readonly primary2: "#2B2C3D";
|
|
8
|
+
readonly secondary: "#38394D";
|
|
9
|
+
readonly bgColor: "#F3F4F6";
|
|
10
|
+
readonly error: "#EA2E2E";
|
|
11
|
+
readonly white: "#FFFFFF";
|
|
12
|
+
readonly black: "#111111";
|
|
13
|
+
readonly gray1: "#424242";
|
|
14
|
+
readonly gray2: "#616161";
|
|
15
|
+
readonly gray3: "#8E8E8E";
|
|
16
|
+
readonly gray4: "#BDBDBD";
|
|
17
|
+
readonly gray5: "#E0E0E0";
|
|
18
|
+
readonly gray6: "#EDEDED";
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
declare const typo: {
|
|
22
|
+
readonly 'h1-24b': {
|
|
23
|
+
readonly fontSize: 24;
|
|
24
|
+
readonly fontWeight: 700;
|
|
25
|
+
readonly lineHeight: 1.5;
|
|
26
|
+
readonly letterSpacing: 0;
|
|
27
|
+
};
|
|
28
|
+
readonly 'h1-24m': {
|
|
29
|
+
readonly fontSize: 24;
|
|
30
|
+
readonly fontWeight: 500;
|
|
31
|
+
readonly lineHeight: 1.5;
|
|
32
|
+
readonly letterSpacing: 0;
|
|
33
|
+
};
|
|
34
|
+
readonly 'h1-24': {
|
|
35
|
+
readonly fontSize: 24;
|
|
36
|
+
readonly fontWeight: 400;
|
|
37
|
+
readonly lineHeight: 1.5;
|
|
38
|
+
readonly letterSpacing: 0;
|
|
39
|
+
};
|
|
40
|
+
readonly 'h2-20b': {
|
|
41
|
+
readonly fontSize: 20;
|
|
42
|
+
readonly fontWeight: 700;
|
|
43
|
+
readonly lineHeight: 1.5;
|
|
44
|
+
readonly letterSpacing: 0;
|
|
45
|
+
};
|
|
46
|
+
readonly 'h2-20m': {
|
|
47
|
+
readonly fontSize: 20;
|
|
48
|
+
readonly fontWeight: 500;
|
|
49
|
+
readonly lineHeight: 1.5;
|
|
50
|
+
readonly letterSpacing: 0;
|
|
51
|
+
};
|
|
52
|
+
readonly 'h2-20': {
|
|
53
|
+
readonly fontSize: 20;
|
|
54
|
+
readonly fontWeight: 400;
|
|
55
|
+
readonly lineHeight: 1.5;
|
|
56
|
+
readonly letterSpacing: 0;
|
|
57
|
+
};
|
|
58
|
+
readonly 'h3-18b': {
|
|
59
|
+
readonly fontSize: 18;
|
|
60
|
+
readonly fontWeight: 700;
|
|
61
|
+
readonly lineHeight: 1.5;
|
|
62
|
+
readonly letterSpacing: 0;
|
|
63
|
+
};
|
|
64
|
+
readonly 'h3-18m': {
|
|
65
|
+
readonly fontSize: 18;
|
|
66
|
+
readonly fontWeight: 500;
|
|
67
|
+
readonly lineHeight: 1.5;
|
|
68
|
+
readonly letterSpacing: 0;
|
|
69
|
+
};
|
|
70
|
+
readonly 'h3-18': {
|
|
71
|
+
readonly fontSize: 18;
|
|
72
|
+
readonly fontWeight: 400;
|
|
73
|
+
readonly lineHeight: 1.5;
|
|
74
|
+
readonly letterSpacing: 0;
|
|
75
|
+
};
|
|
76
|
+
readonly 'b1-16b': {
|
|
77
|
+
readonly fontSize: 16;
|
|
78
|
+
readonly fontWeight: 700;
|
|
79
|
+
readonly lineHeight: 1.5;
|
|
80
|
+
readonly letterSpacing: 0;
|
|
81
|
+
};
|
|
82
|
+
readonly 'b1-16m': {
|
|
83
|
+
readonly fontSize: 16;
|
|
84
|
+
readonly fontWeight: 500;
|
|
85
|
+
readonly lineHeight: 1.5;
|
|
86
|
+
readonly letterSpacing: 0;
|
|
87
|
+
};
|
|
88
|
+
readonly 'b1-16': {
|
|
89
|
+
readonly fontSize: 16;
|
|
90
|
+
readonly fontWeight: 400;
|
|
91
|
+
readonly lineHeight: 1.5;
|
|
92
|
+
readonly letterSpacing: 0;
|
|
93
|
+
};
|
|
94
|
+
readonly 'b2-14b': {
|
|
95
|
+
readonly fontSize: 14;
|
|
96
|
+
readonly fontWeight: 700;
|
|
97
|
+
readonly lineHeight: 1.5;
|
|
98
|
+
readonly letterSpacing: 0;
|
|
99
|
+
};
|
|
100
|
+
readonly 'b2-14m': {
|
|
101
|
+
readonly fontSize: 14;
|
|
102
|
+
readonly fontWeight: 500;
|
|
103
|
+
readonly lineHeight: 1.5;
|
|
104
|
+
readonly letterSpacing: 0;
|
|
105
|
+
};
|
|
106
|
+
readonly 'b2-14': {
|
|
107
|
+
readonly fontSize: 14;
|
|
108
|
+
readonly fontWeight: 400;
|
|
109
|
+
readonly lineHeight: 1.5;
|
|
110
|
+
readonly letterSpacing: 0;
|
|
111
|
+
};
|
|
112
|
+
readonly 'b3-12b': {
|
|
113
|
+
readonly fontSize: 12;
|
|
114
|
+
readonly fontWeight: 700;
|
|
115
|
+
readonly lineHeight: 1.5;
|
|
116
|
+
readonly letterSpacing: 0;
|
|
117
|
+
};
|
|
118
|
+
readonly 'b3-12m': {
|
|
119
|
+
readonly fontSize: 12;
|
|
120
|
+
readonly fontWeight: 500;
|
|
121
|
+
readonly lineHeight: 1.5;
|
|
122
|
+
readonly letterSpacing: 0;
|
|
123
|
+
};
|
|
124
|
+
readonly 'b3-12': {
|
|
125
|
+
readonly fontSize: 12;
|
|
126
|
+
readonly fontWeight: 400;
|
|
127
|
+
readonly lineHeight: 1.5;
|
|
128
|
+
readonly letterSpacing: 0;
|
|
129
|
+
};
|
|
130
|
+
readonly 's1-10b': {
|
|
131
|
+
readonly fontSize: 10;
|
|
132
|
+
readonly fontWeight: 700;
|
|
133
|
+
readonly lineHeight: 1.5;
|
|
134
|
+
readonly letterSpacing: 0;
|
|
135
|
+
};
|
|
136
|
+
readonly 's1-10m': {
|
|
137
|
+
readonly fontSize: 10;
|
|
138
|
+
readonly fontWeight: 500;
|
|
139
|
+
readonly lineHeight: 1.5;
|
|
140
|
+
readonly letterSpacing: 0;
|
|
141
|
+
};
|
|
142
|
+
readonly 's1-10': {
|
|
143
|
+
readonly fontSize: 10;
|
|
144
|
+
readonly fontWeight: 400;
|
|
145
|
+
readonly lineHeight: 1.5;
|
|
146
|
+
readonly letterSpacing: 0;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export { colorV2, typo };
|
package/dist/index.js
CHANGED
|
@@ -32,9 +32,158 @@ function getClipVideoDownloadCost({
|
|
|
32
32
|
function getRawVideoDownloadCost() {
|
|
33
33
|
return { cost: 20, isPlusFree: false };
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
// src/styles/color.ts
|
|
37
|
+
var colorV2 = {
|
|
38
|
+
primary: "#242535",
|
|
39
|
+
primary2: "#2B2C3D",
|
|
40
|
+
secondary: "#38394D",
|
|
41
|
+
bgColor: "#F3F4F6",
|
|
42
|
+
error: "#EA2E2E",
|
|
43
|
+
white: "#FFFFFF",
|
|
44
|
+
black: "#111111",
|
|
45
|
+
gray1: "#424242",
|
|
46
|
+
gray2: "#616161",
|
|
47
|
+
gray3: "#8E8E8E",
|
|
48
|
+
gray4: "#BDBDBD",
|
|
49
|
+
gray5: "#E0E0E0",
|
|
50
|
+
gray6: "#EDEDED"
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/styles/typo.ts
|
|
54
|
+
var typo = {
|
|
55
|
+
"h1-24b": {
|
|
56
|
+
fontSize: 24,
|
|
57
|
+
fontWeight: 700,
|
|
58
|
+
lineHeight: 1.5,
|
|
59
|
+
letterSpacing: 0
|
|
60
|
+
},
|
|
61
|
+
"h1-24m": {
|
|
62
|
+
fontSize: 24,
|
|
63
|
+
fontWeight: 500,
|
|
64
|
+
lineHeight: 1.5,
|
|
65
|
+
letterSpacing: 0
|
|
66
|
+
},
|
|
67
|
+
"h1-24": {
|
|
68
|
+
fontSize: 24,
|
|
69
|
+
fontWeight: 400,
|
|
70
|
+
lineHeight: 1.5,
|
|
71
|
+
letterSpacing: 0
|
|
72
|
+
},
|
|
73
|
+
"h2-20b": {
|
|
74
|
+
fontSize: 20,
|
|
75
|
+
fontWeight: 700,
|
|
76
|
+
lineHeight: 1.5,
|
|
77
|
+
letterSpacing: 0
|
|
78
|
+
},
|
|
79
|
+
"h2-20m": {
|
|
80
|
+
fontSize: 20,
|
|
81
|
+
fontWeight: 500,
|
|
82
|
+
lineHeight: 1.5,
|
|
83
|
+
letterSpacing: 0
|
|
84
|
+
},
|
|
85
|
+
"h2-20": {
|
|
86
|
+
fontSize: 20,
|
|
87
|
+
fontWeight: 400,
|
|
88
|
+
lineHeight: 1.5,
|
|
89
|
+
letterSpacing: 0
|
|
90
|
+
},
|
|
91
|
+
"h3-18b": {
|
|
92
|
+
fontSize: 18,
|
|
93
|
+
fontWeight: 700,
|
|
94
|
+
lineHeight: 1.5,
|
|
95
|
+
letterSpacing: 0
|
|
96
|
+
},
|
|
97
|
+
"h3-18m": {
|
|
98
|
+
fontSize: 18,
|
|
99
|
+
fontWeight: 500,
|
|
100
|
+
lineHeight: 1.5,
|
|
101
|
+
letterSpacing: 0
|
|
102
|
+
},
|
|
103
|
+
"h3-18": {
|
|
104
|
+
fontSize: 18,
|
|
105
|
+
fontWeight: 400,
|
|
106
|
+
lineHeight: 1.5,
|
|
107
|
+
letterSpacing: 0
|
|
108
|
+
},
|
|
109
|
+
"b1-16b": {
|
|
110
|
+
fontSize: 16,
|
|
111
|
+
fontWeight: 700,
|
|
112
|
+
lineHeight: 1.5,
|
|
113
|
+
letterSpacing: 0
|
|
114
|
+
},
|
|
115
|
+
"b1-16m": {
|
|
116
|
+
fontSize: 16,
|
|
117
|
+
fontWeight: 500,
|
|
118
|
+
lineHeight: 1.5,
|
|
119
|
+
letterSpacing: 0
|
|
120
|
+
},
|
|
121
|
+
"b1-16": {
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
fontWeight: 400,
|
|
124
|
+
lineHeight: 1.5,
|
|
125
|
+
letterSpacing: 0
|
|
126
|
+
},
|
|
127
|
+
"b2-14b": {
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
fontWeight: 700,
|
|
130
|
+
lineHeight: 1.5,
|
|
131
|
+
letterSpacing: 0
|
|
132
|
+
},
|
|
133
|
+
"b2-14m": {
|
|
134
|
+
fontSize: 14,
|
|
135
|
+
fontWeight: 500,
|
|
136
|
+
lineHeight: 1.5,
|
|
137
|
+
letterSpacing: 0
|
|
138
|
+
},
|
|
139
|
+
"b2-14": {
|
|
140
|
+
fontSize: 14,
|
|
141
|
+
fontWeight: 400,
|
|
142
|
+
lineHeight: 1.5,
|
|
143
|
+
letterSpacing: 0
|
|
144
|
+
},
|
|
145
|
+
"b3-12b": {
|
|
146
|
+
fontSize: 12,
|
|
147
|
+
fontWeight: 700,
|
|
148
|
+
lineHeight: 1.5,
|
|
149
|
+
letterSpacing: 0
|
|
150
|
+
},
|
|
151
|
+
"b3-12m": {
|
|
152
|
+
fontSize: 12,
|
|
153
|
+
fontWeight: 500,
|
|
154
|
+
lineHeight: 1.5,
|
|
155
|
+
letterSpacing: 0
|
|
156
|
+
},
|
|
157
|
+
"b3-12": {
|
|
158
|
+
fontSize: 12,
|
|
159
|
+
fontWeight: 400,
|
|
160
|
+
lineHeight: 1.5,
|
|
161
|
+
letterSpacing: 0
|
|
162
|
+
},
|
|
163
|
+
"s1-10b": {
|
|
164
|
+
fontSize: 10,
|
|
165
|
+
fontWeight: 700,
|
|
166
|
+
lineHeight: 1.5,
|
|
167
|
+
letterSpacing: 0
|
|
168
|
+
},
|
|
169
|
+
"s1-10m": {
|
|
170
|
+
fontSize: 10,
|
|
171
|
+
fontWeight: 500,
|
|
172
|
+
lineHeight: 1.5,
|
|
173
|
+
letterSpacing: 0
|
|
174
|
+
},
|
|
175
|
+
"s1-10": {
|
|
176
|
+
fontSize: 10,
|
|
177
|
+
fontWeight: 400,
|
|
178
|
+
lineHeight: 1.5,
|
|
179
|
+
letterSpacing: 0
|
|
180
|
+
}
|
|
181
|
+
};
|
|
35
182
|
export {
|
|
183
|
+
colorV2,
|
|
36
184
|
getClipVideoDownloadCost,
|
|
37
185
|
getRawVideoDownloadCost,
|
|
38
|
-
getVideoDownloadCost
|
|
186
|
+
getVideoDownloadCost,
|
|
187
|
+
typo
|
|
39
188
|
};
|
|
40
189
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/libs/cost.ts"],"sourcesContent":["import type { TicketCode } from '@/types/membership';\n\nconst CLIP_COST_PER_SECOND = 1 / 60;\n\n/**\n * 비디오 다운로드 비용을 계산합니다.\n *\n * @description\n * - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨\n * - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료\n * - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작\n * - 55초부터는 1.92xx 이므로 반올림 시 1.9톨\n * - 59초부터는 1.98xx 이므로 반올림 시 2톨\n * - 60초부터는 2.00xx 이므로 반올림 시 2톨\n * - 62초부터는 2.03xx 이므로 반올림 시 2톨\n * - 63초부터는 2.05xx 이므로 반올림 시 2.1톨\n *\n */\n\ntype GetVideoDownloadCostParams = {\n duration: number;\n quality: '2K' | '4K';\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n\n /** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */\n isFullTime?: boolean;\n};\n\nexport function getVideoDownloadCost({\n duration,\n quality,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetVideoDownloadCostParams) {\n if (quality === '4K') {\n return getRawVideoDownloadCost();\n }\n\n return getClipVideoDownloadCost({\n duration,\n ticketCode,\n remainingFreeDownloads,\n });\n}\n\ntype GetClipVideoDownloadCostParams = {\n duration: number;\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n};\n\nexport function getClipVideoDownloadCost({\n duration,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetClipVideoDownloadCostParams) {\n const durationInSeconds = duration / 1000;\n const isUnder61 = durationInSeconds < 61;\n const isPlus = ticketCode === 'PLUS';\n\n if (isPlus && remainingFreeDownloads > 0 && isUnder61) {\n return { cost: 0, isPlusFree: true };\n }\n\n const cost = Math.round(durationInSeconds * CLIP_COST_PER_SECOND * 10) / 10;\n return { cost, isPlusFree: false };\n}\n\nexport function getRawVideoDownloadCost() {\n return { cost: 20, isPlusFree: false };\n}\n"],"mappings":";AAEA,IAAM,uBAAuB,IAAI;AA2B1B,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,yBAAyB;AAC3B,GAA+B;AAC7B,MAAI,YAAY,MAAM;AACpB,WAAO,wBAAwB;AAAA,EACjC;AAEA,SAAO,yBAAyB;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAQO,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA,aAAa;AAAA,EACb,yBAAyB;AAC3B,GAAmC;AACjC,QAAM,oBAAoB,WAAW;AACrC,QAAM,YAAY,oBAAoB;AACtC,QAAM,SAAS,eAAe;AAE9B,MAAI,UAAU,yBAAyB,KAAK,WAAW;AACrD,WAAO,EAAE,MAAM,GAAG,YAAY,KAAK;AAAA,EACrC;AAEA,QAAM,OAAO,KAAK,MAAM,oBAAoB,uBAAuB,EAAE,IAAI;AACzE,SAAO,EAAE,MAAM,YAAY,MAAM;AACnC;AAEO,SAAS,0BAA0B;AACxC,SAAO,EAAE,MAAM,IAAI,YAAY,MAAM;AACvC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/libs/cost.ts","../src/styles/color.ts","../src/styles/typo.ts"],"sourcesContent":["import type { TicketCode } from '@/types/membership';\n\nconst CLIP_COST_PER_SECOND = 1 / 60;\n\n/**\n * 비디오 다운로드 비용을 계산합니다.\n *\n * @description\n * - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨\n * - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료\n * - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작\n * - 55초부터는 1.92xx 이므로 반올림 시 1.9톨\n * - 59초부터는 1.98xx 이므로 반올림 시 2톨\n * - 60초부터는 2.00xx 이므로 반올림 시 2톨\n * - 62초부터는 2.03xx 이므로 반올림 시 2톨\n * - 63초부터는 2.05xx 이므로 반올림 시 2.1톨\n *\n */\n\ntype GetVideoDownloadCostParams = {\n duration: number;\n quality: '2K' | '4K';\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n\n /** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */\n isFullTime?: boolean;\n};\n\nexport function getVideoDownloadCost({\n duration,\n quality,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetVideoDownloadCostParams) {\n if (quality === '4K') {\n return getRawVideoDownloadCost();\n }\n\n return getClipVideoDownloadCost({\n duration,\n ticketCode,\n remainingFreeDownloads,\n });\n}\n\ntype GetClipVideoDownloadCostParams = {\n duration: number;\n ticketCode?: TicketCode;\n remainingFreeDownloads?: number;\n};\n\nexport function getClipVideoDownloadCost({\n duration,\n ticketCode = 'FREE',\n remainingFreeDownloads = 0,\n}: GetClipVideoDownloadCostParams) {\n const durationInSeconds = duration / 1000;\n const isUnder61 = durationInSeconds < 61;\n const isPlus = ticketCode === 'PLUS';\n\n if (isPlus && remainingFreeDownloads > 0 && isUnder61) {\n return { cost: 0, isPlusFree: true };\n }\n\n const cost = Math.round(durationInSeconds * CLIP_COST_PER_SECOND * 10) / 10;\n return { cost, isPlusFree: false };\n}\n\nexport function getRawVideoDownloadCost() {\n return { cost: 20, isPlusFree: false };\n}\n","const colorV2 = {\n primary: '#242535',\n primary2: '#2B2C3D',\n secondary: '#38394D',\n bgColor: '#F3F4F6',\n error: '#EA2E2E',\n\n white: '#FFFFFF',\n black: '#111111',\n gray1: '#424242',\n gray2: '#616161',\n gray3: '#8E8E8E',\n gray4: '#BDBDBD',\n gray5: '#E0E0E0',\n gray6: '#EDEDED',\n} as const;\n\nexport { colorV2 };\n","const typo = {\n 'h1-24b': {\n fontSize: 24,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h1-24m': {\n fontSize: 24,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h1-24': {\n fontSize: 24,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'h2-20b': {\n fontSize: 20,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h2-20m': {\n fontSize: 20,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h2-20': {\n fontSize: 20,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18b': {\n fontSize: 18,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18m': {\n fontSize: 18,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'h3-18': {\n fontSize: 18,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16b': {\n fontSize: 16,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16m': {\n fontSize: 16,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b1-16': {\n fontSize: 16,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'b2-14b': {\n fontSize: 14,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b2-14m': {\n fontSize: 14,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b2-14': {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 'b3-12b': {\n fontSize: 12,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b3-12m': {\n fontSize: 12,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 'b3-12': {\n fontSize: 12,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n\n 's1-10b': {\n fontSize: 10,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 's1-10m': {\n fontSize: 10,\n fontWeight: 500,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n 's1-10': {\n fontSize: 10,\n fontWeight: 400,\n lineHeight: 1.5,\n letterSpacing: 0,\n },\n} as const;\n\nexport { typo };\n"],"mapp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AAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EAEA,UAAU;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,EACjB;AACF;","names":[]}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export { T as TicketCode } from './membership-DWX-PuXh.cjs';
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
status:
|
|
3
|
+
type APIResponseBase<T extends 'success' | 'error'> = {
|
|
4
|
+
status: T;
|
|
5
5
|
code: number;
|
|
6
|
-
data: T;
|
|
7
6
|
timestamp: string;
|
|
8
7
|
path: string;
|
|
9
|
-
|
|
8
|
+
};
|
|
9
|
+
type APIResponse<T> = APIResponseBase<'success'> & {
|
|
10
|
+
data: T;
|
|
11
|
+
};
|
|
12
|
+
type APIErrorResponse = APIResponseBase<'error'> & {
|
|
13
|
+
error: {
|
|
10
14
|
message: string;
|
|
11
|
-
details:
|
|
15
|
+
details: {
|
|
16
|
+
error: string;
|
|
17
|
+
statusCode: number;
|
|
18
|
+
} | null;
|
|
12
19
|
};
|
|
13
20
|
};
|
|
14
21
|
|
|
15
|
-
export type { APIResponse };
|
|
22
|
+
export type { APIErrorResponse, APIResponse, APIResponseBase };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export { T as TicketCode } from './membership-DWX-PuXh.js';
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
status:
|
|
3
|
+
type APIResponseBase<T extends 'success' | 'error'> = {
|
|
4
|
+
status: T;
|
|
5
5
|
code: number;
|
|
6
|
-
data: T;
|
|
7
6
|
timestamp: string;
|
|
8
7
|
path: string;
|
|
9
|
-
|
|
8
|
+
};
|
|
9
|
+
type APIResponse<T> = APIResponseBase<'success'> & {
|
|
10
|
+
data: T;
|
|
11
|
+
};
|
|
12
|
+
type APIErrorResponse = APIResponseBase<'error'> & {
|
|
13
|
+
error: {
|
|
10
14
|
message: string;
|
|
11
|
-
details:
|
|
15
|
+
details: {
|
|
16
|
+
error: string;
|
|
17
|
+
statusCode: number;
|
|
18
|
+
} | null;
|
|
12
19
|
};
|
|
13
20
|
};
|
|
14
21
|
|
|
15
|
-
export type { APIResponse };
|
|
22
|
+
export type { APIErrorResponse, APIResponse, APIResponseBase };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoclip-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript utility library for internal use",
|
|
6
6
|
"files": [
|
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
"types": "./dist/types.d.cts",
|
|
40
40
|
"default": "./dist/types.cjs"
|
|
41
41
|
}
|
|
42
|
+
},
|
|
43
|
+
"./styles": {
|
|
44
|
+
"import": {
|
|
45
|
+
"types": "./dist/styles.d.ts",
|
|
46
|
+
"default": "./dist/styles.js"
|
|
47
|
+
},
|
|
48
|
+
"require": {
|
|
49
|
+
"types": "./dist/styles.d.cts",
|
|
50
|
+
"default": "./dist/styles.cjs"
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
},
|
|
44
54
|
"scripts": {
|