@picked/client 0.0.1-dev.1784001148032 → 0.0.1-dev.1784265353357

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 (49) hide show
  1. package/dist/{api-BJ8EHkg5.js → api-Dh6rss_Z.js} +1 -1
  2. package/dist/{api-B1wdTDNv.cjs → api-DoUBwN6K.cjs} +1 -1
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/plugins/dom-observer/index.js +1 -1
  5. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  6. package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
  7. package/dist/cjs/server/index.js +1 -1
  8. package/dist/docs/actions.mdx +16 -2
  9. package/dist/docs/content/asset-library.mdx +43 -0
  10. package/dist/docs/sdk/actions.md +33 -3
  11. package/dist/{dom-CZyRgp2P.js → dom-BwmTHeT7.js} +12 -17
  12. package/dist/dom-CDrHc_j9.cjs +1 -0
  13. package/dist/esm/index.js +341 -418
  14. package/dist/esm/plugins/dom-observer/index.js +1 -1
  15. package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
  16. package/dist/esm/plugins/history-browser-storage/index.js +11 -33
  17. package/dist/esm/server/index.js +2 -2
  18. package/dist/{experience-instance-M2kR3nTp.js → experience-instance-DCcKZrdI.js} +207 -200
  19. package/dist/experience-instance-Nl39IDKx.cjs +1 -0
  20. package/dist/{plugin-D3z3IXOb.cjs → plugin-D2xYyTWf.cjs} +1 -1
  21. package/dist/{plugin-B04iPuj_.js → plugin-DTYpuy6Q.js} +1 -1
  22. package/dist/types/entities/action/action.d.ts +8 -2
  23. package/dist/types/entities/action/action.d.ts.map +1 -1
  24. package/dist/types/entities/experience/experience.d.ts +2 -2
  25. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  26. package/dist/types/entities/experience-instance/experience-instance.d.ts +10 -23
  27. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  28. package/dist/types/entities/history/history.d.ts +16 -30
  29. package/dist/types/entities/history/history.d.ts.map +1 -1
  30. package/dist/types/entities/response/response.d.ts +0 -1
  31. package/dist/types/entities/response/response.d.ts.map +1 -1
  32. package/dist/types/exports.d.ts +3 -0
  33. package/dist/types/exports.d.ts.map +1 -1
  34. package/dist/types/lifecycle/condition-selection.d.ts.map +1 -1
  35. package/dist/types/picked.d.ts +14 -10
  36. package/dist/types/picked.d.ts.map +1 -1
  37. package/dist/types/plugins/history-browser-storage/plugin.d.ts +0 -17
  38. package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
  39. package/dist/types/utils/dom.d.ts +0 -94
  40. package/dist/types/utils/dom.d.ts.map +1 -1
  41. package/dist/types/utils/html-asset-value.d.ts +20 -0
  42. package/dist/types/utils/html-asset-value.d.ts.map +1 -0
  43. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +24 -0
  44. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts.map +1 -0
  45. package/dist/types/utils/rehydrate-scripts.d.ts +35 -0
  46. package/dist/types/utils/rehydrate-scripts.d.ts.map +1 -0
  47. package/package.json +2 -2
  48. package/dist/dom-CdxDV3e-.cjs +0 -1
  49. package/dist/experience-instance-BbSXoRrr.cjs +0 -1
@@ -1,6 +1,6 @@
1
1
  import "../../../logger-DMN6TxJJ.js";
2
2
  import { f as e, i as t } from "../../../supports-CO9bJGNl.js";
3
- import { r as n } from "../../../dom-CZyRgp2P.js";
3
+ import { r as n } from "../../../dom-BwmTHeT7.js";
4
4
  import { createEffect as r, createEvent as i, createStore as a, sample as o } from "effector";
5
5
  //#region src/plugins/dom-observer/plugin.ts
