From c36556cf840f528092f1b210b6f17e126526a1eb Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Wed, 29 Jul 2026 16:59:25 +0530 Subject: [PATCH 1/3] feat: add plot/vega/mark/arc/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/arc/encoding-set/examples/index.js | 34 ++ .../mark/arc/encoding-set/lib/change_event.js | 41 ++ .../arc/encoding-set/lib/corner-radius/get.js | 43 ++ .../lib/corner-radius/properties.js | 33 ++ .../arc/encoding-set/lib/corner-radius/set.js | 66 +++ .../arc/encoding-set/lib/end-angle/get.js | 43 ++ .../encoding-set/lib/end-angle/properties.js | 33 ++ .../arc/encoding-set/lib/end-angle/set.js | 66 +++ .../vega/mark/arc/encoding-set/lib/index.js | 40 ++ .../arc/encoding-set/lib/inner-radius/get.js | 43 ++ .../lib/inner-radius/properties.js | 33 ++ .../arc/encoding-set/lib/inner-radius/set.js | 66 +++ .../vega/mark/arc/encoding-set/lib/main.js | 394 ++++++++++++++++++ .../arc/encoding-set/lib/outer-radius/get.js | 43 ++ .../lib/outer-radius/properties.js | 33 ++ .../arc/encoding-set/lib/outer-radius/set.js | 66 +++ .../arc/encoding-set/lib/pad-angle/get.js | 43 ++ .../encoding-set/lib/pad-angle/properties.js | 33 ++ .../arc/encoding-set/lib/pad-angle/set.js | 66 +++ .../mark/arc/encoding-set/lib/properties.json | 31 ++ .../arc/encoding-set/lib/properties/get.js | 41 ++ .../arc/encoding-set/lib/start-angle/get.js | 43 ++ .../lib/start-angle/properties.js | 33 ++ .../arc/encoding-set/lib/start-angle/set.js | 66 +++ .../vega/mark/arc/encoding-set/package.json | 62 +++ 25 files changed, 1495 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/examples/index.js new file mode 100644 index 000000000000..2ce458ed1616 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 ArcEncodingSet = require( './../lib' ); + +var encoding = new ArcEncodingSet({ + '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/arc/encoding-set/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/change_event.js new file mode 100644 index 000000000000..359afbfa206b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/arc/encoding-set/lib/corner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/get.js new file mode 100644 index 000000000000..ddd075d401dc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-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 the radius (in pixels) of rounded arc corners. +* +* @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/arc/encoding-set/lib/corner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/properties.js new file mode 100644 index 000000000000..00b6324d2957 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-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( 'cornerRadius' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-radius/set.js new file mode 100644 index 000000000000..2c99318a184b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/corner-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the radius (in pixels) of rounded arc corners. +* +* ## 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/arc/encoding-set/lib/end-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/get.js new file mode 100644 index 000000000000..eac6bbe00fdd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-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 the end angle (in radians). +* +* @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/arc/encoding-set/lib/end-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/properties.js new file mode 100644 index 000000000000..6cfbc9174fb6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-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( 'endAngle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-angle/set.js new file mode 100644 index 000000000000..6a81c2ad83b3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/end-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the end angle (in radians). +* +* ## 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/arc/encoding-set/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/index.js new file mode 100644 index 000000000000..ae843c94b518 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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'; + +/** +* Arc mark encoding set constructor. +* +* @module @stdlib/plot/vega/mark/arc/encoding-set +* +* @example +* var ArcEncodingSet = require( '@stdlib/plot/vega/mark/arc/encoding-set' ); +* +* var encoding = new ArcEncodingSet(); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/get.js new file mode 100644 index 000000000000..9c1ab8e7956d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-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 the inner radius (in pixels). +* +* @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/arc/encoding-set/lib/inner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/properties.js new file mode 100644 index 000000000000..88dfdaa1d5d2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-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( 'innerRadius' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-radius/set.js new file mode 100644 index 000000000000..a37451f0c1f9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/inner-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the inner radius (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/arc/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js new file mode 100644 index 000000000000..b1ee84297316 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js @@ -0,0 +1,394 @@ +/** +* @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 getCornerRadius = require( './corner-radius/get.js' ); +var setCornerRadius = require( './corner-radius/set.js' ); + +var getEndAngle = require( './end-angle/get.js' ); +var setEndAngle = require( './end-angle/set.js' ); + +var getInnerRadius = require( './inner-radius/get.js' ); +var setInnerRadius = require( './inner-radius/set.js' ); + +var getOuterRadius = require( './outer-radius/get.js' ); +var setOuterRadius = require( './outer-radius/set.js' ); + +var getPadAngle = require( './pad-angle/get.js' ); +var setPadAngle = require( './pad-angle/set.js' ); + +var getProperties = require( './properties/get.js' ); + +var getStartAngle = require( './start-angle/get.js' ); +var setStartAngle = require( './start-angle/set.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:arc:encoding-set:main' ); + + +// MAIN // + +/** +* Arc mark encoding set constructor. +* +* @constructor +* @param {Options} options - constructor options +* @param {Value} [options.aria] - flag indicating whether to include ARIA attributes in SVG output +* @param {Value} [options.blend] - color blend mode +* @param {Value} [options.cornerRadius] - radius (in pixels) of rounded arc corners +* @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.endAngle] - end angle (in radians) +* @param {Value} [options.fill] - fill color +* @param {Value} [options.fillOpacity] - fill opacity +* @param {Value} [options.height] - mark height +* @param {Value} [options.href] - URL to load upon mouse click +* @param {Value} [options.innerRadius] - inner radius (in pixels) +* @param {Value} [options.opacity] - mark opacity +* @param {Value} [options.outerRadius] - outer radius (in pixels) +* @param {Value} [options.padAngle] - angular padding (in radians) applied to the sides of an arc +* @param {Value} [options.startAngle] - start angle (in radians) +* @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.tooltip] - tooltip text to show upon mouse hover +* @param {Value} [options.width] - mark width +* @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 {ArcEncodingSet} encoding set instance +* +* @example +* var encoding = new ArcEncodingSet(); +* // returns +*/ +function ArcEncodingSet( options ) { + var nargs; + var v; + var k; + var i; + + nargs = arguments.length; + if ( !( this instanceof ArcEncodingSet ) ) { + if ( nargs === 0 ) { + return new ArcEncodingSet(); + } + return new ArcEncodingSet( 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( ArcEncodingSet, EncodingSet ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof ArcEncodingSet +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( ArcEncodingSet, 'name', 'ArcEncodingSet' ); + +/** +* Encoding specifying the radius (in pixels) of rounded arc corners. +* +* @name cornerRadius +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'cornerRadius': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadius; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'cornerRadius', getCornerRadius, setCornerRadius ); + +/** +* Encoding specifying the end angle (in radians). +* +* @name endAngle +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'endAngle': new Value({ +* 'value': 3.14 +* }) +* }); +* +* var v = encoding.endAngle; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'endAngle', getEndAngle, setEndAngle ); + +/** +* Encoding specifying the inner radius (in pixels). +* +* @name innerRadius +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'innerRadius': new Value({ +* 'value': 50 +* }) +* }); +* +* var v = encoding.innerRadius; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'innerRadius', getInnerRadius, setInnerRadius ); + +/** +* Encoding specifying the outer radius (in pixels). +* +* @name outerRadius +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'outerRadius': new Value({ +* 'value': 100 +* }) +* }); +* +* var v = encoding.outerRadius; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'outerRadius', getOuterRadius, setOuterRadius ); + +/** +* Encoding specifying the angular padding (in radians) applied to the sides of an arc. +* +* @name padAngle +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'padAngle': new Value({ +* 'value': 0.05 +* }) +* }); +* +* var v = encoding.padAngle; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'padAngle', getPadAngle, setPadAngle ); + +/** +* EncodingSet properties. +* +* @name properties +* @memberof ArcEncodingSet.prototype +* @type {Array} +* +* @example +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.properties; +* // returns [...] +*/ +setNonEnumerableReadOnlyAccessor( ArcEncodingSet.prototype, 'properties', getProperties ); + +/** +* Encoding specifying the start angle (in radians). +* +* @name startAngle +* @memberof EncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet({ +* 'startAngle': new Value({ +* 'value': 1.57 +* }) +* }); +* +* var v = encoding.startAngle; +* // returns +*/ +setReadWriteAccessor( ArcEncodingSet.prototype, 'startAngle', getStartAngle, setStartAngle ); + +/** +* Encoding specifying a mark secondary x-coordinate (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to arc mark types. +* +* @name x2 +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.x2; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.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 arc mark types. +* +* @name xc +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.xc; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.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 arc mark types. +* +* @name y2 +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.y2; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.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 arc mark types. +* +* @name yc +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.yc; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.prototype, 'yc', void 0 ); + + +// EXPORTS // + +module.exports = ArcEncodingSet; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/get.js new file mode 100644 index 000000000000..dee14bfbc8e6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-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 the outer radius (in pixels). +* +* @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/arc/encoding-set/lib/outer-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/properties.js new file mode 100644 index 000000000000..f2fcfd50fb5e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-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( 'outerRadius' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-radius/set.js new file mode 100644 index 000000000000..6b1090e31f0c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/outer-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the outer radius (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/arc/encoding-set/lib/pad-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/get.js new file mode 100644 index 000000000000..b16150323d34 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-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 the angular padding (in radians) applied to the sides of an arc. +* +* @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/arc/encoding-set/lib/pad-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/properties.js new file mode 100644 index 000000000000..d35e9b1f9ef4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-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( 'padAngle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-angle/set.js new file mode 100644 index 000000000000..b5796db1947b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/pad-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the angular padding (in radians) applied to the sides of an arc. +* +* ## 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/arc/encoding-set/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json new file mode 100644 index 000000000000..07e57ee960d8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json @@ -0,0 +1,31 @@ +[ + "aria", + "blend", + "cursor", + "description", + "fill", + "fillOpacity", + "height", + "href", + "opacity", + "stroke", + "strokeCap", + "strokeDash", + "strokeDashOffset", + "strokeJoin", + "strokeMiterLimit", + "strokeOpacity", + "strokeWidth", + "tooltip", + "width", + "x", + "y", + "zindex", + + "cornerRadius", + "endAngle", + "innerRadius", + "outerRadius", + "padAngle", + "startAngle" +] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties/get.js new file mode 100644 index 000000000000..f3cbb28454ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/arc/encoding-set/lib/start-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/get.js new file mode 100644 index 000000000000..e9177890831f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-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 the start angle (in radians). +* +* @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/arc/encoding-set/lib/start-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/properties.js new file mode 100644 index 000000000000..7509ef0cbba7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-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( 'startAngle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-angle/set.js new file mode 100644 index 000000000000..07760ae4f2d1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/start-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:arc:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the start angle (in radians). +* +* ## 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/arc/encoding-set/package.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/package.json new file mode 100644 index 000000000000..643c6f891744 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/package.json @@ -0,0 +1,62 @@ +{ + "name": "@stdlib/plot/vega/mark/arc/encoding-set", + "version": "0.0.0", + "description": "Arc 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", + "arc", + "mark", + "encoding", + "constructor", + "ctor" + ], + "__stdlib__": {} +} From f8a0e18cf4ee53606b0214f9e042392aae90b7be Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 29 Jul 2026 19:39:05 -0700 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Athan Signed-off-by: Athan --- .../@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js | 2 -- .../@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js index b1ee84297316..36b838c83bfc 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js @@ -77,7 +77,6 @@ var debug = logger( 'vega:mark:arc:encoding-set:main' ); * @param {Value} [options.endAngle] - end angle (in radians) * @param {Value} [options.fill] - fill color * @param {Value} [options.fillOpacity] - fill opacity -* @param {Value} [options.height] - mark height * @param {Value} [options.href] - URL to load upon mouse click * @param {Value} [options.innerRadius] - inner radius (in pixels) * @param {Value} [options.opacity] - mark opacity @@ -93,7 +92,6 @@ var debug = logger( 'vega:mark:arc:encoding-set:main' ); * @param {Value} [options.strokeOpacity] - stroke opacity * @param {Value} [options.strokeWidth] - stroke width * @param {Value} [options.tooltip] - tooltip text to show upon mouse hover -* @param {Value} [options.width] - mark width * @param {Value} [options.x] - primary x-coordinate * @param {Value} [options.y] - primary y-coordinate * @param {Value} [options.zindex] - layering order of sibling mark items diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json index 07e57ee960d8..2278f093c488 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/properties.json @@ -5,7 +5,6 @@ "description", "fill", "fillOpacity", - "height", "href", "opacity", "stroke", @@ -17,7 +16,6 @@ "strokeOpacity", "strokeWidth", "tooltip", - "width", "x", "y", "zindex", From 35c2e191b1e36795969f80d59e253332cf335895 Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 29 Jul 2026 19:41:21 -0700 Subject: [PATCH 3/3] fix: override inherited properties Signed-off-by: Athan --- .../vega/mark/arc/encoding-set/lib/main.js | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js index 36b838c83bfc..dd6a10b9790d 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/encoding-set/lib/main.js @@ -199,6 +199,28 @@ setReadWriteAccessor( ArcEncodingSet.prototype, 'cornerRadius', getCornerRadius, */ setReadWriteAccessor( ArcEncodingSet.prototype, 'endAngle', getEndAngle, setEndAngle ); +/** +* Encoding specifying a mark height (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to arc mark types. +* +* @name height +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.height; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.prototype, 'height', void 0 ); + /** * Encoding specifying the inner radius (in pixels). * @@ -298,6 +320,28 @@ setNonEnumerableReadOnlyAccessor( ArcEncodingSet.prototype, 'properties', getPro */ setReadWriteAccessor( ArcEncodingSet.prototype, 'startAngle', getStartAngle, setStartAngle ); +/** +* Encoding specifying a mark width (in pixels). +* +* ## Notes +* +* - This property is inherited from the parent prototype and is not applicable to arc mark types. +* +* @name width +* @memberof ArcEncodingSet.prototype +* @readonly +* @type {void} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new ArcEncodingSet(); +* +* var v = encoding.width; +* // returns undefined +*/ +setNonEnumerableReadOnlyProperty( ArcEncodingSet.prototype, 'width', void 0 ); + /** * Encoding specifying a mark secondary x-coordinate (in pixels). *