@picked/client 0.0.70 → 0.0.71-next.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/dist/.tsbuildinfo +1 -0
- package/dist/api-B0ydpQBE.js +38 -0
- package/dist/api-CObostrU.cjs +1 -0
- package/dist/cjs/form/index.js +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/server/index.js +1 -1
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +94 -0
- package/dist/docs/explanation/feature-flag-allocation.md +176 -0
- package/dist/docs/explanation/how-picked-works.md +102 -0
- package/dist/docs/explanation/how-pickedql-works.md +76 -0
- package/dist/docs/explanation/pages-and-flows.md +64 -0
- package/dist/docs/explanation/the-content-model.md +77 -0
- package/dist/docs/explanation/the-two-apis.md +68 -0
- package/dist/docs/explanation/why-server-side-rendering.md +76 -0
- package/dist/docs/explanation/workspaces-and-versions.md +71 -0
- package/dist/docs/how-to/add-a-step-field-or-action.md +43 -0
- package/dist/docs/{pickedql/examples.md → how-to/analytics/index.md} +19 -6
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +46 -0
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +40 -0
- package/dist/docs/how-to/authenticate-with-a-password.md +51 -0
- package/dist/docs/how-to/authenticate-with-an-api-key.md +51 -0
- package/dist/docs/how-to/authenticate-with-oauth.md +40 -0
- package/dist/docs/{flow-builder/building-flows.md → how-to/build-a-flow.md} +13 -9
- package/dist/docs/how-to/connect-the-mcp-server.md +38 -0
- package/dist/docs/how-to/create-a-project.md +29 -0
- package/dist/docs/how-to/create-an-experience.md +42 -0
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +37 -0
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +57 -0
- package/dist/docs/how-to/define-a-page-layout.md +39 -0
- package/dist/docs/how-to/fill-and-publish-a-page.md +50 -0
- package/dist/docs/{gtm-template.md → how-to/install-the-gtm-template.md} +9 -3
- package/dist/docs/how-to/install-the-sdk.md +68 -0
- package/dist/docs/how-to/install-the-vite-plugin.md +56 -0
- package/dist/docs/how-to/invite-and-remove-members.md +34 -0
- package/dist/docs/how-to/preview-a-workspace.md +28 -0
- package/dist/docs/how-to/publish-a-workspace.md +30 -0
- package/dist/docs/how-to/read-a-feature-flag.md +101 -0
- package/dist/docs/how-to/register-a-component.md +55 -0
- package/dist/docs/how-to/register-an-action-handler.md +67 -0
- package/dist/docs/how-to/render-a-step-form.md +132 -0
- package/dist/docs/how-to/render-an-unpublished-preview.md +41 -0
- package/dist/docs/how-to/reuse-a-section.md +37 -0
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +28 -0
- package/dist/docs/how-to/roll-back-a-published-version.md +26 -0
- package/dist/docs/how-to/run-an-ab-test.md +49 -0
- package/dist/docs/how-to/run-code-on-a-form-submission.md +125 -0
- package/dist/docs/how-to/server-render-a-page.md +81 -0
- package/dist/docs/how-to/set-a-content-security-policy.md +32 -0
- package/dist/docs/how-to/set-up-mfa.md +69 -0
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +73 -0
- package/dist/docs/how-to/validate-a-field.md +52 -0
- package/dist/docs/how-to/write-a-condition.md +45 -0
- package/dist/docs/how-to/write-a-predicate.md +60 -0
- package/dist/docs/index.md +41 -70
- package/dist/docs/reference/dashboard/actions.mdx +53 -0
- package/dist/docs/{api-keys.mdx → reference/dashboard/api-keys.mdx} +7 -15
- package/dist/docs/reference/dashboard/conditions.mdx +42 -0
- package/dist/docs/reference/dashboard/content/asset-library.mdx +63 -0
- package/dist/docs/{content → reference/dashboard/content}/content-entries.mdx +11 -3
- package/dist/docs/{content → reference/dashboard/content}/layouts.mdx +11 -35
- package/dist/docs/reference/dashboard/content/pages.mdx +35 -0
- package/dist/docs/reference/dashboard/content/sections.mdx +28 -0
- package/dist/docs/{experiences.mdx → reference/dashboard/experiences.mdx} +9 -16
- package/dist/docs/{features.mdx → reference/dashboard/features.mdx} +26 -41
- package/dist/docs/{fields.mdx → reference/dashboard/fields.mdx} +26 -20
- package/dist/docs/{flow-builder/overview.mdx → reference/dashboard/flow-builder/canvas.mdx} +8 -13
- package/dist/docs/{flow-builder → reference/dashboard/flow-builder}/condition-builder.md +5 -13
- package/dist/docs/{flow-builder → reference/dashboard/flow-builder}/keyboard-shortcuts.md +7 -1
- package/dist/docs/{flow-builder → reference/dashboard/flow-builder}/nodes.md +10 -3
- package/dist/docs/reference/dashboard/projects.mdx +44 -0
- package/dist/docs/reference/dashboard/reports.mdx +43 -0
- package/dist/docs/reference/dashboard/steps.mdx +37 -0
- package/dist/docs/{team-management.md → reference/dashboard/team-management.md} +5 -22
- package/dist/docs/{workspace-versioning.mdx → reference/dashboard/workspace-versioning.mdx} +6 -10
- package/dist/docs/reference/dashboard/workspaces.mdx +76 -0
- package/dist/docs/{delivery-api → reference/delivery-api}/experience-content.md +11 -4
- package/dist/docs/reference/delivery-api/index.md +45 -0
- package/dist/docs/{delivery-api → reference/delivery-api}/preview-caching-crawling.md +12 -5
- package/dist/docs/{delivery-api → reference/delivery-api}/project-config.md +11 -4
- package/dist/docs/reference/glossary.md +173 -0
- package/dist/docs/reference/management-api/authentication.md +74 -0
- package/dist/docs/{api → reference/management-api}/authorization-and-scopes.md +10 -3
- package/dist/docs/{api → reference/management-api}/error-handling.md +9 -3
- package/dist/docs/{api → reference/management-api}/pagination.md +6 -0
- package/dist/docs/{pickedql → reference/pickedql}/data-sources.md +16 -9
- package/dist/docs/{pickedql → reference/pickedql}/dimensions.md +7 -0
- package/dist/docs/{pickedql → reference/pickedql}/filtering.md +7 -0
- package/dist/docs/reference/pickedql/index.md +18 -0
- package/dist/docs/{pickedql → reference/pickedql}/schema.md +13 -6
- package/dist/docs/{pickedql → reference/pickedql}/virtual-functions.md +7 -0
- package/dist/docs/reference/sdk/actions.md +30 -0
- package/dist/docs/{sdk → reference/sdk}/conditions.md +8 -1
- package/dist/docs/reference/sdk/content-security-policy.md +21 -0
- package/dist/docs/reference/sdk/experiences.md +51 -0
- package/dist/docs/{sdk → reference/sdk}/features.md +30 -117
- package/dist/docs/{sdk → reference/sdk}/fields.md +10 -88
- package/dist/docs/reference/sdk/index.md +68 -0
- package/dist/docs/{sdk → reference/sdk}/plugins/create-experience.md +10 -22
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +26 -0
- package/dist/docs/reference/sdk/plugins/index.md +29 -0
- package/dist/docs/{sdk → reference/sdk}/plugins/window-object.md +6 -0
- package/dist/docs/reference/sdk/predicates.md +43 -0
- package/dist/docs/reference/sdk/ssr/index.md +33 -0
- package/dist/docs/{sdk → reference/sdk}/ssr/rendering-and-hydration.md +4 -63
- package/dist/docs/{sdk → reference/sdk}/ssr/serialize.md +6 -33
- package/dist/docs/{sdk → reference/sdk}/ssr/slots-and-placements.md +7 -1
- package/dist/docs/reference/sdk/steps.md +87 -0
- package/dist/docs/reference/tools/chrome-extension.md +16 -0
- package/dist/docs/{image-optimisation-service.md → reference/tools/image-optimisation-service.md} +8 -0
- package/dist/docs/{mcp.md → reference/tools/mcp.md} +5 -45
- package/dist/docs/{vite-plugin.md → reference/tools/vite-plugin.md} +8 -38
- package/dist/docs/{api/index.md → tutorials/first-api-call.md} +27 -15
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +143 -0
- package/dist/docs/tutorials/first-experience.mdx +255 -0
- package/dist/docs/tutorials/first-server-rendered-page.mdx +186 -0
- package/dist/{dom-BwmTHeT7.js → dom-BqcToNL0.js} +1 -3
- package/dist/{dom-CDrHc_j9.cjs → dom-DlLH3FxV.cjs} +1 -1
- package/dist/esm/form/index.js +2 -4
- package/dist/esm/index.js +306 -298
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/preview/index.js +1 -1
- package/dist/esm/server/index.js +12 -10
- package/dist/{experience-instance-DOJShRk5.js → experience-instance-DGk11d8a.js} +3 -3
- package/dist/experience-instance-Dej3P1sE.cjs +1 -0
- package/dist/plugin-CNna0UjB.cjs +1 -0
- package/dist/{plugin-ChPkTj__.js → plugin-DUOJpHaq.js} +2 -2
- package/dist/{preview-channel-DW9J8t4B.js → preview-channel-CSr96XAo.js} +1 -1
- package/dist/{protocol-DSqOlW2r.js → protocol-C5KkkiZc.js} +1 -1
- package/dist/types/client.d.ts +7 -6
- package/dist/types/entities/action/action.d.ts +5 -4
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -5
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/condition/condition.d.ts +5 -5
- package/dist/types/entities/content/content.d.ts +4 -3
- package/dist/types/entities/experience/experience.d.ts +11 -10
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +10 -9
- package/dist/types/entities/feature/feature.d.ts +19 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +6 -6
- package/dist/types/entities/plugin/plugin.d.ts +3 -2
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +4 -3
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response-validation.d.ts +3 -2
- package/dist/types/entities/response/response.d.ts +12 -11
- package/dist/types/entities/session/session.d.ts +2 -1
- package/dist/types/entities/step/step.d.ts +6 -5
- package/dist/types/exports.d.ts +2 -1
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/form/build-responses.d.ts +2 -1
- package/dist/types/form/create-field-evaluator.d.ts +4 -3
- package/dist/types/form/create-field-validation.d.ts +5 -4
- package/dist/types/form/create-form.d.ts +7 -6
- package/dist/types/form/create-submit-pipeline.d.ts +7 -6
- package/dist/types/form/get-step-fields.d.ts +3 -2
- package/dist/types/lifecycle/condition-selection.d.ts +14 -4
- package/dist/types/lifecycle/lifecycle.d.ts +4 -3
- package/dist/types/lifecycle/rules-logic.d.ts +4 -3
- package/dist/types/lifecycle/state-snapshot.d.ts +4 -3
- package/dist/types/picked.d.ts +64 -62
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +1 -1
- package/dist/types/ping.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +9 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +3 -2
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +3 -3
- package/dist/types/plugins/dynamic-experiences/types.d.ts +8 -5
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/web-components/plugin.d.ts +2 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/preview-channel.d.ts +5 -1
- package/dist/types/preview-receiver/index.d.ts +18 -1
- package/dist/types/preview-receiver/protocol.d.ts +10 -1
- package/dist/types/server/index.d.ts +3 -3
- package/dist/types/server/serialize.d.ts +2 -2
- package/dist/types/utils/dom.d.ts +2 -1
- package/dist/types/utils/events.d.ts +6 -6
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -1
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/id.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts +2 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts +2 -1
- package/dist/types/utils/rules-logic.d.ts +6 -2
- package/dist/types/utils/storage.d.ts +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +22 -23
- package/dist/api-CPy9G49C.js +0 -40
- package/dist/api-Ce6xYI--.cjs +0 -1
- package/dist/docs/actions.mdx +0 -98
- package/dist/docs/api/authentication.md +0 -403
- package/dist/docs/chrome-extension.md +0 -68
- package/dist/docs/conditions.mdx +0 -72
- package/dist/docs/content/asset-library.mdx +0 -124
- package/dist/docs/content/pages.mdx +0 -82
- package/dist/docs/content/sections.mdx +0 -44
- package/dist/docs/delivery-api/index.md +0 -53
- package/dist/docs/guides/build-a-personalized-page.mdx +0 -161
- package/dist/docs/pickedql/index.md +0 -54
- package/dist/docs/projects.mdx +0 -44
- package/dist/docs/reports.mdx +0 -20
- package/dist/docs/sdk/actions.md +0 -82
- package/dist/docs/sdk/content-security-policy.md +0 -33
- package/dist/docs/sdk/experiences.md +0 -64
- package/dist/docs/sdk/feature-allocation.md +0 -161
- package/dist/docs/sdk/index.md +0 -98
- package/dist/docs/sdk/plugins/dynamic-experiences.md +0 -84
- package/dist/docs/sdk/plugins/index.md +0 -9
- package/dist/docs/sdk/predicates.md +0 -128
- package/dist/docs/sdk/ssr/index.md +0 -79
- package/dist/docs/sdk/steps.md +0 -479
- package/dist/docs/steps.mdx +0 -53
- package/dist/docs/workspaces.mdx +0 -133
- package/dist/experience-instance-DurC3pE-.cjs +0 -1
- package/dist/plugin-DHn11gn6.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-BqcToNL0.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-B0ydpQBE.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "../../../plugin-DUOJpHaq.js";
|
|
3
3
|
export { e as createClientHeaders, r as dynamicExperiencesPlugin, t as fetchExperienceContent, n as fetchProject };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, r as a, s as o, t as s } from "../../protocol-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, r as a, s as o, t as s } from "../../protocol-C5KkkiZc.js";
|
|
2
2
|
export { s as PREVIEW_CONTENT_PATCH_MESSAGE, i as PREVIEW_INERT_SCRIPTS_MESSAGE, a as PREVIEW_PROTOCOL_VERSION, n as PREVIEW_READY_MESSAGE, e as PREVIEW_RESYNC_MESSAGE, o as applyContentOps, t as formatContentPath, r as parseContentPath };
|
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-DGk11d8a.js";
|
|
2
|
+
import { i as s, n as c } from "../../plugin-DUOJpHaq.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;
|
|
@@ -77,7 +77,7 @@ function y(e, t) {
|
|
|
77
77
|
availableRenderers: t,
|
|
78
78
|
startRendererIndex: n
|
|
79
79
|
}) : null);
|
|
80
|
-
|
|
80
|
+
g.on(s, (e, t) => ({
|
|
81
81
|
...e,
|
|
82
82
|
renderedExperiences: [...e.renderedExperiences, t],
|
|
83
83
|
currentExperienceIndex: e.currentExperienceIndex + 1
|
|
@@ -130,14 +130,16 @@ function y(e, t) {
|
|
|
130
130
|
},
|
|
131
131
|
filter: ({ experiences: e, state: t }) => t.currentExperienceIndex >= e.length,
|
|
132
132
|
target: c
|
|
133
|
-
})
|
|
133
|
+
});
|
|
134
|
+
let b = l({
|
|
135
|
+
source: g,
|
|
136
|
+
effect: (e) => {
|
|
137
|
+
e.isComplete && r(e.renderedExperiences);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return p({
|
|
134
141
|
clock: c,
|
|
135
|
-
target:
|
|
136
|
-
source: g,
|
|
137
|
-
effect: (e) => {
|
|
138
|
-
e.isComplete && r(e.renderedExperiences);
|
|
139
|
-
}
|
|
140
|
-
})
|
|
142
|
+
target: b
|
|
141
143
|
}), i(), n;
|
|
142
144
|
}
|
|
143
145
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./rules-logic-HesIUCu6.js";
|
|
2
2
|
import "./logger-DMN6TxJJ.js";
|
|
3
|
-
import { n, o as r } from "./dom-
|
|
3
|
+
import { n, o as r } from "./dom-BqcToNL0.js";
|
|
4
4
|
import { attach as i, combine as a, createApi as o, createDomain as s, createEffect as c, createEvent as l, sample as u, split as d } from "effector";
|
|
5
5
|
import { createFactory as f, invoke as p } from "@withease/factories";
|
|
6
6
|
//#region src/utils/nodes.ts
|
|
@@ -80,7 +80,7 @@ function T() {
|
|
|
80
80
|
return p(w);
|
|
81
81
|
}
|
|
82
82
|
async function E(n, r, i) {
|
|
83
|
-
return r == null ? !0 : typeof r == "boolean" ? r : e(r)
|
|
83
|
+
return r == null ? !0 : typeof r == "boolean" ? r : !e(r) || await t(n, r, i) === !0;
|
|
84
84
|
}
|
|
85
85
|
function D(e) {
|
|
86
86
|
if (typeof e == "string") return e;
|
|
@@ -452,7 +452,7 @@ var z = s("experience-instance"), B = f(({ client: r, experience: s, target: f,
|
|
|
452
452
|
}), u({
|
|
453
453
|
source: A,
|
|
454
454
|
clock: y,
|
|
455
|
-
filter: (e) => e
|
|
455
|
+
filter: (e) => !e || _(e),
|
|
456
456
|
target: J
|
|
457
457
|
}), u({
|
|
458
458
|
source: B,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rules-logic-CGZIYgAI.cjs");require("./logger-CSTvAyyB.cjs");const t=require("./dom-DlLH3FxV.cjs");let n=require("effector"),r=require("@withease/factories");function i(e){return e.type===`condition`}function a(e){return e.type===`step`}function o(e){return e.type===`experience`}function s(e){return e.type===`origin`}function c(e){return e.type===`action`}var l=`conditions.`,u=(0,n.createDomain)(`condition-results`);function d(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function f(e){if(e===void 0)return null;if(Array.isArray(e))return e.map(e=>f(e));if(d(e)){let t=Object.keys(e).sort((e,t)=>e.localeCompare(t)),n={};for(let r of t)n[r]=f(e[r]);return n}return e}function p(e){return JSON.stringify(f(e))}var m=(0,r.createFactory)(()=>{let e=u.store({}),t=(0,n.createApi)(e,{set(e,t){return e[t.hash]===t.result?e:{...e,[t.hash]:t.result}},seed(e,t){return Object.keys(t).every(n=>e[n]===t[n])?e:{...e,...t}},clear(){return{}}});function r(e){t.set(e)}function i(e){t.seed(e)}function a(){t.clear()}function o(t){return e.getState()[t]}return{store:e,set:r,seed:i,peek:o,reset:a}});function h(){return(0,r.invoke)(m)}async function g(t,n,r){return n==null?!0:typeof n==`boolean`?n:!e.n(n)||await e.t(t,n,r)===!0}function _(e){if(typeof e==`string`)return e;if(Array.isArray(e)&&typeof e[0]==`string`)return e[0]}function v(e){if(Array.isArray(e))return e.some(v);if(d(e)){let t=_(e.var);return t!==void 0&&(t===`actions`||t.startsWith(`actions.`))?!0:Object.values(e).some(v)}return!1}function y(e){if(Array.isArray(e))return e.flatMap(y);if(d(e)){let t=_(e.var);return[...t!==void 0&&t.startsWith(l)?[t.slice(11)]:[],...Object.values(e).flatMap(y)]}return[]}function b(e,t,n=new Set){if(v(e))return!0;for(let r of y(e)){if(n.has(r))continue;n.add(r);let e=t[r];if(e!==void 0&&b(e.logic,t,n))return!0}return!1}async function x(e,t,n){let r={};for(let t of e.conditions.listStore.getState())r[t.key]=t;let i=b(t,r),a=p(t);if(!i){let t=e.conditionResults.peek(a);if(t!==void 0)return t}let o=await g(e,t,n?.context);return i||e.conditionResults.set({hash:a,result:o}),o}async function S(e,t,n){let r=n?.context,i=[n?.precondition,n?.condition,t.condition];for(let t of i)if(!await x(e,t,{context:r}))return!1;return!0}var C=(e,t,n,r,i=new Set)=>i.has(n.id)?[]:(i.add(n.id),a(n)&&!r?[n]:t.filter(e=>e.sourceNodeId===n.id).flatMap(n=>{let r=e.find(e=>e.id===n.destinationNodeId);return r?C(e,t,r,!1,i):[]})),w=(e,t,n)=>C(e,t,n,!0,new Set),T=(e,t,n,r,i=new Set)=>{if(i.has(n.id))return[-1,-1];i.add(n.id);let a=t.filter(e=>e.sourceNodeId===n.id);if(a.length===0)return[0,0];let o=1/0,s=-1/0;for(let n of a){let r=e.find(e=>e.id===n.destinationNodeId);if(!r)continue;let[a,c]=T(e,t,r,!1,new Set(i));a!==-1&&(o=Math.min(o,a+1),s=Math.max(s,c+1))}return o===1/0?[-1,-1]:[o,s]},E=(e,t,n)=>T(e,t,n,!0,new Set),D=(e,t,n,r=new Set)=>{if(r.has(n.id))return[-1,-1];if(r.add(n.id),n.type===`origin`)return[0,0];let i=t.filter(e=>e.destinationNodeId===n.id);if(i.length===0)return[-1,-1];let a=1/0,o=-1/0;for(let n of i){let i=e.find(e=>e.id===n.sourceNodeId);if(!i)continue;let[s,c]=D(e,t,i,new Set(r));s!==-1&&(a=Math.min(a,s+1),o=Math.max(o,c+1))}return a===1/0?[-1,-1]:[a,o]},ee=(e,t,n)=>D(e,t,n,new Set),O=e=>e.find(e=>e.type===`origin`)||null,k=(e,t,n)=>{if(!e)return O(t);let r=n.find(t=>t.sourceNodeId===e.id);return r&&t.find(e=>e.id===r.destinationNodeId)||null};async function A(e,t,n,r){let i=e?`true`:`false`,a=r.find(e=>e.sourceHandle===i&&e.sourceNodeId===t);return n.find(e=>e.id===a?.destinationNodeId)}function j(e,t,n,r){let i=r.filter(e=>e.sourceNodeId===t),a=e?`true`:`false`,o=i.find(e=>e.sourceHandle===a)??i.find(e=>e.sourceHandle==null);return n.find(e=>e.id===o?.destinationNodeId)}var M=(0,n.createDomain)(`experience-instance`),N=(0,r.createFactory)(({client:r,experience:l,target:u,options:d})=>{let f=(0,n.createEvent)(),p=(0,n.createEvent)(),m=(0,n.createEvent)(),h=(0,n.createEvent)(),g=(0,n.createEvent)(),_=(0,n.createEvent)(),v=(0,n.createEvent)(),y=l.componentStore,b=M.store(`transitioning`),x=r.history.entriesStore.map(e=>e.filter(e=>e.experienceId===l.id)),S=x.map(e=>e.filter(e=>a(e.node))),C=x.map(e=>e.at(-1)?.node||null),T=M.store(null);(0,n.sample)({clock:[C,r.steps.listStore,_],source:{steps:r.steps.listStore,node:C},filter:({node:e})=>e!==null&&a(e),fn:({steps:e,node:t})=>t&&a(t)?e.find(e=>e.id===t.stepId)??null:null,target:T});let D=(0,n.combine)(r.steps.listStore,S,(e,t)=>{let n=t.at(-2);if(!n||!a(n.node))return null;let r=n.node;return e.find(e=>e.id===r.stepId)||null}),N=(0,n.combine)(l.treeStore,C,({nodes:e,edges:t},n)=>n?w(e,t,n):[]),P=(0,n.combine)(l.treeStore,C,({nodes:e,edges:t},n)=>n?ee(e,t,n):[-1,-1]),F=(0,n.combine)(l.treeStore,C,({nodes:e,edges:t},n)=>n?E(e,t,n):[-1,-1]),I=M.store(!1),L=(0,n.createApi)(I,{open:()=>!0,close:()=>!1,toggle:e=>!e,set:(e,t)=>t}),R=(0,n.createEffect)(async()=>{r.history.back({experienceId:l.id})}),z=(0,n.attach)({source:l.treeStore,effect:async(e,t)=>{let n=e.nodes.find(e=>a(e)&&e.stepId===t);n&&r.history.push({experienceId:l.id,node:n})}}),B=(0,n.attach)({source:l.treeStore,effect:async(e,t)=>{let n=e.steps.find(e=>e.key===t);if(!n)return;let i=e.nodes.find(e=>a(e)&&e.stepId===n.id);i&&r.history.push({experienceId:l.id,node:i})}}),V=(0,n.attach)({source:C,effect:e=>{}}),H=(0,n.attach)({source:l.treeStore,effect:async({nodes:e})=>O(e)}),U=(0,n.attach)({source:l.treeStore,effect:async({nodes:e,edges:t},n)=>{if(s(n))return k(n,e,t)}}),W=(0,n.attach)({source:l.treeStore,effect:async({nodes:t,edges:n,conditions:a},o)=>{if(!i(o))return;let s=a.find(e=>e.id===o.conditionId)?.logic;return s?A(!!await e.t(r,s),o.id,t,n):void 0}}),G=(0,n.attach)({source:{tree:l.treeStore,actions:r.actions.listStore,snapshot:r.stateSnapshotStore},effect:async({tree:e,actions:t,snapshot:n},r)=>{let{nodes:i,edges:a}=e;if(!c(r))return;let o=r.actionKey;if(!o){`${r.id}`;return}let s=t.find(e=>e.key===o)?.action;if(typeof s!=`function`)return`${o}`,j(!1,r.id,i,a)??null;let l=!0;try{`${o}`,await s({...n,args:[]},{experience:Z})}catch{`${o}`,l=!1}let u=j(l,r.id,i,a);if(!u){let e=a.some(e=>e.sourceNodeId===r.id)?`no edge for its outcome`:`no outgoing edge`;return`${r.id}${e}`,null}return`${o}${u.id}`,u}}),K=(0,n.createEffect)(e=>{o(e)&&r.experiences.launch({key:e.experienceKey})}),q=(0,n.attach)({source:[C,l.treeStore],effect:async([e,{nodes:t,edges:n}])=>k(e,t,n)}),J=(0,n.attach)({source:[C,l.treeStore],effect:async([e,{nodes:t,edges:n}])=>k(e,t,n)}),te=(0,n.createEffect)(e=>{r.history.push({experienceId:l.id,node:e})}),Y=(0,n.attach)({source:l.configStore,effect:async({initializeOpenLogic:t})=>d?.initialiseOpen===void 0?e.n(t)?!!await e.t(r,t):t??!1:d.initialiseOpen}),X=(0,n.combine)(y,r.frameworks.listStore,(e,t)=>{if(!e)return null;let n=t.find(t=>t.name===e.component.frameworkName);return n?{component:e,framework:n}:null},{skipVoid:!1}),Z,ne=(0,n.attach)({source:X,effect:e=>{if(!e)return;if(!u){`${l.id}`;return}let n=t.n(u);try{e.framework.render(n,e.component.component,r,Z)}catch{}}});Z=Object.freeze({id:Math.random().toString(36).substring(7),experienceKey:l.key,experienceId:l.id,experienceName:l.name,configStore:l.configStore,target:u,componentStore:y,componentAndFrameworkStore:X,stateStore:b,isOpenStore:I,open:L.open,close:L.close,toggleOpen:L.toggle,setOpen:L.set,treeStore:l.treeStore,currentNodeStore:C,currentStepStore:T,previousStepStore:D,nextReachableStepNodesStore:N,stepsToOriginStore:P,stepsToLeafStore:F,goToNextStep:p,goToPreviousStep:m,goToStepById:h,goToStepByKey:g,stepsHistoryStore:S,mountFx:ne});let Q=(0,n.createEvent)(),$=(0,n.createEvent)();return(0,n.sample)({clock:C,target:Q}),(0,n.sample)({clock:Q,filter:e=>e===null,target:H}),(0,n.sample)({clock:Q,filter:e=>e!==null,target:$}),(0,n.split)({source:$,match:e=>i(e)?`condition`:a(e)?`step`:o(e)?`launchExperience`:s(e)?`origin`:c(e)?`action`:`other`,cases:{origin:U,condition:W,step:V,launchExperience:K,action:G,__:(0,n.createEvent)()}}),(0,n.sample)({clock:[W.doneData,U.doneData,H.doneData,J.doneData,q.doneData,G.doneData],filter:Boolean,target:te}),(0,n.sample)({clock:p,target:J}),(0,n.sample)({clock:p,source:T,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit`,step:e,experience:Z}))}),(0,n.sample)({clock:J.done,source:T,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit_success`,step:e,experience:Z}))}),(0,n.sample)({clock:J.fail,source:T,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_submit_error`,step:e,experience:Z}))}),(0,n.sample)({clock:m,target:R}),(0,n.sample)({clock:h,target:z}),(0,n.sample)({clock:g,target:B}),(0,n.sample)({source:(0,n.combine)([W.pending,U.pending,H.pending,J.pending,q.pending,G.pending]),fn:e=>e.some(Boolean)?`transitioning`:`ready`,target:b}),(0,n.sample)({clock:V.doneData,source:T,filter:Boolean,target:r.eventBus.prepend(e=>({type:`step_enter`,step:e,experience:Z}))}),(0,n.sample)({clock:v,target:Y}),(0,n.sample)({source:Y.doneData,fn:Boolean,target:I}),(0,n.sample)({source:C,clock:f,filter:e=>!e||s(e),target:q}),(0,n.sample)({source:I,filter:Boolean,target:f}),(0,n.sample)({source:I,filter:Boolean,target:r.eventBus.prepend(()=>({type:`experience_open`,experience:Z}))}),(0,n.sample)({source:I,filter:e=>!e,target:r.eventBus.prepend(()=>({type:`experience_close`,experience:Z}))}),(0,n.sample)({clock:_,target:[v]}),_(),Z});function P(e){return(0,r.invoke)(N,e)}var F=(0,r.createFactory)(({client:e})=>{let r=M.store({}),i=(0,n.createEvent)(),a=(0,n.createEvent)(),o=(0,n.createEvent)(),s=(0,n.createApi)(r,{register(e,t){let n=[...e[t.experienceId]??[]];return n.push(t),{...e,[t.experienceId]:n}},unregister(e,t){let n=t.experienceId,r=e[n]?.filter(e=>e!==t);return{...e,[n]:r??[]}}}),c=(0,n.createEffect)(({experience:t,target:n,options:r})=>P({client:e,experience:t,target:n,options:r})),l=(0,n.createEffect)(e=>{s.register(e)}),u=(0,n.createEffect)(e=>{e.target&&t.o(e.target,()=>{o(e)})}),d=(0,n.createEffect)(e=>{s.unregister(e)}),f=(0,n.createEffect)(async e=>{await e.mountFx()});(0,n.sample)({clock:i,target:c}),(0,n.sample)({clock:o,target:d}),(0,n.sample)({clock:c.doneData,target:[l,u,a]}),(0,n.sample)({clock:c.doneData,target:e.eventBus.prepend(e=>({type:`experience_initialize`,experience:e}))}),(0,n.sample)({clock:a,target:f});function p(e,t,n){i({experience:e,target:t,options:n})}let m=r.map(e=>Object.values(e).flat());function h(e){return m.map(t=>t.filter(t=>t.experienceKey===e),{skipVoid:!1})}function g(e){return r.map(t=>t[e]||[],{skipVoid:!1})}return{spawn:p,getByExperienceKey:h,getByExperienceId:g,listStore:m}});function I(e){return(0,r.invoke)(F,e)}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./logger-CSTvAyyB.cjs");const e=require("./api-CObostrU.cjs");let t=require("effector");function n(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619);return t>>>0}function r(e){let t=e;return t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),t^=t>>>16,t>>>0}function i(e,t){return r(n(`${e}:${t}`))%100}function a(e,t){return t<=0?!1:t>=100||e<t}function o(e){return typeof e==`object`&&!!e&&`features`in e&&Array.isArray(e.features)}function s(e,t){if(Array.isArray(t.conditions))for(let n of t.conditions)e.registerCondition(n)}function c(e,t){e.registerExperience({id:t.id,key:t.key,name:t.name,targets:t.targets,nodes:t.nodes,edges:t.edges,condition:t.condition,initializeOpen:t.initializeOpen,componentName:t.componentName})}function l(e,t){if(Array.isArray(t.fields))for(let n of t.fields)e.registerField(n)}function u(e,t){if(!Array.isArray(t.steps))return;let n=new Map(t.fields.map(e=>[e.id,e.key]));for(let r of t.steps){let t=[];for(let e of r.fieldIds??[]){let i=n.get(e);if(i===void 0){`${r.key}${e}`;continue}t.push(i)}let i=r.layoutContentId?e.contents.getById(r.layoutContentId):null;e.registerStep({id:r.id,key:r.key,name:r.name,fieldKeys:t,layoutName:r.layoutName,...r.layoutContentId!==void 0&&{layoutContentId:r.layoutContentId,layoutContentStore:i}})}}function d(e,t){if(Array.isArray(t.experiences))for(let n of t.experiences)c(e,n)}function f(e,t,n){h(e,t,n.isPreview,n.sessionId),s(e,t),l(e,t),u(e,t),d(e,t)}function p(e){let t=e.searchParams[`preview-token`];if(t&&t.length>0)return t[0]}function m(e){let t=new Set,n=e.searchParams.feature;if(!n)return t;for(let e of n){let n=e.indexOf(`:`);n>0&&t.add(e.substring(0,n))}return t}function h(e,t,n,r){let i=m(e);for(let a of t.features)i.has(a.id)||g(e,a,n,r)}function g(e,t,n,r){let o=i(r,t.id);e.registerFeature(t.id,{key:`v${t.version}`,name:t.name,enabled:t.enabled,weight:t.weight,storage:n?`session`:`local`,decide:()=>a(o,t.weight)})}function _(e){try{let t=new URL(e).hostname;return t===`localhost`||t===`127.0.0.1`||t===`::1`}catch{return!1}}function v(e){if(typeof e!=`object`||!e||!(`cause`in e))return!1;let{cause:t}=e;return typeof t!=`object`||!t||!(`code`in t)?!1:t.code===`ECONNREFUSED`}async function y(t,n,r){let i=r?.previewToken?`projects/${n}?preview_token=${encodeURIComponent(r.previewToken)}`:`projects/${n}`,a;try{a=await e.t(t,i,r?.headers)}catch(e){return _(t)&&v(e),null}if(!a.ok)return`${a.status.toString()}`,null;let s;try{s=await a.json()}catch{return null}return o(s)?s:null}function b(e){return typeof e!=`object`||!e||!(`experienceId`in e)||!(`content`in e)?!1:Array.isArray(e.content)}async function x(t,n,r,i){let a=i?.previewToken?`projects/${n}/experiences/${r}/content?preview_token=${encodeURIComponent(i.previewToken)}`:`projects/${n}/experiences/${r}/content`,o;try{o=await e.t(t,a,i?.headers,i?.signal)}catch(e){return _(t)&&v(e)||`${r}`,null}if(!o.ok)return`${r}${o.status.toString()}`,null;let s;try{s=await o.json()}catch{return`${r}`,null}return b(s)?s:(`${r}`,null)}function S(e,t){for(let n of t.content)e.registerContent({id:n.id,contentModelKey:n.contentModelKey,data:n.data})}function C(e){if(typeof e!=`object`||!e||!(`projectConfig`in e)||!(`experienceContent`in e)||!(`manifestMetadata`in e))return!1;let{experienceContent:t}=e;return typeof t==`function`}async function w(){try{let e=await import(`virtual:picked/data`);return C(e)?e:null}catch{return null}}function T(e,t,n){return r=>x(e,t,r.id,n?{previewToken:n}:void 0)}function E(e,t){return n=>e(n,t?{previewToken:t}:void 0)}function D(e){return(t,n)=>e.experienceContent(t,n)}function O(e,t){let n=new Map;return(r,i)=>{let a=n.get(r.id);if(a)return a;let o=(async()=>{try{let n=await t(r,i);return n&&S(e,n),n}finally{n.delete(r.id)}})();return n.set(r.id,o),o}}function k(e,t){let n=new Set(t&&Array.isArray(t.experiences)?t.experiences.map(e=>e.id):[]);return(t,r)=>n.has(t.id)?e(t,r):Promise.resolve(null)}async function A(e){let{client:t,apiUrl:n,options:r}=e,i=p(t),a=!!i,o=r?.projectConfig??null,s=r?.getContent?E(r.getContent,i):null,c=null;if(i)return o??=await y(n,t.projectId,{previewToken:i}),s??=T(n,t.projectId,i),{config:o,contentLoader:s,dataSource:c,isPreview:a};if(o&&s)return{config:o,contentLoader:s,dataSource:c,isPreview:a};let l=await w();return l?(o??=l.projectConfig,s??=D(l),c=l.manifestMetadata,{config:o,contentLoader:s,dataSource:c,isPreview:a}):(o??=await y(n,t.projectId),s??=T(n,t.projectId),{config:o,contentLoader:s,dataSource:c,isPreview:a})}function j(e){return{name:`dynamic-experiences`,setup:n=>{let r=e?.apiUrl??n.apiUrl;return{onStart:(0,t.attach)({source:n.session.store.map(e=>e.id),effect:async t=>{let{config:i,contentLoader:a,dataSource:o,isPreview:s}=await A({client:n,apiUrl:r,options:e});a&&(n.contentLoader=O(n,k(a,i))),n.dataSource=o,i&&(n.previewEmbedderOrigins=i.previewEmbedderOrigins??null,f(n,i,{isPreview:s,sessionId:t}))}})}}}}Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return j}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./logger-DMN6TxJJ.js";
|
|
2
|
-
import { t as e } from "./api-
|
|
2
|
+
import { t as e } from "./api-B0ydpQBE.js";
|
|
3
3
|
import { attach as t } from "effector";
|
|
4
4
|
//#region src/plugins/dynamic-experiences/hash.ts
|
|
5
5
|
function n(e) {
|
|
@@ -15,7 +15,7 @@ function i(e, t) {
|
|
|
15
15
|
return r(n(`${e}:${t}`)) % 100;
|
|
16
16
|
}
|
|
17
17
|
function a(e, t) {
|
|
18
|
-
return t <= 0 ? !1 : t >= 100
|
|
18
|
+
return t <= 0 ? !1 : t >= 100 || e < t;
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/plugins/dynamic-experiences/plugin.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e } from "./object-BUDGxEqy.js";
|
|
2
2
|
import { a as t, f as n } from "./supports-CO9bJGNl.js";
|
|
3
3
|
import { t as r } from "./inert-script-report-B_bMPRzp.js";
|
|
4
|
-
import { a as i, i as a, n as o, o as s, s as c } from "./protocol-
|
|
4
|
+
import { a as i, i as a, n as o, o as s, s as c } from "./protocol-C5KkkiZc.js";
|
|
5
5
|
//#region src/preview-bridge/index.ts
|
|
6
6
|
var l = "picked-preview:navigation", u = !1;
|
|
7
7
|
function d() {
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** @file Options interface for creating a Picked client instance. */
|
|
2
|
+
import type { Predicate } from './entities/predicate/predicate';
|
|
3
|
+
import type { Action } from './entities/action/action';
|
|
4
|
+
import type { Plugin } from './entities/plugin/plugin';
|
|
5
|
+
import type { Feature } from './entities/feature/feature';
|
|
6
|
+
import type { AdaptedComponent } from './entities/component/component';
|
|
7
|
+
import type { LogicRule } from './logic-engine';
|
|
7
8
|
export interface CreateClientOptions {
|
|
8
9
|
/**
|
|
9
10
|
* @deprecated The organization id is no longer used by the Picked client. The
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Action entity — Effector stores and registry for keyed callable functions. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { StateSnapshot } from '../../lifecycle/state-snapshot';
|
|
4
|
+
import type { Picked } from '../../picked';
|
|
5
|
+
import type { ExperienceInstance } from '../experience-instance/experience-instance';
|
|
5
6
|
/**
|
|
6
7
|
* Context supplied by the experience-flow runtime when an ActionNode triggers the action.
|
|
7
8
|
* `null` for every other invocation path (see {@link Action}).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/entities/action/action.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAEpF;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,UAAU,EAAE,kBAAkB,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,MAAM,GAAG,CACnB,QAAQ,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,EAC7C,OAAO,EAAE,aAAa,GAAG,IAAI,KAE3B,OAAO,GACP,OAAO,CAAC,OAAO,CAAC,GAChB,MAAM,GACN,OAAO,CAAC,MAAM,CAAC,GACf,MAAM,EAAE,GACR,OAAO,CAAC,MAAM,EAAE,CAAC,GACjB,IAAI,GACJ,OAAO,CAAC,IAAI,CAAC,GACb,SAAS,CAAA;AAEb,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEtE,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAID,QAAA,MAAM,wBAAwB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;aAqBvC,MAAM;gBAAU,MAAM;;oBA8BpC,MAAM;;mCA6BhB,MAAM,YACP;QAAE,UAAU,EAAE,kBAAkB,CAAA;KAAE,KAC3C,KAAK,CAAC,MAAM,UA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;AAID,QAAA,MAAM,wBAAwB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;aAqBvC,MAAM;gBAAU,MAAM;;oBA8BpC,MAAM;;mCA6BhB,MAAM,YACP;QAAE,UAAU,EAAE,kBAAkB,CAAA;KAAE,KAC3C,KAAK,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;CA4ClC,CAAA;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,EACxF,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAE7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,UAAU,MAAM,WAAW,YAAY,KAAG,IAEhF,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Component entity — Effector stores and registry for framework-specific component implementations. */
|
|
2
|
+
import type { EventCallable, Store } from 'effector';
|
|
3
|
+
import type { Picked } from '../../picked';
|
|
4
|
+
import type { LazyComponentLoader } from './lazyComponent';
|
|
4
5
|
export interface AdaptedComponentStyle {
|
|
5
6
|
sheets?: string[];
|
|
6
7
|
css?: string[];
|
|
@@ -30,7 +31,7 @@ declare const createComponentFactory: ({ client, component, name }: {
|
|
|
30
31
|
}) => {
|
|
31
32
|
name: string;
|
|
32
33
|
component: AdaptedComponent<string, unknown>;
|
|
33
|
-
frameworkStore: Store<import(
|
|
34
|
+
frameworkStore: Store<import("../..").Framework | undefined>;
|
|
34
35
|
};
|
|
35
36
|
/**
|
|
36
37
|
* Creates a component with framework-specific metadata and loader.
|
|
@@ -58,7 +59,7 @@ declare const createComponentIndexFactory: ({ client }: {
|
|
|
58
59
|
listStore: Store<{
|
|
59
60
|
name: string;
|
|
60
61
|
component: AdaptedComponent<string, unknown>;
|
|
61
|
-
frameworkStore: Store<import(
|
|
62
|
+
frameworkStore: Store<import("../..").Framework | undefined>;
|
|
62
63
|
}[]>;
|
|
63
64
|
};
|
|
64
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/entities/component/component.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IAC1E,aAAa,EAAE,CAAC,CAAA;IAChB,SAAS,EAAE,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC,CAAA;KAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;IAC3D,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAC9B;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IAC3E,aAAa,EAAE,CAAC,CAAA;IAChB,SAAS,EAAE,CAAC,CAAA;IACZ,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAC9B;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO,IAC/D,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAE/B,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,gBAAgB,CAAC,M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AAS,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,EACpF,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAE3C;AAED,QAAA,MAAM,2BAA2B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;cAkBzC,MAAM;mBAAa,gBAAgB;;sBAmChD,MAAM,KAAG,KAAK,CACnC;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,gBAAgB,CAAA;KAC5B,GACD,SAAS,CACZ;;;;;;CASD,CAAA;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAC9F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAEhD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SACnB,MAAM,aACD,gBAAgB,cACf,cAAc,KACzB,IAEF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogicRule } from '../../logic-engine';
|
|
1
|
+
import type { LogicRule } from '../../logic-engine';
|
|
2
2
|
export type ConditionsStore = ReturnType<typeof createConditionIndex>;
|
|
3
3
|
export interface Condition {
|
|
4
4
|
id: string;
|
|
@@ -8,10 +8,10 @@ export interface Condition {
|
|
|
8
8
|
}
|
|
9
9
|
declare const createConditionIndexFactory: () => {
|
|
10
10
|
register: (condition: Condition) => void;
|
|
11
|
-
getById: (id: Condition[
|
|
12
|
-
getByKey: (key: Condition[
|
|
13
|
-
listStore: import(
|
|
14
|
-
indexStore: import(
|
|
11
|
+
getById: (id: Condition['id']) => import("effector").Store<Condition | null>;
|
|
12
|
+
getByKey: (key: Condition['key']) => import("effector").Store<Condition | null>;
|
|
13
|
+
listStore: import("effector").Store<Condition[]>;
|
|
14
|
+
indexStore: import("effector").StoreWritable<{
|
|
15
15
|
[id: string]: Condition;
|
|
16
16
|
}>;
|
|
17
17
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @file Content entity — Effector stores, types, and lifecycle helpers for CMS content records. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
2
3
|
export interface Content {
|
|
3
4
|
id: string;
|
|
4
5
|
/**
|
|
@@ -21,9 +22,9 @@ export type ContentsStore = ReturnType<typeof createContentIndex>;
|
|
|
21
22
|
declare const createContentIndexFactory: () => {
|
|
22
23
|
register: (content: Content) => void;
|
|
23
24
|
patch: (id: string, apply: ContentDataPatch) => void;
|
|
24
|
-
getById: (id: Content[
|
|
25
|
+
getById: (id: Content['id']) => Store<Content | null>;
|
|
25
26
|
listStore: Store<Content[]>;
|
|
26
|
-
indexStore: import(
|
|
27
|
+
indexStore: import("effector").StoreWritable<{
|
|
27
28
|
[id: string]: Content;
|
|
28
29
|
}>;
|
|
29
30
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
/** @file Experience entity — Effector stores, types, and lifecycle helpers for Picked experiences. */
|
|
2
|
+
import { type Effect, type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { AdaptedComponent } from '../component/component';
|
|
4
|
+
import type { Condition } from '../condition/condition';
|
|
5
|
+
import type { ExperienceStep } from '../step/step';
|
|
6
|
+
import type { Framework } from '../framework/framework';
|
|
7
|
+
import type { Picked } from '../../picked';
|
|
8
|
+
import type { LogicRule, LogicValue } from '../../logic-engine';
|
|
8
9
|
export type ExperiencesListStore = ReturnType<typeof createExperienceIndex>;
|
|
9
10
|
/** Per-experience reactive entity returned by `createExperience`. */
|
|
10
11
|
export interface ExperienceStore {
|
|
@@ -98,11 +99,11 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
98
99
|
/** Registers an experience in the index. If an experience with the same ID already exists, it is merged. */
|
|
99
100
|
register: EventCallable<Experience>;
|
|
100
101
|
/** Returns a derived store for an experience by its ID. The store value is `undefined` when no match exists. */
|
|
101
|
-
get: (id: Experience[
|
|
102
|
+
get: (id: Experience['id']) => Store<ExperienceStore | undefined>;
|
|
102
103
|
/** @deprecated Use `experiences.get(id)` instead. */
|
|
103
|
-
getById: (id: Experience[
|
|
104
|
+
getById: (id: Experience['id']) => Store<ExperienceStore | undefined>;
|
|
104
105
|
/** Returns a derived store for an experience by its key. The store value is `undefined` when no match exists. */
|
|
105
|
-
getByKey: (key: Experience[
|
|
106
|
+
getByKey: (key: Experience['key']) => Store<ExperienceStore | undefined>;
|
|
106
107
|
/** Effector effect that launches an experience by its key. */
|
|
107
108
|
launch: Effect<{
|
|
108
109
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAOL,KAAK,MAAM,EACX,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/D,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE3E,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MA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;IACZ,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,cAAc,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACvC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IAClC,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,WAAkB,MAAM,KAAG,OAAO,CAAC,IAAI,CAExE,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
/** @file Experience instance — Effector stores and lifecycle for a single experience. */
|
|
2
|
+
import { type Effect, type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { Experience, ExperienceNode, ExperienceStore, ExperienceTarget, LaunchExperienceOptions } from '../experience/experience';
|
|
4
|
+
import type { Component } from '../component/component';
|
|
5
|
+
import type { Framework } from '../framework/framework';
|
|
6
|
+
import type { ExperienceStep } from '../step/step';
|
|
7
|
+
import type { Picked } from '../../picked';
|
|
8
|
+
import type { HistoryEntry } from '../history/history';
|
|
8
9
|
export interface ExperienceInstance {
|
|
9
10
|
id: string;
|
|
10
11
|
experienceKey: Experience['key'];
|
|
@@ -79,8 +80,8 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
79
80
|
client: Picked;
|
|
80
81
|
}) => {
|
|
81
82
|
spawn: (experience: ExperienceStore, target: HTMLElement, options?: LaunchExperienceOptions) => void;
|
|
82
|
-
getByExperienceKey: (key: Experience[
|
|
83
|
-
getByExperienceId: (id: Experience[
|
|
83
|
+
getByExperienceKey: (key: Experience['key']) => Store<ExperienceInstance[]>;
|
|
84
|
+
getByExperienceId: (id: Experience['id']) => Store<ExperienceInstance[]>;
|
|
84
85
|
listStore: Store<ExperienceInstance[]>;
|
|
85
86
|
};
|
|
86
87
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Feature entity — Effector stores and registry for A/B test features with persistent bucketing. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { Picked } from '../../picked';
|
|
3
4
|
export interface Feature {
|
|
4
5
|
key: string;
|
|
5
6
|
name: string;
|
|
@@ -47,6 +48,22 @@ export interface ResolvedFeatureBucket extends FeatureBaseBucket {
|
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
export type FeatureBucket = UnresolvedFeatureBucket | ResolvedFeatureBucket;
|
|
51
|
+
/**
|
|
52
|
+
* Reads a bucket back out of its stored text.
|
|
53
|
+
*
|
|
54
|
+
* Storage holds a bucket as raw text, so this is the inverse of the write: `'true'` and
|
|
55
|
+
* `'false'` are the two booleans and every other value is a named variant. A variant named
|
|
56
|
+
* literally `true` or `false` therefore comes back as a boolean.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} value - Stored text, or the value side of a `?picked-feature=` override.
|
|
59
|
+
* @returns {boolean | string} The boolean bucket, or the variant name unchanged.
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* parseBucket('true') // true
|
|
63
|
+
* parseBucket('variant-a') // 'variant-a'
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseBucket(value: string): boolean | string;
|
|
50
67
|
declare const createFeatureIndexFactory: ({ client }: {
|
|
51
68
|
client: Picked;
|
|
52
69
|
}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/entities/feature/feature.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,OAAO,E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EAC1F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAE9C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,OAAO,YAAY,aAAa,SAEnF,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Field entity — Effector stores, types, and CRUD helpers for experience fields. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { LogicRule } from '../../logic-engine';
|
|
3
4
|
export type FieldsStore = ReturnType<typeof createFieldIndex>;
|
|
4
5
|
export type PrimitiveFieldValue = string | number | boolean | null;
|
|
5
6
|
export type FieldOptionValue = string | number | boolean;
|
|
@@ -83,11 +84,11 @@ export interface FieldBooleanMultiple extends FieldBase<boolean> {
|
|
|
83
84
|
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldObjectSingular | FieldObjectMultiple | FieldBooleanSingular | FieldBooleanMultiple;
|
|
84
85
|
declare const createFieldIndexFactory: () => {
|
|
85
86
|
register: (field: Field) => void;
|
|
86
|
-
update: (key: FieldBase[
|
|
87
|
-
getById: (id: FieldBase[
|
|
88
|
-
getByKey: (key: FieldBase[
|
|
87
|
+
update: (key: FieldBase['key'], updates: Partial<Field>) => void;
|
|
88
|
+
getById: (id: FieldBase['id']) => Store<Field | null>;
|
|
89
|
+
getByKey: (key: FieldBase['key']) => Store<Field | null>;
|
|
89
90
|
listStore: Store<Field[]>;
|
|
90
|
-
getByName: (name: FieldBase[
|
|
91
|
+
getByName: (name: FieldBase['name']) => Store<Field | null>;
|
|
91
92
|
};
|
|
92
93
|
/**
|
|
93
94
|
* Creates an Effector-based index for registering and retrieving fields.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Framework entity — Effector stores and registry for UI framework integrations (React, Svelte, etc). */
|
|
2
|
+
import { type EventCallable } from 'effector';
|
|
3
|
+
import type { AdaptedComponent } from '../component/component';
|
|
4
|
+
import type { ExperienceInstance } from '../experience-instance/experience-instance';
|
|
5
|
+
import type { Picked } from '../../picked';
|
|
5
6
|
export type FrameworksStore = ReturnType<typeof createFrameworkIndex>;
|
|
6
7
|
export interface Framework {
|
|
7
8
|
name: string;
|
|
@@ -16,8 +17,8 @@ declare const createFrameworkIndexFactory: (_params: {
|
|
|
16
17
|
name: string;
|
|
17
18
|
framework: Framework;
|
|
18
19
|
}>;
|
|
19
|
-
getByName: (name: string) => import(
|
|
20
|
-
listStore: import(
|
|
20
|
+
getByName: (name: string) => import("effector").Store<Framework | undefined>;
|
|
21
|
+
listStore: import("effector").Store<Framework[]>;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Creates a framework index with stores and registration logic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../../../../src/entities/framework/framework.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,OAAO,EAAwC,KAAK,aAAa,EAAU,MAAM,UAAU,CAAA;AAG3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AACpF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,eAAe,CAAA;IACvB,4GAA4G;IAC5G,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B;AAED,QAAA,MAAM,2BAA2B,YAA2B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;cAkBtC,MAAM;mBAAa,SAAS;;sBA6BzC,MAAM;;CAS/B,CAA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AAC,EAC9F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAEhD;AAED,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kBAAkB,KAC3B,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,cAAe,SAAS,cAAc,eAAe,KAAG,IAElF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExperienceNode } from '../experience/experience';
|
|
1
|
+
import type { ExperienceNode } from '../experience/experience';
|
|
2
2
|
export interface HistoryEntry {
|
|
3
3
|
id: string;
|
|
4
4
|
node: ExperienceNode;
|
|
@@ -6,20 +6,20 @@ export interface HistoryEntry {
|
|
|
6
6
|
experienceId: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function createHistory(): {
|
|
9
|
-
push: import(
|
|
9
|
+
push: import("effector").EventCallable<{
|
|
10
10
|
experienceId: string;
|
|
11
11
|
node: ExperienceNode;
|
|
12
12
|
}>;
|
|
13
|
-
replace: import(
|
|
13
|
+
replace: import("effector").EventCallable<{
|
|
14
14
|
experienceId: string;
|
|
15
15
|
node: ExperienceNode;
|
|
16
16
|
}>;
|
|
17
|
-
back: import(
|
|
17
|
+
back: import("effector").EventCallable<{
|
|
18
18
|
experienceId?: string;
|
|
19
19
|
}>;
|
|
20
|
-
restore: import(
|
|
20
|
+
restore: import("effector").EventCallable<{
|
|
21
21
|
entries: HistoryEntry[];
|
|
22
22
|
}>;
|
|
23
|
-
entriesStore: import(
|
|
23
|
+
entriesStore: import("effector").Store<HistoryEntry[]>;
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=history.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Plugin contract for the Picked SDK. Plugins extend the client via setup-time registration and effector-based onStart hooks. */
|
|
2
|
+
import { type Effect } from 'effector';
|
|
3
|
+
import type { Picked } from '../../picked';
|
|
3
4
|
export interface Plugin {
|
|
4
5
|
name: string;
|
|
5
6
|
setup: (client: Picked) => void | PluginConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,wIAAwI;AACxI,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAAA;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,qIAAqI;IACrI,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAIjG;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,wIAAwI;AACxI,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAAA;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,qIAAqI;IACrI,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAIjG;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,UAAU,MAAM,WAAW,iBAAiB,KAAG,IASxF,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Predicate entity — Effector stores and registry for condition evaluation functions. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { StateSnapshot } from '../../lifecycle/state-snapshot';
|
|
4
|
+
import type { Picked } from '../../picked';
|
|
4
5
|
export type Predicate = (snapshot: StateSnapshot & {
|
|
5
6
|
args: unknown[];
|
|
6
7
|
}) => boolean | Promise<boolean> | string | Promise<string> | string[] | Promise<string[]> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../../../src/entities/predicate/predicate.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,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ACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,CACtB,QAAQ,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,KAE3C,OAAO,GACP,OAAO,CAAC,OAAO,CAAC,GAChB,MAAM,GACN,OAAO,CAAC,MAAM,CAAC,GACf,MAAM,EAAE,GACR,OAAO,CAAC,MAAM,EAAE,CAAC,GACjB,SAAS,CAAA;AAEb,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAErE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,CAAA;CACrB;AAID,QAAA,MAAM,2BAA2B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;cAwBzC,MAAM;mBAAa,SAAS;;sBAiCzC,MAAM;;cAtDrB,MAAM;mBACD,SAAS;;0CAiEqB,MAAM,KAAG,KAAK,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;CA0CxF,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAC9F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAEhD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,SAAU,MAAM,aAAa,SAAS,cAAc,eAAe,SAE7F,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Validation utilities for response values — type checks, coercion, and field-level validation. */
|
|
2
|
+
import type { Field, FieldValue } from '../field/field';
|
|
3
|
+
import type { LogicObject, LogicRule } from '../../logic-engine';
|
|
3
4
|
export interface ValidationError {
|
|
4
5
|
fieldKey: Field['key'];
|
|
5
6
|
userMessage: string;
|