@picked/client 0.0.1-dev.1789541668638 → 0.0.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/index.js +1 -4
  3. package/dist/cjs/plugins/create-experience/index.js +1 -1
  4. package/dist/cjs/plugins/experience-browserstorage-plugin/index.js +1 -0
  5. package/dist/cjs/plugins/history-browserstorage-plugin/index.js +1 -0
  6. package/dist/cjs/plugins/responses-browserstorage-plugin/index.js +1 -0
  7. package/dist/cjs/plugins/responses-indexeddb-plugin/index.js +1 -0
  8. package/dist/cjs/plugins/shopify/index.js +1 -0
  9. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  10. package/dist/cjs/plugins/window-object/index.js +1 -1
  11. package/dist/cjs/server/index.js +1 -1
  12. package/dist/esm/index.js +732 -1814
  13. package/dist/esm/plugins/create-experience/index.js +398 -490
  14. package/dist/esm/plugins/experience-browserstorage-plugin/index.js +38 -0
  15. package/dist/esm/plugins/history-browserstorage-plugin/index.js +26 -0
  16. package/dist/esm/plugins/responses-browserstorage-plugin/index.js +36 -0
  17. package/dist/esm/plugins/responses-indexeddb-plugin/index.js +101 -0
  18. package/dist/esm/plugins/shopify/index.js +59 -0
  19. package/dist/esm/plugins/single-page-app/index.js +35 -31
  20. package/dist/esm/plugins/window-object/index.js +9 -9
  21. package/dist/esm/server/index.js +89 -141
  22. package/dist/experience-instance-6ZKZS7dF.cjs +1 -0
  23. package/dist/experience-instance-BA0EXYg5.js +712 -0
  24. package/dist/id-BKIWbSTy.cjs +1 -0
  25. package/dist/id-BW-g3y32.js +6 -0
  26. package/dist/logger-BsmHUUw1.cjs +1 -0
  27. package/dist/logger-C9a75KZn.js +5 -0
  28. package/dist/object-BbFTsGh3.cjs +1 -0
  29. package/dist/object-JwZ58NOH.js +28 -0
  30. package/dist/storage-BPJwmlva.cjs +1 -0
  31. package/dist/storage-D87xFySf.js +85 -0
  32. package/dist/supports-BvrzQAVk.js +79 -0
  33. package/dist/supports-C0y3-V5V.cjs +1 -0
  34. package/dist/types/client.d.ts +23 -119
  35. package/dist/types/client.d.ts.map +1 -1
  36. package/dist/types/entities/component/component.d.ts +6 -45
  37. package/dist/types/entities/component/component.d.ts.map +1 -1
  38. package/dist/types/entities/experience/experience.d.ts +99 -160
  39. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  40. package/dist/types/entities/experience-instance/experience-instance.d.ts +113 -83
  41. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  42. package/dist/types/entities/feature/feature.d.ts +8 -118
  43. package/dist/types/entities/feature/feature.d.ts.map +1 -1
  44. package/dist/types/entities/field/field.d.ts +64 -96
  45. package/dist/types/entities/field/field.d.ts.map +1 -1
  46. package/dist/types/entities/framework/framework.d.ts +7 -32
  47. package/dist/types/entities/framework/framework.d.ts.map +1 -1
  48. package/dist/types/entities/history/history.d.ts +6 -6
  49. package/dist/types/entities/history/history.d.ts.map +1 -1
  50. package/dist/types/entities/plugin/plugin.d.ts +2 -41
  51. package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
  52. package/dist/types/entities/predicate/predicate.d.ts +7 -30
  53. package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
  54. package/dist/types/entities/project/project.d.ts +9 -0
  55. package/dist/types/entities/project/project.d.ts.map +1 -0
  56. package/dist/types/entities/response/response.d.ts +21 -57
  57. package/dist/types/entities/response/response.d.ts.map +1 -1
  58. package/dist/types/exports.d.ts +4 -22
  59. package/dist/types/exports.d.ts.map +1 -1
  60. package/dist/types/index.d.ts +3 -12
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/logic-engine.d.ts +11 -13
  63. package/dist/types/logic-engine.d.ts.map +1 -1
  64. package/dist/types/picked.d.ts +184 -381
  65. package/dist/types/picked.d.ts.map +1 -1
  66. package/dist/types/ping.d.ts +10 -0
  67. package/dist/types/ping.d.ts.map +1 -0
  68. package/dist/types/plugins/create-experience/create-experience.d.ts +44 -119
  69. package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
  70. package/dist/types/plugins/create-experience/index.d.ts +2 -2
  71. package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
  72. package/dist/types/plugins/create-experience/plugin.d.ts +2 -3
  73. package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
  74. package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
  75. package/dist/types/plugins/experience-browserstorage-plugin/index.d.ts.map +1 -0
  76. package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts +6 -0
  77. package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts.map +1 -0
  78. package/dist/types/plugins/history-browserstorage-plugin/index.d.ts.map +1 -0
  79. package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/plugin.d.ts +1 -2
  80. package/dist/types/plugins/history-browserstorage-plugin/plugin.d.ts.map +1 -0
  81. package/dist/types/plugins/responses-browserstorage-plugin/index.d.ts.map +1 -0
  82. package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts +6 -0
  83. package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts.map +1 -0
  84. package/dist/types/plugins/responses-indexeddb-plugin/index.d.ts.map +1 -0
  85. package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts +3 -0
  86. package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts.map +1 -0
  87. package/dist/types/plugins/shopify/index.d.ts +2 -0
  88. package/dist/types/plugins/shopify/index.d.ts.map +1 -0
  89. package/dist/types/plugins/shopify/plugin.d.ts +3 -0
  90. package/dist/types/plugins/shopify/plugin.d.ts.map +1 -0
  91. package/dist/types/plugins/shopify/shopify.d.ts +28 -0
  92. package/dist/types/plugins/shopify/shopify.d.ts.map +1 -0
  93. package/dist/types/plugins/single-page-app/plugin.d.ts +2 -2
  94. package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
  95. package/dist/types/plugins/window-object/plugin.d.ts +2 -2
  96. package/dist/types/server/index.d.ts +3 -18
  97. package/dist/types/server/index.d.ts.map +1 -1
  98. package/dist/types/utils/dom.d.ts +6 -4
  99. package/dist/types/utils/dom.d.ts.map +1 -1
  100. package/dist/types/utils/events.d.ts +38 -83
  101. package/dist/types/utils/events.d.ts.map +1 -1
  102. package/dist/types/utils/global-obj.d.ts +2 -1
  103. package/dist/types/utils/global-obj.d.ts.map +1 -1
  104. package/dist/types/utils/id.d.ts.map +1 -1
  105. package/dist/types/utils/indexed-db.d.ts +1 -2
  106. package/dist/types/utils/indexed-db.d.ts.map +1 -1
  107. package/dist/types/utils/logger.d.ts +1 -2
  108. package/dist/types/utils/logger.d.ts.map +1 -1
  109. package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts +3 -0
  110. package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts.map +1 -0
  111. package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
  112. package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
  113. package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
  114. package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
  115. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +7 -17
  116. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
  117. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +8 -19
  118. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
  119. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +7 -31
  120. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
  121. package/dist/types/utils/nodes.d.ts +2 -3
  122. package/dist/types/utils/nodes.d.ts.map +1 -1
  123. package/dist/types/utils/object.d.ts +8 -0
  124. package/dist/types/utils/object.d.ts.map +1 -1
  125. package/dist/types/utils/rules-logic.d.ts +3 -33
  126. package/dist/types/utils/rules-logic.d.ts.map +1 -1
  127. package/dist/types/utils/search-params.d.ts.map +1 -1
  128. package/dist/types/utils/state-snaphot.d.ts +16 -0
  129. package/dist/types/utils/state-snaphot.d.ts.map +1 -0
  130. package/dist/types/utils/storage.d.ts +11 -374
  131. package/dist/types/utils/storage.d.ts.map +1 -1
  132. package/dist/types/utils/supports.d.ts +0 -87
  133. package/dist/types/utils/supports.d.ts.map +1 -1
  134. package/package.json +49 -182
  135. package/dist/.tsbuildinfo +0 -1
  136. package/dist/api-C7q_7vxn.js +0 -22
  137. package/dist/api-Ctvh1qkk.cjs +0 -1
  138. package/dist/cjs/form/index.js +0 -1
  139. package/dist/cjs/plugins/dom-observer/index.js +0 -1
  140. package/dist/cjs/plugins/dynamic-experiences/index.js +0 -1
  141. package/dist/cjs/plugins/experience-browser-storage/index.js +0 -1
  142. package/dist/cjs/plugins/history-browser-storage/index.js +0 -1
  143. package/dist/cjs/plugins/responses-browser-storage/index.js +0 -1
  144. package/dist/cjs/plugins/responses-indexeddb/index.js +0 -1
  145. package/dist/cjs/plugins/telemetry/index.js +0 -1
  146. package/dist/cjs/plugins/web-components/index.js +0 -1
  147. package/dist/cjs/preview/index.js +0 -1
  148. package/dist/docs/_root.css +0 -101
  149. package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
  150. package/dist/docs/explanation/content-references.md +0 -99
  151. package/dist/docs/explanation/feature-flag-allocation.md +0 -218
  152. package/dist/docs/explanation/how-picked-works.md +0 -124
  153. package/dist/docs/explanation/how-pickedql-works.md +0 -76
  154. package/dist/docs/explanation/pages-and-flows.md +0 -64
  155. package/dist/docs/explanation/the-content-model.md +0 -87
  156. package/dist/docs/explanation/the-two-apis.md +0 -68
  157. package/dist/docs/explanation/why-server-side-rendering.md +0 -76
  158. package/dist/docs/explanation/workspaces-and-versions.md +0 -71
  159. package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
  160. package/dist/docs/how-to/analytics/index.md +0 -316
  161. package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
  162. package/dist/docs/how-to/authenticate-the-cli.md +0 -97
  163. package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
  164. package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
  165. package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
  166. package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
  167. package/dist/docs/how-to/build-a-flow.md +0 -83
  168. package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
  169. package/dist/docs/how-to/create-a-content-entry.md +0 -48
  170. package/dist/docs/how-to/create-a-project.md +0 -29
  171. package/dist/docs/how-to/create-an-experience.md +0 -42
  172. package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
  173. package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
  174. package/dist/docs/how-to/define-a-page-layout.md +0 -46
  175. package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
  176. package/dist/docs/how-to/install-the-gtm-template.md +0 -84
  177. package/dist/docs/how-to/install-the-sdk.md +0 -93
  178. package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
  179. package/dist/docs/how-to/invite-and-remove-members.md +0 -35
  180. package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
  181. package/dist/docs/how-to/preview-a-workspace.md +0 -28
  182. package/dist/docs/how-to/publish-a-workspace.md +0 -30
  183. package/dist/docs/how-to/read-a-feature-flag.md +0 -113
  184. package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
  185. package/dist/docs/how-to/register-a-component.md +0 -55
  186. package/dist/docs/how-to/register-an-action-handler.md +0 -67
  187. package/dist/docs/how-to/render-a-step-form.md +0 -131
  188. package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
  189. package/dist/docs/how-to/reuse-a-section.md +0 -53
  190. package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
  191. package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
  192. package/dist/docs/how-to/run-an-ab-test.md +0 -49
  193. package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
  194. package/dist/docs/how-to/server-render-a-page.md +0 -81
  195. package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
  196. package/dist/docs/how-to/set-up-mfa.md +0 -69
  197. package/dist/docs/how-to/switch-workspaces.md +0 -122
  198. package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
  199. package/dist/docs/how-to/validate-a-field.md +0 -52
  200. package/dist/docs/how-to/write-a-condition.md +0 -45
  201. package/dist/docs/how-to/write-a-predicate.md +0 -60
  202. package/dist/docs/index.md +0 -59
  203. package/dist/docs/reference/dashboard/actions.mdx +0 -53
  204. package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
  205. package/dist/docs/reference/dashboard/conditions.mdx +0 -42
  206. package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
  207. package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
  208. package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
  209. package/dist/docs/reference/dashboard/content/models.mdx +0 -108
  210. package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
  211. package/dist/docs/reference/dashboard/experiences.mdx +0 -51
  212. package/dist/docs/reference/dashboard/features.mdx +0 -154
  213. package/dist/docs/reference/dashboard/fields.mdx +0 -106
  214. package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
  215. package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
  216. package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
  217. package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
  218. package/dist/docs/reference/dashboard/projects.mdx +0 -44
  219. package/dist/docs/reference/dashboard/reports.mdx +0 -43
  220. package/dist/docs/reference/dashboard/steps.mdx +0 -37
  221. package/dist/docs/reference/dashboard/team-management.md +0 -29
  222. package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
  223. package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
  224. package/dist/docs/reference/delivery-api/experience-content.md +0 -152
  225. package/dist/docs/reference/delivery-api/index.md +0 -45
  226. package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
  227. package/dist/docs/reference/delivery-api/project-config.md +0 -65
  228. package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
  229. package/dist/docs/reference/glossary.md +0 -181
  230. package/dist/docs/reference/management-api/authentication.md +0 -74
  231. package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
  232. package/dist/docs/reference/management-api/error-handling.md +0 -233
  233. package/dist/docs/reference/management-api/pagination.md +0 -192
  234. package/dist/docs/reference/pickedql/data-sources.md +0 -174
  235. package/dist/docs/reference/pickedql/dimensions.md +0 -103
  236. package/dist/docs/reference/pickedql/filtering.md +0 -64
  237. package/dist/docs/reference/pickedql/index.md +0 -18
  238. package/dist/docs/reference/pickedql/schema.md +0 -172
  239. package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
  240. package/dist/docs/reference/sdk/actions.md +0 -30
  241. package/dist/docs/reference/sdk/analytics-events.md +0 -445
  242. package/dist/docs/reference/sdk/conditions.md +0 -147
  243. package/dist/docs/reference/sdk/content-security-policy.md +0 -21
  244. package/dist/docs/reference/sdk/content.md +0 -213
  245. package/dist/docs/reference/sdk/experiences.md +0 -51
  246. package/dist/docs/reference/sdk/features.md +0 -256
  247. package/dist/docs/reference/sdk/fields.md +0 -255
  248. package/dist/docs/reference/sdk/index.md +0 -68
  249. package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
  250. package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
  251. package/dist/docs/reference/sdk/plugins/index.md +0 -29
  252. package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
  253. package/dist/docs/reference/sdk/predicates.md +0 -43
  254. package/dist/docs/reference/sdk/ssr/index.md +0 -33
  255. package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
  256. package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
  257. package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
  258. package/dist/docs/reference/sdk/steps.md +0 -86
  259. package/dist/docs/reference/sdk/type-generation.md +0 -196
  260. package/dist/docs/reference/tools/chrome-extension.md +0 -16
  261. package/dist/docs/reference/tools/cli.md +0 -146
  262. package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
  263. package/dist/docs/reference/tools/mcp.md +0 -90
  264. package/dist/docs/reference/tools/vite-plugin.md +0 -163
  265. package/dist/docs/tutorials/first-api-call.md +0 -228
  266. package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
  267. package/dist/docs/tutorials/first-experience.mdx +0 -254
  268. package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
  269. package/dist/dom-BqcToNL0.js +0 -82
  270. package/dist/dom-DlLH3FxV.cjs +0 -1
  271. package/dist/emit-D-tLiWL1.cjs +0 -1
  272. package/dist/emit-Ds2EG7CB.js +0 -14
  273. package/dist/esm/form/index.js +0 -565
  274. package/dist/esm/plugins/dom-observer/index.js +0 -87
  275. package/dist/esm/plugins/dynamic-experiences/index.js +0 -5
  276. package/dist/esm/plugins/experience-browser-storage/index.js +0 -38
  277. package/dist/esm/plugins/history-browser-storage/index.js +0 -26
  278. package/dist/esm/plugins/responses-browser-storage/index.js +0 -71
  279. package/dist/esm/plugins/responses-indexeddb/index.js +0 -89
  280. package/dist/esm/plugins/telemetry/index.js +0 -100
  281. package/dist/esm/plugins/web-components/index.js +0 -19
  282. package/dist/esm/preview/index.js +0 -2
  283. package/dist/experience-instance-B9S6Yf0N.js +0 -711
  284. package/dist/experience-instance-D8rOg6We.cjs +0 -1
  285. package/dist/id-Bo4RBeOs.js +0 -4
  286. package/dist/id-Js-62re-.cjs +0 -1
  287. package/dist/inert-script-report-B_bMPRzp.js +0 -18
  288. package/dist/inert-script-report-ijRHPtcY.cjs +0 -1
  289. package/dist/logger-CSTvAyyB.cjs +0 -1
  290. package/dist/logger-DMN6TxJJ.js +0 -4
  291. package/dist/object-BUDGxEqy.js +0 -25
  292. package/dist/object-CIkt7Fkr.cjs +0 -1
  293. package/dist/plugin-ChafFq6S.js +0 -194
  294. package/dist/plugin-Dn25Gffy.cjs +0 -1
  295. package/dist/preview-channel-CSr96XAo.js +0 -98
  296. package/dist/preview-channel-Cx0e6fye.cjs +0 -1
  297. package/dist/protocol-Bb_vpLKE.cjs +0 -1
  298. package/dist/protocol-C5KkkiZc.js +0 -84
  299. package/dist/provider-B8wvmeC8.js +0 -98
  300. package/dist/provider-BBLlQOjV.cjs +0 -1
  301. package/dist/registry-C1t8l3t9.cjs +0 -1
  302. package/dist/registry-CXZv0uLg.js +0 -18
  303. package/dist/rules-logic-CGZIYgAI.cjs +0 -1
  304. package/dist/rules-logic-HesIUCu6.js +0 -13
  305. package/dist/storage-1MW3-_As.js +0 -103
  306. package/dist/storage-DUw9UJ2h.cjs +0 -1
  307. package/dist/supports-CO9bJGNl.js +0 -92
  308. package/dist/supports-DBzjGaWD.cjs +0 -1
  309. package/dist/types/data-source/api.d.ts +0 -60
  310. package/dist/types/data-source/api.d.ts.map +0 -1
  311. package/dist/types/data-source/provider.d.ts +0 -103
  312. package/dist/types/data-source/provider.d.ts.map +0 -1
  313. package/dist/types/data-source/registry.d.ts +0 -26
  314. package/dist/types/data-source/registry.d.ts.map +0 -1
  315. package/dist/types/data-source/request-observer.d.ts +0 -62
  316. package/dist/types/data-source/request-observer.d.ts.map +0 -1
  317. package/dist/types/data-source/virtual-data.d.ts +0 -19
  318. package/dist/types/data-source/virtual-data.d.ts.map +0 -1
  319. package/dist/types/entities/action/action.d.ts +0 -85
  320. package/dist/types/entities/action/action.d.ts.map +0 -1
  321. package/dist/types/entities/component/lazyComponent.d.ts +0 -11
  322. package/dist/types/entities/component/lazyComponent.d.ts.map +0 -1
  323. package/dist/types/entities/condition/condition.d.ts +0 -29
  324. package/dist/types/entities/condition/condition.d.ts.map +0 -1
  325. package/dist/types/entities/content/content.d.ts +0 -53
  326. package/dist/types/entities/content/content.d.ts.map +0 -1
  327. package/dist/types/entities/content/reference.d.ts +0 -101
  328. package/dist/types/entities/content/reference.d.ts.map +0 -1
  329. package/dist/types/entities/field/policies.d.ts +0 -35
  330. package/dist/types/entities/field/policies.d.ts.map +0 -1
  331. package/dist/types/entities/response/response-validation.d.ts +0 -75
  332. package/dist/types/entities/response/response-validation.d.ts.map +0 -1
  333. package/dist/types/entities/session/session.d.ts +0 -46
  334. package/dist/types/entities/session/session.d.ts.map +0 -1
  335. package/dist/types/entities/step/step.d.ts +0 -56
  336. package/dist/types/entities/step/step.d.ts.map +0 -1
  337. package/dist/types/form/build-responses.d.ts +0 -18
  338. package/dist/types/form/build-responses.d.ts.map +0 -1
  339. package/dist/types/form/create-field-evaluator.d.ts +0 -28
  340. package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
  341. package/dist/types/form/create-field-validation.d.ts +0 -60
  342. package/dist/types/form/create-field-validation.d.ts.map +0 -1
  343. package/dist/types/form/create-form.d.ts +0 -153
  344. package/dist/types/form/create-form.d.ts.map +0 -1
  345. package/dist/types/form/create-submit-pipeline.d.ts +0 -116
  346. package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
  347. package/dist/types/form/get-step-fields.d.ts +0 -19
  348. package/dist/types/form/get-step-fields.d.ts.map +0 -1
  349. package/dist/types/form/index.d.ts +0 -11
  350. package/dist/types/form/index.d.ts.map +0 -1
  351. package/dist/types/lifecycle/condition-selection.d.ts +0 -146
  352. package/dist/types/lifecycle/condition-selection.d.ts.map +0 -1
  353. package/dist/types/lifecycle/lifecycle.d.ts +0 -48
  354. package/dist/types/lifecycle/lifecycle.d.ts.map +0 -1
  355. package/dist/types/lifecycle/rules-logic.d.ts +0 -25
  356. package/dist/types/lifecycle/rules-logic.d.ts.map +0 -1
  357. package/dist/types/lifecycle/state-snapshot.d.ts +0 -38
  358. package/dist/types/lifecycle/state-snapshot.d.ts.map +0 -1
  359. package/dist/types/plugins/dom-observer/index.d.ts +0 -3
  360. package/dist/types/plugins/dom-observer/index.d.ts.map +0 -1
  361. package/dist/types/plugins/dom-observer/plugin.d.ts +0 -50
  362. package/dist/types/plugins/dom-observer/plugin.d.ts.map +0 -1
  363. package/dist/types/plugins/dynamic-experiences/hash.d.ts +0 -105
  364. package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +0 -1
  365. package/dist/types/plugins/dynamic-experiences/index.d.ts +0 -7
  366. package/dist/types/plugins/dynamic-experiences/index.d.ts.map +0 -1
  367. package/dist/types/plugins/dynamic-experiences/plugin.d.ts +0 -49
  368. package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +0 -1
  369. package/dist/types/plugins/dynamic-experiences/types.d.ts +0 -45
  370. package/dist/types/plugins/dynamic-experiences/types.d.ts.map +0 -1
  371. package/dist/types/plugins/experience-browser-storage/index.d.ts.map +0 -1
  372. package/dist/types/plugins/experience-browser-storage/plugin.d.ts +0 -7
  373. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +0 -1
  374. package/dist/types/plugins/history-browser-storage/index.d.ts.map +0 -1
  375. package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +0 -1
  376. package/dist/types/plugins/responses-browser-storage/index.d.ts.map +0 -1
  377. package/dist/types/plugins/responses-browser-storage/plugin.d.ts +0 -18
  378. package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +0 -1
  379. package/dist/types/plugins/responses-indexeddb/index.d.ts.map +0 -1
  380. package/dist/types/plugins/responses-indexeddb/plugin.d.ts +0 -3
  381. package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +0 -1
  382. package/dist/types/plugins/telemetry/emit.d.ts +0 -18
  383. package/dist/types/plugins/telemetry/emit.d.ts.map +0 -1
  384. package/dist/types/plugins/telemetry/index.d.ts +0 -4
  385. package/dist/types/plugins/telemetry/index.d.ts.map +0 -1
  386. package/dist/types/plugins/telemetry/plugin-summary.d.ts +0 -10
  387. package/dist/types/plugins/telemetry/plugin-summary.d.ts.map +0 -1
  388. package/dist/types/plugins/telemetry/plugin.d.ts +0 -45
  389. package/dist/types/plugins/telemetry/plugin.d.ts.map +0 -1
  390. package/dist/types/plugins/web-components/index.d.ts +0 -2
  391. package/dist/types/plugins/web-components/index.d.ts.map +0 -1
  392. package/dist/types/plugins/web-components/plugin.d.ts +0 -4
  393. package/dist/types/plugins/web-components/plugin.d.ts.map +0 -1
  394. package/dist/types/preview/index.d.ts +0 -18
  395. package/dist/types/preview/index.d.ts.map +0 -1
  396. package/dist/types/preview-bridge/index.d.ts +0 -14
  397. package/dist/types/preview-bridge/index.d.ts.map +0 -1
  398. package/dist/types/preview-channel.d.ts +0 -16
  399. package/dist/types/preview-channel.d.ts.map +0 -1
  400. package/dist/types/preview-receiver/apply-ops.d.ts +0 -32
  401. package/dist/types/preview-receiver/apply-ops.d.ts.map +0 -1
  402. package/dist/types/preview-receiver/index.d.ts +0 -32
  403. package/dist/types/preview-receiver/index.d.ts.map +0 -1
  404. package/dist/types/preview-receiver/protocol.d.ts +0 -69
  405. package/dist/types/preview-receiver/protocol.d.ts.map +0 -1
  406. package/dist/types/schema-registry.d.ts +0 -206
  407. package/dist/types/schema-registry.d.ts.map +0 -1
  408. package/dist/types/server/serialize.d.ts +0 -87
  409. package/dist/types/server/serialize.d.ts.map +0 -1
  410. package/dist/types/typed-content.d.ts +0 -17
  411. package/dist/types/typed-content.d.ts.map +0 -1
  412. package/dist/types/utils/client-telemetry.d.ts +0 -25
  413. package/dist/types/utils/client-telemetry.d.ts.map +0 -1
  414. package/dist/types/utils/content-path.d.ts +0 -37
  415. package/dist/types/utils/content-path.d.ts.map +0 -1
  416. package/dist/types/utils/html-asset-value.d.ts +0 -20
  417. package/dist/types/utils/html-asset-value.d.ts.map +0 -1
  418. package/dist/types/utils/inert-script-report.d.ts +0 -40
  419. package/dist/types/utils/inert-script-report.d.ts.map +0 -1
  420. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +0 -25
  421. package/dist/types/utils/node-tree/get-next-node-from-action.d.ts.map +0 -1
  422. package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +0 -17
  423. package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts.map +0 -1
  424. package/dist/types/utils/node-tree/node-adjacency.d.ts +0 -50
  425. package/dist/types/utils/node-tree/node-adjacency.d.ts.map +0 -1
  426. package/dist/types/utils/node-tree/node-tree-index.d.ts +0 -57
  427. package/dist/types/utils/node-tree/node-tree-index.d.ts.map +0 -1
  428. package/dist/types/utils/picked-config.d.ts +0 -39
  429. package/dist/types/utils/picked-config.d.ts.map +0 -1
  430. package/dist/types/utils/preview-session.d.ts +0 -12
  431. package/dist/types/utils/preview-session.d.ts.map +0 -1
  432. package/dist/types/utils/rehydrate-scripts.d.ts +0 -50
  433. package/dist/types/utils/rehydrate-scripts.d.ts.map +0 -1
  434. package/dist/types/utils/render-string.d.ts +0 -24
  435. package/dist/types/utils/render-string.d.ts.map +0 -1
  436. package/dist/types/utils/user-timing.d.ts +0 -21
  437. package/dist/types/utils/user-timing.d.ts.map +0 -1
  438. package/dist/version-CLjPfmxk.cjs +0 -1
  439. package/dist/version-CPKulHMH.js +0 -256
  440. /package/dist/types/plugins/{experience-browser-storage → experience-browserstorage-plugin}/index.d.ts +0 -0
  441. /package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/index.d.ts +0 -0
  442. /package/dist/types/plugins/{responses-browser-storage → responses-browserstorage-plugin}/index.d.ts +0 -0
  443. /package/dist/types/plugins/{responses-indexeddb → responses-indexeddb-plugin}/index.d.ts +0 -0
