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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/{api-oudcFuUX.js → api-ENA5t36y.js} +1 -1
  2. package/dist/{api-BEXzPJHZ.cjs → api-dkMxUUe0.cjs} +1 -1
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/plugins/create-experience/index.js +1 -1
  5. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  6. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  7. package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
  8. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  9. package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
  10. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  11. package/dist/cjs/plugins/web-components/index.js +1 -1
  12. package/dist/cjs/server/index.js +1 -1
  13. package/dist/esm/index.js +503 -426
  14. package/dist/esm/plugins/create-experience/index.js +329 -294
  15. package/dist/esm/plugins/dynamic-experiences/index.js +53 -30
  16. package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
  17. package/dist/esm/plugins/history-browser-storage/index.js +1 -1
  18. package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
  19. package/dist/esm/plugins/responses-indexeddb/index.js +9 -5
  20. package/dist/esm/plugins/single-page-app/index.js +4 -4
  21. package/dist/esm/plugins/web-components/index.js +1 -1
  22. package/dist/esm/server/index.js +1 -1
  23. package/dist/experience-instance-BODAwa-_.js +713 -0
  24. package/dist/experience-instance-DImQh64e.cjs +1 -0
  25. package/dist/object-BReQiaSS.cjs +1 -0
  26. package/dist/{object-C82v79xc.js → object-Clj5zVr1.js} +1 -2
  27. package/dist/storage-BFjb8azI.cjs +1 -0
  28. package/dist/{storage-6Xk0uAxB.js → storage-DyxpJ0pg.js} +1 -3
  29. package/dist/types/entities/action/action.d.ts.map +1 -1
  30. package/dist/types/entities/condition/condition.d.ts +17 -0
  31. package/dist/types/entities/condition/condition.d.ts.map +1 -0
  32. package/dist/types/entities/experience/experience.d.ts +36 -59
  33. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  34. package/dist/types/entities/experience-instance/experience-instance.d.ts +2 -2
  35. package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
  36. package/dist/types/entities/feature/feature.d.ts.map +1 -1
  37. package/dist/types/entities/field/field.d.ts +17 -12
  38. package/dist/types/entities/field/field.d.ts.map +1 -1
  39. package/dist/types/entities/history/history.d.ts.map +1 -1
  40. package/dist/types/entities/project/project.d.ts +9 -0
  41. package/dist/types/entities/project/project.d.ts.map +1 -0
  42. package/dist/types/entities/response/response.d.ts +10 -7
  43. package/dist/types/entities/response/response.d.ts.map +1 -1
  44. package/dist/types/entities/step/step.d.ts +38 -0
  45. package/dist/types/entities/step/step.d.ts.map +1 -0
  46. package/dist/types/index.d.ts +3 -1
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/logic-engine.d.ts +8 -2
  49. package/dist/types/logic-engine.d.ts.map +1 -1
  50. package/dist/types/picked.d.ts +61 -52
  51. package/dist/types/picked.d.ts.map +1 -1
  52. package/dist/types/plugins/create-experience/create-experience.d.ts +61 -29
  53. package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
  54. package/dist/types/plugins/create-experience/index.d.ts +2 -2
  55. package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
  56. package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
  57. package/dist/types/plugins/dynamic-experiences/plugin.d.ts +21 -4
  58. package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
  59. package/dist/types/plugins/dynamic-experiences/types.d.ts +47 -0
  60. package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
  61. package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -2
  62. package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
  63. package/dist/types/plugins/history-browser-storage/plugin.d.ts +0 -1
  64. package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
  65. package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -2
  66. package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
  67. package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
  68. package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
  69. package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
  70. package/dist/types/utils/dom.d.ts +3 -0
  71. package/dist/types/utils/dom.d.ts.map +1 -1
  72. package/dist/types/utils/events.d.ts +2 -2
  73. package/dist/types/utils/events.d.ts.map +1 -1
  74. package/dist/types/utils/global-obj.d.ts +1 -0
  75. package/dist/types/utils/global-obj.d.ts.map +1 -1
  76. package/dist/types/utils/indexed-db.d.ts +1 -2
  77. package/dist/types/utils/indexed-db.d.ts.map +1 -1
  78. package/dist/types/utils/key.d.ts +12 -0
  79. package/dist/types/utils/key.d.ts.map +1 -0
  80. package/dist/types/utils/logger.d.ts.map +1 -1
  81. package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
  82. package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
  83. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +3 -3
  84. package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
  85. package/dist/types/utils/nodes.d.ts +25 -2
  86. package/dist/types/utils/nodes.d.ts.map +1 -1
  87. package/dist/types/utils/object.d.ts +8 -0
  88. package/dist/types/utils/object.d.ts.map +1 -1
  89. package/dist/types/utils/picked-config.d.ts +1 -1
  90. package/dist/types/utils/picked-config.d.ts.map +1 -1
  91. package/dist/types/utils/search-params.d.ts.map +1 -1
  92. package/dist/types/utils/storage.d.ts.map +1 -1
  93. package/package.json +1 -11
  94. package/dist/cjs/form/index.js +0 -1
  95. package/dist/esm/form/index.js +0 -428
  96. package/dist/experience-instance-DZiAwXph.js +0 -481
  97. package/dist/experience-instance-Ddk4Jktn.cjs +0 -1
  98. package/dist/object-CUJOjanb.cjs +0 -1
  99. package/dist/rules-logic-B7vJrWyO.js +0 -231
  100. package/dist/rules-logic-CXr4wXcG.cjs +0 -1
  101. package/dist/storage-B6lQtc4-.cjs +0 -1
  102. package/dist/types/form/build-responses.d.ts +0 -14
  103. package/dist/types/form/build-responses.d.ts.map +0 -1
  104. package/dist/types/form/create-field-evaluator.d.ts +0 -19
  105. package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
  106. package/dist/types/form/create-field-validation.d.ts +0 -44
  107. package/dist/types/form/create-field-validation.d.ts.map +0 -1
  108. package/dist/types/form/create-form.d.ts +0 -66
  109. package/dist/types/form/create-form.d.ts.map +0 -1
  110. package/dist/types/form/create-submit-pipeline.d.ts +0 -58
  111. package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
  112. package/dist/types/form/get-step-fields.d.ts +0 -5
  113. package/dist/types/form/get-step-fields.d.ts.map +0 -1
  114. package/dist/types/form/index.d.ts +0 -10
  115. package/dist/types/form/index.d.ts.map +0 -1
  116. package/dist/types/plugins/create-experience/serialization.d.ts +0 -6
  117. package/dist/types/plugins/create-experience/serialization.d.ts.map +0 -1
  118. /package/dist/{id-CRqy981z.js → id-BniPxOdF.js} +0 -0
  119. /package/dist/{id-Bv44ilEo.cjs → id-CIbS4P60.cjs} +0 -0
