@microvac/plugin-bottom-bar 0.0.0-stage → 0.1.0-rc.17
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/LICENSE +22 -0
- package/package.json +32 -4
- package/src/client.js +23 -0
- package/src/index.js +33 -0
- package/src/page.d.ts +4 -0
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Paperclip AI
|
|
4
|
+
Copyright (c) 2026 Microvac contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microvac/plugin-bottom-bar",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-rc.17",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Microvac plugin: the instance layout of the mobile bottom bar.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.js",
|
|
9
|
+
"./client": "./src/client.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
15
|
+
"dsh": {
|
|
16
|
+
"client": {
|
|
17
|
+
"platform": "web",
|
|
18
|
+
"inject": [
|
|
19
|
+
"bottomBar"
|
|
20
|
+
],
|
|
21
|
+
"immediately": true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@deepseek-ai/schemastery": "3.20.0-alpha.2"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"typecheck": "tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/microvac-ai/microvac"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/client.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* Client face of the `bottom-bar` plugin, in the page module loader's format
|
|
4
|
+
* (`dsh-client-modules` serves it under `/plugins` as is). It gives the
|
|
5
|
+
* instance layout, the host face's volatile `entries` field, to the page's
|
|
6
|
+
* bottom bar registry; the registry follows the synced value as it changes
|
|
7
|
+
* and drops it when the plugin stops.
|
|
8
|
+
*/
|
|
9
|
+
window.__ModuleLoader__.load({
|
|
10
|
+
id: "@microvac/plugin-bottom-bar",
|
|
11
|
+
factory: () => ({
|
|
12
|
+
name: "@microvac/plugin-bottom-bar",
|
|
13
|
+
inject: ["bottomBar"],
|
|
14
|
+
/**
|
|
15
|
+
* @param {{ bottomBar: { arrange(source: { get(): string | undefined, subscribe?(listener: () => void): () => void }): () => void } }} ctx
|
|
16
|
+
* @param {{ entries?: { get(): string | undefined, subscribe?(listener: () => void): () => void } }} config
|
|
17
|
+
*/
|
|
18
|
+
apply(ctx, config) {
|
|
19
|
+
// A peer without the owner's values reads no layout: the upstream bar.
|
|
20
|
+
ctx.bottomBar.arrange(config.entries ?? { get: () => undefined });
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
});
|
package/src/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* Host face of the `bottom-bar` plugin. It only holds the configuration:
|
|
4
|
+
* `entries` is volatile, so `dsh-client-modules` syncs it to the client face
|
|
5
|
+
* (`./client.js`), which gives it to the page's bottom bar registry. Disable
|
|
6
|
+
* the plugin to get the upstream bar back.
|
|
7
|
+
*
|
|
8
|
+
* # microvac.yml
|
|
9
|
+
* - id: bottom-bar
|
|
10
|
+
* name: "@microvac/plugin-bottom-bar"
|
|
11
|
+
* config:
|
|
12
|
+
* entries: home, chat, new-task, tasks, decisions, inbox
|
|
13
|
+
*/
|
|
14
|
+
import z from "@deepseek-ai/schemastery";
|
|
15
|
+
|
|
16
|
+
export const name = "@microvac/plugin-bottom-bar";
|
|
17
|
+
|
|
18
|
+
/** Instance default (`docs/microvac/decisions.md`): Decisions replaces Agents. */
|
|
19
|
+
export const DEFAULT_ENTRIES = "home, chat, new-task, tasks, decisions, inbox";
|
|
20
|
+
|
|
21
|
+
export const Config = z.object({
|
|
22
|
+
entries: z
|
|
23
|
+
.string()
|
|
24
|
+
.default(DEFAULT_ENTRIES)
|
|
25
|
+
.volatile()
|
|
26
|
+
.description(
|
|
27
|
+
"Mobile bottom bar entries, in order, separated by commas. Upstream: home, chat, new-task, tasks, " +
|
|
28
|
+
"agents, inbox, decisions; page plugins add their own (e.g. blocked). Unknown entries are skipped.",
|
|
29
|
+
),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** The host face has nothing to start. */
|
|
33
|
+
export function apply() {}
|
package/src/page.d.ts
ADDED
package/README.md
DELETED