@selfcommunity/react-theme-default 0.2.0-alpha.33 → 0.2.0-alpha.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfcommunity/react-theme-default",
3
- "version": "0.2.0-alpha.33",
3
+ "version": "0.2.0-alpha.35",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "./lib/cjs/index.js",
@@ -66,8 +66,7 @@
66
66
  "@emotion/styled": "^11.11.0",
67
67
  "@mui/material": "^5.15.3",
68
68
  "@selfcommunity/react-core": "^0.5.0-alpha.10",
69
- "@selfcommunity/react-ui": "^0.8.0-alpha.32",
70
- "hex-to-css-filter": "^5.4.0",
69
+ "@selfcommunity/react-ui": "^0.8.0-alpha.33",
71
70
  "react": "^17.0.2 || 18",
72
71
  "react-dom": "17 || 18"
73
72
  },
@@ -118,5 +117,5 @@
118
117
  "bugs": {
119
118
  "url": "https://github.com/selfcommunity/community-js/issues"
120
119
  },
121
- "gitHead": "313e48e535e229e5f00c66f6c7cd83da7ca4c7a1"
120
+ "gitHead": "4a3107f4441233b806c7ea2c8072415f44bf54da"
122
121
  }
package/lib/umd/850.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 850.js.LICENSE.txt */
2
- (self.webpackChunkSelfCommunityReactThemeDefault=self.webpackChunkSelfCommunityReactThemeDefault||[]).push([[850],{2609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,s,a){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(o[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&o[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),s&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=s):l[4]="".concat(s)),e.push(l))}},e}},8991:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},272:t=>{"use strict";t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),a="/*# ".concat(s," */"),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[e].concat(o).concat([a]).join("\n")}return[e].join("\n")}},9968:function(t,e){!function(t){"use strict";var e=function(){function t(t,e,r){this.r=0,this.g=0,this.b=0,this.set(t,e,r)}return t.prototype.set=function(t,e,r){this.r=this.clamp(t),this.g=this.clamp(e),this.b=this.clamp(r)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var e=Math.sin(t),r=Math.cos(t);this.multiply([.213+.787*r-.213*e,.715-.715*r-.715*e,.072-.072*r+.928*e,.213-.213*r+.143*e,.715+.285*r+.14*e,.072-.072*r-.283*e,.213-.213*r-.787*e,.715-.715*r+.715*e,.072+.928*r+.072*e])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var e=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),r=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),n=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=e,this.g=r,this.b=n},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,e){void 0===t&&(t=1),void 0===e&&(e=0),this.r=this.clamp(this.r*t+255*e),this.g=this.clamp(this.g*t+255*e),this.b=this.clamp(this.b*t+255*e)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,e=this.g/255,r=this.b/255,n=Math.max(t,e,r),s=Math.min(t,e,r),a=0,o=(n+s)/2;if(n===s)return{h:0,s:0,l:100*o};var i=n-s;return n===t?a=(e-r)/i+(e<r?6:0):n===e?a=(r-t)/i+2:n===r&&(a=(t-e)/i+4),{h:100*(a/=6),s:100*(o>.5?i/(2-n-s):i/(n+s)),l:100*o}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),r=function(){function t(t,r){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},r),this.reusedColor=new e(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],e={loss:1/0},r=0;e.loss>this.options.acceptanceLossPercentage;){var n=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(n.loss<e.loss&&(e=n),(r+=1)>=this.options.maxChecks)break}return Object.assign({},e,{called:r})},t.prototype.solveNarrow=function(t){var e=t.loss,r=e+1,n=[.25*r,.25*r,r,.25*r,.2*r,.2*r];return this.spsa({A:e,a:n,c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,e){var r=100;return 2===e?r=7500:4!==e&&5!==e||(r=200),3===e?t>r?t%=r:t<0&&(t=r+t%r):t<0?t=0:t>r&&(t=r),t},t.prototype.spsa=function(t){for(var e=t.A,r=t.a,n=t.c,s=t.values,a=t.maxTriesInLoop,o=void 0===a?500:a,i=t.called,c=void 0===i?0:i,u=null,l=1/0,h=new Array(6),p=new Array(6),f=new Array(6),v=0;v<o;v++){for(var d=n/Math.pow(v+1,.16666666666666666),m=0;m<6;m++)h[m]=Math.random()>.5?1:-1,p[m]=s[m]+d*h[m],f[m]=s[m]-d*h[m];var y=this.loss(p)-this.loss(f);for(m=0;m<6;m++){var g=y/(2*d)*h[m],b=r[m]/Math.pow(e+v+1,1);s[m]=this.fixValueByFilterIDX(s[m]-b*g,m)}var x=this.loss(s);x<l&&(u=s.slice(0),l=x)}return{values:u,loss:l,called:c}},t.prototype.loss=function(t){var e=this.reusedColor;e.set(0,0,0),e.invert(t[0]/100),e.sepia(t[1]/100),e.saturate(t[2]/100),e.hueRotate(3.6*t[3]),e.brightness(t[4]/100),e.contrast(t[5]/100);var r=e.hsl();return Math.abs(e.r-this.target.r)+Math.abs(e.g-this.target.g)+Math.abs(e.b-this.target.b)+Math.abs(r.h-this.targetHSL.h)+Math.abs(r.s-this.targetHSL.s)+Math.abs(r.l-this.targetHSL.l)},t.prototype.css=function(t){var e=function(e,r){return void 0===r&&(r=1),Math.round(t[e]*r)};return["invert("+e(0)+"%)","sepia("+e(1)+"%)","saturate("+e(2)+"%)","hue-rotate("+e(3,3.6)+"deg)","brightness("+e(4)+"%)","contrast("+e(5)+"%);"].join(" ")},t}(),n=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},s={};t.clearCache=function(t){t?s[t]&&delete s[t]:s={}},t.hexToCSSFilter=function(t,a){var o,i,c,u,l,h;if(void 0===a&&(a={}),s[t]&&!a.forceFilterRecalculation)return Object.assign({},s[t],{cache:!0});try{if(i=(o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return o}((h=t,4===h.length?[parseInt("0x"+h[1]+h[1]),parseInt("0x"+h[2]+h[2]),parseInt("0x"+h[3]+h[3])]:7===h.length?[parseInt("0x"+h[1]+h[2]),parseInt("0x"+h[3]+h[4]),parseInt("0x"+h[5]+h[6])]:[]),3))[0],c=o[1],u=o[2],!n(i)||!n(c)||!n(u))throw new Error("hextToRgb returned an invalid value for '"+t+"'");l=new e(Number(i),Number(c),Number(u))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var p=new r(l,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},a));return s[t]=Object.assign({},p.solve(),{hex:t,rgb:[i,c,u],cache:!1})},Object.defineProperty(t,"__esModule",{value:!0})}(e)},6062:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var a={},o=[],i=0;i<t.length;i++){var c=t[i],u=n.base?c[0]+n.base:c[0],l=a[u]||0,h="".concat(u," ").concat(l);a[u]=l+1;var p=r(h),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)e[p].references++,e[p].updater(f);else{var v=s(f,n);n.byIndex=i,e.splice(i,0,{identifier:h,updater:v,references:1})}o.push(h)}return o}function s(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,s){var a=n(t=t||[],s=s||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var i=r(a[o]);e[i].references--}for(var c=n(t,s),u=0;u<a.length;u++){var l=r(a[u]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}a=c}}},6793:t=>{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},1173:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},7892:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},4036:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},2464:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}}]);
@@ -1,16 +0,0 @@
1
- /*! (c) 2023 - present: Quentral Srl | https://github.com/selfcommunity/community-js/blob/master/LICENSE.md */
2
-
3
- /*! *****************************************************************************
4
- Copyright (c) Microsoft Corporation.
5
-
6
- Permission to use, copy, modify, and/or distribute this software for any
7
- purpose with or without fee is hereby granted.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
- ***************************************************************************** */