@plitzi/sdk-interactions 0.38.16 → 0.38.18
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 +117 -0
- package/dist/InteractionsContext.mjs +1 -1
- package/dist/InteractionsHelper.mjs +2 -6
- package/dist/InteractionsManager.mjs +29 -30
- package/dist/declarations/index.d.ts +15 -0
- package/dist/declarations/index.mjs +9 -0
- package/dist/index.mjs +10 -9
- package/dist/sources/ActionsSource/ActionInteractions.mjs +21 -34
- package/dist/sources/ActionsSource/ServerActionContext.mjs +1 -1
- package/dist/sources/ActionsSource/callbacks.d.ts +1 -1
- package/dist/sources/ActionsSource/index.d.ts +1 -0
- package/dist/sources/ActionsSource/index.mjs +3 -2
- package/dist/sources/AuthSource/AuthInteractions.mjs +1 -1
- package/dist/sources/AuthSource/callbacks.d.ts +1 -1
- package/dist/sources/AuthSource/index.mjs +1 -2
- package/dist/sources/HostSource/HostInteractions.mjs +1 -1
- package/dist/sources/HostSource/callbacks.d.ts +1 -1
- package/dist/sources/NavigationSource/NavigationInteractions.mjs +1 -1
- package/dist/sources/NavigationSource/callbacks.d.ts +1 -1
- package/dist/sources/NavigationSource/index.mjs +1 -2
- package/dist/sources/QueriesSource/QueriesInteractions.mjs +1 -1
- package/dist/sources/QueriesSource/callbacks.d.ts +1 -1
- package/dist/sources/QueriesSource/index.mjs +1 -2
- package/dist/sources/QueriesSource/writeParams.d.ts +1 -1
- package/dist/sources/StateSource/StateInteractions.mjs +1 -1
- package/dist/sources/StateSource/callbacks.d.ts +1 -1
- package/dist/sources/StateSource/index.mjs +1 -2
- package/dist/sources/index.mjs +9 -8
- package/dist/utility/copyToClipboard.mjs +6 -6
- package/dist/utility/copyToClipboardSpec.d.ts +1 -1
- package/dist/utility/twigTemplate.mjs +7 -7
- package/dist/utility/webHook.mjs +1 -1
- package/dist/utility/webHookSpec.d.ts +1 -1
- package/package.json +14 -184
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,122 @@
|
|
|
1
1
|
# @plitzi/sdk-interactions
|
|
2
2
|
|
|
3
|
+
## 0.38.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b3023c9: ## Security
|
|
8
|
+
|
|
9
|
+
- **A page of the same site on another origin is no longer this server's own** (`@plitzi/sdk-server`): the guard
|
|
10
|
+
against writes another page caused (`crossSiteWrites`, the sign-in's login-CSRF check and `createOriginGuardMiddleware`)
|
|
11
|
+
trusted `Sec-Fetch-Site: same-site` — and a site has no port and spans every sub-domain, so another port of the host
|
|
12
|
+
(where `createAuthoringHost` serves pages an agent wrote) or a sibling sub-domain (every space of a platform on one
|
|
13
|
+
domain) could write as if it were the server's own page. Now only `same-origin` (and `none`, a typed URL) is; `same-site`
|
|
14
|
+
is refused 403 `reason: 'foreign'` unless its origin is named (`crossSiteWrites.origins`, `identity.platformOrigins`),
|
|
15
|
+
and the `Origin` fallback compares host and port. In production an app and its spaces are already on different sites,
|
|
16
|
+
so a deployment that works there needs nothing; one that relied on a sibling sub-domain locally names it.
|
|
17
|
+
`createAuthoringHost`'s docs now say to serve on a host of its own — a cookie belongs to a host whatever its port.
|
|
18
|
+
|
|
19
|
+
## Server
|
|
20
|
+
- **An open page takes a new version of its space where it stands** (`@plitzi/sdk-server`, `@plitzi/plitzi-sdk`):
|
|
21
|
+
`server.updatePages(documents, { draft? })` hands the pages showing that space — or that draft — its new documents,
|
|
22
|
+
and each swaps them in place, its state, scroll and focus kept (`replaceSpace` on what the SDK's `render` returns;
|
|
23
|
+
`false`, and the page loads again, for a page with elements the server draws). The development loop of a project uses
|
|
24
|
+
it: a save to the space no longer reloads the open page. `createAuthoringHost`'s `put` over an id that pages show
|
|
25
|
+
hands them the new version and answers how many took it (`updated`), so a page an agent keeps improving is seen to
|
|
26
|
+
grow instead of reloading — no second iframe needed.
|
|
27
|
+
- **`devReload` is `livePages`** (`@plitzi/sdk-server`): the channel the open pages listen on now carries the space,
|
|
28
|
+
not only "load again", and a host that is not developing uses it too. Its address is `/__plitzi/live`; a draft's page
|
|
29
|
+
listens for its own changes alone (`?__pt=`). A plugin swapped where it is drawn stays a development server's
|
|
30
|
+
(`devMode`). `plitzi upgrade migrations --write` renames the option in a project's code (`livePagesOption`).
|
|
31
|
+
|
|
32
|
+
## Packages
|
|
33
|
+
- **`@plitzi/sdk-server` starts in half the time** (`@plitzi/sdk-shared`, `@plitzi/sdk-server`): importing it took
|
|
34
|
+
~310 ms, ~200 of them `date-fns` — 108 modules nothing on the server uses, brought by `@plitzi/sdk-shared/helpers` —
|
|
35
|
+
and loaded the browser's hooks and contexts of every folder of `@plitzi/sdk-shared` it read, `@plitzi/nexus/react`
|
|
36
|
+
with them. Now ~150 ms (`@plitzi/sdk-shared` 139 → 113 modules, `@plitzi/nexus` 53 → 31). What moved, each
|
|
37
|
+
rewritten by `plitzi upgrade migrations --write` (`movedExports`):
|
|
38
|
+
- the dates — `formatDate`, `formatDateUTC`, `formatFromNow`, `formatUTCToLocal`, `getDurationMs`, `isDate`,
|
|
39
|
+
`isValidFormat`, `parseDate`, `toUnixSeconds`, `SupportedLocale` — from `@plitzi/sdk-shared/helpers` to
|
|
40
|
+
`@plitzi/sdk-shared/dates`;
|
|
41
|
+
- React's bindings to an entry of their own beside each area, as `@plitzi/nexus/react` is: `useDisplayMode`,
|
|
42
|
+
`useElementSize` → `@plitzi/sdk-shared/style/react`; `SchemaContext` → `schema/react`; `PluginsContext` →
|
|
43
|
+
`plugins/react`; `DevToolsContext` → `devTools/react`; `useFlagResolution` → `flags/react` (`flagUserFrom` stays
|
|
44
|
+
in `flags`);
|
|
45
|
+
- `PROJECT_DATA_PREFIX` from `@plitzi/sdk-shared/server` to `@plitzi/sdk-shared/project/paths` — the project's
|
|
46
|
+
layout names, an entry a browser imports too (`@plitzi/sdk-shared/project` stays Node only and re-exports them).
|
|
47
|
+
The theme cookie's helpers (`themeFromCookies`…) are also `@plitzi/sdk-shared/theme/cookie`, still exported by
|
|
48
|
+
`@plitzi/sdk-shared/theme`.
|
|
49
|
+
|
|
50
|
+
`yarn check:server-footprint` (in CI after the build) holds what the server's root loads, package by package — Plitzi's
|
|
51
|
+
and every other — to a budget: a heavy library or a folder of hooks coming back fails with what came in.
|
|
52
|
+
|
|
53
|
+
## CLI
|
|
54
|
+
- **`plitzi upgrade migrations --write` writes a file import's new home when it has one** (`@plitzi/cli`): the
|
|
55
|
+
`folderImports` migration of 0.38.17 named every import of a package's FILE and wrote none. It now reads the installed
|
|
56
|
+
declarations with the project's own TypeScript and rewrites each `import` / `export … from` whose every name the folder
|
|
57
|
+
exports under one name — `import usePlitzi from '@plitzi/sdk-shared/hooks/usePlitzi'` →
|
|
58
|
+
`import { usePlitzi } from '@plitzi/sdk-shared/hooks'`, `type` modifiers and aliases kept. What has no one answer is
|
|
59
|
+
said with why (a namespace import, an `import()` or mock, a name the folder does not export, a project with no
|
|
60
|
+
TypeScript). The report says which places `--write` writes (`writable` in `--json`) instead of calling every one
|
|
61
|
+
"yours to change"; a migration now gives each place its own `edit` in place of a whole-file `rewrite`
|
|
62
|
+
(`docs/en/releases.md`).
|
|
63
|
+
- **`plitzi doctor` says an import of a path the installed package does not export** (`@plitzi/cli`):
|
|
64
|
+
`import-not-exported`, an error, at the importing file — what Node otherwise reports at start as an
|
|
65
|
+
`ERR_MODULE_NOT_FOUND` into the package's `dist`, which reads as a broken install rather than a changed API. For a
|
|
66
|
+
`@plitzi` package the fix names `plitzi upgrade migrations --write`; for any other, its `exports`. Asked only of a
|
|
67
|
+
package that is installed.
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [b3023c9]
|
|
70
|
+
- @plitzi/sdk-auth@0.38.18
|
|
71
|
+
- @plitzi/sdk-event-bridge@0.38.18
|
|
72
|
+
- @plitzi/sdk-shared@0.38.18
|
|
73
|
+
|
|
74
|
+
## 0.38.17
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 4f8dc37: ## Packages
|
|
79
|
+
|
|
80
|
+
- **A library package is imported by its root and its folders, never by a file** (`@plitzi/sdk-shared`, `sdk-schema`,
|
|
81
|
+
`sdk-style`, `sdk-elements`, `sdk-interactions`, `sdk-auth`, `sdk-dev-tools`, `sdk-event-bridge`, `sdk-navigation`,
|
|
82
|
+
`sdk-plugins`, `sdk-variables`): each `exports` is now `"."` and `"./*"`, the latter a folder's `index`.
|
|
83
|
+
`@plitzi/sdk-shared/helpers/isRecord` becomes `import { isRecord } from '@plitzi/sdk-shared/helpers'`, and a default
|
|
84
|
+
export by the name its folder gives it — almost always its file's (`import usePlitzi from '…/hooks/usePlitzi'` →
|
|
85
|
+
`import { usePlitzi } from '@plitzi/sdk-shared/hooks'`). A file-level specifier now fails with `ERR_MODULE_NOT_FOUND`.
|
|
86
|
+
New entries where a folder barrel would have brought more than was asked for: `@plitzi/sdk-shared/project` and
|
|
87
|
+
`@plitzi/sdk-shared/plugins/bundle` (Node only), `@plitzi/sdk-interactions/declarations` (the global callbacks and
|
|
88
|
+
utility specs, without React), and `@plitzi/sdk-elements/elements/declarations`, which now also carries the
|
|
89
|
+
declarations' attribute types and the constants they are checked with. `RuleGroup` is exported by `@plitzi/sdk-shared`
|
|
90
|
+
with the document types that use it. `plitzi upgrade migrations` names every such import in a project, with the folder to
|
|
91
|
+
import it from instead.
|
|
92
|
+
- **`@plitzi/sdk-shared`'s root exports the document types, and only them** (`@plitzi/sdk-shared`): what the package
|
|
93
|
+
does is imported from its folder — `formatDate` from `@plitzi/sdk-shared/helpers`, `ThemeProvider` from
|
|
94
|
+
`@plitzi/sdk-shared/theme`, a GraphQL operation's types from `@plitzi/sdk-shared/network/graphql` — so a module that
|
|
95
|
+
imports a type from the root no longer loads every area of the package.
|
|
96
|
+
- **What one package alone used lives in that package** (`@plitzi/sdk-shared`, `@plitzi/sdk-elements`): the data
|
|
97
|
+
source hooks moved from `@plitzi/sdk-shared/dataSource/hooks` to `@plitzi/sdk-elements/dataSource`
|
|
98
|
+
(`useRegisterSource`, `useResolvedVariables`), and the Apollo links the builder's client is built with into the
|
|
99
|
+
builder.
|
|
100
|
+
- **The builder's panels are an entry of their own** (`@plitzi/sdk-style`, `@plitzi/sdk-variables`,
|
|
101
|
+
`@plitzi/sdk-elements`): the style inspector, the advanced style editor and `BuilderStyleContextProvider` are imported
|
|
102
|
+
from `@plitzi/sdk-style/builder`; the variables' lists and forms from `@plitzi/sdk-variables/builder`; the elements'
|
|
103
|
+
settings panels (`defaultElementsSettings`) from `@plitzi/sdk-elements/builder`. Each package's root keeps what a page
|
|
104
|
+
and a server use — `generateCache` no longer loads the inspector, on a server 227 modules down to 21.
|
|
105
|
+
|
|
106
|
+
## CLI
|
|
107
|
+
- **`plitzi upgrade`'s `renames` part is now `migrations`** (`@plitzi/cli`): what a version changed that a project's
|
|
108
|
+
own source must follow, one file per change in the CLI's `src/migrations/changes/` with the version it shipped in —
|
|
109
|
+
rewritten with `--write` when it has one right answer, said otherwise. The `--json` report carries `migrations` (each
|
|
110
|
+
with its `migration`, `since`, `file`, `line`, `what` and whether it was `written`) in place of `renames` and
|
|
111
|
+
`changes`. The changes of 0.38.0 (`canTemplate` → `canSnippet`, the `*Template` authoring names), 0.38.9 (a
|
|
112
|
+
`formControl` without `required` is optional) and 0.38.12 (`usePlitziServiceContext` → `usePlitzi`) are no longer
|
|
113
|
+
looked for: a project still on one of those versions makes them by hand.
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [4f8dc37]
|
|
116
|
+
- @plitzi/sdk-auth@0.38.17
|
|
117
|
+
- @plitzi/sdk-event-bridge@0.38.17
|
|
118
|
+
- @plitzi/sdk-shared@0.38.17
|
|
119
|
+
|
|
3
120
|
## 0.38.16
|
|
4
121
|
|
|
5
122
|
### Patch Changes
|
|
@@ -2,7 +2,7 @@ import { coerceDeclaredParams as e } from "./helpers/coerceDeclaredParams.mjs";
|
|
|
2
2
|
import t from "./utility/index.mjs";
|
|
3
3
|
import { get as n, omit as r } from "@plitzi/plitzi-ui/helpers";
|
|
4
4
|
import { QueryBuilderEvaluator as i } from "@plitzi/plitzi-ui/QueryBuilder";
|
|
5
|
-
import { pConsole as a } from "@plitzi/sdk-shared/devTools
|
|
5
|
+
import { pConsole as a } from "@plitzi/sdk-shared/devTools";
|
|
6
6
|
import { MAX_PARAM_PASSES as o, resolveStepParam as s } from "@plitzi/sdk-shared/helpers/twigWrapper";
|
|
7
7
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
//#region src/InteractionsHelper.tsx
|
|
@@ -170,11 +170,7 @@ var d = 5, f = (e, t, n, r, i) => {
|
|
|
170
170
|
startTime: t,
|
|
171
171
|
endTime: o
|
|
172
172
|
};
|
|
173
|
-
|
|
174
|
-
a.danger("interactions", d, f);
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
a.info("interactions", d, f);
|
|
173
|
+
r === "failed" ? a.danger("interactions", d, f) : a.info("interactions", d, f);
|
|
178
174
|
}, x = (e) => Object.values(e).some(({ status: e }) => e === "failed") ? "failed" : "completed", S = async (e, t = {}, n = {}, r = {}, o = v, s, c, l = []) => {
|
|
179
175
|
let u = a.getTime().valueOf(), { action: d, enabled: f, when: p } = e;
|
|
180
176
|
if (!d || !f || p && !i(p, m({
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { flowTrigger as e } from "./InteractionsHelper.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { KEY_TRIGGER as o } from "@plitzi/sdk-shared/helpers/keys";
|
|
2
|
+
import { INTERVAL_TRIGGER as t, KEY_TRIGGER as n, intervalOf as r } from "@plitzi/sdk-shared/helpers";
|
|
3
|
+
import { get as i, set as a } from "@plitzi/plitzi-ui/helpers";
|
|
4
|
+
import o from "@plitzi/sdk-event-bridge";
|
|
6
5
|
//#region src/InteractionsManager.ts
|
|
7
|
-
var s = (e,
|
|
8
|
-
if (e.action ===
|
|
9
|
-
let { shortcuts:
|
|
10
|
-
return Array.isArray(
|
|
6
|
+
var s = (e, i) => {
|
|
7
|
+
if (e.action === n) {
|
|
8
|
+
let { shortcuts: t } = i;
|
|
9
|
+
return Array.isArray(t) && t.includes(e.params.keys);
|
|
11
10
|
}
|
|
12
|
-
return e.action !==
|
|
13
|
-
}, c = class
|
|
11
|
+
return e.action !== t || r(e.params.interval) === i.interval;
|
|
12
|
+
}, c = class t {
|
|
14
13
|
eventBridge;
|
|
15
14
|
parentManager;
|
|
16
15
|
childManagers;
|
|
@@ -22,21 +21,21 @@ var s = (e, t) => {
|
|
|
22
21
|
lastUpdate;
|
|
23
22
|
listeners = /* @__PURE__ */ new Set();
|
|
24
23
|
constructor(e = "", t = {}, n = {}) {
|
|
25
|
-
this.eventBridge = new
|
|
24
|
+
this.eventBridge = new o(), this.parentManager = void 0, this.childManagers = [], this.subscriptors = {}, this.callbacksAvailables = {}, this.interactionsData = {
|
|
26
25
|
currentPageId: e,
|
|
27
26
|
...t,
|
|
28
27
|
...n
|
|
29
28
|
}, this.lastUpdate = Date.now();
|
|
30
29
|
}
|
|
31
|
-
eventBridgeCallback = (
|
|
32
|
-
if (!
|
|
33
|
-
let o = this.subscriptors[
|
|
34
|
-
if (await Promise.resolve(), !o || this.subscriptors[
|
|
35
|
-
let c =
|
|
30
|
+
eventBridgeCallback = (t) => async (n, r, a) => {
|
|
31
|
+
if (!t || !r || !n) return;
|
|
32
|
+
let o = this.subscriptors[n];
|
|
33
|
+
if (await Promise.resolve(), !o || this.subscriptors[n] !== o) return;
|
|
34
|
+
let c = i(this.subscriptors, `${n}.getAdditionalParams`, void 0), l = () => ({
|
|
36
35
|
...this.interactionsData,
|
|
37
36
|
...typeof c == "function" ? c().dataSource : void 0
|
|
38
|
-
}), u = Object.values(
|
|
39
|
-
await Promise.all(u.map((
|
|
37
|
+
}), u = Object.values(t).filter((e) => e.type === "trigger" && e.action === r && e.enabled && s(e, a));
|
|
38
|
+
await Promise.all(u.map((r) => this.runFlow(`${n}.${r.id}`, r.whileRunning ?? "skip", (i) => e(r, t, this.getCallbacksAvailables(), { [r.id]: a }, l, n, i))));
|
|
40
39
|
};
|
|
41
40
|
runFlow(e, t, n) {
|
|
42
41
|
if (t === "latest") {
|
|
@@ -54,12 +53,12 @@ var s = (e, t) => {
|
|
|
54
53
|
});
|
|
55
54
|
return this.flowsRunning.set(e, i), i;
|
|
56
55
|
}
|
|
57
|
-
subscribe(e, t = {},
|
|
58
|
-
return !e || this.subscriptors[e] ? !1 : (
|
|
56
|
+
subscribe(e, t = {}, n = {}, r = {}, i) {
|
|
57
|
+
return !e || this.subscriptors[e] ? !1 : (a(this.subscriptors, e, {
|
|
59
58
|
id: e,
|
|
60
|
-
triggers:
|
|
61
|
-
getAdditionalParams:
|
|
62
|
-
}), this.wire(e, t,
|
|
59
|
+
triggers: n,
|
|
60
|
+
getAdditionalParams: i
|
|
61
|
+
}), this.wire(e, t, n, r), this.touch(), !0);
|
|
63
62
|
}
|
|
64
63
|
update(e, t = {}, n = {}, r = {}, i) {
|
|
65
64
|
let a = this.subscriptors[e];
|
|
@@ -91,11 +90,11 @@ var s = (e, t) => {
|
|
|
91
90
|
return this.parentManager ? this.parentManager.getRootManager() : this;
|
|
92
91
|
}
|
|
93
92
|
getSubscriptorInternal(e) {
|
|
94
|
-
let
|
|
95
|
-
if (!
|
|
96
|
-
for (let
|
|
93
|
+
let t = i(this.subscriptors, e);
|
|
94
|
+
if (!t && this.childManagers.length > 0) {
|
|
95
|
+
for (let n of this.childManagers) if (t = n.getSubscriptorInternal(e), t) break;
|
|
97
96
|
}
|
|
98
|
-
return
|
|
97
|
+
return t;
|
|
99
98
|
}
|
|
100
99
|
getSubscriptor(e) {
|
|
101
100
|
return this.parentManager ? this.getRootManager()?.getSubscriptorInternal(e) : this.getSubscriptorInternal(e);
|
|
@@ -128,9 +127,9 @@ var s = (e, t) => {
|
|
|
128
127
|
interactionTrigger(e, t, n = {}) {
|
|
129
128
|
if (e) return this.eventBridge.emit("interaction", e, e, t, n);
|
|
130
129
|
}
|
|
131
|
-
createChildManager = (e = {},
|
|
132
|
-
let
|
|
133
|
-
return
|
|
130
|
+
createChildManager = (e = {}, n = {}) => {
|
|
131
|
+
let r = new t(this.interactionsData.currentPageId, e, n);
|
|
132
|
+
return r.parentManager = this, this.childManagers.push(r), r;
|
|
134
133
|
};
|
|
135
134
|
removeChildManager = (e) => {
|
|
136
135
|
this.childManagers = this.childManagers.filter((t) => t !== e);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an interaction is checked against, without the React that runs it: the global callbacks each source declares and
|
|
3
|
+
* the utilities' parameter specs.
|
|
4
|
+
*
|
|
5
|
+
* They live beside their sources and are gathered here so they can be read outside a browser — the authoring linter, a
|
|
6
|
+
* seed, a script — where a source's barrel would bring its component along.
|
|
7
|
+
*/
|
|
8
|
+
export { actionsCallbacks } from '../sources/ActionsSource/callbacks';
|
|
9
|
+
export { authCallbacks } from '../sources/AuthSource/callbacks';
|
|
10
|
+
export { hostCallbacks } from '../sources/HostSource/callbacks';
|
|
11
|
+
export { navigationCallbacks } from '../sources/NavigationSource/callbacks';
|
|
12
|
+
export { queriesCallbacks } from '../sources/QueriesSource/callbacks';
|
|
13
|
+
export { stateCallbacks } from '../sources/StateSource/callbacks';
|
|
14
|
+
export { copyToClipboardSpec } from '../utility/copyToClipboardSpec';
|
|
15
|
+
export { webHookSpec } from '../utility/webHookSpec';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { copyToClipboardSpec as e } from "../utility/copyToClipboardSpec.mjs";
|
|
2
|
+
import { webHookSpec as t } from "../utility/webHookSpec.mjs";
|
|
3
|
+
import { actionsCallbacks as n } from "../sources/ActionsSource/callbacks.mjs";
|
|
4
|
+
import { authCallbacks as r } from "../sources/AuthSource/callbacks.mjs";
|
|
5
|
+
import i from "../sources/HostSource/callbacks.mjs";
|
|
6
|
+
import { navigationCallbacks as a } from "../sources/NavigationSource/callbacks.mjs";
|
|
7
|
+
import { queriesCallbacks as o } from "../sources/QueriesSource/callbacks.mjs";
|
|
8
|
+
import { stateCallbacks as s } from "../sources/StateSource/callbacks.mjs";
|
|
9
|
+
export { n as actionsCallbacks, r as authCallbacks, e as copyToClipboardSpec, i as hostCallbacks, a as navigationCallbacks, o as queriesCallbacks, s as stateCallbacks, t as webHookSpec };
|
package/dist/index.mjs
CHANGED
|
@@ -4,12 +4,13 @@ import n from "./utility/index.mjs";
|
|
|
4
4
|
import r, { flowTrigger as i } from "./InteractionsHelper.mjs";
|
|
5
5
|
import a from "./InteractionsManager.mjs";
|
|
6
6
|
import o from "./InteractionsContextProvider.mjs";
|
|
7
|
-
import s from "./sources/ActionsSource/
|
|
8
|
-
import c from "./sources/
|
|
9
|
-
import l from "./sources/
|
|
10
|
-
import u from "./sources/HostSource/
|
|
11
|
-
import d from "./sources/
|
|
12
|
-
import f from "./sources/
|
|
13
|
-
import p from "./sources/
|
|
14
|
-
import m from "./
|
|
15
|
-
|
|
7
|
+
import { ServerActionContext as s } from "./sources/ActionsSource/ServerActionContext.mjs";
|
|
8
|
+
import c from "./sources/ActionsSource/ActionInteractions.mjs";
|
|
9
|
+
import l from "./sources/AuthSource/AuthInteractions.mjs";
|
|
10
|
+
import u from "./sources/HostSource/callbacks.mjs";
|
|
11
|
+
import d from "./sources/HostSource/HostInteractions.mjs";
|
|
12
|
+
import f from "./sources/NavigationSource/NavigationInteractions.mjs";
|
|
13
|
+
import p from "./sources/QueriesSource/QueriesInteractions.mjs";
|
|
14
|
+
import m from "./sources/StateSource/StateInteractions.mjs";
|
|
15
|
+
import h from "./InteractionsSourcesProvider.mjs";
|
|
16
|
+
export { c as ActionInteractions, l as AuthInteractions, d as HostInteractions, e as InteractionsContext, o as InteractionsContextProvider, r as InteractionsHelper, a as InteractionsManager, h as InteractionsSourcesProvider, f as NavigationInteractions, p as QueriesInteractions, s as ServerActionContext, m as StateInteractions, i as flowTrigger, u as hostCallbacks, t as useInteractions, n as utility };
|
|
@@ -2,8 +2,8 @@ import e from "../../InteractionsContext.mjs";
|
|
|
2
2
|
import { actionsCallbacks as t } from "./callbacks.mjs";
|
|
3
3
|
import { ServerActionContext as n, endedStatusOf as r } from "./ServerActionContext.mjs";
|
|
4
4
|
import { use as i, useCallback as a, useMemo as o } from "react";
|
|
5
|
-
import { pConsole as s } from "@plitzi/sdk-shared/devTools
|
|
6
|
-
import { toBuilderParams as c, toInteractionCallbacks as l } from "@plitzi/sdk-shared/authoring
|
|
5
|
+
import { pConsole as s } from "@plitzi/sdk-shared/devTools";
|
|
6
|
+
import { toBuilderParams as c, toInteractionCallbacks as l } from "@plitzi/sdk-shared/authoring";
|
|
7
7
|
import { invalidateAfterWrite as u } from "@plitzi/sdk-shared/queries";
|
|
8
8
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
import { recordActionProgress as p, recordActionRun as m, registerActionCanceller as h, releaseActionCanceller as g, updateActionRun as _, useCommonStore as v } from "@plitzi/sdk-shared/store";
|
|
@@ -139,25 +139,17 @@ var x = (e) => Array.isArray(e) ? e : void 0, S = async (e, t) => {
|
|
|
139
139
|
body: c
|
|
140
140
|
}).then(async (e) => {
|
|
141
141
|
let r = await e.json().catch(() => ({}));
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
mode: i,
|
|
154
|
-
runId: r.runId,
|
|
155
|
-
reason: r.reason,
|
|
156
|
-
error: r.error
|
|
157
|
-
}), N(t?.hostElementId, "onFlowError", O(n, r));
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
j({
|
|
142
|
+
e.ok ? r.status === "failed" ? (j(D(r)), s.warning("actions", /* @__PURE__ */ f("span", { children: [
|
|
143
|
+
"Server action ",
|
|
144
|
+
/* @__PURE__ */ d("b", { children: n }),
|
|
145
|
+
" failed"
|
|
146
|
+
] }), {
|
|
147
|
+
actionId: n,
|
|
148
|
+
mode: i,
|
|
149
|
+
runId: r.runId,
|
|
150
|
+
reason: r.reason,
|
|
151
|
+
error: r.error
|
|
152
|
+
}), N(t?.hostElementId, "onFlowError", O(n, r))) : (j({
|
|
161
153
|
status: r.status === "completed" ? "completed" : "accepted",
|
|
162
154
|
...r.runId ? { runId: r.runId } : {},
|
|
163
155
|
...r.output ? { output: r.output } : {},
|
|
@@ -178,7 +170,7 @@ var x = (e) => Array.isArray(e) ? e : void 0, S = async (e, t) => {
|
|
|
178
170
|
runId: r.runId ?? "",
|
|
179
171
|
status: r.status ?? "completed",
|
|
180
172
|
output: r.output ?? {}
|
|
181
|
-
});
|
|
173
|
+
})) : (E(e.status, r, A), j(D(r)), N(t?.hostElementId, "onFlowError", O(n, r)));
|
|
182
174
|
}).catch((e) => {
|
|
183
175
|
j(T(v, e)), s.warning("actions", /* @__PURE__ */ f("span", { children: [
|
|
184
176
|
"Server action ",
|
|
@@ -253,15 +245,12 @@ var x = (e) => Array.isArray(e) ? e : void 0, S = async (e, t) => {
|
|
|
253
245
|
status: "streaming",
|
|
254
246
|
...r ? { runId: r } : {}
|
|
255
247
|
}), S(e.body, (e) => {
|
|
256
|
-
if (e.event === "data") {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
if (e.event === "error") {
|
|
248
|
+
if (e.event === "data") p(l, e.data.chunk ?? e.data), N(t?.hostElementId, "onFlowProgress", {
|
|
249
|
+
actionId: n,
|
|
250
|
+
runId: r,
|
|
251
|
+
...e.data
|
|
252
|
+
});
|
|
253
|
+
else if (e.event === "error") {
|
|
265
254
|
let i = x(e.data.steps);
|
|
266
255
|
j({
|
|
267
256
|
status: "failed",
|
|
@@ -273,9 +262,7 @@ var x = (e) => Array.isArray(e) ? e : void 0, S = async (e, t) => {
|
|
|
273
262
|
runId: r,
|
|
274
263
|
...e.data
|
|
275
264
|
});
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
if (e.event === "done") {
|
|
265
|
+
} else if (e.event === "done") {
|
|
279
266
|
let i = x(e.data.steps);
|
|
280
267
|
j({
|
|
281
268
|
status: e.data.status === "completed" ? "completed" : "failed",
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
|
|
1
|
+
import { ServerActionContext as e } from "./ServerActionContext.mjs";
|
|
2
|
+
import t from "./ActionInteractions.mjs";
|
|
3
|
+
export { t as ActionInteractions, e as ServerActionContext };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../../InteractionsContext.mjs";
|
|
2
2
|
import { authCallbacks as t } from "./callbacks.mjs";
|
|
3
3
|
import { use as n, useMemo as r } from "react";
|
|
4
|
-
import { toInteractionCallbacks as i } from "@plitzi/sdk-shared/authoring
|
|
4
|
+
import { toInteractionCallbacks as i } from "@plitzi/sdk-shared/authoring";
|
|
5
5
|
import { AuthContext as a } from "@plitzi/sdk-auth";
|
|
6
6
|
//#region src/sources/AuthSource/AuthInteractions.tsx
|
|
7
7
|
var o = ({ children: o }) => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as AuthInteractions };
|
|
1
|
+
export { default as AuthInteractions } from "./AuthInteractions.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../../InteractionsContext.mjs";
|
|
2
2
|
import t from "./callbacks.mjs";
|
|
3
3
|
import { use as n, useCallback as r, useMemo as i } from "react";
|
|
4
|
-
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring
|
|
4
|
+
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring";
|
|
5
5
|
//#region src/sources/HostSource/HostInteractions.tsx
|
|
6
6
|
var o = ({ children: o, actions: s }) => {
|
|
7
7
|
let { useInteractions: c } = n(e), l = r((e) => {
|
|
@@ -2,7 +2,7 @@ import e from "../../InteractionsContext.mjs";
|
|
|
2
2
|
import { navigationCallbacks as t } from "./callbacks.mjs";
|
|
3
3
|
import { use as n, useCallback as r, useMemo as i } from "react";
|
|
4
4
|
import { get as a, pick as o } from "@plitzi/plitzi-ui/helpers";
|
|
5
|
-
import { toBuilderParams as s, toInteractionCallbacks as c } from "@plitzi/sdk-shared/authoring
|
|
5
|
+
import { toBuilderParams as s, toInteractionCallbacks as c } from "@plitzi/sdk-shared/authoring";
|
|
6
6
|
import { useSdkStore as l } from "@plitzi/sdk-shared/store";
|
|
7
7
|
//#region src/sources/NavigationSource/NavigationInteractions.tsx
|
|
8
8
|
var u = ({ children: u, previewMode: d = !1 }) => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as NavigationInteractions };
|
|
1
|
+
export { default as NavigationInteractions } from "./NavigationInteractions.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../../InteractionsContext.mjs";
|
|
2
2
|
import { queriesCallbacks as t } from "./callbacks.mjs";
|
|
3
3
|
import { use as n, useCallback as r, useMemo as i } from "react";
|
|
4
|
-
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring
|
|
4
|
+
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring";
|
|
5
5
|
import { invalidateQueries as o, parseIds as s } from "@plitzi/sdk-shared/queries";
|
|
6
6
|
//#region src/sources/QueriesSource/QueriesInteractions.tsx
|
|
7
7
|
var c = ({ children: c }) => {
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as QueriesInteractions };
|
|
1
|
+
export { default as QueriesInteractions } from "./QueriesInteractions.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParamSpec } from '@plitzi/sdk-shared/authoring
|
|
1
|
+
import { ParamSpec } from '@plitzi/sdk-shared/authoring';
|
|
2
2
|
import { WriteInvalidation } from '@plitzi/sdk-shared/queries';
|
|
3
3
|
/**
|
|
4
4
|
* The two params a step that writes carries: what to refresh once it succeeded, and — when it is a list — which
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../../InteractionsContext.mjs";
|
|
2
2
|
import { stateCallbacks as t } from "./callbacks.mjs";
|
|
3
3
|
import { use as n, useCallback as r, useMemo as i } from "react";
|
|
4
|
-
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring
|
|
4
|
+
import { toInteractionCallbacks as a } from "@plitzi/sdk-shared/authoring";
|
|
5
5
|
import { useCommonStoreSetter as o } from "@plitzi/sdk-shared/store";
|
|
6
6
|
//#region src/sources/StateSource/StateInteractions.tsx
|
|
7
7
|
var s = 0, c = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `e${++s}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`, l = (e, t) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BuiltinGlobalCallback } from '@plitzi/sdk-shared/authoring
|
|
1
|
+
import { BuiltinGlobalCallback } from '@plitzi/sdk-shared/authoring';
|
|
2
2
|
/** What this source's actions are, for the editor that fills them in and for anything authoring one offline. */
|
|
3
3
|
export declare const stateCallbacks: Record<string, BuiltinGlobalCallback>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as StateInteractions };
|
|
1
|
+
export { default as StateInteractions } from "./StateInteractions.mjs";
|
package/dist/sources/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import e from "./ActionsSource/
|
|
2
|
-
import t from "./
|
|
3
|
-
import n from "./
|
|
4
|
-
import r from "./HostSource/
|
|
5
|
-
import i from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
8
|
-
|
|
1
|
+
import { ServerActionContext as e } from "./ActionsSource/ServerActionContext.mjs";
|
|
2
|
+
import t from "./ActionsSource/ActionInteractions.mjs";
|
|
3
|
+
import n from "./AuthSource/AuthInteractions.mjs";
|
|
4
|
+
import r from "./HostSource/callbacks.mjs";
|
|
5
|
+
import i from "./HostSource/HostInteractions.mjs";
|
|
6
|
+
import a from "./NavigationSource/NavigationInteractions.mjs";
|
|
7
|
+
import o from "./QueriesSource/QueriesInteractions.mjs";
|
|
8
|
+
import s from "./StateSource/StateInteractions.mjs";
|
|
9
|
+
export { t as ActionInteractions, n as AuthInteractions, i as HostInteractions, a as NavigationInteractions, o as QueriesInteractions, e as ServerActionContext, s as StateInteractions, r as hostCallbacks };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { copyToClipboardSpec as e } from "./copyToClipboardSpec.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { clipboardWriter as t } from "@plitzi/sdk-shared/helpers";
|
|
3
|
+
import { toInteractionCallback as n } from "@plitzi/sdk-shared/authoring";
|
|
4
4
|
//#region src/utility/copyToClipboard.ts
|
|
5
|
-
var r =
|
|
6
|
-
let
|
|
7
|
-
if (!
|
|
8
|
-
await
|
|
5
|
+
var r = n("copyToClipboard", e, async ({ text: e }) => {
|
|
6
|
+
let n = t();
|
|
7
|
+
if (!n) throw Error("This page has no clipboard to write to: the browser offers none here (a page not on https?)");
|
|
8
|
+
await n(e);
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { r as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinActionSpec } from '@plitzi/sdk-shared/authoring
|
|
1
|
+
import { BuiltinActionSpec } from '@plitzi/sdk-shared/authoring';
|
|
2
2
|
/**
|
|
3
3
|
* The copy-to-clipboard step, as the editor and anything authoring one offline read it: the words to copy — a template
|
|
4
4
|
* like any step's param, so `{{ navigation.href }}` copies the page's address and `{{ snippet.code }}` what a source
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getPathsFromObject as e } from "@plitzi/sdk-shared/helpers";
|
|
2
|
+
import { processTwig as t } from "@plitzi/sdk-shared/helpers/twigWrapper";
|
|
3
3
|
//#region src/utility/twigTemplate.ts
|
|
4
4
|
var n = {
|
|
5
5
|
action: "twigTemplate",
|
|
@@ -39,10 +39,10 @@ var n = {
|
|
|
39
39
|
preview: (n) => {
|
|
40
40
|
let { template: r, returnMode: i } = n;
|
|
41
41
|
if (i === "jsonObject") try {
|
|
42
|
-
let i = JSON.parse(
|
|
42
|
+
let i = JSON.parse(t(r, n));
|
|
43
43
|
if (i && typeof i == "object") return {
|
|
44
44
|
template: "",
|
|
45
|
-
content:
|
|
45
|
+
content: e(i).reduce((e, t) => ({
|
|
46
46
|
...e,
|
|
47
47
|
[t]: ""
|
|
48
48
|
}), {})
|
|
@@ -53,10 +53,10 @@ var n = {
|
|
|
53
53
|
content: ""
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
|
-
callback: (
|
|
57
|
-
let { template: n, returnMode: r } =
|
|
56
|
+
callback: (e) => {
|
|
57
|
+
let { template: n, returnMode: r } = e, i = "";
|
|
58
58
|
try {
|
|
59
|
-
i =
|
|
59
|
+
i = t(n, e);
|
|
60
60
|
} catch (e) {
|
|
61
61
|
console.error(e);
|
|
62
62
|
}
|
package/dist/utility/webHook.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { webHookSpec as e } from "./webHookSpec.mjs";
|
|
2
|
-
import { toInteractionCallback as t } from "@plitzi/sdk-shared/authoring
|
|
2
|
+
import { toInteractionCallback as t } from "@plitzi/sdk-shared/authoring";
|
|
3
3
|
import { invalidateAfterWrite as n, queryCache as r, requestKey as i } from "@plitzi/sdk-shared/queries";
|
|
4
4
|
//#region src/utility/webHook.ts
|
|
5
5
|
var a = /* @__PURE__ */ new Set(["GET", "HEAD"]), o = /* @__PURE__ */ new Set([
|
package/package.json
CHANGED
|
@@ -1,190 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-interactions",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.18",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"@plitzi/source": "./src/index.ts",
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
12
|
"import": "./dist/index.mjs"
|
|
12
13
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"./InteractionsContextProvider": {
|
|
18
|
-
"types": "./dist/InteractionsContextProvider.d.ts",
|
|
19
|
-
"import": "./dist/InteractionsContextProvider.mjs"
|
|
20
|
-
},
|
|
21
|
-
"./InteractionsHelper": {
|
|
22
|
-
"types": "./dist/InteractionsHelper.d.ts",
|
|
23
|
-
"import": "./dist/InteractionsHelper.mjs"
|
|
24
|
-
},
|
|
25
|
-
"./InteractionsManager": {
|
|
26
|
-
"types": "./dist/InteractionsManager.d.ts",
|
|
27
|
-
"import": "./dist/InteractionsManager.mjs"
|
|
28
|
-
},
|
|
29
|
-
"./InteractionsSourcesProvider": {
|
|
30
|
-
"types": "./dist/InteractionsSourcesProvider.d.ts",
|
|
31
|
-
"import": "./dist/InteractionsSourcesProvider.mjs"
|
|
32
|
-
},
|
|
33
|
-
"./helpers/coerceDeclaredParams": {
|
|
34
|
-
"types": "./dist/helpers/coerceDeclaredParams.d.ts",
|
|
35
|
-
"import": "./dist/helpers/coerceDeclaredParams.mjs"
|
|
36
|
-
},
|
|
37
|
-
"./hooks/useInteractions": {
|
|
38
|
-
"types": "./dist/hooks/useInteractions.d.ts",
|
|
39
|
-
"import": "./dist/hooks/useInteractions.mjs"
|
|
40
|
-
},
|
|
41
|
-
"./index": {
|
|
42
|
-
"types": "./dist/index.d.ts",
|
|
43
|
-
"import": "./dist/index.mjs"
|
|
44
|
-
},
|
|
45
|
-
"./sources": {
|
|
46
|
-
"types": "./dist/sources/index.d.ts",
|
|
47
|
-
"import": "./dist/sources/index.mjs"
|
|
48
|
-
},
|
|
49
|
-
"./sources/ActionsSource": {
|
|
50
|
-
"types": "./dist/sources/ActionsSource/index.d.ts",
|
|
51
|
-
"import": "./dist/sources/ActionsSource/index.mjs"
|
|
52
|
-
},
|
|
53
|
-
"./sources/ActionsSource/ActionInteractions": {
|
|
54
|
-
"types": "./dist/sources/ActionsSource/ActionInteractions.d.ts",
|
|
55
|
-
"import": "./dist/sources/ActionsSource/ActionInteractions.mjs"
|
|
56
|
-
},
|
|
57
|
-
"./sources/ActionsSource/ServerActionContext": {
|
|
58
|
-
"types": "./dist/sources/ActionsSource/ServerActionContext.d.ts",
|
|
59
|
-
"import": "./dist/sources/ActionsSource/ServerActionContext.mjs"
|
|
60
|
-
},
|
|
61
|
-
"./sources/ActionsSource/callbacks": {
|
|
62
|
-
"types": "./dist/sources/ActionsSource/callbacks.d.ts",
|
|
63
|
-
"import": "./dist/sources/ActionsSource/callbacks.mjs"
|
|
64
|
-
},
|
|
65
|
-
"./sources/ActionsSource/index": {
|
|
66
|
-
"types": "./dist/sources/ActionsSource/index.d.ts",
|
|
67
|
-
"import": "./dist/sources/ActionsSource/index.mjs"
|
|
68
|
-
},
|
|
69
|
-
"./sources/AuthSource": {
|
|
70
|
-
"types": "./dist/sources/AuthSource/index.d.ts",
|
|
71
|
-
"import": "./dist/sources/AuthSource/index.mjs"
|
|
72
|
-
},
|
|
73
|
-
"./sources/AuthSource/AuthInteractions": {
|
|
74
|
-
"types": "./dist/sources/AuthSource/AuthInteractions.d.ts",
|
|
75
|
-
"import": "./dist/sources/AuthSource/AuthInteractions.mjs"
|
|
76
|
-
},
|
|
77
|
-
"./sources/AuthSource/callbacks": {
|
|
78
|
-
"types": "./dist/sources/AuthSource/callbacks.d.ts",
|
|
79
|
-
"import": "./dist/sources/AuthSource/callbacks.mjs"
|
|
80
|
-
},
|
|
81
|
-
"./sources/AuthSource/index": {
|
|
82
|
-
"types": "./dist/sources/AuthSource/index.d.ts",
|
|
83
|
-
"import": "./dist/sources/AuthSource/index.mjs"
|
|
84
|
-
},
|
|
85
|
-
"./sources/HostSource": {
|
|
86
|
-
"types": "./dist/sources/HostSource/index.d.ts",
|
|
87
|
-
"import": "./dist/sources/HostSource/index.mjs"
|
|
88
|
-
},
|
|
89
|
-
"./sources/HostSource/HostInteractions": {
|
|
90
|
-
"types": "./dist/sources/HostSource/HostInteractions.d.ts",
|
|
91
|
-
"import": "./dist/sources/HostSource/HostInteractions.mjs"
|
|
92
|
-
},
|
|
93
|
-
"./sources/HostSource/callbacks": {
|
|
94
|
-
"types": "./dist/sources/HostSource/callbacks.d.ts",
|
|
95
|
-
"import": "./dist/sources/HostSource/callbacks.mjs"
|
|
96
|
-
},
|
|
97
|
-
"./sources/HostSource/index": {
|
|
98
|
-
"types": "./dist/sources/HostSource/index.d.ts",
|
|
99
|
-
"import": "./dist/sources/HostSource/index.mjs"
|
|
100
|
-
},
|
|
101
|
-
"./sources/NavigationSource": {
|
|
102
|
-
"types": "./dist/sources/NavigationSource/index.d.ts",
|
|
103
|
-
"import": "./dist/sources/NavigationSource/index.mjs"
|
|
104
|
-
},
|
|
105
|
-
"./sources/NavigationSource/NavigationInteractions": {
|
|
106
|
-
"types": "./dist/sources/NavigationSource/NavigationInteractions.d.ts",
|
|
107
|
-
"import": "./dist/sources/NavigationSource/NavigationInteractions.mjs"
|
|
108
|
-
},
|
|
109
|
-
"./sources/NavigationSource/callbacks": {
|
|
110
|
-
"types": "./dist/sources/NavigationSource/callbacks.d.ts",
|
|
111
|
-
"import": "./dist/sources/NavigationSource/callbacks.mjs"
|
|
112
|
-
},
|
|
113
|
-
"./sources/NavigationSource/index": {
|
|
114
|
-
"types": "./dist/sources/NavigationSource/index.d.ts",
|
|
115
|
-
"import": "./dist/sources/NavigationSource/index.mjs"
|
|
116
|
-
},
|
|
117
|
-
"./sources/QueriesSource": {
|
|
118
|
-
"types": "./dist/sources/QueriesSource/index.d.ts",
|
|
119
|
-
"import": "./dist/sources/QueriesSource/index.mjs"
|
|
120
|
-
},
|
|
121
|
-
"./sources/QueriesSource/QueriesInteractions": {
|
|
122
|
-
"types": "./dist/sources/QueriesSource/QueriesInteractions.d.ts",
|
|
123
|
-
"import": "./dist/sources/QueriesSource/QueriesInteractions.mjs"
|
|
124
|
-
},
|
|
125
|
-
"./sources/QueriesSource/callbacks": {
|
|
126
|
-
"types": "./dist/sources/QueriesSource/callbacks.d.ts",
|
|
127
|
-
"import": "./dist/sources/QueriesSource/callbacks.mjs"
|
|
128
|
-
},
|
|
129
|
-
"./sources/QueriesSource/index": {
|
|
130
|
-
"types": "./dist/sources/QueriesSource/index.d.ts",
|
|
131
|
-
"import": "./dist/sources/QueriesSource/index.mjs"
|
|
132
|
-
},
|
|
133
|
-
"./sources/QueriesSource/writeParams": {
|
|
134
|
-
"types": "./dist/sources/QueriesSource/writeParams.d.ts",
|
|
135
|
-
"import": "./dist/sources/QueriesSource/writeParams.mjs"
|
|
136
|
-
},
|
|
137
|
-
"./sources/StateSource": {
|
|
138
|
-
"types": "./dist/sources/StateSource/index.d.ts",
|
|
139
|
-
"import": "./dist/sources/StateSource/index.mjs"
|
|
140
|
-
},
|
|
141
|
-
"./sources/StateSource/StateInteractions": {
|
|
142
|
-
"types": "./dist/sources/StateSource/StateInteractions.d.ts",
|
|
143
|
-
"import": "./dist/sources/StateSource/StateInteractions.mjs"
|
|
144
|
-
},
|
|
145
|
-
"./sources/StateSource/callbacks": {
|
|
146
|
-
"types": "./dist/sources/StateSource/callbacks.d.ts",
|
|
147
|
-
"import": "./dist/sources/StateSource/callbacks.mjs"
|
|
148
|
-
},
|
|
149
|
-
"./sources/StateSource/index": {
|
|
150
|
-
"types": "./dist/sources/StateSource/index.d.ts",
|
|
151
|
-
"import": "./dist/sources/StateSource/index.mjs"
|
|
152
|
-
},
|
|
153
|
-
"./sources/index": {
|
|
154
|
-
"types": "./dist/sources/index.d.ts",
|
|
155
|
-
"import": "./dist/sources/index.mjs"
|
|
156
|
-
},
|
|
157
|
-
"./utility": {
|
|
158
|
-
"types": "./dist/utility/index.d.ts",
|
|
159
|
-
"import": "./dist/utility/index.mjs"
|
|
160
|
-
},
|
|
161
|
-
"./utility/copyToClipboard": {
|
|
162
|
-
"types": "./dist/utility/copyToClipboard.d.ts",
|
|
163
|
-
"import": "./dist/utility/copyToClipboard.mjs"
|
|
164
|
-
},
|
|
165
|
-
"./utility/copyToClipboardSpec": {
|
|
166
|
-
"types": "./dist/utility/copyToClipboardSpec.d.ts",
|
|
167
|
-
"import": "./dist/utility/copyToClipboardSpec.mjs"
|
|
168
|
-
},
|
|
169
|
-
"./utility/delayTime": {
|
|
170
|
-
"types": "./dist/utility/delayTime.d.ts",
|
|
171
|
-
"import": "./dist/utility/delayTime.mjs"
|
|
172
|
-
},
|
|
173
|
-
"./utility/index": {
|
|
174
|
-
"types": "./dist/utility/index.d.ts",
|
|
175
|
-
"import": "./dist/utility/index.mjs"
|
|
176
|
-
},
|
|
177
|
-
"./utility/twigTemplate": {
|
|
178
|
-
"types": "./dist/utility/twigTemplate.d.ts",
|
|
179
|
-
"import": "./dist/utility/twigTemplate.mjs"
|
|
180
|
-
},
|
|
181
|
-
"./utility/webHook": {
|
|
182
|
-
"types": "./dist/utility/webHook.d.ts",
|
|
183
|
-
"import": "./dist/utility/webHook.mjs"
|
|
184
|
-
},
|
|
185
|
-
"./utility/webHookSpec": {
|
|
186
|
-
"types": "./dist/utility/webHookSpec.d.ts",
|
|
187
|
-
"import": "./dist/utility/webHookSpec.mjs"
|
|
14
|
+
"./*": {
|
|
15
|
+
"@plitzi/source": "./src/*/index.ts",
|
|
16
|
+
"types": "./dist/*/index.d.ts",
|
|
17
|
+
"import": "./dist/*/index.mjs"
|
|
188
18
|
}
|
|
189
19
|
},
|
|
190
20
|
"scripts": {
|
|
@@ -192,24 +22,24 @@
|
|
|
192
22
|
"typecheck": "tsc -p tsconfig.app.json --noEmit",
|
|
193
23
|
"test": "vitest run",
|
|
194
24
|
"test:watch": "vitest",
|
|
195
|
-
"build:dev": "vite build --mode development --minify false
|
|
25
|
+
"build:dev": "vite build --mode development --minify false",
|
|
196
26
|
"build:dev-watch": "vite build --mode development --watch --minify false",
|
|
197
|
-
"build:prod": "vite build
|
|
27
|
+
"build:prod": "vite build"
|
|
198
28
|
},
|
|
199
29
|
"type": "module",
|
|
200
30
|
"sideEffects": false,
|
|
201
31
|
"devDependencies": {
|
|
202
32
|
"eslint": "^9.39.5",
|
|
203
|
-
"react": "^19.3.
|
|
33
|
+
"react": "^19.3.1",
|
|
204
34
|
"typescript": "^6.0.3",
|
|
205
|
-
"vite": "^8.3.
|
|
206
|
-
"vitest": "^5.0.
|
|
35
|
+
"vite": "^8.3.4",
|
|
36
|
+
"vitest": "^5.0.5"
|
|
207
37
|
},
|
|
208
38
|
"dependencies": {
|
|
209
39
|
"@plitzi/plitzi-ui": "^1.6.33",
|
|
210
|
-
"@plitzi/sdk-auth": "0.38.
|
|
211
|
-
"@plitzi/sdk-event-bridge": "0.38.
|
|
212
|
-
"@plitzi/sdk-shared": "0.38.
|
|
40
|
+
"@plitzi/sdk-auth": "0.38.18",
|
|
41
|
+
"@plitzi/sdk-event-bridge": "0.38.18",
|
|
42
|
+
"@plitzi/sdk-shared": "0.38.18"
|
|
213
43
|
},
|
|
214
44
|
"peerDependencies": {
|
|
215
45
|
"react": "^19"
|