@party-stack/ontology-devtools 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/LICENSE +21 -0
- package/lib/OntologyDevtools.d.ts +6 -0
- package/lib/OntologyDevtools.d.ts.map +1 -0
- package/lib/OntologyDevtools.js +520 -0
- package/lib/OntologyDevtools.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Robert Fidler
|
|
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,6 @@
|
|
|
1
|
+
import type { LiveOntology, OntologyDefinition } from "@party-stack/ontology";
|
|
2
|
+
export interface OntologyDevtoolsProps<Ontology extends OntologyDefinition = OntologyDefinition> {
|
|
3
|
+
ontology: LiveOntology<Ontology>;
|
|
4
|
+
}
|
|
5
|
+
export declare function OntologyDevtools<Ontology extends OntologyDefinition>({ ontology, }: OntologyDevtoolsProps<Ontology>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=OntologyDevtools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OntologyDevtools.d.ts","sourceRoot":"","sources":["../src/OntologyDevtools.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,YAAY,EACZ,kBAAkB,EAGrB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,kBAAkB,GAAG,kBAAkB;IAC3F,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CACpC;AA0sBD,wBAAgB,gBAAgB,CAAC,QAAQ,SAAS,kBAAkB,EAAE,EAClE,QAAQ,GACX,EAAE,qBAAqB,CAAC,QAAQ,CAAC,2CAkBjC"}
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowPathIcon, CheckIcon, InboxStackIcon, TrashIcon } from "@heroicons/react/24/outline";
|
|
3
|
+
import { useLiveQuery } from "@tanstack/react-db";
|
|
4
|
+
import { TanStackDevtools } from "@tanstack/react-devtools";
|
|
5
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
6
|
+
import { flushSync } from "react-dom";
|
|
7
|
+
const styles = `
|
|
8
|
+
.ps-outbox-root {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
min-height: 0;
|
|
13
|
+
}
|
|
14
|
+
.ps-outbox {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
min-height: 0;
|
|
20
|
+
overflow: hidden auto;
|
|
21
|
+
overscroll-behavior: contain;
|
|
22
|
+
padding: 20px 22px;
|
|
23
|
+
color: #e7e5e4;
|
|
24
|
+
background:
|
|
25
|
+
radial-gradient(circle at 8% 0%, rgba(232, 59, 50, .12), transparent 30%),
|
|
26
|
+
linear-gradient(145deg, #171717 0%, #111113 100%);
|
|
27
|
+
font: 13px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
|
|
28
|
+
}
|
|
29
|
+
.ps-outbox * { box-sizing: border-box; }
|
|
30
|
+
.ps-outbox-header {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 16px;
|
|
34
|
+
margin-bottom: 20px;
|
|
35
|
+
}
|
|
36
|
+
.ps-outbox-heading {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 11px;
|
|
40
|
+
}
|
|
41
|
+
.ps-outbox-mark {
|
|
42
|
+
width: 30px;
|
|
43
|
+
height: 30px;
|
|
44
|
+
padding: 5px;
|
|
45
|
+
border: 1px solid rgba(255, 255, 255, .1);
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
background: rgba(255, 255, 255, .06);
|
|
48
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
|
|
49
|
+
color: #fb7185;
|
|
50
|
+
}
|
|
51
|
+
.ps-outbox-mark svg { display: block; width: 100%; height: 100%; }
|
|
52
|
+
.ps-outbox-title-row {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
}
|
|
57
|
+
.ps-outbox-title {
|
|
58
|
+
margin: 0;
|
|
59
|
+
color: #fafaf9;
|
|
60
|
+
font-size: 17px;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
letter-spacing: -.015em;
|
|
63
|
+
}
|
|
64
|
+
.ps-outbox-subtitle { margin: 2px 0 0; color: #a8a29e; font-size: 12px; }
|
|
65
|
+
.ps-outbox-count {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
min-width: 25px;
|
|
70
|
+
padding: 2px 7px;
|
|
71
|
+
border: 1px solid #3f3f46;
|
|
72
|
+
border-radius: 999px;
|
|
73
|
+
color: #d6d3d1;
|
|
74
|
+
background: rgba(39, 39, 42, .75);
|
|
75
|
+
text-align: center;
|
|
76
|
+
font-size: 11px;
|
|
77
|
+
font-variant-numeric: tabular-nums;
|
|
78
|
+
}
|
|
79
|
+
.ps-outbox-track {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: flex-start;
|
|
82
|
+
width: 100%;
|
|
83
|
+
padding: 4px 2px 16px;
|
|
84
|
+
overflow-x: auto;
|
|
85
|
+
overscroll-behavior-x: contain;
|
|
86
|
+
scrollbar-width: thin;
|
|
87
|
+
scrollbar-color: #52525b transparent;
|
|
88
|
+
scroll-snap-type: x proximity;
|
|
89
|
+
}
|
|
90
|
+
.ps-outbox-step {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex: none;
|
|
93
|
+
align-items: flex-start;
|
|
94
|
+
}
|
|
95
|
+
.ps-outbox-node {
|
|
96
|
+
flex: 0 0 clamp(250px, 31vw, 330px);
|
|
97
|
+
min-width: 0;
|
|
98
|
+
scroll-snap-align: start;
|
|
99
|
+
}
|
|
100
|
+
.ps-outbox-connector {
|
|
101
|
+
position: relative;
|
|
102
|
+
flex: 0 0 52px;
|
|
103
|
+
align-self: flex-start;
|
|
104
|
+
height: 2px;
|
|
105
|
+
margin: 30px 8px 0;
|
|
106
|
+
border-radius: 999px;
|
|
107
|
+
background: linear-gradient(90deg, #3f3f46, #52525b);
|
|
108
|
+
}
|
|
109
|
+
.ps-outbox-connector::before {
|
|
110
|
+
position: absolute;
|
|
111
|
+
z-index: 1;
|
|
112
|
+
right: 0;
|
|
113
|
+
top: -3px;
|
|
114
|
+
width: 7px;
|
|
115
|
+
height: 7px;
|
|
116
|
+
content: "";
|
|
117
|
+
border-top: 2px solid #71717a;
|
|
118
|
+
border-right: 2px solid #71717a;
|
|
119
|
+
transform: rotate(45deg);
|
|
120
|
+
}
|
|
121
|
+
.ps-outbox-card {
|
|
122
|
+
position: relative;
|
|
123
|
+
min-height: 190px;
|
|
124
|
+
padding: 15px;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
border: 1px solid #36363b;
|
|
127
|
+
border-radius: 14px;
|
|
128
|
+
background: linear-gradient(155deg, rgba(45, 45, 50, .96), rgba(31, 31, 35, .96));
|
|
129
|
+
box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
|
|
130
|
+
}
|
|
131
|
+
.ps-outbox-card::before {
|
|
132
|
+
position: absolute;
|
|
133
|
+
inset: 0 auto 0 0;
|
|
134
|
+
width: 3px;
|
|
135
|
+
content: "";
|
|
136
|
+
background: #38bdf8;
|
|
137
|
+
}
|
|
138
|
+
.ps-card-executing::before {
|
|
139
|
+
background: #f59e0b;
|
|
140
|
+
}
|
|
141
|
+
.ps-card-failed::before { background: #ef4444; }
|
|
142
|
+
.ps-outbox-card-header {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: space-between;
|
|
146
|
+
gap: 12px;
|
|
147
|
+
}
|
|
148
|
+
.ps-outbox-name {
|
|
149
|
+
min-width: 0;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
color: #fafaf9;
|
|
152
|
+
font-size: 14px;
|
|
153
|
+
font-weight: 680;
|
|
154
|
+
text-overflow: ellipsis;
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
}
|
|
157
|
+
.ps-outbox-status {
|
|
158
|
+
flex: none;
|
|
159
|
+
display: inline-flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
gap: 5px;
|
|
162
|
+
padding: 3px 8px;
|
|
163
|
+
border: 1px solid currentColor;
|
|
164
|
+
border-radius: 999px;
|
|
165
|
+
font-size: 10px;
|
|
166
|
+
font-weight: 700;
|
|
167
|
+
letter-spacing: .03em;
|
|
168
|
+
}
|
|
169
|
+
.ps-status-dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
|
|
170
|
+
.ps-status-queued { color: #7dd3fc; background: rgba(12, 74, 110, .45); }
|
|
171
|
+
.ps-status-executing { color: #fcd34d; background: rgba(120, 53, 15, .42); }
|
|
172
|
+
.ps-status-failed { color: #fca5a5; background: rgba(127, 29, 29, .42); }
|
|
173
|
+
.ps-outbox-meta {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-wrap: wrap;
|
|
176
|
+
gap: 6px 13px;
|
|
177
|
+
margin-top: 10px;
|
|
178
|
+
color: #a8a29e;
|
|
179
|
+
font-size: 11px;
|
|
180
|
+
}
|
|
181
|
+
.ps-outbox-meta strong { color: #d6d3d1; font-weight: 600; }
|
|
182
|
+
.ps-outbox-meta-divider {
|
|
183
|
+
align-self: center;
|
|
184
|
+
width: 3px;
|
|
185
|
+
height: 3px;
|
|
186
|
+
border-radius: 999px;
|
|
187
|
+
background: currentColor;
|
|
188
|
+
opacity: .65;
|
|
189
|
+
}
|
|
190
|
+
.ps-outbox-permanent { color: #fca5a5; }
|
|
191
|
+
.ps-outbox-time { cursor: help; font-variant-numeric: tabular-nums; }
|
|
192
|
+
.ps-outbox-error {
|
|
193
|
+
margin-top: 11px;
|
|
194
|
+
padding: 8px 10px;
|
|
195
|
+
border: 1px solid rgba(239, 68, 68, .35);
|
|
196
|
+
border-radius: 8px;
|
|
197
|
+
color: #fecaca;
|
|
198
|
+
background: rgba(69, 10, 10, .55);
|
|
199
|
+
font-size: 11px;
|
|
200
|
+
white-space: pre-wrap;
|
|
201
|
+
}
|
|
202
|
+
.ps-outbox-details { margin-top: 11px; color: #a8a29e; font-size: 11px; }
|
|
203
|
+
.ps-outbox-details summary { cursor: pointer; user-select: none; transition: color 120ms ease; }
|
|
204
|
+
.ps-outbox-details summary:hover { color: #e7e5e4; }
|
|
205
|
+
.ps-outbox-details pre {
|
|
206
|
+
max-height: 150px;
|
|
207
|
+
margin: 8px 0 0;
|
|
208
|
+
padding: 10px;
|
|
209
|
+
overflow: auto;
|
|
210
|
+
border: 1px solid #303036;
|
|
211
|
+
border-radius: 8px;
|
|
212
|
+
color: #d4d4d8;
|
|
213
|
+
background: rgba(9, 9, 11, .7);
|
|
214
|
+
font: 11px/1.5 ui-monospace, SFMono-Regular, monospace;
|
|
215
|
+
}
|
|
216
|
+
.ps-outbox-actions { display: flex; gap: 7px; margin-top: 13px; }
|
|
217
|
+
.ps-button {
|
|
218
|
+
appearance: none;
|
|
219
|
+
display: inline-flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
gap: 5px;
|
|
222
|
+
padding: 5px 10px;
|
|
223
|
+
border: 1px solid transparent;
|
|
224
|
+
border-radius: 7px;
|
|
225
|
+
font: inherit;
|
|
226
|
+
font-weight: 600;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
|
|
229
|
+
}
|
|
230
|
+
.ps-button svg { width: 13px; height: 13px; }
|
|
231
|
+
.ps-button:disabled { cursor: not-allowed; opacity: .4; }
|
|
232
|
+
.ps-button-primary { color: #e0f2fe; border-color: #075985; background: rgba(7, 89, 133, .7); }
|
|
233
|
+
.ps-button-primary:not(:disabled):hover { background: #0369a1; }
|
|
234
|
+
.ps-button-danger { color: #fca5a5; border-color: #7f1d1d; background: rgba(69, 10, 10, .16); }
|
|
235
|
+
.ps-button-danger:not(:disabled):hover { background: rgba(127, 29, 29, .7); }
|
|
236
|
+
.ps-outbox-action-error { margin-top: 8px; color: #fca5a5; font-size: 12px; }
|
|
237
|
+
.ps-outbox-empty {
|
|
238
|
+
display: grid;
|
|
239
|
+
place-items: center;
|
|
240
|
+
min-height: 150px;
|
|
241
|
+
padding: 28px 16px;
|
|
242
|
+
border: 1px dashed #3f3f46;
|
|
243
|
+
border-radius: 14px;
|
|
244
|
+
color: #a8a29e;
|
|
245
|
+
background: rgba(39, 39, 42, .3);
|
|
246
|
+
text-align: center;
|
|
247
|
+
}
|
|
248
|
+
.ps-outbox-empty-mark {
|
|
249
|
+
display: grid;
|
|
250
|
+
place-items: center;
|
|
251
|
+
width: 34px;
|
|
252
|
+
height: 34px;
|
|
253
|
+
margin: 0 auto 9px;
|
|
254
|
+
border: 1px solid #3f3f46;
|
|
255
|
+
border-radius: 999px;
|
|
256
|
+
color: #86efac;
|
|
257
|
+
background: #1c2920;
|
|
258
|
+
}
|
|
259
|
+
.ps-outbox-empty-mark svg { width: 17px; height: 17px; }
|
|
260
|
+
.ps-outbox-empty strong { display: block; margin-bottom: 2px; color: #e7e5e4; }
|
|
261
|
+
html[data-ps-outbox-transition]::view-transition-old(root),
|
|
262
|
+
html[data-ps-outbox-transition]::view-transition-new(root) {
|
|
263
|
+
animation: none;
|
|
264
|
+
}
|
|
265
|
+
html[data-ps-outbox-transition]::view-transition-group(*) {
|
|
266
|
+
animation-duration: 240ms;
|
|
267
|
+
animation-timing-function: cubic-bezier(.22, 1, .36, 1);
|
|
268
|
+
}
|
|
269
|
+
.ps-theme-light .ps-outbox {
|
|
270
|
+
color: #292524;
|
|
271
|
+
background:
|
|
272
|
+
radial-gradient(circle at 8% 0%, rgba(232, 59, 50, .1), transparent 30%),
|
|
273
|
+
linear-gradient(145deg, #fafaf9 0%, #f5f5f4 100%);
|
|
274
|
+
}
|
|
275
|
+
.ps-theme-light .ps-outbox-mark {
|
|
276
|
+
color: #dc2626;
|
|
277
|
+
border-color: #e7e5e4;
|
|
278
|
+
background: rgba(255, 255, 255, .82);
|
|
279
|
+
box-shadow: 0 8px 22px rgba(41, 37, 36, .1);
|
|
280
|
+
}
|
|
281
|
+
.ps-theme-light .ps-outbox-title,
|
|
282
|
+
.ps-theme-light .ps-outbox-name,
|
|
283
|
+
.ps-theme-light .ps-outbox-empty strong {
|
|
284
|
+
color: #1c1917;
|
|
285
|
+
}
|
|
286
|
+
.ps-theme-light .ps-outbox-subtitle,
|
|
287
|
+
.ps-theme-light .ps-outbox-meta,
|
|
288
|
+
.ps-theme-light .ps-outbox-details {
|
|
289
|
+
color: #78716c;
|
|
290
|
+
}
|
|
291
|
+
.ps-theme-light .ps-outbox-meta strong { color: #44403c; }
|
|
292
|
+
.ps-theme-light .ps-outbox-count {
|
|
293
|
+
color: #57534e;
|
|
294
|
+
border-color: #d6d3d1;
|
|
295
|
+
background: rgba(255, 255, 255, .8);
|
|
296
|
+
}
|
|
297
|
+
.ps-theme-light .ps-outbox-card {
|
|
298
|
+
border-color: #d6d3d1;
|
|
299
|
+
background: linear-gradient(155deg, rgba(255, 255, 255, .98), rgba(245, 245, 244, .98));
|
|
300
|
+
box-shadow: 0 14px 34px rgba(41, 37, 36, .1);
|
|
301
|
+
}
|
|
302
|
+
.ps-theme-light .ps-outbox-connector { background: #d6d3d1; }
|
|
303
|
+
.ps-theme-light .ps-outbox-details summary:hover { color: #292524; }
|
|
304
|
+
.ps-theme-light .ps-outbox-details pre {
|
|
305
|
+
color: #44403c;
|
|
306
|
+
border-color: #e7e5e4;
|
|
307
|
+
background: rgba(255, 255, 255, .86);
|
|
308
|
+
}
|
|
309
|
+
.ps-theme-light .ps-outbox-empty {
|
|
310
|
+
color: #78716c;
|
|
311
|
+
border-color: #d6d3d1;
|
|
312
|
+
background: rgba(255, 255, 255, .55);
|
|
313
|
+
}
|
|
314
|
+
.ps-theme-light .ps-outbox-empty-mark {
|
|
315
|
+
color: #15803d;
|
|
316
|
+
border-color: #bbf7d0;
|
|
317
|
+
background: #f0fdf4;
|
|
318
|
+
}
|
|
319
|
+
.ps-theme-light .ps-button-primary {
|
|
320
|
+
color: #075985;
|
|
321
|
+
border-color: #7dd3fc;
|
|
322
|
+
background: #e0f2fe;
|
|
323
|
+
}
|
|
324
|
+
.ps-theme-light .ps-button-primary:not(:disabled):hover { background: #bae6fd; }
|
|
325
|
+
.ps-theme-light .ps-button-danger {
|
|
326
|
+
color: #b91c1c;
|
|
327
|
+
border-color: #fecaca;
|
|
328
|
+
background: #fff7f7;
|
|
329
|
+
}
|
|
330
|
+
.ps-theme-light .ps-button-danger:not(:disabled):hover { background: #fee2e2; }
|
|
331
|
+
`;
|
|
332
|
+
function PartyStackLogo({ theme }) {
|
|
333
|
+
const id = useId().replaceAll(":", "");
|
|
334
|
+
const gradientId = `ps-ball-${id}`;
|
|
335
|
+
const shadowId = `ps-shadow-${id}`;
|
|
336
|
+
return (_jsxs("svg", { "aria-hidden": "true", style: {
|
|
337
|
+
display: "block",
|
|
338
|
+
height: "100%",
|
|
339
|
+
width: "100%",
|
|
340
|
+
}, viewBox: "0 0 1200 300", children: [_jsxs("defs", { children: [_jsxs("radialGradient", { cx: "69%", cy: "24%", id: gradientId, r: "82%", children: [_jsx("stop", { offset: "0", stopColor: "#fff" }), _jsx("stop", { offset: ".38", stopColor: "#fff" }), _jsx("stop", { offset: ".62", stopColor: "#f8f7f3" }), _jsx("stop", { offset: ".82", stopColor: "#e1dfda" }), _jsx("stop", { offset: "1", stopColor: "#b7b3ad" })] }), _jsx("filter", { height: "170%", id: shadowId, width: "160%", x: "-30%", y: "-30%", children: _jsx("feDropShadow", { dx: "3", dy: "6", floodColor: "#681611", floodOpacity: ".28", stdDeviation: "5" }) })] }), _jsxs("g", { transform: "translate(22 22) scale(.5)", children: [_jsx("path", { d: "M96 64h184c81 0 136 55 136 136s-55 136-136 136h-56v112H96V64Z", fill: "#e83b32" }), _jsxs("g", { filter: `url(#${shadowId})`, children: [_jsx("circle", { cx: "258", cy: "200", fill: `url(#${gradientId})`, r: "60" }), _jsx("ellipse", { cx: "279", cy: "177", fill: "#fff", opacity: ".92", rx: "8.5", ry: "10.5" })] })] }), _jsx("text", { fill: theme === "dark" ? "#f7f5f0" : "#171717", fontFamily: "Avenir Next, Avenir, Helvetica Neue, Arial, sans-serif", fontSize: "124", fontWeight: "700", letterSpacing: "-3", x: "310", y: "196", children: "Party Stack" })] }));
|
|
341
|
+
}
|
|
342
|
+
function PartyStackLogomark() {
|
|
343
|
+
const id = useId().replaceAll(":", "");
|
|
344
|
+
const gradientId = `ps-mark-ball-${id}`;
|
|
345
|
+
const shadowId = `ps-mark-shadow-${id}`;
|
|
346
|
+
return (_jsxs("svg", { "aria-hidden": "true", style: {
|
|
347
|
+
display: "block",
|
|
348
|
+
height: "100%",
|
|
349
|
+
width: "100%",
|
|
350
|
+
}, viewBox: "0 0 512 512", children: [_jsxs("defs", { children: [_jsxs("radialGradient", { cx: "69%", cy: "24%", id: gradientId, r: "82%", children: [_jsx("stop", { offset: "0", stopColor: "#fff" }), _jsx("stop", { offset: ".38", stopColor: "#fff" }), _jsx("stop", { offset: ".62", stopColor: "#f8f7f3" }), _jsx("stop", { offset: ".82", stopColor: "#e1dfda" }), _jsx("stop", { offset: "1", stopColor: "#b7b3ad" })] }), _jsx("filter", { height: "170%", id: shadowId, width: "160%", x: "-30%", y: "-30%", children: _jsx("feDropShadow", { dx: "3", dy: "6", floodColor: "#681611", floodOpacity: ".28", stdDeviation: "5" }) })] }), _jsx("path", { d: "M96 64h184c81 0 136 55 136 136s-55 136-136 136h-56v112H96V64Z", fill: "#e83b32" }), _jsxs("g", { filter: `url(#${shadowId})`, children: [_jsx("circle", { cx: "258", cy: "200", fill: `url(#${gradientId})`, r: "60" }), _jsx("ellipse", { cx: "279", cy: "177", fill: "#fff", opacity: ".92", rx: "8.5", ry: "10.5" })] })] }));
|
|
351
|
+
}
|
|
352
|
+
function PartyStackPluginName({ theme }) {
|
|
353
|
+
return (_jsx("div", { style: { height: 30, width: 120 }, children: _jsx(PartyStackLogo, { theme: theme }) }));
|
|
354
|
+
}
|
|
355
|
+
function OutboxPanel({ children, theme }) {
|
|
356
|
+
return (_jsx("div", { className: `ps-outbox-root ps-theme-${theme}`, children: _jsxs("div", { className: "ps-outbox", children: [_jsx("style", { children: styles }), children] }) }));
|
|
357
|
+
}
|
|
358
|
+
function statusClass(entry) {
|
|
359
|
+
return `ps-outbox-status ps-status-${entry.status}`;
|
|
360
|
+
}
|
|
361
|
+
function statusLabel(entry) {
|
|
362
|
+
switch (entry.status) {
|
|
363
|
+
case "queued":
|
|
364
|
+
return "Waiting";
|
|
365
|
+
case "executing":
|
|
366
|
+
return "Running";
|
|
367
|
+
case "failed":
|
|
368
|
+
return "Failed";
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
const relativeTime = new Intl.RelativeTimeFormat(undefined, { numeric: "auto" });
|
|
372
|
+
function formatRelativeTime(timestamp, now) {
|
|
373
|
+
const elapsedMs = Math.max(0, now - timestamp);
|
|
374
|
+
if (elapsedMs < 60_000) {
|
|
375
|
+
return "a few seconds ago";
|
|
376
|
+
}
|
|
377
|
+
const minutes = -Math.round(elapsedMs / 60_000);
|
|
378
|
+
if (Math.abs(minutes) < 60) {
|
|
379
|
+
return relativeTime.format(minutes, "minute");
|
|
380
|
+
}
|
|
381
|
+
const hours = Math.round(minutes / 60);
|
|
382
|
+
if (Math.abs(hours) < 24) {
|
|
383
|
+
return relativeTime.format(hours, "hour");
|
|
384
|
+
}
|
|
385
|
+
return relativeTime.format(Math.round(hours / 24), "day");
|
|
386
|
+
}
|
|
387
|
+
function useRelativeTimeNow() {
|
|
388
|
+
const [now, setNow] = useState(() => Date.now());
|
|
389
|
+
useEffect(() => {
|
|
390
|
+
const interval = setInterval(() => {
|
|
391
|
+
setNow(Date.now());
|
|
392
|
+
}, 60_000);
|
|
393
|
+
return () => {
|
|
394
|
+
clearInterval(interval);
|
|
395
|
+
};
|
|
396
|
+
}, []);
|
|
397
|
+
return now;
|
|
398
|
+
}
|
|
399
|
+
function cardClass(entry) {
|
|
400
|
+
return `ps-outbox-card ps-card-${entry.status}`;
|
|
401
|
+
}
|
|
402
|
+
function OutboxEntryCard({ entry, outbox, now, }) {
|
|
403
|
+
const [pending, setPending] = useState();
|
|
404
|
+
const [actionError, setActionError] = useState();
|
|
405
|
+
const run = async (action) => {
|
|
406
|
+
setPending(action);
|
|
407
|
+
setActionError(undefined);
|
|
408
|
+
try {
|
|
409
|
+
if (action === "retry") {
|
|
410
|
+
await outbox.retry(entry.id);
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
await outbox.remove(entry.id);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
catch (error) {
|
|
417
|
+
setActionError(error instanceof Error ? error.message : String(error));
|
|
418
|
+
}
|
|
419
|
+
finally {
|
|
420
|
+
setPending(undefined);
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
return (_jsxs("article", { className: cardClass(entry), children: [_jsxs("div", { className: "ps-outbox-card-header", children: [_jsx("div", { className: "ps-outbox-name", children: entry.request.actionTypeName }), _jsxs("span", { className: statusClass(entry), children: [_jsx("span", { className: "ps-status-dot" }), statusLabel(entry)] })] }), _jsxs("div", { className: "ps-outbox-meta", children: [_jsxs("span", { children: [_jsx("strong", { children: entry.attempts }), " ", entry.attempts === 1 ? "attempt" : "attempts"] }), _jsx("span", { "aria-hidden": "true", className: "ps-outbox-meta-divider" }), _jsxs("span", { className: "ps-outbox-time", title: new Date(entry.createdAt).toLocaleString(), children: ["Queued ", formatRelativeTime(entry.createdAt, now)] }), !entry.retryable ? _jsx("span", { className: "ps-outbox-permanent", children: "Won't retry" }) : null] }), entry.lastError ? _jsx("div", { className: "ps-outbox-error", children: entry.lastError.message }) : null, _jsxs("details", { className: "ps-outbox-details", children: [_jsx("summary", { children: "Parameters" }), _jsx("pre", { children: JSON.stringify(entry.request.parameters, null, 2) })] }), _jsxs("div", { className: "ps-outbox-actions", children: [_jsxs("button", { className: "ps-button ps-button-primary", type: "button", disabled: !entry.retryable || entry.status === "executing" || pending !== undefined, onClick: () => {
|
|
424
|
+
void run("retry");
|
|
425
|
+
}, children: [_jsx(ArrowPathIcon, { "aria-hidden": "true" }), pending === "retry" ? "Retrying…" : "Retry"] }), _jsxs("button", { className: "ps-button ps-button-danger", type: "button", disabled: entry.status === "executing" || pending !== undefined, onClick: () => {
|
|
426
|
+
void run("remove");
|
|
427
|
+
}, children: [_jsx(TrashIcon, { "aria-hidden": "true" }), pending === "remove" ? "Removing…" : "Remove"] })] }), actionError ? _jsx("div", { className: "ps-outbox-action-error", children: actionError }) : null] }));
|
|
428
|
+
}
|
|
429
|
+
function outboxSnapshotKey(entries) {
|
|
430
|
+
return entries
|
|
431
|
+
.map((entry) => `${entry.id}:${entry.status}:${entry.updatedAt}:${entry.attempts}`)
|
|
432
|
+
.join("|");
|
|
433
|
+
}
|
|
434
|
+
function useTransitionedEntries(entries) {
|
|
435
|
+
const [visibleEntries, setVisibleEntries] = useState(entries);
|
|
436
|
+
const snapshotKey = outboxSnapshotKey(entries);
|
|
437
|
+
const previousKey = useRef(snapshotKey);
|
|
438
|
+
useEffect(() => {
|
|
439
|
+
if (snapshotKey === previousKey.current) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
previousKey.current = snapshotKey;
|
|
443
|
+
let cancelled = false;
|
|
444
|
+
queueMicrotask(() => {
|
|
445
|
+
if (cancelled)
|
|
446
|
+
return;
|
|
447
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches ||
|
|
448
|
+
!document.startViewTransition) {
|
|
449
|
+
setVisibleEntries(entries);
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
document.documentElement.dataset.psOutboxTransition = "";
|
|
453
|
+
try {
|
|
454
|
+
const transition = document.startViewTransition(() => {
|
|
455
|
+
flushSync(() => {
|
|
456
|
+
setVisibleEntries(entries);
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
void transition.finished.finally(() => {
|
|
460
|
+
delete document.documentElement.dataset.psOutboxTransition;
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
catch {
|
|
464
|
+
delete document.documentElement.dataset.psOutboxTransition;
|
|
465
|
+
setVisibleEntries(entries);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
return () => {
|
|
469
|
+
cancelled = true;
|
|
470
|
+
};
|
|
471
|
+
}, [entries, snapshotKey]);
|
|
472
|
+
return visibleEntries;
|
|
473
|
+
}
|
|
474
|
+
function OutboxRows({ outbox, theme }) {
|
|
475
|
+
const now = useRelativeTimeNow();
|
|
476
|
+
const transitionScope = `ps-outbox-${useId().replaceAll(":", "")}`;
|
|
477
|
+
const { data } = useLiveQuery((query) => query.from({ entry: outbox.collection }).orderBy(({ entry }) => entry.sequence, "asc"), [outbox]);
|
|
478
|
+
const visibleData = useTransitionedEntries(data);
|
|
479
|
+
return (_jsxs(OutboxPanel, { theme: theme, children: [_jsx("header", { className: "ps-outbox-header", children: _jsxs("div", { className: "ps-outbox-heading", children: [_jsx("div", { className: "ps-outbox-mark", children: _jsx(InboxStackIcon, { "aria-hidden": "true" }) }), _jsxs("div", { children: [_jsxs("div", { className: "ps-outbox-title-row", children: [_jsx("h2", { className: "ps-outbox-title", children: "Outbox" }), _jsx("span", { className: "ps-outbox-count", children: visibleData.length })] }), _jsx("p", { className: "ps-outbox-subtitle", children: "Actions waiting to sync" })] })] }) }), visibleData.length === 0 ? (_jsx("div", { className: "ps-outbox-empty", style: {
|
|
480
|
+
viewTransitionName: `${transitionScope}-empty`,
|
|
481
|
+
}, children: _jsxs("div", { children: [_jsx("span", { className: "ps-outbox-empty-mark", children: _jsx(CheckIcon, { "aria-hidden": "true" }) }), _jsx("strong", { children: "Queue is clear" }), "Actions will appear here while they wait to sync."] }) })) : (_jsx("div", { className: "ps-outbox-track", children: visibleData.map((entry, index) => (_jsxs("div", { className: "ps-outbox-step", style: {
|
|
482
|
+
viewTransitionName: `${transitionScope}-entry-${entry.id.replaceAll(/[^a-zA-Z0-9_-]/g, "-")}`,
|
|
483
|
+
}, children: [index > 0 ? _jsx("span", { "aria-hidden": "true", className: "ps-outbox-connector" }) : null, _jsx("div", { className: "ps-outbox-node", children: _jsx(OutboxEntryCard, { entry: entry, now: now, outbox: outbox }) })] }, entry.id))) }))] }));
|
|
484
|
+
}
|
|
485
|
+
function OntologyPanel({ ontology, theme }) {
|
|
486
|
+
return _jsx(OutboxRows, { outbox: ontology.outbox, theme: theme });
|
|
487
|
+
}
|
|
488
|
+
function OntologyTrigger({ theme }) {
|
|
489
|
+
const dark = theme === "dark";
|
|
490
|
+
return (_jsx("div", { "aria-label": "Open Ontology devtools", role: "button", style: {
|
|
491
|
+
alignItems: "center",
|
|
492
|
+
background: dark
|
|
493
|
+
? "linear-gradient(145deg, #2d2d31, #171719)"
|
|
494
|
+
: "linear-gradient(145deg, #fff, #f5f5f4)",
|
|
495
|
+
border: dark ? "1px solid rgba(255,255,255,.16)" : "1px solid rgba(23,23,23,.14)",
|
|
496
|
+
borderRadius: "999px",
|
|
497
|
+
boxShadow: dark
|
|
498
|
+
? "0 10px 30px rgba(0,0,0,.34), 0 0 0 4px rgba(232,59,50,.11)"
|
|
499
|
+
: "0 10px 28px rgba(28,25,23,.16), 0 0 0 4px rgba(232,59,50,.09)",
|
|
500
|
+
cursor: "pointer",
|
|
501
|
+
display: "flex",
|
|
502
|
+
height: 48,
|
|
503
|
+
justifyContent: "center",
|
|
504
|
+
padding: 8,
|
|
505
|
+
width: 48,
|
|
506
|
+
}, title: "Open Ontology devtools", children: _jsx(PartyStackLogomark, {}) }));
|
|
507
|
+
}
|
|
508
|
+
export function OntologyDevtools({ ontology, }) {
|
|
509
|
+
return (_jsx(TanStackDevtools, { plugins: [
|
|
510
|
+
{
|
|
511
|
+
id: "party-stack-ontology",
|
|
512
|
+
name: (_element, { theme }) => _jsx(PartyStackPluginName, { theme: theme }),
|
|
513
|
+
render: (_element, { theme }) => (_jsx(OntologyPanel, { ontology: ontology, theme: theme })),
|
|
514
|
+
defaultOpen: true,
|
|
515
|
+
},
|
|
516
|
+
], config: {
|
|
517
|
+
customTrigger: (_element, { theme }) => _jsx(OntologyTrigger, { theme: theme }),
|
|
518
|
+
} }));
|
|
519
|
+
}
|
|
520
|
+
//# sourceMappingURL=OntologyDevtools.js.map
|
|
@@ -0,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EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,GAAI;gBACrE,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC7B,KAAC,aAAa,IAAC,QAAQ,EAAE,QAAwB,EAAE,KAAK,EAAE,KAAK,GAAI,CACtE;gBACD,WAAW,EAAE,IAAI;aACpB;SACJ,EACD,MAAM,EAAE;YACJ,aAAa,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,GAAI;SAC5E,GACH,CACL,CAAC;AACN,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,KAAK,qBAAqB,GAC7B,MAAM,uBAAuB,CAAC"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,GAEnB,MAAM,uBAAuB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@party-stack/ontology-devtools",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./lib/index.d.ts",
|
|
8
|
+
"default": "./lib/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"lib"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@heroicons/react": "^2.2.0",
|
|
16
|
+
"@tanstack/react-devtools": "^0.10.2",
|
|
17
|
+
"@party-stack/ontology": "0.4.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@bobbyfidz/react-build-config": "^0.1.1",
|
|
21
|
+
"@tanstack/db": "^0.6.14",
|
|
22
|
+
"@tanstack/react-db": "^0.1.92",
|
|
23
|
+
"@types/react": "^19.2.6",
|
|
24
|
+
"@types/react-dom": "^19.2.3",
|
|
25
|
+
"eslint": "^9.25.0",
|
|
26
|
+
"react": "^19.2.0",
|
|
27
|
+
"react-dom": "^19.2.0",
|
|
28
|
+
"typescript": "~5.8.3",
|
|
29
|
+
"vitest": "^3.1.1"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@tanstack/db": "^0.6.14",
|
|
33
|
+
"@tanstack/react-db": "^0.1.92",
|
|
34
|
+
"react": "^19.2.0",
|
|
35
|
+
"react-dom": "^19.2.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"lint": "eslint",
|
|
40
|
+
"test": "vitest run --pass-with-no-tests"
|
|
41
|
+
}
|
|
42
|
+
}
|