@inc2734/unitone-css 0.42.7 → 0.42.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +1 -1
- package/package.json +1 -1
- package/src/app.js +1 -1
package/dist/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var e={};function t(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 l
|
|
1
|
+
!function(){"use strict";var e={};function t(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){o&&(e=o);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 a,l=!0,u=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==o.return||o.return()}finally{if(u)throw a}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}e.d=function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o=new ResizeObserver((function(e){var n,o,r,i,a=t(e);try{for(a.s();!(n=a.n()).done;){o=n.value.target,void 0,void 0,r=parseFloat(window.getComputedStyle(document.documentElement).getPropertyValue("font-size")),i=parseFloat(window.getComputedStyle(o).getPropertyValue("font-size")),o.style.setProperty("--unitone--fluid-font-size-magnification",i/r)}}catch(e){a.e(e)}finally{a.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="-fluid-typography"]').forEach((function(e){o.observe(e)}))}));var r=function(e){var t,n,o=null===(t=[].slice.call(e.children))||void 0===t?void 0:t[0];o&&[].slice.call(e.children).forEach((function(e){var t,r=o.getBoundingClientRect(),i=null===(t=n)||void 0===t?void 0:t.getBoundingClientRect(),a=e.getBoundingClientRect(),l=(e.getAttribute("data-unitone-layout")||"").split(" ");r.top<a.top?l.includes("-linewrap")||l.push("-linewrap"):l=l.filter((function(e){return"-linewrap"!==e})),o===e||null!=i&&i.top&&i.top<a.top?l.includes("-bol")||l.push("-bol"):l=l.filter((function(e){return"-bol"!==e})),e.setAttribute("data-unitone-layout",l.join(" ")),n=e}))},i=new ResizeObserver((function(e){var n,o=t(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;r(i.target)}}catch(e){o.e(e)}finally{o.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout*="-divider:"]').forEach((function(e){i.observe(e)}))}));var a=function(e){var t;if(e.parentNode,e.parentNode.style.height="",e.style.columnCount="",[].slice.call(e.children).reverse().some((function(e){if(!["absolute","fixed"].includes(getComputedStyle(e).position))return t=e,!0})),t){e.getBoundingClientRect().left>t.getBoundingClientRect().left&&(e.style.columnCount=2);var n=e.getBoundingClientRect().top+e.getBoundingClientRect().height,o=t.getBoundingClientRect().top+t.getBoundingClientRect().height;n<o&&(e.parentNode.style.height="".concat(Math.ceil(o-e.getBoundingClientRect().top),"px"))}};document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="vertical-writing"]').forEach((function(e){!function(e){var n=0;new MutationObserver((function(e){var n,o=t(e);try{for(o.s();!(n=o.n()).done;){var r=n.value;a(r.target)}}catch(e){o.e(e)}finally{o.f()}})).observe(e,{characterData:!0,childList:!0,subtree:!0}),new ResizeObserver((function(e){var o,r=t(e);try{for(r.s();!(o=r.n()).done;){var i,l=o.value,u=null===(i=l.borderBoxSize)||void 0===i?void 0:i[0].blockSize;u!==n&&(n=u,a(l.target))}}catch(e){r.e(e)}finally{r.f()}})).observe(e)}(e)}))}))}();
|
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -69,6 +69,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
69
69
|
|
|
70
70
|
const setColumnCountForVertical = (target) => {
|
|
71
71
|
const parent = target.parentNode;
|
|
72
|
+
target.parentNode.style.height = '';
|
|
72
73
|
target.style.columnCount = '';
|
|
73
74
|
|
|
74
75
|
let lastChild;
|
|
@@ -108,7 +109,6 @@ export const verticalsResizeObserve = (target) => {
|
|
|
108
109
|
|
|
109
110
|
const mutationObserver = new MutationObserver((entries) => {
|
|
110
111
|
for (const entry of entries) {
|
|
111
|
-
console.log(entry);
|
|
112
112
|
setColumnCountForVertical(entry.target);
|
|
113
113
|
}
|
|
114
114
|
});
|