@coreframe/dashboard 0.3.24 → 0.3.26
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/package/shell.css
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
text-size-adjust: 100%;
|
|
21
21
|
overscroll-behavior-y: none;
|
|
22
22
|
|
|
23
|
-
color: #
|
|
24
|
-
background: #
|
|
23
|
+
color: var(--colors-dashboard-ink, #1f2937);
|
|
24
|
+
background: var(--colors-dashboard-panel, #ffffff);
|
|
25
25
|
font-family: "Inter Variable", Inter, system-ui, sans-serif;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -122,12 +122,12 @@
|
|
|
122
122
|
|
|
123
123
|
.coreframe-dashboard,
|
|
124
124
|
.coreframe-dashboard__state {
|
|
125
|
-
--dashboard-background: #
|
|
126
|
-
--dashboard-border: #dfe3e8;
|
|
127
|
-
--dashboard-foreground: #
|
|
128
|
-
--dashboard-muted: #68717d;
|
|
129
|
-
--dashboard-surface: #ffffff;
|
|
130
|
-
--dashboard-accent: #4f46e5;
|
|
125
|
+
--dashboard-background: var(--colors-dashboard-canvas, #f7f8fa);
|
|
126
|
+
--dashboard-border: var(--colors-dashboard-border, #dfe3e8);
|
|
127
|
+
--dashboard-foreground: var(--colors-dashboard-ink, #1f2937);
|
|
128
|
+
--dashboard-muted: var(--colors-dashboard-muted, #68717d);
|
|
129
|
+
--dashboard-surface: var(--colors-dashboard-panel, #ffffff);
|
|
130
|
+
--dashboard-accent: var(--colors-dashboard-accent, #4f46e5);
|
|
131
131
|
box-sizing: border-box;
|
|
132
132
|
color: var(--dashboard-foreground);
|
|
133
133
|
font-family: "Inter Variable", Inter, system-ui, sans-serif;
|
|
@@ -145,81 +145,124 @@
|
|
|
145
145
|
.coreframe-dashboard {
|
|
146
146
|
display: grid;
|
|
147
147
|
min-height: 100svh;
|
|
148
|
-
grid-template-columns:
|
|
149
|
-
background: var(--dashboard-
|
|
148
|
+
grid-template-columns: 14rem minmax(0, 1fr);
|
|
149
|
+
background: var(--dashboard-surface);
|
|
150
150
|
transition: grid-template-columns 160ms ease;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.coreframe-dashboard[data-collapsed="true"] {
|
|
154
|
-
grid-template-columns:
|
|
154
|
+
grid-template-columns: 4rem minmax(0, 1fr);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.coreframe-dashboard__sidebar {
|
|
158
158
|
z-index: 20;
|
|
159
159
|
border-right: 1px solid var(--dashboard-border);
|
|
160
|
-
background: var(--dashboard-
|
|
160
|
+
background: var(--dashboard-background);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.coreframe-dashboard__navigation {
|
|
164
164
|
position: sticky;
|
|
165
165
|
top: 0;
|
|
166
166
|
height: 100svh;
|
|
167
|
-
padding: 1rem;
|
|
167
|
+
padding: 0 0.75rem 1rem;
|
|
168
168
|
overflow: hidden auto;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
.coreframe-dashboard__sidebar-header {
|
|
172
|
+
display: flex;
|
|
173
|
+
min-height: 4.5rem;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
gap: 0.5rem;
|
|
177
|
+
padding-inline: 0.375rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
171
180
|
.coreframe-dashboard__brand {
|
|
172
181
|
display: flex;
|
|
173
|
-
min-
|
|
182
|
+
min-width: 0;
|
|
174
183
|
align-items: center;
|
|
175
|
-
gap: 0.
|
|
176
|
-
font-
|
|
184
|
+
gap: 0.625rem;
|
|
185
|
+
font-size: 0.875rem;
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
letter-spacing: -0.02em;
|
|
177
188
|
white-space: nowrap;
|
|
178
189
|
}
|
|
179
190
|
|
|
180
191
|
.coreframe-dashboard__mark {
|
|
181
192
|
display: grid;
|
|
182
|
-
width:
|
|
183
|
-
height:
|
|
193
|
+
width: 1.75rem;
|
|
194
|
+
height: 1.75rem;
|
|
184
195
|
flex: 0 0 auto;
|
|
185
196
|
place-items: center;
|
|
186
|
-
border-radius: 0.
|
|
197
|
+
border-radius: 0.375rem;
|
|
187
198
|
background: var(--dashboard-foreground);
|
|
188
|
-
color:
|
|
199
|
+
color: var(--dashboard-surface);
|
|
200
|
+
font-size: 0.875rem;
|
|
201
|
+
font-weight: 700;
|
|
189
202
|
}
|
|
190
203
|
|
|
191
204
|
.coreframe-dashboard__navigation-list {
|
|
192
205
|
display: grid;
|
|
193
|
-
gap: 0.
|
|
194
|
-
margin:
|
|
206
|
+
gap: 0.1875rem;
|
|
207
|
+
margin: 0.5rem 0 0;
|
|
195
208
|
padding: 0;
|
|
196
209
|
list-style: none;
|
|
197
210
|
}
|
|
198
211
|
|
|
199
212
|
.coreframe-dashboard__navigation-link {
|
|
200
213
|
display: flex;
|
|
201
|
-
min-height: 2.
|
|
214
|
+
min-height: 2.25rem;
|
|
215
|
+
min-width: 0;
|
|
202
216
|
align-items: center;
|
|
203
|
-
gap: 0.
|
|
204
|
-
border-radius: 0.
|
|
217
|
+
gap: 0.625rem;
|
|
218
|
+
border-radius: 0.375rem;
|
|
205
219
|
color: var(--dashboard-muted);
|
|
206
|
-
padding: 0.5rem;
|
|
220
|
+
padding: 0.375rem 0.5rem;
|
|
221
|
+
font-size: 0.8125rem;
|
|
222
|
+
font-weight: 500;
|
|
223
|
+
line-height: 1.5rem;
|
|
207
224
|
text-decoration: none;
|
|
208
225
|
white-space: nowrap;
|
|
209
226
|
}
|
|
210
227
|
|
|
211
|
-
.coreframe-dashboard__navigation-link:hover
|
|
228
|
+
.coreframe-dashboard__navigation-link:hover {
|
|
229
|
+
background: color-mix(in srgb, var(--dashboard-foreground) 5%, var(--dashboard-background));
|
|
230
|
+
color: var(--dashboard-foreground);
|
|
231
|
+
}
|
|
232
|
+
|
|
212
233
|
.coreframe-dashboard__navigation-link[aria-current="page"] {
|
|
213
|
-
background:
|
|
214
|
-
color:
|
|
234
|
+
background: color-mix(in srgb, var(--dashboard-accent) 8%, var(--dashboard-background));
|
|
235
|
+
color: var(--dashboard-foreground);
|
|
215
236
|
}
|
|
216
237
|
|
|
217
|
-
.coreframe-dashboard__navigation-
|
|
218
|
-
|
|
219
|
-
|
|
238
|
+
.coreframe-dashboard__navigation-initials {
|
|
239
|
+
display: grid;
|
|
240
|
+
width: 1.5rem;
|
|
241
|
+
height: 1.5rem;
|
|
220
242
|
flex: 0 0 auto;
|
|
221
|
-
|
|
222
|
-
|
|
243
|
+
place-items: center;
|
|
244
|
+
border-radius: 0.25rem;
|
|
245
|
+
background: color-mix(in srgb, var(--dashboard-foreground) 5%, var(--dashboard-background));
|
|
246
|
+
font-size: 0.625rem;
|
|
247
|
+
font-weight: 600;
|
|
248
|
+
line-height: 1;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.coreframe-dashboard__navigation-link[aria-current="page"]
|
|
252
|
+
.coreframe-dashboard__navigation-initials {
|
|
253
|
+
background: color-mix(in srgb, var(--dashboard-accent) 12%, var(--dashboard-background));
|
|
254
|
+
color: var(--dashboard-accent);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.coreframe-dashboard__navigation-text {
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.coreframe-dashboard[data-collapsed="true"] .coreframe-dashboard__sidebar-header,
|
|
263
|
+
.coreframe-dashboard[data-collapsed="true"] .coreframe-dashboard__navigation-link {
|
|
264
|
+
justify-content: center;
|
|
265
|
+
padding-inline: 0;
|
|
223
266
|
}
|
|
224
267
|
|
|
225
268
|
.coreframe-dashboard[data-collapsed="true"] .coreframe-dashboard__navigation-text,
|
|
@@ -239,70 +282,75 @@
|
|
|
239
282
|
}
|
|
240
283
|
|
|
241
284
|
.coreframe-dashboard__toggle {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
285
|
+
flex: 0 0 auto;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.coreframe-dashboard__toggle,
|
|
289
|
+
.coreframe-dashboard__drawer-close {
|
|
246
290
|
display: grid;
|
|
247
291
|
width: 2rem;
|
|
248
292
|
height: 2rem;
|
|
249
293
|
place-items: center;
|
|
250
|
-
border:
|
|
251
|
-
border-radius: 0.
|
|
252
|
-
background:
|
|
253
|
-
color: var(--dashboard-
|
|
254
|
-
|
|
294
|
+
border: 0;
|
|
295
|
+
border-radius: 0.375rem;
|
|
296
|
+
background: transparent;
|
|
297
|
+
color: var(--dashboard-muted);
|
|
298
|
+
padding: 0;
|
|
255
299
|
}
|
|
256
300
|
|
|
257
|
-
.coreframe-
|
|
258
|
-
|
|
301
|
+
.coreframe-dashboard__toggle:hover,
|
|
302
|
+
.coreframe-dashboard__drawer-close:hover {
|
|
303
|
+
background: color-mix(in srgb, var(--dashboard-foreground) 5%, var(--dashboard-surface));
|
|
304
|
+
color: var(--dashboard-foreground);
|
|
259
305
|
}
|
|
260
306
|
|
|
261
307
|
.coreframe-dashboard__main {
|
|
262
|
-
|
|
263
|
-
width: min(100%, 80rem);
|
|
264
|
-
padding: 4rem clamp(1.25rem, 4vw, 4rem);
|
|
308
|
+
min-width: 0;
|
|
265
309
|
}
|
|
266
310
|
|
|
267
311
|
.coreframe-dashboard__page-header {
|
|
268
|
-
|
|
312
|
+
display: flex;
|
|
313
|
+
min-height: 4.5rem;
|
|
314
|
+
align-items: center;
|
|
315
|
+
gap: 0.875rem;
|
|
316
|
+
border-bottom: 1px solid var(--dashboard-border);
|
|
317
|
+
padding: 0.75rem 1.5rem;
|
|
269
318
|
}
|
|
270
319
|
|
|
271
|
-
.coreframe-dashboard__page-
|
|
272
|
-
|
|
320
|
+
.coreframe-dashboard__page-heading {
|
|
321
|
+
min-width: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.coreframe-dashboard__page-heading h1 {
|
|
273
325
|
margin: 0;
|
|
274
|
-
font-size:
|
|
275
|
-
|
|
326
|
+
font-size: 1rem;
|
|
327
|
+
font-weight: 600;
|
|
328
|
+
letter-spacing: -0.02em;
|
|
329
|
+
line-height: 1.5;
|
|
276
330
|
}
|
|
277
331
|
|
|
278
|
-
.coreframe-dashboard__page-
|
|
279
|
-
.
|
|
280
|
-
max-width: 44rem;
|
|
281
|
-
margin: 0.65rem 0 0;
|
|
332
|
+
.coreframe-dashboard__page-heading > p {
|
|
333
|
+
margin: 0.125rem 0 0;
|
|
282
334
|
color: var(--dashboard-muted);
|
|
283
|
-
|
|
335
|
+
font-size: 0.8125rem;
|
|
336
|
+
line-height: 1.5;
|
|
284
337
|
}
|
|
285
338
|
|
|
286
|
-
.coreframe-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
font-size: 0.6875rem;
|
|
290
|
-
font-weight: 700;
|
|
291
|
-
letter-spacing: 0.08em;
|
|
292
|
-
text-transform: uppercase;
|
|
339
|
+
.coreframe-dashboard__content {
|
|
340
|
+
width: min(100%, 80rem);
|
|
341
|
+
padding: 1.5rem clamp(1.25rem, 3vw, 2rem) 3rem;
|
|
293
342
|
}
|
|
294
343
|
|
|
295
344
|
.coreframe-dashboard__pending {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
right: 1rem;
|
|
345
|
+
flex: 0 0 auto;
|
|
346
|
+
margin-left: auto;
|
|
299
347
|
color: var(--dashboard-muted);
|
|
300
|
-
font-size: 0.
|
|
348
|
+
font-size: 0.75rem;
|
|
301
349
|
}
|
|
302
350
|
|
|
303
351
|
.coreframe-dashboard__state {
|
|
304
352
|
display: flex;
|
|
305
|
-
width: min(44rem, calc(
|
|
353
|
+
width: min(44rem, calc(100% - 2.5rem));
|
|
306
354
|
min-height: 70svh;
|
|
307
355
|
flex-direction: column;
|
|
308
356
|
align-items: flex-start;
|
|
@@ -310,6 +358,29 @@
|
|
|
310
358
|
margin: 0 auto;
|
|
311
359
|
}
|
|
312
360
|
|
|
361
|
+
.coreframe-dashboard__state h1 {
|
|
362
|
+
margin: 0;
|
|
363
|
+
font-size: clamp(1.5rem, 4vw, 2rem);
|
|
364
|
+
letter-spacing: -0.025em;
|
|
365
|
+
line-height: 1.2;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.coreframe-dashboard__state > p:last-of-type {
|
|
369
|
+
max-width: 44rem;
|
|
370
|
+
margin: 0.65rem 0 0;
|
|
371
|
+
color: var(--dashboard-muted);
|
|
372
|
+
line-height: 1.6;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.coreframe-dashboard__eyebrow {
|
|
376
|
+
margin: 0 0 0.35rem;
|
|
377
|
+
color: var(--dashboard-muted);
|
|
378
|
+
font-size: 0.6875rem;
|
|
379
|
+
font-weight: 700;
|
|
380
|
+
letter-spacing: 0.08em;
|
|
381
|
+
text-transform: uppercase;
|
|
382
|
+
}
|
|
383
|
+
|
|
313
384
|
.coreframe-dashboard__button {
|
|
314
385
|
margin-top: 1rem;
|
|
315
386
|
border-radius: 0.375rem;
|
|
@@ -321,11 +392,12 @@
|
|
|
321
392
|
}
|
|
322
393
|
|
|
323
394
|
.coreframe-dashboard__toggle:focus-visible,
|
|
395
|
+
.coreframe-dashboard__drawer-close:focus-visible,
|
|
324
396
|
.coreframe-dashboard__backdrop:focus-visible,
|
|
325
397
|
.coreframe-dashboard__navigation:focus-visible,
|
|
326
398
|
.coreframe-dashboard__navigation-link:focus-visible,
|
|
327
399
|
.coreframe-dashboard__button:focus-visible {
|
|
328
|
-
outline:
|
|
400
|
+
outline: 2px solid var(--dashboard-accent);
|
|
329
401
|
outline-offset: 2px;
|
|
330
402
|
}
|
|
331
403
|
|
|
@@ -351,12 +423,6 @@
|
|
|
351
423
|
transform: translateX(0);
|
|
352
424
|
}
|
|
353
425
|
|
|
354
|
-
.coreframe-dashboard__toggle,
|
|
355
|
-
.coreframe-dashboard[data-collapsed="true"] .coreframe-dashboard__toggle {
|
|
356
|
-
top: 1rem;
|
|
357
|
-
left: 1rem;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
426
|
.coreframe-dashboard__backdrop {
|
|
361
427
|
position: fixed;
|
|
362
428
|
z-index: 10;
|
|
@@ -374,8 +440,12 @@
|
|
|
374
440
|
pointer-events: auto;
|
|
375
441
|
}
|
|
376
442
|
|
|
377
|
-
.coreframe-
|
|
378
|
-
padding-
|
|
443
|
+
.coreframe-dashboard__page-header {
|
|
444
|
+
padding-inline: 1rem;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.coreframe-dashboard__content {
|
|
448
|
+
padding: 1.25rem 1rem 2rem;
|
|
379
449
|
}
|
|
380
450
|
}
|
|
381
451
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css as e}from"../styled-system/css/css.js";import"../../styled-css.js";var t={page:e({width:`
|
|
1
|
+
import{css as e}from"../styled-system/css/css.js";import"../../styled-css.js";var t={page:e({width:`100%`,minWidth:`0`}),topbar:e({display:`flex`,alignItems:{base:`flex-start`,md:`center`},justifyContent:`space-between`,flexDirection:{base:`column`,md:`row`},gap:`1.25rem`,padding:`0 0.25rem 1.5rem`}),brand:e({display:`flex`,alignItems:`center`,gap:`0.875rem`}),brandMark:e({display:`grid`,width:`2.625rem`,height:`2.625rem`,placeItems:`center`,borderRadius:`0.75rem`,background:`gray.900`,color:`white`,fontSize:`1rem`,fontWeight:`750`,boxShadow:`0 5px 14px rgb(32 33 38 / 0.16)`}),topbarActions:e({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`0.625rem`}),eyebrow:e({margin:`0 0 0.2rem`,color:`gray.600`,fontSize:`0.65rem`,fontWeight:`700`,letterSpacing:`0.1em`,textTransform:`uppercase`}),title:e({margin:`0`,fontSize:`clamp(1.5rem, 4vw, 1.875rem)`,fontWeight:`700`,letterSpacing:`-0.035em`,lineHeight:`1.05`}),button:e({border:`1px solid token(colors.gray.300)`,borderRadius:`0.625rem`,background:`white`,color:`gray.900`,padding:`0.5625rem 0.75rem`,fontWeight:`600`,boxShadow:`0 1px 2px rgb(32 33 38 / 0.05)`,transition:`border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease`,"&:hover":{borderColor:`gray.500`,boxShadow:`0 3px 8px rgb(32 33 38 / 0.08)`,transform:`translateY(-1px)`},"&:focus-visible":{outline:`3px solid rgb(91 91 214 / 0.22)`,outlineOffset:`2px`},"&:disabled":{opacity:`0.55`}}),primaryButton:e({border:`1px solid token(colors.indigo.600)`,borderRadius:`0.625rem`,background:`indigo.600`,color:`white`,padding:`0.5625rem 0.75rem`,fontWeight:`600`,boxShadow:`0 4px 10px rgb(91 91 214 / 0.2)`,transition:`filter 150ms ease, transform 150ms ease`,"&:hover:not(:disabled)":{filter:`brightness(0.94)`,transform:`translateY(-1px)`},"&:focus-visible":{outline:`3px solid rgb(91 91 214 / 0.22)`,outlineOffset:`2px`},"&:disabled":{borderColor:`gray.300`,background:`gray.100`,color:`gray.500`,boxShadow:`none`,opacity:`1`}}),smallButton:e({border:`1px solid token(colors.gray.300)`,borderRadius:`0.5rem`,background:`white`,color:`gray.900`,padding:`0.4rem 0.625rem`,fontSize:`0.75rem`,fontWeight:`600`,transition:`border-color 150ms ease, background 150ms ease`,"&:hover":{borderColor:`indigo.600`,background:`gray.100`}}),status:e({display:`inline-flex`,alignItems:`center`,borderRadius:`999px`,gap:`0.4rem`,padding:`0.5rem 0.7rem`,fontSize:`0.75rem`,fontWeight:`650`,lineHeight:`1`,whiteSpace:`nowrap`,"&::before":{width:`0.4rem`,height:`0.4rem`,borderRadius:`50%`,background:`currentColor`,content:`''`}}),success:e({background:`green.50`,color:`green.700`}),warning:e({background:`yellow.50`,color:`yellow.700`}),danger:e({background:`red.50`,color:`red.700`}),neutral:e({background:`gray.100`,color:`gray.600`}),summary:e({position:`relative`,display:`grid`,gridTemplateColumns:{base:`1fr`,md:`minmax(0, 1.05fr) minmax(21rem, 0.95fr)`},alignItems:`center`,gap:{base:`1.5rem`,md:`2.5rem`},overflow:`hidden`,border:`1px solid token(colors.gray.200)`,borderRadius:`1rem`,background:`linear-gradient(135deg, #ffffff 20%, #f8f7ff 100%)`,padding:{base:`1.25rem`,md:`1.75rem 2rem`},boxShadow:`0 12px 35px rgb(32 33 38 / 0.055)`,"&::after":{position:`absolute`,top:`-5rem`,right:`-3rem`,width:`11rem`,height:`11rem`,borderRadius:`50%`,background:`rgb(91 91 214 / 0.06)`,content:`''`,pointerEvents:`none`}}),summaryTitle:e({margin:`0`,fontSize:`clamp(1.4rem, 3vw, 1.8rem)`,fontWeight:`680`,letterSpacing:`-0.025em`,lineHeight:`1.2`}),muted:e({maxWidth:`47.5rem`,margin:`0.5rem 0 0`,color:`gray.600`,fontSize:`0.875rem`,lineHeight:`1.55`}),summaryFacts:e({position:`relative`,zIndex:`1`,display:`grid`,gridTemplateColumns:{base:`1fr`,sm:`repeat(3, minmax(0, 1fr))`},gap:`0.625rem`,margin:`0`}),summaryFact:e({minWidth:`0`,border:`1px solid rgb(229 228 223 / 0.9)`,borderRadius:`0.75rem`,background:`rgb(255 255 255 / 0.8)`,padding:`0.875rem`,boxShadow:`0 2px 10px rgb(32 33 38 / 0.035)`,"& dt":{color:`gray.500`,fontSize:`0.625rem`,fontWeight:`700`,letterSpacing:`0.035em`,textTransform:`uppercase`},"& dd":{margin:`0.35rem 0 0`,fontSize:`0.925rem`,fontWeight:`650`,lineHeight:`1.3`}}),grid:e({display:`grid`,gridTemplateColumns:{base:`1fr`,md:`repeat(2, minmax(0, 1fr))`},gap:`1rem`,paddingTop:`1rem`}),section:e({minWidth:`0`,gridColumn:{base:`auto`,md:`1 / -1`},border:`1px solid token(colors.gray.200)`,borderRadius:`1rem`,background:`white`,padding:{base:`1.125rem`,md:`1.375rem 1.5rem`},boxShadow:`0 5px 18px rgb(32 33 38 / 0.035)`}),sectionHeader:e({marginBottom:`1rem`,"& h2":{margin:`0`,fontSize:`1.05rem`,fontWeight:`680`,letterSpacing:`-0.015em`},"& p":{margin:`0.3rem 0 0`,color:`gray.600`,fontSize:`0.8125rem`,lineHeight:`1.45`}}),environmentNotice:e({margin:`0.75rem 0`,borderRadius:`0.625rem`,background:`yellow.50`,color:`yellow.700`,padding:`0.625rem 0.75rem`,fontSize:`0.75rem`,lineHeight:`1.45`}),environmentTableFrame:e({overflowX:`auto`}),environmentTable:e({width:`100%`,borderCollapse:`collapse`,textAlign:`left`,"& th, & td":{borderTop:`1px solid token(colors.gray.200)`,padding:`0.75rem`,verticalAlign:`top`,fontSize:`0.75rem`},"& thead th":{borderTop:`0`,color:`gray.500`,fontSize:`0.65rem`,fontWeight:`700`,letterSpacing:`0.04em`,textTransform:`uppercase`},"& tbody th":{minWidth:`16rem`,fontWeight:`600`},"& code":{fontSize:`0.75rem`},"& tbody th span":{display:`block`,maxWidth:`28rem`,marginTop:`0.25rem`,color:`gray.600`,fontWeight:`400`,lineHeight:`1.4`}}),environmentState:e({display:`inline-flex`,borderRadius:`999px`,background:`gray.100`,color:`gray.600`,padding:`0.3125rem 0.5rem`,fontSize:`0.6875rem`,fontWeight:`650`,lineHeight:`1`,whiteSpace:`nowrap`}),environmentStateOk:e({background:`green.50`,color:`green.700`}),environmentStateMissing:e({background:`red.50`,color:`red.700`}),environmentStatePending:e({background:`yellow.50`,color:`yellow.800`}),list:e({listStyle:`none`,margin:`0`,padding:`0`}),empty:e({borderTop:`1px solid token(colors.gray.200)`,paddingTop:`0.875rem`,"& strong":{fontSize:`0.8125rem`},"& p":{margin:`0.25rem 0 0`,color:`gray.600`,fontSize:`0.8125rem`}}),error:e({margin:`0.75rem 0 0`,color:`red.700`,fontSize:`0.8125rem`}),findingRow:e({borderTop:`1px solid token(colors.gray.200)`,padding:`1.125rem 0`,"&:first-child":{borderTop:`0`,paddingTop:`0.125rem`},"&:last-child":{paddingBottom:`0.125rem`}}),findingTitle:e({display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:`0.5rem`,"& h3":{margin:`0`,fontSize:`0.9rem`,fontWeight:`650`}}),findingArea:e({color:`gray.500`,fontSize:`0.6875rem`,fontWeight:`700`,letterSpacing:`0.04em`,textTransform:`uppercase`,whiteSpace:`nowrap`}),findingStatus:e({display:`inline-flex`,marginLeft:`auto`,borderRadius:`999px`,padding:`0.3125rem 0.5rem`,fontSize:`0.75rem`,fontWeight:`650`,lineHeight:`1`,whiteSpace:`nowrap`}),dot:e({width:`0.4375rem`,height:`0.4375rem`,flex:`0 0 auto`,borderRadius:`50%`}),successDot:e({background:`green.700`}),warningDot:e({background:`yellow.700`}),dangerDot:e({background:`red.700`}),evidence:e({display:`flex`,flexWrap:`wrap`,gap:`0.375rem 1.125rem`,margin:`0.625rem 0 0 0.9375rem`,"& > div":{display:`flex`,alignItems:`baseline`,gap:`0.3125rem`},"& dt":{color:`gray.500`,fontSize:`0.6875rem`,fontWeight:`700`,textTransform:`uppercase`},"& dd":{margin:`0`,fontSize:`0.75rem`,fontWeight:`600`}}),actions:e({display:`grid`,gap:`0.5rem`,margin:`0.75rem 0 0 0.9375rem`,"& a":{width:`fit-content`,color:`indigo.600`,fontSize:`0.8125rem`,fontWeight:`600`}}),action:e({display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:`0.5rem`,"& > span:first-child":{fontSize:`0.8125rem`,fontWeight:`600`}}),linkRow:e({borderTop:`1px solid token(colors.gray.200)`,"&:first-child":{borderTop:`0`},"& a":{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`1rem`,padding:`0.6875rem 0`,color:`indigo.600`,fontWeight:`600`,textDecoration:`none`,"&:hover":{textDecoration:`underline`}}})};export{t as default};
|
|
@@ -2,7 +2,7 @@ import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ReactElemen
|
|
|
2
2
|
|
|
3
3
|
//#region src/web/ui/index.d.ts
|
|
4
4
|
interface PageProps extends HTMLAttributes<HTMLDivElement> {}
|
|
5
|
-
/** Content layout for a dashboard route. The
|
|
5
|
+
/** Content layout for a dashboard route. The shell owns the heading and content insets. */
|
|
6
6
|
declare function Page({
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect as e,useRef as t,useState as n}from"react";import{Link as r,NavLink as i,Navigate as a,Outlet as o,isRouteErrorResponse as s,useLocation as c,useNavigation as l,useRouteError as u}from"react-router";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p({pages:r}){let a=c(),s=l(),[u,p]=n(()=>globalThis.window!==void 0&&globalThis.matchMedia(`(max-width: 47.999rem)`).matches),[m,h]=n(!1),[g,v]=n(!1),y=t(null),b=t(null),x=t(!1),S=_(r,a.pathname);e(()=>{let e=globalThis.matchMedia(`(max-width: 47.999rem)`),t=()=>p(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),e(()=>{u&&(m?b.current?.focus():x.current&&y.current?.focus(),x.current=m)},[u,m]),e(()=>{if(!m)return;let e=e=>{e.key===`Escape`&&h(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[m]);let C=u?m:!g;return f(`div`,{className:`coreframe-dashboard`,"data-collapsed":!u&&g?`true`:`false`,"data-drawer-open":u&&m?`true`:`false`,children:[d(`button`,{
|
|
1
|
+
import{useEffect as e,useRef as t,useState as n}from"react";import{Link as r,NavLink as i,Navigate as a,Outlet as o,isRouteErrorResponse as s,useLocation as c,useNavigation as l,useRouteError as u}from"react-router";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p({pages:r}){let a=c(),s=l(),[u,p]=n(()=>globalThis.window!==void 0&&globalThis.matchMedia(`(max-width: 47.999rem)`).matches),[m,h]=n(!1),[g,v]=n(!1),y=t(null),b=t(null),x=t(!1),S=_(r,a.pathname);e(()=>{let e=globalThis.matchMedia(`(max-width: 47.999rem)`),t=()=>p(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),e(()=>{u&&(m?b.current?.focus():x.current&&y.current?.focus(),x.current=m)},[u,m]),e(()=>{if(!m)return;let e=e=>{e.key===`Escape`&&h(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[m]);let C=u?m:!g;return f(`div`,{className:`coreframe-dashboard`,"data-collapsed":!u&&g?`true`:`false`,"data-drawer-open":u&&m?`true`:`false`,children:[d(`button`,{type:`button`,className:`coreframe-dashboard__backdrop`,"aria-label":`Close dashboard navigation`,tabIndex:u&&m?0:-1,onClick:()=>h(!1)}),d(`aside`,{className:`coreframe-dashboard__sidebar`,role:u?`dialog`:void 0,"aria-label":u?`Dashboard navigation`:void 0,"aria-modal":u&&m?!0:void 0,"aria-hidden":u&&!m?!0:void 0,inert:u&&!m?!0:void 0,children:f(`nav`,{ref:b,id:`coreframe-dashboard-navigation`,className:`coreframe-dashboard__navigation`,"aria-label":`Dashboard`,tabIndex:u?-1:void 0,children:[f(`div`,{className:`coreframe-dashboard__sidebar-header`,children:[f(`div`,{className:`coreframe-dashboard__brand`,"aria-label":`Coreframe Dashboard`,children:[d(`span`,{"aria-hidden":`true`,className:`coreframe-dashboard__mark`,children:`C`}),d(`span`,{className:`coreframe-dashboard__navigation-text`,children:`Coreframe`})]}),u?d(`button`,{type:`button`,className:`coreframe-dashboard__drawer-close`,"aria-label":`Close dashboard navigation`,onClick:()=>h(!1),children:d(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,"aria-hidden":`true`,children:d(`path`,{d:`m6 6 12 12M6 18 18 6`})})}):null]}),r.length>0?d(`ul`,{className:`coreframe-dashboard__navigation-list`,children:r.map(e=>d(`li`,{children:f(i,{className:`coreframe-dashboard__navigation-link`,to:`/${e.path}`,title:e.title,onClick:()=>h(!1),children:[d(`span`,{"aria-hidden":`true`,className:`coreframe-dashboard__navigation-initials`,children:e.title.match(/[\p{L}\p{N}]+/gu)?.slice(0,2).map(e=>Array.from(e)[0]).join(``).toUpperCase()}),d(`span`,{className:`coreframe-dashboard__navigation-text`,children:e.title})]})},e.id))}):d(`p`,{className:`coreframe-dashboard__navigation-empty`,children:`No pages`})]})}),f(`main`,{className:`coreframe-dashboard__main`,inert:u&&m?!0:void 0,children:[f(`header`,{className:`coreframe-dashboard__page-header`,children:[d(`button`,{ref:y,type:`button`,className:`coreframe-dashboard__toggle`,"aria-controls":`coreframe-dashboard-navigation`,"aria-expanded":C,"aria-label":C?`Collapse dashboard navigation`:`Expand dashboard navigation`,title:C?`Collapse dashboard navigation`:`Expand dashboard navigation`,onClick:()=>{u?h(e=>!e):v(e=>!e)},children:f(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[d(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`3`}),d(`path`,{d:`M9 3v18`}),d(`path`,{d:C?`m16 9-3 3 3 3`:`m13 9 3 3-3 3`})]})}),S?f(`div`,{className:`coreframe-dashboard__page-heading`,children:[d(`h1`,{children:S.title}),S.description?d(`p`,{children:S.description}):null]}):null,s.state===`idle`?null:d(`div`,{className:`coreframe-dashboard__pending`,role:`status`,children:`Loading page…`})]}),d(`div`,{className:`coreframe-dashboard__content`,children:d(o,{})})]})]})}function m({pages:e}){let t=e[0];return t?d(a,{replace:!0,to:`/${t.path}`}):d(h,{})}function h(){return f(`section`,{className:`coreframe-dashboard__state`,"aria-labelledby":`dashboard-empty-title`,children:[d(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Dashboard`}),d(`h1`,{id:`dashboard-empty-title`,children:`No dashboard pages yet`}),f(`p`,{children:[`Add a page under `,d(`code`,{children:`dashboard/pages/`}),` or register a plugin in`,` `,d(`code`,{children:`dashboard.config.ts`}),`.`]})]})}function g(){let e=u(),t=s(e)&&e.status===404,n=import.meta.env.DEV&&e instanceof Error?e.message:t?`The requested dashboard page does not exist.`:`The dashboard hit an unexpected error.`;return f(`main`,{className:`coreframe-dashboard__state`,children:[d(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),d(`h1`,{children:t?`Page not found`:`Dashboard unavailable`}),d(`p`,{children:n}),d(r,{className:`coreframe-dashboard__button`,to:`/`,children:`Go to dashboard`})]})}function _(e,t){let n=t.split(`/`).filter(Boolean)[0];return e.find(e=>e.path===n)??(n?void 0:e[0])}export{h as DashboardEmptyState,g as DashboardErrorBoundary,m as DashboardIndexRedirect,p as DashboardShell};
|
package/dist/package/worker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createDashboardPluginDispatcher as e}from"./api/dispatcher.js";import{getDashboardRequestId as t,isSameOriginDashboardMutation as n}from"./host-policy.js";const r=`/__dashboard`,i=`${r}/api`,a=new WeakMap;function o(n){let r=e(n.plugins,{getRequestId:t});return(e,t)=>{let n=new URL(e.url);return!d(n.pathname)||!t.DEPLOY_ENV?null:c(e,t,n,t.DEPLOY_ENV,r)}}function s(e,t,n){if(!d(new URL(e.url).pathname)||!t.DEPLOY_ENV)return null;let r=n.plugins,i=a.get(r);return i||(i=o(n),a.set(r,i)),i(e,t)}async function c(e,t,a,o,s){if(!t.DASHBOARD_PASSWORD)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});let c=m(e.headers.get(`authorization`));if(!c||!await h(c,t.DASHBOARD_PASSWORD))return new Response(`Authentication required`,{headers:{"cache-control":`no-store`,"www-authenticate":`Basic realm="Coreframe dashboard", charset="UTF-8"`},status:401});if(a.pathname.startsWith(`${i}/plugins/`))return n(e.method,e.headers.get(`origin`),a.origin)?s(e,l(e,t,o)):p({error:{code:`invalid_input`}},403);if(a.pathname===i||a.pathname.startsWith(`${i}/`))return p({error:`Not found`},404);if(a.pathname===r)return a.pathname=`${r}/`,Response.redirect(a,302);if(e.method!==`GET`&&e.method!==`HEAD`)return new Response(`Method not allowed`,{headers:{"cache-control":`no-store`},status:405});if(!t.ASSETS)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});(a.pathname===`${r}/`||!a.pathname.slice(13).includes(`.`))&&(a.pathname=`${r}/index.html`);let u=await t.ASSETS.fetch(new Request(a,e)),d=new Headers(u.headers);return d.set(`cache-control`,a.pathname.endsWith(`/index.html`)?`no-store`:`public, max-age=31536000, immutable`),new Response(e.method===`HEAD`?null:u.body,{headers:d,status:u.status,statusText:u.statusText})}function l(e,t,n){let r=u(),i=t,a=r.configuration.filter(e=>e.requiredIn.includes(n)).map(e=>({description:e.description,kind:e.kind,name:e.name,status:f(i[e.name])?`configured`:`missing`})),o=[],s=r.deployUrls[n];return s?o.push({href:s,id:`application`,label:`Application`}):o.push({href:new URL(`/`,e.url).href,id:`application`,label:`Application`}),{environment:n,release:{applicationName:r.applicationName,applicationVersion:r.applicationVersion,cloudflareVersionId:t.CF_VERSION_METADATA?.id,cloudflareVersionTag:t.CF_VERSION_METADATA?.tag,cloudflareVersionTimestamp:t.CF_VERSION_METADATA?.timestamp,commit:r.commit,coreframeVersion:r.coreframeVersion,releaseName:t.POSTHOG_RELEASE},configuration:a,links:o}}function u(){return typeof __COREFRAME_DASHBOARD_BUILD__<`u`?__COREFRAME_DASHBOARD_BUILD__:{applicationName:`Coreframe application`,configuration:[],deployUrls:{}}}function d(e){return e===r||e.startsWith(`${r}/`)}function f(e){return typeof e==`string`?e.trim().length>0:e!=null}function p(e,t=200){return Response.json(e,{headers:{"cache-control":`no-store`},status:t})}function m(e){if(e?.startsWith(`Basic `))try{let t=Uint8Array.from(atob(e.slice(6)),e=>e.charCodeAt(0)),n=new TextDecoder().decode(t),r=n.indexOf(`:`);return r===-1||n.slice(0,r)!==`coreframe`?void 0:n.slice(r+1)}catch{return}}async function h(e,t){let n=new TextEncoder,[r,i]=await Promise.all([crypto.subtle.digest(`SHA-256`,n.encode(e)),crypto.subtle.digest(`SHA-256`,n.encode(t))]),a=new Uint8Array(r),o=new Uint8Array(i),s=0;for(let e=0;e<a.length;e+=1)s|=a[e]^o[e];return s===0}export{o as createWorkerHandler,s as handleDashboardRequest};
|
|
1
|
+
import{createDashboardPluginDispatcher as e}from"./api/dispatcher.js";import{getDashboardRequestId as t,isSameOriginDashboardMutation as n}from"./host-policy.js";const r=`/__dashboard`,i=`${r}/api`,a=new WeakMap;function o(n){let r=e(n.plugins,{getRequestId:t});return(e,t)=>{let n=new URL(e.url);return!d(n.pathname)||!t.DEPLOY_ENV?null:c(e,t,n,t.DEPLOY_ENV,r)}}function s(e,t,n){if(!d(new URL(e.url).pathname)||!t.DEPLOY_ENV)return null;let r=n.plugins,i=a.get(r);return i||(i=o(n),a.set(r,i)),i(e,t)}async function c(e,t,a,o,s){if(!t.DASHBOARD_PASSWORD)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});let c=m(e.headers.get(`authorization`));if(!c||!await h(c,t.DASHBOARD_PASSWORD))return new Response(`Authentication required`,{headers:{"cache-control":`no-store`,"www-authenticate":`Basic realm="Coreframe dashboard", charset="UTF-8"`},status:401});if(a.pathname.startsWith(`${i}/plugins/`))return n(e.method,e.headers.get(`origin`),a.origin)?s(e,l(e,t,o)):p({error:{code:`invalid_input`}},403);if(a.pathname===i||a.pathname.startsWith(`${i}/`))return p({error:`Not found`},404);if(a.pathname===r)return a.pathname=`${r}/`,Response.redirect(a,302);if(e.method!==`GET`&&e.method!==`HEAD`)return new Response(`Method not allowed`,{headers:{"cache-control":`no-store`},status:405});if(!t.ASSETS)return new Response(`Dashboard unavailable`,{headers:{"cache-control":`no-store`},status:503});(a.pathname===`${r}/`||!a.pathname.slice(13).includes(`.`))&&(a.pathname=`${r}/index.html`);let u=await t.ASSETS.fetch(new Request(a,e));if(a.pathname===`${r}/index.html`&&u.status===307){let n=u.headers.get(`location`),i=n?new URL(n,a):void 0;i?.origin===a.origin&&(i.pathname===r||i.pathname===`${r}/`)&&(await u.body?.cancel(),u=await t.ASSETS.fetch(new Request(i,e)))}let d=new Headers(u.headers);return d.set(`cache-control`,a.pathname.endsWith(`/index.html`)?`no-store`:`public, max-age=31536000, immutable`),new Response(e.method===`HEAD`?null:u.body,{headers:d,status:u.status,statusText:u.statusText})}function l(e,t,n){let r=u(),i=t,a=r.configuration.filter(e=>e.requiredIn.includes(n)).map(e=>({description:e.description,kind:e.kind,name:e.name,status:f(i[e.name])?`configured`:`missing`})),o=[],s=r.deployUrls[n];return s?o.push({href:s,id:`application`,label:`Application`}):o.push({href:new URL(`/`,e.url).href,id:`application`,label:`Application`}),{environment:n,release:{applicationName:r.applicationName,applicationVersion:r.applicationVersion,cloudflareVersionId:t.CF_VERSION_METADATA?.id,cloudflareVersionTag:t.CF_VERSION_METADATA?.tag,cloudflareVersionTimestamp:t.CF_VERSION_METADATA?.timestamp,commit:r.commit,coreframeVersion:r.coreframeVersion,releaseName:t.POSTHOG_RELEASE},configuration:a,links:o}}function u(){return typeof __COREFRAME_DASHBOARD_BUILD__<`u`?__COREFRAME_DASHBOARD_BUILD__:{applicationName:`Coreframe application`,configuration:[],deployUrls:{}}}function d(e){return e===r||e.startsWith(`${r}/`)}function f(e){return typeof e==`string`?e.trim().length>0:e!=null}function p(e,t=200){return Response.json(e,{headers:{"cache-control":`no-store`},status:t})}function m(e){if(e?.startsWith(`Basic `))try{let t=Uint8Array.from(atob(e.slice(6)),e=>e.charCodeAt(0)),n=new TextDecoder().decode(t),r=n.indexOf(`:`);return r===-1||n.slice(0,r)!==`coreframe`?void 0:n.slice(r+1)}catch{return}}async function h(e,t){let n=new TextEncoder,[r,i]=await Promise.all([crypto.subtle.digest(`SHA-256`,n.encode(e)),crypto.subtle.digest(`SHA-256`,n.encode(t))]),a=new Uint8Array(r),o=new Uint8Array(i),s=0;for(let e=0;e<a.length;e+=1)s|=a[e]^o[e];return s===0}export{o as createWorkerHandler,s as handleDashboardRequest};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/dashboard",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.26",
|
|
4
4
|
"description": "Reusable dashboard composition, shell, plugin, and authenticated runtime for Coreframe apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -99,11 +99,12 @@
|
|
|
99
99
|
"@types/react": "19.2.18",
|
|
100
100
|
"@types/react-dom": "19.2.4",
|
|
101
101
|
"jsdom": "^29.1.1",
|
|
102
|
+
"miniflare": "4.20260710.0",
|
|
102
103
|
"tsdown": "0.22.3",
|
|
103
104
|
"typescript": "6.0.3",
|
|
104
105
|
"vite": "^8.1.4",
|
|
105
106
|
"vitest": "^4.1.10",
|
|
106
|
-
"@coreframe/panda": "0.1.
|
|
107
|
+
"@coreframe/panda": "0.1.11"
|
|
107
108
|
},
|
|
108
109
|
"scripts": {
|
|
109
110
|
"build": "pnpm --dir ../diagnostics build && pnpm build:server",
|