@runwayml/avatars-react 0.10.0-beta.1 → 0.11.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/README.md +8 -5
- package/dist/index.cjs +93 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +94 -57
- package/dist/index.js.map +1 -1
- package/dist/styles.css +121 -18
- package/package.json +3 -3
package/dist/styles.css
CHANGED
|
@@ -2,11 +2,30 @@
|
|
|
2
2
|
[data-avatar-call] {
|
|
3
3
|
--avatar-bg-connecting: #1a1a1a;
|
|
4
4
|
--avatar-radius: 16px;
|
|
5
|
-
--avatar-control-bg: rgba(255, 255, 255, 0.
|
|
6
|
-
--avatar-control-bg-hover: rgba(255, 255, 255, 0.
|
|
7
|
-
--avatar-control-
|
|
8
|
-
--avatar-
|
|
9
|
-
--avatar-
|
|
5
|
+
--avatar-control-bg: rgba(255, 255, 255, 0.08);
|
|
6
|
+
--avatar-control-bg-hover: rgba(255, 255, 255, 0.15);
|
|
7
|
+
--avatar-control-bg-off: rgba(255, 255, 255, 0.05);
|
|
8
|
+
--avatar-control-color-off: rgba(255, 255, 255, 0.5);
|
|
9
|
+
--avatar-control-size: 40px;
|
|
10
|
+
--avatar-end-call-bg: #ff552f;
|
|
11
|
+
--avatar-end-call-bg-hover: #e64a28;
|
|
12
|
+
--avatar-screen-share-indicator-bg:
|
|
13
|
+
linear-gradient(
|
|
14
|
+
|
|
15
|
+
90deg,
|
|
16
|
+
rgba(0, 0, 0, 0.5),
|
|
17
|
+
rgba(0, 0, 0, 0.5) ),
|
|
18
|
+
linear-gradient(
|
|
19
|
+
|
|
20
|
+
90deg,
|
|
21
|
+
rgba(255, 255, 255, 0.1),
|
|
22
|
+
rgba(255, 255, 255, 0.1) );
|
|
23
|
+
--avatar-screen-share-indicator-border: rgba(255, 255, 255, 0.06);
|
|
24
|
+
--avatar-screen-share-stop-color: #ff552f;
|
|
25
|
+
--avatar-screen-share-stop-bg-hover: rgba(255, 85, 47, 0.1);
|
|
26
|
+
--avatar-screen-share-active-bg: #ffffff;
|
|
27
|
+
--avatar-screen-share-active-color: #000000;
|
|
28
|
+
--avatar-screen-share-active-bg-hover: rgba(255, 255, 255, 0.85);
|
|
10
29
|
--avatar-text-color: #ffffff;
|
|
11
30
|
--avatar-text-secondary: rgba(255, 255, 255, 0.7);
|
|
12
31
|
--avatar-pip-size: 120px;
|
|
@@ -60,8 +79,9 @@
|
|
|
60
79
|
bottom: 0;
|
|
61
80
|
left: 0;
|
|
62
81
|
right: 0;
|
|
63
|
-
padding:
|
|
82
|
+
padding: 16px;
|
|
64
83
|
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
65
85
|
align-items: center;
|
|
66
86
|
justify-content: center;
|
|
67
87
|
gap: 12px;
|
|
@@ -74,7 +94,74 @@
|
|
|
74
94
|
}
|
|
75
95
|
@media (max-width: 480px) {
|
|
76
96
|
[data-avatar-control-bar] {
|
|
77
|
-
padding:
|
|
97
|
+
padding: 12px;
|
|
98
|
+
gap: 8px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
[data-avatar-share-indicator] {
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: 12px;
|
|
105
|
+
padding: 8px 12px;
|
|
106
|
+
max-width: calc(100% - 32px);
|
|
107
|
+
border: 1px solid var(--avatar-screen-share-indicator-border);
|
|
108
|
+
border-radius: 999px;
|
|
109
|
+
background: var(--avatar-screen-share-indicator-bg);
|
|
110
|
+
backdrop-filter: blur(20px);
|
|
111
|
+
-webkit-backdrop-filter: blur(20px);
|
|
112
|
+
color: var(--avatar-text-color);
|
|
113
|
+
}
|
|
114
|
+
[data-avatar-share-label] {
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
line-height: 20px;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
}
|
|
119
|
+
[data-avatar-share-actions] {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 0;
|
|
123
|
+
}
|
|
124
|
+
[data-avatar-share-action] {
|
|
125
|
+
padding: 6px 10px;
|
|
126
|
+
border: none;
|
|
127
|
+
border-radius: 999px;
|
|
128
|
+
background: transparent;
|
|
129
|
+
color: inherit;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
line-height: 20px;
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
[data-avatar-share-action=stop] {
|
|
135
|
+
color: var(--avatar-screen-share-stop-color);
|
|
136
|
+
}
|
|
137
|
+
[data-avatar-share-action=stop]:hover {
|
|
138
|
+
background: var(--avatar-screen-share-stop-bg-hover);
|
|
139
|
+
}
|
|
140
|
+
[data-avatar-share-action]:focus-visible {
|
|
141
|
+
outline: 2px solid var(--avatar-text-color);
|
|
142
|
+
outline-offset: 2px;
|
|
143
|
+
}
|
|
144
|
+
@media (max-width: 480px) {
|
|
145
|
+
[data-avatar-share-indicator] {
|
|
146
|
+
flex-wrap: wrap;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
gap: 8px;
|
|
149
|
+
padding: 8px 10px;
|
|
150
|
+
max-width: calc(100% - 24px);
|
|
151
|
+
}
|
|
152
|
+
[data-avatar-share-label] {
|
|
153
|
+
white-space: normal;
|
|
154
|
+
text-align: center;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
[data-avatar-controls] {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
gap: 12px;
|
|
162
|
+
}
|
|
163
|
+
@media (max-width: 480px) {
|
|
164
|
+
[data-avatar-controls] {
|
|
78
165
|
gap: 8px;
|
|
79
166
|
}
|
|
80
167
|
}
|
|
@@ -85,20 +172,25 @@
|
|
|
85
172
|
width: var(--avatar-control-size);
|
|
86
173
|
height: var(--avatar-control-size);
|
|
87
174
|
border-radius: 50%;
|
|
88
|
-
border:
|
|
175
|
+
border: 1px solid rgba(255, 255, 255, 0.03);
|
|
89
176
|
background: var(--avatar-control-bg);
|
|
177
|
+
backdrop-filter: blur(20px);
|
|
178
|
+
-webkit-backdrop-filter: blur(20px);
|
|
90
179
|
color: var(--avatar-text-color);
|
|
91
180
|
cursor: pointer;
|
|
92
|
-
transition:
|
|
181
|
+
transition:
|
|
182
|
+
background-color 0.15s ease,
|
|
183
|
+
color 0.15s ease,
|
|
184
|
+
border-color 0.15s ease;
|
|
93
185
|
}
|
|
94
186
|
@media (max-width: 480px) {
|
|
95
187
|
[data-avatar-control] {
|
|
96
|
-
width:
|
|
97
|
-
height:
|
|
188
|
+
width: 36px;
|
|
189
|
+
height: 36px;
|
|
98
190
|
}
|
|
99
191
|
[data-avatar-control] svg {
|
|
100
|
-
width:
|
|
101
|
-
height:
|
|
192
|
+
width: 14px;
|
|
193
|
+
height: 14px;
|
|
102
194
|
}
|
|
103
195
|
}
|
|
104
196
|
[data-avatar-control]:hover {
|
|
@@ -109,8 +201,18 @@
|
|
|
109
201
|
outline-offset: 2px;
|
|
110
202
|
}
|
|
111
203
|
[data-avatar-control][data-avatar-enabled=false] {
|
|
112
|
-
background:
|
|
113
|
-
color:
|
|
204
|
+
background: var(--avatar-control-bg-off);
|
|
205
|
+
color: var(--avatar-control-color-off);
|
|
206
|
+
}
|
|
207
|
+
[data-avatar-control][data-avatar-enabled=false]:hover {
|
|
208
|
+
background: var(--avatar-control-bg);
|
|
209
|
+
}
|
|
210
|
+
[data-avatar-control=screen-share][data-avatar-enabled=true] {
|
|
211
|
+
background: var(--avatar-screen-share-active-bg);
|
|
212
|
+
color: var(--avatar-screen-share-active-color);
|
|
213
|
+
}
|
|
214
|
+
[data-avatar-control=screen-share][data-avatar-enabled=true]:hover {
|
|
215
|
+
background: var(--avatar-screen-share-active-bg-hover);
|
|
114
216
|
}
|
|
115
217
|
[data-avatar-control=end-call] {
|
|
116
218
|
background: var(--avatar-end-call-bg);
|
|
@@ -168,10 +270,11 @@
|
|
|
168
270
|
display: none;
|
|
169
271
|
}
|
|
170
272
|
[data-avatar-screen-share] {
|
|
171
|
-
|
|
172
|
-
|
|
273
|
+
flex: 1;
|
|
274
|
+
width: 100%;
|
|
275
|
+
min-height: 0;
|
|
173
276
|
background: #000;
|
|
174
|
-
z-index:
|
|
277
|
+
z-index: 0;
|
|
175
278
|
}
|
|
176
279
|
[data-avatar-screen-share] video {
|
|
177
280
|
width: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runwayml/avatars-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "React SDK for real-time AI avatar interactions with GWM-1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"*.css"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"dev": "tsup --watch",
|
|
48
|
-
"build": "tsup",
|
|
47
|
+
"dev": "mkdir -p dist && cp src/styles.css dist/styles.css && tsup --watch",
|
|
48
|
+
"build": "bun run clean && tsup",
|
|
49
49
|
"clean": "rm -rf dist",
|
|
50
50
|
"test": "vitest run",
|
|
51
51
|
"test:watch": "vitest",
|