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
@@ -0,0 +1,143 @@
1
+ import {Animator} from "./animator.js";
2
+
3
+
4
+ class Center {
5
+ constructor(id){
6
+ // alert("RENAME CONTAINER IN CENTER.js");
7
+ this.setup(id);
8
+ }
9
+ setup(id){
10
+ let el = document.createElement("div");
11
+
12
+ if (id){
13
+ el.setAttribute("id", id);
14
+ }
15
+
16
+ el.style.display = "flex";
17
+ el.style.flexDirection = "column";
18
+ el.style.justifyContent = "center";
19
+ el.style.alignItems = "center";
20
+ el.style.width = "100%";
21
+ el.style.height = "auto";
22
+ el.style.margin = 0;
23
+ el.style.padding = 0;
24
+ this.res = el;
25
+ }
26
+
27
+ toCode(){
28
+ return [""]
29
+ }
30
+
31
+
32
+ items(els){
33
+ for (var i = 0; i < els.length; i++){
34
+ let item = els[i].render();//.render();
35
+ this.res.appendChild(item);
36
+ }
37
+
38
+ return this;
39
+ }
40
+
41
+ itemWidth(w){
42
+ for (var i = 0; i < this.res.childNodes.length; i++){
43
+ let el = this.res.childNodes[i];
44
+ el.style.width = w;
45
+ }
46
+
47
+ return this;
48
+ }
49
+
50
+
51
+ margin(L, T, R, B) {
52
+ if (L || T || R || B){ // CAUGHT MYSELF
53
+ this.res.style.marginLeft = L;
54
+ this.res.style.marginTop = T;
55
+ this.res.style.marginRight = R;
56
+ this.res.style.marginBottom = B;
57
+ }
58
+
59
+ if (!T && !R && !B){
60
+ alert("j")
61
+ this.res.style.margin = L;
62
+ }
63
+
64
+ return this;
65
+ }
66
+
67
+ arrayPadding(arr, value) {
68
+ if (arr.includes("left")){
69
+ this.res.style.paddingLeft = value;
70
+ }
71
+
72
+ if (arr.includes("right")){
73
+ this.res.style.paddingRight = value;
74
+ }
75
+
76
+ if (arr.includes("top")){
77
+ this.res.style.paddingTop = value;
78
+ }
79
+
80
+ if (arr.includes("bottom")){
81
+ this.res.style.paddingBottom = value;
82
+ }
83
+
84
+
85
+ return this;
86
+ }
87
+
88
+ itemWidth(w){
89
+ for (var i = 0; i < this.res.childNodes.length; i++){
90
+ let el = this.res.childNodes[i];
91
+ el.style.width = w;
92
+ }
93
+
94
+ return this;
95
+ }
96
+
97
+
98
+ margin(L, T, R, B) {
99
+ if (L || T || R || B){ // CAUGHT MYSELF
100
+ this.res.style.marginLeft = L;
101
+ this.res.style.marginTop = T;
102
+ this.res.style.marginRight = R;
103
+ this.res.style.marginBottom = B;
104
+ }
105
+
106
+ if (!T && !R && !B){
107
+ alert("j")
108
+ this.res.style.margin = L;
109
+ }
110
+
111
+ return this;
112
+ }
113
+
114
+ /*arrayPadding(arr, value) {
115
+ if (arr.includes("left")){
116
+ this.res.style.paddingLeft = value;
117
+ }
118
+
119
+ if (arr.includes("right")){
120
+ this.res.style.paddingRight = value;
121
+ }
122
+
123
+ if (arr.includes("top")){
124
+ this.res.style.paddingTop = value;
125
+ }
126
+
127
+ if (arr.includes("bottom")){
128
+ this.res.style.paddingBottom = value;
129
+ }
130
+
131
+
132
+ return this;
133
+ }*/
134
+
135
+ render(el) {
136
+ if (el) {
137
+ document.querySelector(el).appendChild(this.res);
138
+ } else {
139
+ return this.res;
140
+ }
141
+ }
142
+ }
143
+ export { Center };
@@ -0,0 +1,183 @@
1
+ import { Animator } from "./animator.js";
2
+
3
+ class Checkbox extends Animator {
4
+ constructor() {
5
+ super();
6
+ this.el = null;
7
+
8
+
9
+ }
10
+
11
+ set(obj) {
12
+ this.options = obj;
13
+
14
+ // Set default clipPath if not provided
15
+ //this.options.clipPath =
16
+ // this.options.clipPath; //|| "polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)";
17
+
18
+ // Create the container div
19
+ const div = document.createElement("div");
20
+ div.style.display = "flex";
21
+ div.style.alignItems = "center";
22
+
23
+ // Create the checkbox input
24
+ const input = document.createElement("input");
25
+ input.type = "checkbox";
26
+ input.style.position = "relative";
27
+ input.style.marginRight = "0.5rem";
28
+
29
+ // Set size and custom appearance
30
+ const size = obj.size || "24px";
31
+ input.style.width = size;
32
+ input.style.height = size;
33
+
34
+ if (obj.customStyle){
35
+ input.style.appearance = "none";
36
+ }
37
+
38
+ input.style.border = "2px solid #ccc";
39
+ input.style.borderRadius = "4px";
40
+ input.style.backgroundColor = obj.backgroundColor || "white";
41
+ input.style.cursor = "pointer";
42
+ input.style.transition = "background-color 0.2s ease, border-color 0.2s ease";
43
+
44
+ // Custom checkmark via ::after
45
+ input.style.display = "inline-block";
46
+ input.style.setProperty("--checked-bg-color", obj.checkedBackgroundColor || "#4CAF50");
47
+ input.style.setProperty("--checkmark-color", "white");
48
+ input.style.setProperty("--checkmark-clip-path", this.options.clipPath ?? "polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)");
49
+
50
+ const style = document.createElement("style");
51
+ style.textContent = `
52
+ input[type="checkbox"] {
53
+ appearance: none;
54
+ -webkit-appearance: none; /* For Safari */
55
+ width: var(--size, 24px);
56
+ height: var(--size, 24px);
57
+ border: 2px solid #ccc;
58
+ border-radius: 4px;
59
+ background-color: white;
60
+ position: relative;
61
+ cursor: pointer;
62
+ transition: background-color 0.2s ease, border-color 0.2s ease;
63
+ }
64
+
65
+ input[type="checkbox"]:checked {
66
+ background-color: var(--checked-bg-color, #4CAF50);
67
+ border-color: var(--checked-bg-color, #4CAF50);
68
+ }
69
+
70
+ input[type="checkbox"]::after {
71
+ content: '';
72
+ position: absolute;
73
+ width: 50%;
74
+ height: 50%;
75
+ top: 25%;
76
+ left: 25%;
77
+ transform: scale(0);
78
+ background-color: var(--checkmark-color, white);
79
+ clip-path: var(--checkmark-clip-path);
80
+ -webkit-clip-path: var(--checkmark-clip-path);
81
+ transition: transform 0.2s ease;
82
+ }
83
+
84
+ input[type="checkbox"]:checked::after {
85
+ transform: scale(1);
86
+ }
87
+ `;
88
+
89
+ if (obj.customStyle){
90
+ document.head.appendChild(style);
91
+ }
92
+
93
+ obj.mar && this.mar(obj.mar);
94
+ obj.pad && this.pad(obj.pad);
95
+ obj.respad && this.respad(obj.respad);
96
+ obj.resmar && this.resmar(obj.resmar);
97
+
98
+ // Event to toggle background and border
99
+ input.addEventListener("change", () => {
100
+ if (input.checked) {
101
+ input.style.backgroundColor = obj.checkedBackgroundColor || "#4CAF50";
102
+ input.style.borderColor = obj.checkedBackgroundColor || "#4CAF50";
103
+ } else {
104
+ input.style.backgroundColor = obj.backgroundColor || "white";
105
+ input.style.borderColor = "#ccc";
106
+ }
107
+ });
108
+
109
+ // Set name attribute if provided
110
+ if (obj.name) {
111
+ input.setAttribute("name", obj.name);
112
+ }
113
+
114
+ div.appendChild(input);
115
+
116
+ // Add label
117
+ const labelDiv = document.createElement("div");
118
+
119
+ if (typeof obj.label?.render === "function") {
120
+ labelDiv.appendChild(obj.label.render());
121
+ } else {
122
+ const labelText = document.createTextNode(obj.title || "Label");
123
+ labelDiv.appendChild(labelText);
124
+ }
125
+
126
+ // Apply label styles
127
+ labelDiv.style.opacity = 0.8;
128
+ labelDiv.style.transition = "opacity ease 0.2s, transform ease 0.2s";
129
+
130
+ div.appendChild(labelDiv);
131
+
132
+ this.el = div;
133
+ return this;
134
+ }
135
+
136
+ getValue() {
137
+ return this.el.children[0].checked;
138
+ }
139
+
140
+ toCode() {
141
+ /* let objString = JSON.stringify(this.options, null, 4);
142
+ objString = objString.replace(/"(\w+)"(?=\s*:)/g, '$1');
143
+ return [`new Checkbox().set(${objString})`];*/
144
+
145
+ const entries = Object.entries(this.options)
146
+ .map(([key, value]) => {
147
+ if (typeof value === "string") {
148
+ return `${key}: "${value}"`; // Wrap strings in quotes
149
+ } else if (typeof value === "object" && value !== null) {
150
+ if (typeof value.toCode === "function") {
151
+ // Call the object's toCode method if available
152
+ return `${key}: ${value.toCode()[0]}`;
153
+ } else {
154
+ // Fallback for plain objects
155
+ return `${key}: ${JSON.stringify(value, null, 4)}`;
156
+ }
157
+ } else {
158
+ return `${key}: ${value}`; // Handle numbers, booleans, etc.
159
+ }
160
+ })
161
+ .join(",\n ");
162
+
163
+
164
+ return [`new Checkbox().set({\n ${entries}\n})`];
165
+ }
166
+
167
+ margin(amount) {
168
+ this.el.style.margin = amount;
169
+ return this;
170
+ }
171
+
172
+ render(div) {
173
+ if (div) {
174
+ document.querySelector(div).appendChild(this.el);
175
+ } else {
176
+ return this.el;
177
+ }
178
+ }
179
+ }
180
+
181
+ // Export the class
182
+ window.Checkbox = Checkbox;
183
+ export { Checkbox };