6
6
  var s = /* @__PURE__ */ new WeakSet(), c = () => ({
@@ -1,3 +1,3 @@
1
- import { i as e } from "../../../api-BJ8EHkg5.js";
2
- import { n as t, r as n, t as r } from "../../../plugin-B04iPuj_.js";
1
+ import { i as e } from "../../../api-Dh6rss_Z.js";
2
+ import { n as t, r as n, t as r } from "../../../plugin-DTYpuy6Q.js";
3
3
  export { e as createClientHeaders, r as dynamicExperiencesPlugin, t as fetchExperienceContent, n as fetchProject };
@@ -1,48 +1,26 @@
1
- import "../../../logger-DMN6TxJJ.js";
2
1
  import { f as e } from "../../../supports-CO9bJGNl.js";
3
2
  import { n as t, r as n, t as r } from "../../../storage-1MW3-_As.js";
4
3
  import { createEffect as i, sample as a } from "effector";
5
4
  //#region src/plugins/history-browser-storage/plugin.ts
6
- var o = r("history", "global"), s = new Set([
7
- "__proto__",
8
- "constructor",
9
- "prototype"
10
- ]), c = (e) => !(typeof e != "object" || !e || !("id" in e) || typeof e.id != "string" || !("at" in e) || typeof e.at != "number" || !("experienceId" in e) || typeof e.experienceId != "string" || s.has(e.experienceId) || !("instanceId" in e) || typeof e.instanceId != "string" || !("node" in e) || typeof e.node != "object" || e.node === null), l = (e) => {
11
- if (typeof e != "object" || !e || Array.isArray(e)) return !1;
12
- for (let t of Object.values(e)) {
13
- if (!Array.isArray(t)) return !1;
14
- for (let e of t) if (!c(e)) return !1;
15
- }
16
- return !0;
17
- }, u = ({ storage: r = "local" } = {}) => ({
5
+ var o = r("history", "global"), s = ({ storage: r = "local" } = {}) => ({
18
6
  name: "history-browser-storage-plugin",
19
7
  setup: (s) => {
20
8
  if (!e()) return;
21
- let c = r === "local" ? t : n, u = i(() => {
22
- let e;
23
- try {
24
- e = c.get(o).json();
25
- } catch {
26
- return;
27
- }
28
- if (e != null && l(e)) {
29
- s.history.restoreSnapshots({ snapshots: e });
30
- return;
31
- }
32
- }), d = i((e) => {
33
- try {
34
- c.set(o, e);
35
- } catch {}
9
+ let c = r === "local" ? t : n, l = i(async () => {
10
+ let e = c.get(o).json();
11
+ e && s.history.restore({ entries: e });
12
+ }), u = i(async (e) => {
13
+ c.set(o, e);
36
14
  });
37
15
  a({
38
16
  source: s.eventBus,
39
17
  filter: (e) => e.type === "load",
40
- target: u
18
+ target: l
41
19
  }), a({
42
- source: s.history.snapshotStore,
43
- target: d
44
- }), u();
20
+ source: s.history.entriesStore,
21
+ target: u
22
+ });
45
23
  }
46
24
  });
47
25
  //#endregion
48
- export { u as historyBrowserStoragePlugin };
26
+ export { s as historyBrowserStoragePlugin };
@@ -1,5 +1,5 @@
1
- import { a as e, c as t, i as n, o as r, s as i, t as a, u as o } from "../../experience-instance-M2kR3nTp.js";
2
- import { i as s, n as c } from "../../plugin-B04iPuj_.js";
1
+ import { a as e, c as t, i as n, o as r, s as i, t as a, u as o } from "../../experience-instance-DCcKZrdI.js";
2
+ import { i as s, n as c } from "../../plugin-DTYpuy6Q.js";
3
3
  import { attach as l, createEffect as u, createEvent as d, createStore as f, sample as p } from "effector";
4
4
  //#region src/server/serialize.ts
5
5
  var m = 1e4;