nodality 1.0.188 → 1.0.190
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/bundle.umd.js +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/layout/animator.js +1 -1
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +1 -1
- package/layout/beta-mobile-bar.js +1 -1
- package/layout/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/clean-row.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/div-image.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/empty-element.js +1 -1
- package/layout/external-stylesheet.js +1 -1
- package/layout/flex-card.js +1 -1
- package/layout/flex-grid.js +1 -1
- package/layout/flex-row.js +1 -1
- package/layout/footer.js +1 -1
- 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 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +21 -2
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/meta-adder.js +1 -1
- package/layout/modal-2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/new-flat-adder.js +1 -1
- package/layout/new-nav-bar.js +77 -5
- package/layout/offset-container.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -1
- package/layout/prerender.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/saved-new-nav-bar.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/without-new.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- 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/center.js
CHANGED
package/layout/checkbox.js
CHANGED
package/layout/circle.js
CHANGED
package/layout/clean-row.js
CHANGED
package/layout/code.js
CHANGED
package/layout/container.js
CHANGED
package/layout/custom.js
CHANGED
package/layout/div-image.js
CHANGED
package/layout/dropdown-2025.js
CHANGED
package/layout/dropdown.js
CHANGED
package/layout/empty-element.js
CHANGED
package/layout/flex-card.js
CHANGED
package/layout/flex-grid.js
CHANGED
package/layout/flex-row.js
CHANGED
package/layout/footer.js
CHANGED
package/layout/free.js
CHANGED
package/layout/grid-new.js
CHANGED
package/layout/grid-switcher.js
CHANGED
package/layout/grid.js
CHANGED
package/layout/group.js
CHANGED
package/layout/header.js
CHANGED
package/layout/image-old.js
CHANGED
package/layout/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.190
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -154,7 +154,21 @@ let obj = options;
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
options.url && this.res.setAttribute("src", options.url);
|
|
157
|
-
|
|
157
|
+
|
|
158
|
+
// Responsive sources + loading hints. All optional, so images that
|
|
159
|
+
// don't pass them are byte-for-byte what they were before. Only
|
|
160
|
+
// meaningful when the element is a real <img> (the default setup),
|
|
161
|
+
// not the background-image path taken by "exact"/"uncover".
|
|
162
|
+
if (this.res.tagName === "IMG") {
|
|
163
|
+
options.srcset && this.res.setAttribute("srcset", options.srcset);
|
|
164
|
+
options.sizes && this.res.setAttribute("sizes", options.sizes);
|
|
165
|
+
options.alt !== undefined && this.res.setAttribute("alt", options.alt);
|
|
166
|
+
options.loading && this.res.setAttribute("loading", options.loading);
|
|
167
|
+
options.decoding && this.res.setAttribute("decoding", options.decoding);
|
|
168
|
+
options.fetchPriority &&
|
|
169
|
+
this.res.setAttribute("fetchpriority", options.fetchPriority);
|
|
170
|
+
}
|
|
171
|
+
|
|
158
172
|
options.id && this.res.setAttribute("id", options.id);
|
|
159
173
|
options.id && (stra += ` id: "${options.id}", \n`);
|
|
160
174
|
this.id = options.id;
|
|
@@ -225,6 +239,11 @@ obj.pad && this.pad(obj.pad);
|
|
|
225
239
|
options.objectFit && (this.res.style.objectFit = /*"cover")*/ options.objectFit);
|
|
226
240
|
options.objectFit && (stra += `\n objectFit: "${options.objectFit}",`);
|
|
227
241
|
|
|
242
|
+
// Companion to objectFit — chooses which part of a cropped image stays
|
|
243
|
+
// visible (e.g. "center 38%" to favour faces over foreground).
|
|
244
|
+
options.objectPosition && (this.res.style.objectPosition = options.objectPosition);
|
|
245
|
+
options.objectPosition && (stra += `\n objectPosition: "${options.objectPosition}",`);
|
|
246
|
+
|
|
228
247
|
|
|
229
248
|
options.as && this.as(options.as);
|
|
230
249
|
|
package/layout/index.js
CHANGED
package/layout/label.js
CHANGED
package/layout/link.js
CHANGED
package/layout/list-OLD.js
CHANGED
package/layout/list.js
CHANGED
package/layout/meta-adder.js
CHANGED
package/layout/modal-2025.js
CHANGED
package/layout/modernwrap.js
CHANGED
package/layout/multiswitcher.js
CHANGED
package/layout/nav-bar.js
CHANGED
package/layout/navBar-OLD.js
CHANGED
package/layout/new-flat-adder.js
CHANGED
package/layout/new-nav-bar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.190
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -187,6 +187,36 @@ class UINavBar extends Animator {
|
|
|
187
187
|
this.res.children[0].style.height = obj.height;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
// ── Presentation options ──────────────────────────────────────────
|
|
191
|
+
// Collected here and applied in render(), because the bar's inner
|
|
192
|
+
// wrappers are not created until items() runs. All are optional and
|
|
193
|
+
// unset by default, so existing bars render exactly as before.
|
|
194
|
+
//
|
|
195
|
+
// gap spacing between items (CSS length)
|
|
196
|
+
// justify justify-content on the item row
|
|
197
|
+
// alignItems align-items on the item row. Without it the row
|
|
198
|
+
// inherits `normal`, i.e. stretch: every item becomes
|
|
199
|
+
// full bar height and short text sits at the top of its
|
|
200
|
+
// box, so a plain link and a padded pill visibly
|
|
201
|
+
// misalign. Pass "center" for a conventional bar.
|
|
202
|
+
// barPad padding inside the bar itself
|
|
203
|
+
// maxWidth caps + centres the item row (page-width bars)
|
|
204
|
+
// borderBottom hairline under the bar
|
|
205
|
+
// ariaLabel label for the navigation landmark
|
|
206
|
+
this._ui = {
|
|
207
|
+
gap: obj.gap,
|
|
208
|
+
justify: obj.justify,
|
|
209
|
+
alignItems: obj.alignItems,
|
|
210
|
+
barPad: obj.barPad,
|
|
211
|
+
maxWidth: obj.maxWidth,
|
|
212
|
+
borderBottom: obj.borderBottom,
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Landmark semantics. Attributes only — no layout or DOM-shape change,
|
|
216
|
+
// so this is safe for every existing caller.
|
|
217
|
+
this.res.setAttribute("role", "navigation");
|
|
218
|
+
this.res.setAttribute("aria-label", obj.ariaLabel || "Primary");
|
|
219
|
+
|
|
190
220
|
return this;
|
|
191
221
|
}
|
|
192
222
|
|
|
@@ -401,7 +431,18 @@ class UINavBar extends Animator {
|
|
|
401
431
|
}
|
|
402
432
|
|
|
403
433
|
sticky() {
|
|
404
|
-
|
|
434
|
+
// Applied to the root wrapper, not the inner bar. `position: sticky`
|
|
435
|
+
// can only travel within its own parent's box, and the inner bar's
|
|
436
|
+
// parent is exactly bar-height — so sticking it there pins it for zero
|
|
437
|
+
// pixels and it scrolls straight off. The root is a direct child of the
|
|
438
|
+
// page container, which is what gives it room to stay pinned.
|
|
439
|
+
//
|
|
440
|
+
// `sticky` rather than the previous `fixed`: fixed takes the bar out of
|
|
441
|
+
// flow and the first section slides underneath it.
|
|
442
|
+
this.res.style.position = "sticky";
|
|
443
|
+
this.res.style.top = this.res.style.top || "0px";
|
|
444
|
+
this.res.style.zIndex = this.res.style.zIndex || 50;
|
|
445
|
+
this._sticky = true;
|
|
405
446
|
return this;
|
|
406
447
|
}
|
|
407
448
|
|
|
@@ -454,6 +495,12 @@ class UINavBar extends Animator {
|
|
|
454
495
|
|
|
455
496
|
var btn = document.createElement("button");
|
|
456
497
|
btn.setAttribute("id", "hamburger");
|
|
498
|
+
// Announce the control and its state. Attribute-only, so nothing about
|
|
499
|
+
// the existing visual behaviour changes.
|
|
500
|
+
btn.setAttribute("type", "button");
|
|
501
|
+
btn.setAttribute("aria-label", "Menu");
|
|
502
|
+
btn.setAttribute("aria-expanded", "false");
|
|
503
|
+
btn.setAttribute("aria-controls", "innerItemsWrapper");
|
|
457
504
|
btn.style.border = "none";
|
|
458
505
|
btn.style.fontWeight = "bold";
|
|
459
506
|
btn.style.position = "absolute"; // NEW
|
|
@@ -469,8 +516,9 @@ class UINavBar extends Animator {
|
|
|
469
516
|
|
|
470
517
|
btn.addEventListener("click", () => {
|
|
471
518
|
|
|
472
|
-
|
|
519
|
+
|
|
473
520
|
this.isShown = !this.isShown;
|
|
521
|
+
btn.setAttribute("aria-expanded", String(this.isShown));
|
|
474
522
|
|
|
475
523
|
this.hasAnimatedToWide = false;
|
|
476
524
|
|
|
@@ -851,8 +899,32 @@ class UINavBar extends Animator {
|
|
|
851
899
|
// This gets owervwritten, column fires
|
|
852
900
|
|
|
853
901
|
let myMedia = window.matchMedia(`(max-device-width: 415px)`);
|
|
854
|
-
|
|
855
|
-
|
|
902
|
+
// Resolve by id, with the historical index as a fallback: the
|
|
903
|
+
// wrappers sit at index 1 only when the hamburger occupies index 0.
|
|
904
|
+
let outerItemsWrapper =
|
|
905
|
+
this.res.querySelector("#outerItemsWrapper") ||
|
|
906
|
+
this.res.children[0].children[1];
|
|
907
|
+
let innerIW = outerItemsWrapper &&
|
|
908
|
+
(outerItemsWrapper.querySelector("#innerItemsWrapper") ||
|
|
909
|
+
outerItemsWrapper.children[0]);
|
|
910
|
+
|
|
911
|
+
// Apply the optional presentation settings from setup(). Each is
|
|
912
|
+
// skipped when unset, so bars that don't pass them are untouched.
|
|
913
|
+
const ui = this._ui || {};
|
|
914
|
+
if (innerIW) {
|
|
915
|
+
if (ui.gap) innerIW.style.gap = ui.gap;
|
|
916
|
+
if (ui.justify) innerIW.style.justifyContent = ui.justify;
|
|
917
|
+
if (ui.alignItems) innerIW.style.alignItems = ui.alignItems;
|
|
918
|
+
if (ui.barPad) innerIW.style.padding = ui.barPad;
|
|
919
|
+
if (ui.maxWidth) {
|
|
920
|
+
innerIW.style.maxWidth = ui.maxWidth;
|
|
921
|
+
innerIW.style.marginLeft = "auto";
|
|
922
|
+
innerIW.style.marginRight = "auto";
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
if (outerItemsWrapper && ui.borderBottom) {
|
|
926
|
+
outerItemsWrapper.style.borderBottom = ui.borderBottom;
|
|
927
|
+
}
|
|
856
928
|
|
|
857
929
|
// console.log("TEETH");
|
|
858
930
|
// console.log(outerItemsWrapper);
|
package/layout/polygon.js
CHANGED
package/layout/prerender-site.js
CHANGED
package/layout/prerender.js
CHANGED
package/layout/progress.js
CHANGED
package/layout/row.js
CHANGED
package/layout/scroll-video.js
CHANGED
package/layout/side-bar.js
CHANGED
package/layout/side-nav-bar.js
CHANGED
package/layout/simple-bar.js
CHANGED
package/layout/slider-2025.js
CHANGED