@nesso-how/plugin-example 0.4.0 → 0.6.0
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 +11 -8
- package/dist/index.js +10225 -63
- package/package.json +46 -20
- package/src/Quiz.css +50 -0
- package/src/Quiz.tsx +70 -0
- package/src/index.ts +18 -9
- package/tsconfig.json +6 -4
- package/vite.config.ts +14 -0
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Plugin Example
|
|
2
2
|
|
|
3
|
-
The official Nesso
|
|
3
|
+
The official Nesso plugin example: an **Uppercase labels** action and a React **Concept Quiz** with persistent progress. See [`src/index.ts`](src/index.ts) and [`src/Quiz.tsx`](src/Quiz.tsx).
|
|
4
4
|
|
|
5
5
|
## Install and try
|
|
6
6
|
|
|
7
|
-
In the desktop app, open Settings → Plugins, search for `@nesso-how/plugin-example`, and install it. Approve its declared access to concept labels.
|
|
7
|
+
In the desktop app, open Settings → Plugins, search for `@nesso-how/plugin-example`, and install it. Approve its declared access to concept labels, interactive panels, and private storage. The panel example requires the SDK and app versions containing central-panel support; build from this checkout until that SDK release is published.
|
|
8
8
|
|
|
9
|
-
Run
|
|
9
|
+
Run either action from a view's context menu in the Explorer, or from its actions in the Inspector with nothing selected.
|
|
10
10
|
|
|
11
11
|
## Build your own
|
|
12
12
|
|
|
@@ -17,9 +17,9 @@ npm install
|
|
|
17
17
|
npm run build
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
The
|
|
20
|
+
The Vite configuration bundles code and imported CSS into `dist/index.js`, leaving React and React DOM to Nesso. See the [UI contract](../README.md#action-ui) for runtime requirements.
|
|
21
21
|
|
|
22
|
-
Choose your own package name and action
|
|
22
|
+
Choose your own package name, plugin metadata, and action IDs and labels before publishing.
|
|
23
23
|
|
|
24
24
|
## Test an unpublished build
|
|
25
25
|
|
|
@@ -28,8 +28,11 @@ Open `package.json` and `dist/index.js` in a text editor. In desktop DevTools, s
|
|
|
28
28
|
```ts
|
|
29
29
|
const result = await window.nessoPlugins.propose(
|
|
30
30
|
crypto.randomUUID(),
|
|
31
|
-
{
|
|
32
|
-
|
|
31
|
+
{
|
|
32
|
+
manifest,
|
|
33
|
+
files: [{ path: manifest.nesso.entry, bytes: new TextEncoder().encode(compiledCode) }],
|
|
34
|
+
},
|
|
35
|
+
'en',
|
|
33
36
|
)
|
|
34
37
|
```
|
|
35
38
|
|