@plitzi/plitzi-sdk 0.35.10 → 0.36.1

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 CHANGED
@@ -1,5 +1,82 @@
1
1
  # @plitzi/plitzi-sdk
2
2
 
3
+ ## 0.36.1
4
+
5
+ ### Patch Changes
6
+
7
+ - v0.36.1
8
+ - Updated dependencies
9
+ - @plitzi/sdk-auth@0.36.1
10
+ - @plitzi/sdk-dev-tools@0.36.1
11
+ - @plitzi/sdk-elements@0.36.1
12
+ - @plitzi/sdk-event-bridge@0.36.1
13
+ - @plitzi/sdk-interactions@0.36.1
14
+ - @plitzi/sdk-navigation@0.36.1
15
+ - @plitzi/sdk-plugins@0.36.1
16
+ - @plitzi/sdk-schema@0.36.1
17
+ - @plitzi/sdk-shared@0.36.1
18
+ - @plitzi/sdk-style@0.36.1
19
+ - @plitzi/sdk-variables@0.36.1
20
+
21
+ ## 0.36.0
22
+
23
+ ### Minor Changes
24
+
25
+ - - **An `apiContainer` can keep its browser requests in a query cache, the way react-query does.** Moving between
26
+ sections or pages used to ask the API again every time a provider was shown: a provider in a hidden section is
27
+ mounted but disabled, so showing it fired a fresh request, and a page navigation remounted it and did the same.
28
+ With the new `cache: true` an answer is kept for `staleTime` seconds (30 by default) and shared by every cached
29
+ provider asking the same thing — same method, URL, credentials and headers, the token included, so two visitors
30
+ never share one. Past its time the answer is still drawn at once and a fresh one is fetched behind it; an answer
31
+ nobody shows is forgotten after `gcTime` seconds (300 by default). A refused request (`4xx`/`5xx`) is shown but
32
+ never kept. **The cache is off unless an element asks for it**: an uncached provider behaves as before, asking on
33
+ every mount and sharing nothing.
34
+
35
+ The cache is `@plitzi/sdk-shared/queries` (`queryCache`, `useQuery`, `invalidateQueries`,
36
+ `invalidateQueriesForWrite`), a nexus store written with the per-path `ttl` of `@plitzi/nexus` 1.2.0, which every
37
+ consumer now requires. It reacts to the store's own freshness events, so anything that expires a query's path
38
+ makes the providers on screen ask again.
39
+
40
+ An answer stops counting as current before its time when the element's `performQuery` runs (it always asks
41
+ again), when a flow runs the new global `invalidateQueries` step (source `queries`: `elements`, api container ids
42
+ — a container's requests are tagged with its own id — and/or a `url` prefix), and after a write. Both write steps
43
+ gained `invalidateQueries` / `invalidateElements`: a `webHook` sent with anything but `GET`/`HEAD` refreshes the
44
+ requests to its own site by default, a completed `runServerAction` refreshes all of them by default, and either
45
+ can name containers instead or refresh nothing. A `writeRecord` refreshes all. Providers on screen ask again at
46
+ once; the rest when they are next shown. A sign-in, sign-out or change of account drops everything held. Server-driven
47
+ providers and RSC are untouched.
48
+
49
+ - **A `webHook` that reads can be cached** (`cache`, `staleTime`), in the same cache and under the same key as an api
50
+ container asking the same thing. Its declaration now lives beside it (`utility/webHookSpec`) and the authoring
51
+ catalog gathers it instead of keeping a copy. A `HEAD` is no longer sent with a body, which `fetch` refused.
52
+
53
+ - **Step params can pick several elements.** A new param type, `elementIds` (with an `elementType` filter), is drawn
54
+ in the flow editor as a picker: the matching elements of the space to add, and the picked ones as chips to remove —
55
+ an id no element answers to any more is kept and flagged. The value is a list of ids, so nobody types a
56
+ comma-separated list; `invalidateQueries.elements` and the write steps' `invalidateElements` use it, and the MCP
57
+ catalog says which element type each such param takes.
58
+
59
+ - The dev-tools' Store tab lists the paths a store holds with a TTL — how long ago each was written, what is left
60
+ of it, and a button to expire one or all of them. The query cache appears there as "Queries".
61
+
62
+ - `useApi` no longer takes `params`: nothing passed them, and a GET cannot carry a body anyway. A mock now answers
63
+ synchronously, without a loading frame, and a provider whose URL has not resolved asks for nothing.
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies
68
+ - @plitzi/sdk-auth@0.36.0
69
+ - @plitzi/sdk-dev-tools@0.36.0
70
+ - @plitzi/sdk-elements@0.36.0
71
+ - @plitzi/sdk-event-bridge@0.36.0
72
+ - @plitzi/sdk-interactions@0.36.0
73
+ - @plitzi/sdk-navigation@0.36.0
74
+ - @plitzi/sdk-plugins@0.36.0
75
+ - @plitzi/sdk-schema@0.36.0
76
+ - @plitzi/sdk-shared@0.36.0
77
+ - @plitzi/sdk-style@0.36.0
78
+ - @plitzi/sdk-variables@0.36.0
79
+
3
80
  ## 0.35.10
4
81
 
5
82
  ### Patch Changes
package/dist/index.html CHANGED
@@ -57,7 +57,7 @@
57
57
  render(
58
58
  'plitzi',
59
59
  {
60
- webKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwib3JpZ2lucyI6WyJodHRwczovL3dlYnNpdGUucGxpdHppLmFwcCIsImh0dHBzOi8vcGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsOjMwMDAiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWw6MzAwMSIsImh0dHBzOi8vc3NyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc2VydmVyLnBsaXR6aS5sb2NhbCIsImh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCIsImh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsImh0dHA6Ly8xMjcuMC4wLjE6ODA4MCJdLCJpc3MiOiJodHRwczovL3NlcnZlci5wbGl0emkubG9jYWwiLCJhdWQiOlsiaHR0cHM6Ly9wbGl0emkubG9jYWwiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWwiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWw6MzAwMCIsImh0dHBzOi8vYXBwLnBsaXR6aS5sb2NhbDozMDAxIiwiaHR0cHM6Ly9hcGkucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9zc3IucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9zZXJ2ZXIucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9tY3AucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hdXRoLnBsaXR6aS5sb2NhbCIsImh0dHA6Ly8xMjcuMC4wLjE6NT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