@picked/client 0.0.1-dev.1784003142683 → 0.0.1-dev.1784270162396
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/dist/{api-CsddE4DI.js → api-3K15pLyy.js} +1 -1
- package/dist/{api-U2LgcKqF.cjs → api-Ceuv3sYB.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/content/asset-library.mdx +43 -0
- package/dist/{dom-CZyRgp2P.js → dom-BwmTHeT7.js} +12 -17
- package/dist/dom-CDrHc_j9.cjs +1 -0
- package/dist/esm/index.js +345 -421
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/history-browser-storage/index.js +11 -33
- package/dist/esm/server/index.js +2 -2
- package/dist/{experience-instance-QSrdjfn6.js → experience-instance-DCcKZrdI.js} +229 -250
- package/dist/experience-instance-Nl39IDKx.cjs +1 -0
- package/dist/{plugin-CnCP2N-8.js → plugin-BEliYUYC.js} +1 -1
- package/dist/{plugin-CWvFEvt5.cjs → plugin-CUZxigRR.cjs} +1 -1
- package/dist/types/entities/action/action.d.ts +1 -1
- package/dist/types/entities/experience/experience.d.ts +2 -2
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +0 -23
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +12 -43
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +0 -1
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/exports.d.ts +3 -0
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/picked.d.ts +10 -14
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +0 -17
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/utils/dom.d.ts +0 -94
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/html-asset-value.d.ts +20 -0
- package/dist/types/utils/html-asset-value.d.ts.map +1 -0
- package/dist/types/utils/rehydrate-scripts.d.ts +46 -0
- package/dist/types/utils/rehydrate-scripts.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/dom-CdxDV3e-.cjs +0 -1
- package/dist/experience-instance-BWL-yghq.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-
|
|
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-
|
|
2
|
-
import { n as t, r as n, t as r } from "../../../plugin-
|
|
1
|
+
import { i as e } from "../../../api-3K15pLyy.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../../../plugin-BEliYUYC.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 =
|
|
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,
|
|
22
|
-
let e;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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:
|
|
18
|
+
target: l
|
|
41
19
|
}), a({
|
|
42
|
-
source: s.history.
|
|
43
|
-
target:
|
|
44
|
-
})
|
|
20
|
+
source: s.history.entriesStore,
|
|
21
|
+
target: u
|
|
22
|
+
});
|
|
45
23
|
}
|
|
46
24
|
});
|
|
47
25
|
//#endregion
|
|
48
|
-
export {
|
|
26
|
+
export { s as historyBrowserStoragePlugin };
|
package/dist/esm/server/index.js
CHANGED
|
@@ -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-
|
|
2
|
-
import { i as s, n as c } from "../../plugin-
|
|
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-BEliYUYC.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;
|