@stacksjs/defaults 0.75.719 → 0.75.720
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/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.720",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.720",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"@iconify-json/f7": "^1.2.2",
|
|
47
47
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
48
48
|
"@stacksjs/desktop": "^0.2.960",
|
|
49
|
-
"@stacksjs/mobile": "0.75.
|
|
49
|
+
"@stacksjs/mobile": "0.75.720",
|
|
50
50
|
"@stacksjs/sanitizer": "^0.2.960",
|
|
51
51
|
"@stacksjs/stx": "^0.2.960",
|
|
52
|
-
"@stacksjs/strings": "0.75.
|
|
52
|
+
"@stacksjs/strings": "0.75.720",
|
|
53
53
|
"@xterm/addon-fit": "^0.11.0",
|
|
54
54
|
"@xterm/xterm": "^6.0.0",
|
|
55
55
|
"ts-qr-codes": "^0.1.8",
|
|
56
56
|
"ts-syntax-highlighter": "^0.2.21",
|
|
57
|
-
"@stacksjs/support": "0.75.
|
|
58
|
-
"@stacksjs/browser": "0.75.
|
|
57
|
+
"@stacksjs/support": "0.75.720",
|
|
58
|
+
"@stacksjs/browser": "0.75.720"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A native dashboard has one sidebar and two places to mount it. On a
|
|
3
|
+
* client-side transition STX can replace the dashboard chrome, so browser
|
|
4
|
+
* events must read the hosts in the live layout instead of holding page refs
|
|
5
|
+
* to the layout that installed the handler.
|
|
6
|
+
*/
|
|
7
|
+
export function dashboardSidebarHosts(root: ParentNode = document): {
|
|
8
|
+
home: HTMLElement | null
|
|
9
|
+
drawer: HTMLElement | null
|
|
10
|
+
} {
|
|
11
|
+
return {
|
|
12
|
+
home: root.querySelector<HTMLElement>('[data-dashboard-web-sidebar]'),
|
|
13
|
+
drawer: root.querySelector<HTMLElement>('[data-dashboard-mobile-sidebar]'),
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -488,6 +488,7 @@ import { dashboardNavigationPath } from '@stacksjs/defaults/resources/functions/
|
|
|
488
488
|
import { useAppearance } from '@stacksjs/defaults/views/dashboard/composables/useAppearance'
|
|
489
489
|
import { handleDashboardSettingsClick, listenForSettingsCommand, openDashboardSettings } from '@stacksjs/defaults/views/dashboard/composables/settings-window'
|
|
490
490
|
import { useDashboardThemes } from '@stacksjs/defaults/views/dashboard/composables/useDashboardThemes'
|
|
491
|
+
import { dashboardSidebarHosts } from '@stacksjs/defaults/views/dashboard/composables/dashboard-sidebar-hosts'
|
|
491
492
|
import { authStore } from '@stacksjs/defaults/views/dashboard/stores/auth'
|
|
492
493
|
import { kanbanStore } from '@stacksjs/defaults/views/dashboard/stores/kanban'
|
|
493
494
|
import { createDashboardSidebarOrder } from '@stacksjs/defaults/functions/dashboard-sidebar-order'
|
|
@@ -525,8 +526,6 @@ const toastWrapperClass = (type: ToastType) => `pointer-events-auto overflow-hid
|
|
|
525
526
|
const sidebarRoles = sidebarRoleMap
|
|
526
527
|
const auth = authStore
|
|
527
528
|
const route = useRoute()
|
|
528
|
-
const sidebarHost = useRef('dashboardSidebarHost')
|
|
529
|
-
const mobileSidebarHost = useRef('dashboardMobileSidebarHost')
|
|
530
529
|
const sidebarOrderStatus = state({ ready: false, saving: false, custom: false, message: 'Loading sidebar order…' })
|
|
531
530
|
const sidebarReordering = state(false)
|
|
532
531
|
const sidebarOrder = createDashboardSidebarOrder({
|
|
@@ -540,7 +539,8 @@ ensureCraftNativeSidebarMarker()
|
|
|
540
539
|
auth.load()
|
|
541
540
|
|
|
542
541
|
function sidebarPanes(): HTMLElement[] {
|
|
543
|
-
|
|
542
|
+
const { home, drawer } = dashboardSidebarHosts()
|
|
543
|
+
return [home, drawer]
|
|
544
544
|
.map(host => host?.querySelector<HTMLElement>('[data-stx-sidebar]'))
|
|
545
545
|
.filter((pane): pane is HTMLElement => Boolean(pane))
|
|
546
546
|
}
|
|
@@ -679,9 +679,9 @@ let lentSidebar: { element: HTMLElement, parent: Node, next: Node | null } | nul
|
|
|
679
679
|
// where the layout's `@itemClick` listens, so a pane moved without it kept
|
|
680
680
|
// selecting rows but never navigated.
|
|
681
681
|
function showSidebarInDrawer() {
|
|
682
|
-
const
|
|
682
|
+
const { home, drawer } = dashboardSidebarHosts()
|
|
683
|
+
const pane = home?.querySelector<HTMLElement>('[data-stx-sidebar]')
|
|
683
684
|
const element = pane?.closest<HTMLElement>('[data-stx-component-wrapper]') ?? pane
|
|
684
|
-
const drawer = mobileSidebarHost.current
|
|
685
685
|
if (element?.parentNode && drawer && !lentSidebar) {
|
|
686
686
|
lentSidebar = { element, parent: element.parentNode, next: element.nextSibling }
|
|
687
687
|
drawer.appendChild(element)
|
|
@@ -699,7 +699,8 @@ function returnSidebarFromDrawer() {
|
|
|
699
699
|
if (!lentSidebar) return
|
|
700
700
|
const { element, parent, next } = lentSidebar
|
|
701
701
|
lentSidebar = null
|
|
702
|
-
parent.
|
|
702
|
+
if (parent.isConnected)
|
|
703
|
+
parent.insertBefore(element, next && next.parentNode === parent ? next : null)
|
|
703
704
|
}
|
|
704
705
|
|
|
705
706
|
function handleCraftSidebarSelection(event: CraftSidebarSelectEvent | undefined): void {
|
|
@@ -753,7 +754,7 @@ onDestroy(() => {
|
|
|
753
754
|
})
|
|
754
755
|
</script>
|
|
755
756
|
|
|
756
|
-
<div
|
|
757
|
+
<div data-dashboard-web-sidebar>
|
|
757
758
|
<Sidebar
|
|
758
759
|
theme="macos"
|
|
759
760
|
width="250"
|
|
@@ -805,7 +806,7 @@ onDestroy(() => {
|
|
|
805
806
|
</nav>
|
|
806
807
|
@endif
|
|
807
808
|
</template>
|
|
808
|
-
<div
|
|
809
|
+
<div data-dashboard-mobile-sidebar class="h-full"></div>
|
|
809
810
|
</MobileSidebar>
|
|
810
811
|
|
|
811
812
|
<main data-stx-content data-dashboard-content>
|