@@ -0,0 +1 @@
1
+ const e=require(`./object-BReQiaSS.cjs`);require(`./logger-fbvQC40v.cjs`);const t=require(`./supports-Dsjg-82e.cjs`);let n=require(`effector`),r=require(`@withease/factories`);function i(e){return typeof e==`number`&&!isNaN(e)}function a(e){return typeof e==`string`}function o(e){return Array.isArray(e)}function s(e){return e instanceof Promise}function c(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).length===1}function l(e){if(i(e))return e;let t=parseFloat(`${e}`);return isNaN(t)?0:t}function u(e){return`${e}`}var d={"==":(e,t)=>e==t,"===":(e,t)=>e===t,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,">":(e,t)=>l(e)>l(t),">=":(e,t)=>l(e)>=l(t),"<":(e,t,n)=>{let r=l(e),i=l(t);if(n===void 0)return r<i;let a=l(n);return r<i&&i<a},"<=":(e,t,n)=>{let r=l(e),i=l(t);if(n===void 0)return r<=i;let a=l(n);return r<=i&&i<=a},"!!":async e=>await p(e),"!":async e=>!await p(e),"%":(e,t)=>l(e)%l(t),log:e=>(console.log(e),e),in:(e,t)=>t?a(t)?t.indexOf(u(e))!==-1:o(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(u).join(``),substr:(e,t,n)=>{let r=u(e),i=l(t);if(n===void 0)return r.substr(i);let a=l(n);if(a<0){let e=r.substr(i);return e.substr(0,e.length+a)}return r.substr(i,a)},"+":(...e)=>e.reduce((e,t)=>l(e)+l(t),0),"*":(...e)=>e.reduce((e,t)=>l(e)*l(t),1),"-":(e,t)=>{let n=l(e);return t===void 0?-n:n-l(t)},"/":(e,t)=>l(e)/l(t),min:(...e)=>Math.min(...e.map(l)),max:(...e)=>Math.max(...e.map(l)),merge:(...e)=>e.reduce((e,t)=>o(t)?e.concat(t):e.concat([t]),[]),var(e,t){let n=arguments.length>1?t:null;if(e===``||e===`.`||e==null)return this;if(typeof e==`number`&&Array.isArray(this))return e>=0&&e<this.length?this[e]:n;let r=u(e);if(r===``||r===`.`)return this;let i=r.split(`.`),a=this;for(let e of i){if(a==null)return n;if(Array.isArray(a)){let t=parseInt(e,10);a=isNaN(t)?a[e]:a[t]}else a=a[e]}return a===void 0?n:a},async missing(...e){let t=o(e[0])?e[0]:e,n=[];for(let e of t){let t=await f({var:e},this);(t===null||t===``)&&n.push(`${e}`)}return n},async missing_some(e,t){let n=await f({missing:t},this);if(!o(n)||!o(t))return[];let r=n.filter(a);return t.filter(a).length-r.length>=l(e)?[]:r},invoke(...e){let[t,...n]=e;return typeof t==`function`?Reflect.apply(t,null,n):null},regexp_matches(e,t){let n=e,r=``;if(o(e)){let[t,i]=e;n=t,r=i}return!a(n)||!a(r)?!1:new RegExp(n,r).test(u(t))},throw(e){throw Error(u(e))}};async function f(e,t){if(!e)return e;if(s(e))return f(await e,t);if(o(e))return Promise.all(e.map(e=>f(e,t)));if(!c(e))return e;let n=m(e),r=n?e[n]??[]:[];switch(o(r)||(r=[r]),n){case`if`:case`?:`:for(let e=0;e<r.length-1;e+=2)if(await p(await f(r[e],t)))return f(r[e+1],t);return r.length%2==1?f(r[r.length-1],t):null;case`and`:{let e=null;for(let n of r)if(e=await f(n,t),!await p(e))return e;return e}case`or`:{let e=null;for(let n of r)if(e=await f(n,t),await p(e))return e;return e}case`map`:{let e=await f(r[0],t);return o(e)?await Promise.all(e.map(e=>f(r[1],e))):[]}case`filter`:{let e=await f(r[0],t);return o(e)?(await Promise.all(e.map(async e=>({item:e,shouldInclude:await p(await f(r[1],e))})))).filter(({shouldInclude:e})=>e).map(({item:e})=>e):[]}case`reduce`:{let e=await f(r[0],t);if(!o(e))return r.length>2?await f(r[2],t):null;let n=r[1],i=r.length>2?await f(r[2],t):null;for(let t of e)i=await f(n,{current:t,accumulator:i});return i}case`all`:{let e=await f(r[0],t);if(!o(e)||e.length===0)return!1;for(let t of e)if(!await p(await f(r[1],t)))return!1;return!0}case`some`:{let e=await f(r[0],t);if(!o(e))return!1;for(let t of e)if(await p(await f(r[1],t)))return!0;return!1}case`none`:{let e=await f(r[0],t);if(!o(e))return!0;for(let t of e)if(await p(await f(r[1],t)))return!1;return!0}case`catch`:try{return await f(r[0],t)}catch(e){return c(e)?await f(e,t):r[1]?await f(r[1],e):e instanceof Error?e.message:e}}let i=await Promise.all(r.map(e=>f(e,t))),a=n?d[n]:void 0;if(!a)throw Error(`Unrecognized operation ${n}`);return a.apply(t,i)}async function p(e){return s(e)?p(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function m(e){return Object.keys(e)[0]}function h(t){return!e.t(t)}async function g(e,t,n){let r=e.getStateSnapshot(),i=e.predicates.listStore.getState().reduce((e,t)=>({...e,[t.name]:(...e)=>t.predicate({...r,args:e})}),{}),a=e.features.listStore.getState().reduce((e,t)=>({...e,[t.id]:async()=>{let{bucket:e}=await t.getBucket();return e}}),{});return await f(t,{...n,responses:e.responses.getAllByKeyStore.getState(),location:typeof r.location==`object`?{hash:r.location.hash,host:r.location.host,hostname:r.location.hostname,href:r.location.href,origin:r.location.origin,pathname:r.location.pathname,port:r.location.port,protocol:r.location.protocol,search:r.location.search}:void 0,predicates:i,features:a})}function _(e){return!t.d()||!t.r()?[]:Array.from(window.document.querySelectorAll(e)).filter(e=>e instanceof HTMLElement)}var v=`open`;function y(e){if(!t.l())throw Error(`Shadow DOM is not supported in this environment`);return e.attachShadow({mode:v})}function b(){return new Promise((e,n)=>{if(!t.r()){n();return}document.readyState===`loading`?document.addEventListener(`readystatechange`,()=>e(),{once:!0}):e()})}function x(e,t){let n=new MutationObserver(r=>{document.contains(e)||(n.disconnect(),t())});n.observe(document.body,{childList:!0,subtree:!0})}var S=`picked-root`,C=`picked-target`,w=`picked-root`;function T(e,t){return[...e,{selector:`${w}[experience-id="${t}"]`,placement:`replace`}].flatMap(e=>{let n=_(e.selector).filter(e=>!O(e,t)&&!k(e,t));return{...e,elements:n}})}function E(e,t){return e.flatMap(e=>e.elements.map(n=>j(n,e.placement,t)))}function D(e,t){e.classList.add(C),e.classList.add(`${C}-${t}`)}function O(e,t){return t?e.classList.contains(`${C}-${t}`):e.classList.contains(`${C}`)}function k(e,t){return t?e.classList.contains(`${S}-${t}`):e.classList.contains(S)}function A(e){let t=document.createElement(`div`);return t.style.display=`block`,t.classList.add(S),t.classList.add(`${S}-${e}`),t}function j(e,t,n){let r,i=A(n);if(e instanceof Document)r=e.body.appendChild(i);else{switch(t){case`replace`:e.replaceWith(i);break;case`before`:e.before(i);break;case`after`:e.after(i);break;case`prepend`:e.prepend(i);break;default:e.append(i);break}r=i}return r}function M(e){return e.type===`condition`}function N(e){return e.type===`step`}function P(e){return e.type===`experience`}function F(e){return e.type===`origin`}function I(e){return e.type===`action`}function L(e){return e.stepKey||e.stepId||``}function R(e){return e.conditionId}var z=(e,t,n,r,i=new Set)=>i.has(n.id)?[]:(i.add(n.id),N(n)&&!r?[n]:t.filter(e=>e.sourceNodeId===n.id).flatMap(n=>{let r=e.find(e=>e.id===n.destinationNodeId);return r?z(e,t,r,!1,i):[]})),B=(e,t,n)=>z(e,t,n,!0,new Set),V=(e,t,n,r,i=new Set)=>{if(i.has(n.id))return[-1,-1];i.add(n.id);let a=t.filter(e=>e.sourceNodeId===n.id);if(a.length===0)return[0,0];let o=1/0,s=-1/0;for(let n of a){let r=e.find(e=>e.id===n.destinationNodeId);if(!r)continue;let[a,c]=V(e,t,r,!1,new Set(i));a!==-1&&(o=Math.min(o,a+1),s=Math.max(s,c+1))}return o===1/0?[-1,-1]:[o,s]},H=(e,t,n)=>V(e,t,n,!0,new Set),U=(e,t,n,r=new Set)=>{if(r.has(n.id))return[-1,-1];if(r.add(n.id),n.type===`origin`)return[0,0];let i=t.filter(e=>e.destinationNodeId===n.id);if(i.length===0)return[-1,-1];let a=1/0,o=-1/0;for(let n of i){let i=e.find(e=>e.id===n.sourceNodeId);if(!i)continue;let[s,c]=U(e,t,i,new Set(r));s!==-1&&(a=Math.min(a,s+1),o=Math.max(o,c+1))}return a===1/0?[-1,-1]:[a,o]},W=(e,t,n)=>U(e,t,n,new Set),G=e=>e.find(e=>e.type===`origin`)||null,K=(e,t,n)=>{if(!e)return G(t);let r=n.find(t=>t.sourceNodeId===e.id);return r&&t.find(e=>e.id===r.destinationNodeId)||null};async function q(e,t,n,r){let i=e?`true`:`false`,a=r.find(e=>e.sourceNodeHandle===i&&e.sourceNodeId===t);return n.find(e=>e.id===a?.destinationNodeId)}var J=(0,n.createDomain)(`experience-instance`),Y=(0,r.createFactory)(({client:e,experience:t,target:r,options:i})=>{let a=(0,n.createEvent)(),o=(0,n.createEvent)(),s=(0,n.createEvent)(),c=(0,n.createEvent)(),l=(0,n.createEvent)(),u=(0,n.createEvent)(),d=t.componentStore,f=J.store(`transitioning`),p=e.history.entriesStore.map(e=>e.filter(e=>e.experienceId===t.id)),m=p.map(e=>e.filter(e=>N(e.node))),_=p.map(e=>e.at(-1)?.node||null),v=(0,n.combine)(e.steps.listStore,_,(e,t)=>e.find(e=>t&&N(t)&&e.key===L(t))||null),y=(0,n.combine)(e.steps.listStore,m,(e,t)=>{let n=t.at(-2);if(!n||!N(n.node))return null;let r=n.node;return e.find(e=>e.key===L(r))||null}),b=(0,n.combine)(t.treeStore,_,({nodes:e,edges:t},n)=>n?B(e,t,n):[]),x=(0,n.combine)(t.treeStore,_,({nodes:e,edges:t},n)=>n?W(e,t,n):[-1,-1]),S=(0,n.combine)(t.treeStore,_,({nodes:e,edges:t},n)=>n?H(e,t,n):[-1,-1]),C=J.store(!1),w=(0,n.createApi)(C,{open:()=>!0,close:()=>!1,toggle:e=>!e,set:(e,t)=>t}),T=(0,n.createEffect)(async()=>{e.history.back({experienceId:t.id})}),E=(0,n.attach)({source:t.treeStore,effect:async(n,r)=>{let i=n.nodes.find(e=>N(e)&&L(e)===r);i&&e.history.push({experienceId:t.id,node:i})}}),D=(0,n.attach)({source:_,effect:e=>{}}),O=(0,n.attach)({source:t.treeStore,effect:async({nodes:e})=>G(e)}),k=(0,n.attach)({source:t.treeStore,effect:async({nodes:e,edges:t},n)=>{if(F(n))return K(n,e,t)}}),A=(0,n.attach)({source:t.treeStore,effect:async({nodes:t,edges:n,conditions:r},i)=>{if(!M(i))return;let a=i.conditionId,o=r.find(e=>e.id===a)?.logic;return o?q(!!await g(e,o),i.id,t,n):void 0}}),j=(0,n.attach)({source:t.treeStore,effect:async({nodes:t,edges:n},r)=>{if(!I(r))return;let i=r.action;if(!i){`${r.id}`;return}let a=e.actions.getByName(i).getState();if(!a){`${i}`;let e=n.find(e=>e.sourceNodeId===r.id&&e.sourceNodeHandle===`false`);return e?t.find(t=>t.id===e.destinationNodeId):null}if(typeof a.action!=`function`){`${i}`;let e=n.find(e=>e.sourceNodeId===r.id&&e.sourceNodeHandle===`false`);return e?t.find(t=>t.id===e.destinationNodeId):null}try{`${i}`,await a.action(i);let e=n.find(e=>e.sourceNodeId===r.id&&e.sourceNodeHandle===`true`);if(!e)return`${r.id}`,null;let o=t.find(t=>t.id===e.destinationNodeId);return`${i}${o?.id}`,o||null}catch{`${i}`;let e=n.find(e=>e.sourceNodeId===r.id&&e.sourceNodeHandle===`false`);if(!e)return`${r.id}`,null;let a=t.find(t=>t.id===e.destinationNodeId);return`${i}${a?.id}`,a||null}}}),R=(0,n.createEffect)(t=>{P(t)&&e.experiences.launch({key:t.experienceId})}),z=(0,n.attach)({source:[_,t.treeStore],effect:async([e,{nodes:t,edges:n}])=>K(e,t,n)}),V=(0,n.attach)({source:[_,t.treeStore],effect:async([e,{nodes:t,edges:n}])=>K(e,t,n)}),U=(0,n.createEffect)(n=>{e.history.push({experienceId:t.id,node:n})}),Y=(0,n.attach)({source:t.configStore,effect:async({initializeOpenLogic:t})=>i?.initialiseOpen===void 0?h(t)?!!await g(e,t):t??!1:i.initialiseOpen}),X=Object.freeze({id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:d,stateStore:f,isOpenStore:C,open:w.open,close:w.close,toggleOpen:w.toggle,setOpen:w.set,treeStore:t.treeStore,currentNodeStore:_,currentStepStore:v,previousStepStore:y,nextReachableStepNodesStore:b,stepsToOriginStore:x,stepsToLeafStore:S,goToNextStep:o,goToPreviousStep:s,goToStepById:c,stepsHistoryStore:m}),Z=(0,n.createEvent)(),Q=(0,n.createEvent)();return(0,n.sample)({source:_,target:Z}),(0,n.sample)({clock:Z,filter:e=>e===null,target:O}),(0,n.sample)({clock:Z,filter:e=>e!==null,target:Q}),(0,n.split)({source:Q,match:e=>M(e)?`condition`:N(e)?`step`:P(e)?`launchExperience`:F(e)?`origin`:I(e)?`action`:`other`,cases:{origin:k,condition:A,step:D,launchExperience:R,action:j,__:(0,n.createEvent)()}}),(0,n.sample)({clock:[A.doneData,k.doneData,O.doneData,V.doneData,z.doneData,j.doneData],filter:Boolean,target:U}),(0,n.sample)({clock:o,target:V}),(0,n.sample)({clock:o,source:v,filter:Boolean,target:e.eventBus.prepend(e=>({type:`step_submit`,step:e,experience:X}))}),(0,n.sample)({clock:V.done,source:v,filter:Boolean,target:e.eventBus.prepend(e=>({type:`step_submit_success`,step:e,experience:X}))}),(0,n.sample)({clock:V.fail,source:v,filter:Boolean,target:e.eventBus.prepend(e=>({type:`step_submit_error`,step:e,experience:X}))}),(0,n.sample)({clock:s,target:T}),(0,n.sample)({clock:c,target:E}),(0,n.sample)({source:(0,n.combine)([A.pending,k.pending,O.pending,V.pending]),fn:e=>e.some(Boolean)?`transitioning`:`ready`,target:f}),(0,n.sample)({clock:D.doneData,source:v,filter:Boolean,target:e.eventBus.prepend(e=>({type:`step_enter`,step:e,experience:X}))}),(0,n.sample)({clock:u,target:Y}),(0,n.sample)({source:Y.doneData,fn:Boolean,target:C}),(0,n.sample)({source:_,clock:a,filter:e=>e?F(e):!0,target:z}),(0,n.sample)({source:C,filter:Boolean,target:a}),(0,n.sample)({source:C,filter:Boolean,target:e.eventBus.prepend(()=>({type:`experience_open`,experience:X}))}),(0,n.sample)({source:C,filter:e=>!e,target:e.eventBus.prepend(()=>({type:`experience_close`,experience:X}))}),(0,n.sample)({clock:l,target:[u]}),l(),X});function X(e){return(0,r.invoke)(Y,e)}var Z=(0,r.createFactory)(({client:e})=>{let t=J.store({}),r=(0,n.createEvent)(),i=(0,n.createEvent)(),a=(0,n.createEvent)(),o=(0,n.createApi)(t,{register(e,t){let n=[...e[t.experienceId]??[]];return n.push(t),{...e,[t.experienceId]:n}},unregister(e,t){let n=t.experienceId,r=e[n]?.filter(e=>e!==t);return{...e,[n]:r??[]}}}),s=(0,n.createEffect)(({experience:t,target:n,options:r})=>X({client:e,experience:t,target:n,options:r})),c=(0,n.createEffect)(e=>{o.register(e)}),l=(0,n.createEffect)(e=>{e.target&&x(e.target,()=>{a(e)})}),u=(0,n.createEffect)(e=>{o.unregister(e)}),d=(0,n.createEffect)(t=>{let n=t.componentStore.getState();if(!n)return;let r=n.frameworkStore.getState();if(!r){`${n.name}`;return}let i=t.target;if(!i){`${t.experienceId}`;return}let a=y(i);try{r.render(a,n.component,e,t)}catch{}});(0,n.sample)({clock:r,target:s}),(0,n.sample)({clock:a,target:u}),(0,n.sample)({clock:s.doneData,target:[c,l,i]}),(0,n.sample)({clock:s.doneData,target:e.eventBus.prepend(e=>({type:`experience_initialize`,experience:e}))}),(0,n.sample)({clock:i,target:d});function f(e,t,n){r({experience:e,target:t,options:n})}let p=t.map(e=>Object.values(e).flat());function m(e){return t.map(t=>t[e]||[],{skipVoid:!1})}return{spawn:f,getByExperienceId:m,listStore:p}});function Q(e){return(0,r.invoke)(Z,e)}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return k}});
@@ -0,0 +1 @@
1
+ function e(e,t,r){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)throw Error(`Expected '${String(t)}' to be a function`);let a=r(i);n(a,i),e[t]=a}function t(e,t,n){Object.defineProperty(e,t,{enumerable:!1,value:n,writable:!0,configurable:!0})}function n(e,n){e.prototype=n.prototype=n.prototype||{},t(e,`__picked_original`,n)}function r(e){return e===void 0||typeof e==`object`&&!!e&&e.constructor===Object&&Object.keys(e).length===0}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
@@ -15,8 +15,7 @@ function t(e, t, n) {
15
15
  });
