@plitzi/sdk-interactions 0.37.0 → 0.37.2

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,168 @@
1
1
  # @plitzi/sdk-interactions
2
2
 
3
+ ## 0.37.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ## Authoring and agents
8
+ - **A step's params are templates in full.** Only a bare name (`{{ post.slug }}`) used to be recognised, so a
9
+ condition or a loop in a `setState` or a webhook body was handed on as its own text — a flag set to
10
+ `{% if … %}1{% endif %}` stored the template, a non-empty string every later check read as true. Any `{{ }}` or
11
+ `{% %}` in a param is now evaluated; what it resolves to is data and is not evaluated again.
12
+ - **Twig tests work.** `x is defined`, `is empty`, `is null`, `is iterable`, `is even`, `is odd` (and `is not …`) used
13
+ to be read as comparisons with a variable of that name — `x is defined` answered true exactly when `x` was not
14
+ defined. Anything else on the right of `is` still compares.
15
+ - **A group takes an access chain.** `(rows|find('id', 3)).title` read the whole row; the key after the parenthesis
16
+ was never parsed.
17
+ - **An expression that chose to be empty renders empty** under `keepEmptyTokens`. A kept token is for a name still
18
+ waiting for a value; `{{ on ? 'active' : '' }}` said "nothing" on purpose, and handing back its text made the
19
+ empty branch a non-empty string.
20
+ - **Checkbox params written as text are booleans.** `dateConverter({ isUnix: 'false' })` read `'false'` as yes and
21
+ gave an ISO date back raw. Every utility's checkbox params are normalised before its callback runs.
22
+ - **`condition-starts-visible`** warns about a visibility computed from data on an element that starts on screen: it
23
+ is drawn until its provider answers and then hidden — an empty state or a "get started" card flashing past on
24
+ every load. `visible: false` makes it wait hidden. The export reads a visibility binding back in its place, so a
25
+ space whose condition is not its last binding round-trips unchanged.
26
+ - **A source named by its short id inside a binding's template is refused** with the full name, as it already was in
27
+ a flow: `{{ stats.total }}` resolved to nothing and the element showed its empty branch.
28
+ - **`activeOn(class, pageIds)`** marks a menu's current entry from `navigation.currentPageId` — one binding for a menu
29
+ kept in a layout. `variantFrom` now says `append: 'true'`, which is what it did.
30
+ - **Two elements with one id** name where the first one was written. **`template-never-resolved`** warns about a
31
+ condition left in an attribute, which only resolves `{{ name|filter }}` tokens.
32
+ - **The authoring skill is a folder**: `SKILL.md` plus references for layouts, data and visibility, templates,
33
+ flows, structure, testing and a review checklist. `plitzi create` copies all of it, and writes an `AGENTS.md`
34
+ (imported by `CLAUDE.md`) pointing any agent at it.
35
+
36
+ - **A new space starts on a page worth keeping.** The space `POST /spaces` and `plitzi create` both begin from is
37
+ redesigned: a top bar with the theme switch, a hero with two calls to action, and six guides — each a card linking to
38
+ its page of the docs (`https://plitzi.com/docs/…`). Every link used to be `#`, and one promised a course that does
39
+ not exist. The palette is a set of light/dark tokens in Geist, the guides are one list mapped to one card, and the
40
+ bands of the page share a `shell` class — the page is written the way the authoring skill asks a space to be.
41
+ - **The copy `plitzi create` writes passes its own project's lint.** An import of the package that would not fit
42
+ 120 columns is wrapped one name per line, as the project's formatter would wrap it.
43
+
44
+ ## Server actions and scheduled jobs
45
+
46
+ **Scheduled jobs across replicas, out of the box, on the database a deployment already runs.** The scheduler and the
47
+ workers were already the package's; where the jobs wait was left to each deployment to write — and a queue is the part
48
+ that is easiest to get subtly wrong. Two helpers now build the adapters over a store the deployment owns, without the
49
+ package opening a connection or keeping data of its own:
50
+
51
+ - `@plitzi/sdk-server/mongo` — `createMongoJobQueue({ db })` and `createMongoKv({ db })`, over a `Db` (or a getter for a
52
+ client that reconnects). Creates the indexes its queries need; `mongodb` is an optional peer, used for its types.
53
+ - `@plitzi/sdk-server/mysql` — `createMysqlJobQueue({ pool })` and `createMysqlKv({ pool })`, over a `mysql2` pool.
54
+ Each job is claimed by a single-row compare-and-set, so replicas claiming at once never deadlock. Creates its three
55
+ tables on first use, or hands them to your own migrations through `mysqlJobSchemaStatements()`.
56
+
57
+ Every instant is the database server's, never a replica's. The in-process queue and both helpers pass one contract test
58
+ suite: exactly-once enqueue, atomic claims, leases that lapse and are reaped, heartbeats, settlements ignored from a
59
+ worker that lost its claim, refunded hand-backs, schedules advanced by compare-and-set, operator retry and cancel.
60
+
61
+ **`closeOnSignals(server, { afterClose })`** closes the server on SIGTERM/SIGINT and exits only once it has — so a
62
+ deploy finishes the jobs a replica is running and leaves the waiting ones for the next. A second signal exits at once.
63
+ Opt-in: a host with its own signal handling calls `server.close()` itself. Projects from `plitzi create` use it.
64
+
65
+ **A replica that is told to stop finishes the jobs it is running — and only those.** `server.close()` (and the job
66
+ worker's `stop()`) now waits for every running job to end however long past its lease that is, and keeps renewing
67
+ their claims while it waits. It used to stop renewing the moment the drain began and give up at the lease: a job longer
68
+ than its lease was taken over by another replica and run a second time while the first was still finishing it, and the
69
+ process exited in the middle of it. What is still waiting is not touched — it stays in the shared queue for the replica
70
+ that is staying or the one the deploy starts — and a job claimed in the instant the stop arrived is handed back with its
71
+ attempt refunded, never started. A run is bounded by its own timeout, which is the number an orchestrator's grace period
72
+ has to cover.
73
+
74
+ - **An every-minute schedule fired every other minute.** After producing a fire, the scheduler asked for the next
75
+ one from `lateness + 1 minute`, and `cronNextFire` rounds up to a whole minute — so a sweep that ran even a second
76
+ late (with the default 15-second sweep, nearly all of them) skipped the minute it should have produced. It now asks
77
+ from the minute after the one the sweep ran in. Only expressions with consecutive-minute fires were affected;
78
+ hourly and daily schedules were not.
79
+ - **A job that gives up says which step failed and why.** Its `error` and the failed attempt in its history used to
80
+ read "the flow ended failed" for every failure there is; they now read `step "<id>" failed: <message>`, taken from
81
+ the run's outline — already redacted of every credential the run resolved, so nothing reaches the job that the
82
+ run history would not show.
83
+ - **`apiContainer` takes `refreshSeconds`**: it asks again on its own every N seconds, for a page showing something
84
+ still moving — a queue, a feed, a status board. It is the same refresh `performQuery` runs, so it works for both
85
+ runtimes (a browser request is sent again; a server provider asks for its own RSC slice again). It pauses while
86
+ the tab is hidden and never starts a refresh while the last one is in flight. `0`, the default, never does. Before
87
+ this a live server provider needed a plugin element of its own to call `useRscRefresh` on a timer: `onApiSuccess`
88
+ never fires for a server provider, so there was no way to author the loop. The builder shows it as "Refresh every
89
+ (s)" for either runtime.
90
+ - **`onApiSuccess` / `onApiError` fire for a server provider.** The declaration offered them for every
91
+ `apiContainer`, but they were decided from the browser request alone — which a `runtime: 'server'` provider never
92
+ makes — so a flow wired to them never ran. They now fire when the provider's slice arrives (or the payload arrives
93
+ without it), and again on each refresh, the same as a browser refetch. A payload resolved for another page fires
94
+ neither. **A space that wired a flow to one of them will now see it run.**
95
+ - **The theme toggle shows one icon by default.** It renders both — which one is right depends on stored state, and
96
+ markup that depended on it would differ between the server and the browser — and until now every space had to copy
97
+ ten lines of `customCss` to hide the other; one that did not showed a sun and a moon side by side. The SDK's base
98
+ layer now shows the icon of the scheme in use, and a space's own rule still wins.
99
+ - **`variantFrom(cls, source)`** in `@plitzi/sdk-authoring` binds which of a CLASS's variants an element wears to a
100
+ value in the data — a status pill that is amber while a job waits and green once it is done. Written by hand the
101
+ variant key is the trap: it names the selector the variants belong to, and the element's type (`text.base`) is a
102
+ different selector from its class (`statusPill.base`), so the element rendered with no variant and nothing
103
+ reported it. The helper takes the key from the class declaration.
104
+ - **`authorSpace` refuses a flow template that reads a source by its short name.** A binding completes the prefix
105
+ (`jobRows.item.id` → `list_jobRows.item.id`), so the short form is the one an author learns first; a step's params
106
+ are read as written, and there it resolved to nothing — a row's button posted an empty id and every layer below
107
+ reported success. The error names the full source. A root that is a step of the same flow is left alone.
108
+ - New example, [`05-with-server-actions/05-schedules`](../examples/05-with-server-actions/05-schedules): scheduled and
109
+ delayed jobs on a self-hosted server, with the `ActionJobQueue` and `kv` seams written out in full over one SQLite
110
+ file, two replicas sharing it, failover when one is killed, and a board that watches it happen.
111
+
112
+ ## Rendering, data and styles
113
+ - **A server element inside a layout is resolved.** `collectServerElements` walked the page alone, so a
114
+ `runtime: 'server'` provider in a layout — a dashboard's sidebar, a section's header — was never resolved: the RSC
115
+ payload came back empty and the element rendered with nothing. It now walks the page and every shell in its layout
116
+ chain.
117
+ - **The twig `date` filter reads an epoch.** `new Date("1790143200000")` is Invalid Date, so an epoch in milliseconds
118
+ handed over as text — how an attribute passes one — formatted as nothing. A number, or a string of digits, is now
119
+ read as milliseconds.
120
+ - **An action is called by its name, not by its trigger kind.** `actionName` took the first trigger's title, and a
121
+ trigger nobody named is titled with its kind — so every rendered action in a workspace read "render" and every clock
122
+ "schedule". A title that only repeats the kind is no longer a name, and `defineAction` titles each trigger with the
123
+ action's name.
124
+ - **`variant` on an element that wears a class is that class's variant** when the class declares it and the type does
125
+ not. Keyed by the type, `text({ class: avatar, variant: 'violet' })` named `text--violet`, a selector nothing wears,
126
+ and rendered with no variant at all. Exporting a document back to authoring reads the same key back into `variant`.
127
+ - **`variantFrom` takes `{ slot, template }`**, where `template` turns a value into a variant name for data that does
128
+ not already speak in them — `"{{ source == 'code' ? 'on' : '' }}"`. The third argument was the slot name alone.
129
+ - **Entry declarations no longer alternate with `export {}`.** In `@plitzi/sdk-server` and `@plitzi/sdk-mcp` a repeated
130
+ `build:dev` left some `dist/<entry>.d.ts` as a ten-byte `export {}`, and consumers saw "has no exported member". The
131
+ cause was `insertTypesEntry` writing a types entry over the real declaration of the same path; it is gone.
132
+ - **Signing in keeps what a guest was doing.** `runtimeStatePersist` reset `runtime.state` whenever its owner changed,
133
+ and a guest becoming a user is a change — so a sign-in screen that remembered where to send somebody (`?redirect=`)
134
+ forgot it the moment the session arrived, and the sign-in ended on the fallback page instead. Only a change FROM an
135
+ account resets now: one account's state still never reaches the next, and a guest has no account to protect.
136
+
137
+ **A value with functions inside functions is written as it was given, and fast.** A CSS value was split into layers
138
+ at commas by a pattern that could only see one level of parentheses, so `var(--bg, light-dark(#fff, #111))` was cut at
139
+ its inner comma and half a function went on into the stylesheet. The half was then tokenised by an expression that
140
+ nested one quantifier inside another and backtracked exponentially on it — nearly two seconds for thirty characters,
141
+ on every generation of that selector's cache. Both are now one linear scan that splits only outside parentheses and
142
+ quotes. Generated caches keep the spacing the value was written with inside functions (`repeat(3, minmax(0, 1fr))`,
143
+ `color-mix(in oklab, oklch(…) 50%, transparent)`), where they used to drop it after the first comma.
144
+
145
+ - Updated dependencies
146
+ - @plitzi/sdk-auth@0.37.2
147
+ - @plitzi/sdk-dev-tools@0.37.2
148
+ - @plitzi/sdk-event-bridge@0.37.2
149
+ - @plitzi/sdk-navigation@0.37.2
150
+ - @plitzi/sdk-schema@0.37.2
151
+ - @plitzi/sdk-shared@0.37.2
152
+
153
+ ## 0.37.1
154
+
155
+ ### Patch Changes
156
+
157
+ - v0.37.1
158
+ - Updated dependencies
159
+ - @plitzi/sdk-auth@0.37.1
160
+ - @plitzi/sdk-dev-tools@0.37.1
161
+ - @plitzi/sdk-event-bridge@0.37.1
162
+ - @plitzi/sdk-navigation@0.37.1
163
+ - @plitzi/sdk-schema@0.37.1
164
+ - @plitzi/sdk-shared@0.37.1
165
+
3
166
  ## 0.37.0
