@stacksjs/defaults 0.75.708 → 0.75.710

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.
@@ -1803,7 +1803,8 @@ reporter stores allowlisted operational context and excludes bodies and headers.
1803
1803
 
1804
1804
  Declare `dashboard: { highlight: true }` on a model to pin its Data row, or use
1805
1805
  numeric `highlight` values to order pinned rows. Other enabled Data models live
1806
- under the native Sidebar's collapsed More models disclosure. Labels, icons and
1806
+ under the All Models disclosure. The row label opens the registry when the
1807
+ All Models page is enabled in dashboard config. Labels, icons and
1807
1808
  role gates apply to nested rows too. `enabled: false` omits navigation;
1808
1809
  `access: false` excludes generic catalogs and reads as well.
1809
1810
 
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.708",
5
+ "version": "0.75.710",
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.708",
5
+ "version": "0.75.710",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,15 +45,15 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/desktop": "^0.2.957",
49
- "@stacksjs/mobile": "0.75.708",
50
- "@stacksjs/sanitizer": "^0.2.957",
51
- "@stacksjs/stx": "^0.2.957",
52
- "@stacksjs/strings": "0.75.708",
48
+ "@stacksjs/desktop": "^0.2.960",
49
+ "@stacksjs/mobile": "0.75.710",
50
+ "@stacksjs/sanitizer": "^0.2.960",
51
+ "@stacksjs/stx": "^0.2.960",
52
+ "@stacksjs/strings": "0.75.710",
53
53
  "@xterm/addon-fit": "^0.11.0",
54
54
  "@xterm/xterm": "^6.0.0",
55
55
  "ts-qr-codes": "^0.1.8",
56
- "@stacksjs/support": "0.75.708",
57
- "@stacksjs/browser": "0.75.708"
56
+ "@stacksjs/support": "0.75.710",
57
+ "@stacksjs/browser": "0.75.710"
58
58
  }
59
59
  }
