From 674ea2baa74ace97fc74b4c82aadb1135760804a Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Fri, 7 Aug 2026 22:13:47 +0530 Subject: [PATCH 1/9] feat: add plot/vega/mark/text/encoding-set --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../mark/text/encoding-set/examples/index.js | 34 + .../mark/text/encoding-set/lib/align/get.js | 43 ++ .../text/encoding-set/lib/align/properties.js | 33 + .../mark/text/encoding-set/lib/align/set.js | 66 ++ .../mark/text/encoding-set/lib/angle/get.js | 43 ++ .../text/encoding-set/lib/angle/properties.js | 33 + .../mark/text/encoding-set/lib/angle/set.js | 66 ++ .../text/encoding-set/lib/baseline/get.js | 43 ++ .../encoding-set/lib/baseline/properties.js | 33 + .../text/encoding-set/lib/baseline/set.js | 66 ++ .../text/encoding-set/lib/change_event.js | 41 + .../mark/text/encoding-set/lib/dir/get.js | 43 ++ .../text/encoding-set/lib/dir/properties.js | 33 + .../mark/text/encoding-set/lib/dir/set.js | 66 ++ .../vega/mark/text/encoding-set/lib/dx/get.js | 43 ++ .../text/encoding-set/lib/dx/properties.js | 33 + .../vega/mark/text/encoding-set/lib/dx/set.js | 66 ++ .../vega/mark/text/encoding-set/lib/dy/get.js | 43 ++ .../text/encoding-set/lib/dy/properties.js | 33 + .../vega/mark/text/encoding-set/lib/dy/set.js | 66 ++ .../text/encoding-set/lib/ellipsis/get.js | 43 ++ .../encoding-set/lib/ellipsis/properties.js | 33 + .../text/encoding-set/lib/ellipsis/set.js | 66 ++ .../text/encoding-set/lib/font-size/get.js | 43 ++ .../encoding-set/lib/font-size/properties.js | 33 + .../text/encoding-set/lib/font-size/set.js | 66 ++ .../text/encoding-set/lib/font-style/get.js | 43 ++ .../encoding-set/lib/font-style/properties.js | 33 + .../text/encoding-set/lib/font-style/set.js | 66 ++ .../text/encoding-set/lib/font-weight/get.js | 43 ++ .../lib/font-weight/properties.js | 33 + .../text/encoding-set/lib/font-weight/set.js | 66 ++ .../mark/text/encoding-set/lib/font/get.js | 43 ++ .../text/encoding-set/lib/font/properties.js | 33 + .../mark/text/encoding-set/lib/font/set.js | 66 ++ .../vega/mark/text/encoding-set/lib/index.js | 40 + .../mark/text/encoding-set/lib/limit/get.js | 43 ++ .../text/encoding-set/lib/limit/properties.js | 33 + .../mark/text/encoding-set/lib/limit/set.js | 66 ++ .../text/encoding-set/lib/line-break/get.js | 43 ++ .../encoding-set/lib/line-break/properties.js | 33 + .../text/encoding-set/lib/line-break/set.js | 66 ++ .../text/encoding-set/lib/line-height/get.js | 43 ++ .../lib/line-height/properties.js | 33 + .../text/encoding-set/lib/line-height/set.js | 66 ++ .../vega/mark/text/encoding-set/lib/main.js | 711 ++++++++++++++++++ .../text/encoding-set/lib/properties.json | 40 + .../text/encoding-set/lib/properties/get.js | 41 + .../mark/text/encoding-set/lib/radius/get.js | 43 ++ .../encoding-set/lib/radius/properties.js | 33 + .../mark/text/encoding-set/lib/radius/set.js | 66 ++ .../mark/text/encoding-set/lib/text/get.js | 43 ++ .../text/encoding-set/lib/text/properties.js | 33 + .../mark/text/encoding-set/lib/text/set.js | 66 ++ .../mark/text/encoding-set/lib/theta/get.js | 43 ++ .../text/encoding-set/lib/theta/properties.js | 33 + .../mark/text/encoding-set/lib/theta/set.js | 66 ++ .../vega/mark/text/encoding-set/package.json | 62 ++ 58 files changed, 3383 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties.json create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/examples/index.js new file mode 100644 index 000000000000..7e0247740937 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/examples/index.js @@ -0,0 +1,34 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var TextEncodingSet = require( './../lib' ); + +var encoding = new TextEncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }), + 'y': new Value({ + 'field': 'y', + 'scale': 'yScale' + }) +}); +console.log( encoding.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/get.js new file mode 100644 index 000000000000..ab0cd5ea3ee4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the horizontal text alignment. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/properties.js new file mode 100644 index 000000000000..d8b59b16570b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'align' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/set.js new file mode 100644 index 000000000000..18f21206470b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/align/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the horizontal text alignment. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js new file mode 100644 index 000000000000..58552882f446 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a rotation angle. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/properties.js new file mode 100644 index 000000000000..5889ae58645a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'angle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/set.js new file mode 100644 index 000000000000..47dee42951b7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a rotation angle (in degrees). +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/get.js new file mode 100644 index 000000000000..c5a337a2eb44 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the vertical text baseline. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/properties.js new file mode 100644 index 000000000000..6111ff2bcd83 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'baseline' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/set.js new file mode 100644 index 000000000000..b4b04d0850c6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/baseline/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the vertical text baseline. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/change_event.js new file mode 100644 index 000000000000..359afbfa206b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/change_event.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns a new change event object. +* +* @private +* @param {string} property - property name +* @returns {Object} event object +*/ +function event( property ) { // eslint-disable-line stdlib/no-redeclare + return { + 'type': 'update', + 'source': 'mark', + 'property': property + }; +} + + +// EXPORTS // + +module.exports = event; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/get.js new file mode 100644 index 000000000000..9cd5abc06e82 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the text direction. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/properties.js new file mode 100644 index 000000000000..a0b155cf83ba --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'dir' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/set.js new file mode 100644 index 000000000000..e58b472690da --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dir/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the text direction. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js new file mode 100644 index 000000000000..caa467647a9a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a horizontal offset between the text and its anchor point. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/properties.js new file mode 100644 index 000000000000..b86dcf4a62fd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'dx' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js new file mode 100644 index 000000000000..0bcbfc928913 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a horizontal offset (in pixels) between the text and its anchor point. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js new file mode 100644 index 000000000000..0de54ad3420f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a vertical offset between the text and its anchor point. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/properties.js new file mode 100644 index 000000000000..724b9d0c8223 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'dy' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js new file mode 100644 index 000000000000..1dd455e25a68 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a vertical offset (in pixels) between the text and its anchor point. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/get.js new file mode 100644 index 000000000000..77d5312b45d6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying an ellipsis string for text truncation. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/properties.js new file mode 100644 index 000000000000..c44e124f1bd9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'ellipsis' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/set.js new file mode 100644 index 000000000000..89fe68af137a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/ellipsis/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets an ellipsis string for text truncation. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js new file mode 100644 index 000000000000..2a0f7f18099d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a font size. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/properties.js new file mode 100644 index 000000000000..114dd4e49704 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'fontSize' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/set.js new file mode 100644 index 000000000000..59f08fa955bd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a font size (in pixels). +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/get.js new file mode 100644 index 000000000000..ddf89701635b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a font style. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/properties.js new file mode 100644 index 000000000000..36557341fabc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'fontStyle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/set.js new file mode 100644 index 000000000000..7a1450a4a15a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-style/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a font style. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/get.js new file mode 100644 index 000000000000..2e945c5c2ccc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a font weight. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/properties.js new file mode 100644 index 000000000000..ff088da52898 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'fontWeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/set.js new file mode 100644 index 000000000000..f143395f7006 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-weight/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a font weight. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/get.js new file mode 100644 index 000000000000..8f6f850f839f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a typeface in which to set the text. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/properties.js new file mode 100644 index 000000000000..4cb2f7342c5e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'font' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/set.js new file mode 100644 index 000000000000..d1d4cadedbe1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a typeface in which to set the text. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/index.js new file mode 100644 index 000000000000..89656de959f5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Text mark encoding set constructor. +* +* @module @stdlib/plot/vega/mark/text/encoding-set +* +* @example +* var TextEncodingSet = require( '@stdlib/plot/vega/mark/text/encoding-set' ); +* +* var encoding = new TextEncodingSet(); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js new file mode 100644 index 000000000000..b7b6625c9dcc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the maximum length of the text mark. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/properties.js new file mode 100644 index 000000000000..15435bbe5eaa --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'limit' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/set.js new file mode 100644 index 000000000000..9a8ecd4b8941 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the maximum length of the text mark (in pixels). +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/get.js new file mode 100644 index 000000000000..1a66391150d9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a line break delimiter for multi-line text. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/properties.js new file mode 100644 index 000000000000..ff9588ea7b47 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'lineBreak' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/set.js new file mode 100644 index 000000000000..9c6e44f246ff --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-break/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a line break delimiter for multi-line text. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js new file mode 100644 index 000000000000..ccbbb8565e5d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the height of each line of text in a multi-line text mark. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/properties.js new file mode 100644 index 000000000000..e5561712999b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'lineHeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/set.js new file mode 100644 index 000000000000..a6c9908d82af --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the height (in pixels) of each line of text in a multi-line text mark. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js new file mode 100644 index 000000000000..9a6938e321d7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js @@ -0,0 +1,711 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable stdlib/no-empty-lines-between-requires */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isObject = require( '@stdlib/assert/is-object' ); +var setNonEnumerableReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' ); // eslint-disable-line id-length +var setNonEnumerableReadOnlyProperty = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); // eslint-disable-line id-length +var setReadWriteAccessor = require( '@stdlib/utils/define-read-write-accessor' ); +var hasProp = require( '@stdlib/assert/has-property' ); +var inherit = require( '@stdlib/utils/inherit' ); +var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/base/encoding-set' ); +var format = require( '@stdlib/string/format' ); +var properties = require( './properties.json' ); + +// Note: keep the following in alphabetical order according to the `require` path... +var getAlign = require( './align/get.js' ); +var setAlign = require( './align/set.js' ); + +var getAngle = require( './angle/get.js' ); +var setAngle = require( './angle/set.js' ); + +var getBaseline = require( './baseline/get.js' ); +var setBaseline = require( './baseline/set.js' ); + +var getDir = require( './dir/get.js' ); +var setDir = require( './dir/set.js' ); + +var getDx = require( './dx/get.js' ); +var setDx = require( './dx/set.js' ); + +var getDy = require( './dy/get.js' ); +var setDy = require( './dy/set.js' ); + +var getEllipsis = require( './ellipsis/get.js' ); +var setEllipsis = require( './ellipsis/set.js' ); + +var getFont = require( './font/get.js' ); +var setFont = require( './font/set.js' ); + +var getFontSize = require( './font-size/get.js' ); +var setFontSize = require( './font-size/set.js' ); + +var getFontStyle = require( './font-style/get.js' ); +var setFontStyle = require( './font-style/set.js' ); + +var getFontWeight = require( './font-weight/get.js' ); +var setFontWeight = require( './font-weight/set.js' ); + +var getLimit = require( './limit/get.js' ); +var setLimit = require( './limit/set.js' ); + +var getLineBreak = require( './line-break/get.js' ); +var setLineBreak = require( './line-break/set.js' ); + +var getLineHeight = require( './line-height/get.js' ); +var setLineHeight = require( './line-height/set.js' ); + +var getProperties = require( './properties/get.js' ); + +var getRadius = require( './radius/get.js' ); +var setRadius = require( './radius/set.js' ); + +var getText = require( './text/get.js' ); +var setText = require( './text/set.js' ); + +var getTheta = require( './theta/get.js' ); +var setTheta = require( './theta/set.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:main' ); + + +// MAIN // + +/** +* Text mark encoding set constructor. +* +* @constructor +* @param {Options} options - constructor options +* @param {Value} [options.align] - horizontal text alignment +* @param {Value} [options.angle] - rotation angle in degrees +* @param {Value} [options.aria] - flag indicating whether to include ARIA attributes in SVG output +* @param {Value} [options.baseline] - vertical text baseline +* @param {Value} [options.blend] - color blend mode +* @param {Value} [options.cursor] - mouse cursor used over a mark +* @param {Value} [options.description] - text description of a mark item for ARIA accessibility +* @param {Value} [options.dir] - text direction +* @param {Value} [options.dx] - horizontal offset in pixels between the text and its anchor point +* @param {Value} [options.dy] - vertical offset in pixels between the text and its anchor point +* @param {Value} [options.ellipsis] - ellipsis string for text truncation +* @param {Value} [options.fill] - fill color +* @param {Value} [options.fillOpacity] - fill opacity +* @param {Value} [options.font] - typeface in which to set the text +* @param {Value} [options.fontSize] - font size in pixels +* @param {Value} [options.fontStyle] - font style +* @param {Value} [options.fontWeight] - font weight +* @param {Value} [options.href] - URL to load upon mouse click +* @param {Value} [options.limit] - maximum length of the text mark in pixels +* @param {Value} [options.lineBreak] - line break delimiter for multi-line text +* @param {Value} [options.lineHeight] - height in pixels of each line of text in a multi-line text mark +* @param {Value} [options.opacity] - mark opacity +* @param {Value} [options.radius] - polar coordinate radial offset in pixels +* @param {Value} [options.stroke] - stroke color +* @param {Value} [options.strokeCap] - stroke cap for line ending style +* @param {Value} [options.strokeDash] - stroke dash +* @param {Value} [options.strokeDashOffset] - pixel offset at which to start the dash array +* @param {Value} [options.strokeJoin] - stroke line join method +* @param {Value} [options.strokeMiterLimit] - miter limit at which to bevel a line join +* @param {Value} [options.strokeOpacity] - stroke opacity +* @param {Value} [options.strokeWidth] - stroke width +* @param {Value} [options.text] - text to display +* @param {Value} [options.theta] - polar coordinate angle in radians +* @param {Value} [options.tooltip] - tooltip text to show upon mouse hover +* @param {Value} [options.x] - primary x-coordinate +* @param {Value} [options.y] - primary y-coordinate +* @param {Value} [options.zindex] - layering order of sibling mark items +* @throws {TypeError} options argument must be an object +* @throws {Error} must provide valid options +* @returns {TextEncodingSet} encoding set instance +* +* @example +* var encoding = new TextEncodingSet(); +* // returns +*/ +function TextEncodingSet( options ) { + var nargs; + var v; + var k; + var i; + + nargs = arguments.length; + if ( !( this instanceof TextEncodingSet ) ) { + if ( nargs === 0 ) { + return new TextEncodingSet(); + } + return new TextEncodingSet( options ); + } + EncodingSet.call( this ); + if ( nargs ) { + if ( !isObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); + } + // Validate provided options by attempting to assign option values to corresponding fields... + for ( i = 0; i < properties.length; i++ ) { + k = properties[ i ]; + if ( !hasProp( options, k ) ) { + continue; + } + v = options[ k ]; + try { + this[ k ] = v; + } catch ( err ) { + debug( 'Encountered an error. Error: %s', err.message ); + + // FIXME: retain thrown error type + throw new Error( transformErrorMessage( err.message ) ); + } + } + } + return this; +} + +/* +* Inherit from the `EncodingSet` prototype. +*/ +inherit( TextEncodingSet, EncodingSet ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof TextEncodingSet +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( TextEncodingSet, 'name', 'TextEncodingSet' ); + +/** +* Encoding specifying the horizontal text alignment. +* +* @name align +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'align': new Value({ +* 'value': 'center' +* }) +* }); +* +* var v = encoding.align; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'align', getAlign, setAlign ); + +/** +* Encoding specifying a rotation angle (in degrees). +* +* @name angle +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'angle': new Value({ +* 'value': 45 +* }) +* }); +* +* var v = encoding.angle; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'angle', getAngle, setAngle ); + +/** +* Encoding specifying the vertical text baseline. +* +* @name baseline +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'baseline': new Value({ +* 'value': 'middle' +* }) +* }); +* +* var v = encoding.baseline; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'baseline', getBaseline, setBaseline ); + +/** +* Encoding specifying the text direction. +* +* @name dir +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'dir': new Value({ +* 'value': 'rtl' +* }) +* }); +* +* var v = encoding.dir; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'dir', getDir, setDir ); + +/** +* Encoding specifying a horizontal offset (in pixels) between the text and its anchor point. +* +* @name dx +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'dx': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.dx; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'dx', getDx, setDx ); + +/** +* Encoding specifying a vertical offset (in pixels) between the text and its anchor point. +* +* @name dy +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'dy': new Value({ +* 'value': -5 +* }) +* }); +* +* var v = encoding.dy; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'dy', getDy, setDy ); + +/** +* Encoding specifying an ellipsis string for text truncation. +* +* @name ellipsis +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'ellipsis': new Value({ +* 'value': '...' +* }) +* }); +* +* var v = encoding.ellipsis; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'ellipsis', getEllipsis, setEllipsis ); + +/** +* Encoding specifying a typeface in which to set the text. +* +* @name font +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'font': new Value({ +* 'value': 'Helvetica Neue' +* }) +* }); +* +* var v = encoding.font; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'font', getFont, setFont ); + +/** +* Encoding specifying a font size (in pixels). +* +* @name fontSize +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'fontSize': new Value({ +* 'value': 14 +* }) +* }); +* +* var v = encoding.fontSize; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'fontSize', getFontSize, setFontSize ); + +/** +* Encoding specifying a font style. +* +* @name fontStyle +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'fontStyle': new Value({ +* 'value': 'italic' +* }) +* }); +* +* var v = encoding.fontStyle; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'fontStyle', getFontStyle, setFontStyle ); + +/** +* Encoding specifying a font weight. +* +* @name fontWeight +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'fontWeight': new Value({ +* 'value': 'bold' +* }) +* }); +* +* var v = encoding.fontWeight; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'fontWeight', getFontWeight, setFontWeight ); + +/** +* Encoding specifying a mark height (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name height +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.height; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'height', void 0 ); + +/** +* Encoding specifying the maximum length of the text mark (in pixels). +* +* @name limit +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'limit': new Value({ +* 'value': 100 +* }) +* }); +* +* var v = encoding.limit; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'limit', getLimit, setLimit ); + +/** +* Encoding specifying a line break delimiter for multi-line text. +* +* @name lineBreak +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'lineBreak': new Value({ +* 'value': '\n' +* }) +* }); +* +* var v = encoding.lineBreak; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'lineBreak', getLineBreak, setLineBreak ); + +/** +* Encoding specifying the height (in pixels) of each line of text in a multi-line text mark. +* +* @name lineHeight +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'lineHeight': new Value({ +* 'value': 20 +* }) +* }); +* +* var v = encoding.lineHeight; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'lineHeight', getLineHeight, setLineHeight ); + +/** +* EncodingSet properties. +* +* @name properties +* @memberof TextEncodingSet.prototype +* @type {Array} +* +* @example +* var encoding = new TextEncodingSet(); +* +* var v = encoding.properties; +* // returns [...] +*/ +setNonEnumerableReadOnlyAccessor( TextEncodingSet.prototype, 'properties', getProperties ); + +/** +* Encoding specifying a polar coordinate radial offset (in pixels) relative to the origin determined by the x and y properties. +* +* @name radius +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'radius': new Value({ +* 'value': 50 +* }) +* }); +* +* var v = encoding.radius; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'radius', getRadius, setRadius ); + +/** +* Encoding specifying the text to display. +* +* @name text +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'text': new Value({ +* 'value': 'Hello, World!' +* }) +* }); +* +* var v = encoding.text; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'text', getText, setText ); + +/** +* Encoding specifying a polar coordinate angle (in radians) relative to the origin determined by the x and y properties. +* +* @name theta +* @memberof TextEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet({ +* 'theta': new Value({ +* 'value': 1.5708 +* }) +* }); +* +* var v = encoding.theta; +* // returns +*/ +setReadWriteAccessor( TextEncodingSet.prototype, 'theta', getTheta, setTheta ); + +/** +* Encoding specifying a mark width (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name width +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.width; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'width', void 0 ); + +/** +* Encoding specifying a mark secondary x-coordinate (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name x2 +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.x2; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'x2', void 0 ); + +/** +* Encoding specifying a mark center x-coordinate (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name xc +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.xc; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'xc', void 0 ); + +/** +* Encoding specifying a mark secondary y-coordinate (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name y2 +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.y2; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'y2', void 0 ); + +/** +* Encoding specifying a mark center y-coordinate (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to text mark types. +* +* @name yc +* @memberof TextEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new TextEncodingSet(); +* +* var v = encoding.yc; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( TextEncodingSet.prototype, 'yc', void 0 ); + + +// EXPORTS // + +module.exports = TextEncodingSet; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties.json new file mode 100644 index 000000000000..a621a7d343e7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties.json @@ -0,0 +1,40 @@ +[ + "aria", + "blend", + "cursor", + "description", + "fill", + "fillOpacity", + "href", + "opacity", + "stroke", + "strokeCap", + "strokeDash", + "strokeDashOffset", + "strokeJoin", + "strokeMiterLimit", + "strokeOpacity", + "strokeWidth", + "tooltip", + "x", + "y", + "zindex", + + "align", + "angle", + "baseline", + "dir", + "dx", + "dy", + "ellipsis", + "font", + "fontSize", + "fontStyle", + "fontWeight", + "limit", + "lineBreak", + "lineHeight", + "radius", + "text", + "theta" +] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties/get.js new file mode 100644 index 000000000000..f3cbb28454ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/properties/get.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var properties = require( './../properties.json' ); + + +// MAIN // + +/** +* Returns the list of enumerable properties. +* +* @private +* @returns {Array} properties +*/ +function get() { + return properties.slice(); +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js new file mode 100644 index 000000000000..cec3015d5c79 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a polar coordinate radial offset relative to the origin determined by the x and y properties. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/properties.js new file mode 100644 index 000000000000..c13195ef22ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'radius' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js new file mode 100644 index 000000000000..382277bad9f0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a polar coordinate radial offset (in pixels) relative to the origin determined by the x and y properties. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/get.js new file mode 100644 index 000000000000..9bc04df633be --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the text to display. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/properties.js new file mode 100644 index 000000000000..77ba80709f52 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'text' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/set.js new file mode 100644 index 000000000000..35e9604e7c4a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/text/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the text to display. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js new file mode 100644 index 000000000000..47fa3212af4f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a polar coordinate angle relative to the origin determined by the x and y properties. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/properties.js new file mode 100644 index 000000000000..28964b68b26a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'theta' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js new file mode 100644 index 000000000000..ed2f4f83ba3c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a polar coordinate angle (in radians) relative to the origin determined by the x and y properties. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/package.json b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/package.json new file mode 100644 index 000000000000..505e62c460dc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/package.json @@ -0,0 +1,62 @@ +{ + "name": "@stdlib/plot/vega/mark/text/encoding-set", + "version": "0.0.0", + "description": "Text mark encoding set constructor.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "plot", + "vega", + "text", + "mark", + "encoding", + "constructor", + "ctor" + ], + "__stdlib__": {} +} From 546a7650cdd60b21a031cf2112002dd2d46878fe Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:42:18 -0700 Subject: [PATCH 2/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js index 58552882f446..ad98ed73a93d 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/angle/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a rotation angle. +* Returns a value reference specifying a rotation angle (in degrees). * * @private * @returns {(Value|void)} value reference From 552570ff40df42e268c8ec5c9771adef6f5c24fa Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:45:08 -0700 Subject: [PATCH 3/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js | 2 +- .../@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js | 2 +- .../@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js | 2 +- .../@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js index caa467647a9a..3912a54e70b1 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a horizontal offset between the text and its anchor point. +* Returns a value reference specifying a horizontal offset (in pixels and before rotation) between the text and its anchor point. * * @private * @returns {(Value|void)} value reference diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js index 0bcbfc928913..a6ff40912c25 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dx/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); // MAIN // /** -* Sets a horizontal offset (in pixels) between the text and its anchor point. +* Sets a horizontal offset (in pixels and before rotation) between the text and its anchor point. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js index 0de54ad3420f..035fae338464 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a vertical offset between the text and its anchor point. +* Returns a value reference specifying a vertical offset (in pixels and before rotation) between the text and its anchor point. * * @private * @returns {(Value|void)} value reference diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js index 1dd455e25a68..2593bff3f30b 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/dy/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); // MAIN // /** -* Sets a vertical offset (in pixels) between the text and its anchor point. +* Sets a vertical offset (in pixels and before rotation) between the text and its anchor point. * * ## Notes * From 67ead92bff6fd9b31c4a8e73520631f80c95fa82 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:47:04 -0700 Subject: [PATCH 4/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../plot/vega/mark/text/encoding-set/lib/font-size/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js index 2a0f7f18099d..846ecbc0d29b 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/font-size/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a font size. +* Returns a value reference specifying a font size (in pixels). * * @private * @returns {(Value|void)} value reference From 18e4b922b2a7c8bea614ca7cdac913374f952962 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:48:12 -0700 Subject: [PATCH 5/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js index b7b6625c9dcc..e49776236b29 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/limit/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying the maximum length of the text mark. +* Returns a value reference specifying the maximum length of the text mark (in pixels). * * @private * @returns {(Value|void)} value reference From 8e2c098ed94f6067283a72d24d1b1676828caf9e Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:49:26 -0700 Subject: [PATCH 6/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../plot/vega/mark/text/encoding-set/lib/line-height/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js index ccbbb8565e5d..19f98d59f89a 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/line-height/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying the height of each line of text in a multi-line text mark. +* Returns a value reference specifying the height (in pixels) of each line of text in a multi-line text mark. * * @private * @returns {(Value|void)} value reference From dd0261fb91beb083d1ff82dbf7037fc1fe1114f7 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:51:10 -0700 Subject: [PATCH 7/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js | 2 +- .../@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js index cec3015d5c79..804cd60c766f 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a polar coordinate radial offset relative to the origin determined by the x and y properties. +* Returns a value reference specifying a polar coordinate radial offset (in pixels) relative to the origin determined by the `x` and `y` properties. * * @private * @returns {(Value|void)} value reference diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js index 382277bad9f0..3740de8251cc 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/radius/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); // MAIN // /** -* Sets a polar coordinate radial offset (in pixels) relative to the origin determined by the x and y properties. +* Sets a polar coordinate radial offset (in pixels) relative to the origin determined by the `x` and `y` properties. * * ## Notes * From 47ec82bb4b031191e517c17af6023991835b2b3d Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:52:45 -0700 Subject: [PATCH 8/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js | 2 +- .../@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js index 47fa3212af4f..1153e2c979da 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns a value reference specifying a polar coordinate angle relative to the origin determined by the x and y properties. +* Returns a value reference specifying a polar coordinate angle (in radians) relative to the origin determined by the `x` and `y` properties. * * @private * @returns {(Value|void)} value reference diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js index ed2f4f83ba3c..8cde393b5ca8 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/theta/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:mark:text:encoding-set:set:'+prop.name ); // MAIN // /** -* Sets a polar coordinate angle (in radians) relative to the origin determined by the x and y properties. +* Sets a polar coordinate angle (in radians) relative to the origin determined by the `x` and `y` properties. * * ## Notes * From 98178efdff2518ec62cacdc83977dd93515a2807 Mon Sep 17 00:00:00 2001 From: Athan Date: Fri, 7 Aug 2026 20:57:59 -0700 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/text/encoding-set/lib/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js index 9a6938e321d7..17a5579c6807 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/text/encoding-set/lib/main.js @@ -286,7 +286,7 @@ setReadWriteAccessor( TextEncodingSet.prototype, 'baseline', getBaseline, setBas setReadWriteAccessor( TextEncodingSet.prototype, 'dir', getDir, setDir ); /** -* Encoding specifying a horizontal offset (in pixels) between the text and its anchor point. +* Encoding specifying a horizontal offset (in pixels and before rotation) between the text and its anchor point. * * @name dx * @memberof TextEncodingSet.prototype @@ -307,7 +307,7 @@ setReadWriteAccessor( TextEncodingSet.prototype, 'dir', getDir, setDir ); setReadWriteAccessor( TextEncodingSet.prototype, 'dx', getDx, setDx ); /** -* Encoding specifying a vertical offset (in pixels) between the text and its anchor point. +* Encoding specifying a vertical offset (in pixels and before rotation) between the text and its anchor point. * * @name dy * @memberof TextEncodingSet.prototype @@ -533,7 +533,7 @@ setReadWriteAccessor( TextEncodingSet.prototype, 'lineHeight', getLineHeight, se setNonEnumerableReadOnlyAccessor( TextEncodingSet.prototype, 'properties', getProperties ); /** -* Encoding specifying a polar coordinate radial offset (in pixels) relative to the origin determined by the x and y properties. +* Encoding specifying a polar coordinate radial offset (in pixels) relative to the origin determined by the `x` and `y` properties. * * @name radius * @memberof TextEncodingSet.prototype @@ -575,7 +575,7 @@ setReadWriteAccessor( TextEncodingSet.prototype, 'radius', getRadius, setRadius setReadWriteAccessor( TextEncodingSet.prototype, 'text', getText, setText ); /** -* Encoding specifying a polar coordinate angle (in radians) relative to the origin determined by the x and y properties. +* Encoding specifying a polar coordinate angle (in radians) relative to the origin determined by the `x` and `y` properties. * * @name theta * @memberof TextEncodingSet.prototype