16
16
  }
17
17
  function n(e, n) {
18
- let r = n.prototype || {};
19
- n.prototype = r, e.prototype = r, t(e, "__picked_original", n);
18
+ e.prototype = n.prototype = n.prototype || {}, t(e, "__picked_original", n);
20
19
  }
21
20
  function r(e) {
22
21
  return e === void 0 || typeof e == "object" && !!e && e.constructor === Object && Object.keys(e).length === 0;
@@ -0,0 +1 @@
1
+ var e=e=>btoa([...e].map(e=>String.fromCharCode(e.charCodeAt(0)^7)).join(``)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``);function t(t,n=`global`,r){let i=`pckd`;if(n===`experience`){if(!r)throw Error(`Experience instance is required to scope storage to an experience`);i=`${i}:${r.experienceId}`}return{_:`${i}:${e(t)}`,scope:n}}var n=new Map;function r(e,t){let r=n.get(e._);r&&r.forEach(n=>n(e,t))}function i(e,t,n,i){let a=n===`local`?localStorage:sessionStorage,o=typeof t==`string`?t:JSON.stringify(t);if(a.setItem(e._,o),typeof i==`number`){let t=new Date(Date.now()+i).toISOString();a.setItem(`${e._}:expires-at`,t)}r(e,n)}function a(e,t){let n=t===`local`?localStorage:sessionStorage;n.removeItem(e._),n.removeItem(`${e._}:expires-at`),r(e,t)}function o(e,t,r,i){let a=t===`local`?localStorage:sessionStorage;function o(t){t.storageArea===a&&t.key===e._&&i(r(e))}function s(e,n){n===t&&i(r(e))}return window.addEventListener(`storage`,o),n.has(e._)||n.set(e._,new Set),n.get(e._).add(s),function(){window.removeEventListener(`storage`,o);let t=n.get(e._);t&&(t.delete(s),t.size===0&&n.delete(e._))}}function s(e,t){let n=t===`local`?localStorage:sessionStorage,r=n.getItem(e._),c=n.getItem(`${e._}:expires-at`),l=(n,r)=>i(e,n,t,r),u=()=>a(e,t),d=n=>o(e,t,e=>s(e,t),n);return c&&new Date>new Date(c)?(a(e,t),{isSet:()=>!1,text:()=>null,json:()=>null,boolean:()=>null,set:l,remove:u,subscribe:d}):{isSet(){return r!==null},text(){return r},json(){return r?JSON.parse(r):null},boolean(){return r?r===`true`:null},set:l,remove:u,subscribe:d}}var c={get(e){return s(e,`session`)},set(e,t,n){i(e,t,`session`,n)},remove(e){a(e,`session`)},subscribe(e,t){return o(e,`session`,this.get,t)}},l={get(e){return s(e,`local`)},set(e,t,n){i(e,t,`local`,n)},remove(e){a(e,`local`)},subscribe(e,t){return o(e,`local`,this.get,t)}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -36,9 +36,7 @@ function o(e, t, r, i) {
36
36
  function s(e, n) {
37
37
  n === t && i(r(e));
38
38
  }
39
- window.addEventListener("storage", o), n.has(e._) || n.set(e._, /* @__PURE__ */ new Set());
40
- let c = n.get(e._);
41
- return c && c.add(s), function() {
39
+ return window.addEventListener("storage", o), n.has(e._) || n.set(e._, /* @__PURE__ */ new Set()), n.get(e._).add(s), function() {
42
40
  window.removeEventListener("storage", o);
43
41
  let t = n.get(e._);
44
42
  t && (t.delete(s), t.size === 0 && n.delete(e._));
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/entities/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAG9D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;AACnD,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC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MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,YAAY,KAAG,IAEjF,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { LogicRule } from '../../logic-engine';
2
+ export type ConditionsStore = ReturnType<typeof createConditionIndex>;
3
+ export interface Condition {
4
+ id: string;
5
+ key: string;
6
+ name: string;
7
+ logic: LogicRule;
8
+ }
9
+ declare const createConditionIndexFactory: () => {
10
+ register: (condition: Condition) => void;
11
+ getById: (id: Condition["id"]) => import('effector').Store<Condition | null>;
12
+ getByKey: (key: Condition["key"]) => import('effector').Store<Condition | null>;
13
+ listStore: import('effector').Store<Condition[]>;
14
+ };
15
+ export declare function createConditionIndex(): ReturnType<typeof createConditionIndexFactory>;
16
+ export {};
17
+ //# sourceMappingURL=condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../src/entities/condition/condition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;CACjB;AAGD,QAAA,MAAM,2BAA2B;0BAcF,SAAS,KAAG,IAAI;kBAQxB,SAAS,CAAC,IAAI,CAAC;oBAIb,SAAS,CAAC,KAAK,CAAC;;CAYvC,CAAA;AAEF,wBAAgB,oBAAoB,IAAI,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAErF"}
@@ -1,7 +1,8 @@
1
1
  import { AdaptedComponent } from '../component/component';
2
+ import { Condition } from '../condition/condition';
3
+ import { ExperienceStep } from '../step/step';
2
4
  import { Picked } from '../../picked';
3
5
  import { LogicRule, LogicValue } from '../../logic-engine';
4
- import { Field } from '../field/field';
5
6
  export type ExperiencesListStore = ReturnType<typeof createExperienceIndex>;
6
7
  export type ExperienceStore = ReturnType<typeof createExperience>;
7
8
  declare const createExperienceFactory: ({ client, experience }: {
@@ -9,6 +10,8 @@ declare const createExperienceFactory: ({ client, experience }: {
9
10
  experience: Experience;
10
11
  }) => {
11
12
  id: string;
13
+ key: string;
14
+ name: string;
12
15
  configStore: import('effector').Store<{
13
16
  name: string;
14
17
  decisionLogic: LogicValue | LogicRule;
@@ -19,9 +22,8 @@ declare const createExperienceFactory: ({ client, experience }: {
19
22
  steps: ExperienceStep[];
20
23
  nodes: ExperienceNode[];
21
24
  edges: ExperienceEdge[];
22
- conditionals: ExperienceConditional[];
25
+ conditions: Condition[];
23
26
  }>;
24
- fieldsStore: import('effector').Store<Field[]>;
25
27
  componentStore: import('effector').Store<{
26
28
  name: string;
27
29
  component: AdaptedComponent<string, unknown>;
@@ -35,6 +37,7 @@ declare const createExperienceFactory: ({ client, experience }: {
35
37
  };
36
38
  /**
37
39
  * Creates an Effector store for a single experience.
40
+ *
38
41
  * @param params - The client instance and experience data.
39
42
  * @returns An experience store with config, tree, fields, and component sub-stores.
40
43
  * @example
@@ -57,36 +60,11 @@ declare const createExperienceIndexFactory: ({ client }: {
57
60
  }) => {
58
61
  /** Registers an experience in the index. If an experience with the same ID already exists, it is merged. */
59
62
  register: (experience: Experience) => void;
60
- /** Returns a derived store for an experience by its ID. The store value is `undefined` when no match exists. */
61
- get: (id: Experience["id"]) => import('effector').Store<{
62
- id: string;
63
- configStore: import('effector').Store<{
64
- name: string;
65
- decisionLogic: LogicValue | LogicRule;
66
- targetSelectors: ExperienceTarget[];
67
- initializeOpenLogic: LogicValue | LogicRule;
68
- }>;
69
- treeStore: import('effector').Store<{
70
- steps: ExperienceStep[];
71
- nodes: ExperienceNode[];
72
- edges: ExperienceEdge[];
73
- conditionals: ExperienceConditional[];
74
- }>;
75
- fieldsStore: import('effector').Store<Field[]>;
76
- componentStore: import('effector').Store<{
77
- name: string;
78
- component: AdaptedComponent<string, unknown>;
79
- frameworkStore: import('effector').Store<import('../..').Framework | undefined>;
80
- } | undefined>;
81
- actions: ExperienceAction[];
82
- merge: import('effector').EventCallable<{
83
- experience: Partial<Experience>;
84
- strategy: "override";
85
- }>;
86
- } | undefined>;
87
- /** @deprecated Use `experiences.get(id)` instead. */
88
- getById: (id: Experience["id"]) => import('effector').Store<{
63
+ /** Returns a derived store for an experience by its key. The store value is `undefined` when no match exists. */
64
+ get: (key: string) => import('effector').Store<{
89
65
  id: string;
66
+ key: string;
67
+ name: string;
90
68
  configStore: import('effector').Store<{
91
69
  name: string;
92
70
  decisionLogic: LogicValue | LogicRule;
@@ -97,9 +75,8 @@ declare const createExperienceIndexFactory: ({ client }: {
97
75
  steps: ExperienceStep[];
98
76
  nodes: ExperienceNode[];
99
77
  edges: ExperienceEdge[];
100
- conditionals: ExperienceConditional[];
78
+ conditions: Condition[];
101
79
  }>;
102
- fieldsStore: import('effector').Store<Field[]>;
103
80
  componentStore: import('effector').Store<{
104
81
  name: string;
105
82
  component: AdaptedComponent<string, unknown>;
@@ -111,19 +88,21 @@ declare const createExperienceIndexFactory: ({ client }: {
111
88
  strategy: "override";
112
89
  }>;
113
90
  } | undefined>;
114
- /** Effector effect that launches an experience by ID, creating instances for each DOM target. */
91
+ /** Effector effect that launches an experience by its key. */
115
92
  launch: import('effector').Effect<{
116
- id: string;
93
+ key: string;
117
94
  options?: LaunchExperienceOptions;
118
95
  }, void, Error>;
119
96
  /** Effector effect that opens an experience's existing instances, or launches it with `initialiseOpen` if none exist. */
120
97
  open: import('effector').Effect<{
121
- id: string;
98
+ key: string;
122
99
  options?: OpenExperienceOptions;
123
100
  }, void, Error>;
124
101
  /** Derived store containing all registered experiences as an array. */
125
102
  listStore: import('effector').Store<{
126
103
  id: string;
104
+ key: string;
105
+ name: string;
127
106
  configStore: import('effector').Store<{
128
107
  name: string;
129
108
  decisionLogic: LogicValue | LogicRule;
@@ -134,9 +113,8 @@ declare const createExperienceIndexFactory: ({ client }: {
134
113
  steps: ExperienceStep[];
135
114
  nodes: ExperienceNode[];
136
115
  edges: ExperienceEdge[];
137
- conditionals: ExperienceConditional[];
116
+ conditions: Condition[];
138
117
  }>;
139
- fieldsStore: import('effector').Store<Field[]>;
140
118
  componentStore: import('effector').Store<{
141
119
  name: string;
142
120
  component: AdaptedComponent<string, unknown>;
@@ -151,6 +129,7 @@ declare const createExperienceIndexFactory: ({ client }: {
151
129
  };
152
130
  /**
153
131
  * Creates an Effector-based index for registering and retrieving experiences.
132
+ *
154
133
  * @param params - The client instance.
155
134
  * @returns An experience index with register, get, launch, and open methods.
156
135
  * @example
@@ -159,12 +138,7 @@ declare const createExperienceIndexFactory: ({ client }: {
159
138
  * ```
160
139
  */
161
140
  export declare function createExperienceIndex<T extends Parameters<typeof createExperienceIndexFactory>[0]>(params: T): ReturnType<typeof createExperienceIndexFactory>;
162
- export interface ExperienceStep {
163
- id: string;
164
- label: string;
165
- fieldIds: string[];
166
- }
167
- export type ExperienceNode = StepNode | ConditionalNode | LaunchExperienceNode | OriginNode | ActionNode;
141
+ export type ExperienceNode = StepNode | ConditionNode | LaunchExperienceNode | OriginNode | ActionNode;
168
142
  export interface ExperienceAction {
169
143
  id: string;
170
144
  action: string;
@@ -179,12 +153,16 @@ export interface BaseNode {
179
153
  }
180
154
  export interface StepNode extends BaseNode {
181
155
  type: 'step';
182
- stepId: string;
183
- label: string;
156
+ stepKey: string;
157
+ /** @deprecated Use `stepKey` instead. Populated for backwards compatibility. */
158
+ stepId?: string;
159
+ name?: string;
160
+ /** @deprecated Use `name` instead. Populated for backwards compatibility. */
161
+ label?: string;
184
162
  }
185
- export interface ConditionalNode extends BaseNode {
186
- type: 'conditional';
187
- conditionalId: string;
163
+ export interface ConditionNode extends BaseNode {
164
+ type: 'condition';
165
+ conditionId: string;
188
166
  }
189
167
  export interface LaunchExperienceNode extends BaseNode {
190
168
  type: 'experience';
@@ -199,40 +177,39 @@ export interface ExperienceEdge {
199
177
  destinationNodeId: string;
200
178
  sourceNodeHandle?: string;
201
179
  }
202
- export interface ExperienceConditional {
203
- id: string;
204
- label?: string;
205
- condition: LogicRule;
206
- }
207
180
  export interface ExperienceTarget {
208
181
  selector: string;
209
182
  placement: 'replace' | 'append' | 'prepend' | 'before' | 'after';
210
183
  }
211
184
  export interface Experience {
212
185
  id: string;
186
+ key: string;
213
187
  name: string;
214
188
  componentName?: string;
215
189
  component?: AdaptedComponent;
216
- conditionals: ExperienceConditional[];
217
190
  initializeOpen?: LogicRule | LogicValue;
218
191
  actions?: ExperienceAction[];
192
+ /** Decision logic that controls whether this experience is initialised. */
219
193
  condition?: LogicRule | LogicValue;
220
194
  edges: ExperienceEdge[];
221
195
  nodes: ExperienceNode[];
222
- fields: Field[];
223
- steps: ExperienceStep[];
224
196
  targets: ExperienceTarget[];
225
197
  }
226
- export declare const setupExperience: (experience: Experience, experienceStore: ExperiencesListStore) => void;
227
198
  /**
228
199
  * Initializes an experience for each target that exists in the DOM.
200
+ *
229
201
  * @param client - The Picked client instance.
230
202
  * @param experience - The experience store to initialise.
231
203
  */
232
204
  export declare const initialiseExperience: (client: Picked, experience: ExperienceStore, options?: LaunchExperienceOptions) => void;
233
205
  /**
234
206
  * Conditionally initializes experiences.
207
+ *
235
208
  * @param client - The Picked client instance.
209
+ * @example
210
+ * ```typescript
211
+ * await initialiseExperiences(client)
212
+ * ```
236
213
  */
237
214
  export declare const initialiseExperiences: (client: Picked) => Promise<void>;
238
215
  export declare const shouldInitialiseExperience: (client: Picked, experience: ExperienceStore) => Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,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AA;AAmBD,eAAO,MAAM,0BAA0B,GACrC,QAAQ,MAAM,EACd,YAAY,eAAe,KAC1B,OAAO,CAAC,OAAO,CAiCjB,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { EventCallable, Store } from 'effector';
2
- import { Experience, ExperienceNode, ExperienceStep, ExperienceStore, ExperienceTarget, LaunchExperienceOptions } from '../experience/experience';
2
+ import { Experience, ExperienceNode, ExperienceStore, ExperienceTarget, LaunchExperienceOptions } from '../experience/experience';
3
+ import { ExperienceStep } from '../step/step';
3
4
  import { Picked } from '../../picked';
4
5
  import { HistoryEntry } from '../history/history';
5
6
  export interface ExperienceInstance {
@@ -15,7 +16,6 @@ export interface ExperienceInstance {
15
16
  toggleOpen: EventCallable<void>;
16
17
  setOpen: EventCallable<boolean>;
17
18
  treeStore: ExperienceStore['treeStore'];
18
- fieldsStore: ExperienceStore['fieldsStore'];
19
19
  currentNodeStore: Store<ExperienceNode | null>;
20
20
  currentStepStore: Store<ExperienceStep | null>;
21
21
  previousStepStore: Store<ExperienceStep | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,CAAA;IAC3C,MAAM,EAAE,WAAW,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C;AAED,QAAA,MAAM,+BAA+B,6CAMhC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAClC,iCA8cF,CAAA;AAED,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAC,EAC/D,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAE/D;AAED,QAAA,MAAM,oCAAoC,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;wBA+I1E,eAAe,UACnB,WAAW,YACT,uBAAuB;4BASJ,UAAU,CAAC,IAAI,CAAC;;CAS/C,CAAA;AAEF,wBAAgB,6BAA6B,CAC3C,CAAC,SAAS,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAAC,CAAC,CAAC,EACpE,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAEpE"}
1
+ {"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAkB1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,EAAE,eAA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C,CAAA;CACnE;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,MAAM;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAC1D;AAED,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,qBAAqB,CAAA;AAK3E,QAAA,MAAM,yBAAyB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;mBAgBvD,MAAM,WAAW,OAAO,KAAG,IAAI;kBAwMhC,MAAM;sBAOF,MAAM;;sCAKhB,MAAM,KAClB,KAAK,CAAC,MAAM,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CA2CrD,CAAA;AAEF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,EAC1F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAE9C;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,SAAS,OAAO,EAAE,UAAU,aAAa,SAEnF,CAAA"}
@@ -2,15 +2,6 @@ import { Store } from 'effector';
2
2
  import { LogicRule } from '../../logic-engine';
3
3
  export type FieldsStore = ReturnType<typeof createFieldIndex>;
4
4
  export type PrimitiveFieldValue = string | number | boolean | null;
5
- export type FieldOptionValue = string | number | boolean;
6
- export interface FieldOption<T = FieldOptionValue> {
7
- id: string;
8
- label: string;
9
- description?: string;
10
- value: T;
11
- condition?: LogicRule;
12
- }
13
- export type FieldOptionArray<T = FieldOptionValue> = FieldOption<T>[];
14
5
  /**
15
6
  * JSON-serializable value type for object fields.
16
7
  * Recursively defines all valid JSON-serializable structures.
@@ -19,8 +10,10 @@ export type JsonValue = string | number | boolean | null | {
19
10
  [key: string]: JsonValue;
20
11
  } | JsonValue[];
21
12
  export type FieldValue = PrimitiveFieldValue | PrimitiveFieldValue[] | JsonValue | JsonValue[];
22
- export interface FieldBase<TOptionValue = JsonValue> {
13
+ export interface FieldBase<TOptionValue = PrimitiveFieldValue> {
23
14
  id: string;
15
+ /** Stable kebab-case identifier used for lookups across API versions. */
16
+ key: string;
24
17
  name: string;
25
18
  label: string;
26
19
  type: 'text' | 'number' | 'object' | 'boolean';
@@ -28,6 +21,8 @@ export interface FieldBase<TOptionValue = JsonValue> {
28
21
  required: boolean;
29
22
  defaultValue?: FieldValue;
30
23
  condition?: LogicRule;
24
+ /** References a global condition by key. Takes precedence over inline `condition`. */
25
+ conditionKey?: string;
31
26
  placeholder?: string;
32
27
  description?: string;
33
28
  helpText?: string;
@@ -36,7 +31,13 @@ export interface FieldBase<TOptionValue = JsonValue> {
36
31
  doNotTrackValue?: boolean;
37
32
  doNotStoreValue?: boolean;
38
33
  };
39
- options?: FieldOptionArray<TOptionValue> | null;
34
+ options?: {
35
+ id: string;
36
+ label: string;
37
+ description?: string;
38
+ value: TOptionValue;
39
+ condition?: LogicRule;
40
+ }[] | null;
40
41
  }
41
42
  export interface FieldTextSingular extends FieldBase<string> {
42
43
  type: 'text';
@@ -81,11 +82,15 @@ export interface FieldBooleanMultiple extends FieldBase<boolean> {
81
82
  export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldObjectSingular | FieldObjectMultiple | FieldBooleanSingular | FieldBooleanMultiple;
82
83
  declare const createFieldIndexFactory: () => {
83
84
  register: (field: Field) => void;
84
- update: (fieldId: FieldBase["id"], updates: Partial<Field>) => void;
85
+ update: (fieldKeyOrId: FieldBase["key"], updates: Partial<Field>) => void;
85
86
  getById: (id: FieldBase["id"]) => Store<Field | null>;
87
+ getByKey: (key: FieldBase["key"]) => Store<Field | null>;
86
88
  listStore: Store<Field[]>;
87
89
  getByName: (name: FieldBase["name"]) => Store<Field | null>;
88
90
  };
91
+ /**
92
+ *
93
+ */
89
94
  export declare function createFieldIndex(): ReturnType<typeof createFieldIndexFactory>;
90
95
  export declare const setupField: (field: Field, fields: FieldsStore) => void;
91
96
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAI7D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAElE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAExD,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,gBAAgB;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,CAAC,CAAA;IACR,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,gBAAgB,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;AAErE;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5B,SAAS,EAAE,CAAA;AAEf,MAAM,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE,CAAA;AAE9F,MAAM,WAAW,SAAS,CAAC,YAAY,GAAG,SAAS;IACjD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,GAAG,Q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AAA;CACrB;AA4FD,wBAAgB,aAAa;;sBA3EsB,MAAM;cAAQ,cAAc;;;sBACzB,MAAM;cAAQ,cAAc;;;uBAC9B,MAAM;;;iBACT,YAAY,EAAE;;;EA0E9D"}
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/entities/history/history.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAM9D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;CACrB;AA2FD,wBAAgB,aAAa;;sBA1EsB,MAAM;cAAQ,cAAc;;;sBACzB,MAAM;cAAQ,cAAc;;;uBAC9B,MAAM;;;iBACT,YAAY,EAAE;;;EAyE9D"}
@@ -0,0 +1,9 @@
1
+ import { Experience } from '../experience/experience';
2
+ export interface Project {
3
+ id: string;
4
+ name: string;
5
+ organizationId: string;
6
+ experiences: Array<Experience>;
7
+ }
8
+ export declare const MOCK_fetchProject: (organizationId: string, projectId: string) => Promise<Project>;
9
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../src/entities/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,MAAM,EACtB,WAAW,MAAM,KAChB,OAAO,CAAC,OAAO,CAOjB,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import { Store } from 'effector';
2
2
  import { Picked } from '../../picked';
3
- import { Field, FieldValue, JsonValue } from '../field/field';
3
+ import { Field, FieldValue } from '../field/field';
4
4
  export type ResponsesStore = ReturnType<typeof createResponseIndex>;
5
5
  export type Response = FieldValue;
6
6
  export interface ResponseListItem {
7
+ /** @deprecated Use `fieldKey` instead. */
7
8
  fieldId: string;
9
+ fieldKey: string;
8
10
  value: Response | undefined;
9
11
  }
10
12
  declare const createResponseIndexFactory: ({ client }: {
@@ -25,19 +27,20 @@ declare const createResponseIndexFactory: ({ client }: {
25
27
  }>;
26
28
  listStore: Store<{
27
29
  fieldId: string;
28
- value: FieldValue | undefined;
30
+ fieldKey: string;
31
+ value: FieldValue;
29
32
  }[]>;
30
33
  getAllStore: Store<{
31
34
  [fieldId: string]: FieldValue;
32
35
  }>;
33
- getByFieldId: {
34
- (fieldId: Field["id"]): Store<FieldValue>;
35
- <T extends JsonValue>(fieldId: Field["id"]): Store<T | null>;
36
- };
36
+ getAllByKeyStore: Store<Record<string, FieldValue>>;
37
+ getByFieldId: (fieldId: Field["id"]) => Store<FieldValue>;
38
+ getByFieldKey: (key: Field["key"]) => Store<FieldValue>;
37
39
  getByFieldName: (fieldName: Field["name"]) => Store<FieldValue>;
38
40
  };
39
41
  export declare function createResponseIndex<T extends Parameters<typeof createResponseIndexFactory>[0]>(params: T): ReturnType<typeof createResponseIndexFactory>;
40
- export type CommitResponses = Record<Field['id'], FieldValue>;
42
+ /** Record keyed by either field `id` or field `key`. Normalized to `field.id` internally on commit. */
43
+ export type CommitResponses = Record<string, FieldValue>;
41
44
  export interface ValidationError {
42
45
  fieldId: Field['id'];
43
46
  userMessage: string;
@@ -1 +1 @@
1
- {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/entities/response/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAEpG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK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A;AAEF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAC5F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAE/C;AAED,uGAAuG;AACvG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAExD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAGpB,WAAW,EAAE,MAAM,CAAA;IAGnB,aAAa,EAAE,MAAM,CAAA;IAGrB,KAAK,EAAE,UAAU,CAAA;CAClB"}
@@ -0,0 +1,38 @@
1
+ export type StepsStore = ReturnType<typeof createStepIndex>;
2
+ export interface ExperienceStep {
3
+ id: string;
4
+ key: string;
5
+ name: string;
6
+ /** @deprecated Use `name` instead. Populated for backwards compatibility. */
7
+ label?: string;
8
+ /** @deprecated Use `fieldKeys` instead. */
9
+ fieldIds?: string[];
10
+ fieldKeys?: string[];
11
+ }
12
+ declare const createStepIndexFactory: () => {
13
+ register: (step: ExperienceStep) => void;
14
+ getById: (id: ExperienceStep["id"]) => import('effector').Store<ExperienceStep | null>;
15
+ listStore: import('effector').Store<ExperienceStep[]>;
16
+ };
17
+ /**
18
+ * Creates an Effector-based index for registering and retrieving steps.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const steps = createStepIndex()
23
+ * ```
24
+ */
25
+ export declare function createStepIndex(): ReturnType<typeof createStepIndexFactory>;
26
+ /**
27
+ * Registers a step with the given index via the helper function.
28
+ *
29
+ * @param step - The step definition to register.
30
+ * @param index - The step index to register the step with.
31
+ * @example
32
+ * ```typescript
33
+ * setupStep(step, index)
34
+ * ```
35
+ */
36
+ export declare function setupStep(step: ExperienceStep, index: ReturnType<typeof createStepIndex>): void;
37
+ export {};
38
+ //# sourceMappingURL=step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/entities/step/step.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAI3D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAGD,QAAA,MAAM,sBAAsB;qBAuBF,cAAc,KAAG,IAAI;kBAiBxB,cAAc,CAAC,IAAI,CAAC;;CASzC,CAAA;AAEF;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAE3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,GAAG,IAAI,CAE/F"}
@@ -1,19 +1,21 @@
1
1
  export * from './exports';
2
2
  export type * from './client';
3
3
  export type * from './entities/action/action';
4
+ export type * from './entities/condition/condition';
4
5
  export type * from './entities/component/component';
5
6
  export type * from './entities/component/lazyComponent';
6
7
  export type * from './entities/experience-instance/experience-instance';
7
8
  export type * from './entities/experience/experience';
9
+ export type * from './entities/step/step';
8
10
  export type * from './entities/feature/feature';
9
11
  export type * from './entities/field/field';
10
12
  export type * from './entities/framework/framework';
11
13
  export type * from './entities/history/history';
12
14
  export type * from './entities/plugin/plugin';
13
15
  export type * from './entities/predicate/predicate';
16
+ export type * from './entities/project/project';
14
17
  export type * from './utils/state-snaphot';
15
18
  export type * from './utils/events';
16
- export type * from './utils/search-params';
17
19
  export type * from './entities/response/response';
18
20
  export { Picked } from './picked';
19
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,8BAA8B,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,sBAAsB,CAAA;AACzC,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,8BAA8B,CAAA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