@picked/client 0.0.1-dev.1788925875333 → 0.0.1-next.1
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/README.md +8 -0
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/experience-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/history-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/responses-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/responses-indexeddb-plugin/index.js +1 -0
- package/dist/cjs/plugins/shopify/index.js +1 -0
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +733 -1814
- package/dist/esm/plugins/create-experience/index.js +398 -490
- package/dist/esm/plugins/experience-browserstorage-plugin/index.js +38 -0
- package/dist/esm/plugins/history-browserstorage-plugin/index.js +26 -0
- package/dist/esm/plugins/responses-browserstorage-plugin/index.js +36 -0
- package/dist/esm/plugins/responses-indexeddb-plugin/index.js +101 -0
- package/dist/esm/plugins/shopify/index.js +59 -0
- package/dist/esm/plugins/single-page-app/index.js +35 -31
- package/dist/esm/plugins/window-object/index.js +9 -9
- package/dist/esm/server/index.js +89 -141
- package/dist/experience-instance-6ZKZS7dF.cjs +1 -0
- package/dist/experience-instance-BA0EXYg5.js +712 -0
- package/dist/id-BKIWbSTy.cjs +1 -0
- package/dist/id-BW-g3y32.js +6 -0
- package/dist/logger-BsmHUUw1.cjs +1 -0
- package/dist/logger-C9a75KZn.js +5 -0
- package/dist/object-BbFTsGh3.cjs +1 -0
- package/dist/object-JwZ58NOH.js +28 -0
- package/dist/storage-BPJwmlva.cjs +1 -0
- package/dist/storage-D87xFySf.js +85 -0
- package/dist/supports-BvrzQAVk.js +79 -0
- package/dist/supports-C0y3-V5V.cjs +1 -0
- package/dist/types/client.d.ts +23 -119
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -45
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +99 -152
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +113 -83
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +8 -118
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +64 -96
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/framework/framework.d.ts +7 -32
- 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/history/history.d.ts.map +1 -1
- package/dist/types/entities/plugin/plugin.d.ts +2 -41
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +7 -30
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/project/project.d.ts +9 -0
- package/dist/types/entities/project/project.d.ts.map +1 -0
- package/dist/types/entities/response/response.d.ts +21 -57
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/exports.d.ts +4 -22
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +11 -13
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +184 -381
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +10 -0
- package/dist/types/ping.d.ts.map +1 -0
- package/dist/types/plugins/create-experience/create-experience.d.ts +44 -119
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/index.d.ts +2 -2
- package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +2 -3
- 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/experience-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts +6 -0
- package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/history-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/plugin.d.ts +1 -2
- package/dist/types/plugins/history-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts +6 -0
- package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts +3 -0
- package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/index.d.ts +2 -0
- package/dist/types/plugins/shopify/index.d.ts.map +1 -0
- package/dist/types/plugins/shopify/plugin.d.ts +3 -0
- package/dist/types/plugins/shopify/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/shopify.d.ts +28 -0
- package/dist/types/plugins/shopify/shopify.d.ts.map +1 -0
- package/dist/types/plugins/single-page-app/plugin.d.ts +2 -2
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/server/index.d.ts +3 -18
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/utils/dom.d.ts +6 -4
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +38 -83
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +2 -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/indexed-db.d.ts +1 -2
- package/dist/types/utils/indexed-db.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts +1 -2
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts +3 -0
- package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts.map +1 -0
- 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 +2 -3
- package/dist/types/utils/nodes.d.ts.map +1 -1
- package/dist/types/utils/object.d.ts +8 -0
- package/dist/types/utils/object.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts +3 -33
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/dist/types/utils/search-params.d.ts.map +1 -1
- package/dist/types/utils/state-snaphot.d.ts +16 -0
- package/dist/types/utils/state-snaphot.d.ts.map +1 -0
- package/dist/types/utils/storage.d.ts +11 -374
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +0 -87
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/package.json +49 -182
- package/dist/.tsbuildinfo +0 -1
- package/dist/api-DbMJli3H.js +0 -22
- package/dist/api-qiqq8lgz.cjs +0 -1
- package/dist/cjs/form/index.js +0 -1
- package/dist/cjs/plugins/dom-observer/index.js +0 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +0 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +0 -1
- package/dist/cjs/plugins/telemetry/index.js +0 -1
- package/dist/cjs/plugins/web-components/index.js +0 -1
- package/dist/cjs/preview/index.js +0 -1
- package/dist/docs/_root.css +0 -101
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
- package/dist/docs/explanation/content-references.md +0 -99
- package/dist/docs/explanation/feature-flag-allocation.md +0 -218
- package/dist/docs/explanation/how-picked-works.md +0 -124
- package/dist/docs/explanation/how-pickedql-works.md +0 -76
- package/dist/docs/explanation/pages-and-flows.md +0 -64
- package/dist/docs/explanation/the-content-model.md +0 -87
- package/dist/docs/explanation/the-two-apis.md +0 -68
- package/dist/docs/explanation/why-server-side-rendering.md +0 -76
- package/dist/docs/explanation/workspaces-and-versions.md +0 -71
- package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
- package/dist/docs/how-to/analytics/index.md +0 -316
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
- package/dist/docs/how-to/authenticate-the-cli.md +0 -97
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
- package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
- package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
- package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
- package/dist/docs/how-to/build-a-flow.md +0 -83
- package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
- package/dist/docs/how-to/create-a-content-entry.md +0 -48
- package/dist/docs/how-to/create-a-project.md +0 -29
- package/dist/docs/how-to/create-an-experience.md +0 -42
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
- package/dist/docs/how-to/define-a-page-layout.md +0 -46
- package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
- package/dist/docs/how-to/install-the-gtm-template.md +0 -84
- package/dist/docs/how-to/install-the-sdk.md +0 -93
- package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
- package/dist/docs/how-to/invite-and-remove-members.md +0 -34
- package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
- package/dist/docs/how-to/preview-a-workspace.md +0 -28
- package/dist/docs/how-to/publish-a-workspace.md +0 -30
- package/dist/docs/how-to/read-a-feature-flag.md +0 -113
- package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
- package/dist/docs/how-to/register-a-component.md +0 -55
- package/dist/docs/how-to/register-an-action-handler.md +0 -67
- package/dist/docs/how-to/render-a-step-form.md +0 -131
- package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
- package/dist/docs/how-to/reuse-a-section.md +0 -53
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
- package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
- package/dist/docs/how-to/run-an-ab-test.md +0 -49
- package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
- package/dist/docs/how-to/server-render-a-page.md +0 -81
- package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
- package/dist/docs/how-to/set-up-mfa.md +0 -69
- package/dist/docs/how-to/switch-workspaces.md +0 -122
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
- package/dist/docs/how-to/validate-a-field.md +0 -52
- package/dist/docs/how-to/write-a-condition.md +0 -45
- package/dist/docs/how-to/write-a-predicate.md +0 -60
- package/dist/docs/index.md +0 -59
- package/dist/docs/reference/dashboard/actions.mdx +0 -53
- package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
- package/dist/docs/reference/dashboard/conditions.mdx +0 -42
- package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
- package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
- package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
- package/dist/docs/reference/dashboard/content/models.mdx +0 -108
- package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
- package/dist/docs/reference/dashboard/experiences.mdx +0 -51
- package/dist/docs/reference/dashboard/features.mdx +0 -154
- package/dist/docs/reference/dashboard/fields.mdx +0 -106
- package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
- package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
- package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
- package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
- package/dist/docs/reference/dashboard/projects.mdx +0 -44
- package/dist/docs/reference/dashboard/reports.mdx +0 -43
- package/dist/docs/reference/dashboard/steps.mdx +0 -37
- package/dist/docs/reference/dashboard/team-management.md +0 -29
- package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
- package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
- package/dist/docs/reference/delivery-api/experience-content.md +0 -152
- package/dist/docs/reference/delivery-api/index.md +0 -45
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
- package/dist/docs/reference/delivery-api/project-config.md +0 -65
- package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
- package/dist/docs/reference/glossary.md +0 -181
- package/dist/docs/reference/management-api/authentication.md +0 -74
- package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
- package/dist/docs/reference/management-api/error-handling.md +0 -233
- package/dist/docs/reference/management-api/pagination.md +0 -192
- package/dist/docs/reference/pickedql/data-sources.md +0 -174
- package/dist/docs/reference/pickedql/dimensions.md +0 -103
- package/dist/docs/reference/pickedql/filtering.md +0 -64
- package/dist/docs/reference/pickedql/index.md +0 -18
- package/dist/docs/reference/pickedql/schema.md +0 -172
- package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
- package/dist/docs/reference/sdk/actions.md +0 -30
- package/dist/docs/reference/sdk/analytics-events.md +0 -445
- package/dist/docs/reference/sdk/conditions.md +0 -147
- package/dist/docs/reference/sdk/content-security-policy.md +0 -21
- package/dist/docs/reference/sdk/content.md +0 -213
- package/dist/docs/reference/sdk/experiences.md +0 -51
- package/dist/docs/reference/sdk/features.md +0 -256
- package/dist/docs/reference/sdk/fields.md +0 -255
- package/dist/docs/reference/sdk/index.md +0 -68
- package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
- package/dist/docs/reference/sdk/plugins/index.md +0 -29
- package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
- package/dist/docs/reference/sdk/predicates.md +0 -43
- package/dist/docs/reference/sdk/ssr/index.md +0 -33
- package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
- package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
- package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
- package/dist/docs/reference/sdk/steps.md +0 -86
- package/dist/docs/reference/sdk/type-generation.md +0 -196
- package/dist/docs/reference/tools/chrome-extension.md +0 -16
- package/dist/docs/reference/tools/cli.md +0 -146
- package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
- package/dist/docs/reference/tools/mcp.md +0 -90
- package/dist/docs/reference/tools/vite-plugin.md +0 -163
- package/dist/docs/tutorials/first-api-call.md +0 -228
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
- package/dist/docs/tutorials/first-experience.mdx +0 -254
- package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
- package/dist/dom-BqcToNL0.js +0 -82
- package/dist/dom-DlLH3FxV.cjs +0 -1
- package/dist/emit-D-tLiWL1.cjs +0 -1
- package/dist/emit-Ds2EG7CB.js +0 -14
- package/dist/esm/form/index.js +0 -565
- package/dist/esm/plugins/dom-observer/index.js +0 -87
- package/dist/esm/plugins/dynamic-experiences/index.js +0 -5
- package/dist/esm/plugins/experience-browser-storage/index.js +0 -38
- package/dist/esm/plugins/history-browser-storage/index.js +0 -26
- package/dist/esm/plugins/responses-browser-storage/index.js +0 -71
- package/dist/esm/plugins/responses-indexeddb/index.js +0 -89
- package/dist/esm/plugins/telemetry/index.js +0 -100
- package/dist/esm/plugins/web-components/index.js +0 -19
- package/dist/esm/preview/index.js +0 -2
- package/dist/experience-instance-DGk11d8a.js +0 -563
- package/dist/experience-instance-Dej3P1sE.cjs +0 -1
- package/dist/id-Bo4RBeOs.js +0 -4
- package/dist/id-Js-62re-.cjs +0 -1
- package/dist/inert-script-report-B_bMPRzp.js +0 -18
- package/dist/inert-script-report-ijRHPtcY.cjs +0 -1
- package/dist/logger-CSTvAyyB.cjs +0 -1
- package/dist/logger-DMN6TxJJ.js +0 -4
- package/dist/object-BUDGxEqy.js +0 -25
- package/dist/object-CIkt7Fkr.cjs +0 -1
- package/dist/plugin-BcLaCLm1.cjs +0 -1
- package/dist/plugin-De_BJSwE.js +0 -194
- package/dist/preview-channel-CSr96XAo.js +0 -98
- package/dist/preview-channel-Cx0e6fye.cjs +0 -1
- package/dist/protocol-Bb_vpLKE.cjs +0 -1
- package/dist/protocol-C5KkkiZc.js +0 -84
- package/dist/provider-C_9u0yGJ.cjs +0 -1
- package/dist/provider-ovM-CBX_.js +0 -98
- package/dist/registry-C1t8l3t9.cjs +0 -1
- package/dist/registry-CXZv0uLg.js +0 -18
- package/dist/rules-logic-CGZIYgAI.cjs +0 -1
- package/dist/rules-logic-HesIUCu6.js +0 -13
- package/dist/storage-1MW3-_As.js +0 -103
- package/dist/storage-DUw9UJ2h.cjs +0 -1
- package/dist/supports-CO9bJGNl.js +0 -92
- package/dist/supports-DBzjGaWD.cjs +0 -1
- package/dist/types/data-source/api.d.ts +0 -60
- package/dist/types/data-source/api.d.ts.map +0 -1
- package/dist/types/data-source/provider.d.ts +0 -103
- package/dist/types/data-source/provider.d.ts.map +0 -1
- package/dist/types/data-source/registry.d.ts +0 -26
- package/dist/types/data-source/registry.d.ts.map +0 -1
- package/dist/types/data-source/request-observer.d.ts +0 -62
- package/dist/types/data-source/request-observer.d.ts.map +0 -1
- package/dist/types/data-source/virtual-data.d.ts +0 -19
- package/dist/types/data-source/virtual-data.d.ts.map +0 -1
- package/dist/types/entities/action/action.d.ts +0 -85
- package/dist/types/entities/action/action.d.ts.map +0 -1
- package/dist/types/entities/component/lazyComponent.d.ts +0 -11
- package/dist/types/entities/component/lazyComponent.d.ts.map +0 -1
- package/dist/types/entities/condition/condition.d.ts +0 -29
- package/dist/types/entities/condition/condition.d.ts.map +0 -1
- package/dist/types/entities/content/content.d.ts +0 -53
- package/dist/types/entities/content/content.d.ts.map +0 -1
- package/dist/types/entities/content/reference.d.ts +0 -101
- package/dist/types/entities/content/reference.d.ts.map +0 -1
- package/dist/types/entities/field/policies.d.ts +0 -35
- package/dist/types/entities/field/policies.d.ts.map +0 -1
- package/dist/types/entities/response/response-validation.d.ts +0 -75
- package/dist/types/entities/response/response-validation.d.ts.map +0 -1
- package/dist/types/entities/session/session.d.ts +0 -46
- package/dist/types/entities/session/session.d.ts.map +0 -1
- package/dist/types/entities/step/step.d.ts +0 -56
- package/dist/types/entities/step/step.d.ts.map +0 -1
- package/dist/types/form/build-responses.d.ts +0 -18
- package/dist/types/form/build-responses.d.ts.map +0 -1
- package/dist/types/form/create-field-evaluator.d.ts +0 -28
- package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
- package/dist/types/form/create-field-validation.d.ts +0 -60
- package/dist/types/form/create-field-validation.d.ts.map +0 -1
- package/dist/types/form/create-form.d.ts +0 -153
- package/dist/types/form/create-form.d.ts.map +0 -1
- package/dist/types/form/create-submit-pipeline.d.ts +0 -116
- package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
- package/dist/types/form/get-step-fields.d.ts +0 -19
- package/dist/types/form/get-step-fields.d.ts.map +0 -1
- package/dist/types/form/index.d.ts +0 -11
- package/dist/types/form/index.d.ts.map +0 -1
- package/dist/types/lifecycle/condition-selection.d.ts +0 -146
- package/dist/types/lifecycle/condition-selection.d.ts.map +0 -1
- package/dist/types/lifecycle/lifecycle.d.ts +0 -48
- package/dist/types/lifecycle/lifecycle.d.ts.map +0 -1
- package/dist/types/lifecycle/rules-logic.d.ts +0 -25
- package/dist/types/lifecycle/rules-logic.d.ts.map +0 -1
- package/dist/types/lifecycle/state-snapshot.d.ts +0 -38
- package/dist/types/lifecycle/state-snapshot.d.ts.map +0 -1
- package/dist/types/plugins/dom-observer/index.d.ts +0 -3
- package/dist/types/plugins/dom-observer/index.d.ts.map +0 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +0 -50
- package/dist/types/plugins/dom-observer/plugin.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/hash.d.ts +0 -105
- package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts +0 -7
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +0 -49
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +0 -45
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +0 -1
- package/dist/types/plugins/experience-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +0 -7
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/history-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +0 -18
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +0 -3
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/emit.d.ts +0 -18
- package/dist/types/plugins/telemetry/emit.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/index.d.ts +0 -4
- package/dist/types/plugins/telemetry/index.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/plugin-summary.d.ts +0 -10
- package/dist/types/plugins/telemetry/plugin-summary.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +0 -45
- package/dist/types/plugins/telemetry/plugin.d.ts.map +0 -1
- package/dist/types/plugins/web-components/index.d.ts +0 -2
- package/dist/types/plugins/web-components/index.d.ts.map +0 -1
- package/dist/types/plugins/web-components/plugin.d.ts +0 -4
- package/dist/types/plugins/web-components/plugin.d.ts.map +0 -1
- package/dist/types/preview/index.d.ts +0 -18
- package/dist/types/preview/index.d.ts.map +0 -1
- package/dist/types/preview-bridge/index.d.ts +0 -14
- package/dist/types/preview-bridge/index.d.ts.map +0 -1
- package/dist/types/preview-channel.d.ts +0 -16
- package/dist/types/preview-channel.d.ts.map +0 -1
- package/dist/types/preview-receiver/apply-ops.d.ts +0 -32
- package/dist/types/preview-receiver/apply-ops.d.ts.map +0 -1
- package/dist/types/preview-receiver/index.d.ts +0 -32
- package/dist/types/preview-receiver/index.d.ts.map +0 -1
- package/dist/types/preview-receiver/protocol.d.ts +0 -69
- package/dist/types/preview-receiver/protocol.d.ts.map +0 -1
- package/dist/types/schema-registry.d.ts +0 -206
- package/dist/types/schema-registry.d.ts.map +0 -1
- package/dist/types/server/serialize.d.ts +0 -87
- package/dist/types/server/serialize.d.ts.map +0 -1
- package/dist/types/typed-content.d.ts +0 -17
- package/dist/types/typed-content.d.ts.map +0 -1
- package/dist/types/utils/client-telemetry.d.ts +0 -25
- package/dist/types/utils/client-telemetry.d.ts.map +0 -1
- package/dist/types/utils/content-path.d.ts +0 -37
- package/dist/types/utils/content-path.d.ts.map +0 -1
- package/dist/types/utils/html-asset-value.d.ts +0 -20
- package/dist/types/utils/html-asset-value.d.ts.map +0 -1
- package/dist/types/utils/inert-script-report.d.ts +0 -40
- package/dist/types/utils/inert-script-report.d.ts.map +0 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +0 -25
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts.map +0 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +0 -17
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts.map +0 -1
- package/dist/types/utils/picked-config.d.ts +0 -39
- package/dist/types/utils/picked-config.d.ts.map +0 -1
- package/dist/types/utils/preview-session.d.ts +0 -12
- package/dist/types/utils/preview-session.d.ts.map +0 -1
- package/dist/types/utils/rehydrate-scripts.d.ts +0 -50
- package/dist/types/utils/rehydrate-scripts.d.ts.map +0 -1
- package/dist/types/utils/render-string.d.ts +0 -24
- package/dist/types/utils/render-string.d.ts.map +0 -1
- package/dist/types/utils/user-timing.d.ts +0 -21
- package/dist/types/utils/user-timing.d.ts.map +0 -1
- package/dist/version-BvLZaTMC.cjs +0 -1
- package/dist/version-VvasRUfR.js +0 -256
- /package/dist/types/plugins/{experience-browser-storage → experience-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-browser-storage → responses-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-indexeddb → responses-indexeddb-plugin}/index.d.ts +0 -0
package/dist/types/picked.d.ts
CHANGED
|
@@ -1,433 +1,236 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { type StateSnapshot } from './lifecycle/state-snapshot';
|
|
11
|
-
import { type EvaluateRuleLogicParams } from './lifecycle/rules-logic';
|
|
12
|
-
import { type ConditionResults } from './lifecycle/condition-selection';
|
|
13
|
-
import { type LifecycleStage } from './lifecycle/lifecycle';
|
|
14
|
-
import type { Predicate } from './entities/predicate/predicate';
|
|
15
|
-
import type { Feature } from './entities/feature/feature';
|
|
16
|
-
import { type EventBusPayload, type EventHistoryStore } from './utils/events';
|
|
17
|
-
import type { Field } from './entities/field/field';
|
|
18
|
-
import type { ExperienceStep } from './entities/step/step';
|
|
19
|
-
import type { Content, ContentDataPatch } from './entities/content/content';
|
|
20
|
-
import type { ContentLoader } from './plugins/dynamic-experiences/types';
|
|
21
|
-
import type { Action } from './entities/action/action';
|
|
22
|
-
import { type Condition } from './entities/condition/condition';
|
|
23
|
-
import { type StartTiming } from './utils/user-timing';
|
|
24
|
-
import { type ClientTelemetry } from './utils/client-telemetry';
|
|
25
|
-
import type { SessionEntity } from './entities/session/session';
|
|
26
|
-
/**
|
|
27
|
-
* Provenance metadata describing where the Picked client's project config and
|
|
28
|
-
* content came from. Set by `dynamicExperiencesPlugin` when the Vite plugin's
|
|
29
|
-
* virtual data module is available; remains `null` otherwise.
|
|
30
|
-
*/
|
|
31
|
-
export interface PickedDataSource {
|
|
32
|
-
/** `'build'` when build-mode prefetch JSON was used, `'dev'` when the dev-mode runtime fetch was used. */
|
|
33
|
-
mode: 'dev' | 'build';
|
|
34
|
-
/** ISO 8601 timestamp from the manifest. `null` in dev mode where no manifest is written. */
|
|
35
|
-
fetchedAt: string | null;
|
|
36
|
-
/** The `versionId` recorded by the source, when known. */
|
|
37
|
-
projectVersionId: string | null;
|
|
38
|
-
/** The `workspaceId` recorded by the source, when known. */
|
|
39
|
-
workspaceId: string | null;
|
|
40
|
-
}
|
|
1
|
+
import { Experience } from './entities/experience/experience';
|
|
2
|
+
import { Plugin, PluginConfigIndex } from './entities/plugin/plugin';
|
|
3
|
+
import { CreateClientOptions } from './client';
|
|
4
|
+
import { AdaptableComponents, AdaptedComponent } from './entities/component/component';
|
|
5
|
+
import { Framework } from './entities/framework/framework';
|
|
6
|
+
import { StateSnapshot } from './utils/state-snaphot';
|
|
7
|
+
import { Predicate } from './entities/predicate/predicate';
|
|
8
|
+
import { Feature } from './entities/feature/feature';
|
|
9
|
+
import { Field } from './entities/field/field';
|
|
41
10
|
export declare class Picked {
|
|
42
|
-
static readonly logger:
|
|
11
|
+
static readonly logger: (level: "log" | "warn" | "info" | "error", ...args: Parameters<Console["log"]>) => void;
|
|
43
12
|
private readonly options;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
dataSource: PickedDataSource | null;
|
|
50
|
-
/**
|
|
51
|
-
* `versionId` of the SSR snapshot this client was seeded from, set by the framework
|
|
52
|
-
* providers' `seedFromSnapshot`. `null` when no snapshot was seeded — a browser-only client,
|
|
53
|
-
* or a route that rendered without one.
|
|
54
|
-
*/
|
|
55
|
-
seededVersionId: string | null;
|
|
56
|
-
/**
|
|
57
|
-
* Set when a resolved project config disagrees with the seeded snapshot's `versionId`. The
|
|
58
|
-
* snapshot stays authoritative (it is what the server rendered the markup from) and the
|
|
59
|
-
* resolved config is dropped, so this records the divergence rather than hiding it.
|
|
60
|
-
*/
|
|
61
|
-
versionSkew: {
|
|
62
|
-
seeded: string;
|
|
63
|
-
resolved: string;
|
|
64
|
-
} | null;
|
|
65
|
-
/**
|
|
66
|
-
* Content fetcher selected by `dynamicExperiencesPlugin`'s resolution chain. Called
|
|
67
|
-
* by each experience's `prepareExperienceContentFx` (fired in parallel with
|
|
68
|
-
* `initialiseFx` by the per-experience sample graph). `undefined` when no plugin
|
|
69
|
-
* has registered one yet.
|
|
70
|
-
*/
|
|
71
|
-
contentLoader?: ContentLoader;
|
|
72
|
-
/**
|
|
73
|
-
* Origins allowed to push live-preview content patches into this page, issued by the API on the
|
|
74
|
-
* preview surface and set by `dynamicExperiencesPlugin`. `null` until the project config
|
|
75
|
-
* resolves, and on every non-preview surface — the preview receiver treats that as "trust
|
|
76
|
-
* nobody" and stays closed.
|
|
77
|
-
*/
|
|
78
|
-
previewEmbedderOrigins: string[] | null;
|
|
79
|
-
/** Config of every registered plugin, keyed by name in registration order. */
|
|
80
|
-
readonly plugins: PluginConfigIndex;
|
|
81
|
-
/** This client's telemetry hooks. */
|
|
82
|
-
readonly telemetry: ClientTelemetry;
|
|
83
|
-
private readonly dataProviders;
|
|
84
|
-
readonly eventBus: EventCallable<EventBusPayload>;
|
|
85
|
-
readonly events: EventHistoryStore;
|
|
13
|
+
isReady: boolean;
|
|
14
|
+
private project?;
|
|
15
|
+
private readonly plugins;
|
|
16
|
+
readonly eventBus: import('effector').EventCallable<import('.').EventBusPayload>;
|
|
17
|
+
readonly organizationId: string;
|
|
86
18
|
readonly projectId: string;
|
|
87
19
|
readonly apiUrl: string;
|
|
88
|
-
readonly
|
|
89
|
-
readonly documentationSiteUrl: string;
|
|
90
|
-
readonly session: SessionEntity;
|
|
91
|
-
/** This client's User Timing entries for its own start chain. */
|
|
92
|
-
readonly performance: StartTiming;
|
|
93
|
-
readonly searchParams: import(".").PickedSearchParams;
|
|
20
|
+
readonly searchParams: import('./utils/search-params').PickedSearchParams;
|
|
94
21
|
readonly history: {
|
|
95
|
-
push: EventCallable<{
|
|
22
|
+
push: import('effector').EventCallable<{
|
|
96
23
|
experienceId: string;
|
|
97
|
-
node: import(
|
|
24
|
+
node: import('.').ExperienceNode;
|
|
98
25
|
}>;
|
|
99
|
-
replace: EventCallable<{
|
|
26
|
+
replace: import('effector').EventCallable<{
|
|
100
27
|
experienceId: string;
|
|
101
|
-
node: import(
|
|
28
|
+
node: import('.').ExperienceNode;
|
|
102
29
|
}>;
|
|
103
|
-
back: EventCallable<{
|
|
30
|
+
back: import('effector').EventCallable<{
|
|
104
31
|
experienceId?: string;
|
|
105
32
|
}>;
|
|
106
|
-
restore: EventCallable<{
|
|
107
|
-
entries: import(
|
|
33
|
+
restore: import('effector').EventCallable<{
|
|
34
|
+
entries: import('.').HistoryEntry[];
|
|
108
35
|
}>;
|
|
109
|
-
entriesStore: Store<import(
|
|
36
|
+
entriesStore: import('effector').Store<import('.').HistoryEntry[]>;
|
|
110
37
|
};
|
|
111
38
|
readonly components: {
|
|
112
|
-
register:
|
|
113
|
-
|
|
114
|
-
component: AdaptedComponent;
|
|
115
|
-
}>;
|
|
116
|
-
getByName: (name: string) => Store<{
|
|
39
|
+
register: (name: string, component: AdaptedComponent) => void;
|
|
40
|
+
getByName: (name: string) => import('effector').Store<{
|
|
117
41
|
name: string;
|
|
118
42
|
component: AdaptedComponent;
|
|
119
43
|
} | undefined>;
|
|
120
|
-
listStore: Store<{
|
|
44
|
+
listStore: import('effector').Store<{
|
|
121
45
|
name: string;
|
|
122
46
|
component: AdaptedComponent<string, unknown>;
|
|
123
|
-
frameworkStore: Store<Framework | undefined>;
|
|
47
|
+
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
124
48
|
}[]>;
|
|
125
49
|
};
|
|
126
50
|
readonly experienceInstances: {
|
|
127
|
-
spawn: (experience: import(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
51
|
+
spawn: (experience: import('.').ExperienceStore, target: HTMLElement) => void;
|
|
52
|
+
getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
|
|
53
|
+
experienceId: string;
|
|
54
|
+
configStore: import('effector').Store<{
|
|
55
|
+
type: string;
|
|
56
|
+
name: string;
|
|
57
|
+
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
58
|
+
targetSelectors: import('.').ExperienceTarget[];
|
|
59
|
+
}>;
|
|
60
|
+
target: HTMLElement | undefined;
|
|
61
|
+
componentStore: import('effector').Store<{
|
|
62
|
+
name: string;
|
|
63
|
+
component: AdaptedComponent<string, unknown>;
|
|
64
|
+
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
65
|
+
} | undefined>;
|
|
66
|
+
stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
|
|
67
|
+
isOpenStore: import('effector').StoreWritable<boolean>;
|
|
68
|
+
open: import('effector').EventCallable<void>;
|
|
69
|
+
close: import('effector').EventCallable<void>;
|
|
70
|
+
toggleOpen: import('effector').EventCallable<void>;
|
|
71
|
+
setOpen: import('effector').EventCallable<boolean>;
|
|
72
|
+
treeStore: import('effector').Store<{
|
|
73
|
+
steps: import('.').ExperienceStep[];
|
|
74
|
+
nodes: import('.').ExperienceNode[];
|
|
75
|
+
edges: import('.').ExperienceEdge[];
|
|
76
|
+
conditionals: import('.').ExperienceConditional[];
|
|
77
|
+
}>;
|
|
78
|
+
currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
|
|
79
|
+
currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
|
|
80
|
+
nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
|
|
81
|
+
stepsToOriginStore: import('effector').Store<number[]>;
|
|
82
|
+
stepsToLeafStore: import('effector').Store<number[]>;
|
|
83
|
+
goToNextStep: import('effector').EventCallable<void>;
|
|
84
|
+
goToPreviousStep: import('effector').EventCallable<void>;
|
|
85
|
+
goToStepById: import('effector').EventCallable<string>;
|
|
86
|
+
stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
|
|
87
|
+
}[]>;
|
|
88
|
+
listStore: import('effector').Store<{
|
|
89
|
+
experienceId: string;
|
|
90
|
+
configStore: import('effector').Store<{
|
|
91
|
+
type: string;
|
|
92
|
+
name: string;
|
|
93
|
+
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
94
|
+
targetSelectors: import('.').ExperienceTarget[];
|
|
95
|
+
}>;
|
|
96
|
+
target: HTMLElement | undefined;
|
|
97
|
+
componentStore: import('effector').Store<{
|
|
98
|
+
name: string;
|
|
99
|
+
component: AdaptedComponent<string, unknown>;
|
|
100
|
+
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
101
|
+
} | undefined>;
|
|
102
|
+
stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
|
|
103
|
+
isOpenStore: import('effector').StoreWritable<boolean>;
|
|
104
|
+
open: import('effector').EventCallable<void>;
|
|
105
|
+
close: import('effector').EventCallable<void>;
|
|
106
|
+
toggleOpen: import('effector').EventCallable<void>;
|
|
107
|
+
setOpen: import('effector').EventCallable<boolean>;
|
|
108
|
+
treeStore: import('effector').Store<{
|
|
109
|
+
steps: import('.').ExperienceStep[];
|
|
110
|
+
nodes: import('.').ExperienceNode[];
|
|
111
|
+
edges: import('.').ExperienceEdge[];
|
|
112
|
+
conditionals: import('.').ExperienceConditional[];
|
|
113
|
+
}>;
|
|
114
|
+
currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
|
|
115
|
+
currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
|
|
116
|
+
nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
|
|
117
|
+
stepsToOriginStore: import('effector').Store<number[]>;
|
|
118
|
+
stepsToLeafStore: import('effector').Store<number[]>;
|
|
119
|
+
goToNextStep: import('effector').EventCallable<void>;
|
|
120
|
+
goToPreviousStep: import('effector').EventCallable<void>;
|
|
121
|
+
goToStepById: import('effector').EventCallable<string>;
|
|
122
|
+
stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
|
|
123
|
+
}[]>;
|
|
131
124
|
};
|
|
132
125
|
readonly experiences: {
|
|
133
|
-
register:
|
|
134
|
-
|
|
135
|
-
getById: (id: Experience['id']) => Store<import(".").ExperienceStore | undefined>;
|
|
136
|
-
getByKey: (key: Experience['key']) => Store<import(".").ExperienceStore | undefined>;
|
|
137
|
-
launch: Effect<{
|
|
138
|
-
key: string;
|
|
139
|
-
options?: LaunchExperienceOptions;
|
|
140
|
-
} | {
|
|
126
|
+
register: (experience: Experience) => void;
|
|
127
|
+
getById: (id: Experience["id"]) => import('effector').Store<{
|
|
141
128
|
id: string;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
129
|
+
configStore: import('effector').Store<{
|
|
130
|
+
type: string;
|
|
131
|
+
name: string;
|
|
132
|
+
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
133
|
+
targetSelectors: import('.').ExperienceTarget[];
|
|
134
|
+
}>;
|
|
135
|
+
treeStore: import('effector').Store<{
|
|
136
|
+
steps: import('.').ExperienceStep[];
|
|
137
|
+
nodes: import('.').ExperienceNode[];
|
|
138
|
+
edges: import('.').ExperienceEdge[];
|
|
139
|
+
conditionals: import('.').ExperienceConditional[];
|
|
140
|
+
}>;
|
|
141
|
+
componentStore: import('effector').Store<{
|
|
142
|
+
name: string;
|
|
143
|
+
component: AdaptedComponent<string, unknown>;
|
|
144
|
+
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
145
|
+
} | undefined>;
|
|
146
|
+
merge: import('effector').EventCallable<{
|
|
147
|
+
experience: Partial<Experience>;
|
|
148
|
+
strategy: "override";
|
|
149
|
+
}>;
|
|
150
|
+
} | undefined>;
|
|
151
|
+
listStore: import('effector').Store<{
|
|
148
152
|
id: string;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
configStore: import('effector').Store<{
|
|
154
|
+
type: string;
|
|
155
|
+
name: string;
|
|
156
|
+
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
157
|
+
targetSelectors: import('.').ExperienceTarget[];
|
|
158
|
+
}>;
|
|
159
|
+
treeStore: import('effector').Store<{
|
|
160
|
+
steps: import('.').ExperienceStep[];
|
|
161
|
+
nodes: import('.').ExperienceNode[];
|
|
162
|
+
edges: import('.').ExperienceEdge[];
|
|
163
|
+
conditionals: import('.').ExperienceConditional[];
|
|
164
|
+
}>;
|
|
165
|
+
componentStore: import('effector').Store<{
|
|
166
|
+
name: string;
|
|
167
|
+
component: AdaptedComponent<string, unknown>;
|
|
168
|
+
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
169
|
+
} | undefined>;
|
|
170
|
+
merge: import('effector').EventCallable<{
|
|
171
|
+
experience: Partial<Experience>;
|
|
172
|
+
strategy: "override";
|
|
173
|
+
}>;
|
|
174
|
+
}[]>;
|
|
153
175
|
};
|
|
154
176
|
readonly frameworks: {
|
|
155
|
-
register:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}>;
|
|
159
|
-
getByName: (name: string) => Store<Framework | undefined>;
|
|
160
|
-
listStore: Store<Framework[]>;
|
|
177
|
+
register: (name: string, framework: Framework) => void;
|
|
178
|
+
getByName: (name: string) => import('effector').Store<Framework | undefined>;
|
|
179
|
+
listStore: import('effector').Store<Framework[]>;
|
|
161
180
|
};
|
|
162
181
|
readonly predicates: {
|
|
163
|
-
register:
|
|
182
|
+
register: (name: string, predicate: Predicate) => void;
|
|
183
|
+
getByName: (name: string) => import('effector').Store<{
|
|
164
184
|
name: string;
|
|
165
185
|
predicate: Predicate;
|
|
166
|
-
}>;
|
|
167
|
-
|
|
168
|
-
listStore: Store<{
|
|
186
|
+
} | undefined>;
|
|
187
|
+
listStore: import('effector').Store<{
|
|
169
188
|
name: string;
|
|
170
189
|
predicate: Predicate;
|
|
171
190
|
}[]>;
|
|
172
|
-
getEvokablePredicate: (predicateName: string) => Store<() => ReturnType<Predicate>>;
|
|
173
191
|
};
|
|
174
192
|
readonly features: {
|
|
175
|
-
register:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}>;
|
|
179
|
-
getById: (id: string) => Store<import(".").FeatureBucket | undefined>;
|
|
180
|
-
getByName: (name: string) => Store<import(".").FeatureIndexItem | undefined>;
|
|
181
|
-
listStore: Store<import(".").FeatureBucket[]>;
|
|
182
|
-
getEvokableFeature: (featureName: string) => Store<() => Promise<import(".").FeatureBucketValue>>;
|
|
183
|
-
getFeatureResult: <K extends string>(featureName: K) => Store<import(".").FeatureResult<import("./schema-registry").FeatureValueFor<K>> | undefined>;
|
|
184
|
-
};
|
|
185
|
-
readonly conditions: {
|
|
186
|
-
register: (condition: Condition) => void;
|
|
187
|
-
getById: (id: Condition['id']) => Store<Condition | null>;
|
|
188
|
-
getByKey: (key: Condition['key']) => Store<Condition | null>;
|
|
189
|
-
listStore: Store<Condition[]>;
|
|
190
|
-
indexStore: StoreWritable<{
|
|
191
|
-
[id: string]: Condition;
|
|
192
|
-
}>;
|
|
193
|
+
register: (id: string, feature: Feature) => void;
|
|
194
|
+
getByName: (name: string) => import('effector').Store<import('.').FeatureIndexItem | undefined>;
|
|
195
|
+
listStore: import('effector').Store<import('.').FeatureBucket[]>;
|
|
193
196
|
};
|
|
194
197
|
readonly fields: {
|
|
195
198
|
register: (field: Field) => void;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
listStore: Store<Field[]>;
|
|
200
|
-
getByName: (name: import(".").FieldBase['name']) => Store<Field | null>;
|
|
199
|
+
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
200
|
+
listStore: import('effector').Store<Field[]>;
|
|
201
|
+
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
201
202
|
};
|
|
202
203
|
readonly responses: {
|
|
203
|
-
register:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
clear: EventCallable<string>;
|
|
209
|
-
commit: <T extends import(".").CommitResponses>(responsesToCommit: T & import(".").ValidateResponses<T>) => Promise<{
|
|
210
|
-
errors: import(".").ValidationError[];
|
|
211
|
-
}>;
|
|
212
|
-
getResponsesToCommit: <T extends import(".").CommitResponses>(responsesToCommit: T & import(".").ValidateResponses<T>) => Promise<{
|
|
213
|
-
responsesToCommit: import(".").CommitResponses;
|
|
214
|
-
validationErrors: import(".").ValidationError[];
|
|
204
|
+
register: (fieldId: Field["id"], response: import('.').Response) => void;
|
|
205
|
+
clearAll: import('effector').EventCallable<void>;
|
|
206
|
+
clear: import('effector').EventCallable<string>;
|
|
207
|
+
commit: (responsesToCommit: import('.').CommitResponses) => Promise<{
|
|
208
|
+
errors: import('.').ValidationError[];
|
|
215
209
|
}>;
|
|
216
|
-
listStore: Store<{
|
|
217
|
-
|
|
218
|
-
value: import(
|
|
210
|
+
listStore: import('effector').Store<{
|
|
211
|
+
fieldId: string;
|
|
212
|
+
value: import('.').FieldValue | undefined;
|
|
219
213
|
}[]>;
|
|
220
|
-
getAllStore: Store<{
|
|
221
|
-
[
|
|
222
|
-
}>;
|
|
223
|
-
getByFieldId: (id: Field['id']) => Store<import(".").FieldValue>;
|
|
224
|
-
getByFieldKey: <K extends string>(key: K) => Store<import("./schema-registry").FieldValueFor<K>>;
|
|
225
|
-
getByFieldName: (fieldName: Field['name']) => Store<import(".").FieldValue>;
|
|
226
|
-
};
|
|
227
|
-
readonly steps: {
|
|
228
|
-
register: (step: ExperienceStep) => void;
|
|
229
|
-
getById: (id: ExperienceStep['id']) => Store<ExperienceStep | null>;
|
|
230
|
-
getByKey: (key: ExperienceStep['key']) => Store<ExperienceStep | null>;
|
|
231
|
-
listStore: Store<ExperienceStep[]>;
|
|
232
|
-
indexStore: StoreWritable<{
|
|
233
|
-
[id: string]: ExperienceStep;
|
|
234
|
-
}>;
|
|
235
|
-
};
|
|
236
|
-
readonly contents: {
|
|
237
|
-
register: (content: Content) => void;
|
|
238
|
-
patch: (id: string, apply: ContentDataPatch) => void;
|
|
239
|
-
getById: (id: Content['id']) => Store<Content | null>;
|
|
240
|
-
listStore: Store<Content[]>;
|
|
241
|
-
indexStore: StoreWritable<{
|
|
242
|
-
[id: string]: Content;
|
|
243
|
-
}>;
|
|
244
|
-
};
|
|
245
|
-
readonly actions: {
|
|
246
|
-
register: EventCallable<{
|
|
247
|
-
key: string;
|
|
248
|
-
action: Action;
|
|
214
|
+
getAllStore: import('effector').Store<{
|
|
215
|
+
[fieldId: string]: import('.').FieldValue;
|
|
249
216
|
}>;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
getEvokableAction: (actionKey: string, options?: {
|
|
253
|
-
experience: import(".").ExperienceInstance;
|
|
254
|
-
}) => Store<() => ReturnType<Action>>;
|
|
217
|
+
getByFieldId: (fieldId: Field["id"]) => import('effector').Store<import('.').FieldValue>;
|
|
218
|
+
getByFieldName: (fieldName: Field["name"]) => import('effector').Store<import('.').FieldValue>;
|
|
255
219
|
};
|
|
256
|
-
/**
|
|
257
|
-
* Memoized condition-evaluation results keyed by rule hash. Populated by the
|
|
258
|
-
* server `serialize` selection and the memoized evaluator (`evaluateConditionMemo`),
|
|
259
|
-
* and seeded on the client from the SSR snapshot so first paint reuses the server's
|
|
260
|
-
* selection without re-evaluating.
|
|
261
|
-
*/
|
|
262
|
-
readonly conditionResults: ConditionResults;
|
|
263
|
-
readonly stateSnapshotStore: Store<StateSnapshot>;
|
|
264
|
-
readonly evaluateRuleLogicFx: Effect<EvaluateRuleLogicParams, unknown, Error>;
|
|
265
|
-
/** Public trigger — fires the start chain. `await allSettled(client.start, { scope })` resolves once the chain has fully settled. */
|
|
266
|
-
readonly start: EventCallable<void>;
|
|
267
|
-
/** Reactive store of the readiness flag. */
|
|
268
|
-
readonly readyStore: StoreWritable<boolean>;
|
|
269
|
-
/** Reactive store of the precondition-gate result (`undefined` until `start` is fired). */
|
|
270
|
-
readonly preconditionPassedStore: StoreWritable<boolean | undefined>;
|
|
271
|
-
/** Reactive store of the condition-gate result (`undefined` until `start` is fired). */
|
|
272
|
-
readonly conditionPassedStore: StoreWritable<boolean | undefined>;
|
|
273
|
-
/** Reactive store of the current lifecycle stage. */
|
|
274
|
-
readonly lifecycleStageStore: StoreWritable<LifecycleStage>;
|
|
275
|
-
private readonly lifecycle;
|
|
276
|
-
/**
|
|
277
|
-
* Effect that interpolates a template string against the latest responses plus a caller-supplied context. Source is `responses.listStore` so renders are scope-aware and pick up the latest committed responses without `.getState()`.
|
|
278
|
-
*
|
|
279
|
-
* @example
|
|
280
|
-
* ```typescript
|
|
281
|
-
* const greeting = await client.renderStringFx({ template: 'Hi {{name}}', context: { name: 'Mae' } })
|
|
282
|
-
* ```
|
|
283
|
-
*/
|
|
284
|
-
readonly renderStringFx: Effect<{
|
|
285
|
-
template: string;
|
|
286
|
-
context?: Record<string, unknown>;
|
|
287
|
-
}, string, Error>;
|
|
288
220
|
constructor(options: CreateClientOptions);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
* Resolves this project's configuration.
|
|
300
|
-
*
|
|
301
|
-
* Reads the build-time bundle when one registered itself, and the Picked API otherwise. A
|
|
302
|
-
* preview token forces the API, because preview renders unpublished data no bundle can hold.
|
|
303
|
-
* Deduplicated per token, so several callers in one request cost one resolution.
|
|
304
|
-
*
|
|
305
|
-
* @param {object} [options] - Per-call resolution inputs.
|
|
306
|
-
* @param {string} [options.previewToken] - Preview token, forcing a live read.
|
|
307
|
-
* @param {AbortSignal} [options.signal] - Signal applied to an API read.
|
|
308
|
-
* @returns {Promise<ProjectConfig>} The project configuration.
|
|
309
|
-
* @throws {Error} When the configuration cannot be resolved from any source.
|
|
310
|
-
* @example
|
|
311
|
-
* const config = await client.getProjectConfig()
|
|
312
|
-
*/
|
|
313
|
-
getProjectConfig(options?: {
|
|
314
|
-
previewToken?: string;
|
|
315
|
-
signal?: AbortSignal;
|
|
316
|
-
}): Promise<ProjectConfig>;
|
|
317
|
-
/**
|
|
318
|
-
* Resolves one experience's CMS content, from the same source as the configuration.
|
|
319
|
-
*
|
|
320
|
-
* @param {{ id: string; key: string }} experience - The experience to resolve content for.
|
|
321
|
-
* @param {string} experience.id - Experience id, which keys bundled content.
|
|
322
|
-
* @param {string} experience.key - Experience key, for a content loader that prefers it.
|
|
323
|
-
* @param {object} [options] - Per-call resolution inputs.
|
|
324
|
-
* @param {string} [options.previewToken] - Preview token, forcing a live read.
|
|
325
|
-
* @param {AbortSignal} [options.signal] - Deadline for this call's API read, if it makes one.
|
|
326
|
-
* @returns {Promise<ExperienceContentResponse | null>} The content, or `null` when it has none.
|
|
327
|
-
* @example
|
|
328
|
-
* const content = await client.getExperienceContent({ id: 'exp_1', key: 'promo' })
|
|
329
|
-
*/
|
|
330
|
-
getExperienceContent(experience: {
|
|
331
|
-
id: string;
|
|
332
|
-
key: string;
|
|
333
|
-
}, options?: {
|
|
334
|
-
previewToken?: string;
|
|
335
|
-
signal?: AbortSignal;
|
|
336
|
-
}): Promise<ExperienceContentResponse | null>;
|
|
337
|
-
/**
|
|
338
|
-
* Lazily starts the preview channel when this frame is a live-preview session: the outbound
|
|
339
|
-
* bridge, which reports the frame's URL to the dashboard, and the inbound receiver, which applies
|
|
340
|
-
* the dashboard's content patches.
|
|
341
|
-
*
|
|
342
|
-
* Both load from a single dynamic `import()` so there is one code-split point and neither reaches
|
|
343
|
-
* production bundles. Failures are swallowed so client creation never depends on the preview
|
|
344
|
-
* channel, and the receiver refuses every message until the API issues an origin allowlist, so
|
|
345
|
-
* starting it before the project config resolves is safe.
|
|
346
|
-
*
|
|
347
|
-
* @returns {void} Nothing.
|
|
348
|
-
* @example
|
|
349
|
-
* this.maybeStartPreviewChannel()
|
|
350
|
-
*/
|
|
351
|
-
private maybeStartPreviewChannel;
|
|
352
|
-
registerFramework: (framework: Framework) => void;
|
|
353
|
-
registerComponent: (name: string, component: AdaptedComponent) => void;
|
|
354
|
-
registerPlugin: (plugin: Plugin) => void;
|
|
355
|
-
registerFeature: (name: string, feature: Feature) => void;
|
|
356
|
-
registerPredicate: (name: string, predicate: Predicate) => void;
|
|
357
|
-
registerCondition: (condition: Condition) => void;
|
|
358
|
-
registerField: (field: Field) => void;
|
|
359
|
-
registerStep: (step: ExperienceStep) => void;
|
|
360
|
-
registerContent: (content: Content) => void;
|
|
361
|
-
/**
|
|
362
|
-
* Applies path-addressed replacements to a registered content record, leaving every untouched
|
|
363
|
-
* branch of the blob shared by reference so only the affected subtree re-renders.
|
|
364
|
-
*
|
|
365
|
-
* A no-op when no record with `id` is registered — the record's base blob comes from
|
|
366
|
-
* `contentLoader`, and a patch that arrives first must not fabricate one.
|
|
367
|
-
*
|
|
368
|
-
* Takes a transform rather than a list of path ops so the path parser and the spine-rebuilding
|
|
369
|
-
* walk stay out of this module's import graph — they belong to the lazily-loaded preview channel.
|
|
370
|
-
* Build one with `applyContentOps` from `@picked/client/preview`.
|
|
371
|
-
*
|
|
372
|
-
* @param {string} id - The content record id to patch.
|
|
373
|
-
* @param {ContentDataPatch} apply - Transform producing the next `data` blob.
|
|
374
|
-
* @returns {void} Nothing.
|
|
375
|
-
* @example
|
|
376
|
-
* ```typescript
|
|
377
|
-
* client.patchContent('c1', (data) => ({ ...data, headline: 'Hello' }))
|
|
378
|
-
* ```
|
|
379
|
-
*/
|
|
380
|
-
patchContent: (id: string, apply: ContentDataPatch) => void;
|
|
381
|
-
registerAction: (key: string, action: Action) => void;
|
|
382
|
-
registerExperience: (experience: Experience) => void;
|
|
383
|
-
/**
|
|
384
|
-
* Launches an experience by ID.
|
|
385
|
-
*
|
|
386
|
-
* @param experienceId - The experience id to launch.
|
|
387
|
-
* @param options - Optional launch options.
|
|
388
|
-
* @example
|
|
389
|
-
* ```typescript
|
|
390
|
-
* await client.launchExperienceById('exp-1')
|
|
391
|
-
* ```
|
|
392
|
-
*/
|
|
393
|
-
launchExperienceById: (experienceId: string, options?: LaunchExperienceOptions) => Promise<void>;
|
|
394
|
-
/**
|
|
395
|
-
* Launches an experience by Key.
|
|
396
|
-
*
|
|
397
|
-
* @param experienceKey - The experience key to launch.
|
|
398
|
-
* @param options - Optional launch options.
|
|
399
|
-
* @example
|
|
400
|
-
* ```typescript
|
|
401
|
-
* await client.launchExperienceByKey('exp-1')
|
|
402
|
-
* ```
|
|
403
|
-
*/
|
|
404
|
-
launchExperienceByKey: (experienceKey: string, options?: LaunchExperienceOptions) => Promise<void>;
|
|
405
|
-
/**
|
|
406
|
-
* Opens an experience by ID.
|
|
407
|
-
*
|
|
408
|
-
* @param experienceId - The experience ID to open.
|
|
409
|
-
* @example
|
|
410
|
-
* ```typescript
|
|
411
|
-
* await client.openExperienceById('exp-1')
|
|
412
|
-
* ```
|
|
413
|
-
*/
|
|
414
|
-
openExperienceById: (experienceId: string) => Promise<void>;
|
|
415
|
-
/**
|
|
416
|
-
* Opens an experience by Key.
|
|
417
|
-
*
|
|
418
|
-
* @param experienceKey - The experience Key to open.
|
|
419
|
-
* @example
|
|
420
|
-
* ```typescript
|
|
421
|
-
* await client.openExperienceById('exp-1')
|
|
422
|
-
* ```
|
|
423
|
-
*/
|
|
424
|
-
openExperienceByKey: (experienceKey: string) => Promise<void>;
|
|
221
|
+
start(): void;
|
|
222
|
+
registerFramework(framework: Framework): void;
|
|
223
|
+
registerComponent(name: keyof AdaptableComponents, component: AdaptedComponent): void;
|
|
224
|
+
registerPlugin(plugin: Plugin): void;
|
|
225
|
+
registerFeature(name: string, feature: Feature): void;
|
|
226
|
+
registerPredicate(name: string, predicate: Predicate): void;
|
|
227
|
+
registerField(field: Field): void;
|
|
228
|
+
registerExperience(experience: Experience): void;
|
|
229
|
+
getStateSnapshot(): StateSnapshot;
|
|
230
|
+
launchExperienceById(experienceId: string): Promise<void>;
|
|
425
231
|
private setupPlugins;
|
|
426
232
|
private setupFeatures;
|
|
427
233
|
private setupPredicates;
|
|
428
|
-
|
|
429
|
-
private setupFields;
|
|
430
|
-
private setupComponents;
|
|
431
|
-
getPluginConfig: (pluginName: string) => PluginConfigIndex[string] | Record<string, unknown>;
|
|
234
|
+
getPluginConfig(pluginName: string): PluginConfigIndex[string] | Record<string, unknown>;
|
|
432
235
|
}
|
|
433
236
|
//# sourceMappingURL=picked.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EAIhB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,iBAAiB,EAAe,MAAM,0BAA0B,CAAA;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EAGtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAQnD,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,CAAC,MAAM,0FAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C,OAAO,UAAQ;IAEf,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAEhD,SAAgB,QAAQ,gEAAmB;IAC3C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB,QAAQ,CAAC,YAAY,qDAAoB;IAEzC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;MAAkB;IAElC,QAAQ,CAAC,UAAU;;;;;;;;;;;MAAyC;IAC5D,QAAQ,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkD;IAC9E,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA0C;IAC9D,QAAQ,CAAC,UAAU;;;;MAAyC;IAC5D,QAAQ,CAAC,UAAU;;;;;;;;;;MAAyC;IAC5D,QAAQ,CAAC,QAAQ;;;;MAAuB;IACxC,QAAQ,CAAC,MAAM;;;;;MAAqB;IACpC,QAAQ,CAAC,SAAS;;;;;;;;;;;;;;;;MAAwC;gBAE9C,OAAO,EAAE,mBAAmB;IAgBxC,KAAK,IAAI,IAAI;IA8Bb,iBAAiB,CAAC,SAAS,EAAE,SAAS;IAItC,iBAAiB,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,SAAS,EAAE,gBAAgB;IAI9E,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIpC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAI9C,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS;IAIpD,aAAa,CAAC,KAAK,EAAE,KAAK;IAI1B,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAQhD,gBAAgB,IAAI,aAAa;IAI3B,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB/D,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,aAAa;IA0CrB,OAAO,CAAC,eAAe;IAgBvB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGzF"}
|