@@ -1,103 +0,0 @@
1
- //#region src/utils/storage.ts
2
- var e = (e) => btoa([...e].map((e) => String.fromCharCode(e.charCodeAt(0) ^ 7)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
3
- function t(t, n = "global", r) {
4
- let i = "pckd";
5
- if (n === "experience") {
6
- if (!r) throw Error("Experience instance is required to scope storage to an experience");
7
- i = `${i}:${r.experienceId}`;
8
- }
9
- return {
10
- _: `${i}:${e(t)}`,
11
- scope: n
12
- };
13
- }
14
- var n = /* @__PURE__ */ new Map();
15
- function r(e, t) {
16
- let r = n.get(e._);
17
- r && r.forEach((n) => n(e, t));
18
- }
19
- function i(e, t, n, i) {
20
- let a = n === "local" ? localStorage : sessionStorage, o = typeof t == "string" ? t : JSON.stringify(t);
21
- if (a.setItem(e._, o), typeof i == "number") {
22
- let t = new Date(Date.now() + i).toISOString();
23
- a.setItem(`${e._}:expires-at`, t);
24
- }
25
- r(e, n);
26
- }
27
- function a(e, t) {
28
- let n = t === "local" ? localStorage : sessionStorage;
29
- n.removeItem(e._), n.removeItem(`${e._}:expires-at`), r(e, t);
30
- }
31
- function o(e, t, r, i) {
32
- let a = t === "local" ? localStorage : sessionStorage;
33
- function o(t) {
34
- t.storageArea === a && t.key === e._ && i(r(e));
35
- }
36
- function s(e, n) {
37
- n === t && i(r(e));
38
- }
39
- window.addEventListener("storage", o), n.has(e._) || n.set(e._, /* @__PURE__ */ new Set());
40
- let c = n.get(e._);
41
- return c && c.add(s), function() {
42
- window.removeEventListener("storage", o);
43
- let t = n.get(e._);
44
- t && (t.delete(s), t.size === 0 && n.delete(e._));
45
- };
46
- }
47
- function s(e, t) {
48
- let n = t === "local" ? localStorage : sessionStorage, r = n.getItem(e._), c = n.getItem(`${e._}:expires-at`), l = (n, r) => i(e, n, t, r), u = () => a(e, t), d = (n) => o(e, t, (e) => s(e, t), n);
49
- return c && /* @__PURE__ */ new Date() > new Date(c) ? (a(e, t), {
50
- isSet: () => !1,
51
- text: () => null,
52
- json: () => null,
53
- boolean: () => null,
54
- set: l,
55
- remove: u,
56
- subscribe: d
57
- }) : {
58
- isSet() {
59
- return r !== null;
60
- },
61
- text() {
62
- return r;
63
- },
64
- json() {
65
- return r ? JSON.parse(r) : null;
66
- },
67
- boolean() {
68
- return r ? r === "true" : null;
69
- },
70
- set: l,
71
- remove: u,
72
- subscribe: d
73
- };
74
- }
75
- var c = {
76
- get(e) {
77
- return s(e, "session");
78
- },
79
- set(e, t, n) {
80
- i(e, t, "session", n);
81
- },
82
- remove(e) {
83
- a(e, "session");
84
- },
85
- subscribe(e, t) {
86
- return o(e, "session", this.get, t);
87
- }
88
- }, l = {
89
- get(e) {
90
- return s(e, "local");
91
- },
92
- set(e, t, n) {
93
- i(e, t, "local", n);
94
- },
95
- remove(e) {
96
- a(e, "local");
97
- },
98
- subscribe(e, t) {
99
- return o(e, "local", this.get, t);
100
- }
101
- };
102
- //#endregion
103
- export { o as i, l as n, c as r, t };
@@ -1 +0,0 @@
1
- var e=e=>btoa([...e].map(e=>String.fromCharCode(e.charCodeAt(0)^7)).join(``)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``);function t(t,n=`global`,r){let i=`pckd`;if(n===`experience`){if(!r)throw Error(`Experience instance is required to scope storage to an experience`);i=`${i}:${r.experienceId}`}return{_:`${i}:${e(t)}`,scope:n}}var n=new Map;function r(e,t){let r=n.get(e._);r&&r.forEach(n=>n(e,t))}function i(e,t,n,i){let a=n===`local`?localStorage:sessionStorage,o=typeof t==`string`?t:JSON.stringify(t);if(a.setItem(e._,o),typeof i==`number`){let t=new Date(Date.now()+i).toISOString();a.setItem(`${e._}:expires-at`,t)}r(e,n)}function a(e,t){let n=t===`local`?localStorage:sessionStorage;n.removeItem(e._),n.removeItem(`${e._}:expires-at`),r(e,t)}function o(e,t,r,i){let a=t===`local`?localStorage:sessionStorage;function o(t){t.storageArea===a&&t.key===e._&&i(r(e))}function s(e,n){n===t&&i(r(e))}window.addEventListener(`storage`,o),n.has(e._)||n.set(e._,new Set);let c=n.get(e._);return c&&c.add(s),function(){window.removeEventListener(`storage`,o);let t=n.get(e._);t&&(t.delete(s),t.size===0&&n.delete(e._))}}function s(e,t){let n=t===`local`?localStorage:sessionStorage,r=n.getItem(e._),c=n.getItem(`${e._}:expires-at`),l=(n,r)=>i(e,n,t,r),u=()=>a(e,t),d=n=>o(e,t,e=>s(e,t),n);return c&&new Date>new Date(c)?(a(e,t),{isSet:()=>!1,text:()=>null,json:()=>null,boolean:()=>null,set:l,remove:u,subscribe:d}):{isSet(){return r!==null},text(){return r},json(){return r?JSON.parse(r):null},boolean(){return r?r===`true`:null},set:l,remove:u,subscribe:d}}var c={get(e){return s(e,`session`)},set(e,t,n){i(e,t,`session`,n)},remove(e){a(e,`session`)},subscribe(e,t){return o(e,`session`,this.get,t)}},l={get(e){return s(e,`local`)},set(e,t,n){i(e,t,`local`,n)},remove(e){a(e,`local`)},subscribe(e,t){return o(e,`local`,this.get,t)}};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
@@ -1,92 +0,0 @@
1
- //#region src/utils/global-obj.ts
2
- var e = Symbol("Picked"), t = globalThis, n = (n) => {
3
- t[e] = n;
4
- };
5
- //#endregion
6
- //#region src/utils/supports.ts
7
- function r() {
8
- try {
9
- return "location" in t && !!t.location;
10
- } catch {
11
- return !1;
12
- }
13
- }
14
- function i() {
15
- try {
16
- return "history" in t && !!t.history;
17
- } catch {
18
- return !1;
19
- }
20
- }
21
- function a() {
22
- try {
23
- return "localStorage" in t && !!t.localStorage;
24
- } catch {
25
- return !1;
26
- }
27
- }
28
- function o() {
29
- try {
30
- return "sessionStorage" in t && !!t.sessionStorage;
31
- } catch {
32
- return !1;
33
- }
34
- }
35
- function s() {
36
- try {
37
- return "document" in t && "cookie" in t.document;
38
- } catch {
39
- return !1;
40
- }
41
- }
42
- function c() {
43
- try {
44
- return "document" in t && "createElement" in t.document && "attachShadow" in t.document.createElement("div");
45
- } catch {
46
- return !1;
47
- }
48
- }
49
- function l() {
50
- try {
51
- return "window" in t;
52
- } catch {
53
- return !1;
54
- }
55
- }
56
- function u() {
57
- try {
58
- return l() && t.top !== t.self;
59
- } catch {
60
- return !0;
61
- }
62
- }
63
- function d() {
64
- try {
65
- return "document" in t;
66
- } catch {
67
- return !1;
68
- }
69
- }
70
- function f() {
71
- try {
72
- return "IntersectionObserver" in t;
73
- } catch {
74
- return !1;
75
- }
76
- }
77
- function p() {
78
- try {
79
- return "customElements" in t && !!t.customElements;
80
- } catch {
81
- return !1;
82
- }
83
- }
84
- function m() {
85
- try {
86
- return "crypto" in t && "randomUUID" in t.crypto;
87
- } catch {
88
- return !1;
89
- }
90
- }
91
- //#endregion
92
- export { i as a, r as c, p as d, l as f, d as i, o as l, n as m, s as n, f as o, t as p, m as r, a as s, u as t, c as u };
@@ -1 +0,0 @@
1
- var e=Symbol(`Picked`),t=globalThis,n=n=>{t[e]=n};function r(){try{return`location`in t&&!!t.location}catch{return!1}}function i(){try{return`history`in t&&!!t.history}catch{return!1}}function a(){try{return`localStorage`in t&&!!t.localStorage}catch{return!1}}function o(){try{return`sessionStorage`in t&&!!t.sessionStorage}catch{return!1}}function s(){try{return`document`in t&&`cookie`in t.document}catch{return!1}}function c(){try{return`document`in t&&`createElement`in t.document&&`attachShadow`in t.document.createElement(`div`)}catch{return!1}}function l(){try{return`window`in t}catch{return!1}}function u(){try{return l()&&t.top!==t.self}catch{return!0}}function d(){try{return`document`in t}catch{return!1}}function f(){try{return`IntersectionObserver`in t}catch{return!1}}function p(){try{return`customElements`in t&&!!t.customElements}catch{return!1}}function m(){try{return`crypto`in t&&`randomUUID`in t.crypto}catch{return!1}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return c}});
@@ -1,60 +0,0 @@
1
- import type { ExperienceContentResponse, FetchProjectOptions, ProjectConfig } from '@picked/delivery-api-client';
2
- /**
3
- * Minimal shape check: verifies that `data` is an object with a `features` array.
4
- *
5
- * This is the minimum invariant required to prevent runtime crashes when iterating
6
- * `config.features`. Individual feature and experience shapes are trusted from the API.
7
- *
8
- * @param {unknown} data - Unknown API response to validate.
9
- * @returns {boolean} Whether `data` has the minimum required shape.
10
- * @example
11
- * ```typescript
12
- * if (isProjectConfig(json)) { json.features }
13
- * ```
14
- */
15
- export declare function isProjectConfig(data: unknown): data is ProjectConfig;
16
- /**
17
- * Minimal shape check for a successful experience-content response.
18
- *
19
- * @param {unknown} data - Unknown API response to validate.
20
- * @returns {boolean} Whether `data` has the minimum required shape.
21
- * @example
22
- * ```typescript
23
- * if (isExperienceContentResponse(json)) { useResponse(json) }
24
- * ```
25
- */
26
- export declare function isExperienceContentResponse(data: unknown): data is ExperienceContentResponse;
27
- /**
28
- * Fetches the project configuration from the Picked REST API.
29
- *
30
- * Returns `null` on network failure, non-OK responses, or invalid JSON shape.
31
- * Connection-refused errors from local URLs are suppressed silently.
32
- *
33
- * @param {string} apiUrl - Base URL for the Picked API.
34
- * @param {string} projectId - Project ID to fetch config for.
35
- * @param {FetchProjectOptions} [options] - Optional headers, preview token, and abort signal.
36
- * @returns {Promise<ProjectConfig | null>} Validated project config, or `null` on any failure.
37
- * @example
38
- * ```typescript
39
- * const config = await fetchProject('https://api.picked.app', 'proj_123')
40
- * ```
41
- */
42
- export declare function fetchProject(apiUrl: string, projectId: string, options?: FetchProjectOptions): Promise<ProjectConfig | null>;
43
- /**
44
- * Fetches per-experience content from the Picked API.
45
- *
46
- * Returns `null` on network failure, non-OK responses, or invalid JSON shape — preserving
47
- * the failure-tolerant policy: experiences still render, layouts handle null defensively.
48
- *
49
- * @param {string} apiUrl - Base URL for the Picked API.
50
- * @param {string} projectId - Project ID to fetch content for.
51
- * @param {string} experienceId - Experience ID whose content to fetch.
52
- * @param {FetchProjectOptions} [options] - Optional headers, preview token, and abort signal.
53
- * @returns {Promise<ExperienceContentResponse | null>} Validated content response, or `null` on any failure.
54
- * @example
55
- * ```typescript
56
- * const content = await fetchExperienceContent('https://api.picked.app', 'proj_1', 'exp_1')
57
- * ```
58
- */
59
- export declare function fetchExperienceContent(apiUrl: string, projectId: string, experienceId: string, options?: FetchProjectOptions): Promise<ExperienceContentResponse | null>;
60
- //# sourceMappingURL=api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/data-source/api.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,aAAa,EACd,MAAM,6BAA6B,CAAA;AAgDpC;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,aAAa,CAEpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,yBAAyB,CAM5F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAE/B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAE3C"}
@@ -1,103 +0,0 @@
1
- /**
2
- * @file The shared Picked data provider.
3
- *
4
- * One object answers "where does this session's project config and CMS content come from". A
5
- * client builds one per preview token and reaches it through `getProjectConfig` and
6
- * `getExperienceContent`; nothing outside the SDK constructs one. The mode is decided once, at
7
- * construction, and the provider stays atomic: config and content come from the source the mode
8
- * names.
9
- */
10
- import type { ExperienceContentResponse, ProjectConfig } from '@picked/delivery-api-client';
11
- import type { ContentLoader, PickedManifestMetadata, VirtualPickedData } from '../plugins/dynamic-experiences/types';
12
- import { type DeliveryAPIRequestObserverSource } from './request-observer';
13
- import { isVirtualPickedData } from './virtual-data';
14
- /** Where a data provider reads project config and CMS content from. */
15
- export type PickedDataMode = 'bundle' | 'api';
16
- /** Options for {@link createPickedDataProvider}. */
17
- export interface PickedDataProviderOptions {
18
- /** Base URL for the Picked API. Used by `'api'` mode and by every preview session. */
19
- apiUrl: string;
20
- /** Project ID to resolve data for. */
21
- projectId: string;
22
- /**
23
- * Which source to read from. Omit to resolve `'bundle'` when a bundle is available and
24
- * `'api'` otherwise.
25
- */
26
- mode?: PickedDataMode;
27
- /**
28
- * Preview token from the current session. A present token forces `'api'` for both config
29
- * and content and overrides `bundle` and `projectConfig`, because preview renders
30
- * unpublished data that no bundled snapshot can contain.
31
- */
32
- previewToken?: string;
33
- /**
34
- * The `virtual:picked/data` module, supplied directly to skip both the registry and the
35
- * dynamic import. A value that fails the shape guard is ignored with a warning, the same as
36
- * an unresolvable import.
37
- */
38
- bundle?: VirtualPickedData;
39
- /** Explicit project config. Supersedes both sources, except under a preview token. */
40
- projectConfig?: ProjectConfig;
41
- /** Explicit content loader. Supersedes both sources, except under a preview token. */
42
- getContent?: ContentLoader;
43
- /** Abort signal applied to API fetches, such as an `AbortSignal.timeout` deadline. */
44
- signal?: AbortSignal;
45
- /** Supplies the observer wrapped around each delivery API fetch, read once per request. */
46
- getRequestObserver?: DeliveryAPIRequestObserverSource;
47
- }
48
- /** Read-only description of what a provider resolved to. */
49
- export interface PickedDataProviderMeta {
50
- /** The mode in force, after preview-token resolution. */
51
- mode: PickedDataMode;
52
- /** The bundle's manifest metadata, or `null` when not reading from a bundle. */
53
- manifest: PickedManifestMetadata | null;
54
- }
55
- /** Resolves this session's project config and per-experience CMS content. */
56
- export interface PickedDataProvider {
57
- /** What this provider resolved to. `manifest` populates once a bundle has been read. */
58
- readonly meta: PickedDataProviderMeta;
59
- /** Resolves the project config, or `null` when unavailable. Deduplicated across callers. */
60
- getProjectConfig: () => Promise<ProjectConfig | null>;
61
- /** Resolves an experience's content, or `null` when unavailable. Deduplicated per experience id. */
62
- getContent: (experience: {
63
- id: string;
64
- key: string;
65
- }, options?: {
66
- signal?: AbortSignal;
67
- }) => Promise<ExperienceContentResponse | null>;
68
- }
69
- /**
70
- * Attempts to resolve `virtual:picked/data` provided by `@picked/vite-plugin-picked`.
71
- *
72
- * The dynamic import uses a literal string specifier (intentionally — using a variable plus
73
- * `@vite-ignore` defeats Vite's import-analysis, so the plugin's `resolveId` is never called
74
- * at build time and the bundle ends up with a runtime fetch to a `virtual:` URL that the
75
- * browser cannot resolve). The SDK's own build marks `virtual:picked/data` as external so
76
- * this literal import is preserved into the published dist, then downstream Vite builds with
77
- * `@picked/vite-plugin-picked` resolve it through the plugin pipeline.
78
- *
79
- * Returns `null` when the virtual module is unresolvable (the consumer is not using the Vite
80
- * plugin, or its build did not generate the module). Errors are swallowed: the caller falls
81
- * back to the API path.
82
- *
83
- * @returns {Promise<VirtualPickedData | null>} The virtual module exports, or `null`.
84
- * @example
85
- * ```typescript
86
- * const bundle = await resolveVirtualDataModule()
87
- * ```
88
- */
89
- export declare function resolveVirtualDataModule(): Promise<VirtualPickedData | null>;
90
- export { isVirtualPickedData };
91
- /**
92
- * Creates the data provider for a session.
93
- *
94
- * @param {PickedDataProviderOptions} options - Provider configuration.
95
- * @returns {PickedDataProvider} A provider resolving config and content from one source.
96
- * @example
97
- * ```typescript
98
- * const provider = createPickedDataProvider({ mode: 'api', apiUrl, projectId })
99
- * const config = await provider.getProjectConfig()
100
- * ```
101
- */
102
- export declare function createPickedDataProvider(options: PickedDataProviderOptions): PickedDataProvider;
103
- //# sourceMappingURL=provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/data-source/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3F,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,sCAAsC,CAAA;AAE7C,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEpD,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,KAAK,CAAA;AAQ7C,oDAAoD;AACpD,MAAM,WAAW,yBAAyB;IACxC,sFAAsF;IACtF,MAAM,EAAE,MAAM,CAAA;IACd,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,sFAAsF;IACtF,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,sFAAsF;IACtF,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,sFAAsF;IACtF,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,2FAA2F;IAC3F,kBAAkB,CAAC,EAAE,gCAAgC,CAAA;CACtD;AAED,4DAA4D;AAC5D,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,IAAI,EAAE,cAAc,CAAA;IACpB,gFAAgF;IAChF,QAAQ,EAAE,sBAAsB,GAAG,IAAI,CAAA;CACxC;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,wFAAwF;IACxF,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACrC,4FAA4F;IAC5F,gBAAgB,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IACrD,oGAAoG;IACpG,UAAU,EAAE,CACV,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EACvC,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAC/B,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CAC/C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAYlF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAyB9B;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAkL/F"}
@@ -1,26 +0,0 @@
1
- import type { VirtualPickedData } from '../plugins/dynamic-experiences/types';
2
- /**
3
- * Records the bundle the build generated, for this session's data provider to read.
4
- *
5
- * A value that fails the shape guard is refused, so a malformed registration lands on the
6
- * "no bundle" path. Any usable bundle registered earlier is kept.
7
- *
8
- * @param {unknown} bundle - The generated module's exports.
9
- * @returns {void} Nothing.
10
- * @example
11
- * ```typescript
12
- * registerPickedBundle({ projectConfig, experienceContent, manifestMetadata })
13
- * ```
14
- */
15
- export declare function registerPickedBundle(bundle: unknown): void;
16
- /**
17
- * Reads the registered bundle.
18
- *
19
- * @returns {VirtualPickedData | null} The bundle, or `null` when nothing has registered one.
20
- * @example
21
- * ```typescript
22
- * const bundle = readRegisteredBundle()
23
- * ```
24
- */
25
- export declare function readRegisteredBundle(): VirtualPickedData | null;
26
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/data-source/registry.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAK7E;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAQ1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,IAAI,CAE/D"}
@@ -1,62 +0,0 @@
1
- /**
2
- * @file The hook the telemetry plugin uses to observe delivery API requests.
3
- *
4
- * An observer belongs to the client that registered it and is passed in per
5
- * request, so two clients on one page observe only their own traffic. The
6
- * observer hands back a per-request handle, so each completion correlates to
7
- * its own request through the closure that created it.
8
- */
9
- /** Which delivery API endpoint a request is for. */
10
- export type DeliveryAPIEndpoint = 'project-config' | 'experience-content';
11
- /** A request in flight, from the observer's point of view. */
12
- export interface ObservedRequest {
13
- /** Headers to merge into this request, such as `traceparent`. */
14
- headers?: Record<string, string>;
15
- /** Called once the request has settled, with the HTTP status when the server answered. */
16
- onSettled?: (ok: boolean, status?: number) => void;
17
- }
18
- /** Receives delivery API requests as they are made. */
19
- export interface DeliveryAPIRequestObserver {
20
- /** Called as a request begins; returns headers to add and a completion callback. */
21
- onRequest: (endpoint: DeliveryAPIEndpoint) => ObservedRequest;
22
- }
23
- /** Supplies the observer in force for the next request, or `null` when there is none. */
24
- export type DeliveryAPIRequestObserverSource = () => DeliveryAPIRequestObserver | null | undefined;
25
- /**
26
- * Notifies the observer that a request is starting.
27
- *
28
- * @param {DeliveryAPIRequestObserver | null} [observer] - The observer to notify, if any.
29
- * @param {DeliveryAPIEndpoint} endpoint - Which endpoint is being called.
30
- * @returns {ObservedRequest} Headers to merge and a completion callback, both possibly absent.
31
- * @example const observed = beginObservedRequest(observer, 'project-config')
32
- */
33
- export declare function beginObservedRequest(observer: DeliveryAPIRequestObserver | null | undefined, endpoint: DeliveryAPIEndpoint): ObservedRequest;
34
- /**
35
- * Notifies the observer that a request has settled.
36
- *
37
- * @param {ObservedRequest} observed - The handle returned when the request began.
38
- * @param {boolean} ok - Whether the request produced a usable result.
39
- * @param {number} [status] - HTTP status the server answered with, when it answered.
40
- * @returns {void}
41
- * @example settleObservedRequest(observed, true, 200)
42
- */
43
- export declare function settleObservedRequest(observed: ObservedRequest, ok: boolean, status?: number): void;
44
- /**
45
- * Runs a delivery API fetch with the observer wrapped around it.
46
- *
47
- * The observer is read once per request, so one registered after an earlier fetch
48
- * still applies to this one. Its headers are handed to `run` to travel with the
49
- * request, and the same handle receives the outcome.
50
- *
51
- * `run` reports the HTTP status through the `onResponse` callback it is handed.
52
- * A fetch that never reached the server leaves the status absent.
53
- *
54
- * @template T - The value the fetch resolves to.
55
- * @param {DeliveryAPIRequestObserverSource} [source] - Supplies the observer for this request.
56
- * @param {DeliveryAPIEndpoint} endpoint - Which endpoint is being called.
57
- * @param {(headers?: Record<string, string>, onResponse?: (status: number) => void) => Promise<T | null>} run - The fetch to perform.
58
- * @returns {Promise<T | null>} Whatever the fetch resolved to.
59
- * @example observeDeliveryAPIRequest(source, 'project-config', (headers, onResponse) => fetchProject(url, id, { headers, onResponse }))
60
- */
61
- export declare function observeDeliveryAPIRequest<T>(source: DeliveryAPIRequestObserverSource | undefined, endpoint: DeliveryAPIEndpoint, run: (headers?: Record<string, string>, onResponse?: (status: number) => void) => Promise<T | null>): Promise<T | null>;
62
- //# sourceMappingURL=request-observer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-observer.d.ts","sourceRoot":"","sources":["../../../src/data-source/request-observer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oDAAoD;AACpD,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,oBAAoB,CAAA;AAEzE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACnD;AAED,uDAAuD;AACvD,MAAM,WAAW,0BAA0B;IACzC,oFAAoF;IACpF,SAAS,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,eAAe,CAAA;CAC9D;AAED,yFAAyF;AACzF,MAAM,MAAM,gCAAgC,GAAG,MAAM,0BAA0B,GAAG,IAAI,GAAG,SAAS,CAAA;AAElG;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,EACvD,QAAQ,EAAE,mBAAmB,GAC5B,eAAe,CAOjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,EACzB,EAAE,EAAE,OAAO,EACX,MAAM,CAAC,EAAE,MAAM,GACd,IAAI,CAMN;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,EAC/C,MAAM,EAAE,gCAAgC,GAAG,SAAS,EACpD,QAAQ,EAAE,mBAAmB,EAC7B,GAAG,EAAE,CACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAClC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GACrB,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAenB"}
@@ -1,19 +0,0 @@
1
- /**
2
- * @file The shape guard for the generated `virtual:picked/data` module.
3
- *
4
- * Lives apart from the provider and the registry because both validate against it, and a guard
5
- * shared by two modules that also reference each other would otherwise close an import cycle.
6
- */
7
- import type { VirtualPickedData } from '../plugins/dynamic-experiences/types';
8
- /**
9
- * Runtime type guard that validates the shape of a `virtual:picked/data` module.
10
- *
11
- * @param {unknown} value - Candidate module exports.
12
- * @returns {boolean} Whether `value` matches the {@link VirtualPickedData} shape.
13
- * @example
14
- * ```typescript
15
- * if (isVirtualPickedData(mod)) { useVirtualModule(mod) }
16
- * ```
17
- */
18
- export declare function isVirtualPickedData(value: unknown): value is VirtualPickedData;
19
- //# sourceMappingURL=virtual-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"virtual-data.d.ts","sourceRoot":"","sources":["../../../src/data-source/virtual-data.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAU9E"}
@@ -1,85 +0,0 @@
1
- /** @file Action entity — Effector stores and registry for keyed callable functions. */
2
- import { type EventCallable, type Store } from 'effector';
3
- import type { StateSnapshot } from '../../lifecycle/state-snapshot';
4
- import type { Picked } from '../../picked';
5
- import type { ExperienceInstance } from '../experience-instance/experience-instance';
6
- /**
7
- * Context supplied by the experience-flow runtime when an ActionNode triggers the action.
8
- * `null` for every other invocation path (see {@link Action}).
9
- */
10
- export interface ActionContext {
11
- /** The experience instance whose ActionNode triggered this action. */
12
- experience: ExperienceInstance;
13
- }
14
- /**
15
- * A named callable function that receives a state snapshot, action args, and a context.
16
- *
17
- * `context` is an {@link ActionContext} only when the action is executed as an
18
- * ActionNode in an experience flow. It is `null` for every other invocation path,
19
- * including `getEvokableAction` and actions referenced from rule logic (condition
20
- * rules, `initializeOpenLogic`, launch decisions, feature gates, field
21
- * validation/visibility). Rule-logic paths evaluate the action against a snapshot
22
- * only and have no triggering instance.
23
- *
24
- * Re-entrancy: do not synchronously call navigation events (`goToNextStep`,
25
- * `goToPreviousStep`, `goToStepById`, `goToStepByKey`) or open-state events (`open`, `close`,
26
- * `toggleOpen`, `setOpen`) on `context.experience` before the handler's returned
27
- * promise resolves. Those writes race the flow runtime's post-action history
28
- * push and produce non-deterministic ordering. Perform control flow after your
29
- * side effect resolves.
30
- *
31
- * When executed as an ActionNode, only a thrown error (or rejected promise) routes to
32
- * the `onFail` edge. Every resolved value — `void`, `true`, `false`, or a
33
- * string/string[] — routes to `onSuccess`; a resolved `false` is a valid response, not
34
- * a failure. An action that maps an API response to the failure branch must therefore
35
- * throw on the failure case, e.g. `if (!response.ok) throw new Error(...)`. Outside a
36
- * flow (manual invocation, rule logic) the return value is used directly and this
37
- * branching does not apply.
38
- */
39
- export type Action = (snapshot: StateSnapshot & {
40
- args: unknown[];
41
- }, context: ActionContext | null) => boolean | Promise<boolean> | string | Promise<string> | string[] | Promise<string[]> | void | Promise<void> | undefined;
42
- export type ActionsStore = ReturnType<typeof createActionIndexFactory>;
43
- export interface ActionIndexItem {
44
- key: string;
45
- action: Action;
46
- }
47
- declare const createActionIndexFactory: ({ client }: {
48
- client: Picked;
49
- }) => {
50
- register: EventCallable<{
51
- key: string;
52
- action: Action;
53
- }>;
54
- getByKey: (key: string) => Store<Action | undefined>;
55
- listStore: Store<ActionIndexItem[]>;
56
- getEvokableAction: (actionKey: string, options?: {
57
- experience: ExperienceInstance;
58
- }) => Store<() => ReturnType<Action>>;
59
- };
60
- /**
61
- * Creates an action index with lifecycle stores and registration logic.
62
- *
63
- * @param {object} params - Factory parameters including the client.
64
- * @returns {ReturnType<typeof createActionIndexFactory>} The action index with register, getByKey, listStore, and getEvokableAction methods.
65
- * @example
66
- * ```ts
67
- * const actions = createActionIndex({ client })
68
- * actions.register('log-event', ({ responses }) => { console.log(responses) })
69
- * ```
70
- */
71
- export declare function createActionIndex<T extends Parameters<typeof createActionIndexFactory>[0]>(params: T): ReturnType<typeof createActionIndexFactory>;
72
- /**
73
- * Convenience helper that registers a single action on the given store.
74
- *
75
- * @param {string} key - Unique key for the action.
76
- * @param {Action} action - The action function to register.
77
- * @param {ActionsStore} actions - The actions store to register into.
78
- * @example
79
- * ```ts
80
- * setupAction('log-event', ({ responses }) => { console.log(responses) }, actionsStore)
81
- * ```
82
- */
83
- export declare const setupAction: (key: string, action: Action, actions: ActionsStore) => void;
84
- export {};
85
- //# sourceMappingURL=action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/entities/action/action.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAEpF;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,sEAAsE;IACtE,UAAU,EAAE,kBAAkB,CAAA;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,MAAM,GAAG,CACnB,QAAQ,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,EAC7C,OAAO,EAAE,aAAa,GAAG,IAAI,KAE3B,OAAO,GACP,OAAO,CAAC,OAAO,CAAC,GAChB,MAAM,GACN,OAAO,CAAC,MAAM,CAAC,GACf,MAAM,EAAE,GACR,OAAO,CAAC,MAAM,EAAE,CAAC,GACjB,IAAI,GACJ,OAAO,CAAC,IAAI,CAAC,GACb,SAAS,CAAA;AAEb,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEtE,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf;AAID,QAAA,MAAM,wBAAwB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;aAqBvC,MAAM;gBAAU,MAAM;;oBA8BpC,MAAM;;mCA6BhB,MAAM,YACP;QAAE,UAAU,EAAE,kBAAkB,CAAA;KAAE,KAC3C,KAAK,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;CA4ClC,CAAA;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,EACxF,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAE7C;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,UAAU,MAAM,WAAW,YAAY,KAAG,IAEhF,CAAA"}
@@ -1,11 +0,0 @@
1
- export interface LazyComponentLoader<C = unknown> {
2
- readonly $$type: 'lazy-component';
3
- load: () => Promise<{
4
- default: C;
5
- }>;
6
- }
7
- export declare function lazyComponent<C>(factory: () => Promise<{
8
- default: C;
9
- }>): LazyComponentLoader<C>;
10
- export declare function isLazyLoader(value: unknown): value is LazyComponentLoader;
11
- //# sourceMappingURL=lazyComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazyComponent.d.ts","sourceRoot":"","sources":["../../../../src/entities/component/lazyComponent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,OAAO;IAC9C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,IAAI,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC,CAAA;KAAE,CAAC,CAAA;CACpC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAK/F;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAOzE"}
@@ -1,29 +0,0 @@
1
- import type { LogicRule } from '../../logic-engine';
2
- export type ConditionsStore = ReturnType<typeof createConditionIndex>;
3
- export interface Condition {
4
- id: string;
5
- key: string;
6
- name: string;
7
- logic: LogicRule;
8
- }
9
- declare const createConditionIndexFactory: () => {
10
- register: (condition: Condition) => void;
11
- getById: (id: Condition['id']) => import("effector").Store<Condition | null>;
12
- getByKey: (key: Condition['key']) => import("effector").Store<Condition | null>;
13
- listStore: import("effector").Store<Condition[]>;
14
- indexStore: import("effector").StoreWritable<{
15
- [id: string]: Condition;
16
- }>;
17
- };
18
- /**
19
- * Creates a reactive condition index with registration and derived lookup helpers
20
- * (by id, by key, and full list).
21
- *
22
- * @returns {ConditionsStore} The condition index and its helpers.
23
- * @example
24
- * const conditions = createConditionIndex()
25
- * conditions.register({ id: 'c1', key: 'is-home', name: 'Home', logic: { '==': [1, 1] } })
26
- */
27
- export declare function createConditionIndex(): ReturnType<typeof createConditionIndexFactory>;
28
- export {};
29
- //# sourceMappingURL=condition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../src/entities/condition/condition.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;CACjB;AAED,QAAA,MAAM,2BAA2B;0BAqBF,SAAS,KAAG,IAAI;kBAgBxB,SAAS,CAAC,IAAI,CAAC;oBAYb,SAAS,CAAC,KAAK,CAAC;;;;;CAgBvC,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAErF"}