@startside/swa 1.0.1 → 1.0.3
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/LICENSE +7 -6
- package/README.md +15 -4
- package/bin/swa.mjs +10 -10
- package/package.json +2 -2
- package/swa/1.0/agents.md +166 -8
- package/swa/1.0/frame.css +245 -0
- package/swa/1.0/frame.js +4 -0
- package/swa/1.0/host.md +126 -0
- package/swa/1.0/quickstart.md +13 -2
- package/swa/1.0/runtime.js +3 -3
- package/swa/1.0/spec.md +429 -46
- package/swa/1.0/swa.d.ts +148 -6
package/LICENSE
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
This package holds two kinds of files, under two licences:
|
|
2
2
|
|
|
3
|
-
- The
|
|
4
|
-
below, which covers them only, not the texts. bin/swa.mjs also
|
|
5
|
-
licences, at the end of this file.
|
|
6
|
-
- The texts (swa/1.0/spec.md, swa/1.0/quickstart.md, swa/1.0/agents.md): the Startside Widget API
|
|
7
|
-
specification, SWA in 60 lines and the guide for
|
|
8
|
-
Attribution 4.0 International licence (CC BY 4.0):
|
|
3
|
+
- The runtimes, their styles, the types and the command (swa/1.0/runtime.js, swa/1.0/frame.js, swa/1.0/frame.css,
|
|
4
|
+
swa/1.0/swa.d.ts, bin/swa.mjs): the MIT License, below, which covers them only, not the texts. bin/swa.mjs also
|
|
5
|
+
holds Acorn and acorn-jsx, under their own MIT licences, at the end of this file.
|
|
6
|
+
- The texts (swa/1.0/spec.md, swa/1.0/quickstart.md, swa/1.0/agents.md, swa/1.0/host.md): the Startside Widget API
|
|
7
|
+
(SWA) 1.0 specification, SWA in 60 lines, the guide for agents and the guide for hosts, © 2026 François Hodierne,
|
|
8
|
+
under the Creative Commons Attribution 4.0 International licence (CC BY 4.0):
|
|
9
|
+
https://creativecommons.org/licenses/by/4.0/
|
|
9
10
|
Their current versions: https://startside.app/swa/1.0/
|
|
10
11
|
|
|
11
12
|
MIT License
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @startside/swa
|
|
2
2
|
|
|
3
|
-
The runtime of the **Startside Widget API (SWA) 1.0**, its TypeScript types, its specification in Markdown,
|
|
4
|
-
command that checks a widget file and inlines its runtime.
|
|
3
|
+
The runtime of the **Startside Widget API (SWA) 1.0**, its TypeScript types, its specification in Markdown, a
|
|
4
|
+
command that checks a widget file and inlines its runtime, and what another host needs to run widgets in its own page.
|
|
5
5
|
|
|
6
6
|
An SWA widget is a single HTML file: its head names it and loads this runtime, a hidden form declares its settings, and
|
|
7
7
|
its scripts draw it through one object, `widget`. Opened on its own, the file runs on a standalone page with the
|
|
@@ -83,6 +83,17 @@ that loads the runtime by its address as the widget's own, and inline again afte
|
|
|
83
83
|
|
|
84
84
|
Or next to a widget's code, with the file copied beside it: `/// <reference path="./swa.d.ts" />`.
|
|
85
85
|
|
|
86
|
+
## Running widgets in your own page
|
|
87
|
+
|
|
88
|
+
Since 1.0.3, for a page that runs SWA widget files the way Startside's dashboard does, each in a sandboxed frame:
|
|
89
|
+
|
|
90
|
+
- `swa/1.0/frame.js`: the runtime a host writes into a widget's frame (not `runtime.js`, which runs a file on its own
|
|
91
|
+
page);
|
|
92
|
+
- `swa/1.0/frame.css`: its base styles, for the frame's host layer;
|
|
93
|
+
- `swa/1.0/host.md`: how: the frame, its document, the config the runtime reads, and the messages a host must answer.
|
|
94
|
+
|
|
95
|
+
RWA files need RWA's runtime, which isn't in this package.
|
|
96
|
+
|
|
86
97
|
## Versions
|
|
87
98
|
|
|
88
99
|
The package has its own version. A patch is a runtime fix, the texts brought up to date, or the command's changes; a
|
|
@@ -91,5 +102,5 @@ remove one. The API's version is the one in the path.
|
|
|
91
102
|
|
|
92
103
|
## Licence
|
|
93
104
|
|
|
94
|
-
The
|
|
95
|
-
`quickstart.md`, `agents.md`): CC BY 4.0, © François Hodierne. `LICENSE` says which is which.
|
|
105
|
+
The runtimes, their styles, the types and the command: MIT; the command holds Acorn and acorn-jsx, MIT too. The texts (`spec.md`,
|
|
106
|
+
`quickstart.md`, `agents.md`, `host.md`): CC BY 4.0, © François Hodierne. `LICENSE` says which is which.
|