@vormio/plugin-sdk 0.0.9-rc.1 → 0.0.9
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/README.md +2 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -222,6 +222,7 @@ When a format looks an object up by name in another file, report the object itse
|
|
|
222
222
|
|
|
223
223
|
- A key that other files refer to is a contract within your plugin: derive it from the format's own lookup rule (for Spine, the region name), so that it stays the same when the target file is exported again. Never use a position in a list.
|
|
224
224
|
- The host connects the two reports only when the same build of your plugin analyzed both files (same plugin ID and package). Your analyzers for both formats must be in one plugin.
|
|
225
|
+
- A build is identified by the package digest: a SHA-256 over every file's path and content, the `digest` that `vormio-plugin pack` prints. A development folder gets the digest of its files, the same as the package made from them, so any change to any file there, a viewer or thumbnail file included, is a new build. After a new build the host analyzes all your files again; while one end of a reference has been analyzed by the new build and the other not yet, the reference is unknown, with that reason, and it resolves again once both are done.
|
|
225
226
|
- Do not read the target file to check that the subresource exists. The host decides at query time, from the target's current report, and the status follows when the target is analyzed again:
|
|
226
227
|
|
|
227
228
|
| The target file | Written reference | Inferred reference |
|
|
@@ -246,6 +247,7 @@ viewer(showAtlas, {
|
|
|
246
247
|
|
|
247
248
|
- The key is from your own analyzer's report: the host asks only when the viewer and the shown file's analysis come from the same build of your plugin.
|
|
248
249
|
- `focus` is called only after the viewer reported the file ready. A request about a file the viewer has moved away from is dropped. The same key can come again when the user asks again; show it again.
|
|
250
|
+
- Every input the viewer is given has a new `url`, also when it is a new version of the same file, and the old address stops working. `viewer()` drops a request whose `url` is not the input currently shown, so a request about an older version never lands on new content.
|
|
249
251
|
- Find it if you can, for example by selecting, framing or highlighting it; ignore keys you cannot find. The host does not wait for an answer.
|
|
250
252
|
- Pages that do not use `viewer()` subscribe with `window.vormio.onFocus(({ url, key }) => …)` and compare `url` with the input they show.
|
|
251
253
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vormio/plugin-sdk",
|
|
3
|
-
"version": "0.0.9
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Manifest schema, runtime helpers and packaging for Vormio plugins.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/Vormio/Vormio-Core.git",
|
|
9
|
+
"directory": "packages/plugin-sdk"
|
|
10
|
+
},
|
|
6
11
|
"keywords": [
|
|
7
12
|
"vormio",
|
|
8
13
|
"plugin",
|