@tinyactors/scxmljs 0.2.0-dev.0 → 0.2.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.
Files changed (51) hide show
  1. package/README.md +9 -9
  2. package/dist/explorer/element.d.ts +5 -3
  3. package/dist/explorer/element.js +523 -262
  4. package/dist/explorer/element.js.map +1 -1
  5. package/dist/explorer/strings.d.ts +41 -23
  6. package/dist/explorer/strings.js +24 -15
  7. package/dist/explorer/strings.js.map +1 -1
  8. package/dist/explorer/styles.d.ts +9 -1
  9. package/dist/explorer/styles.js +291 -150
  10. package/dist/explorer/styles.js.map +1 -1
  11. package/dist/explorer.d.ts +1 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/model.d.ts +4 -1
  14. package/dist/model.js +7 -1
  15. package/dist/model.js.map +1 -1
  16. package/dist/session.d.ts +22 -9
  17. package/dist/session.js +53 -13
  18. package/dist/session.js.map +1 -1
  19. package/dist/themes/tinyactors.css +1 -0
  20. package/dist/trusted.d.ts +1 -0
  21. package/dist/ui/icons.d.ts +31 -0
  22. package/dist/ui/icons.js +186 -0
  23. package/dist/ui/icons.js.map +1 -0
  24. package/dist/ui/notation.d.ts +53 -0
  25. package/dist/ui/notation.js +117 -0
  26. package/dist/ui/notation.js.map +1 -0
  27. package/dist/ui/svg.d.ts +4 -0
  28. package/dist/ui/svg.js +26 -0
  29. package/dist/ui/svg.js.map +1 -1
  30. package/dist/ui/theme.d.ts +1 -1
  31. package/dist/ui/theme.js +6 -0
  32. package/dist/ui/theme.js.map +1 -1
  33. package/dist/view/describe.d.ts +17 -0
  34. package/dist/view/describe.js +49 -0
  35. package/dist/view/describe.js.map +1 -0
  36. package/dist/view/element.d.ts +39 -9
  37. package/dist/view/element.js +723 -86
  38. package/dist/view/element.js.map +1 -1
  39. package/dist/view/layout.d.ts +20 -0
  40. package/dist/view/layout.js +205 -29
  41. package/dist/view/layout.js.map +1 -1
  42. package/dist/view/strings.d.ts +34 -8
  43. package/dist/view/strings.js +19 -6
  44. package/dist/view/strings.js.map +1 -1
  45. package/dist/view/styles.d.ts +1 -1
  46. package/dist/view/styles.js +107 -21
  47. package/dist/view/styles.js.map +1 -1
  48. package/dist/view.d.ts +8 -4
  49. package/dist/view.js +6 -3
  50. package/dist/view.js.map +1 -1
  51. package/package.json +2 -2
package/README.md CHANGED
@@ -6,12 +6,11 @@ automatic mandatory W3C conformance tests. Two custom elements draw running char
6
6
  shows a whole chart and needs no JavaScript, and `<scxml-explorer>` explores large, multi-machine
7
7
  systems one level at a time. They are plain custom elements, so they work with any framework.
8
8
 
