nodality 1.0.218 → 1.0.220
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 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.esm.js +1 -1
- package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/card-getter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-card.esm.js.LICENSE.txt +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/flex-row.esm.js.LICENSE.txt +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/floating-input.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.cjs.js +1 -1
- package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.esm.js +1 -1
- package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
- package/dist/image-picker.cjs.js +1 -1
- package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image-picker.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
- package/dist/link-getter.cjs.js +1 -1
- package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link-getter.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/meta-adder.cjs.js +1 -1
- package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
- package/dist/meta-adder.esm.js +1 -1
- package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
- package/dist/modal-2025.cjs.js +1 -1
- package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal-2025.esm.js +1 -1
- package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
- package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
- package/dist/side-bar.cjs.js +1 -1
- package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-bar.esm.js +1 -1
- package/dist/side-bar.esm.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/spacer.esm.js +1 -1
- package/dist/spacer.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.cjs.js.LICENSE.txt +1 -1
- package/dist/text-field.esm.js +1 -1
- package/dist/text-field.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/theme.cjs.js.LICENSE.txt +1 -1
- package/dist/theme.esm.js.LICENSE.txt +1 -1
- package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
- package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.cjs.js.LICENSE.txt +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
- package/layout/animator.js +53 -80
- package/layout/audio.js +1 -95
- package/layout/audionew.js +1 -4
- package/layout/base.js +3 -46
- package/layout/beta-desktop-bar.js +1 -12
- package/layout/beta-mobile-bar.js +1 -43
- package/layout/button.js +5 -87
- package/layout/center.js +1 -41
- package/layout/checkbox.js +6 -10
- package/layout/circle.js +1 -1
- package/layout/code.js +1 -11
- package/layout/container.js +1 -106
- package/layout/dropdown-2025.js +1 -3
- package/layout/flex-card.js +8 -38
- package/layout/flex-grid.js +2 -23
- package/layout/flex-row.js +5 -233
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -40
- package/layout/grid-switcher.js +1 -14
- package/layout/grid.js +1 -11
- package/layout/horizontal-scroller.js +1 -7
- package/layout/image.js +3 -217
- package/layout/index.js +1 -1
- package/layout/link.js +7 -281
- package/layout/list.js +1 -8
- package/layout/meta-adder.js +1 -3
- package/layout/modal-2025.js +1 -44
- package/layout/multiswitcher.js +1 -55
- package/layout/nav-bar.js +1 -29
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/new-nav-bar.js +1 -91
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -2
- package/layout/prerender.js +1 -2
- package/layout/progress.js +1 -3
- package/layout/row.js +1 -15
- package/layout/scroll-video.js +1 -4
- package/layout/side-bar.js +1 -11
- package/layout/side-nav-bar.js +1 -66
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -2
- package/layout/spacer.js +1 -8
- package/layout/stack.js +1 -3
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -6
- package/layout/table.js +1 -12
- package/layout/text-field.js +7 -17
- package/layout/text.js +1 -161
- package/layout/ulist.js +1 -13
- package/layout/video.js +1 -12
- package/layout/wrap.js +1 -50
- package/layout/zoom-card.js +1 -69
- package/lib/card-getter.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/raster-ops.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/package.json +1 -1
package/layout/grid-switcher.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -10,7 +10,6 @@ class AreaSwitcher {
|
|
|
10
10
|
this.gridContainer = document.createElement("div");
|
|
11
11
|
this.gridContainer.classList.add("grid-container");
|
|
12
12
|
this.gridContainer.style.display = "grid";
|
|
13
|
-
// this.gridContainer.style.gridAutoRows = "1fr"; EVIL LINE
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
set(obj){
|
|
@@ -54,10 +53,8 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
54
53
|
const outputString = withSpaceObj.map(row => `"${row}"`).join(" ");
|
|
55
54
|
this.gridContainer.style.gridTemplateAreas = outputString;
|
|
56
55
|
|
|
57
|
-
// this.gridContainer.style.border = `3px solid ${arr[i].color}`;
|
|
58
56
|
|
|
59
57
|
} else if (window.innerWidth > to) {
|
|
60
|
-
// this.gridContainer.style.border = `3px solid ${arr[arr.length - 1].color}`;
|
|
61
58
|
//alert("P")
|
|
62
59
|
// This always fires
|
|
63
60
|
let obj = arr[arr.length - 1].template;
|
|
@@ -70,7 +67,6 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
70
67
|
|
|
71
68
|
|
|
72
69
|
}
|
|
73
|
-
//return this;
|
|
74
70
|
}
|
|
75
71
|
reacta();
|
|
76
72
|
window.addEventListener("resize", reacta);
|
|
@@ -79,9 +75,6 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
79
75
|
|
|
80
76
|
add(items){
|
|
81
77
|
|
|
82
|
-
// let withSpaceObj = obj.map(str => str.split('').join(' '));
|
|
83
|
-
// const outputString = withSpaceObj.map(row => `"${row}"`).join(" ");
|
|
84
|
-
// this.gridContainer.style.gridTemplateAreas = outputString;//'"a a a" "b b b" "c d d" "c d d"';
|
|
85
78
|
// Function to generate alphabetic sequences
|
|
86
79
|
const generateAlphabeticSequence = (count) => {
|
|
87
80
|
const chars = [];
|
|
@@ -102,7 +95,6 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
102
95
|
|
|
103
96
|
for (let i = 0; i < items.length; i++) {
|
|
104
97
|
let e = items[i].render();
|
|
105
|
-
// e.style.border = "1px solid gray";
|
|
106
98
|
e.style.gridArea = els[i].toLowerCase(); // e.g., 'a', 'b', 'aa', 'ab', ...
|
|
107
99
|
|
|
108
100
|
const gridItem = document.createElement("div");
|
|
@@ -126,8 +118,6 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
126
118
|
}
|
|
127
119
|
|
|
128
120
|
// Usage example:
|
|
129
|
-
//const simpleGrid = new Simple();
|
|
130
|
-
//document.body.appendChild(simpleGrid.render());
|
|
131
121
|
|
|
132
122
|
|
|
133
123
|
class GridSwitcher {
|
|
@@ -152,7 +142,6 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
152
142
|
if ((mq || val.at == "default") && mq !== this.lastMq){
|
|
153
143
|
const update = new Simple().set(val.template, this.dynamicItems).render();
|
|
154
144
|
this.el = update;
|
|
155
|
-
// this.el.style.border = "1px solid black";
|
|
156
145
|
this.render(this.domStr);
|
|
157
146
|
this.lastMq = mq;
|
|
158
147
|
}
|
|
@@ -167,14 +156,12 @@ for (var i = 0; i < arr.length - 1; i++){
|
|
|
167
156
|
this.gridWrap.innerHTML = "";
|
|
168
157
|
this.gridWrap.appendChild(this.el);
|
|
169
158
|
|
|
170
|
-
// document.querySelector(div).removeChild(this.el);
|
|
171
159
|
if (div){
|
|
172
160
|
document.querySelector(div).appendChild(this.gridWrap);
|
|
173
161
|
}
|
|
174
162
|
|
|
175
163
|
return this.gridWrap;
|
|
176
164
|
|
|
177
|
-
// return this.el;
|
|
178
165
|
// Just return this.el it normally
|
|
179
166
|
}
|
|
180
167
|
}
|
package/layout/grid.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Animator} from "./animator.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
7
|
class Grid {
|
|
11
8
|
constructor(frs, saveEl) {
|
|
12
9
|
this.saveEl = saveEl;
|
|
@@ -38,7 +35,6 @@ class Grid {
|
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
|
|
41
|
-
|
|
42
38
|
size(w, h) {
|
|
43
39
|
if (w === "wide") {
|
|
44
40
|
this.res.style.width = "100%";
|
|
@@ -104,7 +100,6 @@ class Grid {
|
|
|
104
100
|
let count = obj.count;
|
|
105
101
|
let h = obj.width;
|
|
106
102
|
|
|
107
|
-
//let media = window.matchMedia(`(max-width: 600px)`);
|
|
108
103
|
let query = window.matchMedia("(max-device-width: 415px)");
|
|
109
104
|
|
|
110
105
|
if (window.innerWidth < h || query.matches) {
|
|
@@ -146,9 +141,4 @@ class Grid {
|
|
|
146
141
|
}
|
|
147
142
|
|
|
148
143
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
144
|
export { Grid };
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Animator} from "./animator.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
7
|
class HScroller {
|
|
11
8
|
constructor() {
|
|
12
9
|
this.setupa();
|
|
13
|
-
// this.seto();
|
|
14
10
|
|
|
15
11
|
}
|
|
16
12
|
|
|
@@ -48,7 +44,6 @@ class HScroller {
|
|
|
48
44
|
setup() {
|
|
49
45
|
|
|
50
46
|
|
|
51
|
-
// alert(this.e);
|
|
52
47
|
|
|
53
48
|
|
|
54
49
|
|
|
@@ -129,7 +124,6 @@ class HScroller {
|
|
|
129
124
|
return this.div;
|
|
130
125
|
}
|
|
131
126
|
|
|
132
|
-
// document.body.appendChild(this.div);
|
|
133
127
|
}
|
|
134
128
|
}
|
|
135
129
|
|
package/layout/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -15,26 +15,9 @@ class Image extends Animator {
|
|
|
15
15
|
this.code = [];
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
/* if (type == "exact" || type == "uncover"){
|
|
19
|
-
this.image(this.url, mode, type, "a", gcs);
|
|
20
|
-
} else {
|
|
21
|
-
this.setup();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (type === "exact"){ // Has to be there
|
|
26
|
-
const str = `new Image("${this.url}", "exact")`;
|
|
27
|
-
this.code.push(str);
|
|
28
|
-
} else if (type === "uncover"){ // Has to be there
|
|
29
|
-
const str = `new Image("${this.url}", "uncover")`;
|
|
30
|
-
this.code.push(str);
|
|
31
|
-
} else {
|
|
32
|
-
this.code.push(`new Image('${this.url}')`);
|
|
33
|
-
}*/
|
|
34
18
|
}
|
|
35
19
|
|
|
36
20
|
|
|
37
|
-
|
|
38
21
|
setType({url, type, mode}){
|
|
39
22
|
//alert("Thrice?");
|
|
40
23
|
|
|
@@ -56,7 +39,6 @@ class Image extends Animator {
|
|
|
56
39
|
}
|
|
57
40
|
|
|
58
41
|
|
|
59
|
-
|
|
60
42
|
hand(){
|
|
61
43
|
this.res.style.cursor = "hand";
|
|
62
44
|
return this;
|
|
@@ -64,24 +46,10 @@ class Image extends Animator {
|
|
|
64
46
|
|
|
65
47
|
|
|
66
48
|
|
|
67
|
-
|
|
68
|
-
getHeight(){
|
|
69
|
-
// // console.log(this.res.height);
|
|
70
|
-
return this.res.height;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
getWidth(){
|
|
74
|
-
// // console.log(this.res.width);
|
|
75
|
-
return this.res.width;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
49
|
getType(){ // 114145 anchor
|
|
79
50
|
return "HTMLImageElement";
|
|
80
51
|
}
|
|
81
52
|
|
|
82
|
-
/*toCode(){
|
|
83
|
-
return this.code;
|
|
84
|
-
}*/
|
|
85
53
|
|
|
86
54
|
toCode() {
|
|
87
55
|
// Capture the style properties applied to the image
|
|
@@ -118,10 +86,6 @@ let obj = options;
|
|
|
118
86
|
obj.onTap && this.onTap(obj.onTap);
|
|
119
87
|
|
|
120
88
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
89
|
let type = options.isFull;
|
|
126
90
|
|
|
127
91
|
|
|
@@ -160,34 +124,12 @@ let obj = options;
|
|
|
160
124
|
|
|
161
125
|
if (type === "exact"){ // Has to be there
|
|
162
126
|
const str = `new Image("${this.url}", "exact")`;
|
|
163
|
-
// this.code.push(str);
|
|
164
127
|
} else if (type === "uncover"){ // Has to be there
|
|
165
128
|
const str = `new Image("${this.url}", "uncover")`;
|
|
166
|
-
//this.code.push(str);
|
|
167
129
|
} else {
|
|
168
|
-
// this.code.push(`new Image('${this.url}')`);
|
|
169
130
|
}
|
|
170
131
|
|
|
171
132
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/*
|
|
183
|
-
obj.pad && this.pad(obj.pad);
|
|
184
|
-
// stra += // 2345 06/03 other file
|
|
185
|
-
obj.mar && this.mar(obj.mar);
|
|
186
|
-
obj.respad && this.respad(obj.respad);
|
|
187
|
-
obj.resmar && this.resmar(obj.resmar);
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
|
|
191
133
|
this.commonMethods(obj);
|
|
192
134
|
|
|
193
135
|
options.vtn && (this.res.style.viewTransitionName = options.vtn);
|
|
@@ -199,10 +141,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
199
141
|
options.index && (this.index = options.index);
|
|
200
142
|
options.index && (stra += `\n index: "${options.index}",`);
|
|
201
143
|
|
|
202
|
-
/*if (options.index === 0){ // condition no fire
|
|
203
|
-
//alert("not written here");
|
|
204
|
-
stra += `\n index: "0",`;
|
|
205
|
-
}*/
|
|
206
144
|
options.resprop && this.resprop(options.resprop);
|
|
207
145
|
|
|
208
146
|
if (options.centerSelf){
|
|
@@ -230,7 +168,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
230
168
|
options.as && this.as(options.as);
|
|
231
169
|
|
|
232
170
|
options.onScroll && this.onScroll(options.onScroll);
|
|
233
|
-
// options.fitContent && (this.res.style.objectFit = "contain");
|
|
234
171
|
|
|
235
172
|
options.class && (this.res.setAttribute("class", options.class));
|
|
236
173
|
|
|
@@ -243,16 +180,10 @@ obj.pad && this.pad(obj.pad);
|
|
|
243
180
|
stra += `\n gpos: ${this.removeQuotesFromFirstWord(JSON.stringify(options.gpos))}, `;
|
|
244
181
|
|
|
245
182
|
}
|
|
246
|
-
// options.gpos && alert(this.gposObject);
|
|
247
183
|
|
|
248
|
-
/*if (Object.keys(options).length > 0){
|
|
249
|
-
this.code.push(`\n .set({ \n}`);
|
|
250
|
-
}*/
|
|
251
184
|
|
|
252
185
|
// console.log(options);
|
|
253
186
|
|
|
254
|
-
//const opts = optsa.filter(el => el.op.name === "blast")[0];
|
|
255
|
-
// let filterObject = this.options.filtera.filter(a => a.op.name === "filter")[0];
|
|
256
187
|
// // console.log(filterObject);
|
|
257
188
|
|
|
258
189
|
if (options.filtera){ // smoke
|
|
@@ -271,7 +202,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
271
202
|
// console.warn(noiseObject);
|
|
272
203
|
// console.log(noiseObject.op.filter);
|
|
273
204
|
|
|
274
|
-
// this.setFilter(noiseObject);
|
|
275
205
|
|
|
276
206
|
let removed = this.removeQuotesFromFirstWord(JSON.stringify(noiseObject));
|
|
277
207
|
(stra += `\n filtera: ${removed}, \n`); // If I comment this out the filter should disappear!
|
|
@@ -281,7 +211,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
281
211
|
}
|
|
282
212
|
|
|
283
213
|
|
|
284
|
-
//options.filter && (this.res.style.filter = options.filter);
|
|
285
214
|
|
|
286
215
|
|
|
287
216
|
|
|
@@ -291,7 +220,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
291
220
|
|
|
292
221
|
options.isBackground && (this.isBackground = options.isBackground);
|
|
293
222
|
|
|
294
|
-
//options.zIndex && (this.res.style.zIndex = options.zIndex);
|
|
295
223
|
options.zIndex && (stra += `\n zIndex: "${options.zIndex}", \n`);
|
|
296
224
|
|
|
297
225
|
|
|
@@ -313,18 +241,12 @@ obj.pad && this.pad(obj.pad);
|
|
|
313
241
|
options.height && (stra += `height: "${options.height}", `);
|
|
314
242
|
|
|
315
243
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
244
|
options.maxWidth && this.maxWidth(options.maxWidth);
|
|
320
|
-
// options.maxWidth && this.code.push(`maxWidth: "${options.maxWidth}", \n`);
|
|
321
245
|
|
|
322
246
|
options.maxWidth && (stra += `maxWidth: "${options.maxWidth}", \n`);
|
|
323
247
|
|
|
324
|
-
// console.warn(this.res.style.width);
|
|
325
248
|
|
|
326
249
|
options.radius && this.cornerRadius(options.radius);
|
|
327
|
-
// options.radius && this.code.push(`radius: "${options.radius}"`);
|
|
328
250
|
|
|
329
251
|
|
|
330
252
|
options.radius && (stra += `radius: "${options.radius}", \n`);
|
|
@@ -338,7 +260,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
338
260
|
options.clipPath && (stra += `clipPath: "${options.clipPath}", \n`);
|
|
339
261
|
|
|
340
262
|
|
|
341
|
-
|
|
342
263
|
// console.log("261");
|
|
343
264
|
// console.warn(obj);
|
|
344
265
|
//----
|
|
@@ -400,16 +321,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
400
321
|
}
|
|
401
322
|
|
|
402
323
|
// Maybe just fill-in dynamically
|
|
403
|
-
/*let queries = [
|
|
404
|
-
{
|
|
405
|
-
range: obj.gradient[1].range, // This is BLAST
|
|
406
|
-
log: "blast"
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
range: obj.gradient[2].range, // This is GRADIENT
|
|
410
|
-
log: "gradient"
|
|
411
|
-
}
|
|
412
|
-
];*/
|
|
413
324
|
|
|
414
325
|
|
|
415
326
|
// Both only 600-650
|
|
@@ -418,15 +329,12 @@ obj.pad && this.pad(obj.pad);
|
|
|
418
329
|
|
|
419
330
|
|
|
420
331
|
// REDUNDANT?????
|
|
421
|
-
// window.addEventListener("resize", () => this.react(arr));
|
|
422
332
|
// console.log(arr);
|
|
423
333
|
|
|
424
334
|
|
|
425
335
|
// UNCOMMENT THIS !!!
|
|
426
|
-
// this.protoReact(arr, this.options.id);
|
|
427
336
|
|
|
428
337
|
//console.warn("CALLINGA BETA REACT");
|
|
429
|
-
// this.betaReact(arr, this.options.id);
|
|
430
338
|
this.chainReact(arr, this.options.id);
|
|
431
339
|
|
|
432
340
|
|
|
@@ -461,36 +369,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
461
369
|
}
|
|
462
370
|
|
|
463
371
|
|
|
464
|
-
setFilter(filter){
|
|
465
|
-
|
|
466
|
-
// console.log("ABBAC------------");
|
|
467
|
-
// console.log(filter);
|
|
468
|
-
let arr = [];
|
|
469
|
-
|
|
470
|
-
let ft = [filter]//obj.gradient.filter(el => el.op.name !== "layout");
|
|
471
|
-
// console.log(ft);
|
|
472
|
-
|
|
473
|
-
ft = ft.filter(el => el != undefined);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
// let arr = [];
|
|
479
|
-
|
|
480
|
-
for (var i = 0; i < ft.length; i++){
|
|
481
|
-
// console.log("Hello");
|
|
482
|
-
arr.push({
|
|
483
|
-
range: ft[i].range,
|
|
484
|
-
log: ft[i].op.name,
|
|
485
|
-
target: ft[i].target
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
//alert(arr.length);
|
|
490
|
-
|
|
491
|
-
//this.protoReact(arr)
|
|
492
|
-
}
|
|
493
|
-
|
|
494
372
|
|
|
495
373
|
|
|
496
374
|
setID(id){
|
|
@@ -499,8 +377,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
499
377
|
}
|
|
500
378
|
|
|
501
379
|
|
|
502
|
-
|
|
503
|
-
|
|
504
380
|
opacity(value){
|
|
505
381
|
this.res.style.opacity = `${value}`;
|
|
506
382
|
return this;
|
|
@@ -509,17 +385,9 @@ obj.pad && this.pad(obj.pad);
|
|
|
509
385
|
|
|
510
386
|
|
|
511
387
|
|
|
512
|
-
setArea(area){
|
|
513
|
-
this.res.style.gridArea = area;
|
|
514
|
-
return this;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
388
|
setGrid(){
|
|
520
389
|
this.res.style.gridRow = "span 2";
|
|
521
390
|
this.res.style.gridColumn= "span 3";
|
|
522
|
-
//this.res.style.gridColumn = "span 3";
|
|
523
391
|
return this;
|
|
524
392
|
}
|
|
525
393
|
|
|
@@ -539,27 +407,8 @@ obj.pad && this.pad(obj.pad);
|
|
|
539
407
|
this.res.setAttribute("class", name);
|
|
540
408
|
return this;
|
|
541
409
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
let previousWidth = this.res.style.width;
|
|
546
|
-
|
|
547
|
-
this.res.style.transition= "0.5s all";
|
|
548
|
-
// alert(previousWidth);
|
|
549
|
-
|
|
550
|
-
this.res.addEventListener("mouseover", () => {
|
|
551
|
-
let previousWidth = this.res.style.width;
|
|
552
|
-
this.res.style.transform = "scale(1.04)";
|
|
553
|
-
});
|
|
554
|
-
|
|
555
|
-
this.res.addEventListener("mouseout", () => {
|
|
556
|
-
let previousWidth = this.res.style.width;
|
|
557
|
-
this.res.style.transform = "scale(1.0)";
|
|
558
|
-
});
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
return this;
|
|
562
|
-
}
|
|
410
|
+
|
|
411
|
+
|
|
563
412
|
|
|
564
413
|
|
|
565
414
|
onTap(e) {
|
|
@@ -574,8 +423,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
574
423
|
}
|
|
575
424
|
|
|
576
425
|
|
|
577
|
-
|
|
578
|
-
|
|
579
426
|
mobileWidth(){
|
|
580
427
|
let query = window.matchMedia("(max-device-width: 415px)");
|
|
581
428
|
if (query.matches){
|
|
@@ -587,23 +434,14 @@ obj.pad && this.pad(obj.pad);
|
|
|
587
434
|
}
|
|
588
435
|
|
|
589
436
|
|
|
590
|
-
/*
|
|
591
|
-
if (type == "exact" || type == "uncover"){
|
|
592
|
-
this.image(this.url, mode);
|
|
593
|
-
} else {
|
|
594
|
-
this.setup();
|
|
595
|
-
}
|
|
596
|
-
*/
|
|
597
437
|
image(url, mode, type, vtn, gcs){
|
|
598
438
|
//alert(gcs);
|
|
599
439
|
//alert(mode);
|
|
600
440
|
//alert(value);
|
|
601
|
-
// this.el = null;
|
|
602
441
|
let query = window.matchMedia("(max-device-width: 415px)");
|
|
603
442
|
let back = document.createElement("div");
|
|
604
443
|
//alert(vtn);
|
|
605
444
|
back.style.viewTransitionName = vtn;
|
|
606
|
-
//back.style.backgroundColor = "#ecf0f1";
|
|
607
445
|
back.style.width = "100%";
|
|
608
446
|
back.style.height = this.options.height ? this.options.height : "400px";
|
|
609
447
|
|
|
@@ -621,7 +459,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
621
459
|
|
|
622
460
|
back.style.backgroundImage = `url(${url})`;
|
|
623
461
|
back.style.backgroundPosition = "center center";
|
|
624
|
-
// back.style.backgroundRepeatX = "no-repeat";
|
|
625
462
|
back.style.backgroundRepeat = "no-repeat";
|
|
626
463
|
|
|
627
464
|
back.style.backgroundSize = "cover";
|
|
@@ -631,12 +468,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
631
468
|
|
|
632
469
|
back.style.backgroundSize = "contain";
|
|
633
470
|
}
|
|
634
|
-
/*back.style.backgroundSize = "cover";
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
if (this.options.cover === false){
|
|
638
|
-
back.style.backgroundSize = "";
|
|
639
|
-
}*/
|
|
640
471
|
|
|
641
472
|
if (mode === "contain"){
|
|
642
473
|
//alert("J")
|
|
@@ -644,21 +475,15 @@ obj.pad && this.pad(obj.pad);
|
|
|
644
475
|
}
|
|
645
476
|
|
|
646
477
|
|
|
647
|
-
//back.style.borderTopLeftRadius = `${value}px`;
|
|
648
|
-
//back.style.borderTopRightRadius = `${value}px`;
|
|
649
478
|
|
|
650
479
|
this.res = back;
|
|
651
480
|
return this;
|
|
652
481
|
}
|
|
653
482
|
|
|
654
483
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
484
|
setup() {
|
|
659
485
|
let img = document.createElement("img");
|
|
660
486
|
img.style.width = "100%";
|
|
661
|
-
//img.style.height = "auto";
|
|
662
487
|
img.src = this.url;
|
|
663
488
|
this.res = img;
|
|
664
489
|
|
|
@@ -667,7 +492,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
667
492
|
}
|
|
668
493
|
|
|
669
494
|
|
|
670
|
-
|
|
671
495
|
float(dir){
|
|
672
496
|
this.res.style.float = `${dir}`;
|
|
673
497
|
return this;
|
|
@@ -693,8 +517,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
693
517
|
}
|
|
694
518
|
|
|
695
519
|
|
|
696
|
-
|
|
697
|
-
|
|
698
520
|
expand(obj){
|
|
699
521
|
|
|
700
522
|
|
|
@@ -705,7 +527,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
705
527
|
const convert = (value) => {
|
|
706
528
|
|
|
707
529
|
|
|
708
|
-
|
|
709
530
|
var convertedValue = value;
|
|
710
531
|
|
|
711
532
|
if ((value.includes("%")) || value.includes("px")){
|
|
@@ -714,7 +535,6 @@ obj.pad && this.pad(obj.pad);
|
|
|
714
535
|
}
|
|
715
536
|
|
|
716
537
|
|
|
717
|
-
|
|
718
538
|
if (value.includes("%")){
|
|
719
539
|
return Number(convertedValue / 100 * window.innerWidth);
|
|
720
540
|
}
|
|
@@ -759,21 +579,6 @@ if (mqa.matches){
|
|
|
759
579
|
return this;
|
|
760
580
|
}
|
|
761
581
|
|
|
762
|
-
/*center(w){
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
const adj = () => {
|
|
766
|
-
if (this.res.style.width != 0){
|
|
767
|
-
let count = window.innerWidth / 2 - (((w * window.innerWidth) / 100) / 2);
|
|
768
|
-
this.res.style.marginLeft = `${count}px`;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
adj();
|
|
774
|
-
window.onresize = adj();
|
|
775
|
-
return this;
|
|
776
|
-
}*/
|
|
777
582
|
|
|
778
583
|
width(w){
|
|
779
584
|
this.res.style.width = w;
|
|
@@ -829,7 +634,6 @@ if (mqa.matches){
|
|
|
829
634
|
}
|
|
830
635
|
|
|
831
636
|
|
|
832
|
-
|
|
833
637
|
|
|
834
638
|
|
|
835
639
|
|
|
@@ -869,20 +673,6 @@ svg.style.display = "block";
|
|
|
869
673
|
svg.style.width = "100%";
|
|
870
674
|
svg.style.height = "100%";
|
|
871
675
|
svg.style.overflow = "visible";
|
|
872
|
-
//this.res.style.position = "absolute";
|
|
873
|
-
|
|
874
|
-
/*
|
|
875
|
-
let path = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
876
|
-
path.setAttribute("d", pathData);
|
|
877
|
-
path.setAttribute("fill", "none");
|
|
878
|
-
path.setAttribute("stroke", "black");
|
|
879
|
-
path.setAttribute("stroke-width", "7");
|
|
880
|
-
path.setAttribute("viewBox", "0 0 700 700");
|
|
881
|
-
path.setAttribute("preserveAspectRatio", "xMidYMid meet");
|
|
882
|
-
|
|
883
|
-
svg.appendChild(path);
|
|
884
|
-
|
|
885
|
-
document.body.appendChild(svg);*/
|
|
886
676
|
|
|
887
677
|
|
|
888
678
|
return this;
|
|
@@ -890,12 +680,8 @@ document.body.appendChild(svg);*/
|
|
|
890
680
|
|
|
891
681
|
render(el) {
|
|
892
682
|
let ela = this.res;//document.createElement("div");
|
|
893
|
-
//ela.style.overflowX = "hidden";
|
|
894
|
-
//ela.style.overflowY = "hidden";
|
|
895
|
-
//ela.appendChild(this.res); // cannot move while loading
|
|
896
683
|
// apply to every element maybe through the
|
|
897
684
|
|
|
898
|
-
// let ela = this.res;
|
|
899
685
|
|
|
900
686
|
if (el) {
|
|
901
687
|
document.querySelector(el).appendChild(/*this.res*/ ela);
|
package/layout/index.js
CHANGED