@picked/client 0.0.1-dev.1785287094311 → 0.0.1-dev.1785826066660
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -0
- package/dist/api-Djuh2gfe.cjs +1 -0
- package/dist/api-d0qKmzPH.js +38 -0
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/preview/index.js +1 -0
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/actions.mdx +38 -18
- package/dist/docs/api/authentication.md +75 -48
- package/dist/docs/api/authorization-and-scopes.md +63 -47
- package/dist/docs/api/error-handling.md +70 -54
- package/dist/docs/api/index.md +41 -22
- package/dist/docs/api/pagination.md +30 -20
- package/dist/docs/api-keys.mdx +11 -6
- package/dist/docs/chrome-extension.md +22 -5
- package/dist/docs/conditions.mdx +32 -19
- package/dist/docs/content/asset-library.mdx +65 -34
- package/dist/docs/content/content-entries.mdx +8 -2
- package/dist/docs/content/layouts.mdx +45 -29
- package/dist/docs/content/pages.mdx +29 -14
- package/dist/docs/content/sections.mdx +19 -8
- package/dist/docs/delivery-api/experience-content.md +10 -5
- package/dist/docs/delivery-api/index.md +19 -12
- package/dist/docs/delivery-api/preview-caching-crawling.md +27 -14
- package/dist/docs/delivery-api/project-config.md +6 -4
- package/dist/docs/experiences.mdx +26 -10
- package/dist/docs/features.mdx +93 -22
- package/dist/docs/fields.mdx +42 -27
- package/dist/docs/flow-builder/building-flows.md +38 -20
- package/dist/docs/flow-builder/condition-builder.md +32 -21
- package/dist/docs/flow-builder/keyboard-shortcuts.md +18 -18
- package/dist/docs/flow-builder/nodes.md +26 -13
- package/dist/docs/flow-builder/overview.mdx +28 -15
- package/dist/docs/gtm-template.md +35 -26
- package/dist/docs/guides/build-a-personalized-page.mdx +36 -18
- package/dist/docs/image-optimisation-service.md +33 -17
- package/dist/docs/index.md +28 -17
- package/dist/docs/mcp.md +47 -39
- package/dist/docs/pickedql/data-sources.md +65 -43
- package/dist/docs/pickedql/dimensions.md +27 -12
- package/dist/docs/pickedql/examples.md +38 -26
- package/dist/docs/pickedql/filtering.md +10 -6
- package/dist/docs/pickedql/index.md +32 -14
- package/dist/docs/pickedql/schema.md +85 -76
- package/dist/docs/pickedql/virtual-functions.md +62 -36
- package/dist/docs/projects.mdx +14 -7
- package/dist/docs/reports.mdx +5 -3
- package/dist/docs/sdk/actions.md +33 -17
- package/dist/docs/sdk/conditions.md +8 -5
- package/dist/docs/sdk/content-security-policy.md +5 -4
- package/dist/docs/sdk/experiences.md +29 -11
- package/dist/docs/sdk/feature-allocation.md +161 -0
- package/dist/docs/sdk/features.md +181 -73
- package/dist/docs/sdk/fields.md +66 -42
- package/dist/docs/sdk/index.md +25 -10
- package/dist/docs/sdk/plugins/create-experience.md +18 -15
- package/dist/docs/sdk/plugins/dynamic-experiences.md +43 -17
- package/dist/docs/sdk/predicates.md +53 -37
- package/dist/docs/sdk/ssr/index.md +25 -8
- package/dist/docs/sdk/ssr/rendering-and-hydration.md +37 -16
- package/dist/docs/sdk/ssr/serialize.md +38 -20
- package/dist/docs/sdk/ssr/slots-and-placements.md +28 -10
- package/dist/docs/sdk/steps.md +100 -55
- package/dist/docs/steps.mdx +20 -11
- package/dist/docs/team-management.md +17 -11
- package/dist/docs/vite-plugin.md +26 -19
- package/dist/docs/workspace-versioning.mdx +14 -8
- package/dist/docs/workspaces.mdx +55 -24
- package/dist/{dom-BwmTHeT7.js → dom-BqcToNL0.js} +1 -3
- package/dist/{dom-CDrHc_j9.cjs → dom-DlLH3FxV.cjs} +1 -1
- package/dist/esm/form/index.js +2 -4
- package/dist/esm/index.js +434 -334
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/preview/index.js +2 -0
- package/dist/esm/server/index.js +13 -11
- package/dist/{experience-instance-DOJShRk5.js → experience-instance-DGk11d8a.js} +3 -3
- package/dist/experience-instance-Dej3P1sE.cjs +1 -0
- package/dist/inert-script-report-B_bMPRzp.js +18 -0
- package/dist/inert-script-report-ijRHPtcY.cjs +1 -0
- package/dist/{plugin-C46DEiGE.js → plugin-BVAFWjpT.js} +61 -56
- package/dist/plugin-BcCn2llk.cjs +1 -0
- package/dist/preview-channel-CSr96XAo.js +98 -0
- package/dist/preview-channel-Cx0e6fye.cjs +1 -0
- package/dist/protocol-Bb_vpLKE.cjs +1 -0
- package/dist/protocol-C5KkkiZc.js +84 -0
- package/dist/types/client.d.ts +7 -6
- package/dist/types/entities/action/action.d.ts +5 -4
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -5
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/condition/condition.d.ts +5 -5
- package/dist/types/entities/content/content.d.ts +14 -3
- package/dist/types/entities/content/content.d.ts.map +1 -1
- package/dist/types/entities/content/reference.d.ts +101 -0
- package/dist/types/entities/content/reference.d.ts.map +1 -0
- package/dist/types/entities/experience/experience.d.ts +11 -10
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +10 -9
- package/dist/types/entities/feature/feature.d.ts +3 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +6 -6
- package/dist/types/entities/plugin/plugin.d.ts +3 -2
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +4 -3
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response-validation.d.ts +3 -2
- package/dist/types/entities/response/response.d.ts +12 -11
- package/dist/types/entities/session/session.d.ts +2 -1
- package/dist/types/entities/step/step.d.ts +6 -5
- package/dist/types/exports.d.ts +6 -1
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/form/build-responses.d.ts +2 -1
- package/dist/types/form/create-field-evaluator.d.ts +4 -3
- package/dist/types/form/create-field-validation.d.ts +5 -4
- package/dist/types/form/create-form.d.ts +7 -6
- package/dist/types/form/create-submit-pipeline.d.ts +7 -6
- package/dist/types/form/get-step-fields.d.ts +3 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/condition-selection.d.ts +14 -4
- package/dist/types/lifecycle/lifecycle.d.ts +4 -3
- package/dist/types/lifecycle/rules-logic.d.ts +4 -3
- package/dist/types/lifecycle/state-snapshot.d.ts +4 -3
- package/dist/types/picked.d.ts +102 -68
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +1 -1
- package/dist/types/ping.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +9 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +3 -2
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +1 -1
- package/dist/types/plugins/dynamic-experiences/hash.d.ts +40 -5
- package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +3 -3
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +24 -5
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/web-components/plugin.d.ts +2 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/preview/index.d.ts +18 -0
- package/dist/types/preview/index.d.ts.map +1 -0
- package/dist/types/preview-channel.d.ts +16 -0
- package/dist/types/preview-channel.d.ts.map +1 -0
- package/dist/types/preview-receiver/apply-ops.d.ts +32 -0
- package/dist/types/preview-receiver/apply-ops.d.ts.map +1 -0
- package/dist/types/preview-receiver/index.d.ts +32 -0
- package/dist/types/preview-receiver/index.d.ts.map +1 -0
- package/dist/types/preview-receiver/protocol.d.ts +69 -0
- package/dist/types/preview-receiver/protocol.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +3 -3
- package/dist/types/server/serialize.d.ts +8 -3
- package/dist/types/server/serialize.d.ts.map +1 -1
- package/dist/types/utils/content-path.d.ts +37 -0
- package/dist/types/utils/content-path.d.ts.map +1 -0
- package/dist/types/utils/dom.d.ts +2 -1
- package/dist/types/utils/events.d.ts +6 -6
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -1
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/id.d.ts.map +1 -1
- package/dist/types/utils/inert-script-report.d.ts +40 -0
- package/dist/types/utils/inert-script-report.d.ts.map +1 -0
- package/dist/types/utils/logger.d.ts +2 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts +2 -1
- package/dist/types/utils/preview-session.d.ts +12 -0
- package/dist/types/utils/preview-session.d.ts.map +1 -0
- package/dist/types/utils/rehydrate-scripts.d.ts +6 -0
- package/dist/types/utils/rehydrate-scripts.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts +6 -2
- package/dist/types/utils/storage.d.ts +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +35 -24
- package/dist/api-BzcdC_7V.cjs +0 -1
- package/dist/api-o8w9kJwm.js +0 -40
- package/dist/experience-instance-DurC3pE-.cjs +0 -1
- package/dist/plugin-nrEJGTuE.cjs +0 -1
- package/dist/preview-bridge-CpX1BkSA.cjs +0 -1
- package/dist/preview-bridge-D76l-dPy.js +0 -33
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Reactive field evaluator — filters and re-evaluates fields when responses or step context change. */
|
|
2
|
+
import { type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { Picked } from '../picked';
|
|
4
5
|
/**
|
|
5
6
|
* Creates a reactive store of evaluated fields for a given set of field keys.
|
|
6
7
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Creates the client-side field validation slice (touched tracking, error stores, staged values). */
|
|
2
|
+
import { type EventCallable, type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { ValidationError } from '../entities/response/response';
|
|
5
|
+
import type { Picked } from '../picked';
|
|
5
6
|
export interface FieldValidation {
|
|
6
7
|
/** Dispatch on keyboard input — updates staged values and runs validation if the field has been touched. */
|
|
7
8
|
fieldInputEvent: EventCallable<{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** @file Creates form instances that wire field evaluation, validation, and submission. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
5
|
+
import type { ValidationError } from '../entities/response/response';
|
|
6
|
+
import type { Picked } from '../picked';
|
|
7
|
+
import { type ErrorCallback, type SubmitCallback, type SubmitEventWithCurrentTarget, type SuccessCallback } from './create-submit-pipeline';
|
|
7
8
|
export type FormField = Field & {
|
|
8
9
|
value: FieldValue | undefined;
|
|
9
10
|
/** Validation error for this field, or undefined if valid. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** @file Submit pipeline for form instances — manages lifecycle, validation, and navigation. */
|
|
2
|
+
import { type Event, type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
4
|
+
import type { ExperienceStep } from '../entities/step/step';
|
|
5
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
6
|
+
import type { ValidationError } from '../entities/response/response';
|
|
7
|
+
import type { Picked } from '../picked';
|
|
7
8
|
export type SubmitEventWithCurrentTarget = SubmitEvent & {
|
|
8
9
|
currentTarget: EventTarget & HTMLFormElement;
|
|
9
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Step field evaluation — resolves field and option visibility conditions. */
|
|
2
|
+
import type { Field } from '../entities/field/field';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
3
4
|
import { evaluateRuleLogic } from '../utils/rules-logic';
|
|
4
5
|
/**
|
|
5
6
|
* Evaluates field and option conditions, returning only the fields that should be visible.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type * from './client';
|
|
|
4
4
|
export type * from './entities/action/action';
|
|
5
5
|
export type * from './entities/condition/condition';
|
|
6
6
|
export type * from './entities/content/content';
|
|
7
|
+
export type * from './entities/content/reference';
|
|
7
8
|
export type * from './entities/component/component';
|
|
8
9
|
export type * from './entities/component/lazyComponent';
|
|
9
10
|
export type * from './entities/experience-instance/experience-instance';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,sBAAsB,CAAA;AACzC,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,8BAA8B,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,8BAA8B,CAAA;AACjD,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,sBAAsB,CAAA;AACzC,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,8BAA8B,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Memoized condition evaluator plus a reactive condition-results store.
|
|
3
|
+
*
|
|
4
|
+
* The results store is keyed by a stable, key-order-independent hash of the rule, so the
|
|
5
|
+
* server's selection (`serialize`) and the client's hydration share results without
|
|
6
|
+
* re-evaluating. A cache hit reads synchronously (driving SSR render and the first
|
|
7
|
+
* client paint); a miss evaluates asynchronously and writes the result back, which
|
|
8
|
+
* propagates reactively to subscribers. Conditions that reference an action are exempt from the
|
|
9
|
+
* cache: they re-evaluate on every call so the action's side effect runs each time.
|
|
10
|
+
*/
|
|
11
|
+
import { type Store } from 'effector';
|
|
12
|
+
import type { Condition } from '../entities/condition/condition';
|
|
13
|
+
import type { LogicObject, LogicRule, LogicValue } from '../logic-engine';
|
|
14
|
+
import type { Picked } from '../picked';
|
|
5
15
|
/** A condition rule that may be json-logic, a raw logic value, or unset. */
|
|
6
16
|
type ConditionRule = LogicRule | LogicValue | undefined;
|
|
7
17
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Lifecycle module — owns the SDK start chain as an effector event graph. */
|
|
2
|
+
import { type Effect, type EventCallable, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
4
|
+
import type { LogicRule } from '../logic-engine';
|
|
4
5
|
/** Discrete stages of the SDK lifecycle. */
|
|
5
6
|
export type LifecycleStage = 'idle' | 'starting' | 'ready' | 'failed';
|
|
6
7
|
/** A logic-engine gate rule, a literal boolean override, or `undefined` to indicate no gate is configured. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Effector effect that evaluates a json-logic rule against the client's reactive state. */
|
|
2
|
+
import { type Effect } from 'effector';
|
|
3
|
+
import type { LogicObject, LogicRule } from '../logic-engine';
|
|
4
|
+
import type { Picked } from '../picked';
|
|
4
5
|
/** Parameters for `evaluateRuleLogicFx` — the rule to evaluate and an optional context override. */
|
|
5
6
|
export interface EvaluateRuleLogicParams {
|
|
6
7
|
rule: LogicRule;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file State snapshot store — derives an immutable `StateSnapshot` from the client's reactive entity stores via `combine`. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
4
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
5
|
/** Immutable snapshot of the current client state, suitable for passing to user-supplied predicates, actions, and rule evaluators. */
|
|
5
6
|
export interface StateSnapshot {
|
|
6
7
|
client: Picked;
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
1
|
+
/** @file Picked client — the main entry point for the Picked SDK. */
|
|
2
|
+
import { type Effect, type EventCallable, type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import { type Experience, type LaunchExperienceOptions } from './entities/experience/experience';
|
|
4
|
+
import { type Plugin, type PluginConfigIndex } from './entities/plugin/plugin';
|
|
5
|
+
import { type CreateClientOptions } from './client';
|
|
6
|
+
import { type AdaptedComponent } from './entities/component/component';
|
|
7
|
+
import { type Framework } from './entities/framework/framework';
|
|
8
|
+
import { logger } from './utils/logger';
|
|
9
|
+
import { type StateSnapshot } from './lifecycle/state-snapshot';
|
|
10
|
+
import { type EvaluateRuleLogicParams } from './lifecycle/rules-logic';
|
|
11
|
+
import { type ConditionResults } from './lifecycle/condition-selection';
|
|
12
|
+
import { type LifecycleStage } from './lifecycle/lifecycle';
|
|
13
|
+
import type { Predicate } from './entities/predicate/predicate';
|
|
14
|
+
import type { Feature } from './entities/feature/feature';
|
|
15
|
+
import { type EventBusPayload, type EventHistoryStore } from './utils/events';
|
|
16
|
+
import type { Field } from './entities/field/field';
|
|
17
|
+
import type { ExperienceStep } from './entities/step/step';
|
|
18
|
+
import type { Content, ContentDataPatch } from './entities/content/content';
|
|
19
|
+
import type { ContentLoader } from './plugins/dynamic-experiences/types';
|
|
20
|
+
import type { Action } from './entities/action/action';
|
|
21
|
+
import { type Condition } from './entities/condition/condition';
|
|
22
|
+
import type { SessionEntity } from './entities/session/session';
|
|
21
23
|
/**
|
|
22
24
|
* Provenance metadata describing where the Picked client's project config and
|
|
23
25
|
* content came from. Set by `dynamicExperiencesPlugin` when the Vite plugin's
|
|
@@ -34,7 +36,7 @@ export interface PickedDataSource {
|
|
|
34
36
|
workspaceId: string | null;
|
|
35
37
|
}
|
|
36
38
|
export declare class Picked {
|
|
37
|
-
static readonly logger:
|
|
39
|
+
static readonly logger: typeof logger;
|
|
38
40
|
private readonly options;
|
|
39
41
|
/**
|
|
40
42
|
* Provenance metadata for the data backing this client. Populated by
|
|
@@ -49,6 +51,13 @@ export declare class Picked {
|
|
|
49
51
|
* has registered one yet.
|
|
50
52
|
*/
|
|
51
53
|
contentLoader?: ContentLoader;
|
|
54
|
+
/**
|
|
55
|
+
* Origins allowed to push live-preview content patches into this page, issued by the API on the
|
|
56
|
+
* preview surface and set by `dynamicExperiencesPlugin`. `null` until the project config
|
|
57
|
+
* resolves, and on every non-preview surface — the preview receiver treats that as "trust
|
|
58
|
+
* nobody" and stays closed.
|
|
59
|
+
*/
|
|
60
|
+
previewEmbedderOrigins: string[] | null;
|
|
52
61
|
private readonly plugins;
|
|
53
62
|
readonly eventBus: EventCallable<EventBusPayload>;
|
|
54
63
|
readonly events: EventHistoryStore;
|
|
@@ -57,23 +66,23 @@ export declare class Picked {
|
|
|
57
66
|
readonly dashboardUrl: string;
|
|
58
67
|
readonly documentationSiteUrl: string;
|
|
59
68
|
readonly session: SessionEntity;
|
|
60
|
-
readonly searchParams: import(
|
|
69
|
+
readonly searchParams: import(".").PickedSearchParams;
|
|
61
70
|
readonly history: {
|
|
62
71
|
push: EventCallable<{
|
|
63
72
|
experienceId: string;
|
|
64
|
-
node: import(
|
|
73
|
+
node: import(".").ExperienceNode;
|
|
65
74
|
}>;
|
|
66
75
|
replace: EventCallable<{
|
|
67
76
|
experienceId: string;
|
|
68
|
-
node: import(
|
|
77
|
+
node: import(".").ExperienceNode;
|
|
69
78
|
}>;
|
|
70
79
|
back: EventCallable<{
|
|
71
80
|
experienceId?: string;
|
|
72
81
|
}>;
|
|
73
82
|
restore: EventCallable<{
|
|
74
|
-
entries: import(
|
|
83
|
+
entries: import(".").HistoryEntry[];
|
|
75
84
|
}>;
|
|
76
|
-
entriesStore: Store<import(
|
|
85
|
+
entriesStore: Store<import(".").HistoryEntry[]>;
|
|
77
86
|
};
|
|
78
87
|
readonly components: {
|
|
79
88
|
register: EventCallable<{
|
|
@@ -91,16 +100,16 @@ export declare class Picked {
|
|
|
91
100
|
}[]>;
|
|
92
101
|
};
|
|
93
102
|
readonly experienceInstances: {
|
|
94
|
-
spawn: (experience: import(
|
|
95
|
-
getByExperienceKey: (key: Experience[
|
|
96
|
-
getByExperienceId: (id: Experience[
|
|
97
|
-
listStore: Store<import(
|
|
103
|
+
spawn: (experience: import(".").ExperienceStore, target: HTMLElement, options?: LaunchExperienceOptions) => void;
|
|
104
|
+
getByExperienceKey: (key: Experience['key']) => Store<import(".").ExperienceInstance[]>;
|
|
105
|
+
getByExperienceId: (id: Experience['id']) => Store<import(".").ExperienceInstance[]>;
|
|
106
|
+
listStore: Store<import(".").ExperienceInstance[]>;
|
|
98
107
|
};
|
|
99
108
|
readonly experiences: {
|
|
100
109
|
register: EventCallable<Experience>;
|
|
101
|
-
get: (id: Experience[
|
|
102
|
-
getById: (id: Experience[
|
|
103
|
-
getByKey: (key: Experience[
|
|
110
|
+
get: (id: Experience['id']) => Store<import(".").ExperienceStore | undefined>;
|
|
111
|
+
getById: (id: Experience['id']) => Store<import(".").ExperienceStore | undefined>;
|
|
112
|
+
getByKey: (key: Experience['key']) => Store<import(".").ExperienceStore | undefined>;
|
|
104
113
|
launch: Effect<{
|
|
105
114
|
key: string;
|
|
106
115
|
options?: LaunchExperienceOptions;
|
|
@@ -110,12 +119,12 @@ export declare class Picked {
|
|
|
110
119
|
}, void, Error>;
|
|
111
120
|
open: Effect<{
|
|
112
121
|
key: string;
|
|
113
|
-
options?: import(
|
|
122
|
+
options?: import("./exports").OpenExperienceOptions;
|
|
114
123
|
} | {
|
|
115
124
|
id: string;
|
|
116
|
-
options?: import(
|
|
125
|
+
options?: import("./exports").OpenExperienceOptions;
|
|
117
126
|
}, void, Error>;
|
|
118
|
-
listStore: Store<import(
|
|
127
|
+
listStore: Store<import(".").ExperienceStore[]>;
|
|
119
128
|
initialiseExperiencesFx: Effect<void, void, Error>;
|
|
120
129
|
};
|
|
121
130
|
readonly frameworks: {
|
|
@@ -143,15 +152,15 @@ export declare class Picked {
|
|
|
143
152
|
id: string;
|
|
144
153
|
feature: Feature;
|
|
145
154
|
}>;
|
|
146
|
-
getById: (id: string) => Store<import(
|
|
147
|
-
getByName: (name: string) => Store<import(
|
|
148
|
-
listStore: Store<import(
|
|
155
|
+
getById: (id: string) => Store<import(".").FeatureBucket | undefined>;
|
|
156
|
+
getByName: (name: string) => Store<import(".").FeatureIndexItem | undefined>;
|
|
157
|
+
listStore: Store<import(".").FeatureBucket[]>;
|
|
149
158
|
getEvokableFeature: (featureName: string) => Store<() => Promise<boolean | string | undefined>>;
|
|
150
159
|
};
|
|
151
160
|
readonly conditions: {
|
|
152
161
|
register: (condition: Condition) => void;
|
|
153
|
-
getById: (id: Condition[
|
|
154
|
-
getByKey: (key: Condition[
|
|
162
|
+
getById: (id: Condition['id']) => Store<Condition | null>;
|
|
163
|
+
getByKey: (key: Condition['key']) => Store<Condition | null>;
|
|
155
164
|
listStore: Store<Condition[]>;
|
|
156
165
|
indexStore: StoreWritable<{
|
|
157
166
|
[id: string]: Condition;
|
|
@@ -159,41 +168,41 @@ export declare class Picked {
|
|
|
159
168
|
};
|
|
160
169
|
readonly fields: {
|
|
161
170
|
register: (field: Field) => void;
|
|
162
|
-
update: (key: import(
|
|
163
|
-
getById: (id: import(
|
|
164
|
-
getByKey: (key: import(
|
|
171
|
+
update: (key: import(".").FieldBase['key'], updates: Partial<Field>) => void;
|
|
172
|
+
getById: (id: import(".").FieldBase['id']) => Store<Field | null>;
|
|
173
|
+
getByKey: (key: import(".").FieldBase['key']) => Store<Field | null>;
|
|
165
174
|
listStore: Store<Field[]>;
|
|
166
|
-
getByName: (name: import(
|
|
175
|
+
getByName: (name: import(".").FieldBase['name']) => Store<Field | null>;
|
|
167
176
|
};
|
|
168
177
|
readonly responses: {
|
|
169
178
|
register: {
|
|
170
|
-
(fieldKey: Field[
|
|
171
|
-
(payload: Record<Field[
|
|
179
|
+
(fieldKey: Field['key'], response: import(".").Response): void;
|
|
180
|
+
(payload: Record<Field['key'], import(".").Response>, response?: never): void;
|
|
172
181
|
};
|
|
173
182
|
clearAll: EventCallable<void>;
|
|
174
183
|
clear: EventCallable<string>;
|
|
175
|
-
commit: (responsesToCommit: import(
|
|
176
|
-
errors: import(
|
|
184
|
+
commit: (responsesToCommit: import(".").CommitResponses) => Promise<{
|
|
185
|
+
errors: import(".").ValidationError[];
|
|
177
186
|
}>;
|
|
178
|
-
getResponsesToCommit: (responsesToCommit: import(
|
|
179
|
-
responsesToCommit: import(
|
|
180
|
-
validationErrors: import(
|
|
187
|
+
getResponsesToCommit: (responsesToCommit: import(".").CommitResponses) => Promise<{
|
|
188
|
+
responsesToCommit: import(".").CommitResponses;
|
|
189
|
+
validationErrors: import(".").ValidationError[];
|
|
181
190
|
}>;
|
|
182
191
|
listStore: Store<{
|
|
183
192
|
fieldKey: string;
|
|
184
|
-
value: import(
|
|
193
|
+
value: import(".").FieldValue;
|
|
185
194
|
}[]>;
|
|
186
195
|
getAllStore: Store<{
|
|
187
|
-
[fieldKey: string]: import(
|
|
196
|
+
[fieldKey: string]: import(".").FieldValue;
|
|
188
197
|
}>;
|
|
189
|
-
getByFieldId: (id: Field[
|
|
190
|
-
getByFieldKey: (key: Field[
|
|
191
|
-
getByFieldName: (fieldName: Field[
|
|
198
|
+
getByFieldId: (id: Field['id']) => Store<import(".").FieldValue>;
|
|
199
|
+
getByFieldKey: (key: Field['key']) => Store<import(".").FieldValue>;
|
|
200
|
+
getByFieldName: (fieldName: Field['name']) => Store<import(".").FieldValue>;
|
|
192
201
|
};
|
|
193
202
|
readonly steps: {
|
|
194
203
|
register: (step: ExperienceStep) => void;
|
|
195
|
-
getById: (id: ExperienceStep[
|
|
196
|
-
getByKey: (key: ExperienceStep[
|
|
204
|
+
getById: (id: ExperienceStep['id']) => Store<ExperienceStep | null>;
|
|
205
|
+
getByKey: (key: ExperienceStep['key']) => Store<ExperienceStep | null>;
|
|
197
206
|
listStore: Store<ExperienceStep[]>;
|
|
198
207
|
indexStore: StoreWritable<{
|
|
199
208
|
[id: string]: ExperienceStep;
|
|
@@ -201,7 +210,8 @@ export declare class Picked {
|
|
|
201
210
|
};
|
|
202
211
|
readonly contents: {
|
|
203
212
|
register: (content: Content) => void;
|
|
204
|
-
|
|
213
|
+
patch: (id: string, apply: ContentDataPatch) => void;
|
|
214
|
+
getById: (id: Content['id']) => Store<Content | null>;
|
|
205
215
|
listStore: Store<Content[]>;
|
|
206
216
|
indexStore: StoreWritable<{
|
|
207
217
|
[id: string]: Content;
|
|
@@ -213,9 +223,9 @@ export declare class Picked {
|
|
|
213
223
|
action: Action;
|
|
214
224
|
}>;
|
|
215
225
|
getByKey: (key: string) => Store<Action | undefined>;
|
|
216
|
-
listStore: Store<import(
|
|
226
|
+
listStore: Store<import(".").ActionIndexItem[]>;
|
|
217
227
|
getEvokableAction: (actionKey: string, options?: {
|
|
218
|
-
experience: import(
|
|
228
|
+
experience: import(".").ExperienceInstance;
|
|
219
229
|
}) => Store<() => ReturnType<Action>>;
|
|
220
230
|
};
|
|
221
231
|
/**
|
|
@@ -252,16 +262,20 @@ export declare class Picked {
|
|
|
252
262
|
}, string, Error>;
|
|
253
263
|
constructor(options: CreateClientOptions);
|
|
254
264
|
/**
|
|
255
|
-
* Lazily starts the preview
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
265
|
+
* Lazily starts the preview channel when this frame is a live-preview session: the outbound
|
|
266
|
+
* bridge, which reports the frame's URL to the dashboard, and the inbound receiver, which applies
|
|
267
|
+
* the dashboard's content patches.
|
|
268
|
+
*
|
|
269
|
+
* Both load from a single dynamic `import()` so there is one code-split point and neither reaches
|
|
270
|
+
* production bundles. Failures are swallowed so client creation never depends on the preview
|
|
271
|
+
* channel, and the receiver refuses every message until the API issues an origin allowlist, so
|
|
272
|
+
* starting it before the project config resolves is safe.
|
|
259
273
|
*
|
|
260
274
|
* @returns {void} Nothing.
|
|
261
275
|
* @example
|
|
262
|
-
* this.
|
|
276
|
+
* this.maybeStartPreviewChannel()
|
|
263
277
|
*/
|
|
264
|
-
private
|
|
278
|
+
private maybeStartPreviewChannel;
|
|
265
279
|
registerFramework: (framework: Framework) => void;
|
|
266
280
|
registerComponent: (name: string, component: AdaptedComponent) => void;
|
|
267
281
|
registerPlugin: (plugin: Plugin) => void;
|
|
@@ -271,6 +285,26 @@ export declare class Picked {
|
|
|
271
285
|
registerField: (field: Field) => void;
|
|
272
286
|
registerStep: (step: ExperienceStep) => void;
|
|
273
287
|
registerContent: (content: Content) => void;
|
|
288
|
+
/**
|
|
289
|
+
* Applies path-addressed replacements to a registered content record, leaving every untouched
|
|
290
|
+
* branch of the blob shared by reference so only the affected subtree re-renders.
|
|
291
|
+
*
|
|
292
|
+
* A no-op when no record with `id` is registered — the record's base blob comes from
|
|
293
|
+
* `contentLoader`, and a patch that arrives first must not fabricate one.
|
|
294
|
+
*
|
|
295
|
+
* Takes a transform rather than a list of path ops so the path parser and the spine-rebuilding
|
|
296
|
+
* walk stay out of this module's import graph — they belong to the lazily-loaded preview channel.
|
|
297
|
+
* Build one with `applyContentOps` from `@picked/client/preview`.
|
|
298
|
+
*
|
|
299
|
+
* @param {string} id - The content record id to patch.
|
|
300
|
+
* @param {ContentDataPatch} apply - Transform producing the next `data` blob.
|
|
301
|
+
* @returns {void} Nothing.
|
|
302
|
+
* @example
|
|
303
|
+
* ```typescript
|
|
304
|
+
* client.patchContent('c1', (data) => ({ ...data, headline: 'Hello' }))
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
patchContent: (id: string, apply: ContentDataPatch) => void;
|
|
274
308
|
registerAction: (key: string, action: Action) => void;
|
|
275
309
|
registerExperience: (experience: Experience) => void;
|
|
276
310
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,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,gBAAgB,EAGtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,aAAa,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,iBAAiB,EAAe,MAAM,0BAA0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":"ping.d.ts","sourceRoot":"","sources":["../../src/ping.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAKtC;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../src/ping.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAKtC;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,WAAkB,MAAM,KAAG,OAAO,CAAC,OAAO,CA2C1D,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
/** @file Builder API for creating experiences, steps, conditions, fields, and flow graphs. */
|
|
2
|
+
import type { ActionNode, Experience, ExperienceEdge, ExperienceNode, ExperienceTarget } from '../../entities/experience/experience';
|
|
3
|
+
import type { ExperienceStep } from '../../entities/step/step';
|
|
4
|
+
import type { Condition } from '../../entities/condition/condition';
|
|
5
|
+
import type { AdaptedComponent } from '../../entities/component/component';
|
|
6
|
+
import type { LogicRule, LogicValue } from '../../logic-engine';
|
|
7
|
+
import type { Field, FieldBooleanMultiple, FieldBooleanSingular, FieldNumberMultiple, FieldNumberSingular, FieldObjectMultiple, FieldObjectSingular, FieldTextMultiple, FieldTextSingular, JsonValue } from '../../entities/field/field';
|
|
8
|
+
import { type Serialized } from './serialization';
|
|
8
9
|
export interface SerializedExperience extends Experience {
|
|
9
10
|
steps: ExperienceStep[];
|
|
10
11
|
conditions: Condition[];
|
|
@@ -203,7 +204,7 @@ export declare const createNode: (nodeOptions: CreateNodeOptions, experience: Se
|
|
|
203
204
|
export declare const createEdge: (edgeOptions: CreateEdgeOptions, experience: SerializableExperience) => SerializableEdge;
|
|
204
205
|
export declare const createCondition: (conditionOptions: CreateConditionOptions, experience: SerializableExperience) => SerializableCondition;
|
|
205
206
|
/** @deprecated Use `createCondition` instead. */
|
|
206
|
-
export declare const createConditional:
|
|
207
|
+
export declare const createConditional: typeof createCondition;
|
|
207
208
|
/**
|
|
208
209
|
* Creates a field with optional generic type parameter for object field type safety.
|
|
209
210
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACV,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEhE,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACtD,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MA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,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACV,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEhE,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACtD,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,UAAU,EAAE,sBAAsB,CAAA;IAClC,QAAQ,EAAE,CAAC,WAAW,EAAE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AAG;IACF,QAAQ,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,iBAAiB,KAAK,IAAI,CAAA;CAChF,CAAA;AAED,eAAO,MAAM,UAAU,gBAAiB,iBAAiB,KAAG,UAoB3D,CAAA;AAED,eAAO,MAAM,kBAAkB,gBAChB,iBAAiB,GAAG,UAAU,cAC/B,sBAAsB,KACjC,gBAwCF,CAAA;AAED,eAAO,MAAM,UAAU,gBACR,iBAAiB,cAClB,sBAAsB,KACjC,gBA2EF,CAAA;AAED,eAAO,MAAM,UAAU,gBACR,iBAAiB,cAClB,sBAAsB,KACjC,gBAkBF,CAAA;AAED,eAAO,MAAM,eAAe,qBACR,sBAAsB,cAC5B,sBAAsB,KACjC,qBAmDF,CAAA;AAED,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,wBAAkB,CAAA;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,GAAG,SAAS,gBAC3C,kBAAkB,KAC/B,iBAAiB,CAAC,CAAC,CAsOrB,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAgB,uBAAuB,KAAG,sBA4LtE,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Plugin that registers builder-created experiences with the client. */
|
|
2
|
+
import type { Plugin } from '../../entities/plugin/plugin';
|
|
3
|
+
import type { SerializableExperience } from './create-experience';
|
|
3
4
|
interface CreateExperiencePluginOptions {
|
|
4
5
|
experiences: SerializableExperience[];
|
|
5
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/plugin.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGvF,UAAU,6BAA6B;IACrC,WAAW,EAAE,sBAAsB,EAAE,CAAA;CACtC;AAED,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/plugin.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAE1D,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGvF,UAAU,6BAA6B;IACrC,WAAW,EAAE,sBAAsB,EAAE,CAAA;CACtC;AAED,eAAO,MAAM,sBAAsB,YAAa,6BAA6B,KAAG,MA0B/E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/serialization.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,MAAM,CAAA;AAElC,eAAO,MAAM,aAAa;
|
|
1
|
+
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/serialization.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,MAAM,CAAA;AAElC,eAAO,MAAM,aAAa;IACxB,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAGnC,WAAW,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC;CAGtC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from '../../entities/plugin/plugin';
|
|
1
|
+
import type { Plugin } from '../../entities/plugin/plugin';
|
|
2
2
|
/**
|
|
3
3
|
* Watches the document for `childList` mutations and reconciles experiences
|
|
4
4
|
* whose declared target selectors match newly added DOM subtrees. Each
|