@plitzi/sdk-authoring 0.38.12 → 0.38.14
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/CHANGELOG.md +151 -0
- package/dist/index-src.js +205 -148
- package/dist/index.d.ts +151 -1
- package/dist/index.js +2 -2
- package/dist/node.d.ts +18 -0
- package/dist/plugin.d.ts +867 -0
- package/dist/plugin.js +2 -0
- package/package.json +8 -6
- package/skills/plitzi-authoring/reference/layouts.md +10 -0
- package/skills/plitzi-authoring/reference/plugins.md +4 -4
package/dist/plugin.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-authoring",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.14",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/index.js",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"dist/index-*.js",
|
|
9
9
|
"dist/node.js",
|
|
10
10
|
"dist/node.d.ts",
|
|
11
|
+
"dist/plugin.js",
|
|
12
|
+
"dist/plugin.d.ts",
|
|
11
13
|
"skills"
|
|
12
14
|
],
|
|
13
15
|
"main": "dist/index.js",
|
|
@@ -59,11 +61,11 @@
|
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@microsoft/api-extractor": "^7.59.3",
|
|
61
63
|
"@plitzi/plitzi-ui": "^1.6.33",
|
|
62
|
-
"@plitzi/sdk-elements": "0.38.
|
|
63
|
-
"@plitzi/sdk-interactions": "0.38.
|
|
64
|
-
"@plitzi/sdk-schema": "0.38.
|
|
65
|
-
"@plitzi/sdk-shared": "0.38.
|
|
66
|
-
"@plitzi/sdk-style": "0.38.
|
|
64
|
+
"@plitzi/sdk-elements": "0.38.14",
|
|
65
|
+
"@plitzi/sdk-interactions": "0.38.14",
|
|
66
|
+
"@plitzi/sdk-schema": "0.38.14",
|
|
67
|
+
"@plitzi/sdk-shared": "0.38.14",
|
|
68
|
+
"@plitzi/sdk-style": "0.38.14",
|
|
67
69
|
"@types/react": "^19.3.0",
|
|
68
70
|
"eslint": "^9.39.5",
|
|
69
71
|
"prettier": "^3.9.9",
|
|
@@ -145,6 +145,16 @@ Every page is now its content and nothing else, and every page is guaranteed the
|
|
|
145
145
|
by name — `"{{ not (apiContainer_feed.products|find('slug', navigation.routeParams.slug)) }}"`. The page renders as
|
|
146
146
|
written: show its "not found" part with `visible`.
|
|
147
147
|
|
|
148
|
+
## A screen that fills the window
|
|
149
|
+
|
|
150
|
+
A dashboard or a board — one screen whose panels scroll on their own — says so on its page: `documentScroll:
|
|
151
|
+
'locked'` holds the document still, so a finger dragged on a tablet no longer pulls the whole page and bounces it
|
|
152
|
+
back. Give the shell the window's height (`height: '100dvh'`) and `overflow: 'auto'` to each part that scrolls; what
|
|
153
|
+
does not fit is cut off, with nothing a visitor can scroll to reach it. `'noBounce'` keeps a page scrolling without
|
|
154
|
+
the rubber band or pull-to-refresh. Either is written onto the document only while that page is on it, and only when
|
|
155
|
+
the document is the space's own — never the site a widget sits on, nor a space drawn inside another. Not an
|
|
156
|
+
`html, body` rule in `customCss`, which holds every page and the site the space is a widget on.
|
|
157
|
+
|
|
148
158
|
## Styles follow the same rule
|
|
149
159
|
|
|
150
160
|
- A role used on several pages is ONE class (`panelCard`, `pageTitle`), declared in the module that owns the area and
|
|
@@ -64,19 +64,19 @@ const NebulaRun = ({ shipColor = 'amber', best = 0, className }: NebulaRunProps)
|
|
|
64
64
|
## Writing to the space
|
|
65
65
|
|
|
66
66
|
A plugin that produces something the page shows — a score, a selection — writes it to `runtime.state`, where every
|
|
67
|
-
binding reads it:
|
|
67
|
+
binding reads it — and where two plugins share it, each being a bundle of its own (a module both import is two):
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
70
|
import { getStateManager } from '@plitzi/plitzi-sdk';
|
|
71
71
|
|
|
72
72
|
const state = getStateManager();
|
|
73
73
|
state.setStateByKey('arcadeBest', Math.max(score, Number(state.state.arcadeBest ?? 0)));
|
|
74
|
-
const stop = state.subscribe(next => save(next)); //
|
|
74
|
+
const stop = state.subscribe(next => save(next)); // after every change; `stop()` to leave
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
`state` is the current value, `setState` replaces it (or takes an updater), `setStateByKey` writes one key,
|
|
78
|
-
`clearState` empties it, `subscribe` listens. Bindings on `state.*` re-render at once. With
|
|
79
|
-
|
|
78
|
+
`clearState` empties it, `subscribe` listens. Bindings on `state.*` re-render at once. With `keepState` on
|
|
79
|
+
([kept state](kept-state.md)), what a plugin writes there is back after a reload.
|
|
80
80
|
|
|
81
81
|
## Laying out the space's elements
|
|
82
82
|
|