@stacksjs/defaults 0.75.672 → 0.75.674
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/ai/skills/stacks-dashboard/SKILL.md +19 -5
- package/ide/vscode/package.json +1 -1
- package/package.json +7 -7
- package/resources/components/Dashboard/Home/DashboardHome.stx +8 -8
- package/resources/components/Dashboard/MobileSidebar.stx +1 -1
- package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +19 -3
- package/resources/components/Dashboard/Settings/DashboardThemePicker.stx +218 -0
- package/resources/components/Dashboard/UI/ActivityTable.stx +7 -7
- package/resources/components/Dashboard/UI/Button.stx +6 -3
- package/resources/components/Dashboard/UI/Card.stx +1 -1
- package/resources/components/Dashboard/UI/Drawer.stx +1 -1
- package/resources/components/Dashboard/UI/Modal.stx +1 -0
- package/resources/components/Dashboard/UI/PageHeader.stx +1 -1
- package/resources/components/Dashboard/UI/QuickLinks.stx +7 -5
- package/resources/components/Dashboard/UI/ServiceHealth.stx +6 -6
- package/resources/components/Dashboard/UI/StatsCard.stx +5 -5
- package/resources/components/Dashboard/UI/Table.stx +1 -1
- package/styles/dashboard-theme.css +248 -0
- package/views/dashboard/composables/dashboard-theme-bootstrap.ts +11 -0
- package/views/dashboard/composables/dashboard-themes.ts +180 -0
- package/views/dashboard/composables/useAppearance.ts +21 -9
- package/views/dashboard/composables/useDashboardThemes.ts +79 -0
- package/views/dashboard/layouts/default.stx +45 -42
- package/views/dashboard/layouts/guest.stx +11 -1
|
@@ -47,6 +47,8 @@ defineClientPayload({ sidebarRoleMap, sidebarSections })
|
|
|
47
47
|
@head
|
|
48
48
|
<link rel="icon" href="/images/logos/favicon.svg" type="image/svg+xml">
|
|
49
49
|
<link rel="icon" href="/images/logos/favicon-dark.svg" type="image/svg+xml" media="(prefers-color-scheme: dark)">
|
|
50
|
+
<link rel="stylesheet" href="/__deps/dashboard-theme.css">
|
|
51
|
+
<script src="/__deps/dashboard-theme.js"></script>
|
|
50
52
|
@endhead
|
|
51
53
|
|
|
52
54
|
<!-- Dashboard icon stylesheet. Most dashboard icons are applied via dynamic
|
|
@@ -221,7 +223,7 @@ html .dashboard-modal-layer {
|
|
|
221
223
|
* attribute is what wins, and it wins by specificity rather than by `!important`
|
|
222
224
|
* so the rules stay overridable downstream.
|
|
223
225
|
* ======================================================================== */
|
|
224
|
-
html[data-appearance="arc"] {
|
|
226
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) {
|
|
225
227
|
/* Warmer and a shade deeper than the content card it carries. The stx `arc`
|
|
226
228
|
theme paints its pane at #f7f5f1 over whatever sits behind it; here the
|
|
227
229
|
panel IS the backdrop, so it has to be flat and darker than white or the
|
|
@@ -232,26 +234,26 @@ html[data-appearance="arc"] {
|
|
|
232
234
|
}
|
|
233
235
|
/* The dark class is written onto the root element itself, so it stacks with
|
|
234
236
|
the appearance attribute rather than sitting above it. */
|
|
235
|
-
html[data-appearance="arc"].dark {
|
|
237
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark {
|
|
236
238
|
--dash-arc-panel: #171717;
|
|
237
239
|
}
|
|
238
240
|
|
|
239
241
|
/* The gap around the content card is the body showing through, which is what
|
|
240
242
|
makes the card read as floating on the sidebar rather than beside it. */
|
|
241
|
-
html[data-appearance="arc"] body {
|
|
243
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) body {
|
|
242
244
|
background: var(--dash-arc-panel);
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
/* The card owns scrolling, so the page must not also scroll: a document
|
|
246
248
|
scrollbar would eat the right-hand gap and there would be nothing for it to
|
|
247
249
|
scroll anyway. */
|
|
248
|
-
html[data-appearance="arc"],
|
|
249
|
-
html[data-appearance="arc"] body {
|
|
250
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])),
|
|
251
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) body {
|
|
250
252
|
height: 100%;
|
|
251
253
|
overflow: hidden;
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
html[data-appearance="arc"] [data-stx-content] {
|
|
256
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content] {
|
|
255
257
|
/* Only three margins. `margin-left` is deliberately left to the base rule.
|
|
256
258
|
|
|
257
259
|
It is the one margin that transitions (0.3s, for the sidebar collapse),
|
|
@@ -290,7 +292,7 @@ html[data-appearance="arc"] [data-stx-content] {
|
|
|
290
292
|
0 8px 24px rgba(0, 0, 0, 0.06);
|
|
291
293
|
transition: margin-left 0.3s ease-out;
|
|
292
294
|
}
|
|
293
|
-
html[data-appearance="arc"].dark [data-stx-content] {
|
|
295
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-stx-content] {
|
|
294
296
|
background: #0a0a0a;
|
|
295
297
|
box-shadow:
|
|
296
298
|
0 0 0 0.5px rgba(255, 255, 255, 0.08),
|
|
@@ -299,38 +301,38 @@ html[data-appearance="arc"].dark [data-stx-content] {
|
|
|
299
301
|
|
|
300
302
|
/* An overlay scrollbar inside the card, so the rounded corner is not cut by a
|
|
301
303
|
full-width native gutter. */
|
|
302
|
-
html[data-appearance="arc"] [data-stx-content] {
|
|
304
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content] {
|
|
303
305
|
scrollbar-width: thin;
|
|
304
306
|
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
|
|
305
307
|
}
|
|
306
|
-
html[data-appearance="arc"] [data-stx-content]::-webkit-scrollbar {
|
|
308
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content]::-webkit-scrollbar {
|
|
307
309
|
width: 8px;
|
|
308
310
|
}
|
|
309
|
-
html[data-appearance="arc"] [data-stx-content]::-webkit-scrollbar-thumb {
|
|
311
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content]::-webkit-scrollbar-thumb {
|
|
310
312
|
border: 2px solid transparent;
|
|
311
313
|
border-radius: 8px;
|
|
312
314
|
background-clip: content-box;
|
|
313
315
|
background-color: rgba(0, 0, 0, 0.2);
|
|
314
316
|
}
|
|
315
|
-
html[data-appearance="arc"] [data-stx-content]::-webkit-scrollbar-track {
|
|
317
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content]::-webkit-scrollbar-track {
|
|
316
318
|
background: transparent;
|
|
317
319
|
}
|
|
318
|
-
html[data-appearance="arc"].dark [data-stx-content] {
|
|
320
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-stx-content] {
|
|
319
321
|
scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
|
|
320
322
|
}
|
|
321
|
-
html[data-appearance="arc"].dark [data-stx-content]::-webkit-scrollbar-thumb {
|
|
323
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-stx-content]::-webkit-scrollbar-thumb {
|
|
322
324
|
background-color: rgba(255, 255, 255, 0.25);
|
|
323
325
|
}
|
|
324
326
|
|
|
325
327
|
/* On narrow viewports the sidebar is hidden entirely, so the card would float
|
|
326
328
|
on nothing. Return it to a flush pane. */
|
|
327
329
|
@media (max-width: 1023px) {
|
|
328
|
-
html[data-appearance="arc"],
|
|
329
|
-
html[data-appearance="arc"] body {
|
|
330
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])),
|
|
331
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) body {
|
|
330
332
|
height: auto;
|
|
331
333
|
overflow: visible;
|
|
332
334
|
}
|
|
333
|
-
html[data-appearance="arc"] [data-stx-content] {
|
|
335
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-content] {
|
|
334
336
|
margin-top: 0;
|
|
335
337
|
margin-right: 0;
|
|
336
338
|
margin-bottom: 0;
|
|
@@ -343,41 +345,41 @@ html[data-appearance="arc"].dark [data-stx-content]::-webkit-scrollbar-thumb {
|
|
|
343
345
|
}
|
|
344
346
|
|
|
345
347
|
/* The panel is the body; the pane just holds rows. */
|
|
346
|
-
html[data-appearance="arc"] [data-stx-sidebar] {
|
|
348
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-stx-sidebar] {
|
|
347
349
|
background: transparent;
|
|
348
350
|
backdrop-filter: none;
|
|
349
351
|
-webkit-backdrop-filter: none;
|
|
350
352
|
color: #2c2a28;
|
|
351
353
|
}
|
|
352
|
-
html[data-appearance="arc"].dark [data-stx-sidebar] {
|
|
354
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-stx-sidebar] {
|
|
353
355
|
color: #ededf0;
|
|
354
356
|
}
|
|
355
357
|
/* Liquid Glass belongs to the macOS material. Arc's panel is flat. */
|
|
356
|
-
html[data-appearance="arc"] .stx-sidebar-rim {
|
|
358
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) .stx-sidebar-rim {
|
|
357
359
|
display: none;
|
|
358
360
|
}
|
|
359
361
|
|
|
360
362
|
/* Rows: discrete cards with a 2px gutter, not AppKit's contiguous run. */
|
|
361
|
-
html[data-appearance="arc"] [data-sidebar-row] {
|
|
363
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-row] {
|
|
362
364
|
height: 32px;
|
|
363
365
|
}
|
|
364
|
-
html[data-appearance="arc"] [data-sidebar-item] {
|
|
366
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-item] {
|
|
365
367
|
height: 30px;
|
|
366
368
|
border-radius: 8px;
|
|
367
369
|
color: inherit;
|
|
368
370
|
}
|
|
369
|
-
html[data-appearance="arc"] [data-sidebar-item]:hover {
|
|
371
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-item]:hover {
|
|
370
372
|
background: rgba(255, 255, 255, 0.55);
|
|
371
373
|
}
|
|
372
|
-
html[data-appearance="arc"].dark [data-sidebar-item]:hover {
|
|
374
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-sidebar-item]:hover {
|
|
373
375
|
background: rgba(255, 255, 255, 0.08);
|
|
374
376
|
}
|
|
375
377
|
|
|
376
378
|
/* Selection: a raised white card, in both window states. Matching the
|
|
377
379
|
component's own selector shape is what gives these the specificity to win. */
|
|
378
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"],
|
|
379
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="false"] [data-sidebar-item][data-active="true"],
|
|
380
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"]:hover {
|
|
380
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"],
|
|
381
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="false"] [data-sidebar-item][data-active="true"],
|
|
382
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"]:hover {
|
|
381
383
|
background: #fff;
|
|
382
384
|
color: #1b1a19;
|
|
383
385
|
font-weight: 500;
|
|
@@ -385,9 +387,9 @@ html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="t
|
|
|
385
387
|
0 0 0 1px rgba(0, 0, 0, 0.05),
|
|
386
388
|
0 1px 2px rgba(0, 0, 0, 0.08);
|
|
387
389
|
}
|
|
388
|
-
html[data-appearance="arc"].dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"],
|
|
389
|
-
html[data-appearance="arc"].dark [data-sidebar-selection="accent"][data-window-key="false"] [data-sidebar-item][data-active="true"],
|
|
390
|
-
html[data-appearance="arc"].dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"]:hover {
|
|
390
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"],
|
|
391
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-sidebar-selection="accent"][data-window-key="false"] [data-sidebar-item][data-active="true"],
|
|
392
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"]:hover {
|
|
391
393
|
background: rgba(255, 255, 255, 0.14);
|
|
392
394
|
color: #fff;
|
|
393
395
|
box-shadow:
|
|
@@ -397,20 +399,20 @@ html[data-appearance="arc"].dark [data-sidebar-selection="accent"][data-window-k
|
|
|
397
399
|
|
|
398
400
|
/* The icon, count and chevron turn white on a macOS accent fill. On a white
|
|
399
401
|
card they must not - they keep their own tint, the same as an idle row. */
|
|
400
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-icon],
|
|
401
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-chevron] {
|
|
402
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-icon],
|
|
403
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-chevron] {
|
|
402
404
|
color: var(--stx-sidebar-icon, currentColor);
|
|
403
405
|
}
|
|
404
|
-
html[data-appearance="arc"] [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-count] {
|
|
406
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-count] {
|
|
405
407
|
color: rgba(44, 42, 40, 0.45);
|
|
406
408
|
}
|
|
407
|
-
html[data-appearance="arc"].dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-count] {
|
|
409
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])).dark [data-sidebar-selection="accent"][data-window-key="true"] [data-sidebar-item][data-active="true"] [data-sidebar-count] {
|
|
408
410
|
color: rgba(237, 237, 240, 0.45);
|
|
409
411
|
}
|
|
410
412
|
|
|
411
413
|
/* Section headers: sentence case and quieter than the macOS uppercase strip. */
|
|
412
|
-
html[data-appearance="arc"] [data-sidebar-section-header],
|
|
413
|
-
html[data-appearance="arc"] [data-sidebar-section] > div:first-child {
|
|
414
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-section-header],
|
|
415
|
+
html[data-appearance="arc"]:where(:not([data-dashboard-layout])) [data-sidebar-section] > div:first-child {
|
|
414
416
|
opacity: 0.55;
|
|
415
417
|
}
|
|
416
418
|
|
|
@@ -492,7 +494,8 @@ import type { ToastType } from '@stacksjs/defaults/functions/toasts'
|
|
|
492
494
|
import type { CraftSidebarSelectEvent } from '@stacksjs/defaults/functions/craft'
|
|
493
495
|
import { useToasts, dismissToast } from '@stacksjs/defaults/functions/toasts'
|
|
494
496
|
import { ensureCraftNativeSidebarMarker, useCraftSidebarSelection } from '@stacksjs/defaults/functions/craft'
|
|
495
|
-
import { readStoredAppearance, useAppearance } from '@stacksjs/defaults/views/dashboard/composables/useAppearance'
|
|
497
|
+
import { APPEARANCE_STORAGE_KEY, readStoredAppearance, useAppearance } from '@stacksjs/defaults/views/dashboard/composables/useAppearance'
|
|
498
|
+
import { useDashboardThemes } from '@stacksjs/defaults/views/dashboard/composables/useDashboardThemes'
|
|
496
499
|
import { authStore } from '@stacksjs/defaults/views/dashboard/stores/auth'
|
|
497
500
|
import { kanbanStore } from '@stacksjs/defaults/views/dashboard/stores/kanban'
|
|
498
501
|
import { createDashboardSidebarOrder } from '@stacksjs/defaults/functions/dashboard-sidebar-order'
|
|
@@ -583,6 +586,7 @@ effect(() => {
|
|
|
583
586
|
// ---------------------------------------------------------------------------
|
|
584
587
|
|
|
585
588
|
const appearance = useAppearance()
|
|
589
|
+
const themes = useDashboardThemes()
|
|
586
590
|
|
|
587
591
|
effect(() => {
|
|
588
592
|
// Reading the signals here is what subscribes this effect to them; `apply`
|
|
@@ -619,11 +623,9 @@ function applySectionVisibility() {
|
|
|
619
623
|
effect(applySectionVisibility)
|
|
620
624
|
|
|
621
625
|
|
|
622
|
-
//
|
|
623
|
-
// this cannot loop back on the tab that made the change. The store's own
|
|
624
|
-
// persistence writes but does not watch, so the re-read is explicit.
|
|
626
|
+
// Apply edits from other tabs without writing those preferences back.
|
|
625
627
|
useEventListener('storage', (event) => {
|
|
626
|
-
if (event
|
|
628
|
+
if (event.key !== APPEARANCE_STORAGE_KEY && event.key !== null) return
|
|
627
629
|
const next = readStoredAppearance()
|
|
628
630
|
appearance.sidebarStyle.set(next.sidebarStyle)
|
|
629
631
|
appearance.colorMode.set(next.colorMode)
|
|
@@ -739,6 +741,7 @@ useEventListener('craft:ready', () => {
|
|
|
739
741
|
})
|
|
740
742
|
|
|
741
743
|
onMount(() => {
|
|
744
|
+
themes.sync()
|
|
742
745
|
sidebarOrder.attach()
|
|
743
746
|
void sidebarOrder.load()
|
|
744
747
|
syncActiveSidebarRow()
|
|
@@ -779,7 +782,7 @@ onDestroy(() => {
|
|
|
779
782
|
@endif
|
|
780
783
|
</template>
|
|
781
784
|
<template #footer>
|
|
782
|
-
<div class="px-3 py-2 text-neutral-600 text-xs dark:text-neutral-300" data-sidebar-order-controls :data-sidebar-order-editing="sidebarReordering() ? 'true' : 'false'">
|
|
785
|
+
<div class="px-3 py-2 text-neutral-600 text-xs dark:text-neutral-300" data-sidebar-order-controls data-dashboard-muted :data-sidebar-order-editing="sidebarReordering() ? 'true' : 'false'">
|
|
783
786
|
<p role="status" aria-live="polite" :text="sidebarOrderStatus.message"></p>
|
|
784
787
|
<Button :if="sidebarOrderStatus.ready" class="dashboard-sidebar-order-mode" variant="ghost" size="xs" @click="sidebarReordering.set(!sidebarReordering())">{{ sidebarReordering() ? 'Done reordering' : 'Reorder sidebar' }}</Button>
|
|
785
788
|
<Button :if="!sidebarOrderStatus.ready" variant="ghost" size="xs" @click="sidebarOrder.load()">Retry loading order</Button>
|
|
@@ -796,7 +799,7 @@ onDestroy(() => {
|
|
|
796
799
|
<div ref="dashboardMobileSidebarHost" data-dashboard-mobile-sidebar class="h-full"></div>
|
|
797
800
|
</MobileSidebar>
|
|
798
801
|
|
|
799
|
-
<main data-stx-content>
|
|
802
|
+
<main data-stx-content data-dashboard-content>
|
|
800
803
|
@slot('content')
|
|
801
804
|
</main>
|
|
802
805
|
|
|
@@ -6,8 +6,18 @@
|
|
|
6
6
|
<link rel="icon" href="/images/logos/favicon.svg" type="image/svg+xml" />
|
|
7
7
|
<link rel="icon" href="/images/logos/favicon-dark.svg" type="image/svg+xml" media="(prefers-color-scheme: dark)" />
|
|
8
8
|
<title>Stacks Dashboard</title>
|
|
9
|
+
<link rel="stylesheet" href="/__deps/dashboard-theme.css" />
|
|
10
|
+
<script src="/__deps/dashboard-theme.js"></script>
|
|
11
|
+
@appearanceBootstrap({
|
|
12
|
+
storageKey: 'stacks-dashboard-appearance',
|
|
13
|
+
colorMode: {
|
|
14
|
+
key: 'colorMode',
|
|
15
|
+
attribute: 'color-mode',
|
|
16
|
+
default: 'system',
|
|
17
|
+
},
|
|
18
|
+
})
|
|
9
19
|
</head>
|
|
10
|
-
<body class="min-h-screen bg-neutral-100 dark:bg-neutral-950">
|
|
20
|
+
<body data-dashboard-guest class="min-h-screen bg-neutral-100 dark:bg-neutral-950">
|
|
11
21
|
<main data-stx-content>
|
|
12
22
|
@yield('content')
|
|
13
23
|
</main>
|