nodality 1.0.0-beta.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 (179) hide show
  1. package/dist/animator.cjs.js +1 -0
  2. package/dist/animator.esm.js +1 -0
  3. package/dist/audionew.cjs.js +1 -0
  4. package/dist/audionew.esm.js +1 -0
  5. package/dist/base.cjs.js +1 -0
  6. package/dist/base.esm.js +1 -0
  7. package/dist/betaDesktopBar.esm.js +1 -0
  8. package/dist/betaMobileBar.esm.js +1 -0
  9. package/dist/bundle.umd.js +1 -0
  10. package/dist/button.cjs.js +1 -0
  11. package/dist/button.esm.js +1 -0
  12. package/dist/cardGetter.cjs.js +1 -0
  13. package/dist/cardGetter.esm.js +1 -0
  14. package/dist/center.cjs.js +1 -0
  15. package/dist/center.esm.js +1 -0
  16. package/dist/checkbox.cjs.js +1 -0
  17. package/dist/checkbox.esm.js +1 -0
  18. package/dist/code.cjs.js +1 -0
  19. package/dist/code.esm.js +1 -0
  20. package/dist/container.cjs.js +1 -0
  21. package/dist/container.esm.js +1 -0
  22. package/dist/datalist.cjs.js +1 -0
  23. package/dist/datalist.esm.js +1 -0
  24. package/dist/designer.cjs.js +1 -0
  25. package/dist/designer.esm.js +1 -0
  26. package/dist/dropdown.cjs.js +1 -0
  27. package/dist/dropdown.esm.js +1 -0
  28. package/dist/elementMapper.cjs.js +1 -0
  29. package/dist/elementMapper.esm.js +1 -0
  30. package/dist/finalresult.esm.js +1 -0
  31. package/dist/flexCard.cjs.js +1 -0
  32. package/dist/flexCard.esm.js +1 -0
  33. package/dist/flexGrid.cjs.js +1 -0
  34. package/dist/flexGrid.esm.js +1 -0
  35. package/dist/flexRow.cjs.js +1 -0
  36. package/dist/flexRow.esm.js +1 -0
  37. package/dist/floatingInput.cjs.js +1 -0
  38. package/dist/floatingInput.esm.js +1 -0
  39. package/dist/free.cjs.js +1 -0
  40. package/dist/free.esm.js +1 -0
  41. package/dist/horizontalScroller.esm.js +1 -0
  42. package/dist/image.cjs.js +1 -0
  43. package/dist/image.esm.js +1 -0
  44. package/dist/imagePicker.cjs.js +1 -0
  45. package/dist/imagePicker.esm.js +1 -0
  46. package/dist/index.cjs.js +1 -0
  47. package/dist/index.esm.js +1 -0
  48. package/dist/link.cjs.js +1 -0
  49. package/dist/link.esm.js +1 -0
  50. package/dist/linkGetter.cjs.js +1 -0
  51. package/dist/linkGetter.esm.js +1 -0
  52. package/dist/metaAdder.cjs.js +1 -0
  53. package/dist/metaAdder.esm.js +1 -0
  54. package/dist/modal2025.cjs.js +1 -0
  55. package/dist/modal2025.esm.js +1 -0
  56. package/dist/multiswitchers.esm.js +1 -0
  57. package/dist/newNavBar.cjs.js +1 -0
  58. package/dist/newNavBar.esm.js +1 -0
  59. package/dist/picker.cjs.js +1 -0
  60. package/dist/picker.esm.js +1 -0
  61. package/dist/progress.cjs.js +1 -0
  62. package/dist/progress.esm.js +1 -0
  63. package/dist/radio.cjs.js +1 -0
  64. package/dist/radio.esm.js +1 -0
  65. package/dist/range.cjs.js +1 -0
  66. package/dist/range.esm.js +1 -0
  67. package/dist/sideBar.cjs.js +1 -0
  68. package/dist/sideBar.esm.js +1 -0
  69. package/dist/sideNavBar.cjs.js +1 -0
  70. package/dist/sideNavBar.esm.js +1 -0
  71. package/dist/simpleBar.cjs.js +1 -0
  72. package/dist/simpleBar.esm.js +1 -0
  73. package/dist/stack.cjs.js +1 -0
  74. package/dist/stack.esm.js +1 -0
  75. package/dist/table.cjs.js +1 -0
  76. package/dist/table.esm.js +1 -0
  77. package/dist/text.cjs.js +1 -0
  78. package/dist/text.esm.js +1 -0
  79. package/dist/textField.cjs.js +1 -0
  80. package/dist/textField.esm.js +1 -0
  81. package/dist/wrap.cjs.js +1 -0
  82. package/dist/wrap.esm.js +1 -0
  83. package/dist/zoomCard.cjs.js +1 -0
  84. package/dist/zoomCard.esm.js +1 -0
  85. package/layout/<head> +59 -0
  86. package/layout/DEADJOE +49 -0
  87. package/layout/DEPRECATED-PARAGRAPH.js +103 -0
  88. package/layout/animator.js +1915 -0
  89. package/layout/audio.js +145 -0
  90. package/layout/audionew.js +70 -0
  91. package/layout/base-2.js +92 -0
  92. package/layout/base.js +161 -0
  93. package/layout/betaDesktopBar.js +126 -0
  94. package/layout/betaMobileBar.js +293 -0
  95. package/layout/box.js +29 -0
  96. package/layout/button.js +516 -0
  97. package/layout/cards.js +136 -0
  98. package/layout/center.js +143 -0
  99. package/layout/checkbox.js +183 -0
  100. package/layout/cleanRow.js +775 -0
  101. package/layout/code.js +60 -0
  102. package/layout/container.js +1005 -0
  103. package/layout/custom.js +289 -0
  104. package/layout/divImage.js +209 -0
  105. package/layout/dropdown.js +154 -0
  106. package/layout/dropdown2025.js +152 -0
  107. package/layout/edit.sh +39 -0
  108. package/layout/emptyElement.js +21 -0
  109. package/layout/externalStylesheet.js +19 -0
  110. package/layout/flexCard.js +220 -0
  111. package/layout/flexGrid.js +192 -0
  112. package/layout/flexrow.js +866 -0
  113. package/layout/footer.js +83 -0
  114. package/layout/formComponents/custom.js +0 -0
  115. package/layout/formComponents/dataList.js +183 -0
  116. package/layout/formComponents/edit.sh +39 -0
  117. package/layout/formComponents/floatingInput.js +163 -0
  118. package/layout/formComponents/form-all.js +161 -0
  119. package/layout/formComponents/form.js +76 -0
  120. package/layout/formComponents/imagePicker.js +266 -0
  121. package/layout/formComponents/picker.js +208 -0
  122. package/layout/formComponents/radio.js +231 -0
  123. package/layout/formComponents/radiogroup.js +231 -0
  124. package/layout/formComponents/range.js +158 -0
  125. package/layout/free.js +232 -0
  126. package/layout/grid-new.js +299 -0
  127. package/layout/grid.js +190 -0
  128. package/layout/gridSwitcher.js +188 -0
  129. package/layout/group.js +163 -0
  130. package/layout/header.js +175 -0
  131. package/layout/hello.html +126 -0
  132. package/layout/horizontalScroller.js +222 -0
  133. package/layout/image-old.js +487 -0
  134. package/layout/image.js +1039 -0
  135. package/layout/index.js +183 -0
  136. package/layout/label.js +50 -0
  137. package/layout/link.js +1085 -0
  138. package/layout/list-OLD.js +0 -0
  139. package/layout/list.js +127 -0
  140. package/layout/metaAdder.js +17 -0
  141. package/layout/modal2025.js +142 -0
  142. package/layout/modernwrap.js +92 -0
  143. package/layout/multiswitcher.js +224 -0
  144. package/layout/multiswitcherBeta.js +63 -0
  145. package/layout/navBar-OLD.js +261 -0
  146. package/layout/navBar.js +371 -0
  147. package/layout/navFactor/customDiv.js +60 -0
  148. package/layout/navFactor/edit.sh +39 -0
  149. package/layout/newFlatAdder.js +41 -0
  150. package/layout/newNavBar copy 2.js +915 -0
  151. package/layout/newNavBar copy.js +774 -0
  152. package/layout/newNavBar.js +925 -0
  153. package/layout/offsetContainer.js +395 -0
  154. package/layout/progress.js +111 -0
  155. package/layout/remWin.sh +20 -0
  156. package/layout/row.js +208 -0
  157. package/layout/savedNewNavBar.js +437 -0
  158. package/layout/scrollvideo.js +120 -0
  159. package/layout/sideBar.js +183 -0
  160. package/layout/sideNavBar.js +313 -0
  161. package/layout/simpleBar.js +25 -0
  162. package/layout/slider2025.js +198 -0
  163. package/layout/spacer.js +44 -0
  164. package/layout/stack.js +76 -0
  165. package/layout/styler.js +113 -0
  166. package/layout/switcher.js +102 -0
  167. package/layout/table.js +155 -0
  168. package/layout/text.js +1685 -0
  169. package/layout/textField.js +282 -0
  170. package/layout/ulist.js +147 -0
  171. package/layout/video.js +70 -0
  172. package/layout/withoutNew.js +60 -0
  173. package/layout/wrap.js +140 -0
  174. package/layout/zoomCard.js +219 -0
  175. package/lib/cardGetter.js +80 -0
  176. package/lib/designer.js +875 -0
  177. package/lib/elementMapper.js +1428 -0
  178. package/lib/linkGetter.js +202 -0
  179. package/package.json +33 -0
