@inc2734/unitone-css 0.99.0 → 0.100.0
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.css +1 -1
- package/dist/app.js +1 -1
- package/dist/behaviors/dividers.js +1 -1
- package/dist/behaviors/index.js +1 -1
- package/dist/behaviors/stairs.js +1 -1
- package/dist/compatibility/fluid-typography.js +1 -1
- package/dist/compatibility/index.js +1 -1
- package/dist/layout-primitives/both-sides/react.js +1 -1
- package/dist/layout-primitives/center/react.js +1 -1
- package/dist/layout-primitives/cluster/react.js +1 -1
- package/dist/layout-primitives/container/react.js +1 -1
- package/dist/layout-primitives/cover/react.js +1 -1
- package/dist/layout-primitives/decorator/react.js +1 -1
- package/dist/layout-primitives/dialog/react.js +1 -1
- package/dist/layout-primitives/divider/react.js +1 -0
- package/dist/layout-primitives/float/react.js +1 -1
- package/dist/layout-primitives/frame/react.js +1 -1
- package/dist/layout-primitives/index.js +1 -1
- package/dist/layout-primitives/layers/react.js +1 -1
- package/dist/layout-primitives/marquee/behavior.js +1 -1
- package/dist/layout-primitives/marquee/react.js +1 -1
- package/dist/layout-primitives/masonry/react.js +1 -1
- package/dist/layout-primitives/popover/react.js +1 -1
- package/dist/layout-primitives/reel/react.js +1 -1
- package/dist/layout-primitives/responsive-grid/react.js +1 -1
- package/dist/layout-primitives/stack/react.js +1 -1
- package/dist/layout-primitives/switcher/react.js +1 -1
- package/dist/layout-primitives/text/react.js +1 -1
- package/dist/layout-primitives/texture/react.js +1 -1
- package/dist/layout-primitives/vertical-writing/behavior.js +1 -1
- package/dist/layout-primitives/vertical-writing/react.js +1 -1
- package/dist/layout-primitives/with-sidebar/react.js +1 -1
- package/dist/library.js +1 -1
- package/package.json +14 -14
- package/src/layout-primitives/_layout-primitives-core.scss +2 -0
- package/src/layout-primitives/divider/_index.scss +62 -0
- package/src/layout-primitives/divider/index.jsx +25 -0
- package/src/layout-primitives/divider/react.jsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["gap","minWidth","minMeasure","position","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(
|
|
1
|
+
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["gap","minWidth","minMeasure","position","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function c(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?u(Object(e),!0).forEach(function(r){o(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}exports.Float=function(e){var n=e.gap,o=e.minWidth,u=e.minMeasure,l=e.position,a=e.style,f=function(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==r.indexOf(n))continue;e[n]=t[n]}return e}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],-1===r.indexOf(e)&&{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(e,i);return a=c(c({},a),{},{"--unitone--min-width":""!==o?o:void 0,"--unitone--min-measure":""!==u?u:void 0}),t.createElement("div",r({"data-unitone-layout":["float",""!==(null!=l?l:"")?"-position:".concat(l):void 0,""!==(null!=n?n:"")?"-gap:".concat(n):void 0].filter(Boolean).join(" "),style:a},f),f.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=require("react");function t(){return t=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},t.apply(null,arguments)}function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}function n(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,t);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}function o(r,t,e){return(t=n(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=["ratio","switchRatio","style"];function c(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(
|
|
1
|
+
"use strict";var r=require("react");function t(){return t=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},t.apply(null,arguments)}function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}function n(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,t);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}function o(r,t,e){return(t=n(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=["ratio","switchRatio","style"];function c(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),e.push.apply(e,n)}return e}function u(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?c(Object(e),!0).forEach(function(t){o(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}exports.Frame=function(e){var n=e.ratio,o=e.switchRatio,c=e.style,a=function(r,t){if(null==r)return{};var e,n,o=function(r,t){if(null==r)return{};var e={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==t.indexOf(n))continue;e[n]=r[n]}return e}(r,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)e=i[n],-1===t.indexOf(e)&&{}.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}(e,i);return c=u(u({},c),{},{"--unitone--ratio":""!==n?n:void 0}),r.createElement("div",t({"data-unitone-layout":["frame",o?"-switch":void 0].filter(Boolean).join(" "),style:c},a),a.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}function n(n){return function(t){if(Array.isArray(t))return e(t)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||t(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,l=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(i=o.call(n)).done)&&(l.push(i.value),l.length!==t);u=!0);}catch(e){d=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw r}}return l}}(e,n)||t(e,n)||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 r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var a="data-unitone-layout",l="".concat(200,"px 0px"),u=function(e,t){return e.filter((function(e){return!t.includes(e)}))},d=function(e,t){var n,i=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(a))&&void 0!==n?n:"")!==i&&e.setAttribute(a,i)},c=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,l=!0,u=new ResizeObserver(y((function(e){var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var u=i.value,d=null==o?void 0:o(u);l?(n=d,l=!1):void 0!==d&&d===n||(t(u.target,u),n=d)}}catch(e){a.e(e)}finally{a.f()}}),void 0===a?250:a));return u.observe(e),u},s=function(e,t,n){var i=new MutationObserver((function(t){requestAnimationFrame((function(){null!=e&&e.isConnected&&n(t)}))}));return i.observe(e,t),i},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.getResizeValue,a=n.delay,u=void 0===a?250:a,d=n.observeResize,f=void 0===d||d,v=n.observeIntersection,b=void 0!==v&&v,m=n.observeDirectChildrenResize,p=void 0!==m&&m,g=n.targetMutation,A=n.directChildMutation,w=b&&"undefined"!=typeof IntersectionObserver,C=!w||h(e),E=w&&!C,z=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||C?(E=!1,t(n)):E=!0)},O=function(e,t){var n,i=0;return function(){var r,o;null!==(o=n=null==e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==o&&o.requestAnimationFrame?i||(i=n.requestAnimationFrame((function(){i=0,n=null,null!=e&&e.isConnected&&t(e)}))):t(e)}}(e,z),N=function(){null!=e&&e.isConnected&&(!w||C?(E=!0,O()):E=!0)},S=function(){},M=f?p?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.getValue,o=n.delay,a=void 0===o?250:o,l=n.onChildList,u=new WeakMap,d=new Set,c=new ResizeObserver(y((function(n){var o,a=!1,l=r(n);try{for(l.s();!(o=l.n()).done;){var d=o.value,c=null==i?void 0:i(d);u.has(d.target)?(void 0!==c&&c===u.get(d.target)||(a=!0),u.set(d.target,c)):u.set(d.target,c)}}catch(e){l.e(e)}finally{l.f()}a&&t(e)}),a)),f=function(){var t;Array.from(d).forEach((function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),u.delete(t))})),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){d.has(e)||(c.observe(e),d.add(e))}))};c.observe(e),f();var v=s(e,{childList:!0},(function(n){n.some((function(e){return"childList"===e.type}))&&(f(),null==l||l(n),t(e))}));return{resizeObserver:c,mutationObserver:v}}(e,N,{getValue:o,delay:u,onChildList:function(){S()}}):{resizeObserver:c(e,N,{getValue:o,delay:u})}:{mutationObserver:null};w&&function(e,t){var n=new IntersectionObserver((function(e){var n=i(e,1)[0];n&&t(n)}),{rootMargin:l});n.observe(e)}(e,(function(e){(C=e.isIntersecting)&&E&&N()})),null!=g&&g.options&&s(e,g.options,(function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&N()}));var L=null!=A&&A.attributeFilter&&A.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.attributeFilter,r=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,l=new MutationObserver((function(n){requestAnimationFrame((function(){null!=e&&e.isConnected&&n.some((function(t){return"attributes"===t.type&&t.target.parentElement===e&&r(t)}))&&t(e)}))})),u=function(){var t;l.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){l.observe(e,{attributes:!0,attributeFilter:i,attributeOldValue:a})}))};return u(),{observer:l,syncObservedChildren:u}}(e,N,{attributeFilter:A.attributeFilter,shouldApply:A.shouldApply,attributeOldValue:A.attributeOldValue}):null;L&&(S=L.syncObservedChildren),!M.mutationObserver&&L&&s(e,{childList:!0},(function(e){e.some((function(e){return"childList"===e.type}))&&(S(),N())})),w&&!C||z(e)},v=function(e){var t;return parseInt(null===(t=e.contentRect)||void 0===t?void 0:t.width)},h=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var i=e.getBoundingClientRect(),r=n.innerWidth,o=n.innerHeight;return i.bottom>-200&&i.right>0&&i.top<o+200&&i.left<r};function y(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout((function(){e.apply(a,r)}),t)}}var b=function(e){return e.some((function(e){return"attributes"===e.type||"childList"===e.type&&[].concat(n(e.addedNodes),n(e.removedNodes)).some((function(e){return!function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&["vertical-writing__thresholder","vertical-writing:initialized","vertical-writing:safari"].includes(e.getAttribute("data-unitone-layout"))}(e)}))}))},m=function(e){if(e){var t,i,r=(null!==(t=e.getAttribute(a))&&void 0!==t?t:"").split(/\s+/).filter(Boolean),o=u(r,["vertical-writing:safari","-force-switch"]),l=u(r,["vertical-writing:initialized","vertical-writing:safari","-force-switch"]);if(d(e,o),Array.from(e.children).reverse().some((function(e){if(!["absolute","fixed"].includes(getComputedStyle(e).position)&&"none"!==getComputedStyle(e).display)return i=e,!0})),i){var c=getComputedStyle(e),s=String(c.getPropertyValue("--unitone--threshold")).trim(),f=!1;if(s){var v=e.ownerDocument.createElement("div");v.setAttribute(a,"vertical-writing__thresholder"),e.appendChild(v),f=v.offsetWidth>=e.offsetWidth,v.remove()}if(f)l.push("-force-switch");else e.getBoundingClientRect().left>i.getBoundingClientRect().left&&l.push("vertical-writing:safari");d(e,[].concat(n(l),["vertical-writing:initialized"])),requestAnimationFrame((function(){var t;if(null!=e&&e.isConnected&&null!==(t=e.parentNode)&&void 0!==t&&t.style){if(f)return void(e.parentNode.style.height="");var n=e.getBoundingClientRect(),r=i.getBoundingClientRect(),o=n.top+n.height,a=r.top+r.height;e.parentNode.style.height=o!==a?"".concat(Math.ceil(a-n.top),"px"):""}}))}else d(e,[].concat(n(l),["vertical-writing:initialized"]))}},p=Symbol.for("@inc2734/unitone-css/layout-initializers"),g=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[p]||(globalThis[p]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[p])},A=function(e,t){var n,i;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var r=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&r.add(t),null===(i=t.querySelectorAll)||void 0===i||i.call(t,e.selector).forEach((function(e){r.add(e)})),r.forEach((function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))}))}},w=function(e){var t=g();t&&t.initializers.forEach((function(t){A(t,e)}))},C=function(){var e=g();e&&(e.pendingNodes.forEach((function(e){w(e)})),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=g();e&&!e.observer&&document.body&&(w(document.body),e.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)}))})),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(C))})),e.observer.observe(document.body,{childList:!0,subtree:!0}))},z=function(e){var t=e.key,n=e.selector,i=e.initialize,r=e.enabled,o=void 0===r?function(){return!0}:r,a=g();if(a&&!a.initializers.has(t)){var l={selector:n,initialize:i,enabled:o,initialized:new WeakSet};a.initializers.set(t,l),a.observer?A(l,document.body):"loading"!==document.readyState?E():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),a.hasDOMContentLoadedListener=!0)}};z({key:"layout-primitives/marquee",selector:'[data-unitone-layout~="marquee-wrapper"]',initialize:function(e){var t;f(e,(function(e){t=function(e){var t,n=function(e){var t,n=null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"";n.split(/\s+/).includes("marquee:initialized")||e.setAttribute("data-unitone-layout","".concat(n," marquee:initialized").trim())},i=function(){return e.querySelectorAll(':scope > [data-unitone-layout~="marquee"]')},r=i();if(0!==r.length){var o=Array.from(r).some((function(e){var t;return(null!==(t=e.getAttribute(a))&&void 0!==t?t:"").split(/\s+/).includes("marquee:initialized")}));if(1===e.childElementCount&&1===r.length){var l=r[0];(t=l.cloneNode(!0)).setAttribute("aria-hidden","true"),l.after(t)}return r=i(),o?(r.forEach((function(e){var t,n,i;i=(null!==(n=(t=e).getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).filter((function(e){return e&&"marquee:initialized"!==e})).join(" "),t.setAttribute("data-unitone-layout",i)})),requestAnimationFrame((function(){null!=e&&e.isConnected&&i().forEach((function(e){n(e)}))})),t):(r.forEach((function(e){n(e)})),t)}}(e)}),{observeResize:!1,observeIntersection:!0,targetMutation:{options:{childList:!0},shouldApply:function(e){var n,i=e.flatMap((function(e){var t;return Array.from(null!==(t=e.addedNodes)&&void 0!==t?t:[])})),r=e.flatMap((function(e){var t;return Array.from(null!==(t=e.removedNodes)&&void 0!==t?t:[])}));return null!==(n=t)&&void 0!==n&&n.isConnected&&1===i.length&&0===r.length&&i[0]===t?(t=null,!1):(t=null,!0)}}})}}),z({key:"layout-primitives/vertical-writing",selector:'[data-unitone-layout~="vertical-writing"]',initialize:function(e){f(e,(function(e){var t;null!==(t=e.parentNode)&&void 0!==t&&t.style&&(e.parentNode.style.height=""),m(e)}),{getResizeValue:v,observeIntersection:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0},shouldApply:b}})}});
|
|
1
|
+
"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function t(t,n){if(t){if("string"==typeof t)return e(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}function n(n){return function(t){if(Array.isArray(t))return e(t)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||t(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,l=[],u=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(i=o.call(n)).done)&&(l.push(i.value),l.length!==t);u=!0);}catch(e){d=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw r}}return l}}(e,n)||t(e,n)||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 r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var a="data-unitone-layout",l="".concat(200,"px 0px"),u=function(e,t){return e.filter(function(e){return!t.includes(e)})},d=function(e,t){var n,i=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(a))&&void 0!==n?n:"")!==i&&e.setAttribute(a,i)},c=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,l=!0,u=new ResizeObserver(y(function(e){var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var u=i.value,d=null==o?void 0:o(u);l?(n=d,l=!1):void 0!==d&&d===n||(t(u.target,u),n=d)}}catch(e){a.e(e)}finally{a.f()}},void 0===a?250:a));return u.observe(e),u},s=function(e,t,n){var i=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return i.observe(e,t),i},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.getResizeValue,a=n.delay,u=void 0===a?250:a,d=n.observeResize,f=void 0===d||d,v=n.observeIntersection,b=void 0!==v&&v,m=n.observeDirectChildrenResize,p=void 0!==m&&m,g=n.targetMutation,A=n.directChildMutation,w=b&&"undefined"!=typeof IntersectionObserver,C=!w||h(e),E=w&&!C,z=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||C?(E=!1,t(n)):E=!0)},O=function(e,t){var n,i=0;return function(){var r,o;null!==(o=n=null==e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==o&&o.requestAnimationFrame?i||(i=n.requestAnimationFrame(function(){i=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,z),N=function(){null!=e&&e.isConnected&&(!w||C?(E=!0,O()):E=!0)},S=function(){},M=f?p?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.getValue,o=n.delay,a=void 0===o?250:o,l=n.onChildList,u=new WeakMap,d=new Set,c=new ResizeObserver(y(function(n){var o,a=!1,l=r(n);try{for(l.s();!(o=l.n()).done;){var d=o.value,c=null==i?void 0:i(d);u.has(d.target)?(void 0!==c&&c===u.get(d.target)||(a=!0),u.set(d.target,c)):u.set(d.target,c)}}catch(e){l.e(e)}finally{l.f()}a&&t(e)},a)),f=function(){var t;Array.from(d).forEach(function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),u.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){d.has(e)||(c.observe(e),d.add(e))})};c.observe(e),f();var v=s(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(f(),null==l||l(n),t(e))});return{resizeObserver:c,mutationObserver:v}}(e,N,{getValue:o,delay:u,onChildList:function(){S()}}):{resizeObserver:c(e,N,{getValue:o,delay:u})}:{mutationObserver:null};w&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:l});n.observe(e)}(e,function(e){(C=e.isIntersecting)&&E&&N()}),null!=g&&g.options&&s(e,g.options,function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&N()});var L=null!=A&&A.attributeFilter&&A.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.attributeFilter,r=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,l=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&r(t)})&&t(e)})}),u=function(){var t;l.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){l.observe(e,{attributes:!0,attributeFilter:i,attributeOldValue:a})})};return u(),{observer:l,syncObservedChildren:u}}(e,N,{attributeFilter:A.attributeFilter,shouldApply:A.shouldApply,attributeOldValue:A.attributeOldValue}):null;L&&(S=L.syncObservedChildren),!M.mutationObserver&&L&&s(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(S(),N())}),w&&!C||z(e)},v=function(e){var t;return parseInt(null===(t=e.contentRect)||void 0===t?void 0:t.width)},h=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var i=e.getBoundingClientRect(),r=n.innerWidth,o=n.innerHeight;return i.bottom>-200&&i.right>0&&i.top<o+200&&i.left<r};function y(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout(function(){e.apply(a,r)},t)}}var b=function(e){return e.some(function(e){return"attributes"===e.type||"childList"===e.type&&[].concat(n(e.addedNodes),n(e.removedNodes)).some(function(e){return!function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE&&["vertical-writing__thresholder","vertical-writing:initialized","vertical-writing:safari"].includes(e.getAttribute("data-unitone-layout"))}(e)})})},m=function(e){if(e){var t,i,r=(null!==(t=e.getAttribute(a))&&void 0!==t?t:"").split(/\s+/).filter(Boolean),o=u(r,["vertical-writing:safari","-force-switch"]),l=u(r,["vertical-writing:initialized","vertical-writing:safari","-force-switch"]);if(d(e,o),Array.from(e.children).reverse().some(function(e){if(!["absolute","fixed"].includes(getComputedStyle(e).position)&&"none"!==getComputedStyle(e).display)return i=e,!0}),i){var c=getComputedStyle(e),s=String(c.getPropertyValue("--unitone--threshold")).trim(),f=!1;if(s){var v=e.ownerDocument.createElement("div");v.setAttribute(a,"vertical-writing__thresholder"),e.appendChild(v),f=v.offsetWidth>=e.offsetWidth,v.remove()}if(f)l.push("-force-switch");else e.getBoundingClientRect().left>i.getBoundingClientRect().left&&l.push("vertical-writing:safari");d(e,[].concat(n(l),["vertical-writing:initialized"])),requestAnimationFrame(function(){var t;if(null!=e&&e.isConnected&&null!==(t=e.parentNode)&&void 0!==t&&t.style){if(f)return void(e.parentNode.style.height="");var n=e.getBoundingClientRect(),r=i.getBoundingClientRect(),o=n.top+n.height,a=r.top+r.height;e.parentNode.style.height=o!==a?"".concat(Math.ceil(a-n.top),"px"):""}})}else d(e,[].concat(n(l),["vertical-writing:initialized"]))}},p=Symbol.for("@inc2734/unitone-css/layout-initializers"),g=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[p]||(globalThis[p]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[p])},A=function(e,t){var n,i;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var r=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&r.add(t),null===(i=t.querySelectorAll)||void 0===i||i.call(t,e.selector).forEach(function(e){r.add(e)}),r.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},w=function(e){var t=g();t&&t.initializers.forEach(function(t){A(t,e)})},C=function(){var e=g();e&&(e.pendingNodes.forEach(function(e){w(e)}),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=g();e&&!e.observer&&document.body&&(w(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(C))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))},z=function(e){var t=e.key,n=e.selector,i=e.initialize,r=e.enabled,o=void 0===r?function(){return!0}:r,a=g();if(a&&!a.initializers.has(t)){var l={selector:n,initialize:i,enabled:o,initialized:new WeakSet};a.initializers.set(t,l),a.observer?A(l,document.body):"loading"!==document.readyState?E():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),a.hasDOMContentLoadedListener=!0)}};z({key:"layout-primitives/marquee",selector:'[data-unitone-layout~="marquee-wrapper"]',initialize:function(e){var t;f(e,function(e){t=function(e){var t,n=function(e){var t,n=null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"";n.split(/\s+/).includes("marquee:initialized")||e.setAttribute("data-unitone-layout","".concat(n," marquee:initialized").trim())},i=function(){return e.querySelectorAll(':scope > [data-unitone-layout~="marquee"]')},r=i();if(0!==r.length){var o=Array.from(r).some(function(e){var t;return(null!==(t=e.getAttribute(a))&&void 0!==t?t:"").split(/\s+/).includes("marquee:initialized")});if(1===e.childElementCount&&1===r.length){var l=r[0];(t=l.cloneNode(!0)).setAttribute("aria-hidden","true"),l.after(t)}return r=i(),o?(r.forEach(function(e){var t,n,i;i=(null!==(n=(t=e).getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).filter(function(e){return e&&"marquee:initialized"!==e}).join(" "),t.setAttribute("data-unitone-layout",i)}),requestAnimationFrame(function(){null!=e&&e.isConnected&&i().forEach(function(e){n(e)})}),t):(r.forEach(function(e){n(e)}),t)}}(e)},{observeResize:!1,observeIntersection:!0,targetMutation:{options:{childList:!0},shouldApply:function(e){var n,i=e.flatMap(function(e){var t;return Array.from(null!==(t=e.addedNodes)&&void 0!==t?t:[])}),r=e.flatMap(function(e){var t;return Array.from(null!==(t=e.removedNodes)&&void 0!==t?t:[])});return null!==(n=t)&&void 0!==n&&n.isConnected&&1===i.length&&0===r.length&&i[0]===t?(t=null,!1):(t=null,!0)}}})}}),z({key:"layout-primitives/vertical-writing",selector:'[data-unitone-layout~="vertical-writing"]',initialize:function(e){f(e,function(e){var t;null!==(t=e.parentNode)&&void 0!==t&&t.style&&(e.parentNode.style.height=""),m(e)},{getResizeValue:v,observeIntersection:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0},shouldApply:b}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(null,arguments)}function t(e){return t="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},t(e)}function n(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r);if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}function o(e,r,t){return(r=n(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=["cover","fill","fixed","applyBlur","blur","portrait","gap","minHeight","columns","rows","style"],u=["alignSelf","justifySelf","gridColumn","gridRow","mixBlendMode","maxWidth","maxHeight","style"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(
|
|
1
|
+
"use strict";var e=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},r.apply(null,arguments)}function t(e){return t="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},t(e)}function n(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r);if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}function o(e,r,t){return(r=n(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==r.indexOf(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=["cover","fill","fixed","applyBlur","blur","portrait","gap","minHeight","columns","rows","style"],u=["alignSelf","justifySelf","gridColumn","gridRow","mixBlendMode","maxWidth","maxHeight","style"];function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach(function(r){o(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}exports.Layer=function(t){var n=t.alignSelf,o=t.justifySelf,l=t.gridColumn,a=t.gridRow,f=t.mixBlendMode,y=t.maxWidth,s=t.maxHeight,d=t.style,v=i(t,u);return d=c(c({},d),{},{"--unitone--grid-column":""!==l?l:void 0,"--unitone--grid-row":""!==a?a:void 0,"--unitone--max-width":""!==y?y:void 0,"--unitone--max-height":""!==s?s:void 0}),e.createElement("div",r({"data-unitone-layout":["layer",""!==(null!=n?n:"")?"-align-self:".concat(n):void 0,""!==(null!=o?o:"")?"-justify-self:".concat(o):void 0,""!==(null!=f?f:"")?"-mix-blend-mode:".concat(f):void 0].filter(Boolean).join(" "),style:d},v),v.children)},exports.Layers=function(t){var n=t.cover,o=t.fill,u=t.fixed,a=t.applyBlur,f=t.blur,y=t.portrait,s=t.gap,d=t.minHeight,v=t.columns,p=t.rows,b=t.style,m=i(t,l);return b=c(c({},b),{},{"--unitone--min-height":""!==d?d:void 0,"--unitone--columns":""!==v?v:void 0,"--unitone--rows":""!==p?p:void 0,"--unitone--blur":""!==f?f:void 0}),e.createElement("div",r({"data-unitone-layout":["layers",""!==(null!=s?s:"")?"-gap:".concat(s):void 0,n?"-cover":void 0,o?"-fill":void 0,u?"-fixed":void 0,a?"-blur":void 0,y?"-portrait":void 0].filter(Boolean).join(" "),style:b},m),m.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function n(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,a,u=[],l=!0,d=!1;try{if(o=(t=t.call(e)).next,0===n);else for(;!(l=(r=o.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){d=!0,i=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(d)throw i}}return u}}(n,t)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var r={}.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(n,t):void 0}}(n,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 t(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return r(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,n):void 0}}(e))||n){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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,u=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==t.return||t.return()}finally{if(l)throw a}}}}function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var i="".concat(200,"px 0px"),o=function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,u=!0,l=new ResizeObserver(d(
|
|
1
|
+
"use strict";function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function n(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,a,u=[],l=!0,d=!1;try{if(o=(t=t.call(e)).next,0===n);else for(;!(l=(r=o.call(t)).done)&&(u.push(r.value),u.length!==n);l=!0);}catch(e){d=!0,i=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(d)throw i}}return u}}(n,t)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var r={}.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(n,t):void 0}}(n,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 t(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return r(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,n):void 0}}(e))||n){t&&(e=t);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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,u=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==t.return||t.return()}finally{if(l)throw a}}}}function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var i="".concat(200,"px 0px"),o=function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,u=!0,l=new ResizeObserver(d(function(e){var i,a=t(e);try{for(a.s();!(i=a.n()).done;){var l=i.value,d=null==o?void 0:o(l);u?(r=d,u=!1):void 0!==d&&d===r||(n(l.target,l),r=d)}}catch(e){a.e(e)}finally{a.f()}},void 0===a?250:a));return l.observe(e),l},a=function(e,n,t){var r=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&t(n)})});return r.observe(e,n),r},u=function(e,r){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=u.getResizeValue,s=u.delay,f=void 0===s?250:s,v=u.observeResize,y=void 0===v||v,b=u.observeIntersection,h=void 0!==b&&b,m=u.observeDirectChildrenResize,p=void 0!==m&&m,g=u.targetMutation,A=u.directChildMutation,O=h&&"undefined"!=typeof IntersectionObserver,w=!O||l(e),E=O&&!w,z=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||w?(E=!1,r(n)):E=!0)},C=function(e,n){var t,r=0;return function(){var i,o;null!==(o=t=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=t.requestAnimationFrame(function(){r=0,t=null,null!=e&&e.isConnected&&n(e)})):n(e)}}(e,z),M=function(){null!=e&&e.isConnected&&(!O||w?(E=!0,C()):E=!0)},L=function(){},S=y?p?function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,o=r.delay,u=void 0===o?250:o,l=r.onChildList,c=new WeakMap,s=new Set,f=new ResizeObserver(d(function(r){var o,a=!1,u=t(r);try{for(u.s();!(o=u.n()).done;){var l=o.value,d=null==i?void 0:i(l);c.has(l.target)?(void 0!==d&&d===c.get(l.target)||(a=!0),c.set(l.target,d)):c.set(l.target,d)}}catch(e){u.e(e)}finally{u.f()}a&&n(e)},u)),v=function(){var n;Array.from(s).forEach(function(n){n.parentElement!==e&&(f.unobserve(n),s.delete(n),c.delete(n))}),Array.from(null!==(n=null==e?void 0:e.children)&&void 0!==n?n:[]).forEach(function(e){s.has(e)||(f.observe(e),s.add(e))})};f.observe(e),v();var y=a(e,{childList:!0},function(t){t.some(function(e){return"childList"===e.type})&&(v(),null==l||l(t),n(e))});return{resizeObserver:f,mutationObserver:y}}(e,M,{getValue:c,delay:f,onChildList:function(){L()}}):{resizeObserver:o(e,M,{getValue:c,delay:f})}:{mutationObserver:null};O&&function(e,t){var r=new IntersectionObserver(function(e){var r=n(e,1)[0];r&&t(r)},{rootMargin:i});r.observe(e)}(e,function(e){(w=e.isIntersecting)&&E&&M()}),null!=g&&g.options&&a(e,g.options,function(e){var n,t;(null!==(n=null===(t=g.shouldApply)||void 0===t?void 0:t.call(g,e))&&void 0!==n?n:0<e.length)&&M()});var N=null!=A&&A.attributeFilter&&A.shouldApply?function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.attributeFilter,i=t.shouldApply,o=t.attributeOldValue,a=void 0===o||o,u=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&t.some(function(n){return"attributes"===n.type&&n.target.parentElement===e&&i(n)})&&n(e)})}),l=function(){var n;u.disconnect(),Array.from(null!==(n=null==e?void 0:e.children)&&void 0!==n?n:[]).forEach(function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:a})})};return l(),{observer:u,syncObservedChildren:l}}(e,M,{attributeFilter:A.attributeFilter,shouldApply:A.shouldApply,attributeOldValue:A.attributeOldValue}):null;N&&(L=N.syncObservedChildren),!S.mutationObserver&&N&&a(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(L(),M())}),O&&!w||z(e)},l=function(e){var n;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var t=null==e||null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView;if(!t)return!0;var r=e.getBoundingClientRect(),i=t.innerWidth,o=t.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function d(e,n){var t;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout(function(){e.apply(a,i)},n)}}var c=Symbol.for("@inc2734/unitone-css/layout-initializers"),s=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[c]||(globalThis[c]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[c])},f=function(e,n){var t,r;if(e.enabled()&&(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(t=n.matches)&&void 0!==t&&t.call(n,e.selector)&&i.add(n),null===(r=n.querySelectorAll)||void 0===r||r.call(n,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(n){e.initialized.has(n)||(e.initialize(n),e.initialized.add(n))})}},v=function(e){var n=s();n&&n.initializers.forEach(function(n){f(n,e)})},y=function(){var e=s();e&&(e.pendingNodes.forEach(function(e){v(e)}),e.pendingNodes.clear(),e.rafId=0)},b=function(){var e=s();e&&!e.observer&&document.body&&(v(document.body),e.observer=new MutationObserver(function(n){n.forEach(function(n){n.addedNodes.forEach(function(n){(null==n?void 0:n.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(n)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(y))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};!function(e){var n=e.key,t=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,a=s();if(a&&!a.initializers.has(n)){var u={selector:t,initialize:r,enabled:o,initialized:new WeakSet};a.initializers.set(n,u),a.observer?f(u,document.body):"loading"!==document.readyState?b():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",b,{once:!0}),a.hasDOMContentLoadedListener=!0)}}({key:"layout-primitives/marquee",selector:'[data-unitone-layout~="marquee-wrapper"]',initialize:function(e){var n;u(e,function(e){n=function(e){var n,t=function(e){var n,t=null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"";t.split(/\s+/).includes("marquee:initialized")||e.setAttribute("data-unitone-layout","".concat(t," marquee:initialized").trim())},r=function(){return e.querySelectorAll(':scope > [data-unitone-layout~="marquee"]')},i=r();if(0!==i.length){var o=Array.from(i).some(function(e){var n;return(null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).includes("marquee:initialized")});if(1===e.childElementCount&&1===i.length){var a=i[0];(n=a.cloneNode(!0)).setAttribute("aria-hidden","true"),a.after(n)}return i=r(),o?(i.forEach(function(e){var n,t,r;r=(null!==(t=(n=e).getAttribute("data-unitone-layout"))&&void 0!==t?t:"").split(/\s+/).filter(function(e){return e&&"marquee:initialized"!==e}).join(" "),n.setAttribute("data-unitone-layout",r)}),requestAnimationFrame(function(){null!=e&&e.isConnected&&r().forEach(function(e){t(e)})}),n):(i.forEach(function(e){t(e)}),n)}}(e)},{observeResize:!1,observeIntersection:!0,targetMutation:{options:{childList:!0},shouldApply:function(e){var t,r=e.flatMap(function(e){var n;return Array.from(null!==(n=e.addedNodes)&&void 0!==n?n:[])}),i=e.flatMap(function(e){var n;return Array.from(null!==(n=e.removedNodes)&&void 0!==n?n:[])});return null!==(t=n)&&void 0!==t&&t.isConnected&&1===r.length&&0===i.length&&r[0]===n?(n=null,!1):(n=null,!0)}}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}(e,n)||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 r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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,u=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o="".concat(200,"px 0px"),a=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,u=!0,l=new ResizeObserver(d((function(e){var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var l=i.value,c=null==o?void 0:o(l);u?(n=c,u=!1):void 0!==c&&c===n||(t(l.target,l),n=c)}}catch(e){a.e(e)}finally{a.f()}}),void 0===a?250:a));return l.observe(e),l},u=function(e,t,n){var r=new MutationObserver((function(t){requestAnimationFrame((function(){null!=e&&e.isConnected&&n(t)}))}));return r.observe(e,t),r},l=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=i.getResizeValue,f=i.delay,s=void 0===f?250:f,v=i.observeResize,y=void 0===v||v,b=i.observeIntersection,p=void 0!==b&&b,m=i.observeDirectChildrenResize,h=void 0!==m&&m,g=i.targetMutation,O=i.directChildMutation,w=p&&"undefined"!=typeof IntersectionObserver,A=!w||c(e),E=w&&!A,S=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||A?(E=!1,t(n)):E=!0)},j=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame((function(){r=0,n=null,null!=e&&e.isConnected&&t(e)}))):t(e)}}(e,S),z=function(){null!=e&&e.isConnected&&(!w||A?(E=!0,j()):E=!0)},C=function(){},M=y?h?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.getValue,o=n.delay,a=void 0===o?250:o,l=n.onChildList,c=new WeakMap,f=new Set,s=new ResizeObserver(d((function(n){var o,a=!1,u=r(n);try{for(u.s();!(o=u.n()).done;){var l=o.value,d=null==i?void 0:i(l);c.has(l.target)?(void 0!==d&&d===c.get(l.target)||(a=!0),c.set(l.target,d)):c.set(l.target,d)}}catch(e){u.e(e)}finally{u.f()}a&&t(e)}),a)),v=function(){var t;Array.from(f).forEach((function(t){t.parentElement!==e&&(s.unobserve(t),f.delete(t),c.delete(t))})),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){f.has(e)||(s.observe(e),f.add(e))}))};s.observe(e),v();var y=u(e,{childList:!0},(function(n){n.some((function(e){return"childList"===e.type}))&&(v(),null==l||l(n),t(e))}));return{resizeObserver:s,mutationObserver:y}}(e,z,{getValue:l,delay:s,onChildList:function(){C()}}):{resizeObserver:a(e,z,{getValue:l,delay:s})}:{mutationObserver:null};w&&function(e,t){var r=new IntersectionObserver((function(e){var r=n(e,1)[0];r&&t(r)}),{rootMargin:o});r.observe(e)}(e,(function(e){(A=e.isIntersecting)&&E&&z()})),null!=g&&g.options&&u(e,g.options,(function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&z()}));var q=null!=O&&O.attributeFilter&&O.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,u=new MutationObserver((function(n){requestAnimationFrame((function(){null!=e&&e.isConnected&&n.some((function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)}))&&t(e)}))})),l=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:a})}))};return l(),{observer:u,syncObservedChildren:l}}(e,z,{attributeFilter:O.attributeFilter,shouldApply:O.shouldApply,attributeOldValue:O.attributeOldValue}):null;q&&(C=q.syncObservedChildren),!M.mutationObserver&&q&&u(e,{childList:!0},(function(e){e.some((function(e){return"childList"===e.type}))&&(C(),z())})),w&&!A||S(e)},c=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function d(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout((function(){e.apply(a,i)}),t)}}var f=Symbol.for("@inc2734/unitone-css/layout-initializers"),s=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[f]||(globalThis[f]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[f])},v=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach((function(e){i.add(e)})),i.forEach((function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))}))}},y=function(e){var t=s();t&&t.initializers.forEach((function(t){v(t,e)}))},b=function(){var e=s();e&&(e.pendingNodes.forEach((function(e){y(e)})),e.pendingNodes.clear(),e.rafId=0)},p=function(){var e=s();e&&!e.observer&&document.body&&(y(document.body),e.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)}))})),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(b))})),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function h(e){return h="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},h(e)}function g(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}function O(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,a=s();if(a&&!a.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};a.initializers.set(t,u),a.observer?v(u,document.body):"loading"!==document.readyState?p():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",p,{once:!0}),a.hasDOMContentLoadedListener=!0)}}({key:"layout-primitives/marquee",selector:'[data-unitone-layout~="marquee-wrapper"]',initialize:function(e){var t;l(e,(function(e){t=function(e){var t,n=function(e){var t,n=null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"";n.split(/\s+/).includes("marquee:initialized")||e.setAttribute("data-unitone-layout","".concat(n," marquee:initialized").trim())},r=function(){return e.querySelectorAll(':scope > [data-unitone-layout~="marquee"]')},i=r();if(0!==i.length){var o=Array.from(i).some((function(e){var t;return(null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"").split(/\s+/).includes("marquee:initialized")}));if(1===e.childElementCount&&1===i.length){var a=i[0];(t=a.cloneNode(!0)).setAttribute("aria-hidden","true"),a.after(t)}return i=r(),o?(i.forEach((function(e){var t,n,r;r=(null!==(n=(t=e).getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).filter((function(e){return e&&"marquee:initialized"!==e})).join(" "),t.setAttribute("data-unitone-layout",r)})),requestAnimationFrame((function(){null!=e&&e.isConnected&&r().forEach((function(e){n(e)}))})),t):(i.forEach((function(e){n(e)})),t)}}(e)}),{observeResize:!1,observeIntersection:!0,targetMutation:{options:{childList:!0},shouldApply:function(e){var n,r=e.flatMap((function(e){var t;return Array.from(null!==(t=e.addedNodes)&&void 0!==t?t:[])})),i=e.flatMap((function(e){var t;return Array.from(null!==(t=e.removedNodes)&&void 0!==t?t:[])}));return null!==(n=t)&&void 0!==n&&n.isConnected&&1===r.length&&0===i.length&&r[0]===t?(t=null,!1):(t=null,!0)}}})}});var w=["duration","gap","itemWidth","reverse","pauseOnHover","style"];function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}exports.Marquee=function(t){var n=t.duration,r=t.gap,i=t.itemWidth,o=t.reverse,a=t.pauseOnHover,u=t.style,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,w);return u=E(E({},u),{},{"--unitone--animation-duration":""!==n?n:void 0,"--unitone--item-width":""!==i?i:void 0}),e.createElement("div",m({"data-unitone-layout":["marquee-wrapper",o?"-reverse":void 0,a?"-pause-on-hover":void 0].filter(Boolean).join(" "),style:u},l),e.createElement("div",{"data-unitone-layout":["marquee",""!==(null!=r?r:"")?"-gap:".concat(r):void 0].filter(Boolean).join(" ")},l.children))};
|
|
1
|
+
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,u=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,n)||function(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}(e,n)||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 r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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,u=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){l=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(l)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o="".concat(200,"px 0px"),a=function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.getValue,a=i.delay,u=!0,l=new ResizeObserver(d(function(e){var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var l=i.value,c=null==o?void 0:o(l);u?(n=c,u=!1):void 0!==c&&c===n||(t(l.target,l),n=c)}}catch(e){a.e(e)}finally{a.f()}},void 0===a?250:a));return l.observe(e),l},u=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},l=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=i.getResizeValue,f=i.delay,s=void 0===f?250:f,v=i.observeResize,y=void 0===v||v,b=i.observeIntersection,p=void 0!==b&&b,m=i.observeDirectChildrenResize,h=void 0!==m&&m,g=i.targetMutation,O=i.directChildMutation,w=p&&"undefined"!=typeof IntersectionObserver,A=!w||c(e),E=w&&!A,S=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||A?(E=!1,t(n)):E=!0)},j=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,S),z=function(){null!=e&&e.isConnected&&(!w||A?(E=!0,j()):E=!0)},C=function(){},M=y?h?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.getValue,o=n.delay,a=void 0===o?250:o,l=n.onChildList,c=new WeakMap,f=new Set,s=new ResizeObserver(d(function(n){var o,a=!1,u=r(n);try{for(u.s();!(o=u.n()).done;){var l=o.value,d=null==i?void 0:i(l);c.has(l.target)?(void 0!==d&&d===c.get(l.target)||(a=!0),c.set(l.target,d)):c.set(l.target,d)}}catch(e){u.e(e)}finally{u.f()}a&&t(e)},a)),v=function(){var t;Array.from(f).forEach(function(t){t.parentElement!==e&&(s.unobserve(t),f.delete(t),c.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){f.has(e)||(s.observe(e),f.add(e))})};s.observe(e),v();var y=u(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(v(),null==l||l(n),t(e))});return{resizeObserver:s,mutationObserver:y}}(e,z,{getValue:l,delay:s,onChildList:function(){C()}}):{resizeObserver:a(e,z,{getValue:l,delay:s})}:{mutationObserver:null};w&&function(e,t){var r=new IntersectionObserver(function(e){var r=n(e,1)[0];r&&t(r)},{rootMargin:o});r.observe(e)}(e,function(e){(A=e.isIntersecting)&&E&&z()}),null!=g&&g.options&&u(e,g.options,function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&z()});var q=null!=O&&O.attributeFilter&&O.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,a=void 0===o||o,u=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),l=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:a})})};return l(),{observer:u,syncObservedChildren:l}}(e,z,{attributeFilter:O.attributeFilter,shouldApply:O.shouldApply,attributeOldValue:O.attributeOldValue}):null;q&&(C=q.syncObservedChildren),!M.mutationObserver&&q&&u(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(C(),z())}),w&&!A||S(e)},c=function(e){var t;if(!function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length}(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function d(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(n),n=setTimeout(function(){e.apply(a,i)},t)}}var f=Symbol.for("@inc2734/unitone-css/layout-initializers"),s=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[f]||(globalThis[f]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[f])},v=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},y=function(e){var t=s();t&&t.initializers.forEach(function(t){v(t,e)})},b=function(){var e=s();e&&(e.pendingNodes.forEach(function(e){y(e)}),e.pendingNodes.clear(),e.rafId=0)},p=function(){var e=s();e&&!e.observer&&document.body&&(y(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(b))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function h(e){return h="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},h(e)}function g(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}function O(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,a=s();if(a&&!a.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};a.initializers.set(t,u),a.observer?v(u,document.body):"loading"!==document.readyState?p():a.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",p,{once:!0}),a.hasDOMContentLoadedListener=!0)}}({key:"layout-primitives/marquee",selector:'[data-unitone-layout~="marquee-wrapper"]',initialize:function(e){var t;l(e,function(e){t=function(e){var t,n=function(e){var t,n=null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"";n.split(/\s+/).includes("marquee:initialized")||e.setAttribute("data-unitone-layout","".concat(n," marquee:initialized").trim())},r=function(){return e.querySelectorAll(':scope > [data-unitone-layout~="marquee"]')},i=r();if(0!==i.length){var o=Array.from(i).some(function(e){var t;return(null!==(t=e.getAttribute("data-unitone-layout"))&&void 0!==t?t:"").split(/\s+/).includes("marquee:initialized")});if(1===e.childElementCount&&1===i.length){var a=i[0];(t=a.cloneNode(!0)).setAttribute("aria-hidden","true"),a.after(t)}return i=r(),o?(i.forEach(function(e){var t,n,r;r=(null!==(n=(t=e).getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).filter(function(e){return e&&"marquee:initialized"!==e}).join(" "),t.setAttribute("data-unitone-layout",r)}),requestAnimationFrame(function(){null!=e&&e.isConnected&&r().forEach(function(e){n(e)})}),t):(i.forEach(function(e){n(e)}),t)}}(e)},{observeResize:!1,observeIntersection:!0,targetMutation:{options:{childList:!0},shouldApply:function(e){var n,r=e.flatMap(function(e){var t;return Array.from(null!==(t=e.addedNodes)&&void 0!==t?t:[])}),i=e.flatMap(function(e){var t;return Array.from(null!==(t=e.removedNodes)&&void 0!==t?t:[])});return null!==(n=t)&&void 0!==n&&n.isConnected&&1===r.length&&0===i.length&&r[0]===t?(t=null,!1):(t=null,!0)}}})}});var w=["duration","gap","itemWidth","reverse","pauseOnHover","style"];function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.Marquee=function(t){var n=t.duration,r=t.gap,i=t.itemWidth,o=t.reverse,a=t.pauseOnHover,u=t.style,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,w);return u=E(E({},u),{},{"--unitone--animation-duration":""!==n?n:void 0,"--unitone--item-width":""!==i?i:void 0}),e.createElement("div",m({"data-unitone-layout":["marquee-wrapper",o?"-reverse":void 0,a?"-pause-on-hover":void 0].filter(Boolean).join(" "),style:u},l),e.createElement("div",{"data-unitone-layout":["marquee",""!==(null!=r?r:"")?"-gap:".concat(r):void 0].filter(Boolean).join(" ")},l.children))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var r=require("react");function t(){return t=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},t.apply(null,arguments)}function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}function n(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,t);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}function o(r,t,e){return(t=n(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=["gap","columnWidth","style"];function u(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(
|
|
1
|
+
"use strict";var r=require("react");function t(){return t=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)({}).hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},t.apply(null,arguments)}function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}function n(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,t);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}function o(r,t,e){return(t=n(t))in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=["gap","columnWidth","style"];function u(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),e.push.apply(e,n)}return e}function c(r){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?u(Object(e),!0).forEach(function(t){o(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}exports.Masonry=function(e){var n=e.gap,o=e.columnWidth,u=e.style,l=function(r,t){if(null==r)return{};var e,n,o=function(r,t){if(null==r)return{};var e={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==t.indexOf(n))continue;e[n]=r[n]}return e}(r,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)e=i[n],-1===t.indexOf(e)&&{}.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}(e,i);return u=c(c({},u),{},{"--unitone--column-width":""!==o?o:void 0}),r.createElement("div",t({"data-unitone-layout":["masonry",""!==(null!=n?n:"")?"-gap:".concat(n):void 0].filter(Boolean).join(" "),style:u},l),l.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(null,arguments)}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)}function n(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function o(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var a=["gap","tagName","style"],l=["tagName","style"],c=["placement","tagName","style"],u=["tagName","shadow","style"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(
|
|
1
|
+
"use strict";var e=require("react");function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(null,arguments)}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)}function n(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function o(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var a=["gap","tagName","style"],l=["tagName","style"],c=["placement","tagName","style"],u=["tagName","shadow","style"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}exports.Popover=function(r){var n=r.gap,o=r.tagName,l=void 0===o?"div":o,c=r.style,u=i(r,a),p=l;return c=f({},c),e.createElement(p,t({"data-unitone-layout":["popover",""!==(null!=n?n:"")?"-gap:".concat(n):void 0].filter(Boolean).join(" "),style:c},u),u.children)},exports.PopoverContent=function(r){var n=r.placement,o=r.tagName,a=void 0===o?"div":o,l=r.style,u=i(r,c),p=a;return l=f({},l),e.createElement(p,t({"data-unitone-layout":["popover-content",""!==(null!=n?n:"")?"-placement:".concat(n):void 0].filter(Boolean).join(" "),popover:u.popover||"auto",style:l},u),u.children)},exports.PopoverDialog=function(r){var n=r.tagName,o=void 0===n?"div":n,a=r.shadow,l=r.style,c=i(r,u),p=o;return l=f({},l),e.createElement(p,t({"data-unitone-layout":["popover-dialog",a?"-shadow":void 0].filter(Boolean).join(" "),style:l},c),c.children)},exports.PopoverTrigger=function(r){var n=r.tagName,o=void 0===n?"div":n,a=r.style,c=i(r,l),u=o;return a=f({},a),e.createElement(u,t({"data-unitone-layout":"popover-trigger",style:a},c),c.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["gap","height","itemWidth","noBar","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(
|
|
1
|
+
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["gap","height","itemWidth","noBar","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function c(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?u(Object(e),!0).forEach(function(r){o(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}exports.Reel=function(e){var n=e.gap,o=e.height,u=e.itemWidth,l=e.noBar,a=e.style,f=function(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==r.indexOf(n))continue;e[n]=t[n]}return e}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],-1===r.indexOf(e)&&{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(e,i);return a=c(c({},a),{},{"--unitone--height":""!==o?o:void 0,"--unitone--item-width":""!==u?u:void 0}),t.createElement("div",r({"data-unitone-layout":["reel",""!==(null!=n?n:"")?"-gap:".concat(n):void 0,l?"-no-bar":void 0].filter(Boolean).join(" "),style:a},f),f.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){d=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="data-unitone-layout",a="".concat(200,"px 0px"),d=function(e){var t;return(null!==(t=e.getAttribute(u))&&void 0!==t?t:"").split(/\s+/).filter(Boolean)},c=function(e,t){return e.filter((function(e){return!t.includes(e)}))},s=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(u))&&void 0!==n?n:"")!==r&&e.setAttribute(u,r)},f=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,u=!0,a=new ResizeObserver(m((function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var a=r.value,d=null==i?void 0:i(a);u?(n=d,u=!1):void 0!==d&&d===n||(t(a.target,a),n=d)}}catch(e){l.e(e)}finally{l.f()}}),void 0===l?250:l));return a.observe(e),a},v=function(e,t,n){var r=new MutationObserver((function(t){requestAnimationFrame((function(){null!=e&&e.isConnected&&n(t)}))}));return r.observe(e,t),r},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,u=void 0===l?250:l,d=n.observeResize,c=void 0===d||d,s=n.observeIntersection,y=void 0!==s&&s,p=n.observeDirectChildrenResize,b=void 0!==p&&p,g=n.targetMutation,w=n.directChildMutation,O=y&&"undefined"!=typeof IntersectionObserver,S=!O||h(e),A=O&&!S,C=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||S?(A=!1,t(n)):A=!0)},z=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame((function(){r=0,n=null,null!=e&&e.isConnected&&t(e)}))):t(e)}}(e,C),E=function(){null!=e&&e.isConnected&&(!O||S?(A=!0,z()):A=!0)},j=function(){},P=c?b?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,u=n.onChildList,a=new WeakMap,d=new Set,c=new ResizeObserver(m((function(n){var i,l=!1,u=o(n);try{for(u.s();!(i=u.n()).done;){var d=i.value,c=null==r?void 0:r(d);a.has(d.target)?(void 0!==c&&c===a.get(d.target)||(l=!0),a.set(d.target,c)):a.set(d.target,c)}}catch(e){u.e(e)}finally{u.f()}l&&t(e)}),l)),s=function(){var t;Array.from(d).forEach((function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),a.delete(t))})),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){d.has(e)||(c.observe(e),d.add(e))}))};c.observe(e),s();var f=v(e,{childList:!0},(function(n){n.some((function(e){return"childList"===e.type}))&&(s(),null==u||u(n),t(e))}));return{resizeObserver:c,mutationObserver:f}}(e,E,{getValue:r,delay:u,onChildList:function(){j()}}):{resizeObserver:f(e,E,{getValue:r,delay:u})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver((function(e){var n=i(e,1)[0];n&&t(n)}),{rootMargin:a});n.observe(e)}(e,(function(e){(S=e.isIntersecting)&&A&&E()})),null!=g&&g.options&&v(e,g.options,(function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&E()}));var M=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,u=new MutationObserver((function(n){requestAnimationFrame((function(){null!=e&&e.isConnected&&n.some((function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)}))&&t(e)}))})),a=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})}))};return a(),{observer:u,syncObservedChildren:a}}(e,E,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;M&&(j=M.syncObservedChildren),!P.mutationObserver&&M&&v(e,{childList:!0},(function(e){e.some((function(e){return"childList"===e.type}))&&(j(),E())})),O&&!S||C(e)},p=function(e){var t;return null===(t=e.borderBoxSize)||void 0===t?void 0:t[0].inlineSize},b=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},h=function(e){var t;if(!b(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function m(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout((function(){e.apply(l,i)}),t)}}var g=function(e){var t,n=Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]),i=n[0];if(i){var o=c(d(e),["divider:initialized","-stack"]);s(e,o);var l=new Map;if(n.forEach((function(e){var t=c(d(e),["-bol","-linewrap"]);l.set(e,t),s(e,t)})),b(e)){var u,a=i.getBoundingClientRect(),f=n.reduce((function(e,t){var n,r=window.getComputedStyle(t).getPropertyValue("position"),i=window.getComputedStyle(t).getPropertyValue("display");"absolute"!==r&&"fixed"!==r&&"none"!==i&&e.push({child:t,layoutTokens:null!==(n=l.get(t))&&void 0!==n?n:[],rect:t.getBoundingClientRect()});return e}),[]);f.map((function(e,t){var n,i,o=e.child,l=e.layoutTokens,d=e.rect,c=r(l);return(0===t||(null===(n=u)||void 0===n?void 0:n.top)<d.top&&(null===(i=u)||void 0===i?void 0:i.left)>=d.left)&&c.push("-bol"),0<t&&a.top<d.top&&c.push("-linewrap"),u=d,{child:o,layoutTokens:c}})).forEach((function(e){var t=e.child,n=e.layoutTokens;s(t,n)}));var v=f.every((function(e){return e.rect.left===a.left})),y=r(o);v&&y.push("-stack"),y.push("divider:initialized"),s(e,y)}}},w=function(e){var t,n,i=Array.from(e.children),o=c(d(e),["stairs:initialized"]);s(e,o);var l=i[0];if(l){if(e.style.removeProperty("--unitone--stairs-step-overflow-volume"),e.style.removeProperty("--unitone--max-stairs-step"),i.forEach((function(e){e.style.removeProperty("--unitone--stairs-step")})),b(e)){var u,a=null===(t=(null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).find((function(e){return e.startsWith("-stairs-up:")})))||void 0===t?void 0:t.replace("-stairs-up:",""),f=["up-down","down-up"].includes(a),v=window.getComputedStyle(e).getPropertyValue("flex-direction"),y=e.getBoundingClientRect().bottom,p=i.reduce((function(e,t){var n=window.getComputedStyle(t).getPropertyValue("position"),r=window.getComputedStyle(t).getPropertyValue("display");return"absolute"===n||"fixed"===n||"none"===r||e.push({child:t,rect:t.getBoundingClientRect()}),e}),[]),h=0,m=h;p.map((function(e,t){var n,r,i=e.child,o=e.rect,a="row-reverse"===v?(null===(n=u)||void 0===n?void 0:n.left)<=o.left:(null===(r=u)||void 0===r?void 0:r.left)>=o.left;return 0===t||l===i&&!u||a?h=0:f?h=0===h?1:0:h++,u=o,h>m&&(m=h),{child:i,stairsStep:h}})).forEach((function(e){var t=e.child,n=e.stairsStep;t.style.setProperty("--unitone--stairs-step",n)})),e.style.setProperty("--unitone--max-stairs-step",m);var g=p.reduce((function(e,t){var n=t.child.getBoundingClientRect().bottom-y;return e>n?e:n}),0);e.style.setProperty("--unitone--stairs-step-overflow-volume",g),s(e,[].concat(r(o),["stairs:initialized"]))}}else s(e,[].concat(r(o),["stairs:initialized"]))},O=Symbol.for("@inc2734/unitone-css/layout-initializers"),S=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[O]||(globalThis[O]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[O])},A=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach((function(e){i.add(e)})),i.forEach((function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))}))}},C=function(e){var t=S();t&&t.initializers.forEach((function(t){A(t,e)}))},z=function(){var e=S();e&&(e.pendingNodes.forEach((function(e){C(e)})),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=S();e&&!e.observer&&document.body&&(C(document.body),e.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)}))})),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(z))})),e.observer.observe(document.body,{childList:!0,subtree:!0}))},j=function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=S();if(l&&!l.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,u),l.observer?A(u,document.body):"loading"!==document.readyState?E():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),l.hasDOMContentLoadedListener=!0)}};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}function M(e){return M="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},M(e)}function V(e){var t=function(e,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==M(t)?t:t+""}function N(e,t,n){return(t=V(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}j({key:"behaviors/dividers",selector:'[data-unitone-layout*="-divider:"]',initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){if("data-unitone-layout"===e.attributeName){var n,i,o,l,u=[].concat(r(null!==(n=null==t||null===(i=t.ignore)||void 0===i?void 0:i.layout)&&void 0!==n?n:[]),["divider:initialized","-bol","-linewrap","-stack"]);return(null!==(o=e.target.getAttribute(e.attributeName))&&void 0!==o?o:"").split(" ").filter((function(e){return!u.includes(e)})).join(" ")!==(null!==(l=e.oldValue)&&void 0!==l?l:"").split(" ").filter((function(e){return!u.includes(e)})).join(" ")}if("class"===e.attributeName){var a,d,c,s,f=r(null!==(a=null==t||null===(d=t.ignore)||void 0===d?void 0:d.className)&&void 0!==a?a:[]);return(null!==(c=e.target.getAttribute(e.attributeName))&&void 0!==c?c:"").split(" ").filter((function(e){return!f.includes(e)})).join(" ")!==(null!==(s=e.oldValue)&&void 0!==s?s:"").split(" ").filter((function(e){return!f.includes(e)})).join(" ")}return"style"===e.attributeName};y(e,g,{getResizeValue:p,observeIntersection:!0,observeDirectChildrenResize:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0},shouldApply:function(t){return function(e,t){return e.some((function(e){return"attributes"===e.type&&t(e)}))}(t,(function(t){return t.target===e&&n(t)}))}},directChildMutation:{attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0,shouldApply:n}})}}),j({key:"behaviors/stairs",selector:'[data-unitone-layout*="-stairs:"]',initialize:function(e){y(e,w,{observeIntersection:!0,observeDirectChildrenResize:!0})}});var I=["columnMinWidth","gap","autoRepeat","divider","dividerWidth","dividerStyle","dividerColor","stairs","stairsUp","style"];function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}exports.ResponsiveGrid=function(t){var n=t.columnMinWidth,r=t.gap,i=t.autoRepeat,o=t.divider,l=t.dividerWidth,u=t.dividerStyle,a=t.dividerColor,d=t.stairs,c=t.stairsUp,s=t.style,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,I);return s=L(L({},s),{},{"--unitone--column-min-width":""!==n?n:void 0,"--unitone--divider-width":""!==l?l:void 0,"--unitone--divider-style":""!==u?u:void 0,"--unitone--divider-color":""!==a?a:void 0}),e.createElement("div",P({"data-unitone-layout":["responsive-grid",""!==(null!=r?r:"")?"-gap:".concat(r):void 0,""!==(null!=i?i:"")?"-auto-repeat:".concat(i):void 0,""!==(null!=o?o:"")?"-divider:".concat(o):void 0,""!==(null!=d?d:"")?"-stairs:".concat(d):void 0,""!==(null!=c?c:"")?"-stairs-up:".concat(c):void 0].filter(Boolean).join(" "),style:s},f),f.children)};
|
|
1
|
+
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){d=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="data-unitone-layout",a="".concat(200,"px 0px"),d=function(e){var t;return(null!==(t=e.getAttribute(u))&&void 0!==t?t:"").split(/\s+/).filter(Boolean)},c=function(e,t){return e.filter(function(e){return!t.includes(e)})},s=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(u))&&void 0!==n?n:"")!==r&&e.setAttribute(u,r)},f=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,u=!0,a=new ResizeObserver(m(function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var a=r.value,d=null==i?void 0:i(a);u?(n=d,u=!1):void 0!==d&&d===n||(t(a.target,a),n=d)}}catch(e){l.e(e)}finally{l.f()}},void 0===l?250:l));return a.observe(e),a},v=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,u=void 0===l?250:l,d=n.observeResize,c=void 0===d||d,s=n.observeIntersection,y=void 0!==s&&s,p=n.observeDirectChildrenResize,b=void 0!==p&&p,g=n.targetMutation,w=n.directChildMutation,O=y&&"undefined"!=typeof IntersectionObserver,S=!O||h(e),A=O&&!S,C=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||S?(A=!1,t(n)):A=!0)},z=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,C),E=function(){null!=e&&e.isConnected&&(!O||S?(A=!0,z()):A=!0)},j=function(){},P=c?b?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,u=n.onChildList,a=new WeakMap,d=new Set,c=new ResizeObserver(m(function(n){var i,l=!1,u=o(n);try{for(u.s();!(i=u.n()).done;){var d=i.value,c=null==r?void 0:r(d);a.has(d.target)?(void 0!==c&&c===a.get(d.target)||(l=!0),a.set(d.target,c)):a.set(d.target,c)}}catch(e){u.e(e)}finally{u.f()}l&&t(e)},l)),s=function(){var t;Array.from(d).forEach(function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),a.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){d.has(e)||(c.observe(e),d.add(e))})};c.observe(e),s();var f=v(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(s(),null==u||u(n),t(e))});return{resizeObserver:c,mutationObserver:f}}(e,E,{getValue:r,delay:u,onChildList:function(){j()}}):{resizeObserver:f(e,E,{getValue:r,delay:u})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:a});n.observe(e)}(e,function(e){(S=e.isIntersecting)&&A&&E()}),null!=g&&g.options&&v(e,g.options,function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&E()});var M=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,u=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),a=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})})};return a(),{observer:u,syncObservedChildren:a}}(e,E,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;M&&(j=M.syncObservedChildren),!P.mutationObserver&&M&&v(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(j(),E())}),O&&!S||C(e)},p=function(e){var t;return null===(t=e.borderBoxSize)||void 0===t?void 0:t[0].inlineSize},b=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},h=function(e){var t;if(!b(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function m(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout(function(){e.apply(l,i)},t)}}var g=function(e){var t,n=Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]),i=n[0];if(i){var o=c(d(e),["divider:initialized","-stack"]);s(e,o);var l=new Map;if(n.forEach(function(e){var t=c(d(e),["-bol","-linewrap"]);l.set(e,t),s(e,t)}),b(e)){var u,a=i.getBoundingClientRect(),f=n.reduce(function(e,t){var n,r=window.getComputedStyle(t).getPropertyValue("position"),i=window.getComputedStyle(t).getPropertyValue("display");"absolute"!==r&&"fixed"!==r&&"none"!==i&&e.push({child:t,layoutTokens:null!==(n=l.get(t))&&void 0!==n?n:[],rect:t.getBoundingClientRect()});return e},[]);f.map(function(e,t){var n,i,o=e.child,l=e.layoutTokens,d=e.rect,c=r(l);return(0===t||(null===(n=u)||void 0===n?void 0:n.top)<d.top&&(null===(i=u)||void 0===i?void 0:i.left)>=d.left)&&c.push("-bol"),0<t&&a.top<d.top&&c.push("-linewrap"),u=d,{child:o,layoutTokens:c}}).forEach(function(e){var t=e.child,n=e.layoutTokens;s(t,n)});var v=f.every(function(e){return e.rect.left===a.left}),y=r(o);v&&y.push("-stack"),y.push("divider:initialized"),s(e,y)}}},w=function(e){var t,n,i=Array.from(e.children),o=c(d(e),["stairs:initialized"]);s(e,o);var l=i[0];if(l){if(e.style.removeProperty("--unitone--stairs-step-overflow-volume"),e.style.removeProperty("--unitone--max-stairs-step"),i.forEach(function(e){e.style.removeProperty("--unitone--stairs-step")}),b(e)){var u,a=null===(t=(null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).find(function(e){return e.startsWith("-stairs-up:")}))||void 0===t?void 0:t.replace("-stairs-up:",""),f=["up-down","down-up"].includes(a),v=window.getComputedStyle(e).getPropertyValue("flex-direction"),y=e.getBoundingClientRect().bottom,p=i.reduce(function(e,t){var n=window.getComputedStyle(t).getPropertyValue("position"),r=window.getComputedStyle(t).getPropertyValue("display");return"absolute"===n||"fixed"===n||"none"===r||e.push({child:t,rect:t.getBoundingClientRect()}),e},[]),h=0,m=h;p.map(function(e,t){var n,r,i=e.child,o=e.rect,a="row-reverse"===v?(null===(n=u)||void 0===n?void 0:n.left)<=o.left:(null===(r=u)||void 0===r?void 0:r.left)>=o.left;return 0===t||l===i&&!u||a?h=0:f?h=0===h?1:0:h++,u=o,h>m&&(m=h),{child:i,stairsStep:h}}).forEach(function(e){var t=e.child,n=e.stairsStep;t.style.setProperty("--unitone--stairs-step",n)}),e.style.setProperty("--unitone--max-stairs-step",m);var g=p.reduce(function(e,t){var n=t.child.getBoundingClientRect().bottom-y;return e>n?e:n},0);e.style.setProperty("--unitone--stairs-step-overflow-volume",g),s(e,[].concat(r(o),["stairs:initialized"]))}}else s(e,[].concat(r(o),["stairs:initialized"]))},O=Symbol.for("@inc2734/unitone-css/layout-initializers"),S=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[O]||(globalThis[O]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[O])},A=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},C=function(e){var t=S();t&&t.initializers.forEach(function(t){A(t,e)})},z=function(){var e=S();e&&(e.pendingNodes.forEach(function(e){C(e)}),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=S();e&&!e.observer&&document.body&&(C(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(z))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))},j=function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=S();if(l&&!l.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,u),l.observer?A(u,document.body):"loading"!==document.readyState?E():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),l.hasDOMContentLoadedListener=!0)}};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}function M(e){return M="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},M(e)}function V(e){var t=function(e,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==M(t)?t:t+""}function N(e,t,n){return(t=V(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}j({key:"behaviors/dividers",selector:'[data-unitone-layout*="-divider:"]',initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){if("data-unitone-layout"===e.attributeName){var n,i,o,l,u=[].concat(r(null!==(n=null==t||null===(i=t.ignore)||void 0===i?void 0:i.layout)&&void 0!==n?n:[]),["divider:initialized","-bol","-linewrap","-stack"]);return(null!==(o=e.target.getAttribute(e.attributeName))&&void 0!==o?o:"").split(" ").filter(function(e){return!u.includes(e)}).join(" ")!==(null!==(l=e.oldValue)&&void 0!==l?l:"").split(" ").filter(function(e){return!u.includes(e)}).join(" ")}if("class"===e.attributeName){var a,d,c,s,f=r(null!==(a=null==t||null===(d=t.ignore)||void 0===d?void 0:d.className)&&void 0!==a?a:[]);return(null!==(c=e.target.getAttribute(e.attributeName))&&void 0!==c?c:"").split(" ").filter(function(e){return!f.includes(e)}).join(" ")!==(null!==(s=e.oldValue)&&void 0!==s?s:"").split(" ").filter(function(e){return!f.includes(e)}).join(" ")}return"style"===e.attributeName};y(e,g,{getResizeValue:p,observeIntersection:!0,observeDirectChildrenResize:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0},shouldApply:function(t){return function(e,t){return e.some(function(e){return"attributes"===e.type&&t(e)})}(t,function(t){return t.target===e&&n(t)})}},directChildMutation:{attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0,shouldApply:n}})}}),j({key:"behaviors/stairs",selector:'[data-unitone-layout*="-stairs:"]',initialize:function(e){y(e,w,{observeIntersection:!0,observeDirectChildrenResize:!0})}});var I=["columnMinWidth","gap","autoRepeat","divider","dividerWidth","dividerStyle","dividerColor","stairs","stairsUp","style"];function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.ResponsiveGrid=function(t){var n=t.columnMinWidth,r=t.gap,i=t.autoRepeat,o=t.divider,l=t.dividerWidth,u=t.dividerStyle,a=t.dividerColor,d=t.stairs,c=t.stairsUp,s=t.style,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,I);return s=L(L({},s),{},{"--unitone--column-min-width":""!==n?n:void 0,"--unitone--divider-width":""!==l?l:void 0,"--unitone--divider-style":""!==u?u:void 0,"--unitone--divider-color":""!==a?a:void 0}),e.createElement("div",P({"data-unitone-layout":["responsive-grid",""!==(null!=r?r:"")?"-gap:".concat(r):void 0,""!==(null!=i?i:"")?"-auto-repeat:".concat(i):void 0,""!==(null!=o?o:"")?"-divider:".concat(o):void 0,""!==(null!=d?d:"")?"-stairs:".concat(d):void 0,""!==(null!=c?c:"")?"-stairs-up:".concat(c):void 0].filter(Boolean).join(" "),style:s},f),f.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){d=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="data-unitone-layout",a="".concat(200,"px 0px"),d=function(e){var t;return(null!==(t=e.getAttribute(u))&&void 0!==t?t:"").split(/\s+/).filter(Boolean)},c=function(e,t){return e.filter((function(e){return!t.includes(e)}))},s=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(u))&&void 0!==n?n:"")!==r&&e.setAttribute(u,r)},f=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,u=!0,a=new ResizeObserver(m((function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var a=r.value,d=null==i?void 0:i(a);u?(n=d,u=!1):void 0!==d&&d===n||(t(a.target,a),n=d)}}catch(e){l.e(e)}finally{l.f()}}),void 0===l?250:l));return a.observe(e),a},v=function(e,t,n){var r=new MutationObserver((function(t){requestAnimationFrame((function(){null!=e&&e.isConnected&&n(t)}))}));return r.observe(e,t),r},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,u=void 0===l?250:l,d=n.observeResize,c=void 0===d||d,s=n.observeIntersection,y=void 0!==s&&s,b=n.observeDirectChildrenResize,p=void 0!==b&&b,g=n.targetMutation,O=n.directChildMutation,w=y&&"undefined"!=typeof IntersectionObserver,A=!w||h(e),S=w&&!A,j=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||A?(S=!1,t(n)):S=!0)},E=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame((function(){r=0,n=null,null!=e&&e.isConnected&&t(e)}))):t(e)}}(e,j),C=function(){null!=e&&e.isConnected&&(!w||A?(S=!0,E()):S=!0)},z=function(){},N=c?p?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,u=n.onChildList,a=new WeakMap,d=new Set,c=new ResizeObserver(m((function(n){var i,l=!1,u=o(n);try{for(u.s();!(i=u.n()).done;){var d=i.value,c=null==r?void 0:r(d);a.has(d.target)?(void 0!==c&&c===a.get(d.target)||(l=!0),a.set(d.target,c)):a.set(d.target,c)}}catch(e){u.e(e)}finally{u.f()}l&&t(e)}),l)),s=function(){var t;Array.from(d).forEach((function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),a.delete(t))})),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){d.has(e)||(c.observe(e),d.add(e))}))};c.observe(e),s();var f=v(e,{childList:!0},(function(n){n.some((function(e){return"childList"===e.type}))&&(s(),null==u||u(n),t(e))}));return{resizeObserver:c,mutationObserver:f}}(e,C,{getValue:r,delay:u,onChildList:function(){z()}}):{resizeObserver:f(e,C,{getValue:r,delay:u})}:{mutationObserver:null};w&&function(e,t){var n=new IntersectionObserver((function(e){var n=i(e,1)[0];n&&t(n)}),{rootMargin:a});n.observe(e)}(e,(function(e){(A=e.isIntersecting)&&S&&C()})),null!=g&&g.options&&v(e,g.options,(function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&C()}));var M=null!=O&&O.attributeFilter&&O.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,u=new MutationObserver((function(n){requestAnimationFrame((function(){null!=e&&e.isConnected&&n.some((function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)}))&&t(e)}))})),a=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})}))};return a(),{observer:u,syncObservedChildren:a}}(e,C,{attributeFilter:O.attributeFilter,shouldApply:O.shouldApply,attributeOldValue:O.attributeOldValue}):null;M&&(z=M.syncObservedChildren),!N.mutationObserver&&M&&v(e,{childList:!0},(function(e){e.some((function(e){return"childList"===e.type}))&&(z(),C())})),w&&!A||j(e)},b=function(e){var t;return null===(t=e.borderBoxSize)||void 0===t?void 0:t[0].inlineSize},p=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},h=function(e){var t;if(!p(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function m(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout((function(){e.apply(l,i)}),t)}}var g=function(e){var t,n=Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]),i=n[0];if(i){var o=c(d(e),["divider:initialized","-stack"]);s(e,o);var l=new Map;if(n.forEach((function(e){var t=c(d(e),["-bol","-linewrap"]);l.set(e,t),s(e,t)})),p(e)){var u,a=i.getBoundingClientRect(),f=n.reduce((function(e,t){var n,r=window.getComputedStyle(t).getPropertyValue("position"),i=window.getComputedStyle(t).getPropertyValue("display");"absolute"!==r&&"fixed"!==r&&"none"!==i&&e.push({child:t,layoutTokens:null!==(n=l.get(t))&&void 0!==n?n:[],rect:t.getBoundingClientRect()});return e}),[]);f.map((function(e,t){var n,i,o=e.child,l=e.layoutTokens,d=e.rect,c=r(l);return(0===t||(null===(n=u)||void 0===n?void 0:n.top)<d.top&&(null===(i=u)||void 0===i?void 0:i.left)>=d.left)&&c.push("-bol"),0<t&&a.top<d.top&&c.push("-linewrap"),u=d,{child:o,layoutTokens:c}})).forEach((function(e){var t=e.child,n=e.layoutTokens;s(t,n)}));var v=f.every((function(e){return e.rect.left===a.left})),y=r(o);v&&y.push("-stack"),y.push("divider:initialized"),s(e,y)}}},O=Symbol.for("@inc2734/unitone-css/layout-initializers"),w=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[O]||(globalThis[O]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[O])},A=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach((function(e){i.add(e)})),i.forEach((function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))}))}},S=function(e){var t=w();t&&t.initializers.forEach((function(t){A(t,e)}))},j=function(){var e=w();e&&(e.pendingNodes.forEach((function(e){S(e)})),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=w();e&&!e.observer&&document.body&&(S(document.body),e.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)}))})),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(j))})),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(null,arguments)}function z(e){return z="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},z(e)}function N(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}function M(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=w();if(l&&!l.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,u),l.observer?A(u,document.body):"loading"!==document.readyState?E():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),l.hasDOMContentLoadedListener=!0)}}({key:"behaviors/dividers",selector:'[data-unitone-layout*="-divider:"]',initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){if("data-unitone-layout"===e.attributeName){var n,i,o,l,u=[].concat(r(null!==(n=null==t||null===(i=t.ignore)||void 0===i?void 0:i.layout)&&void 0!==n?n:[]),["divider:initialized","-bol","-linewrap","-stack"]);return(null!==(o=e.target.getAttribute(e.attributeName))&&void 0!==o?o:"").split(" ").filter((function(e){return!u.includes(e)})).join(" ")!==(null!==(l=e.oldValue)&&void 0!==l?l:"").split(" ").filter((function(e){return!u.includes(e)})).join(" ")}if("class"===e.attributeName){var a,d,c,s,f=r(null!==(a=null==t||null===(d=t.ignore)||void 0===d?void 0:d.className)&&void 0!==a?a:[]);return(null!==(c=e.target.getAttribute(e.attributeName))&&void 0!==c?c:"").split(" ").filter((function(e){return!f.includes(e)})).join(" ")!==(null!==(s=e.oldValue)&&void 0!==s?s:"").split(" ").filter((function(e){return!f.includes(e)})).join(" ")}return"style"===e.attributeName};y(e,g,{getResizeValue:b,observeIntersection:!0,observeDirectChildrenResize:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0},shouldApply:function(t){return function(e,t){return e.some((function(e){return"attributes"===e.type&&t(e)}))}(t,(function(t){return t.target===e&&n(t)}))}},directChildMutation:{attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0,shouldApply:n}})}});var I=["gap","negative","revert","divider","dividerWidth","dividerStyle","dividerColor","tagName","style"];function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}exports.Stack=function(t){var n=t.gap,r=t.negative,i=t.revert,o=t.divider,l=t.dividerWidth,u=t.dividerStyle,a=t.dividerColor,d=t.tagName,c=void 0===d?"div":d,s=t.style,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,I),v=c;return s=L(L({},s),{},{"--unitone--divider-width":""!==l?l:void 0,"--unitone--divider-style":""!==u?u:void 0,"--unitone--divider-color":""!==a?a:void 0}),e.createElement(v,C({"data-unitone-layout":["stack",i?"-revert":void 0,""!==(null!=o?o:"")?"-divider:".concat(o):void 0,""!==(null!=n?n:"")?"-gap:".concat(n):void 0,r?"-negative":void 0].filter(Boolean).join(" "),style:s},f),f.children)};
|
|
1
|
+
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,u=[],a=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(a=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);a=!0);}catch(e){d=!0,i=e}finally{try{if(!a&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return u}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u="data-unitone-layout",a="".concat(200,"px 0px"),d=function(e){var t;return(null!==(t=e.getAttribute(u))&&void 0!==t?t:"").split(/\s+/).filter(Boolean)},c=function(e,t){return e.filter(function(e){return!t.includes(e)})},s=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(u))&&void 0!==n?n:"")!==r&&e.setAttribute(u,r)},f=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,u=!0,a=new ResizeObserver(m(function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var a=r.value,d=null==i?void 0:i(a);u?(n=d,u=!1):void 0!==d&&d===n||(t(a.target,a),n=d)}}catch(e){l.e(e)}finally{l.f()}},void 0===l?250:l));return a.observe(e),a},v=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,u=void 0===l?250:l,d=n.observeResize,c=void 0===d||d,s=n.observeIntersection,y=void 0!==s&&s,b=n.observeDirectChildrenResize,p=void 0!==b&&b,g=n.targetMutation,O=n.directChildMutation,w=y&&"undefined"!=typeof IntersectionObserver,A=!w||h(e),S=w&&!A,j=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!w||A?(S=!1,t(n)):S=!0)},E=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,j),C=function(){null!=e&&e.isConnected&&(!w||A?(S=!0,E()):S=!0)},z=function(){},N=c?p?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,u=n.onChildList,a=new WeakMap,d=new Set,c=new ResizeObserver(m(function(n){var i,l=!1,u=o(n);try{for(u.s();!(i=u.n()).done;){var d=i.value,c=null==r?void 0:r(d);a.has(d.target)?(void 0!==c&&c===a.get(d.target)||(l=!0),a.set(d.target,c)):a.set(d.target,c)}}catch(e){u.e(e)}finally{u.f()}l&&t(e)},l)),s=function(){var t;Array.from(d).forEach(function(t){t.parentElement!==e&&(c.unobserve(t),d.delete(t),a.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){d.has(e)||(c.observe(e),d.add(e))})};c.observe(e),s();var f=v(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(s(),null==u||u(n),t(e))});return{resizeObserver:c,mutationObserver:f}}(e,C,{getValue:r,delay:u,onChildList:function(){z()}}):{resizeObserver:f(e,C,{getValue:r,delay:u})}:{mutationObserver:null};w&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:a});n.observe(e)}(e,function(e){(A=e.isIntersecting)&&S&&C()}),null!=g&&g.options&&v(e,g.options,function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&C()});var M=null!=O&&O.attributeFilter&&O.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,u=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),a=function(){var t;u.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){u.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})})};return a(),{observer:u,syncObservedChildren:a}}(e,C,{attributeFilter:O.attributeFilter,shouldApply:O.shouldApply,attributeOldValue:O.attributeOldValue}):null;M&&(z=M.syncObservedChildren),!N.mutationObserver&&M&&v(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(z(),C())}),w&&!A||j(e)},b=function(e){var t;return null===(t=e.borderBoxSize)||void 0===t?void 0:t[0].inlineSize},p=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},h=function(e){var t;if(!p(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function m(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout(function(){e.apply(l,i)},t)}}var g=function(e){var t,n=Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]),i=n[0];if(i){var o=c(d(e),["divider:initialized","-stack"]);s(e,o);var l=new Map;if(n.forEach(function(e){var t=c(d(e),["-bol","-linewrap"]);l.set(e,t),s(e,t)}),p(e)){var u,a=i.getBoundingClientRect(),f=n.reduce(function(e,t){var n,r=window.getComputedStyle(t).getPropertyValue("position"),i=window.getComputedStyle(t).getPropertyValue("display");"absolute"!==r&&"fixed"!==r&&"none"!==i&&e.push({child:t,layoutTokens:null!==(n=l.get(t))&&void 0!==n?n:[],rect:t.getBoundingClientRect()});return e},[]);f.map(function(e,t){var n,i,o=e.child,l=e.layoutTokens,d=e.rect,c=r(l);return(0===t||(null===(n=u)||void 0===n?void 0:n.top)<d.top&&(null===(i=u)||void 0===i?void 0:i.left)>=d.left)&&c.push("-bol"),0<t&&a.top<d.top&&c.push("-linewrap"),u=d,{child:o,layoutTokens:c}}).forEach(function(e){var t=e.child,n=e.layoutTokens;s(t,n)});var v=f.every(function(e){return e.rect.left===a.left}),y=r(o);v&&y.push("-stack"),y.push("divider:initialized"),s(e,y)}}},O=Symbol.for("@inc2734/unitone-css/layout-initializers"),w=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[O]||(globalThis[O]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[O])},A=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},S=function(e){var t=w();t&&t.initializers.forEach(function(t){A(t,e)})},j=function(){var e=w();e&&(e.pendingNodes.forEach(function(e){S(e)}),e.pendingNodes.clear(),e.rafId=0)},E=function(){var e=w();e&&!e.observer&&document.body&&(S(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(j))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(null,arguments)}function z(e){return z="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},z(e)}function N(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}function M(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=w();if(l&&!l.initializers.has(t)){var u={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,u),l.observer?A(u,document.body):"loading"!==document.readyState?E():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",E,{once:!0}),l.hasDOMContentLoadedListener=!0)}}({key:"behaviors/dividers",selector:'[data-unitone-layout*="-divider:"]',initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(e){if("data-unitone-layout"===e.attributeName){var n,i,o,l,u=[].concat(r(null!==(n=null==t||null===(i=t.ignore)||void 0===i?void 0:i.layout)&&void 0!==n?n:[]),["divider:initialized","-bol","-linewrap","-stack"]);return(null!==(o=e.target.getAttribute(e.attributeName))&&void 0!==o?o:"").split(" ").filter(function(e){return!u.includes(e)}).join(" ")!==(null!==(l=e.oldValue)&&void 0!==l?l:"").split(" ").filter(function(e){return!u.includes(e)}).join(" ")}if("class"===e.attributeName){var a,d,c,s,f=r(null!==(a=null==t||null===(d=t.ignore)||void 0===d?void 0:d.className)&&void 0!==a?a:[]);return(null!==(c=e.target.getAttribute(e.attributeName))&&void 0!==c?c:"").split(" ").filter(function(e){return!f.includes(e)}).join(" ")!==(null!==(s=e.oldValue)&&void 0!==s?s:"").split(" ").filter(function(e){return!f.includes(e)}).join(" ")}return"style"===e.attributeName};y(e,g,{getResizeValue:b,observeIntersection:!0,observeDirectChildrenResize:!0,targetMutation:{options:{attributes:!0,attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0},shouldApply:function(t){return function(e,t){return e.some(function(e){return"attributes"===e.type&&t(e)})}(t,function(t){return t.target===e&&n(t)})}},directChildMutation:{attributeFilter:["style","data-unitone-layout","class"],attributeOldValue:!0,shouldApply:n}})}});var I=["gap","negative","revert","divider","dividerWidth","dividerStyle","dividerColor","tagName","style"];function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach(function(t){M(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.Stack=function(t){var n=t.gap,r=t.negative,i=t.revert,o=t.divider,l=t.dividerWidth,u=t.dividerStyle,a=t.dividerColor,d=t.tagName,c=void 0===d?"div":d,s=t.style,f=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,I),v=c;return s=L(L({},s),{},{"--unitone--divider-width":""!==l?l:void 0,"--unitone--divider-style":""!==u?u:void 0,"--unitone--divider-color":""!==a?a:void 0}),e.createElement(v,C({"data-unitone-layout":["stack",i?"-revert":void 0,""!==(null!=o?o:"")?"-divider:".concat(o):void 0,""!==(null!=n?n:"")?"-gap:".concat(n):void 0,r?"-negative":void 0].filter(Boolean).join(" "),style:s},f),f.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a="data-unitone-layout",u="".concat(200,"px 0px"),c=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(a))&&void 0!==n?n:"")!==r&&e.setAttribute(a,r)},s=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,a=!0,u=new ResizeObserver(p((function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var u=r.value,c=null==i?void 0:i(u);a?(n=c,a=!1):void 0!==c&&c===n||(t(u.target,u),n=c)}}catch(e){l.e(e)}finally{l.f()}}),void 0===l?250:l));return u.observe(e),u},d=function(e,t,n){var r=new MutationObserver((function(t){requestAnimationFrame((function(){null!=e&&e.isConnected&&n(t)}))}));return r.observe(e,t),r},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,a=void 0===l?250:l,c=n.observeResize,f=void 0===c||c,v=n.observeIntersection,b=void 0!==v&&v,m=n.observeDirectChildrenResize,h=void 0!==m&&m,g=n.targetMutation,w=n.directChildMutation,O=b&&"undefined"!=typeof IntersectionObserver,S=!O||y(e),A=O&&!S,E=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||S?(A=!1,t(n)):A=!0)},C=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame((function(){r=0,n=null,null!=e&&e.isConnected&&t(e)}))):t(e)}}(e,E),j=function(){null!=e&&e.isConnected&&(!O||S?(A=!0,C()):A=!0)},z=function(){},P=f?h?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,a=n.onChildList,u=new WeakMap,c=new Set,s=new ResizeObserver(p((function(n){var i,l=!1,a=o(n);try{for(a.s();!(i=a.n()).done;){var c=i.value,s=null==r?void 0:r(c);u.has(c.target)?(void 0!==s&&s===u.get(c.target)||(l=!0),u.set(c.target,s)):u.set(c.target,s)}}catch(e){a.e(e)}finally{a.f()}l&&t(e)}),l)),f=function(){var t;Array.from(c).forEach((function(t){t.parentElement!==e&&(s.unobserve(t),c.delete(t),u.delete(t))})),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){c.has(e)||(s.observe(e),c.add(e))}))};s.observe(e),f();var v=d(e,{childList:!0},(function(n){n.some((function(e){return"childList"===e.type}))&&(f(),null==a||a(n),t(e))}));return{resizeObserver:s,mutationObserver:v}}(e,j,{getValue:r,delay:a,onChildList:function(){z()}}):{resizeObserver:s(e,j,{getValue:r,delay:a})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver((function(e){var n=i(e,1)[0];n&&t(n)}),{rootMargin:u});n.observe(e)}(e,(function(e){(S=e.isIntersecting)&&A&&j()})),null!=g&&g.options&&d(e,g.options,(function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&j()}));var I=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,a=new MutationObserver((function(n){requestAnimationFrame((function(){null!=e&&e.isConnected&&n.some((function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)}))&&t(e)}))})),u=function(){var t;a.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach((function(e){a.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})}))};return u(),{observer:a,syncObservedChildren:u}}(e,j,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;I&&(z=I.syncObservedChildren),!P.mutationObserver&&I&&d(e,{childList:!0},(function(e){e.some((function(e){return"childList"===e.type}))&&(z(),j())})),O&&!S||E(e)},v=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},y=function(e){var t;if(!v(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function p(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout((function(){e.apply(l,i)}),t)}}var b=function(e){var t,n,i,o,l,u=Array.from(e.children),s=(i=(null!==(l=e.getAttribute(a))&&void 0!==l?l:"").split(/\s+/).filter(Boolean),o=["stairs:initialized"],i.filter((function(e){return!o.includes(e)})));c(e,s);var d=u[0];if(d){if(e.style.removeProperty("--unitone--stairs-step-overflow-volume"),e.style.removeProperty("--unitone--max-stairs-step"),u.forEach((function(e){e.style.removeProperty("--unitone--stairs-step")})),v(e)){var f,y=null===(t=(null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).find((function(e){return e.startsWith("-stairs-up:")})))||void 0===t?void 0:t.replace("-stairs-up:",""),p=["up-down","down-up"].includes(y),b=window.getComputedStyle(e).getPropertyValue("flex-direction"),m=e.getBoundingClientRect().bottom,h=u.reduce((function(e,t){var n=window.getComputedStyle(t).getPropertyValue("position"),r=window.getComputedStyle(t).getPropertyValue("display");return"absolute"===n||"fixed"===n||"none"===r||e.push({child:t,rect:t.getBoundingClientRect()}),e}),[]),g=0,w=g;h.map((function(e,t){var n,r,i=e.child,o=e.rect,l="row-reverse"===b?(null===(n=f)||void 0===n?void 0:n.left)<=o.left:(null===(r=f)||void 0===r?void 0:r.left)>=o.left;return 0===t||d===i&&!f||l?g=0:p?g=0===g?1:0:g++,f=o,g>w&&(w=g),{child:i,stairsStep:g}})).forEach((function(e){var t=e.child,n=e.stairsStep;t.style.setProperty("--unitone--stairs-step",n)})),e.style.setProperty("--unitone--max-stairs-step",w);var O=h.reduce((function(e,t){var n=t.child.getBoundingClientRect().bottom-m;return e>n?e:n}),0);e.style.setProperty("--unitone--stairs-step-overflow-volume",O),c(e,[].concat(r(s),["stairs:initialized"]))}}else c(e,[].concat(r(s),["stairs:initialized"]))},m=Symbol.for("@inc2734/unitone-css/layout-initializers"),h=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[m]||(globalThis[m]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[m])},g=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach((function(e){i.add(e)})),i.forEach((function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))}))}},w=function(e){var t=h();t&&t.initializers.forEach((function(t){g(t,e)}))},O=function(){var e=h();e&&(e.pendingNodes.forEach((function(e){w(e)})),e.pendingNodes.clear(),e.rafId=0)},S=function(){var e=h();e&&!e.observer&&document.body&&(w(document.body),e.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)}))})),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(O))})),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(null,arguments)}function E(e){return E="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},E(e)}function C(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}function j(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=h();if(l&&!l.initializers.has(t)){var a={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,a),l.observer?g(a,document.body):"loading"!==document.readyState?S():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",S,{once:!0}),l.hasDOMContentLoadedListener=!0)}}({key:"behaviors/stairs",selector:'[data-unitone-layout*="-stairs:"]',initialize:function(e){f(e,b,{observeIntersection:!0,observeDirectChildrenResize:!0})}});var z=["gap","columnGap","rowGap","limit","revert","threshold","alignItems","stairs","stairsUp","style"];function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}exports.Switcher=function(t){var n=t.gap,r=t.columnGap,i=t.rowGap;t.limit;var o=t.revert,l=t.threshold,a=t.alignItems,u=t.stairs,c=t.stairsUp,s=t.style,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,z);return s=I(I({},s),{},{"--unitone--threshold":""!==l?l:void 0}),e.createElement("div",A({"data-unitone-layout":["switcher",o?"-revert":void 0,""!==(null!=n?n:"")?"-gap:".concat(n):void 0,""!==(null!=r?r:"")?"-column-gap:".concat(r):void 0,""!==(null!=i?i:"")?"-row-gap:".concat(i):void 0,""!==(null!=a?a:"")?"-align-items:".concat(a):void 0,""!==(null!=u?u:"")?"-stairs:".concat(u):void 0,""!==(null!=c?c:"")?"-stairs-up:".concat(c):void 0].filter(Boolean).join(" "),style:s},d),d.children)};
|
|
1
|
+
"use strict";var e=require("react");function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);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)?t(e,n):void 0}}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||n(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 o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t){n&&(e=n);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 o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a="data-unitone-layout",u="".concat(200,"px 0px"),c=function(e,t){var n,r=t.filter(Boolean).join(" ");(null!==(n=e.getAttribute(a))&&void 0!==n?n:"")!==r&&e.setAttribute(a,r)},s=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getValue,l=r.delay,a=!0,u=new ResizeObserver(p(function(e){var r,l=o(e);try{for(l.s();!(r=l.n()).done;){var u=r.value,c=null==i?void 0:i(u);a?(n=c,a=!1):void 0!==c&&c===n||(t(u.target,u),n=c)}}catch(e){l.e(e)}finally{l.f()}},void 0===l?250:l));return u.observe(e),u},d=function(e,t,n){var r=new MutationObserver(function(t){requestAnimationFrame(function(){null!=e&&e.isConnected&&n(t)})});return r.observe(e,t),r},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getResizeValue,l=n.delay,a=void 0===l?250:l,c=n.observeResize,f=void 0===c||c,v=n.observeIntersection,b=void 0!==v&&v,m=n.observeDirectChildrenResize,h=void 0!==m&&m,g=n.targetMutation,w=n.directChildMutation,O=b&&"undefined"!=typeof IntersectionObserver,S=!O||y(e),A=O&&!S,E=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e;null!=n&&n.isConnected&&(!O||S?(A=!1,t(n)):A=!0)},C=function(e,t){var n,r=0;return function(){var i,o;null!==(o=n=null==e||null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)&&void 0!==o&&o.requestAnimationFrame?r||(r=n.requestAnimationFrame(function(){r=0,n=null,null!=e&&e.isConnected&&t(e)})):t(e)}}(e,E),j=function(){null!=e&&e.isConnected&&(!O||S?(A=!0,C()):A=!0)},z=function(){},P=f?h?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getValue,i=n.delay,l=void 0===i?250:i,a=n.onChildList,u=new WeakMap,c=new Set,s=new ResizeObserver(p(function(n){var i,l=!1,a=o(n);try{for(a.s();!(i=a.n()).done;){var c=i.value,s=null==r?void 0:r(c);u.has(c.target)?(void 0!==s&&s===u.get(c.target)||(l=!0),u.set(c.target,s)):u.set(c.target,s)}}catch(e){a.e(e)}finally{a.f()}l&&t(e)},l)),f=function(){var t;Array.from(c).forEach(function(t){t.parentElement!==e&&(s.unobserve(t),c.delete(t),u.delete(t))}),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){c.has(e)||(s.observe(e),c.add(e))})};s.observe(e),f();var v=d(e,{childList:!0},function(n){n.some(function(e){return"childList"===e.type})&&(f(),null==a||a(n),t(e))});return{resizeObserver:s,mutationObserver:v}}(e,j,{getValue:r,delay:a,onChildList:function(){z()}}):{resizeObserver:s(e,j,{getValue:r,delay:a})}:{mutationObserver:null};O&&function(e,t){var n=new IntersectionObserver(function(e){var n=i(e,1)[0];n&&t(n)},{rootMargin:u});n.observe(e)}(e,function(e){(S=e.isIntersecting)&&A&&j()}),null!=g&&g.options&&d(e,g.options,function(e){var t,n;(null!==(t=null===(n=g.shouldApply)||void 0===n?void 0:n.call(g,e))&&void 0!==t?t:0<e.length)&&j()});var I=null!=w&&w.attributeFilter&&w.shouldApply?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.attributeFilter,i=n.shouldApply,o=n.attributeOldValue,l=void 0===o||o,a=new MutationObserver(function(n){requestAnimationFrame(function(){null!=e&&e.isConnected&&n.some(function(t){return"attributes"===t.type&&t.target.parentElement===e&&i(t)})&&t(e)})}),u=function(){var t;a.disconnect(),Array.from(null!==(t=null==e?void 0:e.children)&&void 0!==t?t:[]).forEach(function(e){a.observe(e,{attributes:!0,attributeFilter:r,attributeOldValue:l})})};return u(),{observer:a,syncObservedChildren:u}}(e,j,{attributeFilter:w.attributeFilter,shouldApply:w.shouldApply,attributeOldValue:w.attributeOldValue}):null;I&&(z=I.syncObservedChildren),!P.mutationObserver&&I&&d(e,{childList:!0},function(e){e.some(function(e){return"childList"===e.type})&&(z(),j())}),O&&!S||E(e)},v=function(e){return!(null==e||!e.isConnected)&&0<e.getClientRects().length},y=function(e){var t;if(!v(e))return!1;var n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!n)return!0;var r=e.getBoundingClientRect(),i=n.innerWidth,o=n.innerHeight;return r.bottom>-200&&r.right>0&&r.top<o+200&&r.left<i};function p(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout(function(){e.apply(l,i)},t)}}var b=function(e){var t,n,i,o,l,u=Array.from(e.children),s=(i=(null!==(l=e.getAttribute(a))&&void 0!==l?l:"").split(/\s+/).filter(Boolean),o=["stairs:initialized"],i.filter(function(e){return!o.includes(e)}));c(e,s);var d=u[0];if(d){if(e.style.removeProperty("--unitone--stairs-step-overflow-volume"),e.style.removeProperty("--unitone--max-stairs-step"),u.forEach(function(e){e.style.removeProperty("--unitone--stairs-step")}),v(e)){var f,y=null===(t=(null!==(n=e.getAttribute("data-unitone-layout"))&&void 0!==n?n:"").split(/\s+/).find(function(e){return e.startsWith("-stairs-up:")}))||void 0===t?void 0:t.replace("-stairs-up:",""),p=["up-down","down-up"].includes(y),b=window.getComputedStyle(e).getPropertyValue("flex-direction"),m=e.getBoundingClientRect().bottom,h=u.reduce(function(e,t){var n=window.getComputedStyle(t).getPropertyValue("position"),r=window.getComputedStyle(t).getPropertyValue("display");return"absolute"===n||"fixed"===n||"none"===r||e.push({child:t,rect:t.getBoundingClientRect()}),e},[]),g=0,w=g;h.map(function(e,t){var n,r,i=e.child,o=e.rect,l="row-reverse"===b?(null===(n=f)||void 0===n?void 0:n.left)<=o.left:(null===(r=f)||void 0===r?void 0:r.left)>=o.left;return 0===t||d===i&&!f||l?g=0:p?g=0===g?1:0:g++,f=o,g>w&&(w=g),{child:i,stairsStep:g}}).forEach(function(e){var t=e.child,n=e.stairsStep;t.style.setProperty("--unitone--stairs-step",n)}),e.style.setProperty("--unitone--max-stairs-step",w);var O=h.reduce(function(e,t){var n=t.child.getBoundingClientRect().bottom-m;return e>n?e:n},0);e.style.setProperty("--unitone--stairs-step-overflow-volume",O),c(e,[].concat(r(s),["stairs:initialized"]))}}else c(e,[].concat(r(s),["stairs:initialized"]))},m=Symbol.for("@inc2734/unitone-css/layout-initializers"),h=function(){return"undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof MutationObserver||"undefined"==typeof Node?null:(globalThis[m]||(globalThis[m]={initializers:new Map,pendingNodes:new Set,observer:null,rafId:0,hasDOMContentLoadedListener:!1}),globalThis[m])},g=function(e,t){var n,r;if(e.enabled()&&(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE){var i=new Set;null!==(n=t.matches)&&void 0!==n&&n.call(t,e.selector)&&i.add(t),null===(r=t.querySelectorAll)||void 0===r||r.call(t,e.selector).forEach(function(e){i.add(e)}),i.forEach(function(t){e.initialized.has(t)||(e.initialize(t),e.initialized.add(t))})}},w=function(e){var t=h();t&&t.initializers.forEach(function(t){g(t,e)})},O=function(){var e=h();e&&(e.pendingNodes.forEach(function(e){w(e)}),e.pendingNodes.clear(),e.rafId=0)},S=function(){var e=h();e&&!e.observer&&document.body&&(w(document.body),e.observer=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE&&e.pendingNodes.add(t)})}),!e.rafId&&0<e.pendingNodes.size&&(e.rafId=requestAnimationFrame(O))}),e.observer.observe(document.body,{childList:!0,subtree:!0}))};function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(null,arguments)}function E(e){return E="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},E(e)}function C(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}function j(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=e.key,n=e.selector,r=e.initialize,i=e.enabled,o=void 0===i?function(){return!0}:i,l=h();if(l&&!l.initializers.has(t)){var a={selector:n,initialize:r,enabled:o,initialized:new WeakSet};l.initializers.set(t,a),l.observer?g(a,document.body):"loading"!==document.readyState?S():l.hasDOMContentLoadedListener||(document.addEventListener("DOMContentLoaded",S,{once:!0}),l.hasDOMContentLoadedListener=!0)}}({key:"behaviors/stairs",selector:'[data-unitone-layout*="-stairs:"]',initialize:function(e){f(e,b,{observeIntersection:!0,observeDirectChildrenResize:!0})}});var z=["gap","columnGap","rowGap","limit","revert","threshold","alignItems","stairs","stairsUp","style"];function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.Switcher=function(t){var n=t.gap,r=t.columnGap,i=t.rowGap;t.limit;var o=t.revert,l=t.threshold,a=t.alignItems,u=t.stairs,c=t.stairsUp,s=t.style,d=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,z);return s=I(I({},s),{},{"--unitone--threshold":""!==l?l:void 0}),e.createElement("div",A({"data-unitone-layout":["switcher",o?"-revert":void 0,""!==(null!=n?n:"")?"-gap:".concat(n):void 0,""!==(null!=r?r:"")?"-column-gap:".concat(r):void 0,""!==(null!=i?i:"")?"-row-gap:".concat(i):void 0,""!==(null!=a?a:"")?"-align-items:".concat(a):void 0,""!==(null!=u?u:"")?"-stairs:".concat(u):void 0,""!==(null!=c?c:"")?"-stairs-up:".concat(c):void 0].filter(Boolean).join(" "),style:s},d),d.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["center","column","applyGap","gap","gutters","maxWidth","columnWidth","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(
|
|
1
|
+
"use strict";var t=require("react");function r(){return r=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},r.apply(null,arguments)}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r);if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function o(t,r,e){return(r=n(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var i=["center","column","applyGap","gap","gutters","maxWidth","columnWidth","style"];function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,n)}return e}function c(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?u(Object(e),!0).forEach(function(r){o(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}exports.Text=function(e){var n=e.center,o=e.column,u=e.applyGap,l=e.gap,a=e.gutters,f=e.maxWidth,p=e.columnWidth,y=e.style,b=function(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==r.indexOf(n))continue;e[n]=t[n]}return e}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],-1===r.indexOf(e)&&{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(e,i);return y=c(c({},y),{},{"--unitone--max-width":""!==f?f:void 0,"--unitone--column-width":""!==p?p:void 0}),t.createElement("div",r({"data-unitone-layout":["text",n?"-center":void 0,o?"-column":void 0,u?"-gap":void 0,""!==(null!=l?l:"")?"-gap:".concat(l):void 0,""!==(null!=a?a:"")?"-gutters:".concat(a):void 0].filter(Boolean).join(" "),style:y},b),b.children)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("react");function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(null,arguments)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function n(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=["texture","textureColor","textureGap","textureSize","textureTop","textureRight","textureBottom","textureLeft","textureBorderRadius","textureBorderTopLeftRadius","textureBorderTopRightRadius","textureBorderBottomLeftRadius","textureBorderBottomRightRadius","textureBandTopSize","textureBandBottomSize","style"];function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(
|
|
1
|
+
"use strict";var t=require("react");function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(null,arguments)}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function n(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=["texture","textureColor","textureGap","textureSize","textureTop","textureRight","textureBottom","textureLeft","textureBorderRadius","textureBorderTopLeftRadius","textureBorderTopRightRadius","textureBorderBottomLeftRadius","textureBorderBottomRightRadius","textureBandTopSize","textureBandBottomSize","style"];function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,o)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach(function(e){n(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}exports.Texture=function(r){var o=r.texture,n=r.textureColor,i=r.textureGap,d=r.textureSize,l=r.textureTop,c=r.textureRight,f=r.textureBottom,s=r.textureLeft,x=r.textureBorderRadius,b=r.textureBorderTopLeftRadius,p=r.textureBorderTopRightRadius,y=r.textureBorderBottomLeftRadius,v=r.textureBorderBottomRightRadius,m=r.textureBandTopSize,O=r.textureBandBottomSize,g=r.style,B=function(t,e){if(null==t)return{};var r,o,n=function(t,e){if(null==t)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(-1!==e.indexOf(o))continue;r[o]=t[o]}return r}(t,e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)r=u[o],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}(r,u);return g=a(a({},g),{},{"--unitone--texture-color":""!==n?n:void 0,"--unitone--texture-gap":""!==i?i:void 0,"--unitone--texture-size":""!==d?d:void 0,"--unitone--texture-top":""!==l?l:void 0,"--unitone--texture-right":""!==c?c:void 0,"--unitone--texture-bottom":""!==f?f:void 0,"--unitone--texture-left":""!==s?s:void 0,"--unitone--texture-border-radius":""!==x?x:void 0,"--unitone--texture-border-top-left-radius":""!==b?b:void 0,"--unitone--texture-border-top-right-radius":""!==p?p:void 0,"--unitone--texture-border-bottom-left-radius":""!==y?y:void 0,"--unitone--texture-border-bottom-right-radius":""!==v?v:void 0,"--unitone--texture-band-top-size":""!==m?m:void 0,"--unitone--texture-band-bottom-size":""!==O?O:void 0}),t.createElement("div",e({"data-unitone-layout":["texture",""!==(null!=o?o:"")?"-texture:".concat(o):void 0].filter(Boolean).join(" "),style:g},B),B.children)};
|