@openviking/react 0.0.0-stage → 0.1.1
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 +82 -2
- package/dist/3~0.js +8 -0
- package/dist/a~0.js +21 -0
- package/dist/client/client.d.ts +12 -0
- package/dist/client/errors.d.ts +30 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/options.d.ts +101 -0
- package/dist/client/provider.d.ts +52 -0
- package/dist/client/types.d.ts +160 -0
- package/dist/client.js +239 -0
- package/dist/components/agent-connect/agent-connect.d.ts +4 -0
- package/dist/components/agent-connect/index.d.ts +1 -0
- package/dist/components/agent-connect/style.css +16 -0
- package/dist/components/agent-connect/style.js +0 -0
- package/dist/components/agent-connect/types.d.ts +175 -0
- package/dist/components/agent-connect.js +1 -0
- package/dist/components/file-preview/file-preview-body.d.ts +15 -0
- package/dist/components/file-preview/file-preview-header.d.ts +16 -0
- package/dist/components/file-preview/file-preview-icons.d.ts +2 -0
- package/dist/components/file-preview/file-preview-labels.d.ts +5 -0
- package/dist/components/file-preview/file-preview-operations.d.ts +1 -0
- package/dist/components/file-preview/file-preview.d.ts +17 -0
- package/dist/components/file-preview/index.d.ts +1 -0
- package/dist/components/file-preview/style.css +285 -0
- package/dist/components/file-preview/style.js +0 -0
- package/dist/components/file-preview/types.d.ts +435 -0
- package/dist/components/file-preview/use-file-preview-editing.d.ts +13 -0
- package/dist/components/file-preview.js +442 -0
- package/dist/components/file-tree/file-tree-body.d.ts +14 -0
- package/dist/components/file-tree/file-tree-dom.d.ts +4 -0
- package/dist/components/file-tree/file-tree-entry-row.d.ts +6 -0
- package/dist/components/file-tree/file-tree-icons.d.ts +8 -0
- package/dist/components/file-tree/file-tree-keyboard.d.ts +10 -0
- package/dist/components/file-tree/file-tree-labels.d.ts +5 -0
- package/dist/components/file-tree/file-tree-row-context.d.ts +24 -0
- package/dist/components/file-tree/file-tree-rows.d.ts +12 -0
- package/dist/components/file-tree/file-tree-tooltip.d.ts +11 -0
- package/dist/components/file-tree/file-tree.d.ts +4 -0
- package/dist/components/file-tree/index.d.ts +1 -0
- package/dist/components/file-tree/style.css +244 -0
- package/dist/components/file-tree/style.js +0 -0
- package/dist/components/file-tree/types.d.ts +406 -0
- package/dist/components/file-tree/use-file-tree-actions.d.ts +10 -0
- package/dist/components/file-tree.js +1 -0
- package/dist/components/scope-switcher/index.d.ts +1 -0
- package/dist/components/scope-switcher/scope-keyboard.d.ts +2 -0
- package/dist/components/scope-switcher/scope-panel.d.ts +5 -0
- package/dist/components/scope-switcher/scope-selector.d.ts +2 -0
- package/dist/components/scope-switcher/scope-switcher.d.ts +6 -0
- package/dist/components/scope-switcher/style.css +248 -0
- package/dist/components/scope-switcher/style.js +0 -0
- package/dist/components/scope-switcher/types.d.ts +367 -0
- package/dist/components/scope-switcher.js +3 -0
- package/dist/components/style.css +811 -0
- package/dist/components/style.js +0 -0
- package/dist/components/tui/index.d.ts +1 -0
- package/dist/components/tui/style.css +16 -0
- package/dist/components/tui/style.js +0 -0
- package/dist/components/tui/tui.d.ts +3 -0
- package/dist/components/tui/types.d.ts +485 -0
- package/dist/components/tui.js +1 -0
- package/dist/f~0.js +284 -0
- package/dist/icons/index.d.ts +23 -0
- package/dist/icons.js +25 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +8 -0
- package/dist/i~0.js +21 -0
- package/dist/lk~0.js +220 -0
- package/dist/l~0.js +44 -0
- package/dist/modules/console/console.d.ts +4 -0
- package/dist/modules/console/index.d.ts +1 -0
- package/dist/modules/console/style.css +29 -0
- package/dist/modules/console/style.js +0 -0
- package/dist/modules/console/types.d.ts +101 -0
- package/dist/modules/console.js +1 -0
- package/dist/modules/file-browser/file-browser-toolbar-button.d.ts +10 -0
- package/dist/modules/file-browser/file-browser.d.ts +6 -0
- package/dist/modules/file-browser/index.d.ts +1 -0
- package/dist/modules/file-browser/style.css +75 -0
- package/dist/modules/file-browser/style.js +0 -0
- package/dist/modules/file-browser/types.d.ts +101 -0
- package/dist/modules/file-browser.js +1 -0
- package/dist/modules/scope-cascade/controller.d.ts +6 -0
- package/dist/modules/scope-cascade/index.d.ts +3 -0
- package/dist/modules/scope-cascade/scope-cascade.d.ts +3 -0
- package/dist/modules/scope-cascade/style.css +250 -0
- package/dist/modules/scope-cascade/style.js +0 -0
- package/dist/modules/scope-cascade/types.d.ts +39 -0
- package/dist/modules/scope-cascade/use-scope-cascade.d.ts +5 -0
- package/dist/modules/scope-cascade.js +1 -0
- package/dist/modules/style.css +385 -0
- package/dist/modules/style.js +0 -0
- package/dist/modules/task-center/columns.d.ts +129 -0
- package/dist/modules/task-center/index.d.ts +1 -0
- package/dist/modules/task-center/style.css +29 -0
- package/dist/modules/task-center/style.js +0 -0
- package/dist/modules/task-center/task-center.d.ts +4 -0
- package/dist/modules/task-center/types.d.ts +168 -0
- package/dist/modules/task-center.js +1 -0
- package/dist/n~0.js +499 -0
- package/dist/style.css +1198 -0
- package/dist/style.js +0 -0
- package/dist/u~0.js +8 -0
- package/package.json +103 -4
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
.ov-file-browser__toolbar-button {
|
|
2
|
+
align-items: center;
|
|
3
|
+
gap: var(--ov-ui-space-2, 8px);
|
|
4
|
+
padding: var(--ov-ui-space-2, 8px) var(--ov-ui-space-3, 12px);
|
|
5
|
+
border-radius: var(--ov-ui-radius-sm, 4px);
|
|
6
|
+
color: var(--ov-ui-color-primary, #1664ff);
|
|
7
|
+
font: inherit;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
background: none;
|
|
10
|
+
border: 0;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ov-file-browser__toolbar-button:hover:not(:disabled) {
|
|
15
|
+
background: var(--ov-ui-color-fill-hover, #1664ff14);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ov-file-browser__toolbar-button:focus-visible {
|
|
19
|
+
outline: 2px solid var(--ov-ui-color-focus, #1664ff);
|
|
20
|
+
outline-offset: 2px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ov-file-browser__toolbar-button:disabled {
|
|
24
|
+
color: var(--ov-ui-color-text-disabled, #00000040);
|
|
25
|
+
cursor: not-allowed;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ov-file-browser__toolbar-button-icon {
|
|
29
|
+
flex: none;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ov-file-browser__toolbar-button-label {
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.ov-file-browser__toolbar-actions > * + :before {
|
|
38
|
+
content: "";
|
|
39
|
+
width: 1px;
|
|
40
|
+
height: 16px;
|
|
41
|
+
margin-right: var(--ov-ui-space-2, 8px);
|
|
42
|
+
background: var(--ov-ui-color-border, #0000001f);
|
|
43
|
+
vertical-align: middle;
|
|
44
|
+
display: inline-block;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ov-module-placeholder {
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
border: 1px dashed var(--ov-ui-border, currentColor);
|
|
50
|
+
border-radius: var(--ov-ui-radius, 6px);
|
|
51
|
+
min-width: 0;
|
|
52
|
+
min-height: 160px;
|
|
53
|
+
color: inherit;
|
|
54
|
+
font: inherit;
|
|
55
|
+
text-align: center;
|
|
56
|
+
overflow-wrap: anywhere;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 8px;
|
|
61
|
+
padding: 24px;
|
|
62
|
+
display: flex;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ov-module-placeholder__title {
|
|
66
|
+
margin: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ov-module-placeholder__description {
|
|
70
|
+
color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 75%, transparent));
|
|
71
|
+
margin: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
.ov-module-placeholder {
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
border: 1px dashed var(--ov-ui-border, currentColor);
|
|
79
|
+
border-radius: var(--ov-ui-radius, 6px);
|
|
80
|
+
min-width: 0;
|
|
81
|
+
min-height: 160px;
|
|
82
|
+
color: inherit;
|
|
83
|
+
font: inherit;
|
|
84
|
+
text-align: center;
|
|
85
|
+
overflow-wrap: anywhere;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: 8px;
|
|
90
|
+
padding: 24px;
|
|
91
|
+
display: flex;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ov-module-placeholder__title {
|
|
95
|
+
margin: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ov-module-placeholder__description {
|
|
99
|
+
color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 75%, transparent));
|
|
100
|
+
margin: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
.ov-module-placeholder {
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
border: 1px dashed var(--ov-ui-border, currentColor);
|
|
108
|
+
border-radius: var(--ov-ui-radius, 6px);
|
|
109
|
+
min-width: 0;
|
|
110
|
+
min-height: 160px;
|
|
111
|
+
color: inherit;
|
|
112
|
+
font: inherit;
|
|
113
|
+
text-align: center;
|
|
114
|
+
overflow-wrap: anywhere;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 8px;
|
|
119
|
+
padding: 24px;
|
|
120
|
+
display: flex;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ov-module-placeholder__title {
|
|
124
|
+
margin: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ov-module-placeholder__description {
|
|
128
|
+
color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 75%, transparent));
|
|
129
|
+
margin: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
.ov-scope-switcher {
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
border: 1px solid var(--ov-ui-border, #edeef2);
|
|
137
|
+
background: var(--ov-ui-scope-background, transparent);
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
min-height: 32px;
|
|
140
|
+
color: var(--ov-ui-text, #0b0b0f);
|
|
141
|
+
font-family: var(--ov-ui-font-family, "PingFang SC",
|
|
142
|
+
-apple-system,
|
|
143
|
+
BlinkMacSystemFont,
|
|
144
|
+
"Segoe UI",
|
|
145
|
+
sans-serif);
|
|
146
|
+
letter-spacing: .036px;
|
|
147
|
+
border-radius: 16px;
|
|
148
|
+
flex-wrap: wrap;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: 4px;
|
|
151
|
+
padding: 3px 4px;
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
line-height: 20px;
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ov-scope-switcher *, .ov-scope-switcher :before, .ov-scope-switcher :after {
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ov-scope-switcher__level {
|
|
162
|
+
align-items: center;
|
|
163
|
+
gap: 4px;
|
|
164
|
+
min-width: 0;
|
|
165
|
+
max-width: 100%;
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
position: relative;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ov-scope-switcher__level + .ov-scope-switcher__level:before {
|
|
171
|
+
content: "/";
|
|
172
|
+
color: var(--ov-ui-text-muted, #c9cbd4);
|
|
173
|
+
margin-right: 4px;
|
|
174
|
+
font-size: 13px;
|
|
175
|
+
font-weight: 500;
|
|
176
|
+
line-height: 22px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ov-scope-switcher__trigger {
|
|
180
|
+
max-width: min(260px, 100%);
|
|
181
|
+
height: 24px;
|
|
182
|
+
color: inherit;
|
|
183
|
+
font: inherit;
|
|
184
|
+
vertical-align: middle;
|
|
185
|
+
background: none;
|
|
186
|
+
border: 0;
|
|
187
|
+
border-radius: 99px;
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: 6px;
|
|
190
|
+
padding: 2px 8px;
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
button.ov-scope-switcher__trigger {
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ov-scope-switcher__trigger:hover:not(:disabled), .ov-scope-switcher__trigger[aria-expanded="true"] {
|
|
199
|
+
background: var(--ov-ui-hover, #edeffc);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.ov-scope-switcher__label {
|
|
203
|
+
white-space: nowrap;
|
|
204
|
+
text-overflow: ellipsis;
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.ov-scope-switcher__icon {
|
|
209
|
+
flex: none;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
align-items: center;
|
|
212
|
+
width: 14px;
|
|
213
|
+
height: 14px;
|
|
214
|
+
display: inline-flex;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.ov-scope-switcher__icon img {
|
|
218
|
+
display: block;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.ov-scope-switcher__tag {
|
|
222
|
+
color: var(--ov-ui-text-muted, #9295a5);
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.ov-scope-switcher__arrow {
|
|
227
|
+
flex: 0 0 14px;
|
|
228
|
+
width: 14px;
|
|
229
|
+
height: 14px;
|
|
230
|
+
margin-left: -2px;
|
|
231
|
+
transition: transform .16s;
|
|
232
|
+
display: inline-flex;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.ov-scope-switcher__trigger[aria-expanded="true"] .ov-scope-switcher__arrow {
|
|
236
|
+
transform: rotate(180deg);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@media (prefers-reduced-motion: reduce) {
|
|
240
|
+
.ov-scope-switcher__arrow {
|
|
241
|
+
transition: none;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ov-scope-switcher__panel {
|
|
246
|
+
z-index: 30;
|
|
247
|
+
border: 1px solid var(--ov-ui-border, #edeef2);
|
|
248
|
+
background: var(--ov-ui-surface, #fff);
|
|
249
|
+
width: min(272px, 100vw - 32px);
|
|
250
|
+
max-height: min(540px, 70vh);
|
|
251
|
+
color: var(--ov-ui-text, #0b0b0f);
|
|
252
|
+
letter-spacing: .039px;
|
|
253
|
+
border-radius: 12px;
|
|
254
|
+
padding: 7px;
|
|
255
|
+
font-size: 13px;
|
|
256
|
+
line-height: 22px;
|
|
257
|
+
position: absolute;
|
|
258
|
+
top: calc(100% + 8px);
|
|
259
|
+
left: 0;
|
|
260
|
+
overflow: auto;
|
|
261
|
+
box-shadow: 0 15px 35px -2px #0000000d, 0 5px 15px #0000000d;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ov-scope-switcher__level:last-child:not(:first-child) .ov-scope-switcher__panel {
|
|
265
|
+
left: auto;
|
|
266
|
+
right: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.ov-scope-switcher__search {
|
|
270
|
+
border: 1px solid var(--ov-ui-border, #dfe1e8);
|
|
271
|
+
width: 100%;
|
|
272
|
+
color: inherit;
|
|
273
|
+
font: inherit;
|
|
274
|
+
background: none;
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
margin-bottom: 8px;
|
|
277
|
+
padding: 8px 10px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.ov-scope-switcher__list {
|
|
281
|
+
overscroll-behavior: contain;
|
|
282
|
+
flex-direction: column;
|
|
283
|
+
gap: 4px;
|
|
284
|
+
max-height: 280px;
|
|
285
|
+
display: flex;
|
|
286
|
+
overflow: auto;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.ov-scope-switcher__option {
|
|
290
|
+
width: 100%;
|
|
291
|
+
min-height: 44px;
|
|
292
|
+
color: inherit;
|
|
293
|
+
font: inherit;
|
|
294
|
+
text-align: start;
|
|
295
|
+
cursor: pointer;
|
|
296
|
+
background: none;
|
|
297
|
+
border: 0;
|
|
298
|
+
border-radius: 6px;
|
|
299
|
+
flex-shrink: 0;
|
|
300
|
+
align-items: center;
|
|
301
|
+
gap: 8px;
|
|
302
|
+
padding: 2px 8px;
|
|
303
|
+
display: flex;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.ov-scope-switcher__option:hover:not([aria-disabled="true"]), .ov-scope-switcher__option[aria-selected="true"] {
|
|
307
|
+
background: var(--ov-ui-hover, #f5f7ff);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ov-scope-switcher__option-text {
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
flex: 1;
|
|
313
|
+
min-width: 0;
|
|
314
|
+
display: flex;
|
|
315
|
+
overflow: hidden;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ov-scope-switcher__option-text small {
|
|
319
|
+
color: var(--ov-ui-text-muted, #737889);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ov-scope-switcher__option mark {
|
|
323
|
+
background: var(--ov-ui-highlight, #fff0b3);
|
|
324
|
+
color: inherit;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ov-scope-switcher__check {
|
|
328
|
+
flex: 0 0 16px;
|
|
329
|
+
width: 16px;
|
|
330
|
+
height: 16px;
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ov-scope-switcher__state {
|
|
335
|
+
color: var(--ov-ui-text-muted, #737889);
|
|
336
|
+
padding: 20px 10px;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.ov-scope-switcher button:disabled, .ov-scope-switcher__option[aria-disabled="true"] {
|
|
340
|
+
opacity: .5;
|
|
341
|
+
cursor: not-allowed;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.ov-scope-switcher :focus-visible {
|
|
345
|
+
outline: 2px solid var(--ov-ui-primary, #6256d9);
|
|
346
|
+
outline-offset: 2px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@media (width <= 600px) {
|
|
350
|
+
.ov-scope-switcher__trigger {
|
|
351
|
+
max-width: 210px;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.ov-scope-switcher__panel, .ov-scope-switcher__level:last-child:not(:first-child) .ov-scope-switcher__panel {
|
|
355
|
+
width: auto;
|
|
356
|
+
max-height: 60dvh;
|
|
357
|
+
position: fixed;
|
|
358
|
+
inset: auto 16px 16px;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.ov-scope-switcher__option[aria-selected="true"] {
|
|
363
|
+
font-weight: 500;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.ov-scope-switcher__option-text > span {
|
|
367
|
+
text-overflow: ellipsis;
|
|
368
|
+
white-space: nowrap;
|
|
369
|
+
overflow: hidden;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ov-scope-switcher__option .ov-scope-switcher__icon {
|
|
373
|
+
border: .5px solid var(--ov-ui-border, #edeef2);
|
|
374
|
+
background: var(--ov-ui-surface, #fff);
|
|
375
|
+
border-radius: 50%;
|
|
376
|
+
width: 24px;
|
|
377
|
+
height: 24px;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
File without changes
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 编译目标的定时规则,与原生接口的 `update_schedule` 同形:每日或每周的固定
|
|
4
|
+
* 时刻(北京时间)。
|
|
5
|
+
* The schedule rule of a compile target, matching the native
|
|
6
|
+
* `update_schedule`: a daily or weekly clock time in Beijing time.
|
|
7
|
+
*/
|
|
8
|
+
export type TaskCenterCompileSchedule = {
|
|
9
|
+
frequency: 'daily';
|
|
10
|
+
hour: number;
|
|
11
|
+
minute: number;
|
|
12
|
+
} | {
|
|
13
|
+
frequency: 'weekly';
|
|
14
|
+
/** 1 为周一,7 为周日。1 is Monday, 7 is Sunday. */
|
|
15
|
+
weekday: number;
|
|
16
|
+
hour: number;
|
|
17
|
+
minute: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 数据源导入任务的一行,来自 `/api/v1/watches`。
|
|
21
|
+
* One data-source import task, from `/api/v1/watches`.
|
|
22
|
+
*/
|
|
23
|
+
export interface TaskCenterImportRow {
|
|
24
|
+
/** 行唯一标识,对应 watch 的 task id。Unique row key, the watch task id. */
|
|
25
|
+
id: string;
|
|
26
|
+
/** 资源名称。Resource name. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** 数据来源类型,例如飞书文档、代码仓库。Source type, for example a Feishu doc or a Git repository. */
|
|
29
|
+
sourceLabel: string;
|
|
30
|
+
/** 原始地址,例如 Git 仓库链接。Original address, for example the Git URL. */
|
|
31
|
+
sourceUrl?: string;
|
|
32
|
+
/** 导入后的 OpenViking 路径。The OpenViking path after import. */
|
|
33
|
+
openVikingPath: string;
|
|
34
|
+
/** 定时同步状态文案,例如「每 1 天」「未开启」。Schedule status copy, for example "every day" or "off". */
|
|
35
|
+
scheduleLabel: string;
|
|
36
|
+
/** 定时同步是否开启。Whether scheduled sync is on. */
|
|
37
|
+
scheduleEnabled: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 当前的同步间隔,单位分钟。未开启时省略。对应原生 watch 的
|
|
40
|
+
* `watch_interval`。
|
|
41
|
+
*
|
|
42
|
+
* The current sync interval in minutes, omitted when scheduling is off. It
|
|
43
|
+
* matches the native watch's `watch_interval`.
|
|
44
|
+
*/
|
|
45
|
+
scheduleIntervalMinutes?: number;
|
|
46
|
+
/** 最近一次执行时间,毫秒时间戳。Last execution time in milliseconds. */
|
|
47
|
+
lastExecutionTime?: number;
|
|
48
|
+
/** 任务创建时间,毫秒时间戳。Creation time in milliseconds. */
|
|
49
|
+
createdAt?: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 知识编译任务的一行,来自编译目标列表。
|
|
53
|
+
* One knowledge-compile task, from the compile target list.
|
|
54
|
+
*/
|
|
55
|
+
export interface TaskCenterCompileRow {
|
|
56
|
+
/** 行唯一标识,对应编译目标 URI。Unique row key, the compile target URI. */
|
|
57
|
+
id: string;
|
|
58
|
+
/** 目录名称。Directory name. */
|
|
59
|
+
name: string;
|
|
60
|
+
/** 编译目标的完整 URI。Full URI of the compile target. */
|
|
61
|
+
toUri: string;
|
|
62
|
+
/** 状态文案,例如「执行中」「空闲」「未初始化」。Status copy, for example "running", "idle" or "not initialized". */
|
|
63
|
+
statusLabel: string;
|
|
64
|
+
/** 冲突文件数。Number of conflicting files. */
|
|
65
|
+
conflictFileCount: number;
|
|
66
|
+
/** 任务类型,例如首次编译或定时编译。Task type, for example initial or scheduled compile. */
|
|
67
|
+
taskType: string;
|
|
68
|
+
/** 定时更新状态文案,例如「每日 09:30(北京时间)」「未开启」。Schedule copy. */
|
|
69
|
+
scheduleLabel: string;
|
|
70
|
+
/** 定时更新是否开启。Whether scheduled updates are on. */
|
|
71
|
+
scheduleEnabled: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 当前的定时规则。未开启时省略。与原生编译目标的 `update_schedule` 同形,
|
|
74
|
+
* 宿主改完直接回传即可。
|
|
75
|
+
*
|
|
76
|
+
* The current schedule rule, omitted when scheduling is off. It matches the
|
|
77
|
+
* native compile target's `update_schedule`, so a host can pass it straight
|
|
78
|
+
* back after an edit.
|
|
79
|
+
*/
|
|
80
|
+
schedule?: TaskCenterCompileSchedule;
|
|
81
|
+
/** 内容最近更新时间,毫秒时间戳。Last content update in milliseconds. */
|
|
82
|
+
updatedAt?: number;
|
|
83
|
+
/** 任务创建时间,毫秒时间戳。Creation time in milliseconds. */
|
|
84
|
+
createdAt?: number;
|
|
85
|
+
}
|
|
86
|
+
/** 数据源导入任务的内置列。Built-in columns of the import task list. */
|
|
87
|
+
export type TaskCenterImportColumnKey = 'name' | 'schedule' | 'source' | 'lastExecution' | 'createdAt' | 'path';
|
|
88
|
+
/** 知识编译任务的内置列。Built-in columns of the compile task list. */
|
|
89
|
+
export type TaskCenterCompileColumnKey = 'name' | 'status' | 'conflicts' | 'taskType' | 'schedule' | 'updatedAt' | 'createdAt' | 'path';
|
|
90
|
+
/**
|
|
91
|
+
* 一列的配置。省略 `columns` 时使用该列表的全部内置列与默认顺序。
|
|
92
|
+
*
|
|
93
|
+
* A column configuration. Omitting `columns` uses every built-in column of that
|
|
94
|
+
* list in its default order.
|
|
95
|
+
*/
|
|
96
|
+
export interface TaskCenterColumn<TRow> {
|
|
97
|
+
/**
|
|
98
|
+
* 列标识。内置列用该列表的列 key,自定义列用任意字符串。
|
|
99
|
+
* Column key. A built-in column uses a key of that list; a custom column uses
|
|
100
|
+
* any string.
|
|
101
|
+
*/
|
|
102
|
+
key: string;
|
|
103
|
+
/**
|
|
104
|
+
* 覆盖表头文案。省略时使用内置文案或 `labels`。
|
|
105
|
+
* Header override. Omission uses the built-in copy or `labels`.
|
|
106
|
+
*/
|
|
107
|
+
title?: ReactNode;
|
|
108
|
+
/** 列宽,单位像素。Column width in pixels. */
|
|
109
|
+
width?: number;
|
|
110
|
+
/** 单元格对齐方式。Cell alignment. */
|
|
111
|
+
align?: 'left' | 'center' | 'right';
|
|
112
|
+
/**
|
|
113
|
+
* 覆盖单元格内容。内置列省略时使用默认渲染;自定义列必须提供。
|
|
114
|
+
* Cell content override. A built-in column falls back to its default
|
|
115
|
+
* rendering; a custom column must provide it.
|
|
116
|
+
*/
|
|
117
|
+
render?: (row: TRow) => ReactNode;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 各页签的列配置。只传需要调整的页签,另一个页签保持默认。
|
|
121
|
+
* Column configuration per tab. Pass only the tab you adjust; the other keeps
|
|
122
|
+
* its default.
|
|
123
|
+
*/
|
|
124
|
+
export interface TaskCenterColumns {
|
|
125
|
+
import?: readonly TaskCenterColumn<TaskCenterImportRow>[];
|
|
126
|
+
compile?: readonly TaskCenterColumn<TaskCenterCompileRow>[];
|
|
127
|
+
}
|
|
128
|
+
/** 任意一行的联合类型,供打开任务等回调使用。 */
|
|
129
|
+
export type TaskCenterRow = TaskCenterImportRow | TaskCenterCompileRow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './task-center.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.ov-module-placeholder {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
border: 1px dashed var(--ov-ui-border, currentColor);
|
|
4
|
+
border-radius: var(--ov-ui-radius, 6px);
|
|
5
|
+
min-width: 0;
|
|
6
|
+
min-height: 160px;
|
|
7
|
+
color: inherit;
|
|
8
|
+
font: inherit;
|
|
9
|
+
text-align: center;
|
|
10
|
+
overflow-wrap: anywhere;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
padding: 24px;
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ov-module-placeholder__title {
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ov-module-placeholder__description {
|
|
24
|
+
color: var(--ov-ui-text-muted, color-mix(in srgb, currentColor 75%, transparent));
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TaskCenterProps } from './types.js';
|
|
2
|
+
export type { TaskCenterColumn, TaskCenterColumns, TaskCenterCompileColumnKey, TaskCenterCompileRow, TaskCenterCompileSchedule, TaskCenterImportColumnKey, TaskCenterImportRow, TaskCenterLabels, TaskCenterProps, TaskCenterRow, TaskCenterScope, TaskCenterSlots, TaskCenterTab, } from './types.js';
|
|
3
|
+
/** 占位组件:渲染一个带模块名的空容器,真实实现随模块 Hook 与组合视图迁入。 */
|
|
4
|
+
export declare function TaskCenter({ className, style, labels }: TaskCenterProps): import("react").JSX.Element;
|