@jskit-ai/console-web 0.1.234 → 0.1.236

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@jskit-ai/console-web",
3
- "version": "0.1.234",
3
+ "version": "0.1.236",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test --test-concurrency=1"
7
7
  },
8
8
  "dependencies": {
9
- "@jskit-ai/console-core": "0.2.11"
9
+ "@jskit-ai/console-core": "0.2.12"
10
10
  },
11
11
  "description": "Authenticated console surface scaffold and surface policy wiring.",
12
12
  "jskit": {
@@ -100,7 +100,7 @@
100
100
  ],
101
101
  "order": 100,
102
102
  "when": "auth.authenticated === true",
103
- "source": "patterns/console-surface/example/src/pages/console/settings.vue"
103
+ "source": "patterns/console-surface/example/src/placement.js"
104
104
  }
105
105
  ]
106
106
  }
@@ -108,7 +108,7 @@
108
108
  }
109
109
  },
110
110
  "peerDependencies": {
111
- "@jskit-ai/auth-web": "0.2.12",
112
- "@jskit-ai/shell-web": "0.2.10"
111
+ "@jskit-ai/auth-web": "0.2.14",
112
+ "@jskit-ai/shell-web": "0.2.12"
113
113
  }
114
114
  }
@@ -39,8 +39,10 @@ placement, and topology APIs for application composition.
39
39
 
40
40
  ## Example files
41
41
 
42
- `example/` contains concrete console root, landing, and settings routes. Adapt
43
- them together with the surface policy and placement examples described here.
42
+ `example/` contains concrete console root, landing, and settings routes, and
43
+ `src/placement.js` declares Settings as the console's main-navigation
44
+ destination, so it starts a fresh trail and its sections' Up returns to it.
45
+ Adapt them together with the surface policy described here.
44
46
 
45
47
  ## Variation points
46
48
 
@@ -1,43 +1,13 @@
1
1
  <template>
2
- <section class="console-home-screen d-flex flex-column ga-4">
3
- <div class="console-home-screen__actions">
4
- <v-btn color="primary" variant="flat" to="/home">Back to home</v-btn>
5
- </div>
6
-
7
- <v-sheet rounded="lg" border class="console-home-screen__panel">
8
- <div class="console-home-screen__status-row">
9
- <v-chip color="secondary" variant="tonal" label>Route: /console</v-chip>
10
- <v-chip color="info" variant="tonal" label>Surface status: enabled</v-chip>
11
- </div>
12
- <p class="text-body-2 text-medium-emphasis mb-0">
13
- Use this surface for operator actions and technical insights that should stay out of the end-user app.
14
- </p>
15
- </v-sheet>
2
+ <section class="d-flex flex-column ga-4">
3
+ <v-card>
4
+ <v-list lines="two">
5
+ <v-list-item title="/console" subtitle="Route" />
6
+ <v-list-item title="Enabled" subtitle="Surface status" />
7
+ </v-list>
8
+ </v-card>
9
+ <p class="text-body-medium on-surface-variant mb-0">
10
+ Use this surface for operator actions and technical insights that should stay out of the end-user app.
11
+ </p>
16
12
  </section>
17
13
  </template>
18
-
19
- <style scoped>
20
- .console-home-screen__actions {
21
- display: flex;
22
- justify-content: flex-end;
23
- }
24
-
25
- .console-home-screen__panel {
26
- display: grid;
27
- gap: 1rem;
28
- padding: 1rem;
29
- }
30
-
31
- .console-home-screen__status-row {
32
- display: flex;
33
- flex-wrap: wrap;
34
- gap: 0.5rem;
35
- }
36
-
37
- @media (max-width: 640px) {
38
- .console-home-screen__actions :deep(.v-btn) {
39
- min-height: 48px;
40
- width: 100%;
41
- }
42
- }
43
- </style>
@@ -1,16 +1,8 @@
1
1
  <template>
2
- <section class="console-settings-empty">
3
- <p class="text-body-2 text-medium-emphasis mb-0">
2
+ <section class="on-surface-variant text-center py-12">
3
+ <v-icon icon="$settings" size="48" />
4
+ <p class="text-body-large mt-4 mb-0">
4
5
  Console settings sections will appear here when installed.
5
6
  </p>
6
7
  </section>
7
8
  </template>
8
-
9
- <style scoped>
10
- .console-settings-empty {
11
- margin-inline: auto;
12
- max-width: 34rem;
13
- padding: 2rem 1.25rem;
14
- text-align: center;
15
- }
16
- </style>
@@ -1,81 +1,33 @@
1
1
  <script setup>
