nodality 1.0.0-beta.6 → 1.0.0-beta.8

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.
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={d:(r,t)=>{for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{Stacker:()=>t});class t{constructor(){this.res=document.createElement("div"),this.res.style.display="flex",this.res.style.flexDirection="column"}add(e){for(var r=0;r<e.length;r++){let t=e[r].render();0===r&&(t.style.zIndex=1),this.res.appendChild(t)}return this}render(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}module.exports=r})();
@@ -0,0 +1 @@
1
+ var e={d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},r={};e.d(r,{A:()=>t});class t{constructor(){this.res=document.createElement("div"),this.res.style.display="flex",this.res.style.flexDirection="column"}add(e){for(var r=0;r<e.length;r++){let t=e[r].render();0===r&&(t.style.zIndex=1),this.res.appendChild(t)}return this}render(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}var s=r.A;export{s as Stacker};
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var t={d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{TransformAnim:()=>i});class i{constructor(t){this.data=t,this.targetHeight=this.data.targetHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.layout="flex",this.setup()}toCode(){return[""]}set(t){return console.log("WHY NOT 900"),t.arrayPadding&&(this.wrdiv.style.marginTop=t.arrayPadding.value),t.height&&(this.wrdiv.style.height=t.height),this}setup(){let t=document.createElement("div");this.wrdiv=t,t.style.display="flex",t.style.flexDirection="column",this.data.overflow&&(t.style.overflow="hidden"),t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.style.background="orange",t.style.height="900px",this.data.sticky||(t.style.position="fixed"),t.style.marginTop="0px";let e=document.createElement("img");e.style.gridArea="1/1",e.style.display="none",e.style.width="50%",e.setAttribute("src","M2.jpeg"),e.setAttribute("class","m2"),t.appendChild(e),this.data.view&&(this.m2img=this.data.view.render(),t.appendChild(this.m2img)),this.data.paragraph&&(this.paragraph=this.data.paragraph.render(),t.appendChild(this.paragraph)),this.data.view&&(e.style.display="none");let i=document.createElement("h2");i.style.fontFamily="Arial",i.style.fontSize="2.4rem",i.style.background="linear-gradient(#3498db, #1abc9c)",i.style.webkitBackgroundClip="text",i.style.webkitTextFillColor="transparent";let a=document.createTextNode("Supercharged");i.appendChild(a),!0!==this.data.showTitle&&void 0!==this.data.showTitle||(this.data.content&&this.data.content.render?t.appendChild(this.data.content.render()):t.appendChild(i));let s=document.createElement("p");document.createTextNode("Hello"),t.appendChild(s),this.res=t,window.addEventListener("scroll",(a=>this.resize(t,e,i))),this.resize(t,e,i)}setStickyData(t){return this.data.stickyData=t,this}toAuto(){return this.res.style.height="auto",this}stick(t){return t?(t.offset&&(null!=this.data.stickyData?this.data.stickyData.top=t.offset:(this.data.stickyData={top:t.offset},this.fixedToRelative(!0))),t.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}makeSticky(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top=0,this}setProps(t){return t.targetHeight&&(this.data.targetHeight=t.targetHeight),t.flagValue&&(this.data.flagValue=t.flagValue),this}noSticky(){return this.wrdiv.style.position="",this}toSticky(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top="0",this}toOpacity(t){this.res.style.opacity=`${t}`}setUncomment(t){this.data.uncomment=t}fixedToRelative(t){return this.data.uncomment=t,this}mask(t){return window.addEventListener("scroll",(()=>{this.innerMask(t)})),this}innerMask(t){if(t){let e=a(window.scrollY,{min:t.start,max:t.end},{min:7,max:0});console.warn(e),console.warn(window.scrollY),a(window.scrollY,{min:t.start,max:t.end},{min:37,max:37})}return this}setScale(t){return this.data.range=t,this.m2img.style.transform=`scale(${this.data.range.scaleMax})`,window.addEventListener("scroll",(()=>{let t=a(window.scrollY,{min:this.data.range.min,max:this.data.range.max},{min:this.data.range.scaleMax,max:this.data.range.scaleMin});null!=this.m2img&&(this.m2img.style.transform=`scale(${t})`)})),this}resize(t,e,i){let s=window.scrollY||document.documentElement.scrollTop;if(s>this.lastScrollTop?this.isUp=!1:this.isUp=!0,this.data.sticky)t.style.background="#fafafa";else if(this.data.stickyData){const e=this.data.stickyData.top;this.data.uncomment&&(window.scrollY>e?(t.style.background="pink",t.style.position="relative",t.style.top=e):(t.style.background="orange",t.style.top=0,t.style.position="fixed"))}this.lastScrollTop=s<=0?0:s;let n=e;this.m2img=e,this.data.view&&(n=this.m2img);let r=a(window.scrollY,{min:3150,max:3300},{min:0,max:100}),l=a(window.scrollY,{min:3150,max:3300},{min:60,max:80}),o=a(window.scrollY,{min:3150,max:3300},{min:0,max:40});this.data.operation&&"translate"===this.data.operation.type&&(n.style.transform=`translate3d(${r}%, ${r/2}%, 0px) scale(${l/100}) rotate(${o}deg)`)}render(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}function a(t,e,i){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let a=(t-e.min)/(e.max-e.min);e.min>e.max&&(a=(t-e.max)/(e.min-e.max));let s=(i.min-i.max)*a-i.min;if(s=Math.abs(s),i.min<i.max){let t=(i.max+Math.abs(i.min))*a;s=i.min+t}return s}module.exports=e})();
@@ -0,0 +1 @@
1
+ var t={d:(e,i)=>{for(var a in i)t.o(i,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:i[a]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};t.d(e,{A:()=>i});class i{constructor(t){this.data=t,this.targetHeight=this.data.targetHeight,void 0===this.data.type?this.type="default":this.type=this.data.type,this.layout="flex",this.setup()}toCode(){return[""]}set(t){return console.log("WHY NOT 900"),t.arrayPadding&&(this.wrdiv.style.marginTop=t.arrayPadding.value),t.height&&(this.wrdiv.style.height=t.height),this}setup(){let t=document.createElement("div");this.wrdiv=t,t.style.display="flex",t.style.flexDirection="column",this.data.overflow&&(t.style.overflow="hidden"),t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.style.background="orange",t.style.height="900px",this.data.sticky||(t.style.position="fixed"),t.style.marginTop="0px";let e=document.createElement("img");e.style.gridArea="1/1",e.style.display="none",e.style.width="50%",e.setAttribute("src","M2.jpeg"),e.setAttribute("class","m2"),t.appendChild(e),this.data.view&&(this.m2img=this.data.view.render(),t.appendChild(this.m2img)),this.data.paragraph&&(this.paragraph=this.data.paragraph.render(),t.appendChild(this.paragraph)),this.data.view&&(e.style.display="none");let i=document.createElement("h2");i.style.fontFamily="Arial",i.style.fontSize="2.4rem",i.style.background="linear-gradient(#3498db, #1abc9c)",i.style.webkitBackgroundClip="text",i.style.webkitTextFillColor="transparent";let a=document.createTextNode("Supercharged");i.appendChild(a),!0!==this.data.showTitle&&void 0!==this.data.showTitle||(this.data.content&&this.data.content.render?t.appendChild(this.data.content.render()):t.appendChild(i));let s=document.createElement("p");document.createTextNode("Hello"),t.appendChild(s),this.res=t,window.addEventListener("scroll",(a=>this.resize(t,e,i))),this.resize(t,e,i)}setStickyData(t){return this.data.stickyData=t,this}toAuto(){return this.res.style.height="auto",this}stick(t){return t?(t.offset&&(null!=this.data.stickyData?this.data.stickyData.top=t.offset:(this.data.stickyData={top:t.offset},this.fixedToRelative(!0))),t.value?this.makeSticky():this.noSticky(),this):(this.makeSticky(),this)}makeSticky(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top=0,this}setProps(t){return t.targetHeight&&(this.data.targetHeight=t.targetHeight),t.flagValue&&(this.data.flagValue=t.flagValue),this}noSticky(){return this.wrdiv.style.position="",this}toSticky(){return this.wrdiv.style.position="sticky",this.wrdiv.style.top="0",this}toOpacity(t){this.res.style.opacity=`${t}`}setUncomment(t){this.data.uncomment=t}fixedToRelative(t){return this.data.uncomment=t,this}mask(t){return window.addEventListener("scroll",(()=>{this.innerMask(t)})),this}innerMask(t){if(t){let e=a(window.scrollY,{min:t.start,max:t.end},{min:7,max:0});console.warn(e),console.warn(window.scrollY),a(window.scrollY,{min:t.start,max:t.end},{min:37,max:37})}return this}setScale(t){return this.data.range=t,this.m2img.style.transform=`scale(${this.data.range.scaleMax})`,window.addEventListener("scroll",(()=>{let t=a(window.scrollY,{min:this.data.range.min,max:this.data.range.max},{min:this.data.range.scaleMax,max:this.data.range.scaleMin});null!=this.m2img&&(this.m2img.style.transform=`scale(${t})`)})),this}resize(t,e,i){let s=window.scrollY||document.documentElement.scrollTop;if(s>this.lastScrollTop?this.isUp=!1:this.isUp=!0,this.data.sticky)t.style.background="#fafafa";else if(this.data.stickyData){const e=this.data.stickyData.top;this.data.uncomment&&(window.scrollY>e?(t.style.background="pink",t.style.position="relative",t.style.top=e):(t.style.background="orange",t.style.top=0,t.style.position="fixed"))}this.lastScrollTop=s<=0?0:s;let n=e;this.m2img=e,this.data.view&&(n=this.m2img);let r=a(window.scrollY,{min:3150,max:3300},{min:0,max:100}),l=a(window.scrollY,{min:3150,max:3300},{min:60,max:80}),o=a(window.scrollY,{min:3150,max:3300},{min:0,max:40});this.data.operation&&"translate"===this.data.operation.type&&(n.style.transform=`translate3d(${r}%, ${r/2}%, 0px) scale(${l/100}) rotate(${o}deg)`)}render(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}function a(t,e,i){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let a=(t-e.min)/(e.max-e.min);e.min>e.max&&(a=(t-e.max)/(e.min-e.max));let s=(i.min-i.max)*a-i.min;if(s=Math.abs(s),i.min<i.max){let t=(i.max+Math.abs(i.min))*a;s=i.min+t}return s}var s=e.A;export{s as TransformAnim};
package/layout/index.js CHANGED
@@ -41,7 +41,9 @@ import {Button} from "../layout/button.js";
41
41
  import {Des} from "../lib/designer.js";
42
42
  import { LinkStyler } from "../lib/linkGetter.js";
43
43
  import { CardGen } from "../lib/cardGetter.js";
44
-
44
+ import { TransformAnim } from "../lib/TransformAnim.js";
45
+ import { KeyframeAnim } from "../lib/AppleAnim.js";
46
+ import { Stacker } from "../lib/Stacker.js";
45
47
 
46
48
  // Expose modules as globals
47
49
  if (typeof window !== 'undefined') {
@@ -88,6 +90,9 @@ if (typeof window !== 'undefined') {
88
90
  window.Des = Des;
89
91
  window.LinkStyler = LinkStyler;
90
92
  window.CardGen = CardGen;
93
+ window.TransformAnim = TransformAnim;
94
+ window.KeyframeAnim = KeyframeAnim;
95
+ window.Stacker = Stacker;
91
96
  }
92
97
 
93
98
  if (typeof global !== 'undefined') {
@@ -134,6 +139,9 @@ if (typeof global !== 'undefined') {
134
139
  global.Des = Des;
135
140
  global.LinkStyler = LinkStyler;
136
141
  global.CardGen = CardGen;
142
+ global.TransformAnim = TransformAnim;
143
+ global.KeyframeAnim = KeyframeAnim;
144
+ global.Stacker = Stacker;
137
145
  }
138
146
 
139
147
  export {
@@ -180,4 +188,7 @@ export {
180
188
  Des,
181
189
  LinkStyler,
182
190
  CardGen,
191
+ TransformAnim,
192
+ KeyframeAnim,
193
+ Stacker
183
194
  }; // 172112 Nice!!!! 17/04/25