@picked/client 0.0.1-dev.1774224866171 → 0.0.1-dev.1774244905386

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.
Files changed (119) hide show
  1. package/dist/{api-ZK-H-MlI.js → api-ENA5t36y.js} +1 -1
  2. package/dist/{api-WKe5XBeR.cjs → api-dkMxUUe0.cjs} +1 -1
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/plugins/create-experience/index.js +1 -1
  5. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  6. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  7. package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
  8. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  9. package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
  10. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  11. package/dist/cjs/plugins/web-components/index.js +1 -1
  12. package/dist/cjs/server/index.js +1 -1
  13. package/dist/esm/index.js +503 -426
  14. package/dist/esm/plugins/create-experience/index.js +352 -281
  15. package/dist/esm/plugins/dynamic-experiences/index.js +53 -30
  16. package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
  17. package/dist/esm/plugins/history-browser-storage/index.js +1 -1
  18. package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
  19. package/dist/esm/plugins/responses-indexeddb/index.js +9 -5
  20. package/dist/esm/plugins/single-page-app/index.js +4 -4
  21. package/dist/esm/plugins/web-components/index.js +1 -1
  22. package/dist/esm/server/index.js +1 -1
  23. package/dist/experience-instance-BODAwa-_.js +713 -0
  24. package/dist/experience-instance-DImQh64e.cjs +1 -0
  25. package/dist/object-BReQiaSS.cjs +1 -0
  26. package/dist/{object-C82v79xc.js → object-Clj5zVr1.js} +1 -2
  27. package/dist/storage-BFjb8azI.cjs +1 -0
  28. package/dist/{storage-6Xk0uAxB.js → storage-DyxpJ0pg.js} +1 -3
  29. package/dist/types/entities/action/action.d.ts.map +1 -1
  30. package/dist/types/entities/condition/condition.d.ts +17 -0
  31. package/dist/types/entities/condition/condition.d.ts.map +1 -0
  32. package/dist/types/entities/experience/experience.d.ts +36 -59
  33. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  34. package/dist/types/entities/experience-instance/experience-instance.d.ts +2 -2
  35. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  36. package/dist/types/entities/feature/feature.d.ts.map +1 -1
  37. package/dist/types/entities/field/field.d.ts +17 -12
  38. package/dist/types/entities/field/field.d.ts.map +1 -1
  39. package/dist/types/entities/history/history.d.ts.map +1 -1
  40. package/dist/types/entities/project/project.d.ts +9 -0
  41. package/dist/types/entities/project/project.d.ts.map +1 -0
  42. package/dist/types/entities/response/response.d.ts +10 -7
  43. package/dist/types/entities/response/response.d.ts.map +1 -1
  44. package/dist/types/entities/step/step.d.ts +38 -0
  45. package/dist/types/entities/step/step.d.ts.map +1 -0
  46. package/dist/types/index.d.ts +3 -1
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/logic-engine.d.ts +8 -2
  49. package/dist/types/logic-engine.d.ts.map +1 -1
  50. package/dist/types/picked.d.ts +61 -52
  51. package/dist/types/picked.d.ts.map +1 -1
  52. package/dist/types/plugins/create-experience/create-experience.d.ts +81 -50
  53. package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
  54. package/dist/types/plugins/create-experience/index.d.ts +2 -2
  55. package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
  56. package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
  57. package/dist/types/plugins/dynamic-experiences/plugin.d.ts +21 -4
  58. package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
  59. package/dist/types/plugins/dynamic-experiences/types.d.ts +47 -0
  60. package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
  61. package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -2
  62. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
  63. package/dist/types/plugins/history-browser-storage/plugin.d.ts +0 -1
  64. package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
  65. package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -2
  66. package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
  67. package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
  68. package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
  69. package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
  70. package/dist/types/utils/dom.d.ts +3 -0
  71. package/dist/types/utils/dom.d.ts.map +1 -1
  72. package/dist/types/utils/events.d.ts +2 -2
  73. package/dist/types/utils/events.d.ts.map +1 -1
  74. package/dist/types/utils/global-obj.d.ts +1 -0
  75. package/dist/types/utils/global-obj.d.ts.map +1 -1
  76. package/dist/types/utils/indexed-db.d.ts +1 -2
  77. package/dist/types/utils/indexed-db.d.ts.map +1 -1
  78. package/dist/types/utils/key.d.ts +12 -0
  79. package/dist/types/utils/key.d.ts.map +1 -0
  80. package/dist/types/utils/logger.d.ts.map +1 -1
  81. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
  82. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
  83. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +3 -3
  84. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
  85. package/dist/types/utils/nodes.d.ts +25 -2
  86. package/dist/types/utils/nodes.d.ts.map +1 -1
  87. package/dist/types/utils/object.d.ts +8 -0
  88. package/dist/types/utils/object.d.ts.map +1 -1
  89. package/dist/types/utils/picked-config.d.ts +1 -1
  90. package/dist/types/utils/picked-config.d.ts.map +1 -1
  91. package/dist/types/utils/search-params.d.ts.map +1 -1
  92. package/dist/types/utils/storage.d.ts.map +1 -1
  93. package/package.json +1 -11
  94. package/dist/cjs/form/index.js +0 -1
  95. package/dist/esm/form/index.js +0 -428
  96. package/dist/experience-instance-DZiAwXph.js +0 -481
  97. package/dist/experience-instance-Ddk4Jktn.cjs +0 -1
  98. package/dist/object-CUJOjanb.cjs +0 -1
  99. package/dist/rules-logic-B7vJrWyO.js +0 -231
  100. package/dist/rules-logic-CXr4wXcG.cjs +0 -1
  101. package/dist/storage-B6lQtc4-.cjs +0 -1
  102. package/dist/types/form/build-responses.d.ts +0 -14
  103. package/dist/types/form/build-responses.d.ts.map +0 -1
  104. package/dist/types/form/create-field-evaluator.d.ts +0 -19
  105. package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
  106. package/dist/types/form/create-field-validation.d.ts +0 -44
  107. package/dist/types/form/create-field-validation.d.ts.map +0 -1
  108. package/dist/types/form/create-form.d.ts +0 -66
  109. package/dist/types/form/create-form.d.ts.map +0 -1
  110. package/dist/types/form/create-submit-pipeline.d.ts +0 -58
  111. package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
  112. package/dist/types/form/get-step-fields.d.ts +0 -5
  113. package/dist/types/form/get-step-fields.d.ts.map +0 -1
  114. package/dist/types/form/index.d.ts +0 -10
  115. package/dist/types/form/index.d.ts.map +0 -1
  116. package/dist/types/plugins/create-experience/serialization.d.ts +0 -6
  117. package/dist/types/plugins/create-experience/serialization.d.ts.map +0 -1
  118. /package/dist/{id-CRqy981z.js → id-BniPxOdF.js} +0 -0
  119. /package/dist/{id-Bv44ilEo.cjs → id-CIbS4P60.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dynamic-experiences/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACnB,aAAa,EAEd,MAAM,SAAS,CAAA;AA8JhB,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;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,+BAA+B,GAAG,MAAM,CAoC1F"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dynamic-experiences/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACnB,aAAa,EAGd,MAAM,SAAS,CAAA;AAoUhB;;;;;;;;;;;;;;GAcG;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;;;;;;;;;;;;;;;;;;;GAmBG;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,50 @@ 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 `conditionId`; 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
+ key: string;
42
+ name: string;
43
+ status: string;
44
+ versionId: string | null;
45
+ workspaceId: string;
9
46
  features: ProjectConfigFeature[];
47
+ /** Experience definitions with steps and conditions referenced by ID. */
48
+ experiences?: ProjectConfigExperience[];
49
+ /** Global step definitions shared across experiences. */
50
+ steps?: ExperienceStep[];
51
+ /** Global field definitions shared across steps. */
52
+ fields?: Field[];
53
+ /** Global condition definitions referenced by experience flow nodes. */
54
+ conditions?: Condition[];
55
+ /** Action definitions (properties to be documented in future scope). */
56
+ actions?: unknown[];
10
57
  }
