@jskit-ai/shell-web 0.1.24 → 0.1.27

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.
@@ -1,7 +1,7 @@
1
1
  export default Object.freeze({
2
2
  packageVersion: 1,
3
3
  packageId: "@jskit-ai/shell-web",
4
- version: "0.1.24",
4
+ version: "0.1.27",
5
5
  kind: "runtime",
6
6
  description: "Web shell layout runtime with outlet-based placement contributions.",
7
7
  dependsOn: [],
@@ -77,6 +77,18 @@ export default Object.freeze({
77
77
  position: "secondary-menu",
78
78
  surfaces: ["*"],
79
79
  source: "src/client/components/ShellLayout.vue"
80
+ },
81
+ {
82
+ host: "home-settings",
83
+ position: "primary-menu",
84
+ surfaces: ["home"],
85
+ source: "templates/src/pages/home/settings/index.vue"
86
+ },
87
+ {
88
+ host: "home-settings",
89
+ position: "forms",
90
+ surfaces: ["home"],
91
+ source: "templates/src/pages/home/settings/index.vue"
80
92
  }
81
93
  ],
82
94
  contributions: []
@@ -87,7 +99,7 @@ export default Object.freeze({
87
99
  dependencies: {
88
100
  runtime: {
89
101
  "@tanstack/vue-query": "^5.90.5",
90
- "@jskit-ai/kernel": "0.1.25",
102
+ "@jskit-ai/kernel": "0.1.28",
91
103
  "vuetify": "^4.0.0"
92
104
  },
93
105
  dev: {}
@@ -146,6 +158,14 @@ export default Object.freeze({
146
158
  category: "shell-web",
147
159
  id: "shell-web-page-home"
148
160
  },
161
+ {
162
+ from: "templates/src/pages/home/settings/index.vue",
163
+ toSurface: "home",
164
+ toSurfacePath: "settings/index.vue",
165
+ reason: "Install shell-driven home settings page scaffold with surface-derived settings outlets.",
166
+ category: "shell-web",
167
+ id: "shell-web-page-home-settings"
168
+ },
149
169
  {
150
170
  from: "templates/src/pages/console.vue",
151
171
  toSurface: "console",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/shell-web",
3
- "version": "0.1.24",
3
+ "version": "0.1.27",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tanstack/vue-query": "^5.90.5",
21
- "@jskit-ai/kernel": "0.1.25",
21
+ "@jskit-ai/kernel": "0.1.28",
22
22
  "vuetify": "^4.0.0"
23
23
  }
24
24
  }
@@ -46,6 +46,7 @@ const health = computed(() => {
46
46
  This is your primary landing page. Replace this content with your actual product home.
47
47
  </p>
48
48
  <div class="d-flex flex-wrap ga-3">
49
+ <v-btn color="primary" variant="flat" to="/home/settings">Open settings</v-btn>
49
50
  <v-btn color="primary" variant="flat" to="/console">Open console surface</v-btn>
50
51
  <v-btn color="secondary" variant="outlined" to="/auth/signout">Sign out</v-btn>
51
52
  </div>
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <section class="settings-page">
3
+ <ShellOutlet host="home-settings" position="primary-menu" />
4
+ <ShellOutlet host="home-settings" position="forms" />
5
+ </section>
6
+ </template>
7
+
8
+ <script setup>
9
+ import ShellOutlet from "@jskit-ai/shell-web/client/components/ShellOutlet";
10
+ </script>
11
+
12
+ <style scoped>
13
+ .settings-page {
14
+ display: grid;
15
+ gap: 1rem;
16
+ }
17
+ </style>
@@ -0,0 +1,65 @@
1
+ import assert from "node:assert/strict";
2
+ import path from "node:path";
3
+ import test from "node:test";
4
+ import { readFile } from "node:fs/promises";
5
+ import { fileURLToPath } from "node:url";
6
+ import descriptor from "../package.descriptor.mjs";
7
+
8
+ const TEST_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
9
+ const PACKAGE_DIR = path.resolve(TEST_DIRECTORY, "..");
10
+
11
+ function readSettingsOutlets() {
12
+ const outlets = descriptor?.metadata?.ui?.placements?.outlets;
13
+ return Array.isArray(outlets)
14
+ ? outlets.filter((entry) => String(entry?.host || "").trim() === "home-settings")
15
+ : [];
16
+ }
17
+
18
+ function findFileMutation(id) {
19
+ const files = descriptor?.mutations?.files;
20
+ return Array.isArray(files)
21
+ ? files.find((entry) => String(entry?.id || "").trim() === id) || null
22
+ : null;
23
+ }
24
+
25
+ test("shell-web home settings template exposes surface-derived settings outlets", async () => {
26
+ const source = await readFile(path.join(PACKAGE_DIR, "templates", "src", "pages", "home", "settings", "index.vue"), "utf8");
27
+
28
+ assert.match(source, /<ShellOutlet host="home-settings" position="primary-menu" \/>/);
29
+ assert.match(source, /<ShellOutlet host="home-settings" position="forms" \/>/);
30
+ });
31
+
32
+ test("shell-web descriptor metadata advertises home settings outlets and installs the scaffold page", () => {
33
+ assert.deepEqual(
34
+ readSettingsOutlets(),
35
+ [
36
+ {
37
+ host: "home-settings",
38
+ position: "primary-menu",
39
+ surfaces: ["home"],
40
+ source: "templates/src/pages/home/settings/index.vue"
41
+ },
42
+ {
43
+ host: "home-settings",
44
+ position: "forms",
45
+ surfaces: ["home"],
46
+ source: "templates/src/pages/home/settings/index.vue"
47
+ }
48
+ ]
49
+ );
50
+
51
+ assert.deepEqual(findFileMutation("shell-web-page-home-settings"), {
52
+ from: "templates/src/pages/home/settings/index.vue",
53
+ toSurface: "home",
54
+ toSurfacePath: "settings/index.vue",
55
+ reason: "Install shell-driven home settings page scaffold with surface-derived settings outlets.",
56
+ category: "shell-web",
57
+ id: "shell-web-page-home-settings"
58
+ });
59
+ });
60
+
61
+ test("shell-web home starter page links to the home settings scaffold", async () => {
62
+ const source = await readFile(path.join(PACKAGE_DIR, "templates", "src", "pages", "home", "index.vue"), "utf8");
63
+
64
+ assert.match(source, /to="\/home\/settings"/);
65
+ });