9
- <!-- readme-media:start -->
10
- <!-- generated by scripts/readme-media: don't edit by hand -->
11
- [![<scxml-explorer> following a running order-fulfilment system: the order machine's tree, the focus on its current state, the events it accepts, and the System level with the payment and shipment machines](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-08b6af42.webp)](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-08b6af42.webm)
9
+ [![<scxml-explorer> following a running order-fulfilment system: the order machine's tree, the focus on its current state, the events it accepts, and the System level with the payment and shipment machines](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-tour-b91fad8a.webp)](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-tour-b91fad8a.webm)
12
10
 
13
- <sub>[Full-resolution video](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-08b6af42.webm) (WebM, 2880×1800) · [High-resolution screenshot](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-08b6af42.png) (PNG) · the explorer with the optional Tinyactors theme</sub>
14
- <!-- readme-media:end -->
11
+ <sub>[Full-resolution video](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-tour-b91fad8a.webm) (WebM, 2880×1800) · [High-resolution screenshot](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/explorer-tour-b91fad8a.png) (PNG) · the explorer with the optional Tinyactors theme</sub>
12
+
13
+ **Docs & demos: <https://scxmljs.tinyactors.dev>**: guides, live demos and the API reference.
15
14
 
16
15
  ## Install
17
16
 
@@ -70,10 +69,11 @@ bundler, or an [import map](https://github.com/tinyactors-dev/scxmljs/blob/main/
70
69
  The element loads, validates, runs and draws the chart. Active states are highlighted, and each
71
70
  transition label is a button that sends its event.
72
71
 
73
- ![A media player chart drawn by <scxml-view>: the "playing" and "audible" states are active](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/main/docs/images/view-light.webp)
72
+ ![A media player chart drawn by <scxml-view>: the "playing" and "audible" states are active](https://raw.githubusercontent.com/tinyactors-dev/scxmljs/readme-media/view-light-b74e654c.webp)
74
73
 
75
74
  **Explore a running system** with `<scxml-explorer>`: a tree of states, a focus on one level of
76
- the chart, the events the machine accepts right now, and playback controls.
75
+ the chart (each state with what it does, how it leaves, and buttons to send its events while
76
+ it's active), the events the machine accepts right now, and playback controls.
77
77
 
78
78
  <!-- doctest: check -->
79
79
  ```ts
@@ -125,7 +125,7 @@ The [getting-started guide](https://github.com/tinyactors-dev/scxmljs/blob/main/
125
125
  | `@tinyactors/scxmljs` | the interpreter, **sandboxed**: chart code runs in QuickJS (WebAssembly) | 20 KB, then 290 KB loaded on demand |
126
126
  | `@tinyactors/scxmljs/trusted` | the same API, **trusted**: chart code runs in the host's own JavaScript engine | 17 KB |
127
127
  | `@tinyactors/scxmljs/view` | `<scxml-view>`: a whole chart, drawn and running, zero-JS | 33 KB, plus the engine it loads |
128
- | `@tinyactors/scxmljs/explorer` | `<scxml-explorer>` and its view-model: explore a running system | 25 KB |
128
+ | `@tinyactors/scxmljs/explorer` | `<scxml-explorer>` and its view-model: explore a running system | 26 KB |
129
129
  | `@tinyactors/scxmljs/themes/tinyactors.css` | an optional theme stylesheet | 0.3 KB |
130
130
 
131
131
  Sizes are for a browser bundle of each entry on its own (`mise run size` in the repository).
@@ -150,7 +150,7 @@ Details: [sandboxed vs trusted](https://github.com/tinyactors-dev/scxmljs/blob/m
150
150
  - Elements: [`<scxml-view>`](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/view.md), [`<scxml-explorer>`](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/explorer.md), [theming](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/theming.md), [custom UI and translations](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/custom-ui.md), [large charts](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/large-charts.md), [frameworks](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/frameworks.md)
151
151
  - Interpreter: [sandboxed vs trusted](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/sandboxed-vs-trusted.md), [driving charts from the page](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/driving-charts.md), [custom I/O processors](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/io-processors.md), [custom invokers](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/invokers.md), [playback and stepping](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/playback.md), [testing](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/testing.md), [Node and servers](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/node-and-servers.md)
152
152
  - Shipping: [bundling, CDNs and classic scripts](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/bundling.md), [Content-Security-Policy](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/csp.md)
153
- - Reference: [conformance report](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/conformance.md), [deviations from the spec](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/deviations.md), [measurements](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/measurements.md), API reference (`mise run docs:api` in the repository)
153
+ - Reference: [conformance report](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/conformance.md), [deviations from the spec](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/deviations.md), [measurements](https://github.com/tinyactors-dev/scxmljs/blob/main/docs/measurements.md), [API reference](https://scxmljs.tinyactors.dev/api/)
154
154
 
155
155
  ## Support
156
156
 
@@ -7,8 +7,10 @@
7
7
  * chart), doors in/out of the focus, and the events accepted right now
8
8
  * State detail for one state: actions, transitions, invokes, data
9
9
  *
10
- * No canvas, no pan/zoom: navigation is tree + breadcrumbs + drill-in, and the
11
- * layout collapses to one pane with bottom tabs in narrow containers.
10
+ * No canvas, no pan/zoom: navigation is tree + breadcrumbs + drill-in. The focus
11
+ * fills the element; the tree and the inspector float over it as panels (two when
12
+ * wide, one with two pages when medium, a bottom sheet when narrow), playback and
13
+ * Follow sit in the bottom corners.
12
14
  * Big charts: the tree is windowed, lists are grouped/filterable and cut off
13
15
  * with "+N more", the focus switches from diagram to list when it gets crowded.
14
16
  *
@@ -17,7 +19,7 @@
17
19
  * detail:<id> in that state's detail pane
18
20
  * event:<descriptor> in the row of that accepted event (e.g. a form for its data)
19
21
  * service:<alias> in that service's card at the System level
20
- * toolbar in the header, before the Follow toggle
22
+ * toolbar in the panel's head, after the breadcrumb
21
23
  * empty-tree, empty-events, empty-detail replace the empty-state messages
22
24
  *
23
25
  * const x = document.querySelector("scxml-explorer");