@stacksjs/defaults 0.75.709 → 0.75.711
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
|
|
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
|
|
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.711",
|
|
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.711",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -46,14 +46,14 @@
|
|
|
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.711",
|
|
50
50
|
"@stacksjs/sanitizer": "^0.2.960",
|
|
51
51
|
"@stacksjs/stx": "^0.2.960",
|
|
52
|
-
"@stacksjs/strings": "0.75.
|
|
52
|
+
"@stacksjs/strings": "0.75.711",
|
|
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.
|
|
57
|
-
"@stacksjs/browser": "0.75.
|
|
56
|
+
"@stacksjs/support": "0.75.711",
|
|
57
|
+
"@stacksjs/browser": "0.75.711"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -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
|
|
|
@@ -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.
|
|
429
|
-
//
|
|
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
|
-
|
|
442
|
-
const
|
|
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))
|
|
469
|
-
else
|
|
468
|
+
if (highlighted(m)) pinnedModels.push(item)
|
|
469
|
+
else modelChildren.push(item)
|
|
470
470
|
}
|
|
471
|
-
if (
|
|
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) {
|