@picked/client 0.0.1-dev.1788925875333 → 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 (439) 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 +733 -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 -152
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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-DbMJli3H.js +0 -22
  137. package/dist/api-qiqq8lgz.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 -34
  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-DGk11d8a.js +0 -563
  284. package/dist/experience-instance-Dej3P1sE.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-BcLaCLm1.cjs +0 -1
  294. package/dist/plugin-De_BJSwE.js +0 -194
  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-C_9u0yGJ.cjs +0 -1
  300. package/dist/provider-ovM-CBX_.js +0 -98
  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/picked-config.d.ts +0 -39
  425. package/dist/types/utils/picked-config.d.ts.map +0 -1
  426. package/dist/types/utils/preview-session.d.ts +0 -12
  427. package/dist/types/utils/preview-session.d.ts.map +0 -1
  428. package/dist/types/utils/rehydrate-scripts.d.ts +0 -50
  429. package/dist/types/utils/rehydrate-scripts.d.ts.map +0 -1
  430. package/dist/types/utils/render-string.d.ts +0 -24
  431. package/dist/types/utils/render-string.d.ts.map +0 -1
  432. package/dist/types/utils/user-timing.d.ts +0 -21
  433. package/dist/types/utils/user-timing.d.ts.map +0 -1
  434. package/dist/version-BvLZaTMC.cjs +0 -1
  435. package/dist/version-VvasRUfR.js +0 -256
  436. /package/dist/types/plugins/{experience-browser-storage → experience-browserstorage-plugin}/index.d.ts +0 -0
  437. /package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/index.d.ts +0 -0
  438. /package/dist/types/plugins/{responses-browser-storage → responses-browserstorage-plugin}/index.d.ts +0 -0
  439. /package/dist/types/plugins/{responses-indexeddb → responses-indexeddb-plugin}/index.d.ts +0 -0
