Comparing version 0.1.1-alpha.5 to 0.1.1-alpha.6
@@ -1,2 +0,2 @@ | ||
import e,{useState as r,useCallback as n,useRef as t,useMemo as o}from"react";function u(){return u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},u.apply(this,arguments)}const c=e.createContext({addComponent:(e,r)=>{},removeComponent:(e,r)=>{},updateComponent:(e,r)=>{},getComponents:e=>null,orderNumberRef:{current:0}});function a(a){const[m,l]=r({}),d=n((e,r)=>{l(n=>{const t=n[e]||new Set;return t.has(r)?(console.log("component has already been registererd"),n):(t.add(r),u({},n,{[e]:t}))})},[]),s=n((e,r)=>{l(n=>{const t=n[e];return t?(t.delete(r),t.forEach(e=>{e.orderNumber=null}),u({},n)):n})},[]),p=n((e,r)=>{l(r=>r[e]?u({},r):r)},[]),f=n(e=>{if(!(e in m))return null;const r=Array.from(m[e]);return r.sort((e,r)=>e.orderNumber-r.orderNumber),r.map(e=>e.value)},[m]),i=t(0),C=o(()=>({addComponent:d,getComponents:f,removeComponent:s,updateComponent:p,orderNumberRef:i}),[d,f,s,p]);return e.createElement(c.Provider,u({},a,{value:C}))}const{useContext:m}=e,l=[],d=({name:e,children:r})=>{const n=m(c).getComponents(e);return"function"==typeof r?r(n||l):n},{useEffect:s,useContext:p,useRef:f}=e,i=({name:e,children:r})=>(function(e,r){const{addComponent:n,removeComponent:t,updateComponent:o,orderNumberRef:u}=p(c),a=f({value:r,orderNumber:null});null==a.current.orderNumber&&(a.current.orderNumber=u.current),u.current+=1,s(()=>(n(e,a.current),()=>{t(e,a.current)}),[a.current,n,t]),s(()=>{a.current.value=r,o(e,a.current)},[r])}(e,r),null);function C(r){return{RenderArea:n=>e.createElement(d,u({},n,{name:r})),Content:({children:n})=>e.createElement(i,{name:r},n)}}export{a as AreaProvider,i as Content,d as RenderArea,C as createRenderingPair}; | ||
import e,{useState as r,useCallback as n,useRef as t,useMemo as o,useContext as u,useLayoutEffect as c,useEffect as a}from"react";function m(){return m=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},m.apply(this,arguments)}const l=e.createContext({addComponent:(e,r)=>{},removeComponent:(e,r)=>{},updateComponent:(e,r)=>{},getComponents:e=>null,orderNumberRef:{current:0}});function d(u){const[c,a]=r({}),d=n((e,r)=>{a(n=>{const t=n[e]||new Set;return t.has(r)?(console.log("component has already been registererd"),n):(t.add(r),m({},n,{[e]:t}))})},[]),p=n((e,r)=>{a(n=>{const t=n[e];return t?(t.delete(r),t.forEach(e=>{e.orderNumber=null}),m({},n)):n})},[]),s=n((e,r)=>{a(r=>r[e]?m({},r):r)},[]),i=n(e=>{if(!(e in c))return null;const r=Array.from(c[e]);return r.sort((e,r)=>e.orderNumber-r.orderNumber),r.map(e=>e.value)},[c]),f=t(0),C=o(()=>({addComponent:d,getComponents:i,removeComponent:p,updateComponent:s,orderNumberRef:f}),[d,i,p,s]);return e.createElement(l.Provider,m({},u,{value:C}))}const{useContext:p}=e,s=[],i=({name:e,children:r})=>{const n=p(l).getComponents(e);return"function"==typeof r?r(n||s):n},f=({name:e,children:r})=>(function(e,r){const{addComponent:n,removeComponent:o,updateComponent:m,orderNumberRef:d}=u(l),p=t({value:r,orderNumber:null});null==p.current.orderNumber&&(p.current.orderNumber=d.current),d.current+=1,c(()=>(n(e,p.current),()=>{o(e,p.current)}),[p.current,n,o]),a(()=>{r!==p.current.value&&(p.current.value=r,m(e,p.current))},[r])}(e,r),null);function C(r){return{RenderArea:n=>e.createElement(i,m({},n,{name:r})),Content:({children:n})=>e.createElement(f,{name:r},n)}}export{d as AreaProvider,f as Content,i as RenderArea,C as createRenderingPair}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
import n,{useState as e,useCallback as r,useRef as t,useMemo as o}from"react";function u(){return u=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n},u.apply(this,arguments)}var c=n.createContext({addComponent:function(n,e){},removeComponent:function(n,e){},updateComponent:function(n,e){},getComponents:function(n){return null},orderNumberRef:{current:0}});function a(a){var f=e({}),i=f[0],m=f[1],l=r(function(n,e){m(function(r){var t,o=r[n]||new Set;return o.has(e)?(console.log("component has already been registererd"),r):(o.add(e),u({},r,((t={})[n]=o,t)))})},[]),d=r(function(n,e){m(function(r){var t=r[n];return t?(t.delete(e),t.forEach(function(n){n.orderNumber=null}),u({},r)):r})},[]),p=r(function(n,e){m(function(e){return e[n]?u({},e):e})},[]),v=r(function(n){if(!(n in i))return null;var e=Array.from(i[n]);return e.sort(function(n,e){return n.orderNumber-e.orderNumber}),e.map(function(n){return n.value})},[i]),s=t(0),C=o(function(){return{addComponent:l,getComponents:v,removeComponent:d,updateComponent:p,orderNumberRef:s}},[l,v,d,p]);return n.createElement(c.Provider,u({},a,{value:C}))}var f=n.useContext,i=[],m=function(n){var e=n.name,r=n.children,t=f(c).getComponents(e);return"function"==typeof r?r(t||i):t},l=n.useEffect,d=n.useContext,p=n.useRef,v=function(n){return e=n.name,r=n.children,t=d(c),o=t.addComponent,u=t.removeComponent,a=t.updateComponent,f=t.orderNumberRef,null==(i=p({value:r,orderNumber:null})).current.orderNumber&&(i.current.orderNumber=f.current),f.current+=1,l(function(){return o(e,i.current),function(){u(e,i.current)}},[i.current,o,u]),l(function(){i.current.value=r,a(e,i.current)},[r]),null;var e,r,t,o,u,a,f,i};function s(e){return{RenderArea:function(r){return n.createElement(m,u({},r,{name:e}))},Content:function(r){return n.createElement(v,{name:e},r.children)}}}export{a as AreaProvider,v as Content,m as RenderArea,s as createRenderingPair}; | ||
import n,{useState as e,useCallback as r,useRef as t,useMemo as o,useContext as u,useLayoutEffect as c,useEffect as a}from"react";function i(){return i=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(n[t]=r[t])}return n},i.apply(this,arguments)}var f=n.createContext({addComponent:function(n,e){},removeComponent:function(n,e){},updateComponent:function(n,e){},getComponents:function(n){return null},orderNumberRef:{current:0}});function m(u){var c=e({}),a=c[0],m=c[1],l=r(function(n,e){m(function(r){var t,o=r[n]||new Set;return o.has(e)?(console.log("component has already been registererd"),r):(o.add(e),i({},r,((t={})[n]=o,t)))})},[]),d=r(function(n,e){m(function(r){var t=r[n];return t?(t.delete(e),t.forEach(function(n){n.orderNumber=null}),i({},r)):r})},[]),p=r(function(n,e){m(function(e){return e[n]?i({},e):e})},[]),v=r(function(n){if(!(n in a))return null;var e=Array.from(a[n]);return e.sort(function(n,e){return n.orderNumber-e.orderNumber}),e.map(function(n){return n.value})},[a]),C=t(0),s=o(function(){return{addComponent:l,getComponents:v,removeComponent:d,updateComponent:p,orderNumberRef:C}},[l,v,d,p]);return n.createElement(f.Provider,i({},u,{value:s}))}var l=n.useContext,d=[],p=function(n){var e=n.name,r=n.children,t=l(f).getComponents(e);return"function"==typeof r?r(t||d):t},v=function(n){return e=n.name,r=n.children,o=u(f),i=o.addComponent,m=o.removeComponent,l=o.updateComponent,d=o.orderNumberRef,null==(p=t({value:r,orderNumber:null})).current.orderNumber&&(p.current.orderNumber=d.current),d.current+=1,c(function(){return i(e,p.current),function(){m(e,p.current)}},[p.current,i,m]),a(function(){r!==p.current.value&&(p.current.value=r,l(e,p.current))},[r]),null;var e,r,o,i,m,l,d,p};function C(e){return{RenderArea:function(r){return n.createElement(p,i({},r,{name:e}))},Content:function(r){return n.createElement(v,{name:e},r.children)}}}export{m as AreaProvider,v as Content,p as RenderArea,C as createRenderingPair}; | ||
//# sourceMappingURL=index.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e||self).reactArea={},e.react)}(this,function(e,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=/*#__PURE__*/r(n);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},u.apply(this,arguments)}var o=t.default.createContext({addComponent:function(e,n){},removeComponent:function(e,n){},updateComponent:function(e,n){},getComponents:function(e){return null},orderNumberRef:{current:0}}),a=t.default.useContext,c=[],f=function(e){var n=e.name,r=e.children,t=a(o).getComponents(n);return"function"==typeof r?r(t||c):t},i=t.default.useEffect,l=t.default.useContext,d=t.default.useRef,m=function(e){return n=e.name,r=e.children,t=l(o),u=t.addComponent,a=t.removeComponent,c=t.updateComponent,f=t.orderNumberRef,null==(m=d({value:r,orderNumber:null})).current.orderNumber&&(m.current.orderNumber=f.current),f.current+=1,i(function(){return u(n,m.current),function(){a(n,m.current)}},[m.current,u,a]),i(function(){m.current.value=r,c(n,m.current)},[r]),null;var n,r,t,u,a,c,f,m};e.AreaProvider=function(e){var r=n.useState({}),a=r[0],c=r[1],f=n.useCallback(function(e,n){c(function(r){var t,o=r[e]||new Set;return o.has(n)?(console.log("component has already been registererd"),r):(o.add(n),u({},r,((t={})[e]=o,t)))})},[]),i=n.useCallback(function(e,n){c(function(r){var t=r[e];return t?(t.delete(n),t.forEach(function(e){e.orderNumber=null}),u({},r)):r})},[]),l=n.useCallback(function(e,n){c(function(n){return n[e]?u({},n):n})},[]),d=n.useCallback(function(e){if(!(e in a))return null;var n=Array.from(a[e]);return n.sort(function(e,n){return e.orderNumber-n.orderNumber}),n.map(function(e){return e.value})},[a]),m=n.useRef(0),p=n.useMemo(function(){return{addComponent:f,getComponents:d,removeComponent:i,updateComponent:l,orderNumberRef:m}},[f,d,i,l]);return t.default.createElement(o.Provider,u({},e,{value:p}))},e.Content=m,e.RenderArea=f,e.createRenderingPair=function(e){return{RenderArea:function(n){return t.default.createElement(f,u({},n,{name:e}))},Content:function(n){return t.default.createElement(m,{name:e},n.children)}}}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e||self).reactArea={},e.react)}(this,function(e,n){function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=/*#__PURE__*/r(n);function u(){return u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},u.apply(this,arguments)}var o=t.default.createContext({addComponent:function(e,n){},removeComponent:function(e,n){},updateComponent:function(e,n){},getComponents:function(e){return null},orderNumberRef:{current:0}}),a=t.default.useContext,c=[],f=function(e){var n=e.name,r=e.children,t=a(o).getComponents(n);return"function"==typeof r?r(t||c):t},i=function(e){return r=e.name,t=e.children,u=n.useContext(o),a=u.addComponent,c=u.removeComponent,f=u.updateComponent,i=u.orderNumberRef,null==(l=n.useRef({value:t,orderNumber:null})).current.orderNumber&&(l.current.orderNumber=i.current),i.current+=1,n.useLayoutEffect(function(){return a(r,l.current),function(){c(r,l.current)}},[l.current,a,c]),n.useEffect(function(){t!==l.current.value&&(l.current.value=t,f(r,l.current))},[t]),null;var r,t,u,a,c,f,i,l};e.AreaProvider=function(e){var r=n.useState({}),a=r[0],c=r[1],f=n.useCallback(function(e,n){c(function(r){var t,o=r[e]||new Set;return o.has(n)?(console.log("component has already been registererd"),r):(o.add(n),u({},r,((t={})[e]=o,t)))})},[]),i=n.useCallback(function(e,n){c(function(r){var t=r[e];return t?(t.delete(n),t.forEach(function(e){e.orderNumber=null}),u({},r)):r})},[]),l=n.useCallback(function(e,n){c(function(n){return n[e]?u({},n):n})},[]),d=n.useCallback(function(e){if(!(e in a))return null;var n=Array.from(a[e]);return n.sort(function(e,n){return e.orderNumber-n.orderNumber}),n.map(function(e){return e.value})},[a]),m=n.useRef(0),p=n.useMemo(function(){return{addComponent:f,getComponents:d,removeComponent:i,updateComponent:l,orderNumberRef:m}},[f,d,i,l]);return t.default.createElement(o.Provider,u({},e,{value:p}))},e.Content=i,e.RenderArea=f,e.createRenderingPair=function(e){return{RenderArea:function(n){return t.default.createElement(f,u({},n,{name:e}))},Content:function(n){return t.default.createElement(i,{name:e},n.children)}}}}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"version": "0.1.1-alpha.5", | ||
"version": "0.1.1-alpha.6", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
47285
16