@brftech/filex-app-ui 0.48.1 → 0.50.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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ The SDK an app's own interface bundles to talk to [filex](https://github.com/BRF
|
|
|
5
5
|
An app may bring its own HTML/JS/CSS interface. filex serves it from the app's
|
|
6
6
|
approved package and runs it in a sandboxed frame whose policy allows no
|
|
7
7
|
connection, no storage and no cookie (a browser cannot fully stop a page
|
|
8
|
-
sending data out
|
|
8
|
+
sending data out - see filex's APP-PLUGINS.md). Everything the interface does
|
|
9
9
|
goes through filex over one checked channel, and this package is that channel: a few KB, no dependency.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
@@ -30,10 +30,10 @@ with a `<script src>`: it defines `window.FilexAppUI.connect`.
|
|
|
30
30
|
| `fx.session` | the app and view, the reader's language and direction, filex's colours, the person's display name, the files, the grants |
|
|
31
31
|
| `fx.open(i)` / `fx.save(data)` / `fx.saveAs(name, data)` | read an opened file; save over it (a new version, or the draft it is); save a new file where the person picks |
|
|
32
32
|
| `fx.dirty(on)`, `fx.title(t)`, `fx.toast(t, tone)`, `fx.confirm(opts)`, `fx.close()` | tell filex about unsaved changes; ask filex to draw a line, a question, to close (a toast and a question carry your app's name) |
|
|
33
|
-
| `fx.copy(text)` | put text on the clipboard
|
|
34
|
-
| `fx.download(name, data, mime?)` | hand the person a file for their own disk (`"ui": { "download": true }` in the manifest)
|
|
33
|
+
| `fx.copy(text)` | put text on the clipboard - call it from a click or a key press: without one, filex asks the person first |
|
|
34
|
+
| `fx.download(name, data, mime?)` | hand the person a file for their own disk (`"ui": { "download": true }` in the manifest) - from a click, or filex asks; 256 MiB at most; Chromium streams it into the file they pick |
|
|
35
35
|
| `fx.call(method, params)` | ask the app's own module (`ui_call`) |
|
|
36
|
-
| `fx.submit(action, params)` | queue one of the app's actions on the opened files
|
|
36
|
+
| `fx.submit(action, params)` | queue one of the app's actions on the opened files - like `copy`, from a click, or filex asks |
|
|
37
37
|
| `fx.state.get(key)` / `fx.state.set(key, value)` | a small store for this app and this person |
|
|
38
38
|
| `fx.on('theme' \| 'locale' \| 'file.changed' \| 'close.request' \| 'app.updated', fn)` | listen to filex |
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ with a `<script src>`: it defines `window.FilexAppUI.connect`.
|
|
|
41
41
|
and `data-theme` onto `<html>` and keeps them current; pass
|
|
42
42
|
`{ applyTheme: false }` to do it yourself.
|
|
43
43
|
|
|
44
|
-
The whole contract
|
|
44
|
+
The whole contract - manifest, serving policy, every message - is
|
|
45
45
|
`docs/APP-PLUGINS-API.md` → "An app's own interface"; how to build and package
|
|
46
46
|
an interface is `docs/PLUGIN-KIT.md` → "Writing an interface". The protocol
|
|
47
47
|
itself is `src/protocol.ts` (also exported as `@brftech/filex-app-ui/protocol`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brftech/filex-app-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.0",
|
|
4
4
|
"description": "filex app interface SDK: the bridge between an app's own sandboxed interface and filex (open, save, dirty, call the app's module)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/filex-app-ui.js",
|