package/layout/link.js ADDED
@@ -0,0 +1,1085 @@
1
+ import {Animator} from "./animator.js";
2
+
3
+
4
+ class Link extends Animator {
5
+ constructor(text, link, stopEM){
6
+ super();
7
+ this.link = link;
8
+ this.text = text;
9
+ this.code = [];
10
+ this.css = [];
11
+ this.elCSS = [];
12
+ this.html = [];
13
+
14
+ // alert(link);
15
+ /*if (text != undefined && link != undefined){
16
+ this.code.push(`\n new Link("${text}", `,`"${link}")`);
17
+ } else {
18
+ this.code.push("\n new Link()");
19
+ }*/
20
+ // // // console.log(link); //
21
+
22
+ this.res = null;
23
+ this.stopEM = stopEM; // DEVELOPMENT
24
+ this.setup();
25
+ this.inlineBlock(); // auto set ??
26
+ }
27
+
28
+ toCSS(){
29
+ return this.css;
30
+ }
31
+
32
+ toHTMLA(){
33
+ return this.html;
34
+ }
35
+
36
+ toElCSS(){
37
+ this.preffersId ? this.elCSS.unshift(this.res.id + " { \n") : (this.elCSS.unshift("." + this.class + " { \n"));
38
+ //this.elCSS.unshift(this.res.id + " { \n");
39
+ this.elCSS.push(" } \n \n");
40
+ // // console.warn("OI")
41
+ // // console.log(this.elCSS);
42
+ return this.elCSS;
43
+ }
44
+
45
+ getType(){ // 114145
46
+ return "HTMLAnchorElement";
47
+ }
48
+
49
+ toCode(){
50
+ return this.code; // 120646 ovewrite 25/03
51
+ }
52
+
53
+ setArea(area){
54
+ this.res.style.gridArea = area;
55
+ return this;
56
+ }
57
+
58
+ setup(){
59
+ let el = document.createElement("a");
60
+ el.setAttribute("href", this.link);
61
+ el.style.textDecoration = "none";
62
+ //el.style.fontWeight = "bold";
63
+ el.style.color = "black";
64
+ el.style.textAlign = "center";
65
+ el.style.fontFamily = "Arial";
66
+
67
+ var text = document.createTextNode(this.text);
68
+ el.appendChild(text);
69
+
70
+ this.res = el;
71
+
72
+ if (this.stopEM === false){
73
+ this.em(1);
74
+ }
75
+
76
+ return this;
77
+ }
78
+
79
+ appendImageAsChild(options, margin){
80
+
81
+ /*
82
+ let link = document.createElement("a");
83
+ link.setAttribute("href", "https://www.apple.com");
84
+ let img = document.createElement("img");
85
+ img.setAttribute("src", "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQFitX60XAzA1Cd8koHUgjCfMgCyxokZvYCybdzac6w&s");
86
+ link.appendChild(img);
87
+
88
+ document.body.appendChild(link);
89
+
90
+ */
91
+
92
+ // // console.log(options);
93
+
94
+
95
+ let link = document.createElement("a");
96
+ options.options.vtn && (link.style.viewTransitionName = options.options.vtn);
97
+
98
+ link.setAttribute("href", options.options.url);
99
+ let img = document.createElement("img");
100
+
101
+ if (options.options) {
102
+ img.style.width = options.options.size;
103
+ options.options.radius && (img.style.borderRadius = options.options.radius);
104
+ img.setAttribute("src", options.options.img);
105
+ link.appendChild(img);
106
+ }
107
+
108
+
109
+ //this.res.style.fontSize = "8rem";
110
+
111
+
112
+
113
+ // Clears styles
114
+ this.res = link; // 10:00:39
115
+
116
+
117
+ if (margin){
118
+ this.res.style.marginLeft = margin;
119
+ }
120
+
121
+
122
+ // alert("K")
123
+ return this;
124
+ } // jquery wrap 9:41:49 18/04/23
125
+
126
+ addIcon(obj){
127
+ //alert("PPP")
128
+ let img = document.createElement("img");
129
+ img.style.width = "20px";
130
+ img.style.height = "auto";
131
+ img.style.marginLeft = obj.padding ? obj.padding : "10px";
132
+ img.setAttribute("src", obj.url);
133
+ this.res.appendChild(img);
134
+ return this;
135
+ }
136
+
137
+
138
+ removeQuotesFromFirstWord(jsonString) {
139
+ if (!jsonString){
140
+ return;
141
+ }
142
+ const modifiedJSON = jsonString.replace(/"([^"]+)":/g, '$1:');
143
+ return modifiedJSON;
144
+ }
145
+
146
+
147
+
148
+ set(obj){ // make it like I would like it
149
+ // `1px solid ${this.blastData.color}
150
+
151
+ // push at all times
152
+ true && (this.elCSS.push(`text-decoration: none; \n`));
153
+ this.options = obj;
154
+
155
+ let stra = "";
156
+ obj.id && this.res.setAttribute("id", obj.id);
157
+
158
+ obj.id && super.setID(obj.id);
159
+
160
+ obj.pad && this.pad(obj.pad);
161
+
162
+
163
+ /*
164
+
165
+ const mapped = sides.map(x => `"${x}"`).join(", ");
166
+ obj.arrayPadding && this.arrayPadding(obj.arrayPadding.sides, obj.arrayPadding.value);
167
+ //obj.arrayPadding && this.arrayPadding(obj.arrayMargin.sides, obj.arrayMargin.value);
168
+ obj.arrayPadding && (stra += `\n arrayPadding: {sides: [${mapped}], value: "${obj.arrayPadding.value}"},`);
169
+ */
170
+
171
+
172
+
173
+ let rempad = this.removeQuotesFromFirstWord(JSON.stringify(obj.pad));
174
+ obj.pad && (stra += `\n pad: ${rempad},`);
175
+
176
+ obj.preffersId && (this.preffersId = obj.preffersId);
177
+ (obj.preffersId != undefined) && (stra += `\n preffersId: ${obj.preffersId},`);
178
+
179
+ obj.class && super.setClass(obj.class);
180
+ obj.class && (stra += `\n class: "${obj.class}",`);
181
+ //alert(obj.class);
182
+
183
+ if (obj.borderObj){
184
+ //alert(`${obj.borderObj.width}px solid ${obj.borderObj.color}`);
185
+ this.res.style.border = `${obj.borderObj.width} solid ${obj.borderObj.color}`;
186
+ this.res.style.borderRadius = `${obj.borderObj.radius}`;
187
+
188
+ //this.res.style.border = `3px solid transparent`;
189
+ //this.res.style.border = "10px solid yellow";
190
+
191
+ let rem = this.removeQuotesFromFirstWord(JSON.stringify(obj.borderObj));
192
+ stra += `\n borderObj: ${rem},`;
193
+ }
194
+
195
+ if (this.options.preffersId === false) {
196
+ this.html.push(`<a class="${obj.class}" href="#hello">${obj.text}</a> \n \n`);
197
+ } else if (obj.id) {
198
+ this.html.push(`<a id="${obj.id.substr(1)}" href="#hello">${obj.text}</a> \n \n`);
199
+ }
200
+
201
+ if (obj.blastData != undefined) {
202
+ let rem = this.removeQuotesFromFirstWord(JSON.stringify(obj.blastData));
203
+ super.setAny({ globalBlast: `1px ${obj.blastData.color}` }); // pass this color
204
+ obj.blastData && (stra += `\n blastData: ${rem},`);
205
+ }
206
+
207
+ obj.nowrap && (this.res.style.whiteSpace = "nowrap");
208
+ obj.font && this.font(obj.font);
209
+ obj.font && (stra += `\n font: "${obj.font}",`);
210
+ obj.font && (this.elCSS.push(`font-family: "${obj.font}"; \n`));
211
+
212
+ obj.fluidc && this.fluidCopy(obj.fluidc);
213
+ obj.fluidc && (stra += `\n fluidc: "${obj.fluidc}",`);
214
+
215
+ obj.size && this.fluidCopy(obj.size);
216
+ obj.size && (stra += `\n size: "${obj.size}",`);
217
+
218
+ if (obj.fluidc === "S6") {
219
+ obj.fluidc && (this.elCSS.push(`font-size: calc(1rem + 1.075vw); \n`));
220
+ } else {
221
+ obj.fluidc && (this.elCSS.push(`font-size: calc(1.625rem + 5.075vw); \n`));
222
+ }
223
+ // obj.fluidc && (this.elCSS.push(`font-size: calc(1.625rem + 5.075vw); \n`));
224
+
225
+ obj.clampc && this.clampCopy(obj.clampc);
226
+
227
+
228
+ this.options.id && (stra += `\n id: "${this.options.id}",`);
229
+
230
+
231
+ obj.align && this.leftAlign(); // 1145 WOW
232
+ obj.align && (stra += `\n align: "${obj.align}",`);
233
+
234
+
235
+ obj.type && (this.res.style.display = "block");
236
+ obj.color && this.color(obj.color);
237
+ obj.color && (stra += `\n color: "${obj.color}",`);
238
+ obj.color && (this.elCSS.push(`color: "${obj.color}"; \n`));
239
+
240
+ obj.background && this.background(obj.background);
241
+ let stro = this.removeQuotesFromFirstWord(JSON.stringify(obj.background))
242
+ obj.background && (stra += `\n background: ${stro},`);
243
+
244
+ obj.hover && this.hover(obj.hover); // 23:20:51 Wow!
245
+ let stre = this.removeQuotesFromFirstWord(JSON.stringify(obj.hover))
246
+ obj.hover && (stra += `\n hover: ${stre},`);
247
+
248
+
249
+
250
+
251
+
252
+
253
+ obj.weight && (this.res.style.fontWeight = obj.weight);
254
+
255
+ obj.blast && (this.blastData = obj.blast);
256
+
257
+ obj.bold && (this.res.style.fontWeight = "bold");
258
+ // Wasn't there !!!
259
+ obj.bold && (stra += `\n bold: ${obj.bold},`);
260
+
261
+ obj.block && this.toBlock();
262
+ obj.block && (stra += `\n block: ${obj.block},`);
263
+
264
+ //obj.border && this.border(obj);
265
+
266
+ obj.radius && this.radius(obj.radius);
267
+ obj.radius && (stra += `\n radius: "${obj.radius}",`);
268
+
269
+ obj.width && this.width(obj.width);
270
+ obj.width && (stra += `\n width: "${obj.width}",`);
271
+
272
+ if (obj.arrayPadding){
273
+ let sides = obj.arrayPadding.sides;
274
+ //// // console.log(sides);
275
+ //// // console.log(sides.map(x => `"${x}"`).join(", "));
276
+
277
+ const mapped = sides.map(x => `"${x}"`).join(", ");
278
+ obj.arrayPadding && this.arrayPadding(obj.arrayPadding.sides, obj.arrayPadding.value);
279
+ //obj.arrayPadding && this.arrayPadding(obj.arrayMargin.sides, obj.arrayMargin.value);
280
+ obj.arrayPadding && (stra += `\n arrayPadding: {sides: [${mapped}], value: "${obj.arrayPadding.value}"},`); // 2345 06/03
281
+ }
282
+
283
+ obj.arrayMargin && this.arrayMargin(obj.arrayMargin.sides, obj.arrayMargin.value);
284
+ //obj.arrayMargin && this.arrayMargin(obj.arrayMargin.sides, obj.arrayMargin.value);
285
+ obj.arrayMargin && (stra += `\n arrayMargin: {sides: [${obj.arrayMargin.sides.map(side => `"${side}", `)}], value: "${obj.arrayMargin.value}"},`); // 2345 06/03
286
+
287
+ obj.maxWidth && this.maxWidth(obj.maxWidth);
288
+ // // // console.log(obj.arrayMargin);
289
+
290
+
291
+
292
+
293
+
294
+ /* if ((obj.link !== undefined || obj.url !== undefined) && obj.text !== undefined){
295
+ this.link = obj.link;
296
+ this.text = obj.text;
297
+ stra += `\n link: "${obj.link}",`;
298
+ stra += `\n text: "${obj.text}",`;
299
+
300
+ obj.link && this.res.setAttribute("href", obj.link);
301
+ // // // console.log(obj.link);
302
+
303
+ obj.text && (this.res.textContent = obj.text);
304
+
305
+ }*/
306
+
307
+ obj.url && this.res.setAttribute("href", obj.url);
308
+ stra += `\n url: "${obj.url}",`;
309
+
310
+ obj.text && (this.res.textContent = obj.text);
311
+ stra += `\n text: "${obj.text}",`;
312
+
313
+ //this.text = obj.text;
314
+
315
+ // stra += `\n text: "${obj.text}",`;
316
+
317
+
318
+ if (obj.data){
319
+ obj.data && this.appendImageAsChild(obj.data, "20px");
320
+
321
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.data));
322
+ obj.data && (stra += `\n data: ${stringified}`);
323
+ }
324
+
325
+ if (obj.icon) {
326
+ this.addIcon(obj.icon);
327
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.icon));
328
+ (stra += `\n icon: ${stringified},`);
329
+ }
330
+
331
+ if (obj.shadow){
332
+ let noiseObject = obj.shadow;
333
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(noiseObject));
334
+ (stra += `\n shadow: ${stringified},`);
335
+ }
336
+
337
+ if (obj.stroke) {
338
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.stroke));
339
+ obj.stroke && (stra += `\n stroke: ${stringified},`);
340
+ }
341
+
342
+ if (obj.backgroundOp) {
343
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.backgroundOp));
344
+ stra += `\n backgroundOp: ${stringified},`;
345
+ }
346
+
347
+ if (obj.marginOp) {
348
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.marginOp));
349
+ stra += `\n marginOp: ${stringified},`;
350
+ }
351
+
352
+ if (obj.gradient) {
353
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.gradient));
354
+ (stra += `\n gradient: ${stringified},`);
355
+ }
356
+
357
+ if (obj.animation) { // This does not fire for nasa link with id #swimoa
358
+ // alert("PPP" + obj.id);
359
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.animation));
360
+ (stra += `\n animation: ${stringified},`);
361
+ }
362
+
363
+ if (obj.transform) { // This does not fire for nasa link with id #swimoa
364
+ // alert("PPP" + obj.id);
365
+ let stringified = this.removeQuotesFromFirstWord(JSON.stringify(obj.transform));
366
+ (stra += `\n transform: ${stringified},`);
367
+ }
368
+
369
+ //if obj.keySet && this.keySet(obj.keySet);
370
+ //obj.keySet && (stra += `\n keySet: ${stringified},`);
371
+
372
+ let str = `new Link().set({${stra}}) \n`;
373
+
374
+ this.code.push(str);
375
+ obj.color && this.color(obj.color);
376
+
377
+
378
+
379
+ obj.rounded && this.round();
380
+
381
+
382
+ //---
383
+
384
+
385
+
386
+ //---
387
+
388
+
389
+ // 504-711 REACT ON TRANSFORM
390
+
391
+ if (obj.transform && obj.transform.transform){
392
+ this.reactOnTransform(obj.transform);
393
+ } else {
394
+ this.reactOnTransform(obj);
395
+ }
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+ let arr = [];
437
+ // // console.log("....obj");
438
+
439
+ // alert("O")
440
+
441
+ let ft = [obj.border, obj.gradient, obj.animation, obj.span, obj.shadow, obj.backgroundOp, obj.animation]//obj.gradient.filter(el => el.op.name !== "layout");
442
+ // // // console.log(ft);
443
+
444
+ // // console.log("hawai");
445
+ // // console.warn(ft);
446
+
447
+ ft = ft.filter(el => el != undefined);
448
+
449
+
450
+ if (ft.length > 0){
451
+
452
+
453
+
454
+ // let arr = [];
455
+
456
+ /*for (var i = 0; i < ft.length; i++){
457
+ // // console.log("Linkello");
458
+ arr.push({
459
+ range: ft[i].range,
460
+ log: ft[i].op.name
461
+ });
462
+ }*/
463
+
464
+ // // console.log("LATA")
465
+ // // console.log(ft);
466
+ // // console.log(obj.shadow);
467
+
468
+ for (var i = 0; i < ft.length; i++){
469
+ // // // console.log("Hello");
470
+ arr.push({
471
+ range: ft[i].range,
472
+ log: ft[i].op.name,
473
+ target: ft[i].target,
474
+ op: ft[i].op
475
+ });
476
+ }
477
+
478
+
479
+
480
+ // THIS GETS OWERWRITTEN
481
+ // this.res.style.border = "1Px solid orange";
482
+
483
+ //alert(obj.hover && obj.hover.border);
484
+ let keep = [];
485
+ if (obj.borderObj /*|| (obj.hover && obj.hover.border)*/){
486
+ keep.push("border");
487
+ }
488
+
489
+ if (obj.background){
490
+ keep.push("background");
491
+ }
492
+
493
+ if (obj.mar){
494
+ keep.push("margin");
495
+ }
496
+
497
+ if (obj.animation){
498
+ // alert("PP")
499
+ keep.push("animation");
500
+
501
+ //this.res.style.opacity = 0.3;
502
+ }
503
+
504
+ /*if (obj.animationSimple){
505
+ // alert("PP")
506
+ keep.push("animationSimple");
507
+
508
+ //this.res.style.opacity = 0.3;
509
+ }*/
510
+ // alert(obj.id);
511
+ // obj.id is undefined why ???
512
+
513
+ // alert(this.options.id); undef.
514
+ // it isn't in ID
515
+
516
+ // // console.log("Keeper");
517
+ // // console.log(keep); // add animation code
518
+
519
+
520
+
521
+ // animation: "[]"
522
+ this.chainReact(arr, obj.id, keep, obj.isNavA); // pass el name in argument ???
523
+ this.res.style.zIndex = 1;
524
+ }
525
+
526
+
527
+
528
+
529
+
530
+
531
+ // 211518 you know howf
532
+ obj.mar && this.mar(obj.mar); // has to be here
533
+
534
+ //---
535
+
536
+ return this;
537
+ }
538
+
539
+
540
+
541
+ color(e){
542
+ this.res.style.color = e;
543
+ return this;
544
+ }
545
+
546
+ maxWidth(mw){
547
+ this.res.style.maxWidth = mw; // 121339 in flex
548
+ return this; // 121550 pbends
549
+ }
550
+
551
+ background(color){
552
+ this.res.style.backgroundColor = color;
553
+ return this;
554
+ }
555
+
556
+ leftAlign(){
557
+ this.res.style.textAlign = "left";
558
+ return this;
559
+ }
560
+
561
+ // 22:27:47
562
+ arrayPadding(arr, value) {
563
+
564
+ if (!value){ // LTRB
565
+ this.res.style.marginLeft = `${arr[0]}px`;
566
+ this.res.style.marginTop = `${arr[1]}px`;
567
+ this.res.style.marginRight = `${arr[2]}px`;
568
+ this.res.style.marginBottom = `${arr[3]}px`;
569
+ }
570
+
571
+ if (arr[0] === "all"){
572
+ this.res.style.paddingLeft = value;
573
+ this.res.style.paddingTop = value;
574
+ this.res.style.paddingRight = value;
575
+ this.res.style.paddingBottom = value;
576
+ }
577
+
578
+
579
+ if (arr.includes("left")){
580
+ this.res.style.paddingLeft = value;
581
+ }
582
+
583
+ if (arr.includes("right")){
584
+ this.res.style.paddingRight = value;
585
+ }
586
+
587
+ if (arr.includes("top")){
588
+ this.res.style.paddingTop = value;
589
+ }
590
+
591
+ if (arr.includes("bottom")){
592
+ this.res.style.paddingBottom = value;
593
+ }
594
+
595
+ if (!value){
596
+ this.res.style.paddingBottom = arr;
597
+ }
598
+
599
+
600
+ //alert(value);
601
+
602
+ return this;
603
+ } //22155 snap to change phone screen
604
+
605
+
606
+ arrayMargin(arr, value) { // 224857 redefined earlier
607
+
608
+ // // // console.log(arr);
609
+ if (arr.includes("left")){
610
+ this.res.style.marginLeft = value;
611
+ }
612
+
613
+ if (arr.includes("right")){
614
+ this.res.style.marginRight = value;
615
+ }
616
+
617
+ if (arr.includes("top")){
618
+ this.res.style.marginTop = value;
619
+ }
620
+
621
+ if (arr.includes("bottom")){
622
+ this.res.style.marginBottom = value;
623
+ }
624
+
625
+ if (arr.includes("all")){
626
+ this.res.style.margin = value;
627
+ }
628
+
629
+ if (!value){
630
+ this.res.style.marginBottom = arr;
631
+ }
632
+
633
+ return this;
634
+ }
635
+
636
+ getClampValue(name){
637
+ if (name === "S6"){
638
+ return "clamp(2.25rem, 2vw+1.5rem, 3.25rem)";
639
+ }
640
+
641
+ if (name === "S5"){
642
+ return "clamp(2.75rem, 2vw + 1.5rem, 3.25rem)";
643
+ }
644
+
645
+ if (name === "S4"){
646
+ return "clamp(3.5rem, 2vw + 1.5rem, 3.25rem)";
647
+ }
648
+
649
+ if (name === "S3"){
650
+ return "clamp(4.25rem, 2vw + 1.5rem, 3.25rem)";
651
+ }
652
+
653
+ if (name === "S2"){
654
+ return "clamp(5rem, 2vw + 1.5rem, 3.25rem)";
655
+ }
656
+
657
+ if (name === "S1"){
658
+ return "clamp(6rem, 2vw + 1.5rem, 3.25rem)";
659
+ }
660
+ }
661
+
662
+ clampCopy(name){
663
+ this.res.style.fontSize = this.getClampValue(name)
664
+ return this;
665
+ }
666
+
667
+ fluidCopy(name){
668
+
669
+ const display1 = "calc(1.625rem + 5.075vw)";
670
+
671
+ if (name === "S1"){
672
+
673
+ this.res.style.fontSize = display1;
674
+ }
675
+
676
+ const display2 = "calc(1.500rem + 4.3vw)";
677
+
678
+ if (name === "S2"){
679
+
680
+ this.res.style.fontSize = display2;
681
+ }
682
+
683
+
684
+ const display3 = "calc(1.375rem + 3.525vw)";
685
+
686
+ if (name === "S3"){
687
+
688
+ this.res.style.fontSize = display3;
689
+ }
690
+
691
+ const display4 = "calc(1.250rem + 2.75vw)";
692
+
693
+ if (name === "S4"){
694
+
695
+ this.res.style.fontSize = display4;
696
+ }
697
+
698
+ const display5 = "calc(1.125rem + 1.975vw)";
699
+
700
+ if (name === "S5"){
701
+
702
+ this.res.style.fontSize = display5;
703
+ }
704
+
705
+
706
+
707
+ const display6 = "calc(1rem + 0.5vw)"; // calc(1rem + 1.2vw)
708
+
709
+ if (name === "S6"){
710
+ this.res.style.fontSize = display6;
711
+ }
712
+
713
+ return this;
714
+ }
715
+
716
+
717
+ inlineBlock(){
718
+ this.res.style.display = "inline-block";
719
+ return this;
720
+ }
721
+
722
+
723
+ toBlock(){
724
+ this.res.style.display = "block";
725
+ return this;
726
+ }
727
+
728
+ myself(obj) {
729
+ const adj = () => {
730
+ let query = window.matchMedia("(max-device-width: 415px)");
731
+ if (query.matches) {
732
+ this.res.style.fontSize = obj.desktop;
733
+ } else {
734
+ this.res.style.fontSize = obj.phone;
735
+ }
736
+ }
737
+
738
+ adj();
739
+ window.addEventListener("resize", adj);
740
+ return this;
741
+ }
742
+
743
+
744
+ style(st){
745
+ this.res.style.color = st.styles.color;
746
+ this.res.style.fontWeight = st.styles.fontWeight;
747
+ this.res.style.paddingLeft = st.styles.padding[0];
748
+ this.res.style.paddingTop = st.styles.padding[1];
749
+ this.res.style.paddingRight = st.styles.padding[2];
750
+ this.res.style.paddingBottom = st.styles.padding[3];
751
+ return this;
752
+ }
753
+
754
+ color(c){
755
+ this.res.style.color = c;
756
+ return this;
757
+ }
758
+
759
+ /*background(color){
760
+ //this.res.style.padding = "1em";
761
+ this.res.style.backgroundColor = color;
762
+ return this;
763
+ }*/
764
+
765
+ round(){
766
+ //alert("K")
767
+ this.res.style.borderRadius = "0.5rem";
768
+
769
+ if (this.options.rounded){
770
+ // alert("K");
771
+ this.res.children[0].style.borderRadius = "0.5rem";
772
+ }
773
+
774
+ return this;
775
+ }
776
+
777
+ newWindow() {
778
+ this.res.target = "_new";
779
+ return this;
780
+ }
781
+
782
+
783
+
784
+ radius(w){
785
+ this.res.style.borderRadius = `${w}`;
786
+ return this;
787
+ }
788
+
789
+
790
+
791
+
792
+ // 220812 la olympics 2028
793
+
794
+
795
+
796
+
797
+
798
+
799
+
800
+
801
+
802
+
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
814
+
815
+
816
+
817
+ transition(duration){
818
+ this.res.style.transition = `${duration}s ease-in-out`; // stop resize ???
819
+ this.res.style.transionProperty = `background, color`;
820
+ return this;
821
+ }
822
+
823
+ width(percentage){
824
+ this.res.style.width = percentage;
825
+ return this;
826
+ }
827
+
828
+ italic(){
829
+ this.res.style.fontStyle = "italic";
830
+ return this;
831
+ }
832
+
833
+
834
+ padding(L, T, R, B){
835
+
836
+ if (L && T && R && B){
837
+ this.res.style.paddingLeft = L;
838
+ this.res.style.paddingTop = T;
839
+ this.res.style.paddingRight = R;
840
+ this.res.style.paddingBottom = B;
841
+ } else {
842
+ this.res.style.padding = L;
843
+ }
844
+
845
+ return this;
846
+ }
847
+
848
+ medium() {
849
+ const adj = () => {
850
+ let query = window.matchMedia("(max-device-width: 415px)");
851
+ /* let query = window.matchMedia("(max-device-width: 415px)");
852
+ if (window.innerWidth < h || query.matches) {
853
+ } */
854
+
855
+ if (query.matches) {
856
+ this.res.style.fontSize = '2rem';
857
+ } else {
858
+ this.res.style.fontSize = '1.5em';
859
+ }
860
+ }
861
+
862
+ adj();
863
+ window.addEventListener("resize", adj);
864
+ return this;
865
+ }
866
+
867
+ opacity(o){
868
+ this.res.style.opacity = o;
869
+ return this;
870
+ }
871
+
872
+ margin(L, T, R, B){
873
+
874
+ if (L && T && R && B){
875
+ this.el.style.marginLeft = L;
876
+ this.el.style.marginTop = T;
877
+ this.el.style.marginRight = R;
878
+ this.el.style.marginBottom = B;
879
+ } else {
880
+ // alert("2")
881
+ this.el.style.margin = L;
882
+ }
883
+
884
+ return this;
885
+ }
886
+
887
+ /*
888
+ arrayMargin(px){
889
+ this.res.style.margin = px;
890
+ return this;
891
+ }*/
892
+
893
+ /* hover(back, fore){
894
+ this.prevColor = this.res.style.backgroundColor;
895
+ this.foreColor = this.res.style.color;
896
+
897
+ this.res.onmouseover = () => {
898
+ this.res.style.backgroundColor = `${back}`;
899
+ this.res.style.color = `${fore}`;
900
+ }
901
+
902
+ this.res.onmouseout = () => {
903
+ this.res.style.backgroundColor = `${this.prevColor}`;
904
+ this.res.style.color = `${this.foreColor}`;
905
+ }
906
+
907
+ return this;
908
+ } */
909
+
910
+ hover(obj){
911
+
912
+
913
+
914
+ if (obj.border){
915
+ //alert("IHO")
916
+ // // console.log("BORDERA IS ");
917
+ // // console.log(obj.border);
918
+
919
+ let w = obj.border.width;
920
+ this.res.style.border = w ? `${w}px solid transparent` : "1px solid transparent";
921
+
922
+ //this.res.style.border = "1px solid transparent";
923
+ }
924
+
925
+
926
+ let bops = this.options.borderObj;
927
+
928
+ if (bops){
929
+ //alert("PP")
930
+ this.res.style.border = `${bops.width}px solid ${bops.color}`;
931
+ }
932
+
933
+ this.prevColor = this.res.style.backgroundColor;
934
+ this.foreColor = this.res.style.color;
935
+ this.prevBorder = this.res.style.border;
936
+
937
+
938
+ /* if (obj.border){
939
+ //this.res.style.border = `1px solid transparent`;
940
+ if (obj.borderObj && obj.borderObj.width){ // fix here
941
+
942
+ let w = this.options.borderObj.width ?? 3;
943
+ this.res.style.border = `${w}px solid transparent`;
944
+
945
+ } else {
946
+ // 14:53:15 this was stupid
947
+ //this.res.style.border = `1px solid transparent`;
948
+
949
+
950
+ }
951
+
952
+ }*/
953
+
954
+
955
+
956
+ if (obj.animation) {
957
+
958
+ this.res.style.transition = `${obj.animation}`; //`${obj.animation}s ease-in-out`; // stop resize ???
959
+ this.res.style.transionProperty = `background, color`;
960
+ // this.transition(obj.animation);
961
+ }
962
+
963
+ this.res.onmouseout = () => {
964
+ // alert("OJHOIH")
965
+ this.res.style.backgroundColor = `${this.prevColor}`;
966
+ this.res.style.color = `${this.foreColor}`;
967
+ this.res.style.border = this.prevBorder;
968
+
969
+
970
+ /* if (obj.borderObj && obj.borderObj.width){
971
+
972
+ let w = this.options.borderObj.width ?? 3;
973
+ this.res.style.border = `${w}px solid transparent`;
974
+
975
+ } else {
976
+ //this.res.style.border = `1px solid transparent`;
977
+ }*/
978
+
979
+
980
+ /*if (obj.border){
981
+ this.res.style.border = "1px solid transparent";
982
+ }*/
983
+
984
+
985
+
986
+ // // // console.log(`OUT: ${this.res.style.backgroundColor}`);
987
+ }
988
+
989
+ this.res.onmouseover = () => {
990
+ //this.res.style.backgroundColor = "#ffffff"; //obj.background; //`#ffffff`;
991
+ //alert("OJHOIH")
992
+ // alert(obj.background);
993
+ this.res.style.color = obj.color;
994
+ this.res.style.backgroundColor = obj.background;
995
+
996
+ if (obj.border){
997
+ //alert("IHO")
998
+
999
+ let w = obj.border.width;
1000
+ let color = obj.border.color ?? "#2ECC71";
1001
+ //console.log("WO", w, color);
1002
+ //alert(obj.border.color);
1003
+ this.res.style.border = w ? `${w}px solid ${color}` : "1px solid #2ECC71";
1004
+ }
1005
+
1006
+ //if (this.options && this.options.borderObj){ was here
1007
+
1008
+ //let o = this.options.borderObj;
1009
+ //this.res.style.border = `${o.width}px solid ${o.color}`;
1010
+ //this.res.style.borderRadius = `${o.radius}`;
1011
+ //}
1012
+
1013
+ // // // console.log(`OVER: ${obj.background}`);
1014
+ }
1015
+
1016
+ return this;
1017
+ }
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+ em(n){
1025
+ let query = window.matchMedia("(max-device-width: 415px)");
1026
+
1027
+ const res = () => {
1028
+ if (query.matches) {
1029
+ this.res.style.fontSize = `2em`;
1030
+ } else {
1031
+ this.res.style.fontSize = `1em`;
1032
+ //alert("ONE 1 EMA!")
1033
+ }
1034
+ }
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+
1041
+ res();
1042
+ // window.onresize = res();
1043
+
1044
+
1045
+
1046
+ window.addEventListener("resize", res);
1047
+
1048
+
1049
+
1050
+ return this;
1051
+ }
1052
+
1053
+ margin(T, L, R, B){
1054
+ this.res.style.marginTop = T;
1055
+ this.res.style.marginLeft = L;
1056
+ this.res.style.marginRight = R;
1057
+ this.res.style.marginBottom = B;
1058
+ return this;
1059
+ }
1060
+
1061
+ font(family){
1062
+ this.res.style.fontFamily = family;
1063
+ return this;
1064
+ }
1065
+
1066
+
1067
+ render(div){
1068
+ // this.code.push("})");
1069
+
1070
+ /*if (this.options.id){
1071
+ this.res.setAttribute("id", this.options.id);
1072
+
1073
+ }*/
1074
+
1075
+ if (div){
1076
+ document.querySelector(div).appendChild(this.res);
1077
+ } else {
1078
+ return this.res;
1079
+ }
1080
+
1081
+ return this;
1082
+ }
1083
+ }
1084
+
1085
+ export { Link };