Skip to content

Commit dce7dd1

Browse files
✨ feat: Add Runway & Kling & Luma & Runway & Viggle & CogView & CogVideo
1 parent 286489f commit dce7dd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2156
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

src/CogVideo/components/Avatar.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { memo } from 'react';
2+
3+
import IconAvatar, { type IconAvatarProps } from '@/features/IconAvatar';
4+
5+
import { COLOR_PRIMARY, TITLE } from '../style';
6+
import Color from './Color';
7+
8+
export type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
9+
10+
const Avatar = memo<AvatarProps>(({ background, size, ...rest }) => {
11+
return (
12+
<IconAvatar
13+
Icon={Color}
14+
aria-label={TITLE}
15+
background={background || COLOR_PRIMARY}
16+
iconMultiple={0.65}
17+
size={size}
18+
{...rest}
19+
/>
20+
);
21+
});
22+
23+
export default Avatar;

src/CogVideo/components/Color.tsx

Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
1+
import { forwardRef } from 'react';
2+
3+
import { useFillIds } from '@/hooks/useFillId';
4+
import type { IconType } from '@/types';
5+
6+
import { TITLE } from '../style';
7+
8+
const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => {
9+
const [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q] = useFillIds(TITLE, 17);
10+
return (
11+
<svg
12+
height={size}
13+
ref={ref}
14+
style={{ flex: 'none', lineHeight: 1, ...style }}
15+
viewBox="0 0 24 24"
16+
width={size}
17+
xmlns="http://www.w3.org/2000/svg"
18+
{...rest}
19+
>
20+
<title>{TITLE}</title>
21+
<path
22+
d="M14.538 22.388H9.406a.306.306 0 01-.268-.146L.056 2.335a.329.329 0 01.268-.512h5.132c.11 0 .207.049.268.146l9.082 19.895c.146.232-.012.524-.268.524z"
23+
fill={a.fill}
24+
></path>
25+
<path
26+
d="M23.705 1.835H18.5a.281.281 0 00-.244.134L9.138 21.925a.298.298 0 00.243.463h5.206a.281.281 0 00.244-.134l9.118-19.956a.298.298 0 00-.244-.463z"
27+
fill={b.fill}
28+
></path>
29+
<path
30+
d="M21.596 2.932c-.878-.048-1.853.525-3.267 2.231-.329.403-1.572.403-1.414 1.256.744 4.218-3.157 13.056-2.292 13.104.866.05 3.06-1.62 3.828-2.596.768-.975 1.28-1.78 1.877-2.987.598-1.207 1.207-2.95 1.744-4.827.536-1.877.56-3.73.597-4.779.024-.317-.195-1.353-1.073-1.402z"
31+
fill="#191935"
32+
></path>
33+
<path
34+
d="M18.012 6.017c-.207-1.134-1.085-3.426-1.682-4.157-.597-.732-1.17-1.073-2.109-.72-.512.195-1.719.89-2.597 3.572-.28.853-.743 1.28-1.158 1.853-.414.56-1.072 1.341-1.072 2.414 0 1.085.438 1.999 1.036 2.694.597.695 3.145 2.743 3.681 3.303.549.561 2.036 2.048 2.426 2.719l.39.67s.732-1.694.963-2.243c.232-.536.659-3.389.695-5.01.037-1.61-.427-4.279-.573-5.095z"
35+
fill="#000"
36+
></path>
37+
<path
38+
d="M14.952 20.474c-.097.049-.158-.232.171-.707.33-.475.987-1.39 1.512-1.792C17.17 17.573 18.5 16.5 19 16.39c.5-.11.5.33.256.512-.464.354-.549.269-1.134.805-.585.536-1.305.817-1.743 1.219-.44.402-1.158 1.402-1.427 1.548z"
39+
fill="#000"
40+
></path>
41+
<path
42+
d="M10.174 12.392c-1.524-.439-3.999-.926-4.937 2.548 0 0-.67.292-1.17 1.438-.805 1.841.963 6.754 6.192 5.474 2.487-.61 4.56-1.926 5.169-2.524.926-.902 1.524-.95 1.524-.95-.415-1.317-3.39-4.999-6.778-5.986zM18.963 16.732c.5-.463 1.146-1.158 1.426-1.646.28-.487.561-1.17.61-1.365.049-.195-.073-.805.22-.768.292.036.109.512-.013.744-.17.304-.378.78-.512 1.109-.134.341-.622.95-1 1.39-.39.438-.768.743-.768.743l.037-.207z"
43+
fill="#000"
44+
></path>
45+
<path
46+
d="M18.817 16.89s.621-.366 1.121-.719c.5-.354 1.512-1.268 1.756-1.597.256-.33.292-.634.426-.56.232.146-.158.487-.317.645-.17.159-.743.72-1.182 1.085-.451.366-1.61 1.207-1.804 1.146z"
47+
fill="#000"
48+
></path>
49+
<path
50+
d="M17.256 17.183c.013.049.05.085.05.024.109-1.06.535-2.316.548-5.412.012-3.28 0-4.779-2.39-5.388-.158-.037-.304 0-.28.158.061.366.89 2.17 1.304 4.535.5 2.913.67 5.595.768 6.083z"
51+
fill={c.fill}
52+
></path>
53+
<path
54+
d="M6.907 15.72c-.817.232 1.146.634 3.023 1 1.28.256 5.315.877 6.68.95.025 0 .037-.036.012-.048-1.365-.89-4.388-2.829-5.254-2.829-1.56-.012-3.852.756-4.461.927z"
55+
fill={d.fill}
56+
></path>
57+
<path
58+
d="M11.588 9.393s.646 1.353 1.658 2.195c.877.719 1.646 1.182 1.926 1.523.963 1.134 1.34 3.121 1.816 4.06.073.134-3.498-3.401-5.315-6.425-.414-.694-.195-1.536-.085-1.353z"
59+
fill={e.fill}
60+
></path>
61+
<path
62+
d="M13.88 3.457c.378-.074 1.377.5 1.377.792 0 .134-1.438-.134-1.682-.256-.33-.17.06-.488.305-.536z"
63+
fill={f.fill}
64+
></path>
65+
<path
66+
d="M13.221 4.505c.183-.159.951.012 1.098.146.146.159-.756.256-1.049.293-.256.024-.231-.28-.049-.44z"
67+
fill={g.fill}
68+
></path>
69+
<path
70+
d="M14.99 2.14c.56.049 1.681 1.694 1.438 1.89-.134.097-1.878-.976-2.134-1.28-.22-.269.268-.647.695-.61z"
71+
fill={h.fill}
72+
></path>
73+
<path
74+
d="M20.56 4.688c.28.036.841.658.78.878-.024.097-.975-.427-1.121-.573-.195-.208.158-.33.34-.305z"
75+
fill={i.fill}
76+
></path>
77+
<path
78+
d="M19.853 5.334c.134-.085.683.22.695.366.012.122-.537-.013-.756-.05-.183-.024-.085-.219.06-.316z"
79+
fill={j.fill}
80+
></path>
81+
<path
82+
d="M21.486 4.017c.39.159.72 1.256.598 1.366-.134.121-1.11-.817-1.22-1.085-.097-.232.33-.39.622-.28z"
83+
fill={k.fill}
84+
></path>
85+
<path
86+
d="M16.074 13.27c-.122-.61-.317-3.133-.95-4.645-.464-1.097-1.72-3.133-1.976-2.438-.378 1.024-1.231 1.975-.938 2.73.292.757 1.28 1.793 2.023 2.439.72.634 1.853 1.975 1.84 1.914z"
87+
fill={l.fill}
88+
></path>
89+
<path
90+
d="M9.26 17.256c-.963-.134-2.438-.439-3.353-.622-.573-.11.098 1.475.878 1.89.67.353 3.694.158 5.693-.037 1.658-.17 4.193-.61 3.328-.621a62.933 62.933 0 01-6.546-.61z"
91+
fill={m.fill}
92+
></path>
93+
<path
94+
d="M16.025 18.268c.049-.025.11-.122.073-.098-.743.244-3.486 1-6.485 1.329-2.292.244-2.78.049-3.047.17-.317.135.56 1.33 2.523 1.22 2.243-.134 5.656-1.792 6.936-2.621z"
95+
fill={n.fill}
96+
></path>
97+
<path
98+
d="M7.114 14.586c-.146 0-.146-.426.33-.634 0 0 .536-.682 1.608-.475.744.146 1.926.817 1.768.78-.56-.134-2.999.33-3.706.33z"
99+
fill={o.fill}
100+
></path>
101+
<path
102+
d="M17.976 16.707c0-.048.475-.792 1.097-4.096.39-2.047.292-3.852.231-4.205-.036-.256.841.256.854 1.219.012.695-.147 3.474-1.402 5.973-.512 1.036-.78 1.17-.78 1.11z"
103+
fill={p.fill}
104+
></path>
105+
<path
106+
d="M19.792 14.135c-.012.025-.061.013-.049-.012.256-.56.951-2.95 1.097-4.766.061-.707.061-1.28.147-1.463.085-.22.621-.83.743-.902.256-.146.134 1.353-.439 3.218-.341 1.158-1.048 3.133-1.499 3.925z"
107+
fill={q.fill}
108+
></path>
109+
<defs>
110+
<linearGradient
111+
gradientUnits="userSpaceOnUse"
112+
id={a.id}
113+
x1="2.173"
114+
x2="11.524"
115+
y1="3.299"
116+
y2="18.97"
117+
>
118+
<stop stopColor="#19D46A"></stop>
119+
<stop offset="1" stopColor="#0D00B5"></stop>
120+
</linearGradient>
121+
<linearGradient
122+
gradientUnits="userSpaceOnUse"
123+
id={b.id}
124+
x1="12.793"
125+
x2="19.332"
126+
y1="20.54"
127+
y2="5.839"
128+
>
129+
<stop offset="0" stopColor="#D70066"></stop>
130+
<stop offset="1" stopColor="#0D00B5"></stop>
131+
</linearGradient>
132+
<linearGradient
133+
gradientUnits="userSpaceOnUse"
134+
id={c.id}
135+
x1="16.291"
136+
x2="17.794"
137+
y1="6.499"
138+
y2="17.251"
139+
>
140+
<stop stopColor="#8890F4"></stop>
141+
<stop offset=".283" stopColor="#FFCFFD"></stop>
142+
<stop offset=".606" stopColor="#F4F0FE"></stop>
143+
<stop offset=".734" stopColor="#EFFFFF"></stop>
144+
<stop offset="1" stopColor="#75D9DD"></stop>
145+
</linearGradient>
146+
<linearGradient
147+
gradientUnits="userSpaceOnUse"
148+
id={d.id}
149+
x1="6.141"
150+
x2="17.226"
151+
y1="14.567"
152+
y2="17.611"
153+
>
154+
<stop offset=".005" stopColor="#6F69F4"></stop>
155+
<stop offset=".415" stopColor="#FFCEAD"></stop>
156+
<stop offset=".596" stopColor="#EFEFB9"></stop>
157+
<stop offset=".673" stopColor="#E7FFBF"></stop>
158+
<stop offset="1" stopColor="#75D9DD"></stop>
159+
</linearGradient>
160+
<linearGradient
161+
gradientUnits="userSpaceOnUse"
162+
id={e.id}
163+
x1="10.787"
164+
x2="18.484"
165+
y1="8.975"
166+
y2="18.179"
167+
>
168+
<stop offset=".005" stopColor="#6F69F4"></stop>
169+
<stop offset=".382" stopColor="#FFAFFF"></stop>
170+
<stop offset=".513" stopColor="#F5D1E4"></stop>
171+
<stop offset=".673" stopColor="#E7FFBF"></stop>
172+
<stop offset=".972" stopColor="#75D9DD"></stop>
173+
</linearGradient>
174+
<linearGradient
175+
gradientUnits="userSpaceOnUse"
176+
id={f.id}
177+
x1="15.002"
178+
x2="14.323"
179+
y1="4.818"
180+
y2="3.993"
181+
>
182+
<stop stopColor="#FFA2FF"></stop>
183+
<stop offset=".557" stopColor="#FFFFB0"></stop>
184+
<stop offset=".713" stopColor="#DDFFCA"></stop>
185+
<stop offset="1" stopColor="#97FFFF"></stop>
186+
</linearGradient>
187+
<linearGradient
188+
gradientUnits="userSpaceOnUse"
189+
id={g.id}
190+
x1="14.063"
191+
x2="13.455"
192+
y1="5.228"
193+
y2="4.443"
194+
>
195+
<stop stopColor="#FFA2FF"></stop>
196+
<stop offset=".557" stopColor="#FFFFB0"></stop>
197+
<stop offset=".713" stopColor="#DDFFCA"></stop>
198+
<stop offset="1" stopColor="#97FFFF"></stop>
199+
</linearGradient>
200+
<linearGradient
201+
gradientUnits="userSpaceOnUse"
202+
id={h.id}
203+
x1="16.294"
204+
x2="15.351"
205+
y1="4.635"
206+
y2="3.192"
207+
>
208+
<stop stopColor="#FFA2FF"></stop>
209+
<stop offset=".557" stopColor="#FFFFB0"></stop>
210+
<stop offset=".713" stopColor="#DDFFCA"></stop>
211+
<stop offset="1" stopColor="#97FFFF"></stop>
212+
</linearGradient>
213+
<linearGradient
214+
gradientUnits="userSpaceOnUse"
215+
id={i.id}
216+
x1="21.017"
217+
x2="20.742"
218+
y1="5.909"
219+
y2="5.173"
220+
>
221+
<stop stopColor="#FFA2FF"></stop>
222+
<stop offset=".557" stopColor="#FFFFB0"></stop>
223+
<stop offset=".713" stopColor="#DDFFCA"></stop>
224+
<stop offset="1" stopColor="#97FFFF"></stop>
225+
</linearGradient>
226+
<linearGradient
227+
gradientUnits="userSpaceOnUse"
228+
id={j.id}
229+
x1="20.281"
230+
x2="20.002"
231+
y1="6.032"
232+
y2="5.346"
233+
>
234+
<stop stopColor="#FFA2FF"></stop>
235+
<stop offset=".557" stopColor="#FFFFB0"></stop>
236+
<stop offset=".713" stopColor="#DDFFCA"></stop>
237+
<stop offset="1" stopColor="#97FFFF"></stop>
238+
</linearGradient>
239+
<linearGradient
240+
gradientUnits="userSpaceOnUse"
241+
id={k.id}
242+
x1="21.792"
243+
x2="21.483"
244+
y1="5.765"
245+
y2="4.716"
246+
>
247+
<stop stopColor="#FFA2FF"></stop>
248+
<stop offset=".557" stopColor="#FFFFB0"></stop>
249+
<stop offset=".713" stopColor="#DDFFCA"></stop>
250+
<stop offset="1" stopColor="#97FFFF"></stop>
251+
</linearGradient>
252+
<linearGradient
253+
gradientUnits="userSpaceOnUse"
254+
id={l.id}
255+
x1="16.535"
256+
x2="12.379"
257+
y1="11.909"
258+
y2="7.067"
259+
>
260+
<stop offset=".005" stopColor="#6F69F4"></stop>
261+
<stop offset=".329" stopColor="#FFD9AD"></stop>
262+
<stop offset=".635" stopColor="#EAFABD"></stop>
263+
<stop offset=".673" stopColor="#E7FFBF"></stop>
264+
<stop offset="1" stopColor="#75D9DD"></stop>
265+
</linearGradient>
266+
<linearGradient
267+
gradientUnits="userSpaceOnUse"
268+
id={m.id}
269+
x1="16.238"
270+
x2="5.74"
271+
y1="18.125"
272+
y2="17.604"
273+
>
274+
<stop offset=".005" stopColor="#6F69F4"></stop>
275+
<stop offset=".33" stopColor="#FFECEC"></stop>
276+
<stop offset=".591" stopColor="#EDFACB"></stop>
277+
<stop offset=".673" stopColor="#E7FFBF"></stop>
278+
<stop offset=".972" stopColor="#75D9DD"></stop>
279+
</linearGradient>
280+
<linearGradient
281+
gradientUnits="userSpaceOnUse"
282+
id={n.id}
283+
x1="6.495"
284+
x2="16.17"
285+
y1="19.842"
286+
y2="19.331"
287+
>
288+
<stop offset=".005" stopColor="#6F69F4"></stop>
289+
<stop offset=".33" stopColor="#FFECEC"></stop>
290+
<stop offset=".591" stopColor="#EDFACB"></stop>
291+
<stop offset=".673" stopColor="#E7FFBF"></stop>
292+
<stop offset=".972" stopColor="#75D9DD"></stop>
293+
</linearGradient>
294+
<linearGradient
295+
gradientUnits="userSpaceOnUse"
296+
id={o.id}
297+
x1="14.758"
298+
x2="6.674"
299+
y1="15.723"
300+
y2="13.663"
301+
>
302+
<stop offset=".005" stopColor="#6F69F4"></stop>
303+
<stop offset=".601" stopColor="#FFCEAD"></stop>
304+
<stop offset=".707" stopColor="#EFEFB9"></stop>
305+
<stop offset=".752" stopColor="#E7FFBF"></stop>
306+
<stop offset=".976" stopColor="#75D9DD"></stop>
307+
</linearGradient>
308+
<linearGradient
309+
gradientUnits="userSpaceOnUse"
310+
id={p.id}
311+
x1="19.991"
312+
x2="18.135"
313+
y1="8.304"
314+
y2="17.695"
315+
>
316+
<stop stopColor="#8890F4"></stop>
317+
<stop offset=".425" stopColor="#FFB8FD"></stop>
318+
<stop offset=".549" stopColor="#F4D9FE"></stop>
319+
<stop offset=".673" stopColor="#E7FFFF"></stop>
320+
<stop offset="1" stopColor="#75D9DD"></stop>
321+
</linearGradient>
322+
<linearGradient
323+
gradientUnits="userSpaceOnUse"
324+
id={q.id}
325+
x1="19.82"
326+
x2="21.593"
327+
y1="13.96"
328+
y2="7.421"
329+
>
330+
<stop offset=".005" stopColor="#6F69F4"></stop>
331+
<stop offset=".329" stopColor="#FFCEAD"></stop>
332+
<stop offset=".571" stopColor="#EFEFB9"></stop>
333+
<stop offset=".673" stopColor="#E7FFBF"></stop>
334+
<stop offset="1" stopColor="#75D9DD"></stop>
335+
</linearGradient>
336+
</defs>
337+
</svg>
338+
);
339+
});
340+
341+
export default Icon;

src/CogVideo/components/Combine.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { memo } from 'react';
2+
3+
import IconCombine, { type IconCombineProps } from '@/features/IconCombine';
4+
5+
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
6+
import Color from './Color';
7+
import Mono from './Mono';
8+
import Text from './Text';
9+
10+
export interface CombineProps extends Omit<IconCombineProps, 'Icon' | 'Text'> {
11+
type?: 'color' | 'mono';
12+
}
13+
const Combine = memo<CombineProps>(({ type = 'mono', ...rest }) => {
14+
const Icon = type === 'color' ? Color : Mono;
15+
16+
return (
17+
<IconCombine
18+
Icon={Icon}
19+
Text={Text}
20+
aria-label={TITLE}
21+
spaceMultiple={SPACE_MULTIPLE}
22+
textMultiple={TEXT_MULTIPLE}
23+
{...rest}
24+
/>
25+
);
26+
});
27+
28+
export default Combine;

0 commit comments

Comments
 (0)