11
58
  export interface DynamicExperiencesPluginOptions {
12
59
  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,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,oBAAoB,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAED,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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,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,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,UAAU,8BAA8B;IACtC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,8BAA8B,GAAI,eAE5C,8BAAmC,KAAG,MA6CxC,CAAA"}
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,5 +1,4 @@
1
1
  import { Plugin } from '../../entities/plugin/plugin';
2
- /** @public */
3
2
  export interface HistoryBrowserStoragePlugin {
4
3
  storage?: 'local' | 'session';
5
4
  }
@@ -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,cAAc;AACd,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,2BAA2B,GAAI,eAEzC,2BAAgC,KAAG,MA4BrC,CAAA"}
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,UAAU,6BAA6B;IACrC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAkBD,eAAO,MAAM,6BAA6B,GAAI,eAE3C,6BAAkC,KAAG,MAsCvC,CAAA"}
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,MAuE3C,CAAA"}
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: (_options: SinglePageAppPluginOptions) => Plugin;
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,UAAU,0BAA0B,KAAG,MAa1E,CAAA;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAwC5D"}
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,EAAE,YAAY,EAAE,MAAM,QAG1E;AAUD,wBAAgB,Y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AMpD;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,GAAG,QAAQ,EAC9B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,eA+BrB"}
@@ -1,6 +1,6 @@
1
- import { Store, createEvent } from 'effector';
1
+ import { createEvent, Store } from 'effector';
2
2
  import { ValidationError } from '../entities/response/response';
3
- import { ExperienceStep } from '../entities/experience/experience';
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":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACvE,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,WAAW,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/B,cAAc,EAAE;QAAE,OAAO,EAAE,eAAe,CAAA;KAAE,CAAA;IAC5C,qBAAqB,EAAE;QAAE,U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e,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,UAAU,eAAe;IACvB,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"}
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":"AAGA,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EACxC,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAClC,IAOF,CAAA"}
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;AA4D1F;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,CAAC,MAAM,EAAE,MAAM,CAEjB,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;AA6D1F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,CAAC,MAAM,EAAE,MAAM,CAEjB,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 stepId properties.
5
- * Does not progress past a node with a stepId.
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 stepId properties that are descendants of the current node
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;AAuC1F;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,cAAc,EAAE,EACvB,OAAO,cAAc,EAAE,EACvB,aAAa,cAAc,KAC1B,cAAc,EAEhB,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,30 @@
1
- import { ConditionalNode, ExperienceNode, LaunchExperienceNode, OriginNode, StepNode, ActionNode } from '../entities/experience/experience';
2
- export declare function isConditionNode(node: ExperienceNode): node is ConditionalNode;
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
+ * @param node - The step node to resolve the key from.
12
+ * @returns The step key string.
13
+ * @example
14
+ * ```typescript
15
+ * resolveStepKey({ id: 'n1', type: 'step', stepKey: 'welcome' }) // 'welcome'
16
+ * ```
17
+ */
18
+ export declare function resolveStepKey(node: StepNode): string;
19
+ /**
20
+ * Resolves the condition ID from a ConditionNode.
21
+ *
22
+ * @param node - The condition node to resolve the ID from.
23
+ * @returns The condition ID string.
24
+ * @example
25
+ * ```typescript
26
+ * resolveConditionId({ id: 'n1', type: 'condition', conditionId: 'cond-1' }) // 'cond-1'
27
+ * ```
28
+ */
29
+ export declare function resolveConditionId(node: ConditionNode): string;
7
30
  //# 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,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,mCAAmC,CAAA;AAE1C,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,eAAe,CAE7E;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"}
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;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAGrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAE9D"}
@@ -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,GAAG,QAAQ,IAAI,CAAC,GAAG;IAC/D,iBAAiB,EAAE,CAAC,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;GAYG;AAEH,wBAAgB,WAAW,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,CAAC,SAAS,MAAM,CAAC,EAC7E,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,CAAC,EACP,kBAAkB,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAC5C,IAAI,CAiBN;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,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CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EAClC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,EACpC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,CAAC,GACf,CAAC,GAAG,CAAC,CAMP;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,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, unknown> | undefined>(): Readonly<Partial<CreateClientOptions> & ExtendedPickedConfig> | undefined;
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,CAC7B,oBAAoB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+EAUjE;AAoCD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAChE,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB,CAuBA"}
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":"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,CAiCpD"}
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,G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AW,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.1774224866171",
3
+ "version": "0.0.1-dev.1774244905386",
4
4
  "dependencies": {
5
5
  "@withease/factories": "^1.0.5"
6
6
  },
