@wildwinter/toolkit 0.2.5 → 0.2.7
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 +17 -0
- package/conformance/extensions/manifest.json +307 -0
- package/dist/extensions.cjs +82 -4
- 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 +81 -5
- package/dist/extensions.js.map +1 -1
- package/extensions.md +26 -2
- 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
|
|
@@ -65,8 +87,8 @@ read the same one. It is JSON (JSON5 is read too), and is called `<id>.extension
|
|
|
65
87
|
}
|
|
66
88
|
```
|
|
67
89
|
|
|
68
|
-
- `label`, `help`, `valueHelp` (one sentence per enum or flags value
|
|
69
|
-
editor, and never reach a bundle.
|
|
90
|
+
- `label`, `help`, `valueHelp` (one sentence per enum or flags value, quality stage, or a pick's fixed word) and
|
|
91
|
+
`group` are for the editor, and never reach a bundle.
|
|
70
92
|
- `required`, `min` and `max` (numbers only) are validation.
|
|
71
93
|
- `editorOnly` is allowed on a target's own fields only, not inside a record.
|
|
72
94
|
|
|
@@ -130,6 +152,8 @@ A pick is a single choice whose choices come from sources the manifest names, in
|
|
|
130
152
|
Empty is automatic: no word for it is stored, and an editor shows it as "auto". A pick isn't an `enum` whose values
|
|
131
153
|
change: an enum's values are fixed and checked against the manifest, a pick's are the project's.
|
|
132
154
|
|
|
155
|
+
`valueHelp` may describe a pick's fixed `words`, never its nodes or lists, which are the project's.
|
|
156
|
+
|
|
133
157
|
`valueProblems` reports a value no source holds (`not-a-choice`, an error), given the host's nodes (`exists`) and
|
|
134
158
|
lists (`list`) in its context; a source it can't see is not checked, so a value is reported missing only when every
|
|
135
159
|
source can say. A value two sources hold is ambiguous (`pick-ambiguous`, a warning), and `pickClashes` reports each
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildwinter/toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
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",
|