@picked/client 0.0.1-dev.1773729274420 → 0.0.1-dev.1773807602703
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-DuHeVrL4.js → api-GlH9T8_1.js} +1 -1
- package/dist/{api-47L967ES.cjs → api-GvmToTw0.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +738 -741
- package/dist/esm/plugins/create-experience/index.js +360 -286
- package/dist/esm/plugins/dynamic-experiences/index.js +145 -78
- package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
- package/dist/esm/plugins/history-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-indexeddb/index.js +46 -51
- package/dist/esm/plugins/single-page-app/index.js +24 -24
- package/dist/esm/server/index.js +7 -7
- package/dist/experience-instance-CxiOyYPf.cjs +1 -0
- package/dist/{experience-instance-DTyL1fNb.js → experience-instance-DCknHRkX.js} +328 -349
- package/dist/nodes-DQt4TfuO.js +26 -0
- package/dist/nodes-DsL8kMSX.cjs +1 -0
- package/dist/object-BbFTsGh3.cjs +1 -0
- package/dist/{object-CJssU1Pm.js → object-JwZ58NOH.js} +1 -1
- package/dist/storage-Be5xWNPC.cjs +1 -0
- package/dist/{storage-B2d81EOI.js → storage-Co_LbKr_.js} +30 -35
- package/dist/types/entities/action/action.d.ts +2 -5
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/condition/condition.d.ts +17 -0
- package/dist/types/entities/condition/condition.d.ts.map +1 -0
- package/dist/types/entities/experience/experience.d.ts +48 -31
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +2 -2
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +23 -52
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/entities/project/project.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +9 -7
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/entities/step/step.d.ts +20 -0
- package/dist/types/entities/step/step.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +8 -2
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +41 -32
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +70 -43
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/index.d.ts +1 -1
- package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +20 -5
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +46 -0
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +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/utils/dom.d.ts +3 -0
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +2 -2
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -0
- package/dist/types/utils/global-obj.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/key.d.ts +12 -0
- package/dist/types/utils/key.d.ts.map +1 -0
- package/dist/types/utils/logger.d.ts.map +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.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +3 -3
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +7 -2
- 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/picked-config.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts.map +1 -1
- 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/storage.d.ts.map +1 -1
- package/package.json +2 -16
- package/dist/experience-instance-BX0aqKsC.cjs +0 -1
- package/dist/object-mwaxtjLG.cjs +0 -1
- package/dist/storage-58NoTSsc.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACjD,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA;AACxC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACjD,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,qBAAqB,CAAA;AACxC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAG1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGjE,UAAU,6BAA6B;IACrC,WAAW,EAAE,sBAAsB,EAAE,CAAA;CACtC;AAED,eAAO,MAAM,sBAAsB,GAAI,SAAS,6BAA6B,KAAG,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAG1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGjE,UAAU,6BAA6B;IACrC,WAAW,EAAE,sBAAsB,EAAE,CAAA;CACtC;AAED,eAAO,MAAM,sBAAsB,GAAI,SAAS,6BAA6B,KAAG,MAwB/E,CAAA"}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import { Plugin } from '../../entities/plugin/plugin';
|
|
2
2
|
import { DynamicExperiencesPluginOptions, FetchProjectOptions, ProjectConfig } from './types';
|
|
3
|
-
export declare function fetchProject(apiUrl: string, projectId: string, options?: FetchProjectOptions): Promise<ProjectConfig | null>;
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
* and registers features with deterministic bucket allocation.
|
|
4
|
+
* Fetches the project configuration from the Picked REST API.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Returns `null` on network failure, non-OK responses, or invalid JSON shape.
|
|
7
|
+
* Connection-refused errors from local URLs are suppressed silently.
|
|
8
|
+
* @param apiUrl - Base URL for the Picked API.
|
|
9
|
+
* @param projectId - Project ID to fetch config for.
|
|
10
|
+
* @param options - Optional headers and preview token.
|
|
11
|
+
* @returns Validated project config, or `null` on any failure.
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const config = await fetchProject('https://api.picked.app', 'proj_123')
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function fetchProject(apiUrl: string, projectId: string, options?: FetchProjectOptions): Promise<ProjectConfig | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Plugin that fetches project configuration from the Picked REST API and registers
|
|
20
|
+
* features, steps, fields, and experiences with the client.
|
|
10
21
|
*
|
|
22
|
+
* Features are fetched during the `onStart` hook, before experience initialisation.
|
|
23
|
+
* Search param feature overrides take precedence over API-provided values.
|
|
24
|
+
* @param options - Optional plugin configuration.
|
|
25
|
+
* @returns A configured Picked plugin.
|
|
11
26
|
* @example
|
|
12
27
|
* ```typescript
|
|
13
28
|
* import { dynamicExperiencesPlugin } from '@picked/client/plugins/dynamic-experiences'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dynamic-experiences/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dynamic-experiences/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACnB,aAAa,EAGd,MAAM,SAAS,CAAA;AAubhB;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAmC/B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,+BAA+B,GAAG,MAAM,CAgD1F"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { ExperienceStep } from '../../entities/step/step';
|
|
2
|
+
import { Field } from '../../entities/field/field';
|
|
3
|
+
import { ExperienceEdge, ExperienceNode, ExperienceAction, ExperienceTarget } from '../../entities/experience/experience';
|
|
4
|
+
import { Condition } from '../../entities/condition/condition';
|
|
5
|
+
import { LogicRule, LogicValue } from '../../logic-engine';
|
|
1
6
|
export interface ProjectConfigFeature {
|
|
2
7
|
id: string;
|
|
3
8
|
name: string;
|
|
@@ -5,8 +10,49 @@ export interface ProjectConfigFeature {
|
|
|
5
10
|
weight: number;
|
|
6
11
|
version: number;
|
|
7
12
|
}
|
|
13
|
+
export type ProjectConfigNode = ExperienceNode;
|
|
14
|
+
/**
|
|
15
|
+
* An experience payload as returned by the API.
|
|
16
|
+
* Steps are referenced by ID only; the full step definitions live in the
|
|
17
|
+
* top-level `steps` array of ProjectConfig.
|
|
18
|
+
* Conditions are referenced by nodes via `conditionalId`; the full condition
|
|
19
|
+
* definitions live in the top-level `conditions` array of ProjectConfig.
|
|
20
|
+
*/
|
|
21
|
+
export interface ProjectConfigExperience {
|
|
22
|
+
id: string;
|
|
23
|
+
key?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
/** Optional name of a pre-registered component to associate with this experience. */
|
|
26
|
+
componentName?: string;
|
|
27
|
+
/** IDs of features that gate this experience. */
|
|
28
|
+
featureIds?: string[];
|
|
29
|
+
nodes: ProjectConfigNode[];
|
|
30
|
+
edges: ExperienceEdge[];
|
|
31
|
+
actions?: ExperienceAction[];
|
|
32
|
+
/** Decision logic that controls whether this experience is initialised. */
|
|
33
|
+
condition?: LogicRule | LogicValue;
|
|
34
|
+
/** Logic that controls the initial open state of the experience. */
|
|
35
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
36
|
+
/** DOM targets this experience mounts into. */
|
|
37
|
+
targets?: ExperienceTarget[];
|
|
38
|
+
}
|
|
8
39
|
export interface ProjectConfig {
|
|
40
|
+
id?: string;
|
|
41
|
+
title?: string;
|
|
42
|
+
status?: string;
|
|
43
|
+
versionId?: string;
|
|
44
|
+
workspaceId?: string;
|
|
9
45
|
features: ProjectConfigFeature[];
|
|
46
|
+
/** Experience definitions with steps and conditions referenced by ID. */
|
|
47
|
+
experiences?: ProjectConfigExperience[];
|
|
48
|
+
/** Global step definitions shared across experiences. */
|
|
49
|
+
steps?: ExperienceStep[];
|
|
50
|
+
/** Global field definitions shared across steps. */
|
|
51
|
+
fields?: Field[];
|
|
52
|
+
/** Global condition definitions referenced by experience flow nodes. */
|
|
53
|
+
conditions?: Condition[];
|
|
54
|
+
/** Action definitions (properties to be documented in future scope). */
|
|
55
|
+
actions?: unknown[];
|
|
10
56
|
}
|
|
11
57
|
export interface DynamicExperiencesPluginOptions {
|
|
12
58
|
apiUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dynamic-experiences/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,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AC5B,2EAA2E;IAC3E,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IAClC,oEAAoE;IACpE,cAAc,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACvC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,oBAAoB,EAAE,CAAA;IAChC,yEAAyE;IACzE,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACvC,yDAAyD;IACzD,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,oDAAoD;IACpD,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;IAChB,wEAAwE;IACxE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;IACxB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Plugin } from '../../entities/plugin/plugin';
|
|
2
|
-
interface ExperienceBrowserStoragePlugin {
|
|
2
|
+
export interface ExperienceBrowserStoragePlugin {
|
|
3
3
|
storage?: 'local' | 'session';
|
|
4
4
|
}
|
|
5
5
|
export declare const experienceBrowserStoragePlugin: ({ storage, }?: ExperienceBrowserStoragePlugin) => Plugin;
|
|
6
|
-
export {};
|
|
7
6
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/experience-browser-storage/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/experience-browser-storage/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,8BAA8B,GAAI,eAE5C,8BAAmC,KAAG,MA6CxC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Plugin } from '../../entities/plugin/plugin';
|
|
2
|
-
interface HistoryBrowserStoragePlugin {
|
|
2
|
+
export interface HistoryBrowserStoragePlugin {
|
|
3
3
|
storage?: 'local' | 'session';
|
|
4
4
|
}
|
|
5
5
|
export declare const historyBrowserStoragePlugin: ({ storage, }?: HistoryBrowserStoragePlugin) => Plugin;
|
|
6
|
-
export {};
|
|
7
6
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/history-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/history-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,2BAA2B,GAAI,eAEzC,2BAAgC,KAAG,MA4BrC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Plugin } from '../../entities/plugin/plugin';
|
|
2
|
-
interface ResponsesBrowserStoragePlugin {
|
|
2
|
+
export interface ResponsesBrowserStoragePlugin {
|
|
3
3
|
storage?: 'local' | 'session';
|
|
4
4
|
}
|
|
5
5
|
export declare const responsesBrowserStoragePlugin: ({ storage, }?: ResponsesBrowserStoragePlugin) => Plugin;
|
|
6
|
-
export {};
|
|
7
6
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAkBD,eAAO,MAAM,6BAA6B,GAAI,eAE3C,6BAAkC,KAAG,MAsCvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-indexeddb/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,eAAO,MAAM,wBAAwB,QAAO,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-indexeddb/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,eAAO,MAAM,wBAAwB,QAAO,MA2E3C,CAAA"}
|
|
@@ -26,7 +26,7 @@ interface SinglePageAppPluginOptions {
|
|
|
26
26
|
* })
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare const singlePageAppPlugin: (
|
|
29
|
+
export declare const singlePageAppPlugin: (options: SinglePageAppPluginOptions) => Plugin;
|
|
30
30
|
export declare function instrumentHistory(callback: () => void): void;
|
|
31
31
|
export {};
|
|
32
32
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/single-page-app/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,UAAU,0BAA0B;IAClC;;;;OAIG;IACH,iBAAiB,EAAE,IAAI,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,GAAI,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/single-page-app/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,UAAU,0BAA0B;IAClC;;;;OAIG;IACH,iBAAiB,EAAE,IAAI,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,0BAA0B,KAAG,MAazE,CAAA;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAwC5D"}
|
|
@@ -14,6 +14,9 @@ export declare function createAppHosts(targets: (ExperienceTarget & {
|
|
|
14
14
|
elements: HTMLElement[];
|
|
15
15
|
})[], experienceId: string): HTMLElement[];
|
|
16
16
|
export declare function tagTargetElement(element: HTMLElement, experienceId: string): void;
|
|
17
|
+
export declare function isTaggedTarget(element: HTMLElement, experienceId?: string): boolean;
|
|
17
18
|
export declare function isPickedRoot(element: HTMLElement, experienceId?: string): boolean;
|
|
19
|
+
export declare function createPickedRoot(experienceId: string): HTMLDivElement;
|
|
20
|
+
export declare function createHostElement(target: HTMLElement | Document, placement: Placement, experienceId: string): HTMLElement;
|
|
18
21
|
export {};
|
|
19
22
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAGzE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAQ7D;AAID,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAMhE;AAED,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAa9C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,QAS1E;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAOtE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,EAAE,EACrD,YAAY,EAAE,MAAM,GACnB,CAAC,gBAAgB,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,EAAE,CAqBpD;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,CAAC,gBAAgB,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,EAAE,EAC3D,YAAY,EAAE,MAAM,iBAOrB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,E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C/B,MAAM,EAAE,WAAW,GAAG,QAAQ,EAC9B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,eA+BrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEvent, Store } from 'effector';
|
|
2
2
|
import { ValidationError } from '../entities/response/response';
|
|
3
|
-
import { ExperienceStep } from '../entities/
|
|
3
|
+
import { ExperienceStep } from '../entities/step/step';
|
|
4
4
|
import { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
5
5
|
import { ResolvedFeature } from '../entities/feature/feature';
|
|
6
6
|
import { Session } from './user-session';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,UAAU,CAAA;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,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kBAAkB,CAAA;QAC9B,IAAI,CAAC,EAAE,cAAc,CAAA;KACtB,CAAA;IACD,sBAAsB,EAAE;QACtB,SAAS,EAAE;YAAE,MAAM,EAAE,eAAe,EAAE,CAAA;SAAE,CAAA;QACxC,UAAU,EAAE,kBAAkB,CAAA;QAC9B,IAAI,CAAC,EAAE,cAAc,CAAA;KACtB,CAAA;IACD,SAAS,EAAE;QACT,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;QACvB,IAAI,EAAE,OAAO,CAAA;KACd,CAAA;CACF;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,UAAU,CAAA;AAE9C,MAAM,MAAM,eAAe,GAAG;KAC3B,CAAC,IAAI,eAAe,GAAG;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,KAAK,GACxF,MAAM,GACN,UAAU,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC,eAAe,CAAC,CAAA;AAElB,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,IAAI,CAAA;IACR,OAAO,EAAE,eAAe,CAAA;CACzB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAA;AAgB1D,eAAO,MAAM,kBAAkB,GAC7B,UAAU,UAAU,CAAC,OAAO,WAAW,CAAC,eAAe,CAAC,CAAC,KACxD,iBAoBF,CAAA"}
|
|
@@ -6,5 +6,6 @@ interface InternalGlobal {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const GLOBAL_OBJ: typeof globalThis & InternalGlobal;
|
|
8
8
|
export declare const bindClient: (client: Picked) => void;
|
|
9
|
+
export declare const getBoundClient: () => Picked;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=global-obj.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-obj.d.ts","sourceRoot":"","sources":["../../../src/utils/global-obj.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,QAAA,MAAM,YAAY,eAAmB,CAAA;AAErC,UAAU,cAAc;IACtB,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAGD,eAAO,MAAM,UAAU,EAAiB,OAAO,UAAU,GAAG,cAAc,CAAA;AAE1E,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,SAExC,CAAA"}
|
|
1
|
+
{"version":3,"file":"global-obj.d.ts","sourceRoot":"","sources":["../../../src/utils/global-obj.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,QAAA,MAAM,YAAY,eAAmB,CAAA;AAErC,UAAU,cAAc;IACtB,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAGD,eAAO,MAAM,UAAU,EAAiB,OAAO,UAAU,GAAG,cAAc,CAAA;AAE1E,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,SAExC,CAAA;AAED,eAAO,MAAM,cAAc,QAAO,MAMjC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface IndexedDBConfig {
|
|
1
|
+
export interface IndexedDBConfig {
|
|
2
2
|
storeName: string;
|
|
3
3
|
version?: number;
|
|
4
4
|
keyPath?: string | null;
|
|
@@ -8,5 +8,4 @@ export declare function getAllItems<T>(db: IDBDatabase, storeName: string): Prom
|
|
|
8
8
|
export declare function setItem<T>(db: IDBDatabase, storeName: string, value: T): Promise<void>;
|
|
9
9
|
export declare function clearItem(db: IDBDatabase, storeName: string, key: string): Promise<void>;
|
|
10
10
|
export declare function clearAllItems(db: IDBDatabase, storeName: string): Promise<void>;
|
|
11
|
-
export {};
|
|
12
11
|
//# sourceMappingURL=indexed-db.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexed-db.d.ts","sourceRoot":"","sources":["../../../src/utils/indexed-db.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"indexed-db.d.ts","sourceRoot":"","sources":["../../../src/utils/indexed-db.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAID,wBAAsB,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAgB1E;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAQrF;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ5F;AAED,wBAAsB,SAAS,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ9F;AAED,wBAAsB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQrF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @file Utility for converting human-readable names to kebab-case keys. */
|
|
2
|
+
/**
|
|
3
|
+
* Converts a human-readable name to a kebab-case key.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} name - The display name to convert (e.g. 'Email Address').
|
|
6
|
+
* @returns {string} Kebab-case key (e.g. 'email-address').
|
|
7
|
+
* @example
|
|
8
|
+
* nameToKey('Email Address') // 'email-address'
|
|
9
|
+
* nameToKey('Lead Capture') // 'lead-capture'
|
|
10
|
+
*/
|
|
11
|
+
export declare function nameToKey(name: string): string;
|
|
12
|
+
//# sourceMappingURL=key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../src/utils/key.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EACxC,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAClC,IAKF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"min-max-steps-to-leaf.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/min-max-steps-to-leaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"min-max-steps-to-leaf.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/min-max-steps-to-leaf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AA6D1F;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,CAAC,MAAM,EAAE,MAAM,CAEjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"min-max-steps-to-origin.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/min-max-steps-to-origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"min-max-steps-to-origin.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/min-max-steps-to-origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AA8D1F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,CAAC,MAAM,EAAE,MAAM,CAEjB,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ExperienceEdge, ExperienceNode } from '../../entities/experience/experience';
|
|
2
2
|
/**
|
|
3
3
|
* Given the current Node as the starting point, recursively traverses every branch
|
|
4
|
-
* of the tree until encountering nodes with
|
|
5
|
-
* Does not progress past a node with a
|
|
4
|
+
* of the tree until encountering nodes with stepKey properties.
|
|
5
|
+
* Does not progress past a node with a stepKey.
|
|
6
6
|
*
|
|
7
7
|
* @param nodes - Array of all nodes in the tree
|
|
8
8
|
* @param edges - Array of all edges connecting the nodes
|
|
9
9
|
* @param currentNode - The starting node for traversal
|
|
10
|
-
* @returns Array of nodes with
|
|
10
|
+
* @returns Array of nodes with stepKey properties that are descendants of the current node
|
|
11
11
|
*/
|
|
12
12
|
export declare const nextReachableStepNodes: (nodes: ExperienceNode[], edges: ExperienceEdge[], currentNode: ExperienceNode) => ExperienceNode[];
|
|
13
13
|
//# sourceMappingURL=next-reachable-step-nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-reachable-step-nodes.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/next-reachable-step-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"next-reachable-step-nodes.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/next-reachable-step-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAwC1F;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,cAAc,EAEhB,CAAA"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function isConditionNode(node: ExperienceNode): node is
|
|
1
|
+
import { ConditionNode, ExperienceNode, LaunchExperienceNode, OriginNode, StepNode, ActionNode } from '../entities/experience/experience';
|
|
2
|
+
export declare function isConditionNode(node: ExperienceNode): node is ConditionNode;
|
|
3
3
|
export declare function isStepNode(node: ExperienceNode): node is StepNode;
|
|
4
4
|
export declare function isLaunchExperienceNode(node: ExperienceNode): node is LaunchExperienceNode;
|
|
5
5
|
export declare function isOriginNode(node: ExperienceNode): node is OriginNode;
|
|
6
6
|
export declare function isActionNode(node: ExperienceNode): node is ActionNode;
|
|
7
|
+
/**
|
|
8
|
+
* Resolves the step key from a StepNode, falling back to the deprecated `stepId`
|
|
9
|
+
* for backwards compatibility with production projects that have not migrated yet.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveStepKey(node: StepNode): string;
|
|
7
12
|
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,mCAAmC,CAAA;AAE1C,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,aAAa,CAE3E;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,QAAQ,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,oBAAoB,CAEzF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,UAAU,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,UAAU,CAErE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAGrD"}
|
|
@@ -34,6 +34,14 @@ export declare function addNonEnumerableProperty(obj: object, name: string, valu
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function wrapFunction<F extends Function>(wrapped: F, original: F): void;
|
|
36
36
|
export declare function isWrappedFunction(fn: unknown): fn is WrappedFunction;
|
|
37
|
+
/**
|
|
38
|
+
* Gets a property from an object using a dot-separated path.
|
|
39
|
+
*
|
|
40
|
+
* @param obj the object to get the property from
|
|
41
|
+
* @param path the path to the property
|
|
42
|
+
* @param defaultValue the default value to return if the property is not found
|
|
43
|
+
*/
|
|
44
|
+
export declare function get<T = any, D = any>(obj: Record<string, any> | undefined, path: string, defaultValue?: D): T | D;
|
|
37
45
|
/**
|
|
38
46
|
* Checks if an object is empty (has no own enumerable properties).
|
|
39
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,QAAQ,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AO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQpE"}
|
|
@@ -4,7 +4,7 @@ declare global {
|
|
|
4
4
|
pickedConfig?: Partial<CreateClientOptions>;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export declare function getPickedConfig<ExtendedPickedConfig extends Record<string,
|
|
7
|
+
export declare function getPickedConfig<ExtendedPickedConfig extends Record<string, any> | undefined>(): Readonly<Partial<CreateClientOptions> & ExtendedPickedConfig> | undefined;
|
|
8
8
|
export declare function getCreateClientIds(options: CreateClientOptions): {
|
|
9
9
|
organizationId: string;
|
|
10
10
|
projectId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked-config.d.ts","sourceRoot":"","sources":["../../../src/utils/picked-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAGpD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;KAC5C;CACF;AAED,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"picked-config.d.ts","sourceRoot":"","sources":["../../../src/utils/picked-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAGpD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;KAC5C;CACF;AAED,wBAAgB,eAAe,CAAC,oBAAoB,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,+EAS3F;AAoCD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAChE,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB,CAuBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules-logic.d.ts","sourceRoot":"","sources":["../../../src/utils/rules-logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAGvC,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE/D;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"rules-logic.d.ts","sourceRoot":"","sources":["../../../src/utils/rules-logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAGvC,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE/D;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,WAAW,gKA2CtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-params.d.ts","sourceRoot":"","sources":["../../../src/utils/search-params.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;CACpC;AAED,wBAAgB,eAAe,IAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"search-params.d.ts","sourceRoot":"","sources":["../../../src/utils/search-params.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;CACpC;AAED,wBAAgB,eAAe,IAAI,kBAAkB,CAgCpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/utils/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAE7F;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,YAAY,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,MAAM,OAAO,CAAA;IAEpB;;;;;;;;;OASG;IACH,IAAI,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;IAEzB;;;;;;;;;OASG;IACH,IAAI,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IAEpB;;;;;;;;;OASG;IACH,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAA;IAE7B;;;;;;;;;;;;;;OAcG;IACH,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAE3C;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;CACrE;
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/utils/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAE7F;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,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AK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,cAwC1C;AA6ED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,YAAY;IACvB;;;;;;;;;;;;;OAaG;QACC,CAAC,iBAAiB,UAAU;IAIhC;;;;;;;;;;;;;;;OAeG;aACM,UAAU,SAAS,OAAO,cAAc,MAAM;IAIvD;;;;;;;;;;OAUG;gBACS,UAAU;IAItB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;cACO,CAAC,iBAAiB,UAAU,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI;CAGlF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,UAAU;IACrB;;;;;;;;;;;;;OAaG;QACC,CAAC,iBAAiB,UAAU;IAIhC;;;;;;;;;;;;;;;OAeG;aACM,UAAU,SAAS,OAAO,cAAc,MAAM;IAIvD;;;;;;;;;;OAUG;gBACS,UAAU;IAItB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;cACO,CAAC,iBAAiB,UAAU,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI;CAGlF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/client",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1773807602703",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@withease/factories": "^1.0.5"
|
|
6
6
|
},
|
|
@@ -94,25 +94,11 @@
|
|
|
94
94
|
"dist"
|
|
95
95
|
],
|
|
96
96
|
"knip": {
|
|
97
|
-
"ignoreFiles": [
|
|
98
|
-
"eslint.config.js"
|
|
99
|
-
],
|
|
100
97
|
"ignoreBinaries": [
|
|
101
98
|
"knip",
|
|
102
99
|
"jscpd",
|
|
103
100
|
"eslint",
|
|
104
|
-
"tsc"
|
|
105
|
-
"attw",
|
|
106
|
-
"size-limit"
|
|
107
|
-
],
|
|
108
|
-
"ignoreDependencies": [
|
|
109
|
-
"@repo/eslint-config",
|
|
110
|
-
"@repo/typescript-config",
|
|
111
|
-
"@testing-library/dom",
|
|
112
|
-
"@vitest/browser",
|
|
113
|
-
"size-limit",
|
|
114
|
-
"tslib",
|
|
115
|
-
"@vitest/coverage-v8"
|
|
101
|
+
"tsc"
|
|
116
102
|
]
|
|
117
103
|
},
|
|
118
104
|
"main": "./dist/cjs/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("effector"),W=require("@withease/factories"),j=require("./supports-YvpQZxbh.cjs"),I=require("./logger-BsmHUUw1.cjs"),xe=require("./object-mwaxtjLG.cjs");function Ne(e){return typeof e=="number"&&!isNaN(e)}function R(e){return typeof e=="string"}function N(e){return Array.isArray(e)}function ue(e){return e instanceof Promise}function ie(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function S(e){if(Ne(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function M(e){return`${e}`}const Ie={"==":(e,t)=>e==t,"===":(e,t)=>e===t,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,">":(e,t)=>S(e)>S(t),">=":(e,t)=>S(e)>=S(t),"<":(e,t,r)=>{const n=S(e),c=S(t);if(r===void 0)return n<c;const a=S(r);return n<c&&c<a},"<=":(e,t,r)=>{const n=S(e),c=S(t);if(r===void 0)return n<=c;const a=S(r);return n<=c&&c<=a},"!!":async e=>await v(e),"!":async e=>!await v(e),"%":(e,t)=>S(e)%S(t),log:e=>(console.log(e),e),in:(e,t)=>t?R(t)?t.indexOf(M(e))!==-1:N(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(M).join(""),substr:(e,t,r)=>{const n=M(e),c=S(t);if(r===void 0)return n.substr(c);const a=S(r);if(a<0){const o=n.substr(c);return o.substr(0,o.length+a)}return n.substr(c,a)},"+":(...e)=>e.reduce((t,r)=>S(t)+S(r),0),"*":(...e)=>e.reduce((t,r)=>S(t)*S(r),1),"-":(e,t)=>{const r=S(e);return t===void 0?-r:r-S(t)},"/":(e,t)=>S(e)/S(t),min:(...e)=>Math.min(...e.map(S)),max:(...e)=>Math.max(...e.map(S)),merge:(...e)=>e.reduce((t,r)=>N(r)?t.concat(r):t.concat([r]),[]),var(e,t){const r=arguments.length>1?t:null;if(e===""||e==="."||e===null||e===void 0)return this;if(typeof e=="number"&&Array.isArray(this))return e>=0&&e<this.length?this[e]:r;const n=M(e);if(n===""||n===".")return this;const c=n.split(".");let a=this;for(const o of c){if(a==null)return r;if(Array.isArray(a)){const l=parseInt(o,10);isNaN(l)?a=a[o]:a=a[l]}else a=a[o]}return a!==void 0?a:r},async missing(...e){const t=N(e[0])?e[0]:e,r=[];for(const n of t){const c=await g({var:n},this);(c===null||c==="")&&r.push(`${n}`)}return r},async missing_some(e,t){const r=await g({missing:t},this);if(!N(r)||!N(t))return[];const n=r.filter(R);return t.filter(R).length-n.length>=S(e)?[]:n},invoke(...e){const[t,...r]=e;return typeof t!="function"?null:Reflect.apply(t,null,r)},regexp_matches(e,t){let r=e,n="";if(N(e)){const[a,o]=e;r=a,n=o}return!R(r)||!R(n)?!1:new RegExp(r,n).test(M(t))},throw(e){throw new Error(M(e))}};async function g(e,t){if(!e)return e;if(ue(e))return g(await e,t);if(N(e))return Promise.all(e.map(o=>g(o,t)));if(!ie(e))return e;const r=ke(e);let n=r?e[r]??[]:[];switch(N(n)||(n=[n]),r){case"if":case"?:":for(let o=0;o<n.length-1;o+=2)if(await v(await g(n[o],t)))return g(n[o+1],t);return n.length%2===1?g(n[n.length-1],t):null;case"and":{let o=null;for(const l of n)if(o=await g(l,t),!await v(o))return o;return o}case"or":{let o=null;for(const l of n)if(o=await g(l,t),await v(o))return o;return o}case"map":{const o=await g(n[0],t);return N(o)?await Promise.all(o.map(l=>g(n[1],l))):[]}case"filter":{const o=await g(n[0],t);return N(o)?(await Promise.all(o.map(async p=>{const m=await v(await g(n[1],p));return{item:p,shouldInclude:m}}))).filter(({shouldInclude:p})=>p).map(({item:p})=>p):[]}case"reduce":{const o=await g(n[0],t);if(!N(o))return n.length>2?await g(n[2],t):null;const l=n[1];let m=n.length>2?await g(n[2],t):null;for(const E of o)m=await g(l,{current:E,accumulator:m});return m}case"all":{const o=await g(n[0],t);if(!N(o)||o.length===0)return!1;for(const l of o)if(!await v(await g(n[1],l)))return!1;return!0}case"some":{const o=await g(n[0],t);if(!N(o))return!1;for(const l of o)if(await v(await g(n[1],l)))return!0;return!1}case"none":{const o=await g(n[0],t);if(!N(o))return!0;for(const l of o)if(await v(await g(n[1],l)))return!1;return!0}case"catch":try{return await g(n[0],t)}catch(o){return ie(o)?await g(o,t):n[1]?await g(n[1],o):o instanceof Error?o.message:o}}const c=await Promise.all(n.map(o=>g(o,t))),a=r?Ie[r]:void 0;if(!a)throw new Error(`Unrecognized operation ${r}`);return a.apply(t,c)}async function v(e){return ue(e)?v(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function ke(e){return Object.keys(e)[0]}function fe(e){return!xe.isEmpty(e)}async function Y(e,t,r){const n=e.getStateSnapshot(),c=e.predicates.listStore.getState().reduce((p,m)=>({...p,[m.name]:(...E)=>m.predicate({...n,args:E})}),{}),a=e.features.listStore.getState().reduce((p,m)=>({...p,[m.id]:async()=>{const{bucket:E}=await m.getBucket();return E}}),{}),o=e.actions.listStore.getState().reduce((p,m)=>({...p,[m.name]:E=>m.action(E)}),{}),l={responses:e.responses.getAllStore.getState(),location:typeof n.location=="object"?{hash:n.location.hash,host:n.location.host,hostname:n.location.hostname,href:n.location.href,origin:n.location.origin,pathname:n.location.pathname,port:n.location.port,protocol:n.location.protocol,search:n.location.search}:void 0,predicates:c,features:a,actions:o,...r};return await g(t,l)}function ve(e){return!j.supportsWindow()||!j.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}const be="open";function Ae(e){if(!j.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:be})}function Oe(){return new Promise((e,t)=>{if(!j.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function Fe(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const q="picked-root",U="picked-target",_e="picked-root";function Be(e,t){return[...e,{selector:`${_e}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const c=ve(n.selector).filter(a=>!Me(a,t)&&!le(a,t));return{...n,elements:c}})}function $e(e,t){return e.flatMap(r=>r.elements.map(n=>De(n,r.placement,t)))}function Te(e,t){e.classList.add(U),e.classList.add(`${U}-${t}`)}function Me(e,t){return t?e.classList.contains(`${U}-${t}`):e.classList.contains(`${U}`)}function le(e,t){return t?e.classList.contains(`${q}-${t}`):e.classList.contains(q)}function Le(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(q),t.classList.add(`${q}-${e}`),t}function De(e,t,r){let n;const c=Le(r);if(e instanceof Document)n=e.body.appendChild(c);else{switch(t){case"replace":e.replaceWith(c);break;case"before":e.before(c);break;case"after":e.after(c);break;case"prepend":e.prepend(c);break;case"append":e.append(c);break}n=c}return n}function se(e){return e.type==="conditional"}function _(e){return e.type==="step"}function ce(e){return e.type==="experience"}function J(e){return e.type==="origin"}function ae(e){return e.type==="action"}const de=(e,t,r,n,c=new Set)=>c.has(r.id)?[]:(c.add(r.id),_(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const l=e.find(p=>p.id===o.destinationNodeId);return l?de(e,t,l,!1,c):[]})),Re=(e,t,r)=>de(e,t,r,!0,new Set),pe=(e,t,r,n,c=new Set)=>{if(c.has(r.id))return[-1,-1];c.add(r.id);const a=t.filter(p=>p.sourceNodeId===r.id);if(a.length===0)return[0,0];let o=1/0,l=-1/0;for(const p of a){const m=e.find(B=>B.id===p.destinationNodeId);if(!m)continue;const[E,A]=pe(e,t,m,!1,new Set(c));E!==-1&&(o=Math.min(o,E+1),l=Math.max(l,A+1))}return o===1/0?[-1,-1]:[o,l]},Pe=(e,t,r)=>pe(e,t,r,!0,new Set),ge=(e,t,r,n=new Set)=>{if(n.has(r.id))return[-1,-1];if(n.add(r.id),r.type==="origin")return[0,0];const c=t.filter(l=>l.destinationNodeId===r.id);if(c.length===0)return[-1,-1];let a=1/0,o=-1/0;for(const l of c){const p=e.find(A=>A.id===l.sourceNodeId);if(!p)continue;const[m,E]=ge(e,t,p,new Set(n));m!==-1&&(a=Math.min(a,m+1),o=Math.max(o,E+1))}return a===1/0?[-1,-1]:[a,o]},He=(e,t,r)=>ge(e,t,r,new Set),me=e=>e.find(r=>r.type==="origin")||null,Q=(e,t,r)=>{if(!e)return me(t);const n=r.find(a=>a.sourceNodeId===e.id);if(!n)return null;const c=t.find(a=>a.id===n.destinationNodeId);return c||null};async function Ce(e,t,r,n){const c=e?"true":"false",a=n.find(o=>o.sourceNodeHandle===c&&o.sourceNodeId===t);return r.find(o=>o.id===a?.destinationNodeId)}const Z=s.createDomain("experience-instance"),je=W.createFactory(({client:e,experience:t,target:r,options:n})=>{const c=s.createEvent(),a=s.createEvent(),o=s.createEvent(),l=s.createEvent(),p=s.createEvent(),m=s.createEvent(),E=t.componentStore,A=Z.store("transitioning"),B=e.history.entriesStore.map(i=>i.filter(d=>d.experienceId===t.id)),P=B.map(i=>i.filter(d=>_(d.node))),u=B.map(i=>i.at(-1)?.node||null),h=s.combine(t.treeStore,u,({steps:i},d)=>i.find(f=>d&&_(d)&&f.id===d.stepId)||null),x=s.combine(t.treeStore,P,({steps:i},d)=>{const f=d.at(-2);if(!f||!_(f.node))return null;const y=f.node;return i.find(O=>O.id===y.stepId)||null}),$=s.combine(t.treeStore,u,({nodes:i,edges:d},f)=>f?Re(i,d,f):[]),L=s.combine(t.treeStore,u,({nodes:i,edges:d},f)=>f?He(i,d,f):[-1,-1]),G=s.combine(t.treeStore,u,({nodes:i,edges:d},f)=>f?Pe(i,d,f):[-1,-1]),T=Z.store(!1),H=s.createApi(T,{open:()=>!0,close:()=>!1,toggle:i=>!i,set:(i,d)=>d}),he=s.createEffect(async()=>{e.history.back({experienceId:t.id})}),ye=s.attach({source:t.treeStore,effect:async(i,d)=>{const f=i.nodes.find(y=>_(y)&&y.stepId===d);f&&e.history.push({experienceId:t.id,node:f})}}),ee=s.attach({source:u,effect:i=>{}}),K=s.attach({source:t.treeStore,effect:async({nodes:i})=>me(i)}),V=s.attach({source:t.treeStore,effect:async({nodes:i,edges:d},f)=>{if(J(f))return Q(f,i,d)}}),z=s.attach({source:t.treeStore,effect:async({nodes:i,edges:d,conditionals:f},y)=>{if(!se(y))return;const O=f.find(b=>b.id===y.conditionalId);if(!O)return;const k=y.id,w=await Y(e,O.condition);return Ce(!!w,k,i,d)}}),te=s.attach({source:t.treeStore,effect:async({nodes:i,edges:d},f)=>{if(!ae(f))return;const y=f.action;if(!y){I.logger("warn",`Action node ${f.id} has no action name`);return}const O=e.actions.getByName(y).getState();if(!O){I.logger("warn",`Action '${y}' not registered on client`);const k=d.find(w=>w.sourceNodeId===f.id&&w.sourceNodeHandle==="false");return k?i.find(w=>w.id===k.destinationNodeId):null}if(typeof O.action!="function"){I.logger("warn",`Action '${y}' is not a function`);const k=d.find(w=>w.sourceNodeId===f.id&&w.sourceNodeHandle==="false");return k?i.find(w=>w.id===k.destinationNodeId):null}try{I.logger("info",`Executing action: ${y}`),await O.action(y);const k=d.find(b=>b.sourceNodeId===f.id&&b.sourceNodeHandle==="true");if(!k)return I.logger("warn",`No 'true' edge found for action node ${f.id}`),null;const w=i.find(b=>b.id===k.destinationNodeId);return I.logger("info",`Action '${y}' succeeded, moving to node ${w?.id}`),w||null}catch(k){I.logger("warn",`Action '${y}' failed:`,k);const w=d.find(C=>C.sourceNodeId===f.id&&C.sourceNodeHandle==="false");if(!w)return I.logger("warn",`No 'false' edge found for action node ${f.id}`),null;const b=i.find(C=>C.id===w.destinationNodeId);return I.logger("info",`Action '${y}' failed, moving to node ${b?.id}`),b||null}}}),we=s.createEffect(i=>{ce(i)&&e.experiences.launch({id:i.experienceId})}),ne=s.attach({source:[u,t.treeStore],effect:async([i,{nodes:d,edges:f}])=>Q(i,d,f)}),D=s.attach({source:[u,t.treeStore],effect:async([i,{nodes:d,edges:f}])=>Q(i,d,f)}),Ee=s.createEffect(i=>{e.history.push({experienceId:t.id,node:i})}),re=s.attach({source:t.configStore,effect:async({initializeOpenLogic:i})=>n?.initialiseOpen!==void 0?n.initialiseOpen:fe(i)?!!await Y(e,i):i??!1}),F=Object.freeze({id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:E,stateStore:A,isOpenStore:T,open:H.open,close:H.close,toggleOpen:H.toggle,setOpen:H.set,treeStore:t.treeStore,fieldsStore:t.fieldsStore,currentNodeStore:u,currentStepStore:h,previousStepStore:x,nextReachableStepNodesStore:$,stepsToOriginStore:L,stepsToLeafStore:G,goToNextStep:a,goToPreviousStep:o,goToStepById:l,stepsHistoryStore:P}),X=s.createEvent(),oe=s.createEvent();return s.sample({source:u,target:X}),s.sample({clock:X,filter:i=>i===null,target:K}),s.sample({clock:X,filter:i=>i!==null,target:oe}),s.split({source:oe,match:i=>se(i)?"condition":_(i)?"step":ce(i)?"launchExperience":J(i)?"origin":ae(i)?"action":"other",cases:{origin:V,condition:z,step:ee,launchExperience:we,action:te,__:s.createEvent()}}),s.sample({clock:[z.doneData,V.doneData,K.doneData,D.doneData,ne.doneData,te.doneData],filter:Boolean,target:Ee}),s.sample({clock:a,target:D}),s.sample({clock:a,source:h,filter:Boolean,target:e.eventBus.prepend(i=>({type:"step_submit",step:i,experience:F}))}),s.sample({clock:D.done,source:h,filter:Boolean,target:e.eventBus.prepend(i=>({type:"step_submit_success",step:i,experience:F}))}),s.sample({clock:D.fail,source:h,filter:Boolean,target:e.eventBus.prepend(i=>({type:"step_submit_error",step:i,experience:F}))}),s.sample({clock:o,target:he}),s.sample({clock:l,target:ye}),s.sample({source:s.combine([z.pending,V.pending,K.pending,D.pending]),fn:i=>i.some(Boolean)?"transitioning":"ready",target:A}),s.sample({clock:ee.doneData,source:h,filter:Boolean,target:e.eventBus.prepend(i=>({type:"step_enter",step:i,experience:F}))}),s.sample({clock:m,target:re}),s.sample({source:re.doneData,fn:Boolean,target:T}),s.sample({source:u,clock:c,filter:i=>i?J(i):!0,target:ne}),s.sample({source:T,filter:Boolean,target:c}),s.sample({source:T,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:F}))}),s.sample({source:T,filter:i=>!i,target:e.eventBus.prepend(()=>({type:"experience_close",experience:F}))}),s.sample({clock:p,target:[m]}),p(),F});function Se(e){return W.invoke(je,e)}const qe=W.createFactory(({client:e})=>{const t=Z.store({}),r=s.createEvent(),n=s.createEvent(),c=s.createEvent(),a=s.createApi(t,{register(u,h){const x=[...u[h.experienceId]??[]];return x.push(h),{...u,[h.experienceId]:x}},unregister(u,h){const x=h.experienceId,$=u[x]?.filter(L=>L!==h);return{...u,[x]:$??[]}}}),o=s.createEffect(({experience:u,target:h,options:x})=>Se({client:e,experience:u,target:h,options:x})),l=s.createEffect(u=>{a.register(u)}),p=s.createEffect(u=>{u.target&&Fe(u.target,()=>{c(u)})}),m=s.createEffect(u=>{a.unregister(u)}),E=s.createEffect(u=>{const h=u.componentStore.getState();if(!h){I.logger("warn","No app component registered. Skipping init.");return}const x=h.frameworkStore.getState();if(!x){I.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const $=u.target;if(!$){I.logger("error",`No target element registered for experience '${u.experienceId}'. Skipping rendering.`);return}const L=Ae($);try{x.render(L,h.component,e,u)}catch(G){I.logger("error",G)}});s.sample({clock:r,target:o}),s.sample({clock:c,target:m}),s.sample({clock:o.doneData,target:[l,p,n]}),s.sample({clock:o.doneData,target:e.eventBus.prepend(u=>({type:"experience_initialize",experience:u}))}),s.sample({clock:n,target:E});function A(u,h,x){r({experience:u,target:h,options:x})}const B=t.map(u=>Object.values(u).flat());function P(u){return t.map(h=>h[u]||[],{skipVoid:!1})}return{spawn:A,getByExperienceId:P,listStore:B}});function Ue(e){return W.invoke(qe,e)}exports.createAppHosts=$e;exports.createExperienceInstance=Se;exports.createExperienceInstanceIndex=Ue;exports.domInteractive=Oe;exports.evaluateRuleLogic=Y;exports.getTargetElements=Be;exports.isPickedRoot=le;exports.isRulesLogic=fe;exports.isStepNode=_;exports.tagTargetElement=Te;
|
package/dist/object-mwaxtjLG.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function c(t,e,n){if(!(e in t))return;const o=t[e];if(typeof o!="function")throw new Error(`Expected '${String(e)}' to be a function`);const r=n(o);p(r,o),t[e]=r}function i(t,e,n){Object.defineProperty(t,e,{enumerable:!1,value:n,writable:!0,configurable:!0})}function p(t,e){const n=e.prototype||{};e.prototype=n,t.prototype=n,i(t,"__picked_original",e)}function u(t){return t===void 0||typeof t=="object"&&t!==null&&t.constructor===Object&&Object.keys(t).length===0}exports.isEmpty=u;exports.patchMethod=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const p=e=>btoa([...e].map(t=>String.fromCharCode(t.charCodeAt(0)^7)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");function w(e,t="global",o){let r="pckd";if(t==="experience"){if(!o)throw new Error("Experience instance is required to scope storage to an experience");r=`${r}:${o.experienceId}`}return{_:`${r}:${p(e)}`,scope:t}}const u=new Map;function m(e,t){const o=u.get(e._);o&&o.forEach(r=>r(e,t))}function S(e,t,o,r){const i=o==="local"?localStorage:sessionStorage,c=typeof t!="string"?JSON.stringify(t):t;if(i.setItem(e._,c),typeof r=="number"){const l=new Date(Date.now()+r).toISOString();i.setItem(`${e._}:expires-at`,l)}m(e,o)}function b(e,t){const o=t==="local"?localStorage:sessionStorage;o.removeItem(e._),o.removeItem(`${e._}:expires-at`),m(e,t)}function f(e,t,o,r){const i=t==="local"?localStorage:sessionStorage;function c(n){n.storageArea===i&&n.key===e._&&r(o(e))}function a(n,s){s===t&&r(o(n))}window.addEventListener("storage",c),u.has(e._)||u.set(e._,new Set);const l=u.get(e._);return l&&l.add(a),function(){window.removeEventListener("storage",c);const s=u.get(e._);s&&(s.delete(a),s.size===0&&u.delete(e._))}}function g(e,t){const o=t==="local"?localStorage:sessionStorage,r=o.getItem(e._),i=o.getItem(`${e._}:expires-at`),c=(n,s)=>S(e,n,t,s),a=()=>b(e,t),l=n=>f(e,t,s=>g(s,t),n);if(i){const n=new Date,s=new Date(i);if(n>s)return b(e,t),{isSet:()=>!1,text:()=>null,json:()=>null,boolean:()=>null,set:c,remove:a,subscribe:l}}return{isSet(){return r!==null},text(){return r},json(){return r?JSON.parse(r):null},boolean(){return r?r==="true":null},set:c,remove:a,subscribe:l}}const d={get(e){return g(e,"session")},set(e,t,o){S(e,t,"session",o)},remove(e){b(e,"session")},subscribe(e,t){return f(e,"session",this.get,t)}},_={get(e){return g(e,"local")},set(e,t,o){S(e,t,"local",o)},remove(e){b(e,"local")},subscribe(e,t){return f(e,"local",this.get,t)}};exports.createStorageKey=w;exports.localStore=_;exports.sessionStore=d;exports.subscribe=f;
|