@@ -1,206 +0,0 @@
1
- /** @file Schema registry types augmented by generated `picked-env.d.ts`. */
2
- import type { Content } from './entities/content/content';
3
- import type { FieldValue as ResponseFieldValue } from './entities/field/field';
4
- /**
5
- * Augmented by generated `picked-env.d.ts`. Empty by default.
6
- *
7
- * @example
8
- * // After codegen:
9
- * // interface PickedSchemaRegistry {
10
- * // contentModels: { 'welcome-page': WelcomePageContent }
11
- * // }
12
- */
13
- export interface PickedSchemaRegistry {
14
- }
15
- type ContentModelsMap = PickedSchemaRegistry extends {
16
- contentModels: infer M extends Record<string, unknown>;
17
- } ? M : Record<string, Record<string, unknown>>;
18
- type StepContentModelsMap = PickedSchemaRegistry extends {
19
- stepContentModels: infer S extends Record<string, string>;
20
- } ? S : Record<string, string>;
21
- type StepFieldKeysMap = PickedSchemaRegistry extends {
22
- stepFieldKeys: infer S extends Record<string, string>;
23
- } ? S : Record<string, string>;
24
- type FieldValuesMap = PickedSchemaRegistry extends {
25
- fieldValues: infer F extends Record<string, unknown>;
26
- } ? F : never;
27
- type FeatureValuesMap = PickedSchemaRegistry extends {
28
- featureValues: infer F extends Record<string, boolean | string>;
29
- } ? F : never;
30
- /**
31
- * Widens a key union so it still accepts a key the workspace does not declare.
32
- *
33
- * Features, actions, fields, steps and experiences can all be defined in the application
34
- * rather than the workspace — `createClient({ features })` and `client.registerField()`
35
- * among them — and those keys are absent from the generated schema. Intersecting with an
36
- * object type keeps TypeScript from collapsing `K | string` down to `string`, so an editor
37
- * still suggests the workspace's keys while any other string is accepted.
38
- *
39
- * The `Known*` union beside each key type stays closed, for a caller that wants only what
40
- * the workspace declares.
41
- */
42
- type AnyString = string & Record<never, never>;
43
- /**
44
- * Feature keys the workspace declares. Closed: a locally-defined feature is not in it.
45
- *
46
- * @example
47
- * type Keys = KnownFeatureKeys
48
- */
49
- export type KnownFeatureKeys = PickedSchemaRegistry extends {
50
- featureKeys: infer K extends string;
51
- } ? K : string;
52
- /**
53
- * Value a feature key can resolve to.
54
- *
55
- * A text feature declares its arms in the schema, so its key narrows to that union. Every
56
- * other key — a boolean feature, a feature registered in application code, a
57
- * `?picked-feature=` override — reads as the general `boolean | string`, which is the
58
- * documented contract for a key the workspace does not declare.
59
- *
60
- * @param {PropertyKey} K - Feature key from the workspace schema.
61
- * @example
62
- * type Hero = FeatureValueFor<'hero'>
63
- */
64
- export type FeatureValueFor<K extends PropertyKey> = FeatureValuesMap extends never ? boolean | string : K extends keyof FeatureValuesMap ? FeatureValuesMap[K] : boolean | string;
65
- /**
66
- * Feature keys — the workspace union when augmented, plus any locally-defined key.
67
- *
68
- * @example
69
- * type Keys = FeatureKeys
70
- */
71
- export type FeatureKeys = PickedSchemaRegistry extends {
72
- featureKeys: infer K extends string;
73
- } ? K | AnyString : string;
74
- /**
75
- * Step keys the workspace declares. Closed: a locally-registered step is not in it.
76
- *
77
- * @example
78
- * type Keys = KnownStepKeys
79
- */
80
- export type KnownStepKeys = PickedSchemaRegistry extends {
81
- stepKeys: infer K extends string;
82
- } ? K : string;
83
- /**
84
- * Step keys — the workspace union when augmented, plus any locally-registered key.
85
- *
86
- * @example
87
- * type Keys = StepKeys
88
- */
89
- export type StepKeys = PickedSchemaRegistry extends {
90
- stepKeys: infer K extends string;
91
- } ? K | AnyString : string;
92
- /**
93
- * Action keys the workspace declares. Closed: an action the app registers on its own is
94
- * not in it.
95
- *
96
- * @example
97
- * type Keys = KnownActionKeys
98
- */
99
- export type KnownActionKeys = PickedSchemaRegistry extends {
100
- actionKeys: infer K extends string;
101
- } ? K : string;
102
- /**
103
- * Action keys — the workspace union when augmented, plus any key the app registers.
104
- *
105
- * @example
106
- * type Keys = ActionKeys
107
- */
108
- export type ActionKeys = PickedSchemaRegistry extends {
109
- actionKeys: infer K extends string;
110
- } ? K | AnyString : string;
111
- /**
112
- * Experience keys the workspace declares. Closed: a locally-registered experience is not
113
- * in it.
114
- *
115
- * @example
116
- * type Keys = KnownExperienceKeys
117
- */
118
- export type KnownExperienceKeys = PickedSchemaRegistry extends {
119
- experienceKeys: infer K extends string;
120
- } ? K : string;
121
- /**
122
- * Experience keys — the workspace union when augmented, plus any locally-registered key.
123
- *
124
- * @example
125
- * type Keys = ExperienceKeys
126
- */
127
- export type ExperienceKeys = PickedSchemaRegistry extends {
128
- experienceKeys: infer K extends string;
129
- } ? K | AnyString : string;
130
- /**
131
- * Field keys the workspace declares. Closed: a locally-registered field is not in it.
132
- *
133
- * @example
134
- * type Keys = KnownFieldKeys
135
- */
136
- export type KnownFieldKeys = FieldValuesMap extends never ? string : keyof FieldValuesMap & string;
137
- /**
138
- * Field keys — the workspace union when augmented, plus any locally-registered key.
139
- *
140
- * A key outside the workspace reads as the general {@link FieldValueFor} value type, which
141
- * is how every value resolver here already treats one.
142
- *
143
- * @example
144
- * type Keys = FieldKeys
145
- */
146
- export type FieldKeys = FieldValuesMap extends never ? string : KnownFieldKeys | AnyString;
147
- /**
148
- * Union of every content model bound to a step layout.
149
- *
150
- * @example
151
- * type Union = StepLayoutContent
152
- */
153
- export type StepLayoutContent = ContentModelsMap[StepContentModelsMap[keyof StepContentModelsMap] & keyof ContentModelsMap];
154
- /**
155
- * Content type for a specific step key, via the step -> model map.
156
- *
157
- * @param {PropertyKey} K - Step key from the workspace schema.
158
- * @example
159
- * type Main = ContentForStep<'main'>
160
- */
161
- export type ContentForStep<K extends PropertyKey> = K extends keyof StepContentModelsMap ? ContentModelsMap[StepContentModelsMap[K] & keyof ContentModelsMap] : StepLayoutContent;
162
- /**
163
- * Field keys bound to a specific step key, via the step → field-keys map.
164
- * Falls back to all workspace {@link FieldKeys} when the registry has no
165
- * `stepFieldKeys` entry for `K` (old snapshots / unaugmented clients).
166
- *
167
- * @param {PropertyKey} K - Step key from the workspace schema.
168
- * @example
169
- * type MainFields = FieldKeysForStep<'main'>
170
- */
171
- export type FieldKeysForStep<K extends PropertyKey> = K extends keyof StepFieldKeysMap ? StepFieldKeysMap[K] & KnownFieldKeys : FieldKeys;
172
- /**
173
- * Value type for a field key (always optional at read time).
174
- *
175
- * @param {PropertyKey} K - Field key from the workspace schema.
176
- * @example
177
- * type Email = FieldValueFor<'email'>
178
- */
179
- export type FieldValueFor<K extends PropertyKey> = FieldValuesMap extends never ? ResponseFieldValue : K extends keyof FieldValuesMap ? FieldValuesMap[K] | null : ResponseFieldValue;
180
- /**
181
- * A `Content` record whose `data` is narrowed to `TData`.
182
- *
183
- * @param {unknown} TData - Explicit content model shape.
184
- * @example
185
- * type Typed = TypedContent<WelcomePageContent>
186
- */
187
- export type TypedContent<TData> = Omit<Content, 'data'> & {
188
- data: TData;
189
- };
190
- /**
191
- * The Content record a `reference` field value points at.
192
- *
193
- * A generated pointer carries the target's shape on its optional `data` member, so the
194
- * referenced record narrows to that shape. A value the generator knows nothing about —
195
- * an unaugmented client, or a field that accepts any Content Model — falls back to the
196
- * untyped {@link Content}. A repeatable field resolves through its element type.
197
- *
198
- * @param {unknown} TValue - The raw `reference` field value read from a content blob.
199
- * @example
200
- * type Author = ReferencedContent<WelcomePageContent['author']>
201
- */
202
- export type ReferencedContent<TValue> = NonNullable<TValue> extends readonly (infer TElement)[] ? ReferencedContent<TElement> : NonNullable<TValue> extends {
203
- data?: infer TData;
204
- } ? [NonNullable<TData>] extends [never] ? Content : TypedContent<NonNullable<TData>> : Content;
205
- export type { StepContentModelsMap };
206
- //# sourceMappingURL=schema-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema-registry.d.ts","sourceRoot":"","sources":["../../src/schema-registry.ts"],"names":[],"mappings":"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"}
@@ -1,87 +0,0 @@
1
- /**
2
- * @file Server-side `serialize` helper: synchronously registers a project config, selects the
3
- * experiences whose conditions pass for a given URL, fetches content for the selected
4
- * experiences that reference CMS layout content, and returns a plain-JSON snapshot for SSR
5
- * hydration.
6
- *
7
- * The snapshot is plain JSON: `projectConfig` travels so the client renders against the exact
8
- * config the server selected with (critical for preview), and `conditionResults` carries the
9
- * memoized selection so the client's first paint reuses the server's results without re-evaluating.
10
- */
11
- import type { ContentBlob, ProjectConfig } from '@picked/delivery-api-client';
12
- import type { Picked } from '../picked';
13
- /** Subset of `Location` fields that can be injected into the selection context. */
14
- export interface SerializeLocation {
15
- href: string;
16
- pathname: string;
17
- search: string;
18
- hostname: string;
19
- origin: string;
20
- protocol: string;
21
- port: string;
22
- host: string;
23
- hash: string;
24
- }
25
- /** Optional attributes injected into the selection context (currently the URL). */
26
- export interface SerializeAttributes {
27
- location?: Partial<SerializeLocation>;
28
- }
29
- /** Parameters for {@link serialize}. */
30
- export interface SerializeParams {
31
- /** URL attributes injected into the selection context. */
32
- attributes?: SerializeAttributes;
33
- /**
34
- * Preview token for this request, so preview (unpublished) config and content resolve during
35
- * preview SSR. The server has no `searchParams`, so the token cannot be recovered otherwise.
36
- */
37
- previewToken?: string;
38
- /**
39
- * Per-content-fetch timeout in milliseconds for the API path, so a slow or hung upstream cannot
40
- * stall the SSR render indefinitely. On timeout the blob is skipped and the render proceeds.
41
- * Defaults to {@link DEFAULT_CONTENT_TIMEOUT_MS}.
42
- */
43
- timeoutMs?: number;
44
- }
45
- /**
46
- * Plain-JSON SSR snapshot produced by {@link serialize} and consumed by the client provider.
47
- */
48
- export interface PickedSnapshot {
49
- /** The project version the snapshot was selected against, or `null` when unknown. */
50
- versionId: string | null;
51
- /** The project config the server selected with (travels for preview parity). */
52
- projectConfig: ProjectConfig;
53
- /**
54
- * Deduped content blobs for the selected experiences — the steps' own layout
55
- * content and every entry reached from it through a `reference` field. The
56
- * client provider seeds the whole array into the content registry, so both
57
- * resolve identically on the server render and the first client paint.
58
- */
59
- content: ContentBlob[];
60
- /** Memoized condition-evaluation results keyed by rule hash. */
61
- conditionResults: Record<string, boolean>;
62
- }
63
- /**
64
- * Selects the experiences whose conditions pass for a URL and returns a plain-JSON snapshot for
65
- * SSR hydration.
66
- *
67
- * Config and content both resolve through the client, which keeps them on one source: a bundled
68
- * render cannot pair a bundled config with API-fetched content from a newer publish. Content is
69
- * deduped by blob id, and each API read carries a deadline so a slow upstream cannot stall the
70
- * render.
71
- *
72
- * Registration is synchronous (no `client.start()`), so the client's stores are populated before
73
- * selection. The condition-results store is reset at entry, and `serialize` expects a per-request
74
- * client — concurrent calls on one client are not supported. Each experience's own condition is
75
- * evaluated through the memoized evaluator against the injected URL; client-level
76
- * precondition/condition are not evaluated here in v1.
77
- *
78
- * @param {Picked} client - The Picked client to select with, and to resolve data through.
79
- * @param {SerializeParams} [params] - URL attributes, preview token, and content timeout.
80
- * @returns {Promise<PickedSnapshot>} The plain-JSON snapshot of config, content, and condition results.
81
- * @example
82
- * const snapshot = await serialize(client, {
83
- * attributes: { location: { pathname: '/promo' } },
84
- * })
85
- */
86
- export declare function serialize(client: Picked, params?: SerializeParams): Promise<PickedSnapshot>;
87
- //# sourceMappingURL=serialize.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/server/serialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EAEd,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAKvC,mFAAmF;AACnF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAA;CACtC;AAKD,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,gFAAgF;IAChF,aAAa,EAAE,aAAa,CAAA;IAC5B;;;;;OAKG;IACH,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C;AAoCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,eAAoB,GAC3B,OAAO,CAAC,cAAc,CAAC,CA6EzB"}
@@ -1,17 +0,0 @@
1
- /** @file Bridges untyped content registry stores to codegen-narrowed consumer types. */
2
- import type { Store } from 'effector';
3
- import type { Content } from './entities/content/content';
4
- import type { TypedContent } from './schema-registry';
5
- /**
6
- * Maps an untyped content store to a codegen-narrowed `TypedContent` store. The
7
- * `TData` narrowing is compile-time only (no runtime shape check); records whose
8
- * `data` is not an object map to `null`.
9
- *
10
- * @template {Record<string, unknown>} TData
11
- * @param {Store<Content | null>} store - Registry store from `client.contents.getById`.
12
- * @returns {Store<TypedContent<TData> | null>} Store whose `data` is narrowed to `TData`.
13
- * @example
14
- * const banner = toTypedContentStore<WelcomePage>(client.contents.getById('lc_banner'))
15
- */
16
- export declare function toTypedContentStore<TData extends Record<string, unknown>>(store: Store<Content | null>): Store<TypedContent<TData> | null>;
17
- //# sourceMappingURL=typed-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typed-content.d.ts","sourceRoot":"","sources":["../../src/typed-content.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAoBrD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvE,KAAK,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,GAC3B,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAWnC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * @file The telemetry hooks one client exposes.
3
- *
4
- * The observer belongs to the client that registered it, so several clients on
5
- * one page observe only their own traffic.
6
- */
7
- import type { DeliveryAPIRequestObserver } from '../data-source/request-observer';
8
- /** One client's telemetry hooks. */
9
- export interface ClientTelemetry {
10
- /** Registers the observer wrapped around this client's delivery API requests, or clears it. */
11
- observeDeliveryAPIRequests: (next: DeliveryAPIRequestObserver | null) => void;
12
- /** The observer in force, or `null` while none is registered. */
13
- readonly deliveryAPIRequestObserver: DeliveryAPIRequestObserver | null;
14
- }
15
- /**
16
- * Creates the telemetry hooks for one client.
17
- *
18
- * The observer is read per request, so registering one after an earlier fetch
19
- * still applies to the next.
20
- *
21
- * @returns {ClientTelemetry} The hooks to register through and read from.
22
- * @example const telemetry = createClientTelemetry()
23
- */
24
- export declare function createClientTelemetry(): ClientTelemetry;
25
- //# sourceMappingURL=client-telemetry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-telemetry.d.ts","sourceRoot":"","sources":["../../../src/utils/client-telemetry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAEjF,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,+FAA+F;IAC/F,0BAA0B,EAAE,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAA;IAC7E,iEAAiE;IACjE,QAAQ,CAAC,0BAA0B,EAAE,0BAA0B,GAAG,IAAI,CAAA;CACvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,CAWvD"}
@@ -1,37 +0,0 @@
1
- /**
2
- * @file Content-path parsing for live-preview patches.
3
- *
4
- * Paths address a field inside a Content Entry's delivered `data` blob using the format the Picked
5
- * API already emits for content-data validation errors — `$.sections[0].data.title`, rooted at `$`,
6
- * with `.key` for object keys and `[n]` for array indices. Reusing that format keeps one convention
7
- * across validation errors and preview patches instead of inventing a second.
8
- *
9
- * Content-model field keys are constrained to `/^[a-z][a-z0-9_]*$/` server-side, so no key can
10
- * contain `.` or `[` and the string form needs no escaping.
11
- */
12
- /** One step along a content path: an object key, or an array index. */
13
- export type ContentPathSegment = string | number;
14
- /**
15
- * Parses a content path into its segments.
16
- *
17
- * Returns an empty list for the root path *and* for anything malformed. Callers treat an empty list
18
- * as "no addressable target" and skip the operation, so a corrupt or hostile path from another
19
- * frame degrades to a no-op instead of throwing inside a customer's page.
20
- *
21
- * @param {string} path - The path to parse, for example `$.sections[0].data.title`.
22
- * @returns {ContentPathSegment[]} The parsed segments, or `[]` for the root or an invalid path.
23
- * @example
24
- * parseContentPath('$.sections[0].data.title') // ['sections', 0, 'data', 'title']
25
- */
26
- export declare function parseContentPath(path: string): ContentPathSegment[];
27
- /**
28
- * Formats segments back into a content path. Inverse of {@link parseContentPath} for every
29
- * well-formed path.
30
- *
31
- * @param {readonly ContentPathSegment[]} segments - The segments to format.
32
- * @returns {string} The path string, or `'$'` when there are no segments.
33
- * @example
34
- * formatContentPath(['sections', 0, 'data', 'title']) // '$.sections[0].data.title'
35
- */
36
- export declare function formatContentPath(segments: readonly ContentPathSegment[]): string;
37
- //# sourceMappingURL=content-path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-path.d.ts","sourceRoot":"","sources":["../../../src/utils/content-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,uEAAuE;AACvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAA;AA2ChD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAYnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAOjF"}
@@ -1,20 +0,0 @@
1
- /** @file Resolved CMS `html-asset` field value delivered inline to consumers. */
2
- /**
3
- * A resolved `html-asset` content field. The API inlines the file's text at `content` server-side
4
- * (`content: null` when the underlying file could not be resolved); there is no separate URL to fetch.
5
- */
6
- export interface HtmlAssetValue {
7
- readonly id: string;
8
- readonly content: string | null;
9
- }
10
- /**
11
- * Narrows an untyped resolved content-field value (for example `content.body` from `getStepContent()` /
12
- * `useStepContent()`) to {@link HtmlAssetValue}.
13
- *
14
- * @param {unknown} value - A field value from the resolved content blob.
15
- * @returns {value is HtmlAssetValue} True when `value` is `{ id: string; content: string | null }`.
16
- * @example
17
- * if (isHtmlAssetValue(content.body)) render(content.body.content)
18
- */
19
- export declare function isHtmlAssetValue(value: unknown): value is HtmlAssetValue;
20
- //# sourceMappingURL=html-asset-value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"html-asset-value.d.ts","sourceRoot":"","sources":["../../../src/utils/html-asset-value.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CASxE"}
@@ -1,40 +0,0 @@
1
- /**
2
- * @file Relays the count of preview-inserted subtrees whose scripts were neutralised.
3
- *
4
- * The render layer (`@picked/react`'s `HtmlRender`) knows how many script-bearing subtrees a
5
- * preview morph inserted; the preview receiver knows how to tell the dashboard. Neither should
6
- * import the other, so the count passes through this tiny module. Every framework binding's render
7
- * path reports into the same receiver through it.
8
- *
9
- * The count is cumulative for the session and only ever grows, which matches how the editor uses
10
- * it: "some markup you added is inert until you save", not a per-edit delta.
11
- */
12
- /** Listener notified when the cumulative inert-subtree count changes. */
13
- type InertScriptListener = (total: number) => void;
14
- /**
15
- * Records that a preview render inserted `count` subtrees whose scripts were neutralised.
16
- *
17
- * @param {number} count - Subtrees neutralised by the render that just completed.
18
- * @returns {void} Nothing.
19
- * @example reportInertScriptSubtrees(2)
20
- */
21
- export declare function reportInertScriptSubtrees(count: number): void;
22
- /**
23
- * Subscribes to the cumulative inert-subtree count, invoking `listener` immediately with the
24
- * current total so a late subscriber (the receiver connects after first paint) is not left behind.
25
- *
26
- * @param {InertScriptListener} listener - Called with the running total.
27
- * @returns {() => void} Unsubscribe function.
28
- * @example const stop = onInertScriptSubtrees((n) => post({ inertScriptSubtrees: n }))
29
- */
30
- export declare function onInertScriptSubtrees(listener: InertScriptListener): () => void;
31
- /**
32
- * Resets the cumulative count and drops every listener. Exposed for tests, which share a module
33
- * registry across cases.
34
- *
35
- * @returns {void} Nothing.
36
- * @example resetInertScriptReport()
37
- */
38
- export declare function resetInertScriptReport(): void;
39
- export {};
40
- //# sourceMappingURL=inert-script-report.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inert-script-report.d.ts","sourceRoot":"","sources":["../../../src/utils/inert-script-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,yEAAyE;AACzE,KAAK,mBAAmB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;AAKlD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAI7D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,IAAI,CAM/E;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C"}
@@ -1,25 +0,0 @@
1
- /** @file Utility to resolve the next flow node after an action node runs. */
2
- import type { ExperienceEdge, ExperienceNode } from '../../entities/experience/experience';
3
- /**
4
- * Resolves the next node after an action node from its success or failure outcome.
5
- *
6
- * The explicit outcome branch is preferred (sourceHandle `'true'` for success and
7
- * `'false'` for failure). When that branch is absent, a plain handle-less edge is used
8
- * as a fallback, so an action wired as a bare continue (for example the builder's
9
- * addNext connector) passes through instead of dead-ending. Explicit success and failure
10
- * branches therefore still win, while a plain connection becomes a pass-through.
11
- *
12
- * @param {boolean} success - Whether the action succeeded (`true`) or failed (`false`).
13
- * @param {string} actionNodeId - The ID of the action node in the graph.
14
- * @param {ExperienceNode[]} nodes - All nodes in the experience graph.
15
- * @param {ExperienceEdge[]} edges - All edges in the experience graph.
16
- * @returns {ExperienceNode | undefined} The next node, or `undefined` when the action node
17
- * has neither an edge for the outcome nor a plain edge (a genuine terminal).
18
- * @example
19
- * ```typescript
20
- * // `success` is false only when the action threw; that routes to the onFail edge.
21
- * const nextNode = getNextNodeFromAction(succeeded, 'action-1', nodes, edges)
22
- * ```
23
- */
24
- export declare function getNextNodeFromAction(success: boolean, actionNodeId: string, nodes: ExperienceNode[], edges: ExperienceEdge[]): ExperienceNode | undefined;
25
- //# sourceMappingURL=get-next-node-from-action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-next-node-from-action.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/get-next-node-from-action.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAE1F;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,cAAc,EAAE,EACvB,KAAK,EAAE,cAAc,EAAE,GACtB,cAAc,GAAG,SAAS,CAO5B"}
@@ -1,17 +0,0 @@
1
- /** @file Utility to resolve the next flow node after evaluating a condition. */
2
- import type { ExperienceEdge, ExperienceNode } from '../../entities/experience/experience';
3
- /**
4
- * Returns the next node in the experience graph based on a condition result.
5
- *
6
- * @param conditionResult - Whether the condition evaluated to true or false.
7
- * @param conditionNodeId - The ID of the condition node in the graph.
8
- * @param nodes - All nodes in the experience graph.
9
- * @param edges - All edges in the experience graph.
10
- * @returns The next node to navigate to, or undefined if no matching edge exists.
11
- * @example
12
- * ```typescript
13
- * const nextNode = await getNextNodeFromCondition(true, 'cond-1', nodes, edges)
14
- * ```
15
- */
16
- export declare function getNextNodeFromCondition(conditionResult: boolean, conditionNodeId: string, nodes: ExperienceNode[], edges: ExperienceEdge[]): Promise<ExperienceNode | undefined>;
17
- //# sourceMappingURL=get-next-node-from-condition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-next-node-from-condition.d.ts","sourceRoot":"","sources":["../../../../src/utils/node-tree/get-next-node-from-condition.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AAE1F;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAC5C,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,MAAM,EACvB,KAAK,EAAE,cAAc,EAAE,EACvB,KAAK,EAAE,cAAc,EAAE,uCAOxB"}
@@ -1,39 +0,0 @@
1
- /** @file Resolves the project id for a Picked client from options, window config, or script tag attributes. */
2
- import type { CreateClientOptions } from '../client';
3
- /** Subset of {@link CreateClientOptions} exposed on `window.pickedConfig`. */
4
- interface WindowPickedConfig {
5
- organizationId?: string;
6
- projectId?: string;
7
- previewToken?: string;
8
- apiUrl?: string;
9
- dashboardUrl?: string;
10
- documentationSiteUrl?: string;
11
- }
12
- declare global {
13
- interface Window {
14
- pickedConfig?: WindowPickedConfig;
15
- }
16
- }
17
- /**
18
- * Reads `window.pickedConfig` when running in a browser.
19
- *
20
- * @template ExtendedPickedConfig - Additional keys consumers attach to the window config.
21
- * @returns {Readonly<Partial<CreateClientOptions> & ExtendedPickedConfig> | undefined} The window config, if set.
22
- * @example
23
- * getPickedConfig<{ theme: string }>()?.theme
24
- */
25
- export declare function getPickedConfig<ExtendedPickedConfig extends Record<string, unknown> | undefined>(): Readonly<Partial<CreateClientOptions> & ExtendedPickedConfig> | undefined;
26
- /**
27
- * Resolves the Picked project id from the supplied options, falling back to
28
- * `window.pickedConfig.projectId` and then to a `data-projectid` (or
29
- * `project-id`) attribute on a `picked_script`/`picked`/`cvly` script tag.
30
- *
31
- * @param {CreateClientOptions} options - Options passed to `createClient`.
32
- * @returns {string} The resolved project id.
33
- * @throws {Error} If no project id can be resolved from any source.
34
- * @example
35
- * getCreateClientProjectId({ projectId: 'proj-abc' })
36
- */
37
- export declare function getCreateClientProjectId(options: CreateClientOptions): string;
38
- export {};
39
- //# sourceMappingURL=picked-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"picked-config.d.ts","sourceRoot":"","sources":["../../../src/utils/picked-config.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAGpD,8EAA8E;AAC9E,UAAU,kBAAkB;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE,kBAAkB,CAAA;KAClC;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,oBAAoB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,+EAUjE;AAyCD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAqB7E"}
@@ -1,12 +0,0 @@
1
- /** Search parameter the dashboard appends to the preview iframe's URL. */
2
- export declare const PREVIEW_TOKEN_PARAM = "preview-token";
3
- /**
4
- * Whether this frame is running as a Picked live-preview session: inside an iframe, with a preview
5
- * token on the URL.
6
- *
7
- * @returns {boolean} True when the frame is a preview session.
8
- * @example
9
- * if (isPreviewSession()) enableMorphingRender()
10
- */
11
- export declare function isPreviewSession(): boolean;
12
- //# sourceMappingURL=preview-session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preview-session.d.ts","sourceRoot":"","sources":["../../../src/utils/preview-session.ts"],"names":[],"mappings":"AAUA,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,kBAAkB,CAAA;AAElD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C"}
@@ -1,50 +0,0 @@
1
- /** @file Re-executes Picked-tagged <script> elements that innerHTML left inert. */
2
- /** Inert script type the Picked transform stamps on classic scripts it blesses for rehydration. */
3
- export declare const PICKED_SCRIPT_TYPE = "application/picked-javascript";
4
- /** Inert script type the Picked transform stamps on `type="module"` scripts it blesses for rehydration. */
5
- export declare const PICKED_MODULE_SCRIPT_TYPE = "application/picked-module";
6
- /** Marker set on resurrected scripts so rehydration is idempotent. */
7
- export declare const PICKED_HYDRATED_ATTR = "data-picked-hydrated";
8
- declare global {
9
- /**
10
- * Root node of the currently-executing rehydrated inline script. Published only for the duration of
11
- * that script's synchronous run so shadow-scoped page scripts can locate their own root, since
12
- * `document.currentScript` is `null` inside a shadow tree.
13
- */
14
- var __pickedEmbedScriptRoot: Node | null | undefined;
15
- }
16
- /**
17
- * Re-creates every Picked-tagged (`type="application/picked-javascript"` or
18
- * `type="application/picked-module"`) script under `root` as a fresh, executable element, so
19
- * scripts inserted via `innerHTML` (which never run) execute — restored as `type="module"` for the
20
- * latter. Untagged scripts, including data blocks such as `application/json` or `importmap`, are left
21
- * untouched. In-place replacement preserves document order. Because `document.currentScript` is `null`
22
- * inside a shadow tree, each inline script's own root is published on `globalThis.__pickedEmbedScriptRoot`
23
- * while it runs, so shadow-scoped page scripts read `window.__pickedEmbedScriptRoot` to find their own root.
24
- *
25
- * Classic inline scripts are pre-parsed with the `Function` constructor and skipped only when that
26
- * throws a `SyntaxError`, so a body that would blank the experience on insertion is logged and left
27
- * inert. Any other failure says nothing about the body — a CSP omitting `'unsafe-eval'` throws an
28
- * `EvalError` and Trusted Types throws a `TypeError` however well the body parses — so the script is
29
- * injected unchanged and the page keeps working under those policies.
30
- *
31
- * This function intentionally references only globals and its own parameter, never the exported
32
- * `PICKED_*` constants above, so {@link buildRehydrateBootstrap} can serialise it with `.toString()` for
33
- * injection into a sandboxed iframe, where module imports are unavailable.
34
- *
35
- * @param {ParentNode} root - Element, ShadowRoot, or Document whose tagged scripts to rehydrate.
36
- * @returns {Promise<void>} Resolves after external (`src`) scripts have settled (load or error).
37
- * @example
38
- * await rehydrateScripts(shadowRoot)
39
- */
40
- export declare function rehydrateScripts(root: ParentNode): Promise<void>;
41
- /**
42
- * Builds an inline `<script>` string that runs {@link rehydrateScripts} against the injected document.
43
- * For splicing into an iframe `srcDoc` (or any HTML string) where module imports are unavailable.
44
- *
45
- * @returns {string} A self-contained `<script>…</script>` string.
46
- * @example
47
- * html.replace('</body>', buildRehydrateBootstrap() + '</body>')
48
- */
49
- export declare function buildRehydrateBootstrap(): string;
50
- //# sourceMappingURL=rehydrate-scripts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rehydrate-scripts.d.ts","sourceRoot":"","sources":["../../../src/utils/rehydrate-scripts.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,kCAAkC,CAAA;AACjE,2GAA2G;AAC3G,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AACpE,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAE1D,OAAO,CAAC,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,uBAAuB,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;CACrD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAoGtE;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}