@processengine/uikit 0.1.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/CHANGELOG.md +13 -0
- package/README.md +61 -0
- package/dist/base.css +51 -0
- package/dist/components.css +539 -0
- package/dist/react/CopyableValue.d.ts +7 -0
- package/dist/react/CopyableValue.d.ts.map +1 -0
- package/dist/react/CopyableValue.js +22 -0
- package/dist/react/JsonExplorer.d.ts +9 -0
- package/dist/react/JsonExplorer.d.ts.map +1 -0
- package/dist/react/JsonExplorer.js +46 -0
- package/dist/react/JsonPanel.d.ts +9 -0
- package/dist/react/JsonPanel.d.ts.map +1 -0
- package/dist/react/JsonPanel.js +8 -0
- package/dist/react/PageHeader.d.ts +10 -0
- package/dist/react/PageHeader.d.ts.map +1 -0
- package/dist/react/PageHeader.js +5 -0
- package/dist/react/SearchInput.d.ts +10 -0
- package/dist/react/SearchInput.d.ts.map +1 -0
- package/dist/react/SearchInput.js +6 -0
- package/dist/react/StateCard.d.ts +9 -0
- package/dist/react/StateCard.d.ts.map +1 -0
- package/dist/react/StateCard.js +4 -0
- package/dist/react/Tabs.d.ts +13 -0
- package/dist/react/Tabs.d.ts.map +1 -0
- package/dist/react/Tabs.js +8 -0
- package/dist/react/cn.d.ts +3 -0
- package/dist/react/cn.d.ts.map +1 -0
- package/dist/react/cn.js +3 -0
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +8 -0
- package/dist/sandbox.css +807 -0
- package/dist/styles.css +675 -0
- package/dist/tokens.css +79 -0
- package/package.json +66 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Все значимые изменения в этом проекте документируются здесь.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-06-09
|
|
8
|
+
|
|
9
|
+
### Добавлено
|
|
10
|
+
- Первичная структура пакета `@processengine/uikit`.
|
|
11
|
+
- CSS entrypoint для React-приложений: `@processengine/uikit/styles.css`.
|
|
12
|
+
- CSS bundle для статических sandbox-форм: `@processengine/uikit/sandbox.css`.
|
|
13
|
+
- React-примитивы для вкладок, JSON-панелей, копируемых значений, заголовков, поиска и state-card.
|
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @processengine/uikit
|
|
2
|
+
|
|
3
|
+
Shared UI kit for ProcessEngine interfaces: orchestrator admin UI, Rules UI, Flow UI, and processor sandbox forms.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Before the first npm release, consumers can use a local file dependency:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@processengine/uikit": "file:../uikit"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After publication, pin exact versions in production consumers:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@processengine/uikit": "0.1.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CSS Entrypoints
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import "@processengine/uikit/styles.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use `styles.css` for React applications. It includes tokens, base reset, and shared application components.
|
|
34
|
+
|
|
35
|
+
For plain processor sandbox forms, use the prebuilt bundle:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<link rel="stylesheet" href="./uikit-sandbox.css" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The sandbox bundle is exported as `@processengine/uikit/sandbox.css`; consuming services can copy it into their static directories during their build.
|
|
42
|
+
|
|
43
|
+
## React Entrypoint
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { Tabs, JsonPanel, CopyableValue } from "@processengine/uikit";
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The React layer intentionally does not depend on routing. Consumers keep their own router-specific links and page shells.
|
|
50
|
+
|
|
51
|
+
## Release Process
|
|
52
|
+
|
|
53
|
+
Releases follow the ProcessEngine tagged-release canon:
|
|
54
|
+
|
|
55
|
+
1. Update `CHANGELOG.md` under `[Unreleased]`.
|
|
56
|
+
2. Run `npm test`.
|
|
57
|
+
3. Run `npm version patch`, `npm version minor`, or `npm version major`.
|
|
58
|
+
4. Push the version commit and tag with `git push origin main --follow-tags`.
|
|
59
|
+
5. GitHub Actions publishes the package to npm and creates the GitHub Release from `CHANGELOG.md`.
|
|
60
|
+
|
|
61
|
+
Publishing by hand is blocked by `prepublishOnly`; releases should go through GitHub Actions.
|
package/dist/base.css
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
html {
|
|
2
|
+
background: var(--page-bg);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
margin: 0;
|
|
7
|
+
min-width: 20rem;
|
|
8
|
+
min-height: 100svh;
|
|
9
|
+
background: var(--page-bg);
|
|
10
|
+
background-image: var(--page-glow);
|
|
11
|
+
color: var(--text-strong);
|
|
12
|
+
font-family: var(--font-sans);
|
|
13
|
+
font-size: 100%;
|
|
14
|
+
line-height: 1.5;
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#root {
|
|
22
|
+
min-height: 100svh;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
*,
|
|
26
|
+
*::before,
|
|
27
|
+
*::after {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
button,
|
|
32
|
+
input,
|
|
33
|
+
textarea,
|
|
34
|
+
select {
|
|
35
|
+
font: inherit;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
p,
|
|
39
|
+
h1,
|
|
40
|
+
h2,
|
|
41
|
+
h3,
|
|
42
|
+
h4,
|
|
43
|
+
h5,
|
|
44
|
+
h6,
|
|
45
|
+
pre {
|
|
46
|
+
margin: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a {
|
|
50
|
+
color: inherit;
|
|
51
|
+
}
|
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
.app-page {
|
|
2
|
+
min-height: 100svh;
|
|
3
|
+
padding: var(--page-block-start) var(--page-inline-padding)
|
|
4
|
+
var(--page-block-end);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.app-shell-frame {
|
|
8
|
+
inline-size: min(100%, var(--shell-max-width));
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
padding: 0.875rem;
|
|
11
|
+
border: 0.0625rem solid rgba(255, 255, 255, 0.72);
|
|
12
|
+
border-radius: calc(var(--radius-xl) + 0.5rem);
|
|
13
|
+
background: var(--surface-canvas);
|
|
14
|
+
box-shadow: var(--shadow-lg);
|
|
15
|
+
backdrop-filter: blur(12px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.app-toolbar {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 1rem;
|
|
22
|
+
padding: 0.625rem 0.875rem;
|
|
23
|
+
border: 0.0625rem solid var(--border-color);
|
|
24
|
+
border-radius: calc(var(--radius-lg) - 0.125rem);
|
|
25
|
+
background: var(--surface-card);
|
|
26
|
+
box-shadow: var(--shadow-sm);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.app-toolbar__brand {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 0.75rem;
|
|
33
|
+
color: var(--text-strong);
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.app-toolbar__brand-mark {
|
|
38
|
+
inline-size: 2rem;
|
|
39
|
+
block-size: 2rem;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
border-radius: 999px;
|
|
44
|
+
background: var(--text-strong);
|
|
45
|
+
color: #fff;
|
|
46
|
+
font-weight: 800;
|
|
47
|
+
font-size: 0.95rem;
|
|
48
|
+
letter-spacing: -0.02em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.app-toolbar__brand-text {
|
|
52
|
+
font-size: 1rem;
|
|
53
|
+
font-weight: 700;
|
|
54
|
+
letter-spacing: -0.02em;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.app-toolbar__breadcrumbs {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 0.45rem;
|
|
61
|
+
min-width: 0;
|
|
62
|
+
color: var(--text-dim);
|
|
63
|
+
font-size: 0.86rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.app-toolbar__crumb {
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.app-toolbar__crumb--current {
|
|
71
|
+
color: var(--text-strong);
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.app-toolbar__crumb-separator {
|
|
76
|
+
color: var(--text-faint);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.app-toolbar__actions {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 0.625rem;
|
|
83
|
+
margin-left: auto;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.app-server-control__form {
|
|
88
|
+
min-width: min(28rem, 45vw);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.app-server-control {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
align-items: flex-end;
|
|
95
|
+
gap: 0.125rem;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
max-width: min(28rem, 45vw);
|
|
98
|
+
padding: 0.3rem 0.55rem;
|
|
99
|
+
border: 0.0625rem solid transparent;
|
|
100
|
+
border-radius: var(--radius-md);
|
|
101
|
+
background: transparent;
|
|
102
|
+
color: var(--text-dim);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.app-server-control:not(label) {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.app-server-control:not(label):hover,
|
|
110
|
+
.app-server-control:not(label):focus-visible {
|
|
111
|
+
border-color: var(--border-color);
|
|
112
|
+
background: var(--surface-subtle);
|
|
113
|
+
outline: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.app-server-control--editing {
|
|
117
|
+
align-items: stretch;
|
|
118
|
+
inline-size: 100%;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.app-server-control__label {
|
|
122
|
+
font-size: 0.62rem;
|
|
123
|
+
line-height: 1.2;
|
|
124
|
+
font-weight: 700;
|
|
125
|
+
letter-spacing: 0.06em;
|
|
126
|
+
text-transform: uppercase;
|
|
127
|
+
color: var(--text-faint);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.app-server-control__value {
|
|
131
|
+
max-width: 100%;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
color: var(--text-muted);
|
|
134
|
+
font-size: 0.78rem;
|
|
135
|
+
line-height: 1.35;
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.app-server-control__input {
|
|
141
|
+
inline-size: 100%;
|
|
142
|
+
min-block-size: 2.2rem;
|
|
143
|
+
padding: 0.45rem 0.6rem;
|
|
144
|
+
border: 0.0625rem solid var(--border-color);
|
|
145
|
+
border-radius: var(--radius-md);
|
|
146
|
+
background: var(--surface-card);
|
|
147
|
+
color: var(--text-strong);
|
|
148
|
+
font-family: var(--font-input);
|
|
149
|
+
font-size: 0.82rem;
|
|
150
|
+
line-height: 1.3;
|
|
151
|
+
box-shadow: var(--shadow-sm);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.app-server-control__input:focus {
|
|
155
|
+
outline: none;
|
|
156
|
+
border-color: var(--accent-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.app-server-control__input--error {
|
|
160
|
+
border-color: var(--status-error-border);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.app-toolbar__pill {
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
min-block-size: 2.375rem;
|
|
168
|
+
padding: 0.4rem 0.9rem;
|
|
169
|
+
border-radius: 999px;
|
|
170
|
+
background: var(--text-strong);
|
|
171
|
+
color: #fff;
|
|
172
|
+
font-size: 0.8rem;
|
|
173
|
+
font-weight: 700;
|
|
174
|
+
letter-spacing: 0.01em;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.app-toolbar__pill--soft {
|
|
178
|
+
background: var(--surface-subtle);
|
|
179
|
+
color: var(--text-medium);
|
|
180
|
+
border: 0.0625rem solid var(--border-color);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.app-shell {
|
|
184
|
+
padding: 1.5rem 1rem 1rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.app-back-link {
|
|
188
|
+
display: inline-flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
gap: 0.45rem;
|
|
191
|
+
margin-bottom: 1.125rem;
|
|
192
|
+
padding: 0.5rem 0.875rem;
|
|
193
|
+
border-radius: 999px;
|
|
194
|
+
background: var(--surface-card);
|
|
195
|
+
border: 0.0625rem solid var(--border-color);
|
|
196
|
+
box-shadow: var(--shadow-sm);
|
|
197
|
+
color: var(--text-dim);
|
|
198
|
+
font-size: 0.85rem;
|
|
199
|
+
font-weight: 600;
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.app-back-link__icon {
|
|
204
|
+
inline-size: 0.95rem;
|
|
205
|
+
block-size: 0.95rem;
|
|
206
|
+
flex: 0 0 auto;
|
|
207
|
+
opacity: 0.78;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.app-back-link:hover,
|
|
211
|
+
.app-back-link:focus-visible {
|
|
212
|
+
color: var(--text-strong);
|
|
213
|
+
background: var(--surface-hover);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.app-back-link:hover .app-back-link__icon,
|
|
217
|
+
.app-back-link:focus-visible .app-back-link__icon {
|
|
218
|
+
opacity: 1;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.app-page-header {
|
|
222
|
+
margin-bottom: 1.5rem;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.app-page-header__eyebrow {
|
|
226
|
+
margin-bottom: 0.35rem;
|
|
227
|
+
color: var(--text-faint);
|
|
228
|
+
font-size: 0.72rem;
|
|
229
|
+
font-weight: 800;
|
|
230
|
+
letter-spacing: 0.08em;
|
|
231
|
+
text-transform: uppercase;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.app-page-header__title {
|
|
235
|
+
/* max-inline-size: 32rem; */
|
|
236
|
+
margin-bottom: 0.5rem;
|
|
237
|
+
font-size: clamp(2rem, 4vw, 2.85rem);
|
|
238
|
+
line-height: 0.98;
|
|
239
|
+
font-weight: 800;
|
|
240
|
+
letter-spacing: -0.04em;
|
|
241
|
+
color: var(--text-strong);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.app-page-header__subtitle {
|
|
245
|
+
max-inline-size: 42rem;
|
|
246
|
+
font-size: 1rem;
|
|
247
|
+
line-height: 1.45;
|
|
248
|
+
color: var(--text-dim);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.app-page-header--detail .app-page-header__title {
|
|
252
|
+
max-inline-size: 38rem;
|
|
253
|
+
font-size: clamp(1.85rem, 3vw, 2.45rem);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.app-page-header--detail .app-page-header__subtitle {
|
|
257
|
+
font-size: 1.08rem;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.app-search {
|
|
261
|
+
margin-bottom: 1.25rem;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.app-search__field {
|
|
265
|
+
display: flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
gap: 0.75rem;
|
|
268
|
+
padding: 0.35rem 0.95rem;
|
|
269
|
+
border: 0.0625rem solid var(--border-color);
|
|
270
|
+
border-radius: var(--radius-lg);
|
|
271
|
+
background: var(--surface-card);
|
|
272
|
+
box-shadow: var(--shadow-sm);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.app-search__icon {
|
|
276
|
+
color: var(--text-faint);
|
|
277
|
+
font-size: 1rem;
|
|
278
|
+
flex: 0 0 auto;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.app-search__icon svg {
|
|
282
|
+
display: block;
|
|
283
|
+
inline-size: 1rem;
|
|
284
|
+
block-size: 1rem;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.app-search__input {
|
|
288
|
+
inline-size: 100%;
|
|
289
|
+
min-block-size: 3rem;
|
|
290
|
+
border: 0;
|
|
291
|
+
background: transparent;
|
|
292
|
+
color: var(--text-strong);
|
|
293
|
+
font-family: var(--font-input);
|
|
294
|
+
font-size: 0.96rem;
|
|
295
|
+
line-height: 1.4;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.app-search__input::placeholder {
|
|
299
|
+
color: var(--text-faint);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.app-search__input:focus {
|
|
303
|
+
outline: none;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.app-state-card {
|
|
307
|
+
padding: 1.5rem;
|
|
308
|
+
border: 0.0625rem solid var(--border-color);
|
|
309
|
+
border-radius: var(--radius-xl);
|
|
310
|
+
background: var(--surface-card);
|
|
311
|
+
box-shadow: var(--shadow-sm);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.app-state-card__title {
|
|
315
|
+
margin-bottom: 0.5rem;
|
|
316
|
+
font-size: 1.4rem;
|
|
317
|
+
line-height: 1.15;
|
|
318
|
+
font-weight: 700;
|
|
319
|
+
color: var(--text-strong);
|
|
320
|
+
letter-spacing: -0.03em;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.app-state-card__text {
|
|
324
|
+
max-inline-size: 36rem;
|
|
325
|
+
font-size: 0.97rem;
|
|
326
|
+
line-height: 1.55;
|
|
327
|
+
color: var(--text-dim);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.app-state-card__action {
|
|
331
|
+
margin-top: 1rem;
|
|
332
|
+
padding: 0.7rem 1rem;
|
|
333
|
+
border: 0.0625rem solid var(--border-color);
|
|
334
|
+
border-radius: 999px;
|
|
335
|
+
background: var(--surface-subtle);
|
|
336
|
+
color: var(--text-strong);
|
|
337
|
+
font-weight: 600;
|
|
338
|
+
cursor: pointer;
|
|
339
|
+
transition:
|
|
340
|
+
background-color 160ms ease,
|
|
341
|
+
border-color 160ms ease,
|
|
342
|
+
box-shadow 160ms ease;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.app-state-card__action:hover,
|
|
346
|
+
.app-state-card__action:focus-visible {
|
|
347
|
+
background: var(--surface-hover);
|
|
348
|
+
border-color: var(--border-strong);
|
|
349
|
+
box-shadow: var(--shadow-sm);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.app-tabs {
|
|
353
|
+
display: inline-flex;
|
|
354
|
+
flex-wrap: wrap;
|
|
355
|
+
align-items: center;
|
|
356
|
+
gap: 0.375rem;
|
|
357
|
+
padding: 0.35rem;
|
|
358
|
+
border: 0.0625rem solid var(--border-color);
|
|
359
|
+
border-radius: 999px;
|
|
360
|
+
background: var(--surface-subtle);
|
|
361
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.app-tabs__tab {
|
|
365
|
+
padding: 0.6rem 0.95rem;
|
|
366
|
+
border: 0;
|
|
367
|
+
border-radius: 999px;
|
|
368
|
+
background: transparent;
|
|
369
|
+
color: var(--text-dim);
|
|
370
|
+
font-size: 0.82rem;
|
|
371
|
+
line-height: 1;
|
|
372
|
+
font-weight: 600;
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
transition:
|
|
375
|
+
background-color 160ms ease,
|
|
376
|
+
color 160ms ease,
|
|
377
|
+
box-shadow 160ms ease;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.app-tabs__tab:hover,
|
|
381
|
+
.app-tabs__tab:focus-visible {
|
|
382
|
+
color: var(--text-strong);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.app-tabs__tab--active {
|
|
386
|
+
color: var(--surface-card);
|
|
387
|
+
background: var(--text-strong);
|
|
388
|
+
box-shadow: var(--shadow-sm);
|
|
389
|
+
}
|
|
390
|
+
.app-tabs__tab--active:hover {
|
|
391
|
+
color: var(--surface-card);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.app-empty-text {
|
|
395
|
+
font-size: 0.95rem;
|
|
396
|
+
line-height: 1.6;
|
|
397
|
+
color: var(--text-dim);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.app-error {
|
|
401
|
+
padding: 0.85rem 1rem;
|
|
402
|
+
border: 0.0625rem solid var(--status-error-border);
|
|
403
|
+
border-radius: var(--radius-md);
|
|
404
|
+
background: var(--status-error-bg);
|
|
405
|
+
color: var(--status-error-text);
|
|
406
|
+
font-weight: 650;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.app-json-panel {
|
|
410
|
+
max-block-size: 40rem;
|
|
411
|
+
overflow: auto;
|
|
412
|
+
padding: 1rem 1.1rem;
|
|
413
|
+
border: 0.0625rem solid var(--border-color);
|
|
414
|
+
border-radius: var(--radius-lg);
|
|
415
|
+
background: var(--surface-subtle);
|
|
416
|
+
color: var(--text-medium);
|
|
417
|
+
font-family: var(--font-mono);
|
|
418
|
+
font-size: 0.81rem;
|
|
419
|
+
line-height: 1.6;
|
|
420
|
+
white-space: pre-wrap;
|
|
421
|
+
word-break: break-word;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.app-copyable {
|
|
425
|
+
display: inline-flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
gap: 0.45rem;
|
|
428
|
+
min-width: 0;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.app-copyable__value {
|
|
432
|
+
min-width: 0;
|
|
433
|
+
order: 2;
|
|
434
|
+
overflow-wrap: anywhere;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.app-copyable__button {
|
|
438
|
+
flex: 0 0 auto;
|
|
439
|
+
order: 1;
|
|
440
|
+
display: inline-flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
justify-content: center;
|
|
443
|
+
inline-size: 1.45rem;
|
|
444
|
+
block-size: 1.45rem;
|
|
445
|
+
padding: 0;
|
|
446
|
+
border: 0.0625rem solid var(--border-color);
|
|
447
|
+
border-radius: 999px;
|
|
448
|
+
background: var(--surface-subtle);
|
|
449
|
+
color: var(--text-faint);
|
|
450
|
+
font-size: 0.78rem;
|
|
451
|
+
line-height: 1;
|
|
452
|
+
font-weight: 600;
|
|
453
|
+
cursor: pointer;
|
|
454
|
+
transition:
|
|
455
|
+
border-color 140ms ease,
|
|
456
|
+
color 140ms ease,
|
|
457
|
+
background-color 140ms ease;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.app-copyable__button--copied {
|
|
461
|
+
border-color: var(--status-success-border);
|
|
462
|
+
background: var(--status-success-bg);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.app-copyable__icon {
|
|
466
|
+
inline-size: 0.7rem;
|
|
467
|
+
block-size: 0.7rem;
|
|
468
|
+
opacity: 0.62;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.app-copyable__button:hover,
|
|
472
|
+
.app-copyable__button:focus-visible {
|
|
473
|
+
border-color: var(--border-strong);
|
|
474
|
+
color: var(--text-strong);
|
|
475
|
+
background: var(--surface-hover);
|
|
476
|
+
outline: none;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.app-copyable__button:hover .app-copyable__icon,
|
|
480
|
+
.app-copyable__button:focus-visible .app-copyable__icon,
|
|
481
|
+
.app-copyable__button--copied .app-copyable__icon {
|
|
482
|
+
opacity: 0.92;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.app-visually-hidden {
|
|
486
|
+
position: absolute;
|
|
487
|
+
width: 0.0625rem;
|
|
488
|
+
height: 0.0625rem;
|
|
489
|
+
padding: 0;
|
|
490
|
+
margin: -0.0625rem;
|
|
491
|
+
overflow: hidden;
|
|
492
|
+
clip: rect(0, 0, 0, 0);
|
|
493
|
+
white-space: nowrap;
|
|
494
|
+
border: 0;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@media (max-width: 52rem) {
|
|
498
|
+
.app-page {
|
|
499
|
+
padding: 1rem;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.app-shell-frame {
|
|
503
|
+
padding: 0.75rem;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.app-toolbar {
|
|
507
|
+
flex-wrap: wrap;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.app-toolbar__breadcrumbs {
|
|
511
|
+
order: 3;
|
|
512
|
+
inline-size: 100%;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.app-toolbar__actions {
|
|
516
|
+
width: 100%;
|
|
517
|
+
margin-left: 0;
|
|
518
|
+
justify-content: flex-end;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.app-shell {
|
|
522
|
+
padding: 1.25rem 0.5rem 0.5rem;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.app-tabs {
|
|
526
|
+
inline-size: 100%;
|
|
527
|
+
justify-content: flex-start;
|
|
528
|
+
border-radius: var(--radius-lg);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.app-tab-panel {
|
|
532
|
+
padding: 1rem;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.app-server-control__form,
|
|
536
|
+
.app-server-control {
|
|
537
|
+
max-width: min(100%, 28rem);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyableValue.d.ts","sourceRoot":"","sources":["../../src/react/CopyableValue.tsx"],"names":[],"mappings":"AAGA,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAkBF,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,kBAAkB,+BAmCrE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { cn } from "./cn";
|
|
4
|
+
function CopyIcon() {
|
|
5
|
+
return (_jsx("svg", { "aria-hidden": "true", className: "app-copyable__icon", fill: "none", viewBox: "0 0 32 32", children: _jsx("path", { d: "M29 2.85713V22.2856C29 23.0427 28.7033 23.7699 28.1759 24.3056C27.6486 24.8413 26.9328 25.1427 26.1875 25.1427H24.5V9.71405C24.4943 6.87693 22.2303 4.57689 19.4376 4.5714H8.74987V2.85713C8.74987 1.27857 10.0085 0 11.5624 0H26.1875C26.9328 0 27.6486 0.301427 28.1759 0.837152C28.7033 1.37285 29 2.09999 29 2.85713ZM19.4376 6.85729H4.81252C3.2586 6.85729 2 8.13585 2 9.71441V29.1429C2 29.9 2.29672 30.6272 2.82408 31.1628C3.35141 31.6985 4.06721 32 4.81252 32H19.4376C20.1829 32 20.8987 31.6986 21.4261 31.1628C21.9534 30.6272 22.2501 29.9 22.2501 29.1429V9.71441C22.2501 8.95728 21.9534 8.23013 21.4261 7.69444C20.8987 7.15874 20.1829 6.85729 19.4376 6.85729Z", fill: "currentColor" }) }));
|
|
6
|
+
}
|
|
7
|
+
export function CopyableValue({ value, className }) {
|
|
8
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
9
|
+
async function handleCopy(event) {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
event.stopPropagation();
|
|
12
|
+
try {
|
|
13
|
+
await navigator.clipboard.writeText(value);
|
|
14
|
+
setIsCopied(true);
|
|
15
|
+
window.setTimeout(() => setIsCopied(false), 1200);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
setIsCopied(false);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return (_jsxs("span", { className: cn("app-copyable", className), children: [_jsx("button", { className: cn("app-copyable__button", isCopied && "app-copyable__button--copied"), type: "button", "aria-label": `Скопировать ${value}`, title: isCopied ? "Скопировано" : "Скопировать", onClick: handleCopy, children: _jsx(CopyIcon, {}) }), _jsx("span", { className: "app-copyable__value", title: value, children: value })] }));
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type JsonExplorerProps = {
|
|
2
|
+
data: unknown;
|
|
3
|
+
defaultExpanded?: string[];
|
|
4
|
+
collapsed?: boolean | number;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function JsonExplorer({ data, defaultExpanded, collapsed, className, }: JsonExplorerProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=JsonExplorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonExplorer.d.ts","sourceRoot":"","sources":["../../src/react/JsonExplorer.tsx"],"names":[],"mappings":"AAGA,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+CF,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,eAAoB,EACpB,SAAa,EACb,SAAS,GACV,EAAE,iBAAiB,+BAsBnB"}
|