@@ -90,7 +90,7 @@ function retry(): void {
90
90
  <!-- Back to Login -->
91
91
  <p class="mt-6 text-center text-neutral-500 text-sm dark:text-neutral-400">
92
92
  <a href="/login" class="inline-flex gap-1 items-center font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">
93
- <div class="h-4 w-4 i-hugeicons-arrow-left-01"></div>
93
+ <span aria-hidden="true" class="h-4 w-4 i-hugeicons-arrow-left-01"></span>
94
94
  Back to sign in
95
95
  </a>
96
96
  </p>
@@ -53,7 +53,7 @@ function handleKeydown(event: KeyboardEvent): void {
53
53
 
54
54
  function handlePanelClick(event: MouseEvent): void {
55
55
  const target = event.target as HTMLElement | null
56
- if (target?.closest('a[href]'))
56
+ if (!event.defaultPrevented && target?.closest('a[href]'))
57
57
  closeSidebar()
58
58
  }
59
59
 
@@ -207,15 +207,20 @@ effect(() => {
207
207
  * (data-stx-if-transition above), which stx removes when it ends. The copy
208
208
  * may be taken after the dialog closed, and a closed dialog is not drawn, so
209
209
  * the copy is drawn here for as long as it leaves.
210
+ *
211
+ * The rules on the dialog itself name two of its classes. The layout's
212
+ * `html .dashboard-modal-layer` sets the dialog's transition (to animate its
213
+ * left edge), and with one class this rule weighed less: the panel eased
214
+ * down while the dim and everything in it vanished in one frame.
210
215
  */
211
- .dashboard-modal-leave-active {
216
+ .dashboard-modal-dialog.dashboard-modal-leave-active {
212
217
  display: block;
213
218
  transition: opacity 160ms ease-in;
214
219
  }
215
220
  .dashboard-modal-leave-active [data-dashboard-overlay="modal"] {
216
221
  transition: opacity 160ms ease-in, transform 160ms ease-in;
217
222
  }
218
- .dashboard-modal-leave-to {
223
+ .dashboard-modal-dialog.dashboard-modal-leave-to {
219
224
  opacity: 0;
220
225
  }
221
226
  .dashboard-modal-leave-to [data-dashboard-overlay="modal"] {
@@ -232,7 +237,7 @@ effect(() => {
232
237
  .dashboard-modal-dialog[open] [data-dashboard-overlay="modal"] {
233
238
  animation: none;
234
239
  }
235
- .dashboard-modal-leave-active,
240
+ .dashboard-modal-dialog.dashboard-modal-leave-active,
236
241
  .dashboard-modal-leave-active [data-dashboard-overlay="modal"] {
237
242
  transition: opacity 100ms linear;
238
243
  }
@@ -32,6 +32,22 @@ export function parseSidebarOrder(value: unknown): SidebarOrder {
32
32
  items[key] = ids(list, 2048)
33
33
  }
34
34
  if (JSON.stringify(input).length > 256 * 1024) throw new TypeError('Sidebar order is too large.')
35
+
36
+ // Keep the registry row's position and the old disclosure's child order
37
+ // when the two rows become a single All Models entry.
38
+ const dataKey = sidebarGroupKey('data')
39
+ const dataRows = items[dataKey]
40
+ if (dataRows?.includes('models-more')) {
41
+ items[dataKey] = dataRows.includes('models')
42
+ ? dataRows.filter(id => id !== 'models-more')
43
+ : dataRows.map(id => id === 'models-more' ? 'models' : id)
44
+ }
45
+ const oldModelGroup = sidebarGroupKey('data', ['models-more'])
46
+ if (items[oldModelGroup]) {
47
+ items[sidebarGroupKey('data', ['models'])] ??= items[oldModelGroup]
48
+ delete items[oldModelGroup]
49
+ }
50
+
35
51
  return { version: 1, sections: ids(input.sections, 128), items }
36
52
  }
37
53
 
@@ -425,8 +425,8 @@ export function buildNavSections(
425
425
  ...categoryNavItems(discoveredModels, 'system', new Set()),
426
426
  ]])
427
427
 
428
- // Data pins model-declared highlights. Other visible models stay accessible
429
- // through a collapsed disclosure using the shared Sidebar component.
428
+ // Data pins model-declared highlights. All Models links to the registry and
429
+ // discloses the remaining models through the shared Sidebar component.
430
430
  // Per-model rows link to `/models/<id>` (dynamic ORM viewer); the
431
431
  // built-in dashboard / activity / users / teams / subscribers rows keep
432
432
  // their bespoke pages under `/data/<row>`.
@@ -438,8 +438,8 @@ export function buildNavSections(
438
438
  if (dataRows.users) dataNav.push({ to: '/data/users', icon: 'users', text: 'Users' })
439
439
  if (dataRows.teams) dataNav.push({ to: '/data/teams', icon: 'group', text: 'Teams' })
440
440
  if (dataRows.subscribers) dataNav.push({ to: '/data/subscribers', icon: 'mail', text: 'Subscribers' })
441
- if (dataRows.allModels) dataNav.push({ to: '/models', icon: 'table', text: 'All Models' })
442
- const moreModels: NavItem[] = []
441
+ const pinnedModels: NavItem[] = []
442
+ const modelChildren: NavItem[] = []
443
443
  const highlighted = (model: DiscoveredModel) => model.dashboard?.highlight === true
444
444
  || (typeof model.dashboard?.highlight === 'number' && Number.isFinite(model.dashboard.highlight))
445
445
  const rank = (model: DiscoveredModel) => typeof model.dashboard?.highlight === 'number' ? model.dashboard.highlight : Number.POSITIVE_INFINITY
@@ -465,10 +465,19 @@ export function buildNavSections(
465
465
  ? { roles: m.dashboard.roles }
466
466
  : {}),
467
467
  }
468
- if (highlighted(m)) dataNav.push(item)
469
- else moreModels.push(item)
468
+ if (highlighted(m)) pinnedModels.push(item)
469
+ else modelChildren.push(item)
470
470
  }
471
- if (moreModels.length) dataNav.push({ id: 'models-more', to: '', text: 'More models', icon: 'table', expanded: false, children: moreModels })
471
+ if (dataRows.allModels || modelChildren.length) {
472
+ dataNav.push({
473
+ id: 'models',
474
+ to: dataRows.allModels ? '/models' : '',
475
+ icon: 'table',
476
+ text: 'All Models',
477
+ ...(modelChildren.length ? { children: modelChildren, expanded: false } : {}),
478
+ })
479
+ }
480
+ dataNav.push(...pinnedModels)
472
481
  sections.push(['data', 'data', dataNav])
473
482
 
474
483
  if (toggles.commerce) {