nodality 1.3.19 → 1.3.21
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/bin/mcp-server.mjs +8 -3
- package/bin/nodality.mjs +41 -0
- 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 +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js +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.LICENSE.txt +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.d.ts +3 -2
- 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 +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js +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 +191 -135
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +7 -1
- package/layout/beta-mobile-bar.js +13 -3
- package/layout/button.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/dropdown-2025.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/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-overlay.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/link.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/morph.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/new-nav-bar.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/scroll-video.js +1 -1
- package/layout/shop.js +9 -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/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 +7 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/agent-surface.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/check-page.js +14 -2
- package/lib/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +23 -8
- package/lib/element-params.generated.js +4 -4
- package/lib/grid-geometry.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/known-inert.js +8 -9
- package/lib/link-getter.js +1 -1
- package/lib/morph-node.js +1 -1
- package/lib/normalize-spec.js +1 -1
- package/lib/parse-html.js +1 -1
- package/lib/raster-inspect.js +1 -1
- package/lib/raster-ops.js +1 -1
- package/lib/raster-presets.js +1 -1
- package/lib/resolve-refs.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/suggest.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/lib/transition.js +1 -1
- package/lib/validate-nodes.js +9 -2
- package/lib/webmcp-adapter.js +1 -1
- package/package.json +2 -1
- package/schema.json +10100 -2535
- package/scripts/generate-schema.mjs +83 -2
- package/skills/nodality/SKILL.md +16 -3
package/dist/zoom-card.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see zoom-card.esm.js.LICENSE.txt */
|
|
2
|
-
import{applyRasterPipeline as e}from"../lib/raster-ops.js";var t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n="nodality.theme.mode",i="nodality:theme",s={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(i,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(i,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(i,{detail:{mode:this.mode,tokens:this.current}}))}};function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw s}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}var f=new Set,p=function(){function t(){var e,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(e){if(e.transform||e.op){var t=e.op;if(e.transform||(t=e.op),!t||!Array.isArray(t.values))return void console.warn('[nodality] reactOnTransform: a transform node needs a `values` array, e.g. ["ty:-20px"] - ignored');t.duration||(t.duration="3s-ease-in-out"),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",o="",a="",l="",c="",u="",h="";if(0!==t.values.length){t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?o=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(h=e.replace("opacity:",""))}),r=i.setDefault(r),n=i.setDefault(n),s=i.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(f,", opacity ").concat(f);i.res.style.transition=p}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=d,i.res.style.opacity=h}else console.warn("[nodality] transform produced no geometric value - check `values`")}};t.on?i.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):i._on(window,"load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+o)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else console.warn("[nodality] reactOnTransform: unrecognised transform descriptor - ignored")},(r=d(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1};var o=this.set;if("function"==typeof o&&!o.__appliesId){var a=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=o.call.apply(o,[this,e].concat(r)),s=e&&e.id,a=this.res;return null!=s&&""!==s&&a&&"function"==typeof a.setAttribute&&!a.getAttribute("id")&&a.setAttribute("id",String(s)),e&&e.loop&&"object"===u(e.loop)&&this.loop(e.loop),i};a.__appliesId=!0,this.set=a}this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=s.subscribe(function(e){return i._applyTheme(e)}),Promise.resolve().then(function(){return i._applyTheme(s.mode)}))}return r=t,n=[{key:"rasterize",value:function(t){var r=this;if(t&&0!==t.length&&!this._rasterHandle&&!this._rasterCancelled&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var n=0,i=function(){if(!r._rasterHandle&&!r._rasterCancelled){if(r.res&&r.res.isConnected){try{r._rasterHandle=e(r.res,t)}catch(e){return void console.warn("[nodality] raster pipeline skipped:",e)}if(r._rasterHandle)return}++n<80&&(r._rasterTimer=setTimeout(i,50))}};this._rasterTimer=setTimeout(i,0),this._track(function(){return clearTimeout(r._rasterTimer)})}}},{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===u(e)?(this._themeMap=e,this._applyTheme(s.mode),this._themeUnsub||(this._themeUnsub=s.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"_track",value:function(e){return"function"!=typeof e||(this._disposables||(this._disposables=[])).push(e),e}},{key:"_on",value:function(e,t,r,n){return e&&"function"==typeof e.addEventListener?(e.addEventListener(t,r,n),this._track(function(){return e.removeEventListener(t,r,n)}),r):r}},{key:"destroy",value:function(){if("function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this._rasterHandle&&"function"==typeof this._rasterHandle.destroy)try{this._rasterHandle.destroy()}catch(e){}if(this._rasterHandle=null,this._rasterCancelled=!0,this._disposables){var e,t=a(this._disposables);try{for(t.s();!(e=t.n()).done;){var r=e.value;try{r()}catch(e){}}}catch(e){t.e(e)}finally{t.f()}this._disposables.length=0}return this._responsiveTasks=null,this._responsiveHandler=null,this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=s.defaults&&s.defaults[e];if(n)for(var i in this._themeOriginal||(this._themeOriginal={}),n)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=n[i])}}},{key:"vars",value:function(e){if(!e||"object"!==u(e))return this;for(var t in e)this.res.style.setProperty(t,String(e[t]));return this}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",color:"color",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",cols:"gridTemplateColumns",rows:"gridTemplateRows",areas:"gridTemplateAreas",area:"gridArea",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"},r=new Set(["radius","width","height","maxWidth","maxHeight","minWidth","minHeight","top","left","right","bottom","gap"]);for(var n in t)if(null!=e[n]){var i="number"==typeof e[n]&&0!==e[n]&&r.has(n)?"".concat(e[n],"px"):e[n];this.res.style[t[n]]=i}return"string"==typeof e.transform&&(this.res.style.transform=e.transform),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.borderObj&&e.borderObj.width&&this.borderObj(e.borderObj),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.vars&&this.vars(e.vars),e.keySet&&this.keySet(e.keySet),e.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.raster&&this.rasterize(e.raster),e.center&&this.center(e.center,{display:e.disp||e.display,flexDirection:e.flexDir||e.flexDirection}),e.transform&&"object"===u(e.transform)&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options&&this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transitionProperty="background-color, color, border, box-shadow, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",o=[];null!=e.transform&&o.push(e.transform),null!=e.scale&&o.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(o.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var i=function(){if("trn"!==e.value){var i=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=i:"scale"===e.value&&(t.res.style.transform="scale(".concat(i,")"))}else{for(var s={},o=["tx","ty"],a=0;a<o.length;a++){var l=o[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var h=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),d=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),f=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:h.num,max:d.num});s[l]="".concat(f).concat(h.unit)}}n(s)}};this._on(window,"scroll",i),0===e.from&&i()}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,this._on(window,"resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,r){var n=this;r&&"object"===u(r)?this.options=r:this.options&&"object"===u(this.options)||(this.options={});var i={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"],a={flexDir:"flexDirection",dir:"flexDirection",justify:"justifyContent",align:"alignItems",wrap:"flexWrap",bg:"background",radius:"borderRadius",z:"zIndex",exact:"fontSize"},l=function(e){var t=a[e]||e;return"undefined"==typeof console||"function"==typeof n[e]||t in n.res.style||console.warn('[nodality] resprop: "'.concat(e,'" is not a CSS property or component method — ignored.')+(a[e]?"":" Did you mean one of: ".concat(Object.keys(a).join(", "),"?"))),t};e.forEach(function(e){void 0!==i[e.breakpoint]?e.range=i[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var c=e.find(function(e){return"default"===e.breakpoint});c||(c={breakpoint:"default",range:i.default},e.unshift(c));var h=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||h.add(e)})}),h.forEach(function(e){void 0===c[e]&&(c[e]=n.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=t.viewportWidth(),i=c,a=0;a<e.length;a++){var u=e[a],d=o(u.range,2),f=d[0],p=d[1];if("default"!==u.breakpoint&&r>=f&&r<=p){i=u;break}}for(var y in h.forEach(function(e){if("keySet"===e){var t=c[e];t&&t.key&&(n.res.style[t.key]=t.value)}else n.res.style[l(e)]=c[e]}),i)if("exact"!==y){if(!s.includes(y)&&"range"!==y){var m=i[y];"keySet"===y&&m&&m.key?n.res.style[m.key]=m.value:"function"==typeof n[y]?n[y](m):n.res.style[l(y)]=m}}else n.res.style.fontSize=i[y]}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var i=e.find(function(e){return"default"===e.breakpoint});i||(i={breakpoint:"default",range:n.default},e.unshift(i)),void 0===i.values&&(i.values=this.options&&this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=t.viewportWidth(),s=i,a=0;a<e.length;a++){var l=e[a],c=o(l.range,2),u=c[0],h=c[1];if("default"!==l.breakpoint&&n>=u&&n<=h){s=l;break}}var d=void 0!==s.values?s.values:i.values;null!=d&&r.pad(d)}),this._setupResponsiveManager()}},{key:"resmar",value:function(e){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var i=e.find(function(e){return"default"===e.breakpoint});i||(i={breakpoint:"default",range:n.default},e.unshift(i)),void 0===i.values&&(i.values=this.options&&(this.options.mar||this.options.pad)||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=t.viewportWidth(),s=i,a=0;a<e.length;a++){var l=e[a],c=o(l.range,2),u=c[0],h=c[1];if("default"!==l.breakpoint&&n>=u&&n<=h){s=l;break}}var d=void 0!==s.values?s.values:i.values;null!=d&&r.mar(d)}),this._setupResponsiveManager()}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"loop",value:function(e){var t=this.res,r=e&&"object"===u(e)?e:{},n=Array.isArray(r.keyframes)?r.keyframes.filter(function(e){return e&&"object"===u(e)}):[];return!t||n.length<2?(n.length<2&&console.warn("nodality: loop needs at least two keyframes"),this):(this._loop&&"function"==typeof this._loop.cancel&&this._loop.cancel(),this._loop=null,"undefined"==typeof window||"function"!=typeof t.animate||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._loop=t.animate(n,{duration:Number(r.duration)>0?Number(r.duration):1e4,easing:r.easing||"linear",direction:r.direction||"normal",delay:Number(r.delay)||0,iterations:1/0})),this)}},{key:"radius",value:function(e){return this.res.style.borderRadius="number"==typeof e?"".concat(e,"px"):e,this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"scale",value:function(e){var t=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",function(){t.res.style.width,t.res.style.transform="scale(1.04)"}),this.res.addEventListener("mouseout",function(){t.res.style.width,t.res.style.transform="scale(1.0)"}),this}},{key:"round",value:function(e){return this.deprecatedOption("round()","radius()"),this.radius(e)}},{key:"toCSS",value:function(){return this.css}},{key:"toHTMLA",value:function(){return this.html}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"deprecatedOption",value:function(e,t){var r="nodality: `".concat(e,"` is deprecated — use `").concat(t,"` instead.");return f.has(r)||(f.add(r),console.error(r)),this}},{key:"center",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.res.style,n=r.display||t.display||"",i=r.flexDirection||t.flexDirection||"",s=!0===e||"both"===e||"x"===e,o=!0===e||"both"===e||"y"===e;if(n.includes("grid"))return s&&(r.justifyItems="center",r.justifyContent="center"),o&&(r.alignItems="center",r.alignContent="center"),this;n.includes("flex")||(r.display="flex"),r.flexDirection||(r.flexDirection=i||"column");var a=(r.flexDirection||"column").startsWith("column");return(a?o:s)&&(r.justifyContent="center"),(a?s:o)&&(r.alignItems="center"),this}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],s=e[t][i],o=0;o<i.length;o++)switch(i[o]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++){for(var i=r[n],s=e[t][i],o=0;o<i.length;o++)switch(i[o]){case"a":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"center"===i&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(i.includes("l")||i.includes("r"))&&(i.includes("l")&&(this.res.style.marginLeft="auto"),i.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);return t.min>t.max&&(n=(e-t.max)/(t.min-t.max)),r.min+(r.max-r.min)*n}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),void 0!==e.radius&&(this.res.style.borderRadius=e.radius),this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close}},{key:"chainReact",value:function(e,r,n){var i=this;this.ap=!1,this.cta=0,this.once=!1;var s,l=a(e);try{for(l.s();!(s=l.n()).done;){var c=s.value;c.range||(c.range=["0px","999999px"])}}catch(e){l.e(e)}finally{l.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var u=function(s){var l=t.viewportWidth(),c=[],u=[];i.resCopy=i.res,i.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var h,d=a(e);try{for(d.s();!(h=d.n()).done;){var f=h.value;i.counterIndex++;var p=o(f.range,2),y=p[0],m=p[1],v=parseInt(y),b=parseInt(m),g=!0;if(f.target){g=!1;for(var k=0;k<f.target.length;k++){var x=function(e){return"string"==typeof e&&"#"===e.charAt(0)?e.slice(1):e};x(f.target[k])===x(r)&&(g=!0)}}l>=v&&l<=b&&g&&(c.push(f.log),u.push(f),f.op&&f.op.margin&&(i.useMargin=f.op.margin))}}catch(e){d.e(e)}finally{d.f()}if(n&&!n.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",n&&!n.includes("border")&&(i.res.style.border=""),n&&!n.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(i.res.style.background=i.options.background),c.includes("gradient"),(c.includes("gradient")||c.includes("shadow"))&&(i.res.style.position="relative"),c.includes("blast")){var w,S=u.filter(function(e){return"blast"===e.log})[0].op.color,T=null!==(w=u.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==w?w:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof T?T+"px":T," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=S,i.res.style["-webkit-text-stroke-width"]="".concat(T))}if(c.includes("filter")){var _=u.filter(function(e){return"filter"===e.log})[0].op.filter;i.res.style.filter=_}if(c.includes("background")&&(i.res.style.backgroundColor="green"),c.includes("gradient")&&i.globalGradient&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),c.includes("shadow")){var O,C,j,E,W=i.options.shadow.op,A=null!==(O=W.steps)&&void 0!==O?O:1,I=null!==(C=W.colors)&&void 0!==C?C:["gray"],R=null!==(j=W.movements)&&void 0!==j?j:["3px","3px"],z=null!==(E=W.radius)&&void 0!==E?E:"3px";if(1===R.length&&(R=[R[0],R[0]]),"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var M=[],L=0;L<A;L++){var N,H=null!==(N=I[L])&&void 0!==N?N:I[0],P=R[0],B=R[1];M.push("".concat(P," ").concat(B," ").concat(z," ").concat(H))}i.res.style.boxShadow=M.join(", ")}else{for(var D=[],F=0;F<A;F++){var U,G=null!==(U=I[F])&&void 0!==U?U:I[0],Y=R[0],X=R[1];D.push("drop-shadow(".concat(Y," ").concat(X," ").concat(z," ").concat(G,")"))}i.res.style.filter=D.join(" ")}}if(c.includes("margin"))for(k=0;k<e.length;k++)if(e[k].op){var $=e[k].op.offsets;$&&void 0!==i.index&&(i.res.style.margin=$[Number(i.index)]+"px")}if(c.includes("spana")||c.includes("span")){var Z=document.createElement("div");if(Z.setAttribute("id","oroa"),Object.assign(Z.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),i.res&&i.res.querySelector("span"))return;i.res=i.resCopy,i.res.textContent="",i.options.span&&(Array.isArray(i.options.span)?i.options.span:[i.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=i.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,s=e.style||{};if(t<r.length){var o=r.indexOf(n,t);if(o>t){var a=r.substring(t,o);i.res.appendChild(new i.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=o+n.length}var l=new i.constructor(n).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();i.res.appendChild(l)}),t<r.length){var n=r.substring(t);i.res.appendChild(new i.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var q=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&s&&i.res.appendChild(q)}if(c.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var Q=i.options.animation.op;i._on(window,"sidebar:open",function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),i._on(window,"sidebar:closed",function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}),i.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(i._on(window,i.openTag,function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),i._on(window,i.closeTag,function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var V=i.options.animation.op;i.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(V.fireAt)&&(i.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",J))};i._on(window,"scroll",J)}if(i.options.animation&&"inview"===i.options.animation.op.fireAt){var K=i.options.animation.op;i.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var ee=!1,te=new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!ee&&(ee=!0,i.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})});te.observe(i.res),i._track(function(){return te.disconnect()})}}};this.options.animation||this._on(window,"resize",function(){return u()}),u()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(new RegExp('"([A-Za-z_$][A-Za-z0-9_$]*)"\\s*:',"g"),"$1:")}}],i=[{key:"viewportWidth",value:function(){if("undefined"==typeof window)return 0;var e=window.visualViewport;return e&&"number"==typeof e.width?e.width:window.innerWidth}}],n&&h(r.prototype,n),i&&h(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}();function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function v(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var x=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){return t=g(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}(this,e)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(e,p),t=e,(r=[{key:"set",value:function(e){return this.imageUrl=e.url,this.createCard(),e.useBrightness&&(this.useBrightness=!0),e.useBrightness&&"\n useBrightness: ".concat(this.useBrightness),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.inpad&&this.inpad(e.inpad),e.inpad&&"\n inpad: {".concat(e.inpad,"}"),e.font&&(this.res.style.fontFamily=e.font),e.inpad&&"\n font: ".concat(e.font),this.addListeners(),this}},{key:"inpad",value:function(e){return this.res.children[1].style.boxSizing="border-box",this.res.children[1].style.padding=e,this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.children[1].appendChild(e[t].render());return this}},{key:"createCard",value:function(){var e=document.createElement("div");e.style.display="grid",e.style.width="300px",e.style.height="400px",e.setAttribute("id","AAA");var t=document.createElement("div");t.style.gridArea="1/1",t.style.height="400px",t.style.borderRadius="15px",t.style.boxShadow="0 4px 8px 0 rgba(0,0,0,0.2)",t.style.overflow="hidden";var r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.style.transition="0.9s",r.style.backgroundImage="url(".concat(this.imageUrl,")"),r.style.backgroundSize="cover",r.style.backgroundPostion="cover",r.style.backgroundRepeat="no-repeat",t.appendChild(r);var n=document.createElement("div");return n.style.gridArea="1/1",n.style.zIndex="1",e.appendChild(t),e.appendChild(n),this.res=e,this}},{key:"addListeners",value:function(){var e=this,t=this.res.children[0].children[0];return this.res.onmouseover=function(){t.style.transform="scale(1.3)",e.useBrightness&&(t.style.filter="brightness(31%)")},this.res.onmouseout=function(){t.style.transform="scale(1.0)",e.useBrightness&&(t.style.filter="brightness(100%)")},this}},{key:"render",value:function(e){if(!e)return this.res;this.options.id&&this.res.setAttribute("id",this.options.id),document.querySelector(e).appendChild(this.res)}}])&&m(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{x as ZoomCard};
|
|
2
|
+
import{applyRasterPipeline as e}from"../lib/raster-ops.js";var t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n="nodality.theme.mode",i="nodality:theme",s={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(i,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(i,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(i,{detail:{mode:this.mode,tokens:this.current}}))}};function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw s}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h(n.key),n)}}function h(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}var f=new Set,p={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",color:"color",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",cols:"gridTemplateColumns",rows:"gridTemplateRows",areas:"gridTemplateAreas",area:"gridArea",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition",alignContent:"alignContent",alignItems:"alignItems",justifyContent:"justifyContent",justifyItems:"justifyItems",justifySelf:"justifySelf",aspectRatio:"aspectRatio",borderTop:"borderTop",borderRight:"borderRight",borderBottom:"borderBottom",borderLeft:"borderLeft",textDecoration:"textDecoration",objectFit:"objectFit",objectPosition:"objectPosition",weight:"fontWeight"},y=new Set(["radius","width","height","maxWidth","maxHeight","minWidth","minHeight","top","left","right","bottom","gap"]),m=function(){function t(){var e,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(e){if(e.transform||e.op){var t=e.op;if(e.transform||(t=e.op),!t||!Array.isArray(t.values))return void console.warn('[nodality] reactOnTransform: a transform node needs a `values` array, e.g. ["ty:-20px"] - ignored');t.duration||(t.duration="3s-ease-in-out"),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",o="",a="",l="",c="",u="",h="";if(0!==t.values.length){t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?o=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(h=e.replace("opacity:",""))}),r=i.setDefault(r),n=i.setDefault(n),s=i.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(f,", opacity ").concat(f);i.res.style.transition=p}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=d,i.res.style.opacity=h}else console.warn("[nodality] transform produced no geometric value - check `values`")}};t.on?i.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):i._on(window,"load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+o)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else console.warn("[nodality] reactOnTransform: unrecognised transform descriptor - ignored")},(r=h(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1};var o=this.set;if("function"==typeof o&&!o.__appliesId){var a=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=o.call.apply(o,[this,e].concat(r)),s=e&&e.id,a=this.res;return null!=s&&""!==s&&a&&"function"==typeof a.setAttribute&&!a.getAttribute("id")&&a.setAttribute("id",String(s)),e&&e.loop&&"object"===d(e.loop)&&this.loop(e.loop),i};a.__appliesId=!0,this.set=a}this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=s.subscribe(function(e){return i._applyTheme(e)}),Promise.resolve().then(function(){return i._applyTheme(s.mode)}))}return r=t,n=[{key:"rasterize",value:function(t){var r=this;if(t&&0!==t.length&&!this._rasterHandle&&!this._rasterCancelled&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var n=0,i=function(){if(!r._rasterHandle&&!r._rasterCancelled){if(r.res&&r.res.isConnected){try{r._rasterHandle=e(r.res,t)}catch(e){return void console.warn("[nodality] raster pipeline skipped:",e)}if(r._rasterHandle)return}++n<80&&(r._rasterTimer=setTimeout(i,50))}};this._rasterTimer=setTimeout(i,0),this._track(function(){return clearTimeout(r._rasterTimer)})}}},{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===d(e)?(this._themeMap=e,this._applyTheme(s.mode),this._themeUnsub||(this._themeUnsub=s.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"_track",value:function(e){return"function"!=typeof e||(this._disposables||(this._disposables=[])).push(e),e}},{key:"_on",value:function(e,t,r,n){return e&&"function"==typeof e.addEventListener?(e.addEventListener(t,r,n),this._track(function(){return e.removeEventListener(t,r,n)}),r):r}},{key:"destroy",value:function(){if("function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this._rasterHandle&&"function"==typeof this._rasterHandle.destroy)try{this._rasterHandle.destroy()}catch(e){}if(this._rasterHandle=null,this._rasterCancelled=!0,this._disposables){var e,t=a(this._disposables);try{for(t.s();!(e=t.n()).done;){var r=e.value;try{r()}catch(e){}}}catch(e){t.e(e)}finally{t.f()}this._disposables.length=0}return this._responsiveTasks=null,this._responsiveHandler=null,this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=s.defaults&&s.defaults[e];if(n)for(var i in this._themeOriginal||(this._themeOriginal={}),n)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=n[i])}}},{key:"vars",value:function(e){if(!e||"object"!==d(e))return this;for(var t in e)this.res.style.setProperty(t,String(e[t]));return this}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"applyStyleOptions",value:function(e){if(!e||!this.res)return this;for(var t in p)if(null!=e[t]){var r="number"==typeof e[t]&&0!==e[t]&&y.has(t)?"".concat(e[t],"px"):e[t];this.res.style[p[t]]=r}return this}},{key:"commonMethods",value:function(e){return this.applyStyleOptions(e),"string"==typeof e.transform&&(this.res.style.transform=e.transform),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.borderObj&&e.borderObj.width&&this.borderObj(e.borderObj),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.vars&&this.vars(e.vars),e.keySet&&this.keySet(e.keySet),e.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.raster&&this.rasterize(e.raster),e.center&&this.center(e.center,{display:e.disp||e.display,flexDirection:e.flexDir||e.flexDirection}),e.transform&&"object"===d(e.transform)&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options&&this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transitionProperty="background-color, color, border, box-shadow, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",o=[];null!=e.transform&&o.push(e.transform),null!=e.scale&&o.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(o.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var i=function(){if("trn"!==e.value){var i=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=i:"scale"===e.value&&(t.res.style.transform="scale(".concat(i,")"))}else{for(var s={},o=["tx","ty"],a=0;a<o.length;a++){var l=o[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var h=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),d=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),f=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:h.num,max:d.num});s[l]="".concat(f).concat(h.unit)}}n(s)}};this._on(window,"scroll",i),0===e.from&&i()}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,this._on(window,"resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,r){var n=this;r&&"object"===d(r)?this.options=r:this.options&&"object"===d(this.options)||(this.options={});var i={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"],a={flexDir:"flexDirection",dir:"flexDirection",justify:"justifyContent",align:"alignItems",wrap:"flexWrap",bg:"background",radius:"borderRadius",z:"zIndex",exact:"fontSize"},l=function(e){var t=a[e]||e;return"undefined"==typeof console||"function"==typeof n[e]||t in n.res.style||console.warn('[nodality] resprop: "'.concat(e,'" is not a CSS property or component method — ignored.')+(a[e]?"":" Did you mean one of: ".concat(Object.keys(a).join(", "),"?"))),t};e.forEach(function(e){void 0!==i[e.breakpoint]?e.range=i[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var c=e.find(function(e){return"default"===e.breakpoint});c||(c={breakpoint:"default",range:i.default},e.unshift(c));var u=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||u.add(e)})}),u.forEach(function(e){void 0===c[e]&&(c[e]=n.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=t.viewportWidth(),i=c,a=0;a<e.length;a++){var h=e[a],d=o(h.range,2),f=d[0],p=d[1];if("default"!==h.breakpoint&&r>=f&&r<=p){i=h;break}}for(var y in u.forEach(function(e){if("keySet"===e){var t=c[e];t&&t.key&&(n.res.style[t.key]=t.value)}else n.res.style[l(e)]=c[e]}),i)if("exact"!==y){if(!s.includes(y)&&"range"!==y){var m=i[y];"keySet"===y&&m&&m.key?n.res.style[m.key]=m.value:"function"==typeof n[y]?n[y](m):n.res.style[l(y)]=m}}else n.res.style.fontSize=i[y]}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var i=e.find(function(e){return"default"===e.breakpoint});i||(i={breakpoint:"default",range:n.default},e.unshift(i)),void 0===i.values&&(i.values=this.options&&this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=t.viewportWidth(),s=i,a=0;a<e.length;a++){var l=e[a],c=o(l.range,2),u=c[0],h=c[1];if("default"!==l.breakpoint&&n>=u&&n<=h){s=l;break}}var d=void 0!==s.values?s.values:i.values;null!=d&&r.pad(d)}),this._setupResponsiveManager()}},{key:"resmar",value:function(e){var r=this,n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var i=e.find(function(e){return"default"===e.breakpoint});i||(i={breakpoint:"default",range:n.default},e.unshift(i)),void 0===i.values&&(i.values=this.options&&(this.options.mar||this.options.pad)||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var n=t.viewportWidth(),s=i,a=0;a<e.length;a++){var l=e[a],c=o(l.range,2),u=c[0],h=c[1];if("default"!==l.breakpoint&&n>=u&&n<=h){s=l;break}}var d=void 0!==s.values?s.values:i.values;null!=d&&r.mar(d)}),this._setupResponsiveManager()}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"loop",value:function(e){var t=this.res,r=e&&"object"===d(e)?e:{},n=Array.isArray(r.keyframes)?r.keyframes.filter(function(e){return e&&"object"===d(e)}):[];return!t||n.length<2?(n.length<2&&console.warn("nodality: loop needs at least two keyframes"),this):(this._loop&&"function"==typeof this._loop.cancel&&this._loop.cancel(),this._loop=null,"undefined"==typeof window||"function"!=typeof t.animate||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||(this._loop=t.animate(n,{duration:Number(r.duration)>0?Number(r.duration):1e4,easing:r.easing||"linear",direction:r.direction||"normal",delay:Number(r.delay)||0,iterations:1/0})),this)}},{key:"radius",value:function(e){return this.res.style.borderRadius="number"==typeof e?"".concat(e,"px"):e,this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"scale",value:function(e){var t=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",function(){t.res.style.width,t.res.style.transform="scale(1.04)"}),this.res.addEventListener("mouseout",function(){t.res.style.width,t.res.style.transform="scale(1.0)"}),this}},{key:"round",value:function(e){return this.deprecatedOption("round()","radius()"),this.radius(e)}},{key:"toCSS",value:function(){return this.css}},{key:"toHTMLA",value:function(){return this.html}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"deprecatedOption",value:function(e,t){var r="nodality: `".concat(e,"` is deprecated — use `").concat(t,"` instead.");return f.has(r)||(f.add(r),console.error(r)),this}},{key:"center",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.res.style,n=r.display||t.display||"",i=r.flexDirection||t.flexDirection||"",s=!0===e||"both"===e||"x"===e,o=!0===e||"both"===e||"y"===e;if(n.includes("grid"))return s&&(r.justifyItems="center",r.justifyContent="center"),o&&(r.alignItems="center",r.alignContent="center"),this;n.includes("flex")||(r.display="flex"),r.flexDirection||(r.flexDirection=i||"column");var a=(r.flexDirection||"column").startsWith("column");return(a?o:s)&&(r.justifyContent="center"),(a?s:o)&&(r.alignItems="center"),this}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],s=e[t][i],o=0;o<i.length;o++)switch(i[o]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++){for(var i=r[n],s=e[t][i],o=0;o<i.length;o++)switch(i[o]){case"a":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"center"===i&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(i.includes("l")||i.includes("r"))&&(i.includes("l")&&(this.res.style.marginLeft="auto"),i.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);return t.min>t.max&&(n=(e-t.max)/(t.min-t.max)),r.min+(r.max-r.min)*n}},{key:"gpos",value:function(e){return e&&null!=e.col&&(this.res.style.gridColumn=e.col),e&&null!=e.row&&(this.res.style.gridRow=e.row),this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),void 0!==e.radius&&(this.res.style.borderRadius=e.radius),this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close}},{key:"chainReact",value:function(e,r,n){var i=this;this.ap=!1,this.cta=0,this.once=!1;var s,l=a(e);try{for(l.s();!(s=l.n()).done;){var c=s.value;c.range||(c.range=["0px","999999px"])}}catch(e){l.e(e)}finally{l.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var u=function(s){var l=t.viewportWidth(),c=[],u=[];i.resCopy=i.res,i.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var h,d=a(e);try{for(d.s();!(h=d.n()).done;){var f=h.value;i.counterIndex++;var p=o(f.range,2),y=p[0],m=p[1],v=parseInt(y),b=parseInt(m),g=!0;if(f.target){g=!1;for(var k=0;k<f.target.length;k++){var x=function(e){return"string"==typeof e&&"#"===e.charAt(0)?e.slice(1):e};x(f.target[k])===x(r)&&(g=!0)}}l>=v&&l<=b&&g&&(c.push(f.log),u.push(f),f.op&&f.op.margin&&(i.useMargin=f.op.margin))}}catch(e){d.e(e)}finally{d.f()}if(n&&!n.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",n&&!n.includes("border")&&(i.res.style.border=""),n&&!n.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(i.res.style.background=i.options.background),c.includes("gradient"),(c.includes("gradient")||c.includes("shadow"))&&(i.res.style.position="relative"),c.includes("blast")){var w,S=u.filter(function(e){return"blast"===e.log})[0].op.color,T=null!==(w=u.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==w?w:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof T?T+"px":T," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=S,i.res.style["-webkit-text-stroke-width"]="".concat(T))}if(c.includes("filter")){var _=u.filter(function(e){return"filter"===e.log})[0].op.filter;i.res.style.filter=_}if(c.includes("background")&&(i.res.style.backgroundColor="green"),c.includes("gradient")&&i.globalGradient&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),c.includes("shadow")){var j,C,O,E,W=i.options.shadow.op,A=null!==(j=W.steps)&&void 0!==j?j:1,I=null!==(C=W.colors)&&void 0!==C?C:["gray"],R=null!==(O=W.movements)&&void 0!==O?O:["3px","3px"],z=null!==(E=W.radius)&&void 0!==E?E:"3px";if(1===R.length&&(R=[R[0],R[0]]),"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var L=[],M=0;M<A;M++){var P,N=null!==(P=I[M])&&void 0!==P?P:I[0],B=R[0],H=R[1];L.push("".concat(B," ").concat(H," ").concat(z," ").concat(N))}i.res.style.boxShadow=L.join(", ")}else{for(var D=[],F=0;F<A;F++){var U,G=null!==(U=I[F])&&void 0!==U?U:I[0],Y=R[0],X=R[1];D.push("drop-shadow(".concat(Y," ").concat(X," ").concat(z," ").concat(G,")"))}i.res.style.filter=D.join(" ")}}if(c.includes("margin"))for(k=0;k<e.length;k++)if(e[k].op){var $=e[k].op.offsets;$&&void 0!==i.index&&(i.res.style.margin=$[Number(i.index)]+"px")}if(c.includes("spana")||c.includes("span")){var Z=document.createElement("div");if(Z.setAttribute("id","oroa"),Object.assign(Z.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),i.res&&i.res.querySelector("span"))return;i.res=i.resCopy,i.res.textContent="",i.options.span&&(Array.isArray(i.options.span)?i.options.span:[i.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=i.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,s=e.style||{};if(t<r.length){var o=r.indexOf(n,t);if(o>t){var a=r.substring(t,o);i.res.appendChild(new i.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=o+n.length}var l=new i.constructor(n).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();i.res.appendChild(l)}),t<r.length){var n=r.substring(t);i.res.appendChild(new i.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var q=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&s&&i.res.appendChild(q)}if(c.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var Q=i.options.animation.op;i._on(window,"sidebar:open",function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),i._on(window,"sidebar:closed",function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}),i.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(i._on(window,i.openTag,function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),i._on(window,i.closeTag,function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var V=i.options.animation.op;i.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(V.fireAt)&&(i.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",J))};i._on(window,"scroll",J)}if(i.options.animation&&"inview"===i.options.animation.op.fireAt){var K=i.options.animation.op;i.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var ee=!1,te=new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!ee&&(ee=!0,i.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})});te.observe(i.res),i._track(function(){return te.disconnect()})}}};this.options.animation||this._on(window,"resize",function(){return u()}),u()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(new RegExp('"([A-Za-z_$][A-Za-z0-9_$]*)"\\s*:',"g"),"$1:")}}],i=[{key:"viewportWidth",value:function(){if("undefined"==typeof window)return 0;var e=window.visualViewport;return e&&"number"==typeof e.width?e.width:window.innerWidth}}],n&&u(r.prototype,n),i&&u(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,i}();function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var S=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){return t=x(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,k()?Reflect.construct(t,r||[],x(e).constructor):t.apply(e,r))}(this,e)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(e,m),t=e,(r=[{key:"set",value:function(e){return this.imageUrl=e.url,this.createCard(),e.useBrightness&&(this.useBrightness=!0),e.useBrightness&&"\n useBrightness: ".concat(this.useBrightness),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.inpad&&this.inpad(e.inpad),e.inpad&&"\n inpad: {".concat(e.inpad,"}"),e.font&&(this.res.style.fontFamily=e.font),e.inpad&&"\n font: ".concat(e.font),this.addListeners(),this}},{key:"inpad",value:function(e){return this.res.children[1].style.boxSizing="border-box",this.res.children[1].style.padding=e,this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.children[1].appendChild(e[t].render());return this}},{key:"createCard",value:function(){var e=document.createElement("div");e.style.display="grid",e.style.width="300px",e.style.height="400px",e.setAttribute("id","AAA");var t=document.createElement("div");t.style.gridArea="1/1",t.style.height="400px",t.style.borderRadius="15px",t.style.boxShadow="0 4px 8px 0 rgba(0,0,0,0.2)",t.style.overflow="hidden";var r=document.createElement("div");r.style.width="100%",r.style.height="100%",r.style.transition="0.9s",r.style.backgroundImage="url(".concat(this.imageUrl,")"),r.style.backgroundSize="cover",r.style.backgroundPostion="cover",r.style.backgroundRepeat="no-repeat",t.appendChild(r);var n=document.createElement("div");return n.style.gridArea="1/1",n.style.zIndex="1",e.appendChild(t),e.appendChild(n),this.res=e,this}},{key:"addListeners",value:function(){var e=this,t=this.res.children[0].children[0];return this.res.onmouseover=function(){t.style.transform="scale(1.3)",e.useBrightness&&(t.style.filter="brightness(31%)")},this.res.onmouseout=function(){t.style.transform="scale(1.0)",e.useBrightness&&(t.style.filter="brightness(100%)")},this}},{key:"render",value:function(e){if(!e)return this.res;this.options.id&&this.res.setAttribute("id",this.options.id),document.querySelector(e).appendChild(this.res)}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{S as ZoomCard};
|
package/layout/animator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.21
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -20,6 +20,168 @@ export function resetDeprecationNotices() {
|
|
|
20
20
|
notified.clear();
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// ── Style options ────────────────────────────────────────────────────
|
|
24
|
+
//
|
|
25
|
+
// The CSS-named options every component accepts: option name → style
|
|
26
|
+
// property. Lived inside commonMethods until 1.3.21, which hid it twice over:
|
|
27
|
+
// the schema generator, which credits options a component reads by name,
|
|
28
|
+
// never saw a key read through this map, so `get_schema p` omitted
|
|
29
|
+
// `lineHeight` and the validator reported working options as PARAM_NOT_ON_TYPE
|
|
30
|
+
// ("accepted and ignored") — and components that do not run commonMethods
|
|
31
|
+
// (the nav bars, the shop elements) could not apply them at all. Pages fell
|
|
32
|
+
// back to keySet for properties the library already had.
|
|
33
|
+
const STYLE_OPTIONS = {
|
|
34
|
+
// ── Typography / sizing (pre-existing) ─────────────────────────
|
|
35
|
+
exact: "fontSize",
|
|
36
|
+
cursor: "cursor",
|
|
37
|
+
width: "width",
|
|
38
|
+
maxWidth: "maxWidth",
|
|
39
|
+
height: "height",
|
|
40
|
+
maxHeight: "maxHeight",
|
|
41
|
+
radius: "borderRadius",
|
|
42
|
+
lineHeight: "lineHeight",
|
|
43
|
+
background: "background",
|
|
44
|
+
// `color` was missing while `background` was present, so a
|
|
45
|
+
// component that styles itself ONLY through commonMethods could be
|
|
46
|
+
// given a background but not a text colour. Picker was exactly
|
|
47
|
+
// that: `new Picker().set({ color: "#0d1117" })` silently did
|
|
48
|
+
// nothing and the <select> fell back to the browser's black, while
|
|
49
|
+
// a TextField beside it — which handles obj.color itself — took
|
|
50
|
+
// the colour. The two rendered differently from identical options.
|
|
51
|
+
//
|
|
52
|
+
// Components that already handle obj.color (Text, Link, Image,
|
|
53
|
+
// Wrapper, Button) now simply set the same property to the same
|
|
54
|
+
// value. Containers that never handled it (FlexGrid, FlexRow,
|
|
55
|
+
// Center, UList) gain it, where it was previously a silent no-op.
|
|
56
|
+
color: "color",
|
|
57
|
+
font: "fontFamily",
|
|
58
|
+
opacity: "opacity",
|
|
59
|
+
gap: "gap",
|
|
60
|
+
minHeight: "minHeight",
|
|
61
|
+
|
|
62
|
+
// ── Positioning ────────────────────────────────────────────────
|
|
63
|
+
position: "position",
|
|
64
|
+
inset: "inset",
|
|
65
|
+
top: "top",
|
|
66
|
+
right: "right",
|
|
67
|
+
bottom: "bottom",
|
|
68
|
+
left: "left",
|
|
69
|
+
zIndex: "zIndex",
|
|
70
|
+
|
|
71
|
+
// ── Flex item / wrapping ───────────────────────────────────────
|
|
72
|
+
flex: "flex",
|
|
73
|
+
flexShrink: "flexShrink",
|
|
74
|
+
flexGrow: "flexGrow",
|
|
75
|
+
flexBasis: "flexBasis",
|
|
76
|
+
flexWrap: "flexWrap",
|
|
77
|
+
alignSelf: "alignSelf",
|
|
78
|
+
// `display` accepts any value: "inline-flex", "grid", "block", etc.
|
|
79
|
+
display: "display",
|
|
80
|
+
|
|
81
|
+
// ── Grid ───────────────────────────────────────────────────────
|
|
82
|
+
gridTemplateColumns: "gridTemplateColumns",
|
|
83
|
+
gridTemplateRows: "gridTemplateRows",
|
|
84
|
+
rowGap: "rowGap",
|
|
85
|
+
columnGap: "columnGap",
|
|
86
|
+
// Extended 2026-08-11 — the shell vocabulary `bones` speaks, so a
|
|
87
|
+
// generated grid needs no keySet. `cols`/`rows` are short names for
|
|
88
|
+
// the two above; `areas` had no option at all, and `area` existed
|
|
89
|
+
// only on the three components that happened to dispatch it
|
|
90
|
+
// themselves (Wrapper, Text, Image) — those now set the same
|
|
91
|
+
// property to the same value, and everything else gains it.
|
|
92
|
+
//@ cols {css-track-list}: grid-template-columns, verbatim — e.g. "240px 1fr".
|
|
93
|
+
cols: "gridTemplateColumns",
|
|
94
|
+
//@ rows {css-track-list}: grid-template-rows, verbatim.
|
|
95
|
+
rows: "gridTemplateRows",
|
|
96
|
+
//@ areas {css-areas}: grid-template-areas, verbatim — e.g. '"nav main" "nav main"'.
|
|
97
|
+
areas: "gridTemplateAreas",
|
|
98
|
+
//@ area {text}: This element's grid-area — the name of a cell declared in the parent's `areas`.
|
|
99
|
+
area: "gridArea",
|
|
100
|
+
|
|
101
|
+
// ── Typography (extended) ──────────────────────────────────────
|
|
102
|
+
letterSpacing: "letterSpacing",
|
|
103
|
+
textTransform: "textTransform",
|
|
104
|
+
whiteSpace: "whiteSpace",
|
|
105
|
+
// Wrapping behaviour for long words. `overflowWrap: "break-word"` (or
|
|
106
|
+
// "anywhere") lets a label that's longer than its flex-shrunken cell
|
|
107
|
+
// break mid-word instead of overflowing horizontally.
|
|
108
|
+
overflowWrap: "overflowWrap",
|
|
109
|
+
wordBreak: "wordBreak",
|
|
110
|
+
wordWrap: "wordWrap",
|
|
111
|
+
|
|
112
|
+
// ── Shadows / effects ──────────────────────────────────────────
|
|
113
|
+
boxShadow: "boxShadow",
|
|
114
|
+
backdropFilter: "backdropFilter",
|
|
115
|
+
WebkitBackdropFilter: "WebkitBackdropFilter",
|
|
116
|
+
|
|
117
|
+
// ── Overflow ───────────────────────────────────────────────────
|
|
118
|
+
overflow: "overflow",
|
|
119
|
+
overflowX: "overflowX",
|
|
120
|
+
overflowY: "overflowY",
|
|
121
|
+
WebkitOverflowScrolling: "WebkitOverflowScrolling",
|
|
122
|
+
WebkitTapHighlightColor: "WebkitTapHighlightColor",
|
|
123
|
+
|
|
124
|
+
// ── Sizing (extended) ──────────────────────────────────────────
|
|
125
|
+
minWidth: "minWidth",
|
|
126
|
+
boxSizing: "boxSizing",
|
|
127
|
+
|
|
128
|
+
// ── Pointer / selection ────────────────────────────────────────
|
|
129
|
+
pointerEvents: "pointerEvents",
|
|
130
|
+
userSelect: "userSelect",
|
|
131
|
+
WebkitUserSelect: "WebkitUserSelect",
|
|
132
|
+
|
|
133
|
+
// ── Convenience extras ─────────────────────────────────────────
|
|
134
|
+
// textAlign here lets non-Text classes (Wrapper, FlexRow) align
|
|
135
|
+
// child text without falling through to keySet. Text already
|
|
136
|
+
// exposes `align` separately.
|
|
137
|
+
textAlign: "textAlign",
|
|
138
|
+
transition: "transition",
|
|
139
|
+
// ── Added in 1.3.21: the properties pages still reached for keySet for ──
|
|
140
|
+
// Grid and flex alignment, side borders, aspect ratio and text decoration.
|
|
141
|
+
// With these, a page can say every property the suitcase site used as an
|
|
142
|
+
// option, so keySet is left for what no option names.
|
|
143
|
+
alignContent: "alignContent",
|
|
144
|
+
alignItems: "alignItems",
|
|
145
|
+
justifyContent: "justifyContent",
|
|
146
|
+
justifyItems: "justifyItems",
|
|
147
|
+
justifySelf: "justifySelf",
|
|
148
|
+
aspectRatio: "aspectRatio",
|
|
149
|
+
borderTop: "borderTop",
|
|
150
|
+
borderRight: "borderRight",
|
|
151
|
+
borderBottom: "borderBottom",
|
|
152
|
+
borderLeft: "borderLeft",
|
|
153
|
+
textDecoration: "textDecoration",
|
|
154
|
+
objectFit: "objectFit",
|
|
155
|
+
objectPosition: "objectPosition",
|
|
156
|
+
// Font weight. Was applied only inside commonMethods (beside `bold`), so
|
|
157
|
+
// the nav bars and shop elements, which do not run commonMethods, had no
|
|
158
|
+
// way to take it. `bold` still wins where both are given.
|
|
159
|
+
weight: "fontWeight",
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// Apply styles safely
|
|
163
|
+
// A bare number where CSS wants a length is dropped by the CSSOM without
|
|
164
|
+
// a word, so `radius: 12` did nothing while `radius: "12px"` worked — and
|
|
165
|
+
// the documentation promised the opposite ("a bare number, not a CSS
|
|
166
|
+
// length"). Rather than correct the docs to match an awkward behaviour,
|
|
167
|
+
// the number is read as pixels, which is what every caller meant.
|
|
168
|
+
const PIXELS_WHEN_BARE = new Set([
|
|
169
|
+
"radius", "width", "height", "maxWidth", "maxHeight", "minWidth",
|
|
170
|
+
"minHeight", "top", "left", "right", "bottom", "gap",
|
|
171
|
+
]);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The style options present on an element spec — what a mapper forwards to a
|
|
175
|
+
* component that builds its own options object (the nav bars, the shop
|
|
176
|
+
* elements) so that the element's own CSS-named options still reach it.
|
|
177
|
+
*/
|
|
178
|
+
function styleOptionsOf(el) {
|
|
179
|
+
const out = {};
|
|
180
|
+
if (!el || typeof el !== "object") return out;
|
|
181
|
+
for (const key in STYLE_OPTIONS) if (el[key] != null) out[key] = el[key];
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
|
|
23
185
|
class Animator {
|
|
24
186
|
|
|
25
187
|
constructor(){
|
|
@@ -249,138 +411,29 @@ class Animator {
|
|
|
249
411
|
height, maxHeight,
|
|
250
412
|
|
|
251
413
|
*/
|
|
252
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Apply the CSS-named options (STYLE_OPTIONS) present on `obj`. Run by
|
|
416
|
+
* commonMethods; callable on its own by components that build their own
|
|
417
|
+
* options and would otherwise skip them.
|
|
418
|
+
*/
|
|
419
|
+
applyStyleOptions(obj){
|
|
420
|
+
if (!obj || !this.res) return this;
|
|
421
|
+
for (const key in STYLE_OPTIONS) {
|
|
422
|
+
if (obj[key] != null) {
|
|
423
|
+
const value = (typeof obj[key] === "number" && obj[key] !== 0 && PIXELS_WHEN_BARE.has(key))
|
|
424
|
+
? `${obj[key]}px`
|
|
425
|
+
: obj[key];
|
|
426
|
+
this.res.style[STYLE_OPTIONS[key]] = value;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return this;
|
|
430
|
+
}
|
|
253
431
|
|
|
254
|
-
|
|
255
|
-
// Extended 2026-04-27 — first-class CSS props so callers don't need keySet.
|
|
256
|
-
// Categories: positioning, flex-item, grid, typography, shadows/effects,
|
|
257
|
-
// overflow, sizing, pointer/selection.
|
|
258
|
-
const styleMap = {
|
|
259
|
-
// ── Typography / sizing (pre-existing) ─────────────────────────
|
|
260
|
-
exact: "fontSize",
|
|
261
|
-
cursor: "cursor",
|
|
262
|
-
width: "width",
|
|
263
|
-
maxWidth: "maxWidth",
|
|
264
|
-
height: "height",
|
|
265
|
-
maxHeight: "maxHeight",
|
|
266
|
-
radius: "borderRadius",
|
|
267
|
-
lineHeight: "lineHeight",
|
|
268
|
-
background: "background",
|
|
269
|
-
// `color` was missing while `background` was present, so a
|
|
270
|
-
// component that styles itself ONLY through commonMethods could be
|
|
271
|
-
// given a background but not a text colour. Picker was exactly
|
|
272
|
-
// that: `new Picker().set({ color: "#0d1117" })` silently did
|
|
273
|
-
// nothing and the <select> fell back to the browser's black, while
|
|
274
|
-
// a TextField beside it — which handles obj.color itself — took
|
|
275
|
-
// the colour. The two rendered differently from identical options.
|
|
276
|
-
//
|
|
277
|
-
// Components that already handle obj.color (Text, Link, Image,
|
|
278
|
-
// Wrapper, Button) now simply set the same property to the same
|
|
279
|
-
// value. Containers that never handled it (FlexGrid, FlexRow,
|
|
280
|
-
// Center, UList) gain it, where it was previously a silent no-op.
|
|
281
|
-
color: "color",
|
|
282
|
-
font: "fontFamily",
|
|
283
|
-
opacity: "opacity",
|
|
284
|
-
gap: "gap",
|
|
285
|
-
minHeight: "minHeight",
|
|
286
|
-
|
|
287
|
-
// ── Positioning ────────────────────────────────────────────────
|
|
288
|
-
position: "position",
|
|
289
|
-
inset: "inset",
|
|
290
|
-
top: "top",
|
|
291
|
-
right: "right",
|
|
292
|
-
bottom: "bottom",
|
|
293
|
-
left: "left",
|
|
294
|
-
zIndex: "zIndex",
|
|
295
|
-
|
|
296
|
-
// ── Flex item / wrapping ───────────────────────────────────────
|
|
297
|
-
flex: "flex",
|
|
298
|
-
flexShrink: "flexShrink",
|
|
299
|
-
flexGrow: "flexGrow",
|
|
300
|
-
flexBasis: "flexBasis",
|
|
301
|
-
flexWrap: "flexWrap",
|
|
302
|
-
alignSelf: "alignSelf",
|
|
303
|
-
// `display` accepts any value: "inline-flex", "grid", "block", etc.
|
|
304
|
-
display: "display",
|
|
305
|
-
|
|
306
|
-
// ── Grid ───────────────────────────────────────────────────────
|
|
307
|
-
gridTemplateColumns: "gridTemplateColumns",
|
|
308
|
-
gridTemplateRows: "gridTemplateRows",
|
|
309
|
-
rowGap: "rowGap",
|
|
310
|
-
columnGap: "columnGap",
|
|
311
|
-
// Extended 2026-08-11 — the shell vocabulary `bones` speaks, so a
|
|
312
|
-
// generated grid needs no keySet. `cols`/`rows` are short names for
|
|
313
|
-
// the two above; `areas` had no option at all, and `area` existed
|
|
314
|
-
// only on the three components that happened to dispatch it
|
|
315
|
-
// themselves (Wrapper, Text, Image) — those now set the same
|
|
316
|
-
// property to the same value, and everything else gains it.
|
|
317
|
-
//@ cols {css-track-list}: grid-template-columns, verbatim — e.g. "240px 1fr".
|
|
318
|
-
cols: "gridTemplateColumns",
|
|
319
|
-
//@ rows {css-track-list}: grid-template-rows, verbatim.
|
|
320
|
-
rows: "gridTemplateRows",
|
|
321
|
-
//@ areas {css-areas}: grid-template-areas, verbatim — e.g. '"nav main" "nav main"'.
|
|
322
|
-
areas: "gridTemplateAreas",
|
|
323
|
-
//@ area {text}: This element's grid-area — the name of a cell declared in the parent's `areas`.
|
|
324
|
-
area: "gridArea",
|
|
325
|
-
|
|
326
|
-
// ── Typography (extended) ──────────────────────────────────────
|
|
327
|
-
letterSpacing: "letterSpacing",
|
|
328
|
-
textTransform: "textTransform",
|
|
329
|
-
whiteSpace: "whiteSpace",
|
|
330
|
-
// Wrapping behaviour for long words. `overflowWrap: "break-word"` (or
|
|
331
|
-
// "anywhere") lets a label that's longer than its flex-shrunken cell
|
|
332
|
-
// break mid-word instead of overflowing horizontally.
|
|
333
|
-
overflowWrap: "overflowWrap",
|
|
334
|
-
wordBreak: "wordBreak",
|
|
335
|
-
wordWrap: "wordWrap",
|
|
336
|
-
|
|
337
|
-
// ── Shadows / effects ──────────────────────────────────────────
|
|
338
|
-
boxShadow: "boxShadow",
|
|
339
|
-
backdropFilter: "backdropFilter",
|
|
340
|
-
WebkitBackdropFilter: "WebkitBackdropFilter",
|
|
341
|
-
|
|
342
|
-
// ── Overflow ───────────────────────────────────────────────────
|
|
343
|
-
overflow: "overflow",
|
|
344
|
-
overflowX: "overflowX",
|
|
345
|
-
overflowY: "overflowY",
|
|
346
|
-
WebkitOverflowScrolling: "WebkitOverflowScrolling",
|
|
347
|
-
WebkitTapHighlightColor: "WebkitTapHighlightColor",
|
|
348
|
-
|
|
349
|
-
// ── Sizing (extended) ──────────────────────────────────────────
|
|
350
|
-
minWidth: "minWidth",
|
|
351
|
-
boxSizing: "boxSizing",
|
|
352
|
-
|
|
353
|
-
// ── Pointer / selection ────────────────────────────────────────
|
|
354
|
-
pointerEvents: "pointerEvents",
|
|
355
|
-
userSelect: "userSelect",
|
|
356
|
-
WebkitUserSelect: "WebkitUserSelect",
|
|
357
|
-
|
|
358
|
-
// ── Convenience extras ─────────────────────────────────────────
|
|
359
|
-
// textAlign here lets non-Text classes (Wrapper, FlexRow) align
|
|
360
|
-
// child text without falling through to keySet. Text already
|
|
361
|
-
// exposes `align` separately.
|
|
362
|
-
textAlign: "textAlign",
|
|
363
|
-
transition: "transition",
|
|
364
|
-
};
|
|
432
|
+
commonMethods(obj){ // define in anim
|
|
365
433
|
|
|
366
|
-
//
|
|
367
|
-
//
|
|
368
|
-
|
|
369
|
-
// the documentation promised the opposite ("a bare number, not a CSS
|
|
370
|
-
// length"). Rather than correct the docs to match an awkward behaviour,
|
|
371
|
-
// the number is read as pixels, which is what every caller meant.
|
|
372
|
-
const PIXELS_WHEN_BARE = new Set([
|
|
373
|
-
"radius", "width", "height", "maxWidth", "maxHeight", "minWidth",
|
|
374
|
-
"minHeight", "top", "left", "right", "bottom", "gap",
|
|
375
|
-
]);
|
|
376
|
-
for (const key in styleMap) {
|
|
377
|
-
if (obj[key] != null) {
|
|
378
|
-
const value = (typeof obj[key] === "number" && obj[key] !== 0 && PIXELS_WHEN_BARE.has(key))
|
|
379
|
-
? `${obj[key]}px`
|
|
380
|
-
: obj[key];
|
|
381
|
-
this.res.style[styleMap[key]] = value;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
434
|
+
// CSS-named options (first-class since 2026-04-27, so callers need no
|
|
435
|
+
// keySet): see STYLE_OPTIONS at the top of this file.
|
|
436
|
+
this.applyStyleOptions(obj);
|
|
384
437
|
|
|
385
438
|
// `transform` is overloaded: a string is a plain CSS transform, an
|
|
386
439
|
// object is a Nodality animation descriptor handled by reactOnTransform
|
|
@@ -1374,9 +1427,12 @@ resmar(arr) {
|
|
|
1374
1427
|
|
|
1375
1428
|
|
|
1376
1429
|
gpos(obj){
|
|
1377
|
-
//
|
|
1378
|
-
|
|
1379
|
-
|
|
1430
|
+
// Only the axes given. `gpos: {col: "1 / -1"}` wrote gridRow = undefined,
|
|
1431
|
+
// and a browser reads the string "undefined" as a grid LINE NAME, so the
|
|
1432
|
+
// element left its place in the auto-flow for an implicit row at the end
|
|
1433
|
+
// of the grid. Found in 1.3.21, converting a page's keySet gridColumn.
|
|
1434
|
+
if (obj && obj.col != null) this.res.style.gridColumn = obj.col;
|
|
1435
|
+
if (obj && obj.row != null) this.res.style.gridRow = obj.row;
|
|
1380
1436
|
return this;
|
|
1381
1437
|
}
|
|
1382
1438
|
|
|
@@ -2222,4 +2278,4 @@ removeQuotesFromFirstWord(jsonString) {
|
|
|
2222
2278
|
|
|
2223
2279
|
} // 2600-1870
|
|
2224
2280
|
|
|
2225
|
-
export { Animator };
|
|
2281
|
+
export { Animator, STYLE_OPTIONS, styleOptionsOf };
|
package/layout/audio.js
CHANGED
package/layout/audionew.js
CHANGED
package/layout/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.3.
|
|
2
|
+
* nodality v1.3.21
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -56,6 +56,12 @@ class /*Beta*/DesktopBar extends Animator { // add set method for background col
|
|
|
56
56
|
}
|
|
57
57
|
// Last, so a page's values replace the defaults setStyles() wrote.
|
|
58
58
|
obj.color && (this.res.style.color = obj.color);
|
|
59
|
+
// CSS-named options on the bar itself, as on MobileBar; the four
|
|
60
|
+
// applied above are left to them.
|
|
61
|
+
{
|
|
62
|
+
const { background, color, radius, maxHeight, ...style } = obj;
|
|
63
|
+
this.applyStyleOptions(style);
|
|
64
|
+
}
|
|
59
65
|
obj.keySet && this.keySet(obj.keySet);
|
|
60
66
|
return this;
|
|
61
67
|
}
|