@ulu/frontend
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -20,2 +20,4 @@ # Change Log | ||
- Added utils.map-merge($map, $changes, $mode) | ||
- This is a **breaking change** | ||
- Update all mixins with merge arguments (button > set-styles, typography > set-sizes, etc), to use a single string argument if a merge strategy is needed. If $deep and $over-write are set you need to choose one, if they are unset or false just remove them, this will use the default map.merge. | ||
- This will allow expansion if needed and is simpler for modules to implement | ||
@@ -22,0 +24,0 @@ - This is to replace utils.map-merge-or-overwrite which is deprecated now |
@@ -1,1 +0,1 @@ | ||
!function(){var t={398:function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(Element.prototype.matches.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null})}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}!function(){"use strict";n(398);var t,e,i,o,r,a={pageModified:function(t){t.dispatchEvent(new Event(s("pageModified"),{bubbles:!0}))},pageResized:function(t){t.dispatchEvent(new Event(s("pageResized"),{bubbles:!0}))}};function s(t){return"ulu:"+t}function u(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function l(t){return l="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},l(t)}window.addEventListener("resize",(t=function(){return t="pageResized",e=document,void(a[t]?a[t](e):console.warn("Unable to dispatch site event: ".concat(t," in context:"),e));var t,e},e=250,function(){var n=o||this,a=arguments,s=i&&!r;clearTimeout(r),r=setTimeout((function(){r=null,i||t.apply(n,a)}),e),s&&t.apply(n,a)}));var f={debug:!1,warningsAlways:!0,errorsAlways:!0,outputContext:!1},h="console"in window;function p(t){return h&&f.debug&&((null==t?void 0:t.debug)||null==t)}function d(t,e,n){var i,o,r=function(t){var e;return"object"===l(t)&&(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name)}(e)||"Logger";(i=console)[t].apply(i,[r].concat(function(t){if(Array.isArray(t))return c(t)}(o=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(o)||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.")}())),f.outputContext&&console.log("Context:\n",e)}function y(t){if(p(t)){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];d("log",t,n)}}function m(t){if(f.errorsAlways||p(t)){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];d("error",t,n)}}function v(t){return v="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},v(t)}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==v(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===v(o)?o:String(o)),i)}var o}function w(t,e,n){return e&&g(t.prototype,e),n&&g(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}window.addEventListener(s("pageResized"),(function(){k.instances.forEach((function(t){return t.update()}))}));var k=function(){function t(e){var n=this;b(this,t),e.order||m(this,"Missing order (required)!"),Object.assign(this,t.defaults,e),this.active=null,this.previous=null,this.activeIndex=null,this.resizeDirection=null,this.previousIndex=null,this.breakpoints={},this.order.forEach((function(t){return n.breakpoints[t]=new x(t,n)})),y(this,this),this.update(),t.instances.push(this)}return w(t,[{key:"getBreakpoint",value:function(){return window.getComputedStyle(this.element,this.psuedoSelector).content.replace(/^"|"$/g,"")}},{key:"update",value:function(){var t=this,e=this.getBreakpoint();if(e!==this.active){this.previous=this.active,this.previousIndex=this.activeIndex;var n=this.order.indexOf(e);this.active=e,this.activeIndex=n;var i=this.at(this.active),o=function(e){return t.at(e)},r=this.order.slice(n).map(o),a=this.order.slice(0,n).map(o),s=this.order.slice(0,n+1).map(o),u=this.order.slice(n+1).map(o),c=this.order.slice().map(o);c.splice(n,1),y(this,"max:",r.map((function(t){return t.name})).join()),y(this,"min:",s.map((function(t){return t.name})).join()),r.forEach((function(t){return t._setDirection("max",!0)})),s.forEach((function(t){return t._setDirection("min",!0)})),i._setDirection("only",!0),a.forEach((function(t){return t._setDirection("max",!1)})),u.forEach((function(t){return t._setDirection("min",!1)})),c.forEach((function(t){return t._setDirection("only",!1)})),null!==this.previousIndex&&(this.resizeDirection=this.previousIndex<n?"up":"down")}}},{key:"at",value:function(t){var e=this.breakpoints[t];return t||m(this,"Unable to find breakpoint for:",e),e}}]),t}();k.instances=[],k.defaults={element:document.body,psuedoSelector:":before",debug:!1};var E=function(){function t(e,n){b(this,t),this.direction=e,this.active=!1,this.on=[],this.off=[],this.breakpoint=n}return w(t,[{key:"change",value:function(t){this.active!==t&&(t?this._call(!0):this.active&&this._call(!1),this.active=t)}},{key:"_call",value:function(t){(t?this.on:this.off).forEach((function(t){return t()})),y(this.breakpoint._manager,"Handlers called (".concat(t?"on":"off","): ").concat(this.direction))}},{key:"getHandlers",value:function(t){return"object"!==v(t)?{on:t}:t}},{key:"add",value:function(t){var e=this.getHandlers(t);e.on&&this.on.push(e.on),e.off&&this.off.push(e.off),this.active&&e.on&&(e.on(),y(this.breakpoint._manager,"Handler called immediately: ".concat(this.direction),e.on))}},{key:"remove",value:function(t){var e=this.getHandlers(t);e.on&&u(this.on,e.on),e.off&&u(this.off,e.off)}}]),t}(),x=function(){function t(e,n){b(this,t),this.directions={max:new E("max",this),min:new E("min",this),only:new E("only",this)},this._manager=n,this.name=e}return w(t,[{key:"_setDirection",value:function(t,e){this.directions[t].change(e)}},{key:"max",value:function(t){this.directions.max.add(t)}},{key:"min",value:function(t){this.directions.min.add(t)}},{key:"only",value:function(t){this.directions.only.add(t)}},{key:"remove",value:function(t,e){(e?[e]:["max","min","only"]).forEach((function(e){return e.remove(t)}))}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.unshift("Breakpoint (".concat(this.name,"):")),this._manager.log.apply(this._manager,e)}}]),t}()}()}(); | ||
var w=Object.defineProperty;var E=(i,e,t)=>e in i?w(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var f=(i,e,t)=>(E(i,typeof e!="symbol"?e+"":e,t),t);function m(i,e){var t=i.indexOf(e);t>-1&&i.splice(t,1)}function x(i,e,t,o){var s;return function(){var h=o||this,a=arguments,d=function(){s=null,t||i.apply(h,a)},l=t&&!s;clearTimeout(s),s=setTimeout(d,e),l&&i.apply(h,a)}}const b={pageModified(i){i.dispatchEvent(new Event(g("pageModified"),{bubbles:!0}))},pageResized(i){i.dispatchEvent(new Event(g("pageResized"),{bubbles:!0}))}};window.addEventListener("resize",x(()=>C("pageResized",document),250));function C(i,e){b[i]?b[i](e):console.warn(`Unable to dispatch site event: ${i} in context:`,e)}function g(i){return"ulu:"+i}const I={debug:!1,warningsAlways:!0,errorsAlways:!0,outputContext:!1},_="console"in window;function D(i){return _&&I.debug&&((i==null?void 0:i.debug)||i==null)}function B(i){var e;return typeof i=="object"&&((e=i==null?void 0:i.constructor)==null?void 0:e.name)}function y(i,e,t){const o=B(e)||"Logger";console[i](o,...t)}function c(i,...e){D(i)&&y("log",i,e)}function k(i,...e){y("error",i,e)}window.addEventListener(g("pageResized"),()=>{v.instances.forEach(i=>i.update())});const r=class r{constructor(e){Object.assign(this,r.defaults,e),this.active=null,this.previous=null,this.activeIndex=null,this.resizeDirection=null,this.previousIndex=null,this.breakpoints={},this.onChangeCallbacks=[],this.order.forEach(t=>this.breakpoints[t]=new P(t,this)),c(this,this),this.update(),r.instances.push(this)}onChange(e){this.onChangeCallbacks.push(e)}removeOnChange(e){m(this.onChangeCallbacks,e)}getBreakpointInPsuedo(){return window.getComputedStyle(this.element,this.psuedoSelector).content.replace(/^"|"$/g,"")}getBreakpointInProperty(){return getComputedStyle(this.element).getPropertyValue(this.customProperty)}getBreakpoint(){return this.valueFromPsuedo?this.getBreakpointInPsuedo():this.getBreakpointInProperty()}update(){const e=this.getBreakpoint();if(!e){k(this,"Unable to get current breakpoint, maybe order is incorrect? Breakpoint check skipped!");return}if(e===this.active)return;this.previous=this.active,this.previousIndex=this.activeIndex;const t=this.order.indexOf(e);this.active=e,this.activeIndex=t;const o=this.at(this.active),s=n=>this.at(n),u=this.order.slice(t).map(s),h=this.order.slice(0,t).map(s),a=this.order.slice(0,t+1).map(s),d=this.order.slice(t+1).map(s),l=this.order.slice().map(s);l.splice(t,1),c(this,"max:",u.map(n=>n.name).join()),c(this,"min:",a.map(n=>n.name).join()),u.forEach(n=>n._setDirection("max",!0)),a.forEach(n=>n._setDirection("min",!0)),o._setDirection("only",!0),h.forEach(n=>n._setDirection("max",!1)),d.forEach(n=>n._setDirection("min",!1)),l.forEach(n=>n._setDirection("only",!1)),this.previousIndex!==null&&(this.resizeDirection=this.previousIndex<t?"up":"down"),this.onChangeCallbacks.forEach(n=>n(this))}at(e){const t=this.breakpoints[e];return e||k(this,"Unable to find breakpoint for:",t),t}};f(r,"instances",[]),f(r,"defaults",{element:document.documentElement,valueFromPsuedo:!1,customProperty:"--breakpoint",psuedoSelector:":before",order:["none","small","medium","large"],debug:!1});let v=r;class p{constructor(e,t){this.direction=e,this.active=!1,this.on=[],this.off=[],this.breakpoint=t}change(e){this.active!==e&&(e?this._call(!0):this.active&&this._call(!1),this.active=e)}_call(e){(e?this.on:this.off).forEach(o=>o()),c(this.breakpoint._manager,`Handlers called (${e?"on":"off"}): ${this.direction}`)}getHandlers(e){return typeof e!="object"?{on:e}:e}add(e){const t=this.getHandlers(e);t.on&&this.on.push(t.on),t.off&&this.off.push(t.off),this.active&&t.on&&(t.on(),c(this.breakpoint._manager,`Handler called immediately: ${this.direction}`,t.on))}remove(e){const t=this.getHandlers(e);t.on&&m(this.on,t.on),t.off&&m(this.off,t.off)}}class P{constructor(e,t){this.directions={max:new p("max",this),min:new p("min",this),only:new p("only",this)},this._manager=t,this.name=e}_setDirection(e,t){this.directions[e].change(t)}max(e){this.directions.max.add(e)}min(e){this.directions.min.add(e)}only(e){this.directions.only.add(e)}remove(e,t){(t?[t]:["max","min","only"]).forEach(s=>s.remove(e))}log(...e){e.unshift(`Breakpoint (${this.name}):`),this._manager.log.apply(this._manager,e)}} |
{ | ||
"name": "@ulu/frontend", | ||
"version": "0.0.17", | ||
"description": "Theming library", | ||
"version": "0.0.18", | ||
"description": "Modular Sass Theming Library", | ||
"browser": "js/index.js", | ||
@@ -24,2 +24,3 @@ "main": "index.js", | ||
"scripts": { | ||
"build" : "vite build", | ||
"docs:dev": "vitepress dev docs-src", | ||
@@ -39,2 +40,6 @@ "docs:build": "vitepress build docs-src", | ||
"SCSS", | ||
"sass", | ||
"breakpoints", | ||
"theme", | ||
"modules", | ||
"javascript", | ||
@@ -55,3 +60,3 @@ "framework", | ||
"@ulu/vitepress-auto-menus": "^0.0.3", | ||
"@ulu/vitepress-sassdoc": "^0.0.6", | ||
"@ulu/vitepress-sassdoc": "^0.0.7", | ||
"clean-jsdoc-theme": "^4.2.17", | ||
@@ -66,4 +71,6 @@ "fs-extra": "^11.2.0", | ||
"dependencies": { | ||
"@ulu/utils": "^0.0.6" | ||
"@ulu/utils": "^0.0.6", | ||
"autoprefixer": "^10.4.16", | ||
"vite": "^5.0.10" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303050
116
3910
3
+ Addedautoprefixer@^10.4.16
+ Addedvite@^5.0.10
+ Added@esbuild/aix-ppc64@0.21.5(transitive)
+ Added@esbuild/android-arm@0.21.5(transitive)
+ Added@esbuild/android-arm64@0.21.5(transitive)
+ Added@esbuild/android-x64@0.21.5(transitive)
+ Added@esbuild/darwin-arm64@0.21.5(transitive)
+ Added@esbuild/darwin-x64@0.21.5(transitive)
+ Added@esbuild/freebsd-arm64@0.21.5(transitive)
+ Added@esbuild/freebsd-x64@0.21.5(transitive)
+ Added@esbuild/linux-arm@0.21.5(transitive)
+ Added@esbuild/linux-arm64@0.21.5(transitive)
+ Added@esbuild/linux-ia32@0.21.5(transitive)
+ Added@esbuild/linux-loong64@0.21.5(transitive)
+ Added@esbuild/linux-mips64el@0.21.5(transitive)
+ Added@esbuild/linux-ppc64@0.21.5(transitive)
+ Added@esbuild/linux-riscv64@0.21.5(transitive)
+ Added@esbuild/linux-s390x@0.21.5(transitive)
+ Added@esbuild/linux-x64@0.21.5(transitive)
+ Added@esbuild/netbsd-x64@0.21.5(transitive)
+ Added@esbuild/openbsd-x64@0.21.5(transitive)
+ Added@esbuild/sunos-x64@0.21.5(transitive)
+ Added@esbuild/win32-arm64@0.21.5(transitive)
+ Added@esbuild/win32-ia32@0.21.5(transitive)
+ Added@esbuild/win32-x64@0.21.5(transitive)
+ Added@rollup/rollup-android-arm-eabi@4.27.3(transitive)
+ Added@rollup/rollup-android-arm64@4.27.3(transitive)
+ Added@rollup/rollup-darwin-arm64@4.27.3(transitive)
+ Added@rollup/rollup-darwin-x64@4.27.3(transitive)
+ Added@rollup/rollup-freebsd-arm64@4.27.3(transitive)
+ Added@rollup/rollup-freebsd-x64@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm-gnueabihf@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm-musleabihf@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-arm64-musl@4.27.3(transitive)
+ Added@rollup/rollup-linux-powerpc64le-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-riscv64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-s390x-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-x64-gnu@4.27.3(transitive)
+ Added@rollup/rollup-linux-x64-musl@4.27.3(transitive)
+ Added@rollup/rollup-win32-arm64-msvc@4.27.3(transitive)
+ Added@rollup/rollup-win32-ia32-msvc@4.27.3(transitive)
+ Added@rollup/rollup-win32-x64-msvc@4.27.3(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Addedautoprefixer@10.4.20(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedcaniuse-lite@1.0.30001683(transitive)
+ Addedelectron-to-chromium@1.5.64(transitive)
+ Addedesbuild@0.21.5(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedfraction.js@4.3.7(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addednanoid@3.3.7(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addednormalize-range@0.1.2(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.4.49(transitive)
+ Addedpostcss-value-parser@4.2.0(transitive)
+ Addedrollup@4.27.3(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedvite@5.4.11(transitive)