@inc2734/unitone-css 0.42.4 → 0.42.5

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 CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t={};function e(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=o.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==o.return||o.return()}finally{if(u)throw a}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.d=function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o=new ResizeObserver((function(t){var n,o,r,i,a=e(t);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(t){a.e(t)}finally{a.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="-fluid-typography"]').forEach((function(t){o.observe(t)}))}));var r=function(t){var e,n,o=null===(e=[].slice.call(t.children))||void 0===e?void 0:e[0];o&&[].slice.call(t.children).forEach((function(t){var e,r=o.getBoundingClientRect(),i=null===(e=n)||void 0===e?void 0:e.getBoundingClientRect(),a=t.getBoundingClientRect(),l=(t.getAttribute("data-unitone-layout")||"").split(" ");r.top<a.top?l.includes("-linewrap")||l.push("-linewrap"):l=l.filter((function(t){return"-linewrap"!==t})),o===t||null!=i&&i.top&&i.top<a.top?l.includes("-bol")||l.push("-bol"):l=l.filter((function(t){return"-bol"!==t})),t.setAttribute("data-unitone-layout",l.join(" ")),n=t}))},i=new ResizeObserver((function(t){var n,o=e(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;r(i.target)}}catch(t){o.e(t)}finally{o.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout*="-divider:"]').forEach((function(t){i.observe(t)}))}));var a=function(t){var e=t.parentNode;e.style.height="",t.style.columnCount="";var n,o=t.getBoundingClientRect();if([].slice.call(t.children).reverse().some((function(t){if(!["absolute","fixed"].includes(getComputedStyle(t).position))return n=t,!0})),n){var r=n.getBoundingClientRect().left,i=Math.ceil((-1*r+o.left+o.width)/o.width),a="calc(".concat(i," * ").concat(getComputedStyle(t).getPropertyValue("--unitone--max-height")," + ").concat(i-1," * ").concat(getComputedStyle(t).getPropertyValue("--unitone--column-gap")," )");e.style.height=a,o.left>r&&(t.style.columnCount=2);var l=[];[].slice.call(t.children).forEach((function(t){var e=t.getBoundingClientRect();l.push(e.top+e.height)}));var u=Math.max.apply(Math,l);if(t.style.columnCount="",1<i){var c=Math.ceil(u-o.top);e.style.height=c?"".concat(c,"px"):""}else e.style.height=""}},l=new ResizeObserver((function(t){var n,o=e(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;a(r.target)}}catch(t){o.e(t)}finally{o.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="vertical-writing"]').forEach((function(t){l.observe(t)}))}))}();
1
+ !function(){"use strict";var t={};function e(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=function(t,e){if(t){if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=o.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==o.return||o.return()}finally{if(u)throw a}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}t.d=function(e,n){for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var o=new ResizeObserver((function(t){var n,o,r,i,a=e(t);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(t){a.e(t)}finally{a.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="-fluid-typography"]').forEach((function(t){o.observe(t)}))}));var r=function(t){var e,n,o=null===(e=[].slice.call(t.children))||void 0===e?void 0:e[0];o&&[].slice.call(t.children).forEach((function(t){var e,r=o.getBoundingClientRect(),i=null===(e=n)||void 0===e?void 0:e.getBoundingClientRect(),a=t.getBoundingClientRect(),l=(t.getAttribute("data-unitone-layout")||"").split(" ");r.top<a.top?l.includes("-linewrap")||l.push("-linewrap"):l=l.filter((function(t){return"-linewrap"!==t})),o===t||null!=i&&i.top&&i.top<a.top?l.includes("-bol")||l.push("-bol"):l=l.filter((function(t){return"-bol"!==t})),t.setAttribute("data-unitone-layout",l.join(" ")),n=t}))},i=new ResizeObserver((function(t){var n,o=e(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;r(i.target)}}catch(t){o.e(t)}finally{o.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout*="-divider:"]').forEach((function(t){i.observe(t)}))}));var a=function(t){var e=t.parentNode;e.style.height="",t.style.columnCount="";var n,o=t.getBoundingClientRect();if([].slice.call(t.children).reverse().some((function(t){if(!["absolute","fixed"].includes(getComputedStyle(t).position))return n=t,!0})),n){var r=n.getBoundingClientRect().left,i=Math.ceil((-1*r+o.left+o.width)/o.width),a="calc(".concat(i," * ").concat(getComputedStyle(t).getPropertyValue("--unitone--max-height")," + ").concat(i-1," * ").concat(getComputedStyle(t).getPropertyValue("--unitone--column-gap")," )");e.style.height=a,o.left>r&&(t.style.columnCount=2);var l=[];[].slice.call(t.children).forEach((function(t){var e=t.getBoundingClientRect();l.push(e.top+e.height)}));var u=Math.max.apply(Math,l);if(1<i){var c=Math.ceil(u-o.top);e.style.height=c?"".concat(c,"px"):""}else e.style.height="",t.style.columnCount=""}},l=new ResizeObserver((function(t){var n,o=e(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;a(r.target)}}catch(t){o.e(t)}finally{o.f()}}));document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll('[data-unitone-layout~="vertical-writing"]').forEach((function(t){l.observe(t)}))}))}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inc2734/unitone-css",
3
- "version": "0.42.4",
3
+ "version": "0.42.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
package/src/app.js CHANGED
@@ -110,12 +110,12 @@ const setHeightForVertical = (target) => {
110
110
  });
111
111
  const childrenMaxY = Math.max(...childrenY);
112
112
 
113
- target.style.columnCount = '';
114
113
  if (1 < preRowCount) {
115
114
  const height = Math.ceil(childrenMaxY - targetRect.top);
116
115
  parent.style.height = !!height ? `${height}px` : '';
117
116
  } else {
118
117
  parent.style.height = '';
118
+ target.style.columnCount = '';
119
119
  }
120
120
  };
121
121