@picked/client 0.0.1-dev.1789541668638 → 0.0.1-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/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 +739 -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 -160
- 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 +7 -17
- 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 +8 -19
- 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 +7 -31
- 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-C7q_7vxn.js +0 -22
- package/dist/api-Ctvh1qkk.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 -35
- 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-B9S6Yf0N.js +0 -711
- package/dist/experience-instance-D8rOg6We.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-ChafFq6S.js +0 -194
- package/dist/plugin-Dn25Gffy.cjs +0 -1
- 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-B8wvmeC8.js +0 -98
- package/dist/provider-BBLlQOjV.cjs +0 -1
- 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/node-tree/node-adjacency.d.ts +0 -50
- package/dist/types/utils/node-tree/node-adjacency.d.ts.map +0 -1
- package/dist/types/utils/node-tree/node-tree-index.d.ts +0 -57
- package/dist/types/utils/node-tree/node-tree-index.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-CLjPfmxk.cjs +0 -1
- package/dist/version-CPKulHMH.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
|
@@ -1,37 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { type EventCallable, type Store } from 'effector';
|
|
3
|
-
import type { Picked } from '../../picked';
|
|
4
|
-
import type { FeatureValueFor } from '../../schema-registry';
|
|
5
|
-
/** One arm of a feature, as published in the project config. */
|
|
6
|
-
export interface FeatureVariant {
|
|
7
|
-
/** Stable identity. `true` and `false` name the structural arms. */
|
|
8
|
-
key: string;
|
|
9
|
-
/** What the site receives when a visitor lands in this arm. */
|
|
10
|
-
value: boolean | string;
|
|
11
|
-
/** Share of traffic relative to the other arms, reduced by their greatest common divisor. */
|
|
12
|
-
weight: number;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* What a feature's arms serve, as published in the project config. A feature registered
|
|
16
|
-
* from SDK code carries neither field, so an absent pair means the shape is unknown.
|
|
17
|
-
*/
|
|
18
|
-
export interface FeatureShape {
|
|
19
|
-
/** What the feature's arms serve. */
|
|
20
|
-
valueType?: 'boolean' | 'text';
|
|
21
|
-
/** The arms a text feature serves. A boolean feature splits on `weight`. */
|
|
22
|
-
variants?: readonly FeatureVariant[];
|
|
23
|
-
}
|
|
24
|
-
export interface Feature extends FeatureShape {
|
|
1
|
+
export interface Feature {
|
|
25
2
|
key: string;
|
|
26
3
|
name: string;
|
|
27
4
|
decide: () => boolean | Promise<boolean> | string | Promise<string>;
|
|
28
5
|
storage?: 'local' | 'session';
|
|
29
|
-
/** Admin on/off flag from the Picked project config. Undefined for manually-registered features. */
|
|
30
|
-
enabled?: boolean;
|
|
31
|
-
/** Traffic-allocation percentage (0-100) from the Picked project config. Undefined for manually-registered features. */
|
|
32
|
-
weight?: number;
|
|
33
6
|
}
|
|
34
|
-
export type FeaturesStore = ReturnType<typeof
|
|
7
|
+
export type FeaturesStore = ReturnType<typeof createFeatureIndex>;
|
|
35
8
|
export interface FeatureIndexItem {
|
|
36
9
|
id: string;
|
|
37
10
|
feature: Feature & {
|
|
@@ -44,14 +17,10 @@ export interface ResolvedFeature {
|
|
|
44
17
|
key: string;
|
|
45
18
|
storage?: 'local' | 'session';
|
|
46
19
|
}
|
|
47
|
-
export interface FeatureBaseBucket
|
|
20
|
+
export interface FeatureBaseBucket {
|
|
48
21
|
name: string;
|
|
49
22
|
key: string;
|
|
50
23
|
id: string;
|
|
51
|
-
/** Admin on/off flag from the Picked project config. Undefined for manually-registered features. */
|
|
52
|
-
enabled?: boolean;
|
|
53
|
-
/** Traffic-allocation percentage (0-100) from the Picked project config. Undefined for manually-registered features. */
|
|
54
|
-
weight?: number;
|
|
55
24
|
}
|
|
56
25
|
export interface UnresolvedFeatureBucket extends FeatureBaseBucket {
|
|
57
26
|
isResolved: false;
|
|
@@ -68,91 +37,12 @@ export interface ResolvedFeatureBucket extends FeatureBaseBucket {
|
|
|
68
37
|
};
|
|
69
38
|
}
|
|
70
39
|
export type FeatureBucket = UnresolvedFeatureBucket | ResolvedFeatureBucket;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* @param {string | boolean} TValue - The value the feature resolves to.
|
|
76
|
-
*/
|
|
77
|
-
export interface FeatureResult<TValue extends string | boolean = string | boolean> {
|
|
78
|
-
id: string;
|
|
79
|
-
bucket: TValue;
|
|
80
|
-
}
|
|
81
|
-
/** The bucket an evokable feature answers with, or undefined while its feature is unregistered. */
|
|
82
|
-
export type FeatureBucketValue = boolean | string | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Reads a bucket back out of its stored text.
|
|
85
|
-
*
|
|
86
|
-
* Storage holds a bucket as raw text, so this is the inverse of the write: `'true'` and
|
|
87
|
-
* `'false'` are the two booleans and every other value is a named variant. A variant named
|
|
88
|
-
* literally `true` or `false` therefore comes back as a boolean.
|
|
89
|
-
*
|
|
90
|
-
* @param {string} value - Stored text, or the value side of a `?picked-feature=` override.
|
|
91
|
-
* @returns {boolean | string} The boolean bucket, or the variant name unchanged.
|
|
92
|
-
* @example
|
|
93
|
-
* ```typescript
|
|
94
|
-
* parseBucket('true') // true
|
|
95
|
-
* parseBucket('variant-a') // 'variant-a'
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
export declare function parseBucket(value: string): boolean | string;
|
|
99
|
-
/** A `?picked-feature=` override, split into the feature it names and the bucket it forces. */
|
|
100
|
-
export interface FeatureOverride {
|
|
101
|
-
id: string;
|
|
102
|
-
bucket: boolean | string;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Reads one `?picked-feature=<id>:<value>` parameter.
|
|
106
|
-
*
|
|
107
|
-
* Splits on the first colon: the text before it names the feature, and all the text
|
|
108
|
-
* after it is the bucket, colons included. `opening-hours:09:00-17:00` forces
|
|
109
|
-
* `09:00-17:00`. Feature and variant keys are lowercase letters, numbers and hyphens,
|
|
110
|
-
* which is what makes the first colon the boundary.
|
|
111
|
-
*
|
|
112
|
-
* @param {string} param - One `picked-feature` parameter value, without its key.
|
|
113
|
-
* @returns {FeatureOverride | null} The override, or null when the parameter names no feature or forces no value.
|
|
114
|
-
* @example
|
|
115
|
-
* ```typescript
|
|
116
|
-
* parseFeatureOverride('hero-layout:video-hero') // { id: 'hero-layout', bucket: 'video-hero' }
|
|
117
|
-
* parseFeatureOverride('opening-hours:09:00-17:00') // { id: 'opening-hours', bucket: '09:00-17:00' }
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
export declare function parseFeatureOverride(param: string): FeatureOverride | null;
|
|
121
|
-
declare const createFeatureIndexFactory: ({ client }: {
|
|
122
|
-
client: Picked;
|
|
123
|
-
}) => {
|
|
124
|
-
register: EventCallable<{
|
|
125
|
-
id: string;
|
|
126
|
-
feature: Feature;
|
|
127
|
-
}>;
|
|
128
|
-
getById: (id: string) => Store<FeatureBucket | undefined>;
|
|
129
|
-
getByName: (name: string) => Store<FeatureIndexItem | undefined>;
|
|
130
|
-
listStore: Store<FeatureBucket[]>;
|
|
131
|
-
getEvokableFeature: (featureName: string) => Store<() => Promise<FeatureBucketValue>>;
|
|
132
|
-
getFeatureResult: <K extends string>(featureName: K) => Store<FeatureResult<FeatureValueFor<K>> | undefined>;
|
|
40
|
+
declare const createFeatureIndexFactory: () => {
|
|
41
|
+
register: (id: string, feature: Feature) => void;
|
|
42
|
+
getByName: (name: string) => import('effector').Store<FeatureIndexItem | undefined>;
|
|
43
|
+
listStore: import('effector').Store<FeatureBucket[]>;
|
|
133
44
|
};
|
|
134
|
-
|
|
135
|
-
* Creates a feature index with lifecycle stores and registration logic.
|
|
136
|
-
*
|
|
137
|
-
* @template T - Factory parameter type.
|
|
138
|
-
* @param {T} params - Factory parameters including the client.
|
|
139
|
-
* @returns {ReturnType<typeof createFeatureIndexFactory>} The feature index with register, getById, getByName, listStore, getEvokableFeature, and getFeatureResult methods.
|
|
140
|
-
* @example
|
|
141
|
-
* ```ts
|
|
142
|
-
* const features = createFeatureIndex({ client })
|
|
143
|
-
* features.register('test-feature-1', { key: 'test', name: 'Test Feature', decide: () => true })
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
export declare function createFeatureIndex<T extends Parameters<typeof createFeatureIndexFactory>[0]>(params: T): ReturnType<typeof createFeatureIndexFactory>;
|
|
147
|
-
/**
|
|
148
|
-
* Convenience helper that dispatches `features.register` with object-payload shape.
|
|
149
|
-
*
|
|
150
|
-
* @param {string} name - Feature id.
|
|
151
|
-
* @param {Feature} feature - The feature config.
|
|
152
|
-
* @param {FeaturesStore} features - The features index.
|
|
153
|
-
* @example
|
|
154
|
-
* setupFeature('winter-sale', { key: 'v1', name: 'Winter sale', decide: () => true }, featuresIndex)
|
|
155
|
-
*/
|
|
45
|
+
export declare function createFeatureIndex(): ReturnType<typeof createFeatureIndexFactory>;
|
|
156
46
|
export declare const setupFeature: (name: string, feature: Feature, features: FeaturesStore) => void;
|
|
157
47
|
export {};
|
|
158
48
|
//# sourceMappingURL=feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/entities/feature/feature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/entities/feature/feature.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACnE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,OAAO,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,UAAU,EAAE,KAAK,CAAA;IACjB,SAAS,EAAE,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAA;CACnE;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,MAAM;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAC1D;AAED,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,qBAAqB,CAAA;AAK3E,QAAA,MAAM,yBAAyB;mBAkBP,MAAM,WAAW,OAAO,KAAG,IAAI;sBA0K5B,MAAM;;CAS/B,CAAA;AAEF,wBAAgB,kBAAkB,IAAI,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAEjF;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,SAAS,OAAO,EAAE,UAAU,aAAa,SAEnF,CAAA"}
|
|
@@ -1,129 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
import { type Store } from 'effector';
|
|
3
|
-
import type { LogicRule } from '../../logic-engine';
|
|
4
|
-
import { type FieldPolicies } from './policies';
|
|
1
|
+
import { LogicRule } from '../../logic-engine';
|
|
5
2
|
export type FieldsStore = ReturnType<typeof createFieldIndex>;
|
|
6
3
|
export type PrimitiveFieldValue = string | number | boolean | null;
|
|
7
|
-
export type
|
|
8
|
-
export interface
|
|
4
|
+
export type FieldValue = PrimitiveFieldValue | PrimitiveFieldValue[];
|
|
5
|
+
export interface FieldBase {
|
|
9
6
|
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
value: T;
|
|
13
|
-
condition?: LogicRule;
|
|
14
|
-
}
|
|
15
|
-
export type FieldOptionArray<T = FieldOptionValue> = FieldOption<T>[];
|
|
16
|
-
/**
|
|
17
|
-
* JSON-serializable value type for object fields.
|
|
18
|
-
* Recursively defines all valid JSON-serializable structures.
|
|
19
|
-
*/
|
|
20
|
-
export type JsonValue = string | number | boolean | null | {
|
|
21
|
-
[key: string]: JsonValue;
|
|
22
|
-
} | JsonValue[];
|
|
23
|
-
export type FieldValue = PrimitiveFieldValue | PrimitiveFieldValue[] | JsonValue | JsonValue[];
|
|
24
|
-
export interface FieldBase<TOptionValue = JsonValue> {
|
|
25
|
-
id: string;
|
|
26
|
-
/** Stable identifier used for lookups across API versions. */
|
|
27
|
-
key: string;
|
|
28
7
|
name: string;
|
|
29
8
|
label: string;
|
|
30
9
|
type: 'text' | 'number' | 'object' | 'boolean';
|
|
31
10
|
multiple: boolean;
|
|
32
11
|
required: boolean;
|
|
33
|
-
defaultValue
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
options?: FieldOptionArray<TOptionValue> | null;
|
|
12
|
+
defaultValue: FieldValue;
|
|
13
|
+
placeholder: string | null;
|
|
14
|
+
description: string | null;
|
|
15
|
+
helpText: string | null;
|
|
16
|
+
validation: LogicRule;
|
|
17
|
+
policies: {
|
|
18
|
+
doNotTrackValue?: boolean;
|
|
19
|
+
doNotStoreValue?: boolean;
|
|
20
|
+
};
|
|
21
|
+
options: {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
value: PrimitiveFieldValue;
|
|
25
|
+
}[] | null;
|
|
48
26
|
}
|
|
49
|
-
export interface FieldTextSingular extends FieldBase
|
|
27
|
+
export interface FieldTextSingular extends FieldBase {
|
|
50
28
|
type: 'text';
|
|
51
29
|
multiple: false;
|
|
52
|
-
defaultValue
|
|
30
|
+
defaultValue: string | null;
|
|
31
|
+
options: {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}[] | null;
|
|
53
36
|
}
|
|
54
|
-
export interface FieldTextMultiple extends FieldBase
|
|
37
|
+
export interface FieldTextMultiple extends FieldBase {
|
|
55
38
|
type: 'text';
|
|
56
39
|
multiple: true;
|
|
57
|
-
defaultValue
|
|
40
|
+
defaultValue: string[] | null;
|
|
41
|
+
options: {
|
|
42
|
+
id: string;
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}[] | null;
|
|
58
46
|
}
|
|
59
|
-
export interface FieldNumberSingular extends FieldBase
|
|
47
|
+
export interface FieldNumberSingular extends FieldBase {
|
|
60
48
|
type: 'number';
|
|
61
49
|
multiple: false;
|
|
62
|
-
defaultValue
|
|
50
|
+
defaultValue: number | null;
|
|
51
|
+
options: {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
value: number;
|
|
55
|
+
}[] | null;
|
|
63
56
|
}
|
|
64
|
-
export interface FieldNumberMultiple extends FieldBase
|
|
57
|
+
export interface FieldNumberMultiple extends FieldBase {
|
|
65
58
|
type: 'number';
|
|
66
59
|
multiple: true;
|
|
67
|
-
defaultValue
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
export interface FieldObjectMultiple extends FieldBase<JsonValue> {
|
|
75
|
-
type: 'object';
|
|
76
|
-
multiple: true;
|
|
77
|
-
defaultValue?: JsonValue[];
|
|
60
|
+
defaultValue: number[] | null;
|
|
61
|
+
options: {
|
|
62
|
+
id: string;
|
|
63
|
+
label: string;
|
|
64
|
+
value: number;
|
|
65
|
+
}[] | null;
|
|
78
66
|
}
|
|
79
|
-
export interface FieldBooleanSingular extends FieldBase
|
|
67
|
+
export interface FieldBooleanSingular extends FieldBase {
|
|
80
68
|
type: 'boolean';
|
|
81
69
|
multiple: false;
|
|
82
|
-
defaultValue
|
|
70
|
+
defaultValue: boolean | null;
|
|
71
|
+
options: {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
value: boolean;
|
|
75
|
+
}[] | null;
|
|
83
76
|
}
|
|
84
|
-
export interface FieldBooleanMultiple extends FieldBase
|
|
77
|
+
export interface FieldBooleanMultiple extends FieldBase {
|
|
85
78
|
type: 'boolean';
|
|
86
79
|
multiple: true;
|
|
87
|
-
defaultValue
|
|
80
|
+
defaultValue: boolean[] | null;
|
|
81
|
+
options: {
|
|
82
|
+
id: string;
|
|
83
|
+
label: string;
|
|
84
|
+
value: boolean;
|
|
85
|
+
}[] | null;
|
|
88
86
|
}
|
|
89
|
-
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple |
|
|
90
|
-
type FieldWithOptionalKey<T> = T extends Field ? Omit<T, 'key'> & {
|
|
91
|
-
key?: string;
|
|
92
|
-
} : never;
|
|
93
|
-
/**
|
|
94
|
-
* A {@link Field} whose `key` is optional. A registration site that accepts one supplies
|
|
95
|
-
* the key from its own context — `createClient({ fields })` uses the record key.
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* const email: FieldDefinition = {
|
|
100
|
-
* id: 'email',
|
|
101
|
-
* name: 'email',
|
|
102
|
-
* label: 'Email',
|
|
103
|
-
* type: 'text',
|
|
104
|
-
* multiple: false,
|
|
105
|
-
* required: true,
|
|
106
|
-
* }
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
export type FieldDefinition = FieldWithOptionalKey<Field>;
|
|
87
|
+
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldBooleanSingular | FieldBooleanMultiple;
|
|
110
88
|
declare const createFieldIndexFactory: () => {
|
|
111
89
|
register: (field: Field) => void;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
listStore: Store<Field[]>;
|
|
116
|
-
getByName: (name: FieldBase['name']) => Store<Field | null>;
|
|
90
|
+
getById: (id: FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
91
|
+
listStore: import('effector').Store<Field[]>;
|
|
92
|
+
getByName: (name: FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
117
93
|
};
|
|
118
|
-
/**
|
|
119
|
-
* Creates an Effector-based index for registering and retrieving fields.
|
|
120
|
-
*
|
|
121
|
-
* @returns {FieldsStore} A field index with register, update, getById, getByKey, and list methods.
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* const fields = createFieldIndex()
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
94
|
export declare function createFieldIndex(): ReturnType<typeof createFieldIndexFactory>;
|
|
95
|
+
export declare const setupField: (field: Field, fields: FieldsStore) => void;
|
|
128
96
|
export {};
|
|
129
97
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,45 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import type { ExperienceInstance } from '../experience-instance/experience-instance';
|
|
5
|
-
import type { Picked } from '../../picked';
|
|
1
|
+
import { Picked } from '../../picked';
|
|
2
|
+
import { AdaptedComponent } from '../component/component';
|
|
3
|
+
import { ExperienceInstance } from '../experience-instance/experience-instance';
|
|
6
4
|
export type FrameworksStore = ReturnType<typeof createFrameworkIndex>;
|
|
7
5
|
export interface Framework {
|
|
8
6
|
name: string;
|
|
9
7
|
render: FrameworkRender;
|
|
10
|
-
/** Optional teardown for a previously rendered component, keyed by the shadow root it was rendered into. */
|
|
11
|
-
unmount?: FrameworkUnmount;
|
|
12
8
|
}
|
|
13
|
-
declare const createFrameworkIndexFactory: (
|
|
9
|
+
declare const createFrameworkIndexFactory: ({ client }: {
|
|
14
10
|
client: Picked;
|
|
15
11
|
}) => {
|
|
16
|
-
register:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}>;
|
|
20
|
-
getByName: (name: string) => import("effector").Store<Framework | undefined>;
|
|
21
|
-
listStore: import("effector").Store<Framework[]>;
|
|
12
|
+
register: (name: string, framework: Framework) => void;
|
|
13
|
+
getByName: (name: string) => import('effector').Store<Framework | undefined>;
|
|
14
|
+
listStore: import('effector').Store<Framework[]>;
|
|
22
15
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Creates a framework index with stores and registration logic.
|
|
25
|
-
*
|
|
26
|
-
* @template T - Factory parameter type.
|
|
27
|
-
* @param {T} params - Factory parameters including the client.
|
|
28
|
-
* @returns {ReturnType<typeof createFrameworkIndexFactory>} The framework index.
|
|
29
|
-
* @example
|
|
30
|
-
* const frameworks = createFrameworkIndex({ client })
|
|
31
|
-
*/
|
|
32
16
|
export declare function createFrameworkIndex<T extends Parameters<typeof createFrameworkIndexFactory>[0]>(params: T): ReturnType<typeof createFrameworkIndexFactory>;
|
|
33
17
|
export type FrameworkRender = (shadowRoot: ShadowRoot, component: AdaptedComponent, client: Picked, experience: ExperienceInstance) => void;
|
|
34
|
-
export type FrameworkUnmount = (target: ShadowRoot) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Convenience helper that dispatches `frameworks.register` with object-payload shape.
|
|
37
|
-
*
|
|
38
|
-
* @param {Framework} framework - The framework to register.
|
|
39
|
-
* @param {FrameworksStore} frameworks - The frameworks index.
|
|
40
|
-
* @example
|
|
41
|
-
* setupFramework({ name: 'react', render: renderFn }, frameworksIndex)
|
|
42
|
-
*/
|
|
43
18
|
export declare const setupFramework: (framework: Framework, frameworks: FrameworksStore) => void;
|
|
44
19
|
export {};
|
|
45
20
|
//# sourceMappingURL=framework.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../../../../src/entities/framework/framework.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../../../../src/entities/framework/framework.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAEpF,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,eAAe,CAAA;CACxB;AAGD,QAAA,MAAM,2BAA2B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;qBAcvD,MAAM,aAAa,SAAS,KAAG,IAAI;sBAiBlC,MAAM;;CAS/B,CAAA;AAEF,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,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kBAAkB,KAC3B,IAAI,CAAA;AAET,eAAO,MAAM,cAAc,GAAI,WAAW,SAAS,EAAE,YAAY,eAAe,KAAG,IAElF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/entities/history/history.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAM9D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;CACrB;
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/entities/history/history.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAM9D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;CACrB;AA0FD,wBAAgB,aAAa;;sBA1EsB,MAAM;cAAQ,cAAc;;;sBACzB,MAAM;cAAQ,cAAc;;;uBAC9B,MAAM;;;iBACT,YAAY,EAAE;;;EAyE9D"}
|
|
@@ -1,50 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import { type Effect } from 'effector';
|
|
3
|
-
import type { Picked } from '../../picked';
|
|
1
|
+
import { Picked } from '../../picked';
|
|
4
2
|
export interface Plugin {
|
|
5
3
|
name: string;
|
|
6
4
|
setup: (client: Picked) => void | PluginConfig;
|
|
7
5
|
}
|
|
8
|
-
export
|
|
9
|
-
/** Effector effect invoked sequentially during the start chain. Use `createPluginEffect(handler)` to wrap a plain async function. */
|
|
10
|
-
onStart?: Effect<void, void, Error>;
|
|
11
|
-
[key: string]: unknown;
|
|
12
|
-
}
|
|
6
|
+
export type PluginConfig = Record<string, unknown>;
|
|
13
7
|
export interface PluginConfigIndex {
|
|
14
8
|
[key: string]: PluginConfig;
|
|
15
9
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Wraps a plain async handler as an effector Effect for use as a plugin onStart hook.
|
|
18
|
-
*
|
|
19
|
-
* @param {() => void | Promise<void>} handler - The function to execute when the plugin starts. May be sync or return a Promise.
|
|
20
|
-
* @returns {Effect<void, void, Error>} An Effect that runs the handler.
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* const myPlugin: Plugin = {
|
|
24
|
-
* name: 'my-plugin',
|
|
25
|
-
* setup: () => ({
|
|
26
|
-
* onStart: createPluginEffect(async () => {
|
|
27
|
-
* await fetch('/init')
|
|
28
|
-
* }),
|
|
29
|
-
* }),
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function createPluginEffect(handler: () => void | Promise<void>): Effect<void, void, Error>;
|
|
34
|
-
/**
|
|
35
|
-
* Registers a plugin with the client by calling its setup hook and merging any returned config into the plugin index.
|
|
36
|
-
*
|
|
37
|
-
* Every plugin takes an entry, so the index is the roster of what is registered. A plugin
|
|
38
|
-
* that returns no config gets an empty one, which is what `getPluginConfig` already
|
|
39
|
-
* answers for a name it does not hold.
|
|
40
|
-
*
|
|
41
|
-
* @param {Picked} client - The Picked client instance.
|
|
42
|
-
* @param {Plugin} plugin - The plugin to register.
|
|
43
|
-
* @param {PluginConfigIndex} plugins - The plugin config index to mutate.
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
* setupPlugin(client, myPlugin, this.plugins)
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
10
|
export declare const setupPlugin: (client: Picked, plugin: Plugin, plugins: PluginConfigIndex) => void;
|
|
50
11
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,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,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAElD,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAC5B;AAED,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,iBAAiB,KAAG,IASxF,CAAA"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import type { Picked } from '../../picked';
|
|
5
|
-
export type Predicate = (snapshot: StateSnapshot & {
|
|
6
|
-
args: unknown[];
|
|
7
|
-
}) => boolean | Promise<boolean> | string | Promise<string> | string[] | Promise<string[]> | undefined;
|
|
1
|
+
import { StateSnapshot } from '../../utils/state-snaphot';
|
|
2
|
+
import { Picked } from '../../picked';
|
|
3
|
+
export type Predicate = (snapshot: StateSnapshot) => boolean | Promise<boolean> | string | Promise<string> | undefined;
|
|
8
4
|
export type PredicatesStore = ReturnType<typeof createPredicateIndex>;
|
|
9
5
|
export interface PredicateIndexItem {
|
|
10
6
|
name: string;
|
|
@@ -13,36 +9,17 @@ export interface PredicateIndexItem {
|
|
|
13
9
|
declare const createPredicateIndexFactory: ({ client }: {
|
|
14
10
|
client: Picked;
|
|
15
11
|
}) => {
|
|
16
|
-
register:
|
|
12
|
+
register: (name: string, predicate: Predicate) => void;
|
|
13
|
+
getByName: (name: string) => import('effector').Store<{
|
|
17
14
|
name: string;
|
|
18
15
|
predicate: Predicate;
|
|
19
|
-
}>;
|
|
20
|
-
|
|
21
|
-
listStore: Store<{
|
|
16
|
+
} | undefined>;
|
|
17
|
+
listStore: import('effector').Store<{
|
|
22
18
|
name: string;
|
|
23
19
|
predicate: Predicate;
|
|
24
20
|
}[]>;
|
|
25
|
-
getEvokablePredicate: (predicateName: string) => Store<() => ReturnType<Predicate>>;
|
|
26
21
|
};
|
|
27
|
-
/**
|
|
28
|
-
* Creates a predicate index with stores and registration logic.
|
|
29
|
-
*
|
|
30
|
-
* @template T - Factory parameter type.
|
|
31
|
-
* @param {T} params - Factory parameters including the client.
|
|
32
|
-
* @returns {ReturnType<typeof createPredicateIndexFactory>} The predicate index.
|
|
33
|
-
* @example
|
|
34
|
-
* const predicates = createPredicateIndex({ client })
|
|
35
|
-
*/
|
|
36
22
|
export declare function createPredicateIndex<T extends Parameters<typeof createPredicateIndexFactory>[0]>(params: T): ReturnType<typeof createPredicateIndexFactory>;
|
|
37
|
-
/**
|
|
38
|
-
* Convenience helper that dispatches `predicates.register` with object-payload shape.
|
|
39
|
-
*
|
|
40
|
-
* @param {string} name - Predicate name.
|
|
41
|
-
* @param {Predicate} predicate - The predicate function.
|
|
42
|
-
* @param {PredicatesStore} predicates - The predicates index.
|
|
43
|
-
* @example
|
|
44
|
-
* setupPredicate('isAdmin', ({ user }) => user.isAdmin === true, predicatesIndex)
|
|
45
|
-
*/
|
|
46
23
|
export declare const setupPredicate: (name: string, predicate: Predicate, predicates: PredicatesStore) => void;
|
|
47
24
|
export {};
|
|
48
25
|
//# sourceMappingURL=predicate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../../../src/entities/predicate/predicate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../../../src/entities/predicate/predicate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,CACtB,QAAQ,EAAE,aAAa,KACpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;AAEtE,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;AAKD,QAAA,MAAM,2BAA2B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;qBAoBvD,MAAM,aAAa,SAAS,KAAG,IAAI;sBAiBlC,MAAM;cAlCrB,MAAM;mBACD,SAAS;;;cADd,MAAM;mBACD,SAAS;;CA0CxB,CAAA;AAEF,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,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,WAAW,SAAS,EAAE,YAAY,eAAe,SAE7F,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Experience } from '../experience/experience';
|
|
2
|
+
export interface Project {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
organizationId: string;
|
|
6
|
+
experiences: Array<Experience>;
|
|
7
|
+
}
|
|
8
|
+
export declare const MOCK_fetchProject: (organizationId: string, projectId: string) => Promise<Project>;
|
|
9
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../src/entities/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,MAAM,EACtB,WAAW,MAAM,KAChB,OAAO,CAAC,OAAO,CAOjB,CAAA"}
|