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.
- package/dist/animator.cjs.js +1 -0
- package/dist/animator.esm.js +1 -0
- package/dist/audionew.cjs.js +1 -0
- package/dist/audionew.esm.js +1 -0
- package/dist/base.cjs.js +1 -0
- package/dist/base.esm.js +1 -0
- package/dist/betaDesktopBar.esm.js +1 -0
- package/dist/betaMobileBar.esm.js +1 -0
- package/dist/bundle.umd.js +1 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.esm.js +1 -0
- package/dist/cardGetter.cjs.js +1 -0
- package/dist/cardGetter.esm.js +1 -0
- package/dist/center.cjs.js +1 -0
- package/dist/center.esm.js +1 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.esm.js +1 -0
- package/dist/code.cjs.js +1 -0
- package/dist/code.esm.js +1 -0
- package/dist/container.cjs.js +1 -0
- package/dist/container.esm.js +1 -0
- package/dist/datalist.cjs.js +1 -0
- package/dist/datalist.esm.js +1 -0
- package/dist/designer.cjs.js +1 -0
- package/dist/designer.esm.js +1 -0
- package/dist/dropdown.cjs.js +1 -0
- package/dist/dropdown.esm.js +1 -0
- package/dist/elementMapper.cjs.js +1 -0
- package/dist/elementMapper.esm.js +1 -0
- package/dist/finalresult.esm.js +1 -0
- package/dist/flexCard.cjs.js +1 -0
- package/dist/flexCard.esm.js +1 -0
- package/dist/flexGrid.cjs.js +1 -0
- package/dist/flexGrid.esm.js +1 -0
- package/dist/flexRow.cjs.js +1 -0
- package/dist/flexRow.esm.js +1 -0
- package/dist/floatingInput.cjs.js +1 -0
- package/dist/floatingInput.esm.js +1 -0
- package/dist/free.cjs.js +1 -0
- package/dist/free.esm.js +1 -0
- package/dist/horizontalScroller.esm.js +1 -0
- package/dist/image.cjs.js +1 -0
- package/dist/image.esm.js +1 -0
- package/dist/imagePicker.cjs.js +1 -0
- package/dist/imagePicker.esm.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.esm.js +1 -0
- package/dist/link.cjs.js +1 -0
- package/dist/link.esm.js +1 -0
- package/dist/linkGetter.cjs.js +1 -0
- package/dist/linkGetter.esm.js +1 -0
- package/dist/metaAdder.cjs.js +1 -0
- package/dist/metaAdder.esm.js +1 -0
- package/dist/modal2025.cjs.js +1 -0
- package/dist/modal2025.esm.js +1 -0
- package/dist/multiswitchers.esm.js +1 -0
- package/dist/newNavBar.cjs.js +1 -0
- package/dist/newNavBar.esm.js +1 -0
- package/dist/picker.cjs.js +1 -0
- package/dist/picker.esm.js +1 -0
- package/dist/progress.cjs.js +1 -0
- package/dist/progress.esm.js +1 -0
- package/dist/radio.cjs.js +1 -0
- package/dist/radio.esm.js +1 -0
- package/dist/range.cjs.js +1 -0
- package/dist/range.esm.js +1 -0
- package/dist/sideBar.cjs.js +1 -0
- package/dist/sideBar.esm.js +1 -0
- package/dist/sideNavBar.cjs.js +1 -0
- package/dist/sideNavBar.esm.js +1 -0
- package/dist/simpleBar.cjs.js +1 -0
- package/dist/simpleBar.esm.js +1 -0
- package/dist/stack.cjs.js +1 -0
- package/dist/stack.esm.js +1 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.esm.js +1 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.esm.js +1 -0
- package/dist/textField.cjs.js +1 -0
- package/dist/textField.esm.js +1 -0
- package/dist/wrap.cjs.js +1 -0
- package/dist/wrap.esm.js +1 -0
- package/dist/zoomCard.cjs.js +1 -0
- package/dist/zoomCard.esm.js +1 -0
- package/layout/<head> +59 -0
- package/layout/DEADJOE +49 -0
- package/layout/DEPRECATED-PARAGRAPH.js +103 -0
- package/layout/animator.js +1915 -0
- package/layout/audio.js +145 -0
- package/layout/audionew.js +70 -0
- package/layout/base-2.js +92 -0
- package/layout/base.js +161 -0
- package/layout/betaDesktopBar.js +126 -0
- package/layout/betaMobileBar.js +293 -0
- package/layout/box.js +29 -0
- package/layout/button.js +516 -0
- package/layout/cards.js +136 -0
- package/layout/center.js +143 -0
- package/layout/checkbox.js +183 -0
- package/layout/cleanRow.js +775 -0
- package/layout/code.js +60 -0
- package/layout/container.js +1005 -0
- package/layout/custom.js +289 -0
- package/layout/divImage.js +209 -0
- package/layout/dropdown.js +154 -0
- package/layout/dropdown2025.js +152 -0
- package/layout/edit.sh +39 -0
- package/layout/emptyElement.js +21 -0
- package/layout/externalStylesheet.js +19 -0
- package/layout/flexCard.js +220 -0
- package/layout/flexGrid.js +192 -0
- package/layout/flexrow.js +866 -0
- package/layout/footer.js +83 -0
- package/layout/formComponents/custom.js +0 -0
- package/layout/formComponents/dataList.js +183 -0
- package/layout/formComponents/edit.sh +39 -0
- package/layout/formComponents/floatingInput.js +163 -0
- package/layout/formComponents/form-all.js +161 -0
- package/layout/formComponents/form.js +76 -0
- package/layout/formComponents/imagePicker.js +266 -0
- package/layout/formComponents/picker.js +208 -0
- package/layout/formComponents/radio.js +231 -0
- package/layout/formComponents/radiogroup.js +231 -0
- package/layout/formComponents/range.js +158 -0
- package/layout/free.js +232 -0
- package/layout/grid-new.js +299 -0
- package/layout/grid.js +190 -0
- package/layout/gridSwitcher.js +188 -0
- package/layout/group.js +163 -0
- package/layout/header.js +175 -0
- package/layout/hello.html +126 -0
- package/layout/horizontalScroller.js +222 -0
- package/layout/image-old.js +487 -0
- package/layout/image.js +1039 -0
- package/layout/index.js +183 -0
- package/layout/label.js +50 -0
- package/layout/link.js +1085 -0
- package/layout/list-OLD.js +0 -0
- package/layout/list.js +127 -0
- package/layout/metaAdder.js +17 -0
- package/layout/modal2025.js +142 -0
- package/layout/modernwrap.js +92 -0
- package/layout/multiswitcher.js +224 -0
- package/layout/multiswitcherBeta.js +63 -0
- package/layout/navBar-OLD.js +261 -0
- package/layout/navBar.js +371 -0
- package/layout/navFactor/customDiv.js +60 -0
- package/layout/navFactor/edit.sh +39 -0
- package/layout/newFlatAdder.js +41 -0
- package/layout/newNavBar copy 2.js +915 -0
- package/layout/newNavBar copy.js +774 -0
- package/layout/newNavBar.js +925 -0
- package/layout/offsetContainer.js +395 -0
- package/layout/progress.js +111 -0
- package/layout/remWin.sh +20 -0
- package/layout/row.js +208 -0
- package/layout/savedNewNavBar.js +437 -0
- package/layout/scrollvideo.js +120 -0
- package/layout/sideBar.js +183 -0
- package/layout/sideNavBar.js +313 -0
- package/layout/simpleBar.js +25 -0
- package/layout/slider2025.js +198 -0
- package/layout/spacer.js +44 -0
- package/layout/stack.js +76 -0
- package/layout/styler.js +113 -0
- package/layout/switcher.js +102 -0
- package/layout/table.js +155 -0
- package/layout/text.js +1685 -0
- package/layout/textField.js +282 -0
- package/layout/ulist.js +147 -0
- package/layout/video.js +70 -0
- package/layout/withoutNew.js +60 -0
- package/layout/wrap.js +140 -0
- package/layout/zoomCard.js +219 -0
- package/lib/cardGetter.js +80 -0
- package/lib/designer.js +875 -0
- package/lib/elementMapper.js +1428 -0
- package/lib/linkGetter.js +202 -0
- package/package.json +33 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import {Animator} from "./animator.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ZoomCard extends Animator {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
set(obj){
|
|
11
|
+
this.imageUrl = obj.url;
|
|
12
|
+
let stra = "";
|
|
13
|
+
this.createCard();
|
|
14
|
+
|
|
15
|
+
obj.useBrightness && (this.useBrightness = true);
|
|
16
|
+
obj.useBrightness && (stra += `\n useBrightness: ${this.useBrightness}`);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
obj.pad && this.pad(obj.pad);
|
|
21
|
+
obj.mar && this.mar(obj.mar);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
obj.arrayMargin && this.arrayMargin(obj.arrayMargin.sides, obj.arrayMargin.value);
|
|
25
|
+
//obj.arrayMargin && this.arrayMargin(obj.arrayMargin.sides, obj.arrayMargin.value);
|
|
26
|
+
obj.arrayMargin && (stra += `\n arrayMargin: {sides: [${obj.arrayMargin.sides.map(side => `"${side}", `)}], value: "${obj.arrayMargin.value}"},`); // 2345 06/03
|
|
27
|
+
|
|
28
|
+
obj.inpad && this.inpad(obj.inpad);
|
|
29
|
+
obj.inpad && (stra += `\n inpad: {${obj.inpad}}`);
|
|
30
|
+
|
|
31
|
+
obj.font && (this.res.style.fontFamily = obj.font);
|
|
32
|
+
obj.inpad && (stra += `\n font: ${obj.font}`);
|
|
33
|
+
|
|
34
|
+
this.addListeners();
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
inpad(pad){
|
|
41
|
+
this.res.children[1].style.boxSizing = "border-box";
|
|
42
|
+
this.res.children[1].style.padding = pad;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
items(arr){
|
|
47
|
+
for (var i = 0; i < arr.length; i++){
|
|
48
|
+
this.res.children[1].appendChild(arr[i].render());
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
createCard() {
|
|
55
|
+
// Create a new div element for the card
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
let stack = document.createElement("div");
|
|
59
|
+
stack.style.display = "grid";
|
|
60
|
+
stack.style.width = "300px";
|
|
61
|
+
stack.style.height = "400px";
|
|
62
|
+
stack.setAttribute("id", "AAA");
|
|
63
|
+
|
|
64
|
+
let card = document.createElement('div');
|
|
65
|
+
|
|
66
|
+
card.style.gridArea = "1/1";
|
|
67
|
+
|
|
68
|
+
// Set the CSS properties of the card
|
|
69
|
+
// card.style.width = '300px';
|
|
70
|
+
card.style.height = '400px';
|
|
71
|
+
card.style.borderRadius = '15px';
|
|
72
|
+
card.style.boxShadow = '0 4px 8px 0 rgba(0,0,0,0.2)';
|
|
73
|
+
card.style.overflow = "hidden";
|
|
74
|
+
|
|
75
|
+
let img = document.createElement("div");
|
|
76
|
+
img.style.width = "100%";
|
|
77
|
+
img.style.height = "100%";
|
|
78
|
+
img.style.transition = '0.9s';
|
|
79
|
+
img.style.backgroundImage = `url(${this.imageUrl})`;
|
|
80
|
+
img.style.backgroundSize = "cover";
|
|
81
|
+
img.style.backgroundPostion = "cover";
|
|
82
|
+
img.style.backgroundRepeat = 'no-repeat';
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
card.appendChild(img);
|
|
86
|
+
// Add a hover effect to make the background size larger
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
let div = document.createElement("div");
|
|
91
|
+
|
|
92
|
+
// div.appendChild(new Text("Hello").set({ fluidc: "S3", color: "green" }).render());
|
|
93
|
+
div.style.gridArea = "1/1";
|
|
94
|
+
div.style.zIndex = "1";
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
stack.appendChild(card);
|
|
98
|
+
stack.appendChild(div);
|
|
99
|
+
|
|
100
|
+
this.res = stack;
|
|
101
|
+
|
|
102
|
+
// Return the created card
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
addListeners(){
|
|
107
|
+
// alert(this.useBrightness);
|
|
108
|
+
let img = this.res.children[0].children[0];
|
|
109
|
+
// console.log("FIGHT");
|
|
110
|
+
// console.log(img);
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
this.res.onmouseover = () => {
|
|
114
|
+
|
|
115
|
+
// alert(this.useBrightness);
|
|
116
|
+
img.style.transform = 'scale(1.3)';
|
|
117
|
+
this.useBrightness && (img.style.filter = "brightness(31%)");
|
|
118
|
+
// this.style.backgroundSize = 'cover';
|
|
119
|
+
};
|
|
120
|
+
this.res.onmouseout = () => {
|
|
121
|
+
img.style.transform = 'scale(1.0)';
|
|
122
|
+
this.useBrightness && (img.style.filter = "brightness(100%)");
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
render(div) {
|
|
130
|
+
|
|
131
|
+
/*console.log("FINAL CSS");
|
|
132
|
+
console.log(this.css[0].range);
|
|
133
|
+
console.log(this.css[0].rules);
|
|
134
|
+
console.log(this.elCSS);
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
render(el) {
|
|
140
|
+
Array.from(this.res.children).forEach(e => e.style.padding = 0);
|
|
141
|
+
Array.from(this.res.children).forEach(e => e.style.margin = 0);
|
|
142
|
+
|
|
143
|
+
if (el) {
|
|
144
|
+
document.querySelector(el).appendChild(this.res);
|
|
145
|
+
} else {
|
|
146
|
+
return this.res;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
//Array.from(this.res.children).forEach(e => e.style.padding = 0);
|
|
155
|
+
//Array.from(this.res.children).forEach(e => e.style.margin = 0);
|
|
156
|
+
|
|
157
|
+
if (div) {
|
|
158
|
+
if (this.options.id){
|
|
159
|
+
|
|
160
|
+
this.res.setAttribute("id", this.options.id);
|
|
161
|
+
|
|
162
|
+
}
|
|
163
|
+
document.querySelector(div).appendChild(this.res);
|
|
164
|
+
} else {
|
|
165
|
+
|
|
166
|
+
return this.res;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
/*
|
|
178
|
+
|
|
179
|
+
class ZoomEffect {
|
|
180
|
+
constructor() {
|
|
181
|
+
this.zoomElement = this.createZoomElement();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
createZoomElement() {
|
|
185
|
+
// Create a new div element
|
|
186
|
+
let zoom = document.createElement('div');
|
|
187
|
+
|
|
188
|
+
// Set the CSS properties of the div
|
|
189
|
+
zoom.style.padding = '50px';
|
|
190
|
+
zoom.style.backgroundColor = 'green';
|
|
191
|
+
zoom.style.transition = 'transform .2s';
|
|
192
|
+
zoom.style.width = '200px';
|
|
193
|
+
zoom.style.height = '200px';
|
|
194
|
+
zoom.style.margin = '0 auto';
|
|
195
|
+
|
|
196
|
+
// Add a hover effect to scale the div
|
|
197
|
+
zoom.onmouseover = function() {
|
|
198
|
+
this.style.transform = 'scale(1.5)';
|
|
199
|
+
};
|
|
200
|
+
zoom.onmouseout = function() {
|
|
201
|
+
this.style.transform = 'scale(1)';
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// Return the created div
|
|
205
|
+
return zoom;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
appendToBody() {
|
|
209
|
+
// Append the div to the body of the document
|
|
210
|
+
document.body.appendChild(this.zoomElement);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Usage:
|
|
215
|
+
let zoomEffect = new ZoomEffect();
|
|
216
|
+
//zoomEffect.appendToBody();
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
export { ZoomCard };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
class CardGen {
|
|
2
|
+
|
|
3
|
+
static cards(el, cardOption, storage) {
|
|
4
|
+
console.log("PP");
|
|
5
|
+
console.log(storage);
|
|
6
|
+
|
|
7
|
+
let childStrings = [];
|
|
8
|
+
for (var o = 0; o < el.children.length; o++) {
|
|
9
|
+
let child = el.children[o];
|
|
10
|
+
|
|
11
|
+
if (child === "text") { // ChildStrings is mutated
|
|
12
|
+
this.insertTextToCard(childStrings, cardOption, el, storage);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (child === "image" && !el.backgroundCard){
|
|
16
|
+
// alert("Text");
|
|
17
|
+
childStrings.push(`\n new Image("https://upload.wikimedia.org/wikipedia/commons/3/3a/Starship_S20.jpg").set({})`)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (child === "link"){
|
|
21
|
+
// alert("Text");
|
|
22
|
+
if (cardOption.op){
|
|
23
|
+
childStrings.push(`\n ${storage.tabSpace(6)} ${storage.link[cardOption.op.theme.toLowerCase()].code}`);
|
|
24
|
+
} else {
|
|
25
|
+
childStrings.push(`\n ${storage.tabSpace(6)} ${storage.link["base"].code}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return childStrings;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
static insertTextToCard(childStrings, cardOption, el, storage){
|
|
36
|
+
if (cardOption.op) {
|
|
37
|
+
if (cardOption.op.ops && cardOption.op.ops.includes("text-blast")) {
|
|
38
|
+
let inputString = `\n ${storage.tabSpace(6)} ${storage.text[cardOption.op.theme.toLowerCase()].code}`;
|
|
39
|
+
let textToInsert = storage.ops[cardOption.op.theme.toLowerCase()].blast.code;
|
|
40
|
+
|
|
41
|
+
if (!el.backgroundCard) {
|
|
42
|
+
textToInsert = storage.ops[cardOption.op.theme.toLowerCase()].blastFun(1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let result = this.insertTextBetween(inputString, textToInsert);
|
|
46
|
+
childStrings.push(result);
|
|
47
|
+
} else {
|
|
48
|
+
childStrings.push(`\n ${storage.tabSpace(6)} ${storage.text[cardOption.op.theme.toLowerCase()].code}`);
|
|
49
|
+
}
|
|
50
|
+
} else {
|
|
51
|
+
childStrings.push(`\n ${storage.tabSpace(6)} ${storage.text["base"].code}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static insertTextBetween(inputString, textToInsert) {
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
// Regular expression to match the pattern
|
|
60
|
+
let regex = /(color: ".+?",)(.+?)(id: ".+?")/;
|
|
61
|
+
|
|
62
|
+
// Find the index of the match
|
|
63
|
+
let match = inputString.match(regex);
|
|
64
|
+
if (match) {
|
|
65
|
+
let index = match.index + match[0].length;
|
|
66
|
+
|
|
67
|
+
// Insert the text at the found index
|
|
68
|
+
let result = inputString.slice(0, index) + ', ' + textToInsert + ', ' + inputString.slice(index);
|
|
69
|
+
console.log("RETA");
|
|
70
|
+
console.log(result);
|
|
71
|
+
return result;
|
|
72
|
+
} else {
|
|
73
|
+
// If no match is found, return the original string
|
|
74
|
+
return inputString;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
export {CardGen};
|