4
167
 
5
168
  ### Minor Changes
@@ -6,5 +6,5 @@ export type InteractionsContextProviderProps = {
6
6
  routeParams: RouteParams;
7
7
  queryParams: QueryParams;
8
8
  };
9
- declare const InteractionsContextProvider: ({ children, currentPageId, routeParams, queryParams }: InteractionsContextProviderProps) => import("react").JSX.Element;
9
+ declare const InteractionsContextProvider: ({ children, currentPageId, routeParams, queryParams }: InteractionsContextProviderProps) => import('react').JSX.Element;
10
10
  export default InteractionsContextProvider;
@@ -2,44 +2,44 @@ import e from "./utility/index.mjs";
2
2
  import { get as t, omit as n } from "@plitzi/plitzi-ui/helpers";
3
3
  import { QueryBuilderEvaluator as r } from "@plitzi/plitzi-ui/QueryBuilder";
4
4
  import { pConsole as i } from "@plitzi/sdk-shared/devTools/utils/PlitziConsole";
5
- import { hasValidToken as a, processTwig as o } from "@plitzi/sdk-shared/helpers/twigWrapper";
6
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { hasTemplateSyntax as a, hasValidToken as o, processTwig as s } from "@plitzi/sdk-shared/helpers/twigWrapper";
6
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  //#region src/InteractionsHelper.tsx
8
- var u = 5, d = 5, f = (e, t, n, r, s) => {
9
- if (e === "utility" && s === "twigTemplate") return t;
10
- let f = {
8
+ var d = 5, f = 5, p = (e, t, n, r, c) => {
9
+ if (e === "utility" && c === "twigTemplate") return t;
10
+ let p = {
11
11
  ...n,
12
12
  ...r
13
- }, p = (e, t, n) => {
13
+ }, m = (e, t, n) => {
14
14
  if (typeof e == "string") {
15
- let n = e, r = u;
16
- for (; typeof n == "string" && a(n) && r > 0;) n = o(n, f, !1, !0), r--;
17
- return typeof n == "string" && a(n) && i.warning("interactions", /* @__PURE__ */ l("span", { children: [
15
+ let n = e, r = d;
16
+ for (a(n) && !o(n) && (n = s(n, p, !1, !0), r--); typeof n == "string" && o(n) && r > 0;) n = s(n, p, !1, !0), r--;
17
+ return typeof n == "string" && o(n) && i.warning("interactions", /* @__PURE__ */ u("span", { children: [
18
18
  "Twig token resolution exceeded ",
19
- u,
19
+ d,
20
20
  " passes for ",
21
- /* @__PURE__ */ c("b", { children: t }),
21
+ /* @__PURE__ */ l("b", { children: t }),
22
22
  ", leaving unresolved tokens"
23
23
  ] }), {
24
24
  param: t,
25
25
  value: n
26
26
  }), n;
27
27
  }
28
- return n >= d || typeof e != "object" || !e ? e : Array.isArray(e) ? e.map((e) => p(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, p(r, t, n + 1)]));
28
+ return n >= f || typeof e != "object" || !e ? e : Array.isArray(e) ? e.map((e) => m(e, t, n + 1)) : Object.fromEntries(Object.entries(e).map(([e, r]) => [e, m(r, t, n + 1)]));
29
29
  };
30
30
  return Object.keys(t).reduce((n, r) => {
31
- let i = e === "trigger" ? t[r] : p(t[r], r, 0);
31
+ let i = e === "trigger" ? t[r] : m(t[r], r, 0);
32
32
  return {
33
33
  ...n,
34
34
  [r]: i
35
35
  };
36
36
  }, {});
37
- }, p = async (n, a = {}, o = {}, s = {}, u = {}) => {
38
- let d = {}, p = [], { id: m, action: h, enabled: g, params: _, elementId: v, type: y, when: b } = n;
37
+ }, m = async (n, a = {}, o = {}, s = {}, c = {}) => {
38
+ let d = {}, f = [], { id: m, action: h, enabled: g, params: _, elementId: v, type: y, when: b } = n;
39
39
  if (!h || !g) return {
40
40
  status: "disabled",
41
41
  result: d,
42
- postCallbacks: p
42
+ postCallbacks: f
43
43
  };
44
44
  let x = {
45
45
  ...s,
@@ -49,32 +49,32 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
49
49
  if (b && !r(b, x)) return {
50
50
  status: "skipped",
51
51
  result: d,
52
- postCallbacks: p,
52
+ postCallbacks: f,
53
53
  whenParams: x
54
54
  };
55
55
  let S = {
56
56
  ...o,
57
57
  ...s,
58
- ...f(y, _, o, s, h)
58
+ ...p(y, _, o, s, h)
59
59
  };
60
60
  try {
61
61
  switch (y) {
62
62
  case "callback":
63
63
  case "globalCallback": {
64
- if (!v) return i.warning("interactions", /* @__PURE__ */ l("span", { children: [
64
+ if (!v) return i.warning("interactions", /* @__PURE__ */ u("span", { children: [
65
65
  "Step ",
66
- /* @__PURE__ */ c("b", { children: h }),
66
+ /* @__PURE__ */ l("b", { children: h }),
67
67
  " names no element, so there is nothing to run it on"
68
68
  ] }), { node: n }), {
69
69
  status: "failed",
70
70
  result: d,
71
- postCallbacks: p,
71
+ postCallbacks: f,
72
72
  whenParams: x
73
73
  };
74
74
  let e = t(a, `${v}.${h}`);
75
- if (!e) return i.warning("interactions", /* @__PURE__ */ l("span", { children: [
75
+ if (!e) return i.warning("interactions", /* @__PURE__ */ u("span", { children: [
76
76
  "Nothing is registered as ",
77
- /* @__PURE__ */ c("b", { children: `${v}.${h}` }),
77
+ /* @__PURE__ */ l("b", { children: `${v}.${h}` }),
78
78
  ", so this step did nothing"
79
79
  ] }), {
80
80
  node: n,
@@ -82,11 +82,11 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
82
82
  }), {
83
83
  status: "failed",
84
84
  result: d,
85
- postCallbacks: p,
85
+ postCallbacks: f,
86
86
  whenParams: x
87
87
  };
88
88
  let { callback: r, postCallback: o } = e;
89
- r && (d = await r(S, u)), o && p.push({
89
+ r && (d = await r(S, c)), o && f.push({
90
90
  id: m,
91
91
  callback: o,
92
92
  params: {
@@ -98,7 +98,7 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
98
98
  }
99
99
  case "utility": {
100
100
  let { callback: n, postCallback: r } = t(e, h, {});
101
- n && (d = await n(S, u)), r && p.push({
101
+ n && (d = await n(S, c)), r && f.push({
102
102
  id: m,
103
103
  callback: r,
104
104
  params: {
@@ -110,49 +110,49 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
110
110
  }
111
111
  }
112
112
  } catch (e) {
113
- return i.danger("interactions", /* @__PURE__ */ l("span", { children: ["Interaction node failed ", /* @__PURE__ */ c("b", { children: h })] }), {
113
+ return i.danger("interactions", /* @__PURE__ */ u("span", { children: ["Interaction node failed ", /* @__PURE__ */ l("b", { children: h })] }), {
114
114
  error: e instanceof Error ? e.message : String(e),
115
115
  node: n
116
116
  }), {
117
117
  status: "failed",
118
118
  result: d,
119
- postCallbacks: p,
119
+ postCallbacks: f,
120
120
  whenParams: x
121
121
  };
122
122
  }
123
123
  return {
124
124
  status: "success",
125
125
  result: d,
126
- postCallbacks: p,
126
+ postCallbacks: f,
127
127
  whenParams: x
128
128
  };
129
- }, m = async (e = []) => {
129
+ }, h = async (e = []) => {
130
130
  let t = {};
131
131
  return await Promise.all(e.reverse().map(async ({ id: e, callback: r, params: i }) => {
132
132
  t[e] = await r?.(n(i, [e]), i[e]);
133
133
  })), t;
134
- }, h = async (e, n = {}, r = {}, a = {}, o = {}, s = [], c = {}, l = {}) => {
134
+ }, g = async (e, n = {}, r = {}, a = {}, o = {}, s = [], c = {}, l = {}) => {
135
135
  if (!e) return c;
136
136
  let u = t(n, e.afterNode);
137
- if (!u && s.length > 0 && await m(s), !u) return c;
138
- let d = i.getTime().valueOf(), { status: f, result: g, postCallbacks: _, whenParams: v } = await p(u, r, a, o, l);
137
+ if (!u && s.length > 0 && await h(s), !u) return c;
138
+ let d = i.getTime().valueOf(), { status: f, result: p, postCallbacks: _, whenParams: v } = await m(u, r, a, o, l);
139
139
  return c[u.id] = {
140
140
  node: u,
141
141
  status: f,
142
- result: g,
142
+ result: p,
143
143
  postCallbacks: _,
144
144
  whenParams: v,
145
145
  startTime: d,
146
146
  endTime: i.getTime().valueOf()
147
- }, s.push(..._), h(u, n, r, {
147
+ }, s.push(..._), g(u, n, r, {
148
148
  ...a,
149
- [u.id]: g
149
+ [u.id]: p
150
150
  }, o, s, c, l);
151
- }, g = (e, t, n = {}, r, a) => {
152
- let o = i.getTime().valueOf(), u = r === "skipped" ? "skipped" : "success", d = /* @__PURE__ */ l("span", { children: [
151
+ }, _ = (e, t, n = {}, r, a) => {
152
+ let o = i.getTime().valueOf(), s = r === "skipped" ? "skipped" : "success", d = /* @__PURE__ */ u("span", { children: [
153
153
  "Interaction triggered ",
154
- /* @__PURE__ */ c("b", { children: `${e.title} [${e.action}]` }),
155
- a ? /* @__PURE__ */ l(s, { children: [" on ", /* @__PURE__ */ c("b", { children: a })] }) : null
154
+ /* @__PURE__ */ l("b", { children: `${e.title} [${e.action}]` }),
155
+ a ? /* @__PURE__ */ u(c, { children: [" on ", /* @__PURE__ */ l("b", { children: a })] }) : null
156
156
  ] }), f = {
157
157
  status: r,
158
158
  node: e,
@@ -162,7 +162,7 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
162
162
  ...n,
163
163
  [e.id]: {
164
164
  node: e,
165
- status: u,
165
+ status: s,
166
166
  result: void 0,
167
167
  postCallbacks: [],
168
168
  startTime: t,
@@ -177,17 +177,17 @@ var u = 5, d = 5, f = (e, t, n, r, s) => {
177
177
  return;
178
178
  }
179
179
  i.info("interactions", d, f);
180
- }, _ = (e) => Object.values(e).some(({ status: e }) => e === "failed") ? "failed" : "completed", v = async (e, t = {}, n = {}, a = {}, o = {}, s, c = []) => {
180
+ }, v = (e) => Object.values(e).some(({ status: e }) => e === "failed") ? "failed" : "completed", y = async (e, t = {}, n = {}, a = {}, o = {}, s, c = []) => {
181
181
  let l = i.getTime().valueOf(), { action: u, enabled: d, when: f } = e;
182
182
  if (!u || !d || f && !r(f, {
183
183
  ...o,
184
184
  ...a
185
185
  })) {
186
- g(e, l, {}, "skipped", s);
186
+ _(e, l, {}, "skipped", s);
187
187
  return;
188
188
  }
189
- let p = await h(e, t, n, a, o, c, {}, { hostElementId: s });
190
- g(e, l, p, _(p), s);
191
- }, y = { flowTrigger: v };
189
+ let p = await g(e, t, n, a, o, c, {}, { hostElementId: s });
190
+ _(e, l, p, v(p), s);
191
+ }, b = { flowTrigger: y };
192
192
  //#endregion
193
- export { y as default, v as flowTrigger };
193
+ export { b as default, y as flowTrigger };
@@ -5,5 +5,5 @@ export type InteractionsSourcesProviderProps = {
5
5
  /** What the embedding application is willing to be asked to do — see {@link HostActions}. */
6
6
  hostActions?: HostActions;
7
7
  };
8
- declare const InteractionsSourcesProvider: ({ children, hostActions }: InteractionsSourcesProviderProps) => import("react").JSX.Element;
8
+ declare const InteractionsSourcesProvider: ({ children, hostActions }: InteractionsSourcesProviderProps) => import('react').JSX.Element;
9
9
  export default InteractionsSourcesProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-interactions",
3
- "version": "0.37.0",
3
+ "version": "0.37.2",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -189,12 +189,12 @@
189
189
  "vitest": "^5.0.1"
190
190
  },
191
191
  "dependencies": {
192
- "@plitzi/plitzi-ui": "^1.6.21",
193
- "@plitzi/sdk-auth": "0.37.0",
194
- "@plitzi/sdk-dev-tools": "0.37.0",
195
- "@plitzi/sdk-event-bridge": "0.37.0",
196
- "@plitzi/sdk-navigation": "0.37.0",
197
- "@plitzi/sdk-schema": "0.37.0",
198
- "@plitzi/sdk-shared": "0.37.0"
192
+ "@plitzi/plitzi-ui": "^1.6.22",
193
+ "@plitzi/sdk-auth": "0.37.2",
194
+ "@plitzi/sdk-dev-tools": "0.37.2",
195
+ "@plitzi/sdk-event-bridge": "0.37.2",
196
+ "@plitzi/sdk-navigation": "0.37.2",
197
+ "@plitzi/sdk-schema": "0.37.2",
198
+ "@plitzi/sdk-shared": "0.37.2"
199
199
  }
200
200
  }