@picked/client 0.0.1-dev.1780617185476 → 0.0.1-dev.1783393641770
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-DDuD7JeP.cjs → api-CEoqdaqt.cjs} +1 -1
- package/dist/{api-DyalyzzP.js → api-CHtZJL48.js} +1 -1
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/api/index.md +4 -0
- package/dist/docs/content/asset-library.mdx +50 -0
- package/dist/docs/content/content-entries.mdx +30 -0
- package/dist/docs/content/layouts.mdx +70 -0
- package/dist/docs/content/pages.mdx +67 -0
- package/dist/docs/content/sections.mdx +33 -0
- package/dist/docs/delivery-api/experience-content.md +85 -0
- package/dist/docs/delivery-api/index.md +46 -0
- package/dist/docs/delivery-api/preview-caching-crawling.md +59 -0
- package/dist/docs/delivery-api/project-config.md +56 -0
- package/dist/docs/experiences.mdx +3 -1
- package/dist/docs/fields.mdx +2 -0
- package/dist/docs/guides/build-a-personalized-page.mdx +143 -0
- package/dist/docs/sdk/experiences.md +2 -0
- package/dist/docs/sdk/index.md +11 -1
- package/dist/docs/sdk/ssr/index.md +62 -0
- package/dist/docs/sdk/ssr/rendering-and-hydration.md +141 -0
- package/dist/docs/sdk/ssr/serialize.md +86 -0
- package/dist/docs/sdk/ssr/slots-and-placements.md +35 -0
- package/dist/docs/sdk/steps.md +2 -0
- package/dist/docs/steps.mdx +2 -0
- package/dist/docs/workspace-versioning.mdx +28 -0
- package/dist/{dom-DjfSrkpp.js → dom-BwmTHeT7.js} +1 -1
- package/dist/{dom-sqnnO-CT.cjs → dom-CDrHc_j9.cjs} +1 -1
- package/dist/esm/form/index.js +1 -1
- package/dist/esm/index.js +206 -192
- package/dist/esm/plugins/create-experience/index.js +1 -1
- package/dist/esm/plugins/dom-observer/index.js +3 -3
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/experience-browser-storage/index.js +3 -3
- package/dist/esm/plugins/history-browser-storage/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +2 -2
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/single-page-app/index.js +2 -2
- package/dist/esm/plugins/web-components/index.js +1 -1
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +33 -33
- package/dist/{experience-instance-DBzfLqnk.js → experience-instance-CBJJPjEJ.js} +189 -141
- package/dist/experience-instance-qBWC_Wr2.cjs +1 -0
- package/dist/id-Js-62re-.cjs +1 -0
- package/dist/logger-CSTvAyyB.cjs +1 -0
- package/dist/{object-ThO1DEyl.cjs → object-CIkt7Fkr.cjs} +1 -1
- package/dist/{plugin-Bxbu49WU.cjs → plugin-C1fanByQ.cjs} +1 -1
- package/dist/{plugin-BtpXkpqU.js → plugin-mTF3d8cX.js} +11 -7
- package/dist/{preview-bridge-DIdDvNXQ.cjs → preview-bridge-CpX1BkSA.cjs} +1 -1
- package/dist/{preview-bridge-CGyx7dEx.js → preview-bridge-D76l-dPy.js} +2 -2
- package/dist/rules-logic-CGZIYgAI.cjs +1 -0
- package/dist/{rules-logic-D_CVBuv7.js → rules-logic-HesIUCu6.js} +1 -1
- package/dist/{storage-BXSlLTRa.cjs → storage-DUw9UJ2h.cjs} +1 -1
- package/dist/{supports-34OzZK5j.cjs → supports-DBzjGaWD.cjs} +1 -1
- package/dist/types/entities/action/action.d.ts +1 -1
- package/dist/types/entities/condition/condition.d.ts +9 -0
- package/dist/types/entities/condition/condition.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +6 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/lifecycle/condition-selection.d.ts +24 -0
- package/dist/types/lifecycle/condition-selection.d.ts.map +1 -1
- package/dist/types/lifecycle/rules-logic.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +1 -1
- package/dist/types/server/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/experience-instance-CVKoGtYE.cjs +0 -1
- package/dist/id-Cg7fVl1O.cjs +0 -1
- package/dist/logger-fbvQC40v.cjs +0 -1
- package/dist/rules-logic-H6P8xwHF.cjs +0 -1
- /package/dist/{id-n2yrHvNo.js → id-Bo4RBeOs.js} +0 -0
- /package/dist/{logger-6z_gb4rA.js → logger-DMN6TxJJ.js} +0 -0
- /package/dist/{object-DvUDOytC.js → object-BUDGxEqy.js} +0 -0
- /package/dist/{storage-hOHCCXvP.js → storage-1MW3-_As.js} +0 -0
- /package/dist/{supports-BgjwyijI.js → supports-CO9bJGNl.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../logger-
|
|
2
|
-
import { f as e, i as t } from "../../../supports-
|
|
3
|
-
import { r as n } from "../../../dom-
|
|
1
|
+
import "../../../logger-DMN6TxJJ.js";
|
|
2
|
+
import { f as e, i as t } from "../../../supports-CO9bJGNl.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-
|
|
2
|
-
import { n as t, r as n, t as r } from "../../../plugin-
|
|
1
|
+
import { i as e } from "../../../api-CHtZJL48.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../../../plugin-mTF3d8cX.js";
|
|
3
3
|
export { e as createClientHeaders, r as dynamicExperiencesPlugin, t as fetchExperienceContent, n as fetchProject };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../../../logger-
|
|
2
|
-
import { f as e } from "../../../supports-
|
|
3
|
-
import { n as t, r as n, t as r } from "../../../storage-
|
|
1
|
+
import "../../../logger-DMN6TxJJ.js";
|
|
2
|
+
import { f as e } from "../../../supports-CO9bJGNl.js";
|
|
3
|
+
import { n as t, r as n, t as r } from "../../../storage-1MW3-_As.js";
|
|
4
4
|
import { createEffect as i, sample as a } from "effector";
|
|
5
5
|
//#region src/plugins/experience-browser-storage/plugin.ts
|
|
6
6
|
var o = ({ storage: o = "local" } = {}) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e } from "../../../supports-
|
|
2
|
-
import { n as t, r as n, t as r } from "../../../storage-
|
|
1
|
+
import { f as e } from "../../../supports-CO9bJGNl.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../../../storage-1MW3-_As.js";
|
|
3
3
|
import { createEffect as i, sample as a } from "effector";
|
|
4
4
|
//#region src/plugins/history-browser-storage/plugin.ts
|
|
5
5
|
var o = r("history", "global"), s = ({ storage: r = "local" } = {}) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e } from "../../../supports-
|
|
2
|
-
import { n as t, r as n, t as r } from "../../../storage-
|
|
1
|
+
import { f as e } from "../../../supports-CO9bJGNl.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../../../storage-1MW3-_As.js";
|
|
3
3
|
import { attach as i, createEffect as a, sample as o } from "effector";
|
|
4
4
|
//#region src/plugins/responses-browser-storage/plugin.ts
|
|
5
5
|
var s = r("responses", "global");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e } from "../../../object-
|
|
2
|
-
import { a as t, f as n, p as r } from "../../../supports-
|
|
1
|
+
import { n as e } from "../../../object-BUDGxEqy.js";
|
|
2
|
+
import { a as t, f as n, p as r } from "../../../supports-CO9bJGNl.js";
|
|
3
3
|
//#region src/plugins/single-page-app/plugin.ts
|
|
4
4
|
var i = r, a, o = (e) => ({
|
|
5
5
|
name: "single-page-app",
|
package/dist/esm/server/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { i as
|
|
3
|
-
import { attach as
|
|
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-CBJJPjEJ.js";
|
|
2
|
+
import { i as s, n as c } from "../../plugin-mTF3d8cX.js";
|
|
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
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var m = 1e4;
|
|
6
|
+
function h(e) {
|
|
7
7
|
if (e?.location !== void 0) return { location: e.location };
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return e.nodes.filter(
|
|
9
|
+
function g(e, t) {
|
|
10
|
+
return e.nodes.filter(o).some((e) => t.get(e.stepId) === !0);
|
|
11
11
|
}
|
|
12
|
-
async function
|
|
12
|
+
async function _(e, t) {
|
|
13
13
|
let { projectConfig: n } = t, i = e.session.store.getState().id;
|
|
14
|
-
e.conditionResults.reset(),
|
|
14
|
+
e.conditionResults.reset(), s(e, n, {
|
|
15
15
|
isPreview: !1,
|
|
16
16
|
sessionId: i
|
|
17
17
|
});
|
|
18
|
-
let a =
|
|
18
|
+
let a = h(t.attributes), o = t.timeoutMs ?? m, l = new Map(n.steps.map((e) => [e.id, e.layoutContentId !== void 0 && e.layoutContentId !== null])), u = [];
|
|
19
19
|
for (let t of n.experiences) await r(e, { condition: t.condition }, { context: a }) && u.push(t);
|
|
20
20
|
let d = /* @__PURE__ */ new Map();
|
|
21
21
|
for (let n of u) {
|
|
22
|
-
if (!
|
|
22
|
+
if (!g(n, l)) continue;
|
|
23
23
|
let r = t.getContent ? await t.getContent({
|
|
24
24
|
id: n.id,
|
|
25
25
|
key: n.key
|
|
26
|
-
}, { previewToken: t.previewToken }) : await
|
|
26
|
+
}, { previewToken: t.previewToken }) : await c(e.apiUrl, e.projectId, n.id, {
|
|
27
27
|
previewToken: t.previewToken,
|
|
28
|
-
signal: AbortSignal.timeout(
|
|
28
|
+
signal: AbortSignal.timeout(o)
|
|
29
29
|
});
|
|
30
30
|
if (r) for (let e of r.content) d.set(e.id, e);
|
|
31
31
|
}
|
|
@@ -38,7 +38,7 @@ async function g(e, t) {
|
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/server/index.ts
|
|
41
|
-
function
|
|
41
|
+
function v() {
|
|
42
42
|
let e, t;
|
|
43
43
|
return {
|
|
44
44
|
promise: new Promise((n, r) => {
|
|
@@ -48,16 +48,16 @@ function _() {
|
|
|
48
48
|
reject: (e) => t(e)
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let { promise: n, resolve: r } =
|
|
51
|
+
function y(e, t) {
|
|
52
|
+
let { promise: n, resolve: r } = v(), i = d(), o = d(), s = d(), c = d(), m = d(), h = e.experiences.listStore.map((t) => t.map((t) => a({
|
|
53
53
|
client: e,
|
|
54
54
|
experience: t
|
|
55
|
-
}))), g =
|
|
55
|
+
}))), g = f({
|
|
56
56
|
currentExperienceIndex: 0,
|
|
57
57
|
renderedExperiences: [],
|
|
58
58
|
isComplete: !1
|
|
59
|
-
}),
|
|
60
|
-
let n =
|
|
59
|
+
}), _ = u(async (t) => {
|
|
60
|
+
let n = l({
|
|
61
61
|
source: t.experience.componentStore,
|
|
62
62
|
effect: async (n, r) => {
|
|
63
63
|
let i = t.availableRenderers[r];
|
|
@@ -72,7 +72,7 @@ function v(e, t) {
|
|
|
72
72
|
if (t) return t;
|
|
73
73
|
}
|
|
74
74
|
return null;
|
|
75
|
-
}), y =
|
|
75
|
+
}), y = u(async ({ experience: e, availableRenderers: t, startRendererIndex: n = 0 }) => e ? _({
|
|
76
76
|
experience: e,
|
|
77
77
|
availableRenderers: t,
|
|
78
78
|
startRendererIndex: n
|
|
@@ -84,13 +84,13 @@ function v(e, t) {
|
|
|
84
84
|
})).on(m, (e) => ({
|
|
85
85
|
...e,
|
|
86
86
|
currentExperienceIndex: e.currentExperienceIndex + 1
|
|
87
|
-
})).on(
|
|
87
|
+
})).on(c, (e) => ({
|
|
88
88
|
...e,
|
|
89
89
|
isComplete: !0
|
|
90
|
-
})).reset(i),
|
|
90
|
+
})).reset(i), p({
|
|
91
91
|
clock: i,
|
|
92
92
|
target: o
|
|
93
|
-
}),
|
|
93
|
+
}), p({
|
|
94
94
|
clock: o,
|
|
95
95
|
source: {
|
|
96
96
|
experiences: h,
|
|
@@ -103,22 +103,22 @@ function v(e, t) {
|
|
|
103
103
|
startRendererIndex: 0
|
|
104
104
|
}),
|
|
105
105
|
target: y
|
|
106
|
-
}),
|
|
106
|
+
}), p({
|
|
107
107
|
clock: y.doneData,
|
|
108
108
|
filter: (e) => e !== null,
|
|
109
109
|
fn: (e) => e.rendered.body,
|
|
110
110
|
target: s
|
|
111
|
-
}),
|
|
111
|
+
}), p({
|
|
112
112
|
clock: s,
|
|
113
113
|
target: o
|
|
114
|
-
}),
|
|
114
|
+
}), p({
|
|
115
115
|
clock: y.doneData,
|
|
116
116
|
filter: (e) => e === null,
|
|
117
117
|
target: m
|
|
118
|
-
}),
|
|
118
|
+
}), p({
|
|
119
119
|
clock: m,
|
|
120
120
|
target: o
|
|
121
|
-
}),
|
|
121
|
+
}), p({
|
|
122
122
|
clock: [
|
|
123
123
|
o,
|
|
124
124
|
m,
|
|
@@ -129,10 +129,10 @@ function v(e, t) {
|
|
|
129
129
|
state: g
|
|
130
130
|
},
|
|
131
131
|
filter: ({ experiences: e, state: t }) => t.currentExperienceIndex >= e.length,
|
|
132
|
-
target:
|
|
133
|
-
}),
|
|
134
|
-
clock:
|
|
135
|
-
target:
|
|
132
|
+
target: c
|
|
133
|
+
}), p({
|
|
134
|
+
clock: c,
|
|
135
|
+
target: l({
|
|
136
136
|
source: g,
|
|
137
137
|
effect: (e) => {
|
|
138
138
|
e.isComplete && r(e.renderedExperiences);
|
|
@@ -141,4 +141,4 @@ function v(e, t) {
|
|
|
141
141
|
}), i(), n;
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
|
-
export { a as createExperienceInstance,
|
|
144
|
+
export { a as createExperienceInstance, n as evaluateConditionMemo, e as hashRule, r as isExperienceActive, s as registerProjectConfig, y as render, i as ruleReferencesAction, t as ruleReferencesActionDeep, _ as serialize };
|