@stacksjs/defaults 0.75.718 → 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.
@@ -11,7 +11,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
11
11
  | Package | Task guidance | Source entry | Retained tests |
12
12
  |---|---|---|---|
13
13
  | `@stacksjs/action-runner` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/action-runner/src/index.ts) | 1 |
14
- | `@stacksjs/actions` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/index.ts) | 136 |
14
+ | `@stacksjs/actions` | [`stacks-actions`](../stacks-actions/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/index.ts) | 137 |
15
15
  | `@stacksjs/ai` | [`stacks-ai`](../stacks-ai/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/ai/src/index.ts) | 28 |
16
16
  | `@stacksjs/alias` | [`stacks-alias`](../stacks-alias/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/alias/src/index.ts) | 3 |
17
17
  | `@stacksjs/analytics` | [`stacks-analytics`](../stacks-analytics/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/analytics/src/index.ts) | 7 |
@@ -123,7 +123,7 @@ Declared runtime exports: `BlogAdminError`, `DEFAULT_IOS_DEPENDENCIES`, `DEFAULT
123
123
 
124
124
  Local source modules: [src/action.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/action.ts), [src/add.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/add.ts), [src/blog-admin.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/blog-admin.ts), [src/build/ios-toolchain.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/build/ios-toolchain.ts), [src/build/macos-native.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/build/macos-native.ts), [src/commit.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/commit.ts), [src/dev/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/dev/index.ts), [src/discover-packages.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/discover-packages.ts), [src/generate/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/generate/index.ts), [src/github-release.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/github-release.ts), [src/helpers/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/helpers/index.ts), [src/library/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/library/index.ts), [src/lint/lint.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/lint/lint.ts), [src/lint/stx-gate.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/lint/stx-gate.ts), [src/make-command.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-command.ts), [src/make-job.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-job.ts), [src/make-policy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-policy.ts), [src/make-resource.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make-resource.ts), [src/make.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/make.ts), [src/publication-preflight.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/publication-preflight.ts), [src/release-evidence.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/release-evidence.ts), [src/reviewos-evidence.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/reviewos-evidence.ts), [src/reviewos-workflows.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/reviewos-workflows.ts), [src/scaffold-crud.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/scaffold-crud.ts), [src/setup/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/setup/index.ts), [src/stacks.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/stacks.ts), [src/stx-source.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/stx-source.ts), [src/upgrade/package-project.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/upgrade/package-project.ts), [src/upgrade/route-actions.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/src/upgrade/route-actions.ts).
125
125
 
126
- Evidence directory: [136 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
126
+ Evidence directory: [137 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/actions/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
127
127
 
128
128
  ### @stacksjs/ai
129
129
 
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.718",
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.718",
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.718",
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.718",
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.718",
58
- "@stacksjs/browser": "0.75.718"
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
- return [sidebarHost.current, mobileSidebarHost.current]
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 pane = sidebarHost.current?.querySelector<HTMLElement>('[data-stx-sidebar]')
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.insertBefore(element, next && next.parentNode === parent ? next : null)
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 ref="dashboardSidebarHost" data-dashboard-web-sidebar>
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 ref="dashboardMobileSidebarHost" data-dashboard-mobile-sidebar class="h-full"></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>