@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
@@ -0,0 +1,5 @@
1
+ const l = (e, ...r) => {
2
+ };
3
+ export {
4
+ l
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";function c(t,e,n){if(!(e in t))return;const o=t[e];if(typeof o!="function")throw new Error(`Expected '${String(e)}' to be a function`);const r=n(o);p(r,o),t[e]=r}function i(t,e,n){Object.defineProperty(t,e,{enumerable:!1,value:n,writable:!0,configurable:!0})}function p(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,i(t,"__picked_original",e)}function u(t){return t===void 0||typeof t=="object"&&t!==null&&t.constructor===Object&&Object.keys(t).length===0}exports.isEmpty=u;exports.patchMethod=c;
@@ -0,0 +1,28 @@
1
+ function p(t, e, n) {
2
+ if (!(e in t))
3
+ return;
4
+ const o = t[e];
5
+ if (typeof o != "function")
6
+ throw new Error(`Expected '${String(e)}' to be a function`);
7
+ const r = n(o);
8
+ i(r, o), t[e] = r;
9
+ }
10
+ function c(t, e, n) {
11
+ Object.defineProperty(t, e, {
12
+ enumerable: !1,
13
+ value: n,
14
+ writable: !0,
15
+ configurable: !0
16
+ });
17
+ }
18
+ function i(t, e) {
19
+ const n = e.prototype || {};
20
+ t.prototype = e.prototype = n, c(t, "__picked_original", e);
21
+ }
22
+ function u(t) {
23
+ return t === void 0 || typeof t == "object" && t !== null && t.constructor === Object && Object.keys(t).length === 0;
24
+ }
25
+ export {
26
+ u as i,
27
+ p
28
+ };
@@ -0,0 +1 @@
1
+ "use strict";function f(e,t="global",o){let s="picked";if(t==="experience"){if(!o)throw new Error("Experience instance is required to scope storage to an experience");s=`${s}:${o.experienceId}`}return`${s}:${e}`}function l(e,t){const o=t==="local"?localStorage:sessionStorage,s=o.getItem(e),r=o.getItem(`${e}:expires-at`);if(r){const n=new Date,i=new Date(r);if(n>i)return c(e,t),{text:()=>null,json:()=>null,boolean:()=>null}}return{text(){return s},json(){return s?JSON.parse(s):null},boolean(){return s?s==="true":null}}}function u(e,t,o,s){const r=o==="local"?localStorage:sessionStorage,n=typeof t!="string"?JSON.stringify(t):t;if(r.setItem(e,n),typeof s=="number"){const g=new Date(Date.now()+s).toISOString();r.setItem(`${e}:expires-at`,g)}}function c(e,t){const o=t==="local"?localStorage:sessionStorage;o.removeItem(e),o.removeItem(`${e}:expires-at`)}function a(e,t,o,s){const r=t==="local"?localStorage:sessionStorage;function n(i){i.storageArea===r&&i.key===e&&s(o(e))}return window.addEventListener("storage",n),function(){window.removeEventListener("storage",n)}}const S={get(e){return l(e,"session")},set(e,t,o){u(e,t,"session",o)},remove(e){c(e,"session")},subscribe(e,t){return a(e,"session",this.get,t)}},m={get(e){return l(e,"local")},set(e,t,o){u(e,t,"local",o)},remove(e){c(e,"local")},subscribe(e,t){return a(e,"local",this.get,t)}};exports.createStorageKey=f;exports.localStore=m;exports.sessionStore=S;exports.subscribe=a;
@@ -0,0 +1,85 @@
1
+ function f(e, t = "global", o) {
2
+ let s = "picked";
3
+ if (t === "experience") {
4
+ if (!o)
5
+ throw new Error("Experience instance is required to scope storage to an experience");
6
+ s = `${s}:${o.experienceId}`;
7
+ }
8
+ return `${s}:${e}`;
9
+ }
10
+ function c(e, t) {
11
+ const o = t === "local" ? localStorage : sessionStorage, s = o.getItem(e), n = o.getItem(`${e}:expires-at`);
12
+ if (n) {
13
+ const r = /* @__PURE__ */ new Date(), i = new Date(n);
14
+ if (r > i)
15
+ return a(e, t), {
16
+ text: () => null,
17
+ json: () => null,
18
+ boolean: () => null
19
+ };
20
+ }
21
+ return {
22
+ text() {
23
+ return s;
24
+ },
25
+ json() {
26
+ return s ? JSON.parse(s) : null;
27
+ },
28
+ boolean() {
29
+ return s ? s === "true" : null;
30
+ }
31
+ };
32
+ }
33
+ function l(e, t, o, s) {
34
+ const n = o === "local" ? localStorage : sessionStorage, r = typeof t != "string" ? JSON.stringify(t) : t;
35
+ if (n.setItem(e, r), typeof s == "number") {
36
+ const g = new Date(Date.now() + s).toISOString();
37
+ n.setItem(`${e}:expires-at`, g);
38
+ }
39
+ }
40
+ function a(e, t) {
41
+ const o = t === "local" ? localStorage : sessionStorage;
42
+ o.removeItem(e), o.removeItem(`${e}:expires-at`);
43
+ }
44
+ function u(e, t, o, s) {
45
+ const n = t === "local" ? localStorage : sessionStorage;
46
+ function r(i) {
47
+ i.storageArea === n && i.key === e && s(o(e));
48
+ }
49
+ return window.addEventListener("storage", r), function() {
50
+ window.removeEventListener("storage", r);
51
+ };
52
+ }
53
+ const p = {
54
+ get(e) {
55
+ return c(e, "session");
56
+ },
57
+ set(e, t, o) {
58
+ l(e, t, "session", o);
59
+ },
60
+ remove(e) {
61
+ a(e, "session");
62
+ },
63
+ subscribe(e, t) {
64
+ return u(e, "session", this.get, t);
65
+ }
66
+ }, m = {
67
+ get(e) {
68
+ return c(e, "local");
69
+ },
70
+ set(e, t, o) {
71
+ l(e, t, "local", o);
72
+ },
73
+ remove(e) {
74
+ a(e, "local");
75
+ },
76
+ subscribe(e, t) {
77
+ return u(e, "local", this.get, t);
78
+ }
79
+ };
80
+ export {
81
+ u as a,
82
+ f as c,
83
+ m as l,
84
+ p as s
85
+ };
@@ -0,0 +1,79 @@
1
+ const o = Symbol("Picked"), t = globalThis, r = (n) => {
2
+ t[o] = n;
3
+ };
4
+ function e() {
5
+ try {
6
+ return "location" in t && !!t.location;
7
+ } catch {
8
+ return !1;
9
+ }
10
+ }
11
+ function s() {
12
+ try {
13
+ return "history" in t && !!t.history;
14
+ } catch {
15
+ return !1;
16
+ }
17
+ }
18
+ function a() {
19
+ try {
20
+ return "localStorage" in t && !!t.localStorage;
21
+ } catch {
22
+ return !1;
23
+ }
24
+ }
25
+ function c() {
26
+ try {
27
+ return "sessionStorage" in t && !!t.sessionStorage;
28
+ } catch {
29
+ return !1;
30
+ }
31
+ }
32
+ function u() {
33
+ try {
34
+ return "document" in t && "cookie" in t.document;
35
+ } catch {
36
+ return !1;
37
+ }
38
+ }
39
+ function i() {
40
+ try {
41
+ return "document" in t && "createElement" in t.document && "attachShadow" in t.document.createElement("div");
42
+ } catch {
43
+ return !1;
44
+ }
45
+ }
46
+ function l() {
47
+ try {
48
+ return "window" in t;
49
+ } catch {
50
+ return !1;
51
+ }
52
+ }
53
+ function f() {
54
+ try {
55
+ return "document" in t;
56
+ } catch {
57
+ return !1;
58
+ }
59
+ }
60
+ function p() {
61
+ try {
62
+ return "IntersectionObserver" in t;
63
+ } catch {
64
+ return !1;
65
+ }
66
+ }
67
+ export {
68
+ t as G,
69
+ l as a,
70
+ r as b,
71
+ e as c,
72
+ s as d,
73
+ a as e,
74
+ c as f,
75
+ u as g,
76
+ i as h,
77
+ p as i,
78
+ f as s
79
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=Symbol("Picked"),t=globalThis,n=o=>{t[r]=o};function e(){try{return"location"in t&&!!t.location}catch{return!1}}function s(){try{return"history"in t&&!!t.history}catch{return!1}}function c(){try{return"localStorage"in t&&!!t.localStorage}catch{return!1}}function u(){try{return"sessionStorage"in t&&!!t.sessionStorage}catch{return!1}}function i(){try{return"document"in t&&"cookie"in t.document}catch{return!1}}function a(){try{return"document"in t&&"createElement"in t.document&&"attachShadow"in t.document.createElement("div")}catch{return!1}}function p(){try{return"window"in t}catch{return!1}}function l(){try{return"document"in t}catch{return!1}}function f(){try{return"IntersectionObserver"in t}catch{return!1}}exports.GLOBAL_OBJ=t;exports.bindClient=n;exports.supportsCookies=i;exports.supportsDocument=l;exports.supportsHistory=s;exports.supportsIntersectionObserver=f;exports.supportsLocalStorage=c;exports.supportsLocation=e;exports.supportsSessionStorage=u;exports.supportsShadowRoot=a;exports.supportsWindow=p;
@@ -1,44 +1,25 @@
1
- /** @file Options interface for creating a Picked client instance. */
2
- import type { Predicate } from './entities/predicate/predicate';
3
- import type { Action } from './entities/action/action';
4
- import type { Plugin } from './entities/plugin/plugin';
5
- import type { Feature } from './entities/feature/feature';
6
- import type { FieldDefinition } from './entities/field/field';
7
- import type { AdaptedComponent } from './entities/component/component';
8
- import type { LogicRule } from './logic-engine';
1
+ import { Predicate } from './entities/predicate/predicate';
2
+ import { Plugin } from './entities/plugin/plugin';
3
+ import { Feature } from './entities/feature/feature';
9
4
  export interface CreateClientOptions {
10
5
  /**
11
- * @deprecated The organization id is no longer used by the Picked client. The
12
- * field is accepted for backwards compatibility but the value is ignored.
6
+ * Your organizations unique identifier
13
7
  */
14
- organizationId?: string;
8
+ organizationId: string;
15
9
  /**
16
- * Your projects unique identifier.
17
- * If not provided the projectId will be read from window.pickedConfig.projectId or data-projectid on the script tag.
10
+ * Your projects unique identifier
18
11
  */
19
- projectId?: string;
12
+ projectId: string;
20
13
  /**
21
- * Authentication token for previewing unpublished experiences.
14
+ * Authentication token for previewing unpublished experiences
22
15
  */
23
16
  previewToken?: string;
24
17
  /**
25
- * Base URL for the Picked API service.
18
+ * Base URL for the Picked API service
26
19
  */
27
20
  apiUrl?: string;
28
21
  /**
29
- * Base URL for the Picked Dashboard.
30
- *
31
- * @default 'https://dashboard.picked.app'
32
- */
33
- dashboardUrl?: string;
34
- /**
35
- * Base URL for the documentation site shown in devtools.
36
- *
37
- * @default 'https://docs.picked.app'
38
- */
39
- documentationSiteUrl?: string;
40
- /**
41
- * Register predicates to determine when experiences should be rendered.
22
+ * Register predicates to determine when experiences should be rendered
42
23
  *
43
24
  * @example
44
25
  * ```typescript
@@ -51,24 +32,7 @@ export interface CreateClientOptions {
51
32
  */
52
33
  predicates?: Record<string, Predicate>;
53
34
  /**
54
- * Register actions to be invoked in experience trees and JSON Logic conditions.
55
- * Actions receive a state snapshot with full client context.
56
- *
57
- * @example
58
- * ```typescript
59
- * actions: {
60
- * logEvent({ client, responses, location, args }) {
61
- * // custom logic with access to full state
62
- * },
63
- * isLoggedIn({ responses }) {
64
- * return responses.some(r => r.fieldKey === 'userId' && r.value)
65
- * }
66
- * }
67
- * ```
68
- */
69
- actions?: Record<string, Action>;
70
- /**
71
- * Plugins to extend client functionality.
35
+ * Plugins to extend client functionality
72
36
  *
73
37
  * @example
74
38
  * ```typescript
@@ -81,81 +45,21 @@ export interface CreateClientOptions {
81
45
  */
82
46
  plugins?: (Plugin | (() => Plugin) | Plugin[] | (() => Plugin[]))[];
83
47
  /**
84
- * Calculate AB test results to decide which experience to show.
48
+ * Calulate AB test results to decide which experience to show
85
49
  *
86
50
  * @example
87
- * ```typescript
88
- * features: {
89
- * 'summer-sales-experiment': {
90
- * key: 'summer-sales-experiment-1',
91
- * name: 'Summer Sales Experiment',
92
- * decide: async () => {
93
- * await new Promise((resolve) => setTimeout(resolve, 800))
94
- * return false
95
- * },
96
- * weight: 0.2,
97
- * }
98
- * }
99
- * ```
51
+ ```typescript
52
+ 'summer-sales-experiment': {
53
+ key: 'summer-sales-experiment-1',
54
+ name: 'Summer Sales Experiment',
55
+ decide: async () => {
56
+ await new Promise((resolve) => setTimeout(resolve, 800))
57
+ return false
58
+ },
59
+ weight: 0.2,
60
+ }
61
+ ````
100
62
  */
101
63
  features?: Record<string, Feature | (() => Feature)>;
102
- /**
103
- * Register fields that capture responses in experiences. The record key supplies the
104
- * field `key` when the definition omits one; an explicit `key` on the definition wins.
105
- * A function value is resolved once during client setup.
106
- *
107
- * @example
108
- * ```typescript
109
- * fields: {
110
- * email: {
111
- * id: 'email',
112
- * name: 'email',
113
- * label: 'Email',
114
- * type: 'text',
115
- * multiple: false,
116
- * required: true,
117
- * }
118
- * }
119
- * ```
120
- */
121
- fields?: Record<string, FieldDefinition | (() => FieldDefinition)>;
122
- /**
123
- * Register components for use in dynamic experiences.
124
- *
125
- * @example
126
- * ```typescript
127
- * components: {
128
- * HeroBanner: adaptedHeroBannerComponent,
129
- * ProductCard: adaptedProductCardComponent,
130
- * }
131
- * ```
132
- */
133
- components?: Record<string, AdaptedComponent>;
134
- /**
135
- * Evaluate a condition or boolean expression before initializing the client.
136
- *
137
- * @example
138
- * ```typescript
139
- * precondition: {
140
- * invoke: {
141
- * var: 'predicates.shopify-is-product-page',
142
- * },
143
- * }
144
- * ```
145
- */
146
- precondition?: LogicRule;
147
- /**
148
- * Evaluate a condition or boolean expression to determine the user state at initialization.
149
- *
150
- * @example
151
- * ```typescript
152
- * condition: {
153
- * invoke: {
154
- * var: 'features.convincely-enabled',
155
- * },
156
- * }
157
- * ```
158
- */
159
- condition?: LogicRule;
160
64
  }
161
65
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BA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,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAE7C;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IAExB;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEtC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,EAAE,CAAA;IAEnE;;;;;;;;;;;;;;;OAeG;IAEH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC,CAAA;CACrD"}
@@ -1,7 +1,5 @@
1
- /** @file Component entity — Effector stores and registry for framework-specific component implementations. */
2
- import type { EventCallable, Store } from 'effector';
3
- import type { Picked } from '../../picked';
4
- import type { LazyComponentLoader } from './lazyComponent';
1
+ import { Store } from 'effector';
2
+ import { Picked } from '../../picked';
5
3
  export interface AdaptedComponentStyle {
6
4
  sheets?: string[];
7
5
  css?: string[];
@@ -10,7 +8,7 @@ export interface LazyAdaptedComponent<F extends string = string, C = unknown> {
10
8
  frameworkName: F;
11
9
  component: Promise<{
12
10
  default: C;
13
- }> | LazyComponentLoader<C>;
11
+ }>;
14
12
  style?: AdaptedComponentStyle;
15
13
  }
16
14
  export interface EagerAdaptedComponent<F extends string = string, C = unknown> {
@@ -31,27 +29,13 @@ declare const createComponentFactory: ({ client, component, name }: {
31
29
  }) => {
32
30
  name: string;
33
31
  component: AdaptedComponent<string, unknown>;
34
- frameworkStore: Store<import("../..").Framework | undefined>;
32
+ frameworkStore: Store<import('../..').Framework | undefined>;
35
33
  };
36
- /**
37
- * Creates a component with framework-specific metadata and loader.
38
- *
39
- * @template T - Factory parameter type.
40
- * @param params - The client, component name, and adapted component.
41
- * @returns A component with name, component, and frameworkStore.
42
- * @example
43
- * ```ts
44
- * const component = createComponent({ client, name: 'experience', component: adaptedComp })
45
- * ```
46
- */
47
34
  export declare function createComponent<T extends Parameters<typeof createComponentFactory>[0]>(params: T): ReturnType<typeof createComponentFactory>;
48
35
  declare const createComponentIndexFactory: ({ client }: {
49
36
  client: Picked;
50
37
  }) => {
51
- register: EventCallable<{
52
- name: string;
53
- component: AdaptedComponent;
54
- }>;
38
+ register: (name: string, component: AdaptedComponent) => void;
55
39
  getByName: (name: string) => Store<{
56
40
  name: string;
57
41
  component: AdaptedComponent;
@@ -59,33 +43,10 @@ declare const createComponentIndexFactory: ({ client }: {
59
43
  listStore: Store<{
60
44
  name: string;
61
45
  component: AdaptedComponent<string, unknown>;
62
- frameworkStore: Store<import("../..").Framework | undefined>;
46
+ frameworkStore: Store<import('../..').Framework | undefined>;
63
47
  }[]>;
64
48
  };
65
- /**
66
- * Creates a component index with lifecycle stores and registration logic.
67
- *
68
- * @template T - Factory parameter type.
69
- * @param {T} params - Factory parameters including the client.
70
- * @returns {ReturnType<typeof createComponentIndexFactory>} The component index with register, getByName, and listStore methods.
71
- * @example
72
- * ```ts
73
- * const components = createComponentIndex({ client })
74
- * components.register('experience', adaptedComponent)
75
- * ```
76
- */
77
49
  export declare function createComponentIndex<T extends Parameters<typeof createComponentIndexFactory>[0]>(params: T): ReturnType<typeof createComponentIndexFactory>;
78
- /**
79
- * Convenience helper that registers a single component on the given index.
80
- *
81
- * @param {string} name - Unique name for the component.
82
- * @param {AdaptedComponent} component - The adapted component to register.
83
- * @param {ComponentIndex} components - The component index to register into.
84
- * @example
85
- * ```ts
86
- * setupComponent('experience', adaptedComponent, componentsIndex)
87
- * ```
88
- */
89
50
  export declare const setupComponent: (name: string, component: AdaptedComponent, components: ComponentIndex) => void;
90
51
  export {};
91
52
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/entities/component/component.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IAC1E,aAAa,EAAE,CAAC,CAAA;IAChB,SAAS,EAAE,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC,CAAA;KAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;IAC3D,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAC9B;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IAC3E,aAAa,EAAE,CAAC,CAAA;IAChB,SAAS,EAAE,CAAC,CAAA;I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