@vivix-labs/dashboard-projects 0.0.0-stage → 1.0.0-beta.2
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/Inter-LICENSE.txt +93 -0
- package/dist/UI-LICENSE.txt +21 -0
- package/dist/client-code.css +113 -0
- package/dist/client-code.js +665 -0
- package/dist/client.js +3 -0
- package/package.json +19 -3
- package/studio-plugin.json +8 -0
- package/README.md +0 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 VIVIX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* packages/dashboard-projects/src/card.css */
|
|
2
|
+
.studio-home-panel {
|
|
3
|
+
--home-panel-inset: 16px;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
background: var(--vx-background-dialog);
|
|
7
|
+
}
|
|
8
|
+
.studio-home-panel > header {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
min-height: 44px;
|
|
14
|
+
padding: 0 var(--home-panel-inset);
|
|
15
|
+
}
|
|
16
|
+
.studio-home-panel > header h2 {
|
|
17
|
+
margin: 0;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
}
|
|
20
|
+
.studio-home-grid {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, max(150px, calc((100% - 32px) / 5))), 1fr));
|
|
23
|
+
gap: 8px;
|
|
24
|
+
padding: 0 var(--home-panel-inset) var(--home-panel-inset);
|
|
25
|
+
}
|
|
26
|
+
.studio-home-tile {
|
|
27
|
+
display: grid;
|
|
28
|
+
align-content: start;
|
|
29
|
+
text-align: start;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
width: 100%;
|
|
33
|
+
color: inherit;
|
|
34
|
+
font: inherit;
|
|
35
|
+
background: transparent;
|
|
36
|
+
border: 0;
|
|
37
|
+
padding: 0;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
.studio-home-tile:disabled {
|
|
41
|
+
opacity: 0.5;
|
|
42
|
+
cursor: default;
|
|
43
|
+
}
|
|
44
|
+
.studio-home-tile strong,
|
|
45
|
+
.studio-home-tile small {
|
|
46
|
+
display: block;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
}
|
|
51
|
+
.studio-home-tile small {
|
|
52
|
+
color: var(--vx-text-secondary);
|
|
53
|
+
}
|
|
54
|
+
.studio-home-cover {
|
|
55
|
+
position: relative;
|
|
56
|
+
display: grid;
|
|
57
|
+
width: 100%;
|
|
58
|
+
aspect-ratio: 16 / 9;
|
|
59
|
+
place-items: center;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
background: var(--vx-surface-input);
|
|
63
|
+
color: var(--vx-text-placeholder);
|
|
64
|
+
}
|
|
65
|
+
.studio-home-cover img,
|
|
66
|
+
.studio-home-cover video {
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset: 0;
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
object-fit: contain;
|
|
72
|
+
}
|
|
73
|
+
.studio-home-cover:has(img, video) {
|
|
74
|
+
background: #151515;
|
|
75
|
+
}
|
|
76
|
+
.studio-home-create .studio-home-cover {
|
|
77
|
+
border: 1px dashed var(--vx-border-secondary);
|
|
78
|
+
background: var(--vx-surface-input);
|
|
79
|
+
}
|
|
80
|
+
.studio-home-create .studio-home-cover > span {
|
|
81
|
+
display: grid;
|
|
82
|
+
place-items: center;
|
|
83
|
+
inline-size: 24px;
|
|
84
|
+
block-size: 24px;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
background: var(--vx-background-dialog);
|
|
87
|
+
}
|
|
88
|
+
.studio-home-create-form {
|
|
89
|
+
display: grid;
|
|
90
|
+
gap: var(--vx-space-16);
|
|
91
|
+
}
|
|
92
|
+
.studio-home-create-field {
|
|
93
|
+
display: grid;
|
|
94
|
+
gap: var(--vx-space-8);
|
|
95
|
+
color: var(--vx-text-secondary);
|
|
96
|
+
font: var(--vx-typography-inter-14-regular);
|
|
97
|
+
}
|
|
98
|
+
.studio-home-create-form p {
|
|
99
|
+
margin: 0;
|
|
100
|
+
color: var(--vx-text-secondary-readable);
|
|
101
|
+
}
|
|
102
|
+
.studio-home-view-all.vx-button {
|
|
103
|
+
background: transparent;
|
|
104
|
+
color: var(--vx-state-success);
|
|
105
|
+
}
|
|
106
|
+
@media (max-width: 660px) {
|
|
107
|
+
.studio-home-panel {
|
|
108
|
+
--home-panel-inset: 12px;
|
|
109
|
+
}
|
|
110
|
+
.studio-home-grid {
|
|
111
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
// packages/dashboard-projects/src/client.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { z } from "vivix-studio/sdk/shared";
|
|
4
|
+
|
|
5
|
+
// packages/ui-system/dist/button.js
|
|
6
|
+
import { jsx as _jsx2, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
// packages/ui-system/dist/icon.js
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var iconGeometry = {
|
|
11
|
+
add: {
|
|
12
|
+
width: 16,
|
|
13
|
+
height: 16,
|
|
14
|
+
slot: 16
|
|
15
|
+
},
|
|
16
|
+
check: {
|
|
17
|
+
width: 12,
|
|
18
|
+
height: 12,
|
|
19
|
+
slot: 12
|
|
20
|
+
},
|
|
21
|
+
"check-on-content": {
|
|
22
|
+
width: 12,
|
|
23
|
+
height: 12,
|
|
24
|
+
slot: 12
|
|
25
|
+
},
|
|
26
|
+
"chevron-up": {
|
|
27
|
+
width: 12,
|
|
28
|
+
height: 12,
|
|
29
|
+
slot: 12
|
|
30
|
+
},
|
|
31
|
+
expand: {
|
|
32
|
+
width: 16,
|
|
33
|
+
height: 16,
|
|
34
|
+
slot: 16
|
|
35
|
+
},
|
|
36
|
+
"chevron-down": {
|
|
37
|
+
width: 12,
|
|
38
|
+
height: 12,
|
|
39
|
+
slot: 12
|
|
40
|
+
},
|
|
41
|
+
clear: {
|
|
42
|
+
width: 14.5332,
|
|
43
|
+
height: 14.5332,
|
|
44
|
+
slot: 16
|
|
45
|
+
},
|
|
46
|
+
grid: {
|
|
47
|
+
width: 13.2039,
|
|
48
|
+
height: 13.2,
|
|
49
|
+
slot: 16
|
|
50
|
+
},
|
|
51
|
+
list: {
|
|
52
|
+
width: 13.3372,
|
|
53
|
+
height: 12.0039,
|
|
54
|
+
slot: 16
|
|
55
|
+
},
|
|
56
|
+
search: {
|
|
57
|
+
width: 13.2,
|
|
58
|
+
height: 13.2,
|
|
59
|
+
slot: 16
|
|
60
|
+
},
|
|
61
|
+
calendar: {
|
|
62
|
+
width: 16,
|
|
63
|
+
height: 16,
|
|
64
|
+
slot: 16
|
|
65
|
+
},
|
|
66
|
+
import: {
|
|
67
|
+
width: 16,
|
|
68
|
+
height: 16,
|
|
69
|
+
slot: 16
|
|
70
|
+
},
|
|
71
|
+
magic: {
|
|
72
|
+
width: 14.0625,
|
|
73
|
+
height: 15.5625,
|
|
74
|
+
slot: 18
|
|
75
|
+
},
|
|
76
|
+
select: {
|
|
77
|
+
width: 14.6298,
|
|
78
|
+
height: 16.065,
|
|
79
|
+
slot: 18
|
|
80
|
+
},
|
|
81
|
+
area: {
|
|
82
|
+
width: 16.125,
|
|
83
|
+
height: 16.125,
|
|
84
|
+
slot: 18
|
|
85
|
+
},
|
|
86
|
+
draw: {
|
|
87
|
+
width: 16.125,
|
|
88
|
+
height: 16.125,
|
|
89
|
+
slot: 18
|
|
90
|
+
},
|
|
91
|
+
close: {
|
|
92
|
+
width: 18,
|
|
93
|
+
height: 18,
|
|
94
|
+
slot: 18
|
|
95
|
+
},
|
|
96
|
+
reset: {
|
|
97
|
+
width: 16.35,
|
|
98
|
+
height: 16.35,
|
|
99
|
+
slot: 18
|
|
100
|
+
},
|
|
101
|
+
more: {
|
|
102
|
+
width: 16,
|
|
103
|
+
height: 16,
|
|
104
|
+
slot: 16
|
|
105
|
+
},
|
|
106
|
+
play: {
|
|
107
|
+
width: 12.381,
|
|
108
|
+
height: 13.2143,
|
|
109
|
+
slot: 20
|
|
110
|
+
},
|
|
111
|
+
pause: {
|
|
112
|
+
width: 14.1905,
|
|
113
|
+
height: 14.1905,
|
|
114
|
+
slot: 20
|
|
115
|
+
},
|
|
116
|
+
mute: {
|
|
117
|
+
width: 17.5239,
|
|
118
|
+
height: 14.1922,
|
|
119
|
+
slot: 20
|
|
120
|
+
},
|
|
121
|
+
volume: {
|
|
122
|
+
width: 17.5239,
|
|
123
|
+
height: 14.1922,
|
|
124
|
+
slot: 20
|
|
125
|
+
},
|
|
126
|
+
fullscreen: {
|
|
127
|
+
width: 20,
|
|
128
|
+
height: 20,
|
|
129
|
+
slot: 20
|
|
130
|
+
},
|
|
131
|
+
"placeholder-image": {
|
|
132
|
+
width: 20,
|
|
133
|
+
height: 20,
|
|
134
|
+
slot: 20
|
|
135
|
+
},
|
|
136
|
+
"placeholder-video": {
|
|
137
|
+
width: 17.9199,
|
|
138
|
+
height: 16.2506,
|
|
139
|
+
slot: 20
|
|
140
|
+
},
|
|
141
|
+
"placeholder-audio": {
|
|
142
|
+
width: 17.5017,
|
|
143
|
+
height: 17.4992,
|
|
144
|
+
slot: 20
|
|
145
|
+
},
|
|
146
|
+
"placeholder-script": {
|
|
147
|
+
width: 17.0834,
|
|
148
|
+
height: 17.0837,
|
|
149
|
+
slot: 20
|
|
150
|
+
},
|
|
151
|
+
export: {
|
|
152
|
+
width: 11.8667,
|
|
153
|
+
height: 13.2,
|
|
154
|
+
slot: 16
|
|
155
|
+
},
|
|
156
|
+
edit: {
|
|
157
|
+
width: 10.8791,
|
|
158
|
+
height: 12.0459,
|
|
159
|
+
slot: 14
|
|
160
|
+
},
|
|
161
|
+
"play-cover": {
|
|
162
|
+
width: 12.9167,
|
|
163
|
+
height: 13.7501,
|
|
164
|
+
slot: 20
|
|
165
|
+
},
|
|
166
|
+
"playback-play": {
|
|
167
|
+
width: 13.29564,
|
|
168
|
+
height: 14.1905,
|
|
169
|
+
slot: 20
|
|
170
|
+
},
|
|
171
|
+
"playback-play-large": {
|
|
172
|
+
width: 15.95477,
|
|
173
|
+
height: 17.0286,
|
|
174
|
+
slot: 24
|
|
175
|
+
},
|
|
176
|
+
"pause-large": {
|
|
177
|
+
width: 17.0286,
|
|
178
|
+
height: 17.0286,
|
|
179
|
+
slot: 24
|
|
180
|
+
},
|
|
181
|
+
"volume-large": {
|
|
182
|
+
width: 21.02868,
|
|
183
|
+
height: 17.03064,
|
|
184
|
+
slot: 24
|
|
185
|
+
},
|
|
186
|
+
"mute-large": {
|
|
187
|
+
width: 21.0286,
|
|
188
|
+
height: 17.0307,
|
|
189
|
+
slot: 24
|
|
190
|
+
},
|
|
191
|
+
"fullscreen-large": {
|
|
192
|
+
width: 24,
|
|
193
|
+
height: 24,
|
|
194
|
+
slot: 24
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
function Icon({ name, size }) {
|
|
198
|
+
const geometry = iconGeometry[name];
|
|
199
|
+
const style = {
|
|
200
|
+
...geometry && {
|
|
201
|
+
"--vx-icon-native-size": `${geometry.slot}px`,
|
|
202
|
+
"--vx-icon-width": `${geometry.width / geometry.slot * 100}%`,
|
|
203
|
+
"--vx-icon-height": `${geometry.height / geometry.slot * 100}%`
|
|
204
|
+
},
|
|
205
|
+
...size === void 0 ? {} : { "--vx-icon-size": `${size}px` }
|
|
206
|
+
};
|
|
207
|
+
return _jsx("span", { "aria-hidden": "true", className: "vx-icon", "data-icon": name, style });
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// packages/ui-system/dist/button-variants.js
|
|
211
|
+
var buttonVariants = {
|
|
212
|
+
"text-filled-sm": { size: 32, appearance: "filled", shape: "text", width: 215 },
|
|
213
|
+
"text-filled-leading-sm": { size: 32, appearance: "filled", shape: "text" },
|
|
214
|
+
"text-ghost-sm": { size: 32, appearance: "ghost", shape: "text" },
|
|
215
|
+
"text-on-content-sm": { size: 32, appearance: "on-content", shape: "text" },
|
|
216
|
+
"text-tonal-sm": { size: 32, appearance: "tonal", shape: "text" },
|
|
217
|
+
// The medium recipes are shared by all dialog footer actions.
|
|
218
|
+
"text-filled-md": { size: 40, appearance: "filled", shape: "text" },
|
|
219
|
+
"text-tonal-md": { size: 40, appearance: "tonal", shape: "text" },
|
|
220
|
+
"text-ghost-md": { size: 40, appearance: "ghost", shape: "text" },
|
|
221
|
+
"icon-ghost-md": { size: 40, appearance: "ghost", shape: "icon" },
|
|
222
|
+
"text-filled-lg": { size: 44, appearance: "filled", shape: "text", width: 412 },
|
|
223
|
+
"text-tonal-lg": { size: 44, appearance: "tonal", shape: "text", width: 412 },
|
|
224
|
+
"text-outline-lg": {
|
|
225
|
+
size: 44,
|
|
226
|
+
appearance: "outline",
|
|
227
|
+
shape: "text",
|
|
228
|
+
width: 412
|
|
229
|
+
},
|
|
230
|
+
"pill-filled": { size: 44, appearance: "filled", shape: "pill" },
|
|
231
|
+
"pill-plain": { size: 48, appearance: "plain", shape: "pill" },
|
|
232
|
+
"pill-small": { size: 32, appearance: "plain", shape: "pill" },
|
|
233
|
+
"icon-outline-sm": { size: 32, appearance: "outline", shape: "icon" },
|
|
234
|
+
"icon-on-content": { size: 24, appearance: "on-content", shape: "icon" },
|
|
235
|
+
"icon-outline-lg": { size: 48, appearance: "outline", shape: "icon" },
|
|
236
|
+
// Compact bare action: reuse the transparent/default and surface-hover ghost treatment.
|
|
237
|
+
"icon-bare-xs": { size: 24, appearance: "ghost", shape: "icon" },
|
|
238
|
+
"icon-ghost-sm": { size: 32, appearance: "ghost", shape: "icon" },
|
|
239
|
+
"icon-ghost-lg": { size: 48, appearance: "ghost", shape: "icon" },
|
|
240
|
+
"icon-circle-sm": { size: 32, appearance: "filled", shape: "circle" },
|
|
241
|
+
"icon-circle-lg": { size: 44, appearance: "filled", shape: "circle" }
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// packages/ui-system/dist/button.js
|
|
245
|
+
function ButtonFrame({ label, variant, loading = false, width, children, disabled, type = "button", style, className, ...props }) {
|
|
246
|
+
const spec = buttonVariants[variant];
|
|
247
|
+
const buttonStyle = "width" in spec ? { ...style, "--vx-button-width": `${spec.width}px` } : style;
|
|
248
|
+
return _jsxs("button", { ...props, type, className: className ? `vx-button ${className}` : "vx-button", "data-variant": variant, "data-appearance": spec.appearance, "data-shape": spec.shape, "data-size": spec.size, "data-width": width, "data-state": loading ? "loading" : disabled ? "disabled" : "default", style: buttonStyle, disabled: disabled || loading, "aria-label": label, "aria-busy": loading || void 0, children: [_jsx2("span", { className: "vx-button-content", children }), loading && _jsx2("span", { className: "vx-button-loading", "aria-hidden": "true" })] });
|
|
249
|
+
}
|
|
250
|
+
function Button({ variant = "text-filled-sm", leadingIcon, trailingIcon, ...props }) {
|
|
251
|
+
return _jsxs(ButtonFrame, { ...props, variant, children: [leadingIcon && _jsx2(Icon, { name: leadingIcon }), _jsx2("span", { className: "vx-button-label", children: props.label }), trailingIcon && _jsx2("span", { className: "vx-button-trailing", children: _jsx2(Icon, { name: trailingIcon }) })] });
|
|
252
|
+
}
|
|
253
|
+
function IconButton({ icon, variant = "icon-ghost-sm", ...props }) {
|
|
254
|
+
return _jsx2(ButtonFrame, { ...props, variant, children: _jsx2(Icon, { name: icon }) });
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// packages/ui-system/dist/segmented-control.js
|
|
258
|
+
import { jsx as _jsx3, jsxs as _jsxs2 } from "react/jsx-runtime";
|
|
259
|
+
import { useId } from "react";
|
|
260
|
+
function SegmentedControl({ label, items, value, onValueChange, size = "medium", width = "fixed", iconOnly = false }) {
|
|
261
|
+
const id = useId();
|
|
262
|
+
return _jsx3("div", { role: "radiogroup", "aria-label": label, className: "vx-segment", "data-size": size, "data-width": width, "data-icon-only": iconOnly, children: items.map((item) => _jsxs2("label", { children: [_jsx3("input", { type: "radio", name: id, value: item.value, disabled: item.disabled, checked: item.value === value, "aria-label": item.label, onChange: () => onValueChange(item.value) }), _jsxs2("span", { className: "vx-segment-item", children: [item.icon && _jsx3(Icon, { name: item.icon }), (!iconOnly || !item.icon) && item.label] })] }, item.value)) });
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// packages/ui-system/dist/input.js
|
|
266
|
+
import { jsx as _jsx4, jsxs as _jsxs3 } from "react/jsx-runtime";
|
|
267
|
+
function TextInput({ label, value, onValueChange, size = "medium", ...props }) {
|
|
268
|
+
return _jsxs3("label", { className: "vx-field", "data-size": size, children: [_jsx4("span", { children: label }), _jsx4("input", { ...props, type: "text", value, onChange: (event) => onValueChange(event.currentTarget.value) })] });
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// packages/ui-system/dist/dialog.js
|
|
272
|
+
import { jsx as _jsx5, jsxs as _jsxs4, Fragment as _Fragment } from "react/jsx-runtime";
|
|
273
|
+
import { useId as useId2, useLayoutEffect, useRef, useState } from "react";
|
|
274
|
+
import { createPortal } from "react-dom";
|
|
275
|
+
|
|
276
|
+
// packages/ui-system/dist/dialog-surface.js
|
|
277
|
+
function createDialogSurface(anchor) {
|
|
278
|
+
const source = anchor.ownerDocument;
|
|
279
|
+
let target;
|
|
280
|
+
try {
|
|
281
|
+
target = source.defaultView?.top?.document ?? source;
|
|
282
|
+
} catch {
|
|
283
|
+
return void 0;
|
|
284
|
+
}
|
|
285
|
+
if (target === source)
|
|
286
|
+
return void 0;
|
|
287
|
+
const host = target.createElement("div");
|
|
288
|
+
host.dataset.studioDialogSurface = "";
|
|
289
|
+
const shadow = host.attachShadow({ mode: "open" });
|
|
290
|
+
for (const original of source.querySelectorAll('link[rel="stylesheet"], style')) {
|
|
291
|
+
const clone = original.cloneNode(true);
|
|
292
|
+
if (original.tagName === "LINK")
|
|
293
|
+
clone.setAttribute("href", original.href);
|
|
294
|
+
shadow.append(clone);
|
|
295
|
+
}
|
|
296
|
+
const theme = anchor.closest("[data-vx-theme]");
|
|
297
|
+
const root = target.createElement("div");
|
|
298
|
+
root.dataset.vxTheme = theme?.dataset.vxTheme ?? "light";
|
|
299
|
+
root.className = theme?.className ?? "";
|
|
300
|
+
root.style.display = "contents";
|
|
301
|
+
const style = source.defaultView.getComputedStyle(anchor);
|
|
302
|
+
for (const name of style)
|
|
303
|
+
if (name.startsWith("--"))
|
|
304
|
+
root.style.setProperty(name, style.getPropertyValue(name));
|
|
305
|
+
shadow.append(root);
|
|
306
|
+
let container = root;
|
|
307
|
+
const ancestors = [];
|
|
308
|
+
for (let parent = anchor.parentElement; parent && parent !== theme; parent = parent.parentElement)
|
|
309
|
+
ancestors.unshift(parent);
|
|
310
|
+
for (const original of ancestors) {
|
|
311
|
+
const wrapper = target.createElement("div");
|
|
312
|
+
wrapper.className = original.className;
|
|
313
|
+
for (const { name, value } of original.attributes)
|
|
314
|
+
if (name.startsWith("data-"))
|
|
315
|
+
wrapper.setAttribute(name, value);
|
|
316
|
+
wrapper.style.display = "contents";
|
|
317
|
+
container.append(wrapper);
|
|
318
|
+
container = wrapper;
|
|
319
|
+
}
|
|
320
|
+
target.body.append(host);
|
|
321
|
+
return { root: container, dispose: () => host.remove() };
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// packages/ui-system/dist/dialog.js
|
|
325
|
+
function Dialog({ title, open, onOpenChange, children, actions, className, variant = "default" }) {
|
|
326
|
+
const ref = useRef(null);
|
|
327
|
+
const anchor = useRef(null);
|
|
328
|
+
const [surface, setSurface] = useState();
|
|
329
|
+
const heading = useId2();
|
|
330
|
+
useLayoutEffect(() => {
|
|
331
|
+
if (!open || !anchor.current)
|
|
332
|
+
return;
|
|
333
|
+
const mounted = createDialogSurface(anchor.current);
|
|
334
|
+
const active = anchor.current.getRootNode().activeElement;
|
|
335
|
+
setSurface(mounted?.root ?? null);
|
|
336
|
+
return () => {
|
|
337
|
+
mounted?.dispose();
|
|
338
|
+
setSurface(void 0);
|
|
339
|
+
queueMicrotask(() => {
|
|
340
|
+
if (active?.isConnected)
|
|
341
|
+
active.focus();
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
}, [open]);
|
|
345
|
+
useLayoutEffect(() => {
|
|
346
|
+
const dialog2 = ref.current;
|
|
347
|
+
if (!open || surface === void 0 || !dialog2)
|
|
348
|
+
return;
|
|
349
|
+
dialog2.showModal();
|
|
350
|
+
return () => {
|
|
351
|
+
if (dialog2.open)
|
|
352
|
+
dialog2.close();
|
|
353
|
+
};
|
|
354
|
+
}, [open, surface]);
|
|
355
|
+
const dialog = _jsxs4("dialog", { ref, className: className ? `vx-dialog ${className}` : "vx-dialog", "data-variant": variant === "default" ? void 0 : variant, "aria-labelledby": heading, onCancel: (event) => {
|
|
356
|
+
event.preventDefault();
|
|
357
|
+
event.stopPropagation();
|
|
358
|
+
onOpenChange(false);
|
|
359
|
+
}, onClose: (event) => {
|
|
360
|
+
if (open && event.currentTarget.isConnected && !event.currentTarget.open)
|
|
361
|
+
onOpenChange(false);
|
|
362
|
+
}, children: [_jsxs4("header", { children: [_jsx5("h2", { id: heading, children: title }), _jsx5(IconButton, { icon: "close", label: "Close dialog", onClick: () => onOpenChange(false) })] }), _jsx5("div", { className: "vx-dialog-body", children }), actions && _jsx5("footer", { children: actions })] });
|
|
363
|
+
return _jsxs4(_Fragment, { children: [_jsx5("span", { ref: anchor, hidden: true }), open && (surface ? createPortal(dialog, surface) : dialog)] });
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// packages/dashboard-projects/src/client.tsx
|
|
367
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
368
|
+
var Config = z.object({ studioInstance: z.string().min(1).nullable().default(null) });
|
|
369
|
+
var dependencies = (config) => config.studioInstance ? [config.studioInstance] : [];
|
|
370
|
+
var projectsSql = "SELECT * FROM studio_projects ORDER BY createdAt DESC, rowId ASC";
|
|
371
|
+
function decodeRef(value) {
|
|
372
|
+
let item = value;
|
|
373
|
+
if (typeof item === "string") {
|
|
374
|
+
try {
|
|
375
|
+
item = JSON.parse(item);
|
|
376
|
+
} catch {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return null;
|
|
381
|
+
const ref = item;
|
|
382
|
+
return ["storeId", "objectId", "versionId"].every(
|
|
383
|
+
(key) => typeof ref[key] === "string" && /^[0-9a-f-]{36}$/i.test(ref[key])
|
|
384
|
+
) ? {
|
|
385
|
+
storeId: ref.storeId,
|
|
386
|
+
objectId: ref.objectId,
|
|
387
|
+
versionId: ref.versionId
|
|
388
|
+
} : null;
|
|
389
|
+
}
|
|
390
|
+
var projectTypes = [
|
|
391
|
+
{
|
|
392
|
+
value: "short-drama",
|
|
393
|
+
label: "Short Drama",
|
|
394
|
+
preset: "@vivix-labs/short-drama-workbench:short-drama"
|
|
395
|
+
},
|
|
396
|
+
{ value: "ads", label: "Product Ad", preset: "@vivix-labs/ads-workbench:ads" },
|
|
397
|
+
{ value: "table", label: "Others", preset: "@vivix-labs/studio-workbench:table" }
|
|
398
|
+
];
|
|
399
|
+
function NewProjectDialog({
|
|
400
|
+
client,
|
|
401
|
+
close,
|
|
402
|
+
onCreated
|
|
403
|
+
}) {
|
|
404
|
+
const [type, setType] = React.useState(projectTypes[0].value);
|
|
405
|
+
const [name, setName] = React.useState("");
|
|
406
|
+
const [status, setStatus] = React.useState("");
|
|
407
|
+
const [presets, setPresets] = React.useState();
|
|
408
|
+
const [busy, setBusy] = React.useState(false);
|
|
409
|
+
const request = React.useRef(void 0);
|
|
410
|
+
React.useEffect(() => {
|
|
411
|
+
let active = true;
|
|
412
|
+
if (!client.projects?.presets || !client.projects.create) {
|
|
413
|
+
setStatus("Update Studio CLI to create projects from Home.");
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
void client.projects.presets().then(
|
|
417
|
+
(items) => {
|
|
418
|
+
if (active) setPresets(items);
|
|
419
|
+
},
|
|
420
|
+
(error) => {
|
|
421
|
+
if (active) setStatus(error.message);
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
return () => {
|
|
425
|
+
active = false;
|
|
426
|
+
};
|
|
427
|
+
}, [client]);
|
|
428
|
+
const selection = projectTypes.find((item) => item.value === type);
|
|
429
|
+
const placeholder = type === "table" ? "Untitled Project" : "Untitled " + selection.label;
|
|
430
|
+
const [packageName, presetId] = selection.preset.split(":");
|
|
431
|
+
const preset = presets?.find(
|
|
432
|
+
(item) => item.spec.startsWith(packageName + "@") && item.spec.endsWith(":" + presetId)
|
|
433
|
+
);
|
|
434
|
+
async function create() {
|
|
435
|
+
if (!preset || !client.projects?.create || busy) return;
|
|
436
|
+
const input = {
|
|
437
|
+
name: name.trim() || placeholder,
|
|
438
|
+
preset: preset.spec,
|
|
439
|
+
trust: true,
|
|
440
|
+
allowAccess: [...preset.requiredAccess]
|
|
441
|
+
};
|
|
442
|
+
const intent = JSON.stringify(input);
|
|
443
|
+
if (request.current?.intent !== intent) request.current = { intent, id: crypto.randomUUID() };
|
|
444
|
+
setBusy(true);
|
|
445
|
+
setStatus("");
|
|
446
|
+
try {
|
|
447
|
+
const project = await client.projects.create({ ...input, requestId: request.current.id });
|
|
448
|
+
onCreated(project);
|
|
449
|
+
close();
|
|
450
|
+
} catch (error) {
|
|
451
|
+
setStatus(error instanceof Error ? error.message : String(error));
|
|
452
|
+
} finally {
|
|
453
|
+
setBusy(false);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return /* @__PURE__ */ jsx(
|
|
457
|
+
Dialog,
|
|
458
|
+
{
|
|
459
|
+
title: "Create Projects",
|
|
460
|
+
open: true,
|
|
461
|
+
variant: "create-project",
|
|
462
|
+
className: "studio-home-dialog",
|
|
463
|
+
onOpenChange: (open) => !open && !busy && close(),
|
|
464
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
465
|
+
/* @__PURE__ */ jsx(
|
|
466
|
+
Button,
|
|
467
|
+
{
|
|
468
|
+
label: "Cancel",
|
|
469
|
+
variant: "text-tonal-lg",
|
|
470
|
+
width: "hug",
|
|
471
|
+
disabled: busy,
|
|
472
|
+
onClick: close
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ jsx(
|
|
476
|
+
Button,
|
|
477
|
+
{
|
|
478
|
+
label: busy ? "Creating\u2026" : "Create Project",
|
|
479
|
+
variant: "text-filled-lg",
|
|
480
|
+
width: "hug",
|
|
481
|
+
disabled: busy || !preset,
|
|
482
|
+
onClick: () => void create()
|
|
483
|
+
}
|
|
484
|
+
)
|
|
485
|
+
] }),
|
|
486
|
+
children: /* @__PURE__ */ jsxs("div", { className: "studio-home-create-form", children: [
|
|
487
|
+
/* @__PURE__ */ jsxs("div", { className: "studio-home-create-field", children: [
|
|
488
|
+
/* @__PURE__ */ jsx("span", { children: "Project type" }),
|
|
489
|
+
/* @__PURE__ */ jsx(
|
|
490
|
+
SegmentedControl,
|
|
491
|
+
{
|
|
492
|
+
label: "Project type",
|
|
493
|
+
size: "large",
|
|
494
|
+
width: "full",
|
|
495
|
+
value: type,
|
|
496
|
+
items: projectTypes.map((item) => ({ ...item, disabled: busy })),
|
|
497
|
+
onValueChange: setType
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
] }),
|
|
501
|
+
/* @__PURE__ */ jsx(
|
|
502
|
+
TextInput,
|
|
503
|
+
{
|
|
504
|
+
label: "Project name",
|
|
505
|
+
size: "large",
|
|
506
|
+
value: name,
|
|
507
|
+
onValueChange: setName,
|
|
508
|
+
maxLength: 100,
|
|
509
|
+
disabled: busy,
|
|
510
|
+
placeholder: "Enter project name"
|
|
511
|
+
}
|
|
512
|
+
),
|
|
513
|
+
presets && !preset && /* @__PURE__ */ jsxs("p", { role: "alert", children: [
|
|
514
|
+
"Install the ",
|
|
515
|
+
selection.label,
|
|
516
|
+
" preset to create this project."
|
|
517
|
+
] }),
|
|
518
|
+
status && /* @__PURE__ */ jsx("p", { role: "alert", children: status })
|
|
519
|
+
] })
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
function ProjectCover({ row }) {
|
|
524
|
+
const [failed, setFailed] = React.useState(false);
|
|
525
|
+
const source = typeof row?.previewUrl === "string" && !failed ? row.previewUrl : void 0;
|
|
526
|
+
return /* @__PURE__ */ jsx("span", { className: "studio-home-cover", "aria-hidden": "true", children: source && row?.previewKind === "video" ? /* @__PURE__ */ jsx("video", { src: source, muted: true, playsInline: true, preload: "auto", onError: () => setFailed(true) }) : source ? /* @__PURE__ */ jsx("img", { src: source, alt: "", loading: "lazy", onError: () => setFailed(true) }) : null });
|
|
527
|
+
}
|
|
528
|
+
function ProjectsCard({
|
|
529
|
+
client,
|
|
530
|
+
projects,
|
|
531
|
+
ready,
|
|
532
|
+
openProject,
|
|
533
|
+
openProjects,
|
|
534
|
+
onProjectCreated
|
|
535
|
+
}) {
|
|
536
|
+
const [rows, setRows] = React.useState();
|
|
537
|
+
const [creating, setCreating] = React.useState(false);
|
|
538
|
+
const catalogKey = JSON.stringify(projects);
|
|
539
|
+
React.useEffect(() => {
|
|
540
|
+
if (!ready || !client.config.studioInstance) return;
|
|
541
|
+
let active = true;
|
|
542
|
+
void client.invoke(
|
|
543
|
+
{ instanceId: client.config.studioInstance, operationId: "global.query" },
|
|
544
|
+
{
|
|
545
|
+
source: "projects",
|
|
546
|
+
sql: projectsSql,
|
|
547
|
+
params: [],
|
|
548
|
+
catalog: JSON.parse(catalogKey),
|
|
549
|
+
limit: 5,
|
|
550
|
+
timeoutMs: 8e3,
|
|
551
|
+
offset: 0
|
|
552
|
+
}
|
|
553
|
+
).then(
|
|
554
|
+
async ({ items }) => {
|
|
555
|
+
const next = await Promise.all(
|
|
556
|
+
items.map(async (row) => {
|
|
557
|
+
const ref = decodeRef(row.previewRef ?? row.coverRef);
|
|
558
|
+
if (!ref || !row.available) return row;
|
|
559
|
+
try {
|
|
560
|
+
const { item } = await client.invoke(
|
|
561
|
+
{ instanceId: client.config.studioInstance, operationId: "global.asset" },
|
|
562
|
+
{ ref }
|
|
563
|
+
);
|
|
564
|
+
return {
|
|
565
|
+
...row,
|
|
566
|
+
previewUrl: item.previewUrl ?? null,
|
|
567
|
+
previewKind: item.kind ?? null
|
|
568
|
+
};
|
|
569
|
+
} catch {
|
|
570
|
+
return row;
|
|
571
|
+
}
|
|
572
|
+
})
|
|
573
|
+
);
|
|
574
|
+
if (active) setRows(next);
|
|
575
|
+
},
|
|
576
|
+
() => {
|
|
577
|
+
if (active) setRows([]);
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
return () => {
|
|
581
|
+
active = false;
|
|
582
|
+
};
|
|
583
|
+
}, [client, ready, catalogKey]);
|
|
584
|
+
const list = rows ?? [];
|
|
585
|
+
const entries = (list.length ? list.map((row) => projects.find(({ id }) => id === row.projectId)).filter((entry) => !!entry) : projects.slice(0, 5)).map((project) => {
|
|
586
|
+
const row = list.find((entry) => entry.projectId === project.id);
|
|
587
|
+
return {
|
|
588
|
+
key: project.id,
|
|
589
|
+
row,
|
|
590
|
+
name: String(row?.name ?? project.name),
|
|
591
|
+
note: row?.assetCount !== void 0 ? String(row.assetCount) + " assets" : "",
|
|
592
|
+
enabled: project.available,
|
|
593
|
+
open: () => openProject(project.id)
|
|
594
|
+
};
|
|
595
|
+
});
|
|
596
|
+
return /* @__PURE__ */ jsxs("section", { className: "studio-home-panel", "aria-label": "Project List", children: [
|
|
597
|
+
/* @__PURE__ */ jsxs("header", { children: [
|
|
598
|
+
/* @__PURE__ */ jsx("h2", { children: "Project List" }),
|
|
599
|
+
/* @__PURE__ */ jsx(
|
|
600
|
+
Button,
|
|
601
|
+
{
|
|
602
|
+
label: "View all",
|
|
603
|
+
"aria-label": "View all project list",
|
|
604
|
+
className: "studio-home-view-all",
|
|
605
|
+
variant: "text-tonal-sm",
|
|
606
|
+
onClick: openProjects
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
] }),
|
|
610
|
+
/* @__PURE__ */ jsxs("div", { className: "studio-home-grid", children: [
|
|
611
|
+
/* @__PURE__ */ jsxs(
|
|
612
|
+
"button",
|
|
613
|
+
{
|
|
614
|
+
type: "button",
|
|
615
|
+
className: "studio-home-tile studio-home-create",
|
|
616
|
+
onClick: () => setCreating(true),
|
|
617
|
+
children: [
|
|
618
|
+
/* @__PURE__ */ jsx("span", { className: "studio-home-cover", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(Icon, { name: "add" }) }) }),
|
|
619
|
+
/* @__PURE__ */ jsx("strong", { children: "Create Project" }),
|
|
620
|
+
/* @__PURE__ */ jsx("small", { children: "Create a local project" })
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
entries.map(({ key, row, name, note, enabled, open }) => /* @__PURE__ */ jsxs(
|
|
625
|
+
"button",
|
|
626
|
+
{
|
|
627
|
+
type: "button",
|
|
628
|
+
className: "studio-home-tile",
|
|
629
|
+
onClick: open,
|
|
630
|
+
disabled: !enabled,
|
|
631
|
+
children: [
|
|
632
|
+
/* @__PURE__ */ jsx(ProjectCover, { row }, String(row?.previewUrl ?? "")),
|
|
633
|
+
/* @__PURE__ */ jsx("strong", { title: name, children: name }),
|
|
634
|
+
note && /* @__PURE__ */ jsx("small", { children: note })
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
key
|
|
638
|
+
))
|
|
639
|
+
] }),
|
|
640
|
+
creating && /* @__PURE__ */ jsx(
|
|
641
|
+
NewProjectDialog,
|
|
642
|
+
{
|
|
643
|
+
client,
|
|
644
|
+
close: () => setCreating(false),
|
|
645
|
+
onCreated: (project) => {
|
|
646
|
+
if (onProjectCreated) onProjectCreated(project);
|
|
647
|
+
else openProject(project.id);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
)
|
|
651
|
+
] });
|
|
652
|
+
}
|
|
653
|
+
function activate(client) {
|
|
654
|
+
client.registerUI({
|
|
655
|
+
id: "projects",
|
|
656
|
+
title: "Project List",
|
|
657
|
+
kind: "component",
|
|
658
|
+
component: (props) => /* @__PURE__ */ jsx(ProjectsCard, { ...props, client })
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
export {
|
|
662
|
+
Config,
|
|
663
|
+
activate as default,
|
|
664
|
+
dependencies
|
|
665
|
+
};
|
package/dist/client.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivix-labs/dashboard-projects",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public",
|
|
7
|
+
"registry": "https://registry.npmjs.org/",
|
|
8
|
+
"tag": "beta"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"studio-plugin.json"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
"./client": "./dist/client.js"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"vivix-studio": ">=2.2.0",
|
|
19
|
+
"react": "^19.0.0",
|
|
20
|
+
"react-dom": "^19.0.0"
|
|
21
|
+
}
|
|
6
22
|
}
|
package/README.md
DELETED