@wildwinter/toolkit 0.2.5 → 0.2.6
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/CHANGELOG.md +10 -0
- package/conformance/extensions/manifest.json +232 -0
- package/dist/extensions.cjs +73 -1
- package/dist/extensions.cjs.map +1 -1
- package/dist/extensions.d.cts +23 -1
- package/dist/extensions.d.ts +23 -1
- package/dist/extensions.js +72 -2
- package/dist/extensions.js.map +1 -1
- package/extensions.md +22 -0
- package/package.json +1 -1
package/extensions.md
CHANGED
|
@@ -48,6 +48,28 @@ read the same one. It is JSON (JSON5 is read too), and is called `<id>.extension
|
|
|
48
48
|
- **Fields** per target, in the order the editor shows them.
|
|
49
49
|
- **Claims** on host fields, named through a project setting.
|
|
50
50
|
|
|
51
|
+
### Views and reads
|
|
52
|
+
|
|
53
|
+
A manifest can declare views: web components in the extension's installed package, each opened by a host in a
|
|
54
|
+
floating window of its own, sandboxed, talking to the host only through the host API (`@wildwinter/app-shell`'s
|
|
55
|
+
`view-client`). The project's copy of the manifest declares them; the code comes from the package installed on the
|
|
56
|
+
machine, never from the project folder.
|
|
57
|
+
|
|
58
|
+
```json5
|
|
59
|
+
views: [
|
|
60
|
+
{ id: "sheet", name: "Performance sheet", entry: "view/sheet.js", element: "pattershot-sheet", hosts: ["patter"] },
|
|
61
|
+
],
|
|
62
|
+
reads: ["patterstage"],
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `id`: lower case, digits and hyphens, unique among the views; `name`: the window's title and the menu item.
|
|
66
|
+
- `entry`: the component's script, a relative `.js` path inside the package, with no `.` or `..` segment
|
|
67
|
+
(`isViewEntry`). `element`: the custom element it defines, lower case with a hyphen, unique among the views.
|
|
68
|
+
- `hosts`: the hosts that offer the view. When absent, every host the manifest targets does; naming a host the
|
|
69
|
+
manifest targets nothing in is a warning. `viewsFor(manifest, host)` lists what a host offers.
|
|
70
|
+
- `reads`: other extensions whose data the views read, by id. An extension always reads its own; naming itself is a
|
|
71
|
+
warning.
|
|
72
|
+
|
|
51
73
|
### Field declarations
|
|
52
74
|
|
|
53
75
|
```json5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildwinter/toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Small shared pieces of the authoring tooling: opaque ids, a stable hash, JSON5 source parsing, find/replace matching, the archive guards, and (in ./extensions) the spec and merge for Patter extensions and Storylet extensions. Nothing here runs in a game.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|