2
+ import { computed } from "vue";
3
+ import { RouterView, useRoute } from "vue-router";
4
+ import ShellListDetail from "@jskit-ai/shell-web/client/components/ShellListDetail";
2
5
  import ShellOutlet from "@jskit-ai/shell-web/client/components/ShellOutlet";
3
- import { RouterView } from "vue-router";
6
+
7
+ definePage({
8
+ meta: {
9
+ jskit: {
10
+ title: "Settings"
11
+ }
12
+ }
13
+ });
14
+
15
+ const route = useRoute();
16
+ // The section list shows beside the open section on wide windows, and on its own at the settings landing.
17
+ const detailOpen = computed(() => !/\/settings\/?$/u.test(route.path));
4
18
  </script>
5
19
 
6
20
  <template>
7
- <section class="settings-shell d-flex flex-column ga-4">
8
- <v-sheet rounded="lg" border class="settings-shell__panel">
9
- <nav class="settings-shell__nav" aria-label="Console settings sections">
10
- <v-list nav density="compact" class="settings-shell__nav-list">
21
+ <ShellListDetail :detail-open="detailOpen">
22
+ <template #list>
23
+ <nav aria-label="Console settings sections">
24
+ <v-list nav>
11
25
  <ShellOutlet target="console-settings:primary-menu" />
12
26
  </v-list>
13
27
  </nav>
14
- <main class="settings-shell__content">
15
- <RouterView />
16
- </main>
17
- </v-sheet>
18
- </section>
28
+ </template>
29
+ <template #detail>
30
+ <RouterView />
31
+ </template>
32
+ </ShellListDetail>
19
33
  </template>
20
-
21
- <style scoped>
22
- .settings-shell__panel {
23
- display: grid;
24
- gap: 1rem;
25
- grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
26
- padding: 1rem;
27
- }
28
-
29
- .settings-shell__nav-list {
30
- padding: 0.35rem;
31
- }
32
-
33
- .settings-shell__nav-list :deep(.v-list-item) {
34
- min-height: 48px;
35
- padding-inline: 0.6rem 0.7rem;
36
- }
37
-
38
- .settings-shell__nav-list :deep(.v-list-item__prepend) {
39
- margin-inline-end: 0;
40
- }
41
-
42
- .settings-shell__nav-list :deep(.v-list-item__spacer) {
43
- min-width: 0.5rem;
44
- width: 0.5rem;
45
- }
46
-
47
- .settings-shell__nav-list :deep(.v-list-item-title) {
48
- line-height: 1.2;
49
- }
50
-
51
- .settings-shell__content {
52
- border-left: 1px solid rgba(var(--v-theme-on-surface), 0.18);
53
- min-width: 0;
54
- padding-left: 1rem;
55
- }
56
-
57
- @media (max-width: 960px) {
58
- .settings-shell__panel {
59
- grid-template-columns: 1fr;
60
- }
61
-
62
- .settings-shell__nav {
63
- overflow-x: auto;
64
- }
65
-
66
- .settings-shell__nav-list {
67
- display: flex;
68
- gap: 0.25rem;
69
- min-width: max-content;
70
- }
71
-
72
- .settings-shell__nav-list :deep(.v-list-item) {
73
- min-height: 48px;
74
- }
75
-
76
- .settings-shell__content {
77
- border-left: 0;
78
- padding-left: 0;
79
- }
80
- }
81
- </style>
@@ -0,0 +1,28 @@
1
+ import { createPlacementRegistry } from "@jskit-ai/shell-web/client/placement";
2
+
3
+ const registry = createPlacementRegistry();
4
+ const { addPlacement } = registry;
5
+
6
+ export { addPlacement };
7
+
8
+ // Keep the default export near the top so module installers can append addPlacement(...)
9
+ // blocks at the bottom of this file without changing the export section.
10
+ export default function getPlacements() {
11
+ return registry.build();
12
+ }
13
+
14
+ // Settings is a main destination of the console: choosing it starts a fresh trail, and its sections' Up returns to
15
+ // the settings list.
16
+ addPlacement({
17
+ id: "console.web.menu.settings",
18
+ target: "shell.primary-nav",
19
+ kind: "link",
20
+ surfaces: ["console"],
21
+ order: 100,
22
+ props: {
23
+ label: "Settings",
24
+ surface: "console",
25
+ scopedSuffix: "/settings",
26
+ unscopedSuffix: "/settings"
27
+ }
28
+ });