diff --git a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/legend.js b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/legend.js index 150defa86286..6bb89ff73266 100644 --- a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/legend.js +++ b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/legend.js @@ -32,11 +32,26 @@ var resolveSchemaValue = require( './resolve_schema_value.js' ); var PROPS = [ 'direction', 'orient', + 'titleAlign', + 'titleAnchor', + 'titleBaseline', + 'titleColor', + 'titleFont', + 'titleFontSize', + 'titleFontStyle', + 'titleFontWeight', + 'titleLimit', + 'titleLineHeight', + 'titleOpacity', + 'titleOrient', + 'titlePadding', 'type' ]; var ARRAY_PROPS = []; var SCHEMA_PROPS = []; -var TEXT_PROPS = []; +var TEXT_PROPS = [ + 'title' +]; // MAIN // diff --git a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/menus/legend.js b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/menus/legend.js index e7c1ee1194b3..8099aa6bfc24 100644 --- a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/menus/legend.js +++ b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/menus/legend.js @@ -21,6 +21,7 @@ // MODULES // var objectKeys = require( '@stdlib/utils/keys' ); +var format = require( '@stdlib/string/format' ); var defaults = require( './../defaults.js' ); @@ -68,6 +69,45 @@ function addMenu( parent, conf, schema, name ) { controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); } else if ( k === 'orient' ) { controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'title' ) { + controller = folder.add( conf, k ); + } else if ( k === 'titleAlign' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titleAnchor' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titleBaseline' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titleColor' ) { + controller = folder.addColor( conf, k ); + } else if ( k === 'titleFont' ) { + controller = folder.add( conf, k ); + } else if ( k === 'titleFontSize' ) { + controller = folder.add( conf, k ) + .min( d.min ) + .step( d.step ); + controller.name( format( '%s (%s)', k, d.units ) ); + } else if ( k === 'titleFontStyle' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titleFontWeight' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titleLimit' ) { + controller = folder.add( conf, k ) + .min( d.min ) + .step( d.step ); + controller.name( format( '%s (%s)', k, d.units ) ); + } else if ( k === 'titleLineHeight' ) { + controller = folder.add( conf, k ) + .min( d.min ) + .step( d.step ); + } else if ( k === 'titleOpacity' ) { + controller = folder.add( conf, k ) + .min( d.min ) + .max( d.max ); + } else if ( k === 'titleOrient' ) { + controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); + } else if ( k === 'titlePadding' ) { + controller = folder.add( conf, k ); + controller.name( format( '%s (%s)', k, d.units ) ); } else if ( k === 'type' ) { controller = folder.add( conf, k, EMPTY_STRING.concat( d.values ) ); } else { diff --git a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/schema/transforms/legend.js b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/schema/transforms/legend.js index 3f019b398a00..d9089eaed374 100644 --- a/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/schema/transforms/legend.js +++ b/lib/node_modules/@stdlib/plot/base/view/lib/browser/app/schema/transforms/legend.js @@ -31,12 +31,26 @@ var signalName = require( './../../utils/signal_name.js' ); var PROPS = [ 'orient', + 'title', + 'titleAlign', + 'titleAnchor', + 'titleColor', + 'titleFont', + 'titleFontSize', + 'titleFontStyle', + 'titleFontWeight', + 'titleLimit', + 'titleLineHeight', + 'titleOpacity', + 'titleOrient', + 'titlePadding', 'type' ]; // Define a list of properties which need to be made explicitly "undefined" when set to falsy values: var SPECIAL_PROPS = [ - 'direction' + 'direction', + 'titleBaseline' ]; var isSpecialProp = contains( SPECIAL_PROPS ); diff --git a/lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/app/bundle.js b/lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/app/bundle.js index 4786792b0f11..8278b2f81086 100644 --- a/lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/app/bundle.js +++ b/lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/app/bundle.js @@ -19,4 +19,4 @@ /* eslint-disable */ /* editorconfig-checker-disable-file */ -!function(){R=function(t,e){var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t);return"[object Arguments]"===e||"[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&0<=t.length&&"[object Function]"===r.call(t.callee)}};var R,C,M=function(t){return C||R(C={exports:{},parent:t},C.exports),C.exports},z="function"==typeof Object.defineProperty?Object.defineProperty:null;var U=function(){try{return z({},"x",{}),!0}catch(t){return!1}},N=Object.defineProperty;var D=function(t){return"number"==typeof t};function W(t){for(var e="",r=0;rn.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=$(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=st(n.arg,n.width,n.padRight)),o+=n.arg||"",a+=1}return o},ht=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;var yt=function(t){for(var e,r,n,i=[],o=0,a=ht.exec(t);a;)(e=t.slice(o,ht.lastIndex-a[0].length)).length&&i.push(e),"%"===a[6]?i.push("%"):i.push((n=void 0,n={mapping:(r=a)[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]},"."===r[4]&&void 0===r[5]&&(n.precision="1"),n)),o=ht.lastIndex,a=ht.exec(t);return(e=t.slice(o)).length&&i.push(e),i};var dt=function(t){return"string"==typeof t};var h=function t(e){var r,n;if(!dt(e))throw new TypeError(t("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=[yt(e)],n=1;n=r.length?(s=!!(c=d(o,l)))&&"get"in c&&!("originalValue"in c.get)?c.get:o[l]:(s=Je(o,l),o[l]),s&&!a&&(Qe[f]=o)}}return o},_r=$e([Er("%String.prototype.indexOf%")]),xr=he(),Tr=tr("Object.prototype.toString"),Sr=function(t){return!(xr&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===Tr(t)},ve=function(){return Sr(arguments)}(),be=(Sr.isLegacyArguments=er,ve?Sr:er),Ar=he()?(rr=tr("RegExp.prototype.exec"),nr={},ir={toString:we=function(){throw nr},valueOf:we},"symbol"==typeof Symbol.toPrimitive&&(ir[Symbol.toPrimitive]=we),function(t){if(!t||"object"!=typeof t)return!1;var e=d(t,"lastIndex");if(!(e&&Je(e,"value")))return!1;try{rr(t,ir)}catch(t){return t===nr}}):(or=tr("Object.prototype.toString"),ar="[object RegExp]",function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&or(t)===ar}),Or=tr("RegExp.prototype.exec"),jr=function(){if(void 0===ur)try{ur=Function("return function* () {}")().constructor}catch(t){ur=!1}return ur},kr=(e=>{if(Ar(e))return function(t){return null!==Or(e,t)};throw new p("`regex` must be a RegExp")})(/^\s*(?:function)?\*/),Fr=he(),Vr=tr("Object.prototype.toString"),Pr=tr("Function.prototype.toString"),Lr=Function.prototype.toString,Ir="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof Ir&&"function"==typeof Object.defineProperty)try{sr=Object.defineProperty({},"length",{get:function(){throw lr}}),lr={},Ir(function(){throw 42},null,sr)}catch(t){t!==lr&&(Ir=null)}else Ir=null;function Br(t){try{return Cr(t)?!1:(Lr.call(t),!0)}catch(t){return!1}}var Rr=/^\s*class\b/,Cr=function(t){try{var e=Lr.call(t);return Rr.test(e)}catch(t){return!1}},Mr=Object.prototype.toString,zr="[object Object]",Ur="[object HTMLAllCollection]",Nr="[object HTML document.all class]",Dr="[object HTMLCollection]",Wr="function"==typeof Symbol&&!!Symbol.toStringTag,$r=!(0 in[,]),Hr=function(){return!1},Gr=("object"==typeof document&&Mr.call(document.all)===Mr.call(document.all)&&(Hr=function(t){if(($r||!t)&&(void 0===t||"object"==typeof t))try{var e=Mr.call(t);return(e===Ur||e===Nr||e===Dr||e===zr)&&null==t("")}catch(t){}return!1}),Ir?function(t){if(Hr(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{Ir(t,null,sr)}catch(t){if(t!==lr)return!1}return!Cr(t)&&Br(t)}:function(t){var e;return!!Hr(t)||!!t&&!("function"!=typeof t&&"object"!=typeof t||!Wr&&(Cr(t)||"[object Function]"!==(e=Mr.call(t))&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e)))&&Br(t)}),Yr=Object.prototype.toString,qr=Object.prototype.hasOwnProperty,Jr=function(t,e,r){for(var n=0,i=t.length;n{var r;return v(e)?t.stylize("undefined","undefined"):m(e)?(r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",t.stylize(r,"string")):g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):d(e)?t.stylize("null","null"):void 0})(e,r);if(t)return t;var i,t=Object.keys(r),o=(i={},t.forEach(function(t,e){i[t]=!0}),i);if(e.showHidden&&(t=Object.getOwnPropertyNames(r)),E(r)&&(0<=t.indexOf("message")||0<=t.indexOf("description")))return c(r);if(0===t.length){if(_(r))return a=r.name?": "+r.name:"",e.stylize("[Function"+a+"]","special");if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return c(r)}var a="",u=!1,s=["{","}"];if(h(r)&&(u=!0,s=["[","]"]),_(r)&&(a=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(a=" "+RegExp.prototype.toString.call(r)),w(r)&&(a=" "+Date.prototype.toUTCString.call(r)),E(r)&&(a=" "+c(r)),0===t.length&&(!u||0==r.length))return s[0]+a+s[1];if(n<0)return b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r),l=u?((e,r,n,i,t)=>{for(var o=[],a=0,u=r.length;a{if("undefined"!=typeof window)for(var t in window)try{if(!ai["$"+t]&&Qn.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{oi(window[t])}catch(t){return!0}}catch(t){return!0}return!1})(),si=function(t){if("undefined"==typeof window||!ui)return oi(t);try{return oi(t)}catch(t){return!1}},fa=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===ti.call(t),n=ei(t),i=e&&"[object String]"===ti.call(t),o=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=ni&&r;if(i&&0{var r;return v(e)?t.stylize("undefined","undefined"):m(e)?(r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",t.stylize(r,"string")):g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):d(e)?t.stylize("null","null"):void 0})(e,r);if(t)return t;var i,t=Object.keys(r),o=(i={},t.forEach(function(t,e){i[t]=!0}),i);if(e.showHidden&&(t=Object.getOwnPropertyNames(r)),E(r)&&(0<=t.indexOf("message")||0<=t.indexOf("description")))return c(r);if(0===t.length){if(_(r))return a=r.name?": "+r.name:"",e.stylize("[Function"+a+"]","special");if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return c(r)}var a="",u=!1,s=["{","}"];if(h(r)&&(u=!0,s=["[","]"]),_(r)&&(a=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(a=" "+RegExp.prototype.toString.call(r)),w(r)&&(a=" "+Date.prototype.toUTCString.call(r)),E(r)&&(a=" "+c(r)),0===t.length&&(!u||0==r.length))return s[0]+a+s[1];if(n<0)return b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r),l=u?((e,r,n,i,t)=>{for(var o=[],a=0,u=r.length;a{var e;try{t()}catch(t){e=t}return e})(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!e&&s(e,r,"Missing expected exception"+n);var i="string"==typeof n,o=!t&&e&&!r;if((!t&&A.isError(e)&&i&&f(e,r)||o)&&s(e,r,"Got unwanted exception"+n),t&&e&&r&&!f(e,r)||!t&&e)throw e}o.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=a(u((r=this).actual),128)+" "+r.operator+" "+a(u(r.expected),128),this.generatedMessage=!0);var e,r=t.stackStartFunction||s;Error.captureStackTrace?Error.captureStackTrace(this,r):(t=new Error).stack&&(t=t.stack,e=i(r),0<=(e=t.indexOf("\n"+e))&&(e=t.indexOf("\n",e+1),t=t.substring(e+1)),this.stack=t)},A.inherits(o.AssertionError,Error),o.fail=s,o.ok=l,o.equal=function(t,e,r){t!=e&&s(t,e,r,"==",o.equal)},o.notEqual=function(t,e,r){t==e&&s(t,e,r,"!=",o.notEqual)},o.deepEqual=function(t,e,r){v(t,e,!1)||s(t,e,r,"deepEqual",o.deepEqual)},o.deepStrictEqual=function(t,e,r){v(t,e,!0)||s(t,e,r,"deepStrictEqual",o.deepStrictEqual)},o.notDeepEqual=function(t,e,r){v(t,e,!1)&&s(t,e,r,"notDeepEqual",o.notDeepEqual)},o.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&s(e,r,n,"notDeepStrictEqual",t)},o.strictEqual=function(t,e,r){t!==e&&s(t,e,r,"===",o.strictEqual)},o.notStrictEqual=function(t,e,r){t===e&&s(t,e,r,"!==",o.notStrictEqual)},o.throws=function(t,e,r){c(!0,t,e,r)},o.doesNotThrow=function(t,e,r){c(!1,t,e,r)},o.ifError=function(t){if(t)throw t},o.strict=t(function t(e,r){e||s(e,!0,r,"==",t)},o,{equal:o.strictEqual,deepEqual:o.deepStrictEqual,notEqual:o.notStrictEqual,notDeepEqual:o.notDeepStrictEqual}),o.strict.strict=o.strict;var w=Object.keys||function(t){var e,r=[];for(e in t)n.call(t,e)&&r.push(e);return r}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),{}),Si=(!function(s){!function(){function r(){return(new Date).getTime()}for(var e=Array.prototype.slice,n={},i=void 0!==s&&s.console?s.console:"undefined"!=typeof window&&window.console?window.console:{},t=[[function(){},"log"],[function(){i.log.apply(i,arguments)},"info"],[function(){i.log.apply(i,arguments)},"warn"],[function(){i.warn.apply(i,arguments)},"error"],[function(t){n[t]=r()},"time"],[function(t){var e=n[t];if(!e)throw new Error("No such label: "+t);delete n[t];e=r()-e;i.log(t+": "+e+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=k.format.apply(null,arguments),i.error(t.stack)},"trace"],[function(t){i.log(k.inspect(t)+"\n")},"dir"],[function(t){t||(t=e.call(arguments,1),xi.ok(!1,k.format.apply(null,t)))},"assert"]],o=0;o