@@ -88,12 +88,6 @@
88
88
  "import": "./dist/esm/plugins/dynamic-experiences/index.js",
89
89
  "require": "./dist/cjs/plugins/dynamic-experiences/index.js",
90
90
  "default": "./dist/esm/plugins/dynamic-experiences/index.js"
91
- },
92
- "./form": {
93
- "types": "./dist/types/form/index.d.ts",
94
- "import": "./dist/esm/form/index.js",
95
- "require": "./dist/cjs/form/index.js",
96
- "default": "./dist/esm/form/index.js"
97
91
  }
98
92
  },
99
93
  "files": [
@@ -171,10 +165,6 @@
171
165
  {
172
166
  "path": "dist/esm/plugins/web-components/index.js",
173
167
  "limit": "10 kB"
174
- },
175
- {
176
- "path": "dist/esm/form/index.js",
177
- "limit": "5 kB"
178
168
  }
179
169
  ],
180
170
  "type": "module",
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rules-logic-CXr4wXcG.cjs`);let t=require(`effector`);function n(e,t,n){let r=e[t];if(r===void 0){e[t]=n;return}if(Array.isArray(r)&&Array.isArray(n)&&n.length>0){typeof r[0]==`string`?e[t]=[...r,...n].map(String):typeof r[0]==`number`?e[t]=[...r,...n].map(Number):typeof r[0]==`boolean`?e[t]=[...r,...n].map(e=>!!e):e[t]=n;return}e[t]=n}function r(e,t){let r=Array.from(t.entries()),i={};return e.forEach(e=>{let t=r.filter(([t])=>t===e.id);t.length===0&&(t=[[e.id,``]]),t.forEach(([,t])=>{if(t===``){n(i,e.id,null);return}switch(e.type){case`text`:case`object`:n(i,e.id,e.multiple?[String(t)]:String(t));break;case`number`:n(i,e.id,e.multiple?[Number(t)]:Number(t));break;case`boolean`:n(i,e.id,e.multiple?[t===`true`]:t===`true`);break}})}),i}function i(e){return Array.isArray(e.options)&&e.options.some(e=>`condition`in e)}function a(e){return e.some(e=>e.condition||i(e))}async function o(t,n,r){return n.length===0||!a(n)?n:(await Promise.all(n.map(async n=>{if(!(!n.condition||await e.t(t,n.condition,r)))return null;if(!Array.isArray(n.options)||!i(n))return n;let a=(await Promise.all(n.options.map(async n=>n.condition?await e.t(t,n.condition,r)?n:null:n))).filter(e=>e!==null);return a.length===n.options.length?n:a.length===0?null:{...n,options:a}}))).filter(e=>e!==null)}function s(e,n,r){let i=(0,t.createStore)([]),a=(0,t.attach)({source:{allFields:e.fields.listStore,fieldIds:n,staged:r,committed:e.responses.getAllStore},effect:(0,t.createEffect)(async({allFields:t,fieldIds:n,staged:r,committed:i})=>await o(e,t.filter(e=>n.includes(e.id)),{responses:{...i,...r}}))});return(0,t.sample)({clock:a.doneData,target:i}),a(),(0,t.sample)({clock:[e.responses.listStore,n,e.fields.listStore,r],target:a}),{fieldsStore:i}}function c(e){return e===null||e===``||Array.isArray(e)&&e.length===0}function l(n,r,i){let a=(0,t.createEvent)(),o=(0,t.createEvent)(),s=(0,t.createStore)({});(0,t.sample)({clock:o,source:s,fn:(e,{fieldId:t})=>({...e,[t]:!0}),target:s});let l=(0,t.createStore)({}),u=l.map(e=>Object.values(e).filter(e=>e!==void 0)),d=(0,t.attach)({source:{fields:r,staged:i,committed:n.responses.getAllStore},effect:async({fields:t,staged:r,committed:i},{fieldId:a,value:o,checkRequired:s})=>{let l=t.find(e=>e.id===a);if(!l)return{fieldId:a,error:null};if(l.validation&&Object.keys(l.validation).length>0){let t={...i,...r},s=await e.t(n,l.validation,{responses:t,$input:o});if(typeof s==`string`)return{fieldId:a,error:{fieldId:a,userMessage:s,systemMessage:s,value:o}};if(s===!1)return{fieldId:a,error:{fieldId:a,userMessage:`This field is invalid`,systemMessage:`Field validation rule returned false.`,value:o}}}return s&&l.required&&c(o)?{fieldId:a,error:{fieldId:a,userMessage:`This field is required`,systemMessage:`Field is required.`,value:o}}:{fieldId:a,error:null}}});return(0,t.sample)({clock:a,source:s,filter:(e,{fieldId:t})=>e[t]===!0,fn:(e,{fieldId:t,value:n})=>({fieldId:t,value:n,checkRequired:!1}),target:d}),(0,t.sample)({clock:o,fn:({fieldId:e,value:t})=>({fieldId:e,value:t,checkRequired:!0}),target:d}),i.on(a,(e,{fieldId:t,value:n})=>({...e,[t]:n})),i.on(o,(e,{fieldId:t,value:n})=>({...e,[t]:n})),l.on(d.doneData,(e,{fieldId:t,error:n})=>{if(n===null){let n={...e};return delete n[t],n}return{...e,[t]:n}}),{fieldChangeEvent:a,fieldBlurEvent:o,touchedStore:s,fieldErrorsStore:l,formErrorsStore:u,stagedValuesStore:i}}function u(e){let n=[];return{executeFx:(0,t.createEffect)(async(...t)=>await e(n,...t)),register:e=>(n.push(e),()=>{n=n.filter(t=>t!==e)})}}function d({client:e,experienceInstance:n,formId:i,title:a,stepStore:o,fieldsStore:s,goToNextStep:c}){let l=(0,t.createEvent)(),d=(0,t.createEvent)(),f=(0,t.createEvent)(),p=(0,t.createEvent)(),m=(0,t.createEvent)(),h=(0,t.createStore)(!1),g=(0,t.createStore)(!1);g.on(p,()=>!0).on(l,()=>!1);let _=l.map(()=>void 0),v=u(async(e,t)=>{await Promise.all(e.map(e=>Promise.resolve(e(t))))}),y=u(async(e,t)=>{await Promise.all(e.map(e=>Promise.resolve(e(t))))}),b=u(async(e,t)=>{let n=t;for(let t of e){let e=await Promise.resolve(t(n));e!==void 0&&(n=e)}return n}),x=(0,t.createEffect)(async t=>({data:t,errors:(await e.responses.commit(t)).errors})),S=(0,t.attach)({source:{step:o,title:a},mapParams:(e,t)=>({step:t.step,title:t.title,data:e.data}),effect:(0,t.createEffect)(async({step:t,title:r,data:a})=>(e.eventBus({type:`form_submit_success`,form:{id:i,title:r},experience:n,step:t??void 0}),a))}),C=(0,t.attach)({source:{step:o,title:a},mapParams:(e,t)=>({step:t.step,title:t.title,errors:e.errors}),effect:(0,t.createEffect)(async({step:t,title:r,errors:a})=>(e.eventBus({type:`form_submit_error`,form:{id:i,title:r},exception:{reason:a},experience:n,step:t??void 0}),a.forEach(r=>{e.eventBus({type:`field_validation_error`,exception:{reason:[r]},experience:n,step:t??void 0})}),a))});return(0,t.sample)({clock:l,fn:()=>!0,target:h}),(0,t.sample)({clock:l,source:{step:o,title:a},fn:({step:e,title:t})=>({formId:i,title:t,step:e}),target:(0,t.createEffect)(({formId:t,title:r,step:i})=>{e.eventBus({type:`form_submit`,form:{id:t,title:r},experience:n,step:i??void 0})})}),(0,t.sample)({clock:l,source:{stepFields:s},fn:({stepFields:e},t)=>(t.preventDefault(),r(e,new FormData(t.currentTarget))),target:b.executeFx}),(0,t.sample)({clock:b.executeFx.doneData,target:x}),(0,t.split)({source:x.doneData,match:{hasErrors:({errors:e})=>e.length>0},cases:{hasErrors:C,__:S}}),(0,t.sample)({clock:S.doneData,target:d}),(0,t.sample)({clock:d,fn:e=>({data:e,stopNavigation:p}),target:v.executeFx}),(0,t.sample)({clock:v.executeFx.done,target:m}),(0,t.sample)({clock:m,source:g,filter:e=>!e,target:c}),(0,t.sample)({clock:C.doneData,target:f}),(0,t.sample)({clock:f,target:y.executeFx}),(0,t.sample)({clock:[m,y.executeFx.done],fn:()=>!1,target:h}),{submitEvent:l,isFormSubmitting:h,onSubmit:b.register,onSuccess:v.register,onError:y.register,submitStarted:_,validationErrorsReceived:f}}function f(e){let t=e.currentTarget;if(t instanceof HTMLInputElement)return t.type===`checkbox`?t.checked:t.value;if(t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)return t.value}function p(e,n,r,i){let{client:a,experienceInstance:o}=e,{currentStepStore:c,goToNextStep:u}=o,p=(0,t.createStore)({}),{fieldsStore:m}=s(a,i,p),{fieldChangeEvent:h,fieldBlurEvent:g,touchedStore:_,fieldErrorsStore:v,formErrorsStore:y}=l(a,m,p),b=(0,t.combine)({fields:m,responses:a.responses.listStore,staged:p,fieldErrors:v,touched:_},({fields:e,responses:t,staged:n,fieldErrors:r,touched:i})=>e.map(e=>{let a=t=>{let n=f(t);n!==void 0&&h({fieldId:e.id,value:n})},o=t=>{let n=f(t);n!==void 0&&g({fieldId:e.id,value:n})};return{...e,value:n[e.id]??t.find(t=>t.fieldId===e.id)?.value,error:r[e.id],touched:i[e.id]??!1,onChange:a,onBlur:o,props:{name:e.id,id:e.id,oninput:a,onblur:o}}})),{submitEvent:x,isFormSubmitting:S,onSubmit:C,onSuccess:w,onError:T,submitStarted:E,validationErrorsReceived:D}=d({client:a,experienceInstance:o,formId:n,title:r,stepStore:c,fieldsStore:m,goToNextStep:u});return(0,t.sample)({clock:E,fn:()=>({}),target:_}),(0,t.sample)({clock:E,fn:()=>({}),target:v}),(0,t.sample)({clock:D,fn:e=>Object.fromEntries(e.map(e=>[e.fieldId,e])),target:v}),{form:{props:{onsubmit:x},errors:y,submitting:S,onSubmit:C,onSuccess:w,onError:T},fields:b}}exports.buildResponsesFromFormData=r,exports.createFieldEvaluator=s,exports.createFieldValidation=l,exports.createForm=p,exports.createSubmitPipeline=d,exports.getEventValue=f,exports.getStepFields=o;