@picked/react 0.0.64-next.2 → 0.0.64-next.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ExperienceSlot.d.ts","sourceRoot":"","sources":["../../src/experience/ExperienceSlot.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAoB,MAAM,OAAO,CAAA;AAQxC,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAmFD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+CxE;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"ExperienceSlot.d.ts","sourceRoot":"","sources":["../../src/experience/ExperienceSlot.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAA6B,MAAM,OAAO,CAAA;AAQjD,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAyFD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4DxE;AAED,eAAe,cAAc,CAAA"}
@@ -1 +1 @@
1
- import{usePicked as e}from"../hooks/client.js";import{useStoreGlobal as t}from"../hooks/use-store-global.js";import"../hooks/index.js";import n from"./ExperienceHost.js";import{useEffect as r}from"react";import{supportsWindow as i}from"@picked/client";import{evaluateConditionMemo as a,hashRule as o,ruleReferencesAction as s}from"@picked/client/server";import{Fragment as c,jsx as l}from"react/jsx-runtime";var u=[`replace`,`before`,`prepend`,`append`,`after`];function d(e){let t=u.indexOf(e);return t===-1?u.length:t}function f(e,t){let n=e.configStore.getState(),r=n.targetSelectors.find(e=>e.selector===t);return!r||s(n.decisionLogic)?null:{experience:e,placement:r.placement,condition:n.decisionLogic,hash:o(n.decisionLogic)}}function p(){let{href:e,pathname:t,search:n,hostname:r,origin:i,protocol:a,port:o,host:s,hash:c}=globalThis.location;return{href:e,pathname:t,search:n,hostname:r,origin:i,protocol:a,port:o,host:s,hash:c}}function m({name:o}){let s=e(),u=`.picked-slot-${o}`,m=t(s.experiences.listStore);t(s.conditionResults.store);let h=m.map(e=>f(e,u)).filter(e=>e!==null).sort((e,t)=>d(e.placement)-d(t.placement)),g=h.filter(e=>s.conditionResults.peek(e.hash)===!0),_=g.find(e=>e.placement===`replace`),v=_?[_]:g;return r(()=>{if(i())for(let e of h)s.conditionResults.peek(e.hash)===void 0&&a(s,e.condition,{context:{location:p()}})}),l(c,{children:v.map(e=>l(n,{experience:e.experience,client:s},e.experience.id))})}export{m as default};
1
+ import{usePicked as e}from"../hooks/client.js";import{useStoreGlobal as t}from"../hooks/use-store-global.js";import"../hooks/index.js";import n from"./ExperienceHost.js";import{useEffect as r,useMemo as i}from"react";import{supportsWindow as a}from"@picked/client";import{evaluateConditionMemo as o,hashRule as s,ruleReferencesActionDeep as c}from"@picked/client/server";import{Fragment as l,jsx as u}from"react/jsx-runtime";var d=[`replace`,`before`,`prepend`,`append`,`after`];function f(e){let t=d.indexOf(e);return t===-1?d.length:t}function p(e,t,n){let r=e.configStore.getState(),i=r.targetSelectors.find(e=>e.selector===t);return!i||c(r.decisionLogic,n)?null:{experience:e,placement:i.placement,condition:r.decisionLogic,hash:s(r.decisionLogic)}}function m(){let{href:e,pathname:t,search:n,hostname:r,origin:i,protocol:a,port:o,host:s,hash:c}=globalThis.location;return{href:e,pathname:t,search:n,hostname:r,origin:i,protocol:a,port:o,host:s,hash:c}}function h({name:s}){let c=e(),d=`.picked-slot-${s}`,h=t(c.experiences.listStore);t(c.conditionResults.store);let g=t(c.conditions.listStore),_=i(()=>{let e={};for(let t of g)e[t.key]=t;return e},[g]),v=h.map(e=>p(e,d,_)).filter(e=>e!==null).sort((e,t)=>f(e.placement)-f(t.placement)),y=v.filter(e=>c.conditionResults.peek(e.hash)===!0),b=y.find(e=>e.placement===`replace`),x=b?[b]:y;return r(()=>{if(a())for(let e of v)c.conditionResults.peek(e.hash)===void 0&&o(c,e.condition,{context:{location:m()}})}),u(l,{children:x.map(e=>u(n,{experience:e.experience,client:c},e.experience.id))})}export{h as default};
@@ -1 +1 @@
1
- import{restoreCurrentTarget as e}from"./restore-current-target.js";function t(t){return n=>{e(n.nativeEvent,n.currentTarget),t(n.nativeEvent)}}function n(t,n){return r=>{e(r.nativeEvent,r.currentTarget),t.multiple&&r.currentTarget instanceof HTMLInputElement&&r.currentTarget.type===`checkbox`&&Object.defineProperty(r.nativeEvent,`type`,{value:`change`,configurable:!0}),n(r.nativeEvent)}}function r(e){let{oninput:r,onchange:i,onblur:a,...o}=e.props;return{...e,props:{...o,onInput:t(r),onChange:n(e,i),onBlur:t(a)}}}export{r as mapFieldToReact};
1
+ import{restoreCurrentTarget as e}from"./restore-current-target.js";function t(t){return n=>{e(n.nativeEvent,n.currentTarget),t(n.nativeEvent)}}function n(t,n){return r=>{e(r.nativeEvent,r.currentTarget),t.multiple&&r.currentTarget instanceof HTMLInputElement&&r.currentTarget.type===`checkbox`&&Object.defineProperty(r.nativeEvent,"type",{value:`change`,configurable:!0}),n(r.nativeEvent)}}function r(e){let{oninput:r,onchange:i,onblur:a,...o}=e.props;return{...e,props:{...o,onInput:t(r),onChange:n(e,i),onBlur:t(a)}}}export{r as mapFieldToReact};
@@ -1 +1 @@
1
- function e(e,t){Object.defineProperty(e,`currentTarget`,{value:t,configurable:!0,writable:!0})}export{e as restoreCurrentTarget};
1
+ function e(e,t){Object.defineProperty(e,"currentTarget",{value:t,configurable:!0,writable:!0})}export{e as restoreCurrentTarget};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picked/react",
3
- "version": "0.0.64-next.2",
3
+ "version": "0.0.64-next.4",
4
4
  "devDependencies": {
5
5
  "@picked/client": "workspace:*",
6
6
  "@repo/eslint-config": "workspace:*",
@@ -85,7 +85,7 @@
85
85
  },
86
86
  "module": "./dist/index.js",
87
87
  "peerDependencies": {
88
- "@picked/client": "0.0.64-next.2",
88
+ "@picked/client": "0.0.64-next.4",
89
89
  "effector": "^23.3.0",
90
90
  "react": "19.2.2",
91
91
  "react-dom": "19.2.2"