@wildwinter/toolkit 0.3.0 → 0.3.1

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/extensions.md CHANGED
@@ -66,6 +66,18 @@ reads: ["patterstage"],
66
66
  - `reads`: other extensions whose data the views read, by id. An extension always reads its own; naming itself is a
67
67
  warning.
68
68
 
69
+ ### Requirements
70
+
71
+ ```json5
72
+ requires: ["patterstage"],
73
+ ```
74
+
75
+ `requires` names other extensions, by id, that a project must take for this one to work: Pattershot's runner
76
+ attaches to Patterstage's Director, so a project with Pattershot and no Patterstage can't play its performances.
77
+ Each id appears once, and never the extension's own. A host refuses to add an extension whose requirements the
78
+ project doesn't take (or offers to add them first), its validation warns of a project that takes one without them,
79
+ and it tells the extension's views which are missing. `missingRequirements(manifest, taken)` lists them.
80
+
69
81
  ### Field declarations
70
82
 
71
83
  ```json5
@@ -80,6 +92,7 @@ reads: ["patterstage"],
80
92
  required: true, // a node of this kind must set it
81
93
  group: "Delivery", // a heading within the extension's group, in field order
82
94
  editorOnly: true, // stripped at compile; editor data, never in the bundle
95
+ editor: "sheet", // a map of records only: one of the manifest's views edits it
83
96
  }
84
97
  ```
85
98
 
@@ -87,6 +100,10 @@ reads: ["patterstage"],
87
100
  `group` are for the editor, and never reach a bundle.
88
101
  - `required`, `min` and `max` (numbers only) are validation.
89
102
  - `editorOnly` is allowed on a target's own fields only, not inside a record.
103
+ - `editor` names one of the manifest's views, by id, that edits the field: the host's inspector opens that view at
104
+ the node instead of its own grid for a map of records. It's allowed on a target's own fields only, the view must
105
+ open in that target's host, and on a field that isn't a map of records it's warned of and ignored, as such a field
106
+ is edited in place.
90
107
 
91
108
  ### Removed keys
92
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildwinter/toolkit",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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",