From 1413776715ddb07ade611e3eec0dc2af5d52df93 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Thu, 7 May 2026 00:45:26 +0530 Subject: [PATCH 1/7] feat: add plot/vega/mark/arc --- .../plot/vega/mark/arc/examples/index.js | 27 ++ .../plot/vega/mark/arc/lib/change_event.js | 41 +++ .../vega/mark/arc/lib/corner-radius/get.js | 43 +++ .../mark/arc/lib/corner-radius/properties.js | 33 ++ .../vega/mark/arc/lib/corner-radius/set.js | 61 ++++ .../plot/vega/mark/arc/lib/defaults.js | 43 +++ .../plot/vega/mark/arc/lib/end-angle/get.js | 43 +++ .../vega/mark/arc/lib/end-angle/properties.js | 33 ++ .../plot/vega/mark/arc/lib/end-angle/set.js | 66 ++++ .../@stdlib/plot/vega/mark/arc/lib/index.js | 42 +++ .../vega/mark/arc/lib/inner-radius/get.js | 43 +++ .../mark/arc/lib/inner-radius/properties.js | 33 ++ .../vega/mark/arc/lib/inner-radius/set.js | 66 ++++ .../@stdlib/plot/vega/mark/arc/lib/main.js | 342 ++++++++++++++++++ .../vega/mark/arc/lib/outer-radius/get.js | 43 +++ .../mark/arc/lib/outer-radius/properties.js | 33 ++ .../vega/mark/arc/lib/outer-radius/set.js | 66 ++++ .../plot/vega/mark/arc/lib/pad-angle/get.js | 43 +++ .../vega/mark/arc/lib/pad-angle/properties.js | 33 ++ .../plot/vega/mark/arc/lib/pad-angle/set.js | 66 ++++ .../plot/vega/mark/arc/lib/properties.json | 24 ++ .../plot/vega/mark/arc/lib/properties/get.js | 41 +++ .../plot/vega/mark/arc/lib/start-angle/get.js | 43 +++ .../mark/arc/lib/start-angle/properties.js | 33 ++ .../plot/vega/mark/arc/lib/start-angle/set.js | 66 ++++ .../plot/vega/mark/arc/lib/type/get.js | 41 +++ .../plot/vega/mark/arc/lib/type/set.js | 46 +++ .../plot/vega/mark/arc/lib/type/type.js | 23 ++ .../@stdlib/plot/vega/mark/arc/package.json | 59 +++ 29 files changed, 1576 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js new file mode 100644 index 000000000000..08c30f014c06 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js @@ -0,0 +1,27 @@ +/** +* @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 ArcMark = require( './../lib' ); + +var mark = new ArcMark({ + 'cornerRadius': 5 +}); + +console.log( mark.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js new file mode 100644 index 000000000000..359afbfa206b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/corner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/get.js new file mode 100644 index 000000000000..b42d2c10b84f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the corner radius. +* +* @private +* @returns {NonNegativeNumber} corner radius +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js new file mode 100644 index 000000000000..00b6324d2957 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/corner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js new file mode 100644 index 000000000000..ce2d48cbb941 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js @@ -0,0 +1,61 @@ +/** +* @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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius. +* +* @private +* @param {NonNegativeNumber} value - input value +* @throws {TypeError} must be a nonnegative number +* @returns {void} +*/ +function set( value ) { + if ( !isNonNegativeNumber( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/defaults.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.js new file mode 100644 index 000000000000..add1fb001615 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.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. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns defaults. +* +* @private +* @returns {Object} default options +* +* @example +* var o = defaults(); +* // returns {...} +*/ +function defaults() { + return { + // The radius in pixels of rounded arc corners: + 'cornerRadius': 0 + }; +} + + +// EXPORTS // + +module.exports = defaults; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js new file mode 100644 index 000000000000..6d15b46bd6e1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the end angle in radians. +* +* @private +* @returns {number} end angle in radians +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js new file mode 100644 index 000000000000..6cfbc9174fb6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/end-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/set.js new file mode 100644 index 000000000000..ff22615f2456 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; +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:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the end angle in radians. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(number|void)} value - input value +* @throws {TypeError} must be a number +* @returns {void} +*/ +function set( value ) { + if ( !isNumber( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a number. 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/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js new file mode 100644 index 000000000000..068a1bd940b1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js @@ -0,0 +1,42 @@ +/** +* @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 constructor. +* +* @module @stdlib/plot/vega/mark/arc +* +* @example +* var ArcMark = require( '@stdlib/plot/vega/mark/arc' ); +* +* var mark = new ArcMark({ +* 'cornerRadius': 5 +* }); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js new file mode 100644 index 000000000000..4db3c8cf2736 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the inner radius in pixels. +* +* @private +* @returns {NonNegativeNumber} inner radius in pixels +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js new file mode 100644 index 000000000000..88dfdaa1d5d2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/inner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/set.js new file mode 100644 index 000000000000..287d76202371 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; +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:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the inner radius in pixels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(NonNegativeNumber|void)} value - input value +* @throws {TypeError} must be a nonnegative number +* @returns {void} +*/ +function set( value ) { + if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js new file mode 100644 index 000000000000..dad727355576 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js @@ -0,0 +1,342 @@ +/** +* @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-restricted-syntax, no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isObject = require( '@stdlib/assert/is-object' ); +var setReadWriteAccessor = require( '@stdlib/utils/define-read-write-accessor' ); +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 hasProp = require( '@stdlib/assert/has-property' ); +var inherit = require( '@stdlib/utils/inherit' ); +var objectKeys = require( '@stdlib/utils/keys' ); +var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); +var instance2json = require( '@stdlib/plot/vega/base/to-json' ); +var Mark = require( '@stdlib/plot/vega/mark/base/ctor' ); +var format = require( '@stdlib/string/format' ); +var properties = require( './properties.json' ); +var defaults = require( './defaults.js' ); + +// 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' ); + +var getType = require( './type/get.js' ); +var setType = require( './type/set.js' ); + +var TYPE = require( './type/type.js' ); + + +// VARIABLES // + +var debug = logger(' vega:arc-mark:main '); + + +// MAIN // + +/** +* Arc mark constructor. +* +* @constructor +* @param {Options} [options] - constructor options +* @param {boolean} [options.aria=true] - boolean indicating whether to include ARIA attributes in SVG output +* @param {(boolean|Signal|Object)} [options.clip=false] - setting indicating whether to clip marks to a specified shape +* @param {NonNegativeNumber} [options.cornerRadius=0] - radius in pixels of rounded arc corners +* @param {string} [options.description] - text description of a mark for ARIA accessibility +* @param {Object} [options.encode] - object containing visual encoding rules for mark properties +* @param {number} [options.endAngle] - end angle in radians +* @param {Object} [options.from] - object describing the data a mark should visualize +* @param {NonNegativeNumber} [options.innerRadius] - inner radius in pixels +* @param {boolean} [options.interactive=true] - boolean indicating whether a mark can serve as an input event source +* @param {(string|Object)} [options.key] - data field to use as a unique key for data binding +* @param {string} [options.name] - unique name +* @param {NonNegativeNumber} [options.outerRadius] - outer radius in pixels +* @param {NonNegativeNumber} [options.padAngle] - angular padding in radians +* @param {string} [options.role] - metadata string indicating the role of a mark +* @param {Object} [options.sort] - comparator for sorting mark items +* @param {number} [options.startAngle] - start angle in radians +* @param {(string|Array)} [options.style] - custom styles to apply to a mark +* @param {Array} [options.transforms=[]] - list of post-encoding transforms to apply after any "encode" blocks and which operate directly on mark scenegraph items +* @param {Array} [options.triggers=[]] - list of triggers for modifying mark properties in response to signal changes +* @param {number} [options.zindex=0] - integer z-index indicating the layering of a mark relative to other marks +* @throws {TypeError} options argument must be an object +* @throws {TypeError} `type` option, if provided, must be equal to "arc" +* @throws {Error} must provide valid options +* @returns {ArcMark} arc mark instance +* +* @example +* var mark = new ArcMark({ +* 'cornerRadius': 5 +* }); +* // returns +*/ +function ArcMark( options ) { + var opts; + var keys; + var v; + var k; + var i; + if ( !( this instanceof ArcMark ) ) { + if ( arguments.length === 0 ) { + return new ArcMark( {} ); + } + return new ArcMark( options ); + } + if ( arguments.length === 0 ) { + options = {}; + } + if ( !isObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); + } + if ( hasProp( options, 'type' ) && options.type !== TYPE ) { + throw new TypeError( format( 'invalid argument. `%s` option must be equal to "%s". Option: `%s`.', 'type', TYPE, options.type ) ); + } + options.type = TYPE; + Mark.call( this, options ); + + // Resolve the default configuration: + opts = defaults(); + + // Set internal properties according to the default configuration... + keys = objectKeys( opts ); + for ( i = 0; i < keys.length; i++ ) { + k = keys[ i ]; + this[ '_'+k ] = opts[ k ]; + } + // 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 ) ); + } + } + this._type = TYPE; + return this; +} + +/* +* Inherit from a parent prototype. +*/ +inherit( ArcMark, Mark ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof ArcMark +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( ArcMark, 'name', 'ArcMark' ); + +/** +* Radius in pixels of rounded arc corners. +* +* @name cornerRadius +* @memberof ArcMark.prototype +* @type {NonNegativeNumber} +* @default 0 +* +* @example +* var mark = new ArcMark({ +* 'cornerRadius': 5 +* }); +* +* var v = mark.cornerRadius; +* // returns 5 +*/ +setReadWriteAccessor( ArcMark.prototype, 'cornerRadius', getCornerRadius, setCornerRadius ); + +/** +* End angle in radians. +* +* @name endAngle +* @memberof ArcMark.prototype +* @type {(number|void)} +* +* @example +* var mark = new ArcMark({ +* 'endAngle': 3.14 +* }); +* +* var v = mark.endAngle; +* // returns 3.14 +*/ +setReadWriteAccessor( ArcMark.prototype, 'endAngle', getEndAngle, setEndAngle ); + +/** +* Inner radius in pixels. +* +* @name innerRadius +* @memberof ArcMark.prototype +* @type {(NonNegativeNumber|void)} +* +* @example +* var mark = new ArcMark({ +* 'innerRadius': 50 +* }); +* +* var v = mark.innerRadius; +* // returns 50 +*/ +setReadWriteAccessor( ArcMark.prototype, 'innerRadius', getInnerRadius, setInnerRadius ); + +/** +* Outer radius in pixels. +* +* @name outerRadius +* @memberof ArcMark.prototype +* @type {(NonNegativeNumber|void)} +* +* @example +* var mark = new ArcMark({ +* 'outerRadius': 100 +* }); +* +* var v = mark.outerRadius; +* // returns 100 +*/ +setReadWriteAccessor( ArcMark.prototype, 'outerRadius', getOuterRadius, setOuterRadius ); + +/** +* Angular padding in radians. +* +* @name padAngle +* @memberof ArcMark.prototype +* @type {(NonNegativeNumber|void)} +* +* @example +* var mark = new ArcMark({ +* 'padAngle': 0.05 +* }); +* +* var v = mark.padAngle; +* // returns 0.05 +*/ +setReadWriteAccessor( ArcMark.prototype, 'padAngle', getPadAngle, setPadAngle ); + +/** +* Start angle in radians. +* +* @name startAngle +* @memberof ArcMark.prototype +* @type {(number|void)} +* +* @example +* var mark = new ArcMark({ +* 'startAngle': 1.57 +* }); +* +* var v = mark.startAngle; +* // returns 1.57 +*/ +setReadWriteAccessor( ArcMark.prototype, 'startAngle', getStartAngle, setStartAngle ); + +/** +* Mark properties. +* +* @name properties +* @memberof ArcMark.prototype +* @type {Array} +* +* @example +* var mark = new ArcMark({}); +* +* var v = mark.properties; +* // returns [...] +*/ +setNonEnumerableReadOnlyAccessor( ArcMark.prototype, 'properties', getProperties ); + +/** +* Mark type. +* +* @name type +* @memberof ArcMark.prototype +* @type {string} +* @default 'arc' +* +* @example +* var mark = new ArcMark({ +* 'cornerRadius': 5 +* }); +* +* var v = mark.type; +* // returns 'arc' +*/ +setReadWriteAccessor( ArcMark.prototype, 'type', getType, setType ); + +/** +* Serializes an instance to a JSON object. +* +* ## Notes +* +* - This method is implicitly invoked by `JSON.stringify`. +* +* @name toJSON +* @memberof ArcMark.prototype +* @type {Function} +* @returns {Object} JSON object +* +* @example +* var mark = new ArcMark({ +* 'cornerRadius': 5 +* }); +* +* var v = mark.toJSON(); +* // returns {...} +*/ +setNonEnumerableReadOnly( ArcMark.prototype, 'toJSON', function toJSON() { + return instance2json( this, properties ); +}); + + +// EXPORTS // + +module.exports = ArcMark; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js new file mode 100644 index 000000000000..d52457969351 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the outer radius in pixels. +* +* @private +* @returns {NonNegativeNumber} outer radius in pixels +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js new file mode 100644 index 000000000000..f2fcfd50fb5e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/outer-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/set.js new file mode 100644 index 000000000000..fa02d3d43d52 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; +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:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the outer radius in pixels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(NonNegativeNumber|void)} value - input value +* @throws {TypeError} must be a nonnegative number +* @returns {void} +*/ +function set( value ) { + if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/pad-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js new file mode 100644 index 000000000000..8585ae2812ef --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the angular padding in radians. +* +* @private +* @returns {NonNegativeNumber} angular padding in radians +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js new file mode 100644 index 000000000000..d35e9b1f9ef4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/pad-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/set.js new file mode 100644 index 000000000000..b810ca5e643d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; +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:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the angular padding in radians. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(NonNegativeNumber|void)} value - input value +* @throws {TypeError} must be a nonnegative number +* @returns {void} +*/ +function set( value ) { + if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json new file mode 100644 index 000000000000..bc2211dcdebc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json @@ -0,0 +1,24 @@ +[ + "aria", + "clip", + "description", + "encode", + "from", + "interactive", + "key", + "name", + "role", + "sort", + "style", + "transform", + "triggers", + "type", + "zindex", + + "cornerRadius", + "endAngle", + "innerRadius", + "outerRadius", + "padAngle", + "startAngle" +] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js new file mode 100644 index 000000000000..f3cbb28454ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/start-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js new file mode 100644 index 000000000000..98a0929b94f4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 the start angle in radians. +* +* @private +* @returns {number} start angle in radians +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js new file mode 100644 index 000000000000..7509ef0cbba7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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/lib/start-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/set.js new file mode 100644 index 000000000000..9d64f4673ced --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; +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:arc-mark:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the start angle in radians. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(number|void)} value - input value +* @throws {TypeError} must be a number +* @returns {void} +*/ +function set( value ) { + if ( !isNumber( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a number. 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/lib/type/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/get.js new file mode 100644 index 000000000000..84cc34fbacd5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/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 TYPE = require( './type.js' ); + + +// MAIN // + +/** +* Returns the mark type. +* +* @private +* @returns {string} mark type +*/ +function get() { + return TYPE; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js new file mode 100644 index 000000000000..9e06599a5a16 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js @@ -0,0 +1,46 @@ +/** +* @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 format = require( '@stdlib/string/format' ); +var TYPE = require( './type.js' ); + + +// MAIN // + +/** +* Sets the mark type. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid mark type +* @returns {void} +*/ +function set( value ) { + if ( value !== TYPE ) { + throw new TypeError( format( 'invalid assignment. `%s` must be equal to "%s". Value: `%s`.', 'type', TYPE, value ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js new file mode 100644 index 000000000000..a2bbaf895be7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js @@ -0,0 +1,23 @@ +/** +* @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'; + +// EXPORTS // + +module.exports = 'arc'; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json new file mode 100644 index 000000000000..b12cd4bb582e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json @@ -0,0 +1,59 @@ +{ + "name": "@stdlib/plot/vega/mark/arc", + "version": "0.0.0", + "description": "Arc mark 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", + "mark", + "arc" + ], + "__stdlib__": {} +} From 134046b714fe943faba2c7f276d29a0c955f8fd9 Mon Sep 17 00:00:00 2001 From: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:06:49 +0530 Subject: [PATCH 2/7] Update lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js Co-authored-by: Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com> Signed-off-by: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> --- lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js index dad727355576..e93c94ac20af 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js @@ -16,7 +16,7 @@ * limitations under the License. */ -/* eslint-disable no-restricted-syntax, no-invalid-this */ +/* eslint-disable no-restricted-syntax, no-invalid-this, stdlib/no-empty-lines-between-requires */ 'use strict'; From 4be5647830246319b3bc33b7dea6b4f972f13813 Mon Sep 17 00:00:00 2001 From: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:12:28 +0530 Subject: [PATCH 3/7] Update lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js Co-authored-by: Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com> Signed-off-by: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> --- lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js index e93c94ac20af..14080f5818e0 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js @@ -36,6 +36,7 @@ var Mark = require( '@stdlib/plot/vega/mark/base/ctor' ); var format = require( '@stdlib/string/format' ); var properties = require( './properties.json' ); var defaults = require( './defaults.js' ); +var TYPE = require( './type/type.js' ); // Note: keep the following in alphabetical order according to the `require` path... var getCornerRadius = require( './corner-radius/get.js' ); From 6fbf55122ba4d08a72abb48665ee29fc6e026f0f Mon Sep 17 00:00:00 2001 From: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:12:39 +0530 Subject: [PATCH 4/7] Update lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js Co-authored-by: Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com> Signed-off-by: Sachin Pangal <151670745+Sachinn-64@users.noreply.github.com> --- lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js index 14080f5818e0..f63e27fa405f 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js @@ -62,8 +62,6 @@ var setStartAngle = require( './start-angle/set.js' ); var getType = require( './type/get.js' ); var setType = require( './type/set.js' ); -var TYPE = require( './type/type.js' ); - // VARIABLES // From 2c1d0bbfd6bb36eef162aa3a07a3437f87411519 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Sat, 6 Jun 2026 14:51:17 +0530 Subject: [PATCH 5/7] chore: suggested changes --- 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 status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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 --- --- .../@stdlib/plot/vega/mark/arc/lib/end-angle/get.js | 2 +- .../@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js | 2 +- .../@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js | 2 +- .../@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js | 2 +- .../@stdlib/plot/vega/mark/arc/lib/start-angle/get.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js index 6d15b46bd6e1..955b212bee3b 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the end angle in radians. * * @private -* @returns {number} end angle in radians +* @returns {(number|void)} end angle in radians */ function get() { return this[ prop.private ]; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js index 4db3c8cf2736..a562da5684be 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the inner radius in pixels. * * @private -* @returns {NonNegativeNumber} inner radius in pixels +* @returns {(NonNegativeNumber|void)} inner radius in pixels */ function get() { return this[ prop.private ]; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js index d52457969351..4e54505c9d36 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the outer radius in pixels. * * @private -* @returns {NonNegativeNumber} outer radius in pixels +* @returns {(NonNegativeNumber|void)} outer radius in pixels */ function get() { return this[ prop.private ]; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js index 8585ae2812ef..6b38f4c92fec 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the angular padding in radians. * * @private -* @returns {NonNegativeNumber} angular padding in radians +* @returns {(NonNegativeNumber|void)} angular padding in radians */ function get() { return this[ prop.private ]; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js index 98a0929b94f4..4959bfe41679 100644 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the start angle in radians. * * @private -* @returns {number} start angle in radians +* @returns {(number|void)} start angle in radians */ function get() { return this[ prop.private ]; From efa71138badf6347f2f4b8063ee7f1f1981c085e Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Wed, 29 Jul 2026 16:46:46 +0530 Subject: [PATCH 6/7] refactor: arc mark implementation --- 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 --- --- .../plot/vega/mark/arc/ctor/examples/index.js | 45 +++++ .../vega/mark/arc/ctor/lib/change_event.js | 41 +++++ .../plot/vega/mark/arc/ctor/lib/defaults.js | 51 ++++++ .../plot/vega/mark/arc/ctor/lib/encode/get.js | 43 +++++ .../mark/arc/ctor/lib/encode/properties.js | 33 ++++ .../plot/vega/mark/arc/ctor/lib/encode/set.js | 66 +++++++ .../plot/vega/mark/arc/ctor/lib/index.js | 40 +++++ .../plot/vega/mark/arc/ctor/lib/main.js | 162 ++++++++++++++++++ .../plot/vega/mark/arc/ctor/package.json | 62 +++++++ 9 files changed, 543 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/defaults.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/examples/index.js new file mode 100644 index 000000000000..7fc0febef81a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/examples/index.js @@ -0,0 +1,45 @@ +/** +* @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( '@stdlib/plot/vega/mark/arc/encoding-set' ); +var ArcEncoding = require( '@stdlib/plot/vega/mark/arc/encoding' ); +var ArcMark = require( './../lib' ); + +var mark = new ArcMark({ + 'encode': new ArcEncoding({ + 'enter': new ArcEncodingSet({ + 'stroke': new Value({ + 'value': '#000' + }) + }), + 'update': new ArcEncodingSet({ + 'stroke': new Value({ + 'value': 'steelblue' + }) + }), + 'exit': new ArcEncodingSet({ + 'stroke': new Value({ + 'value': '#fff' + }) + }) + }) +}); +console.log( mark.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/change_event.js new file mode 100644 index 000000000000..359afbfa206b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/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/ctor/lib/defaults.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/defaults.js new file mode 100644 index 000000000000..060f64023e62 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/defaults.js @@ -0,0 +1,51 @@ +/** +* @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 ArcEncoding = require( '@stdlib/plot/vega/mark/arc/encoding' ); + + +// MAIN // + +/** +* Returns defaults. +* +* @private +* @returns {Object} default options +* +* @example +* var o = defaults(); +* // returns {...} +*/ +function defaults() { + return { + // Visual encoding rules for arc mark properties: + 'encoding': new ArcEncoding(), + + // Mark type: + 'type': 'arc' + }; +} + + +// EXPORTS // + +module.exports = defaults; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/get.js new file mode 100644 index 000000000000..2f03bc8cfb96 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/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 the set of visual encoding rules for arc mark properties. +* +* @private +* @returns {(ArcEncoding|void)} encodings +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/properties.js new file mode 100644 index 000000000000..534754763d4e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/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( 'encode' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/set.js new file mode 100644 index 000000000000..7a1a3c837469 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/encode/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 isArcMarkEncoding = require( '@stdlib/plot/vega/base/assert/is-arc-mark-encoding' ); +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:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the visual encoding rules for arc mark properties. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Encoding|void)} value - input value +* @throws {TypeError} must be an arc mark encoding instance +* @returns {void} +*/ +function set( value ) { + if ( !isArcMarkEncoding( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be an arc mark encoding instance. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', JSON.stringify( this[ prop.private ] ), JSON.stringify( 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/ctor/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/index.js new file mode 100644 index 000000000000..1ef1d978a673 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/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 constructor. +* +* @module @stdlib/plot/vega/mark/arc/ctor +* +* @example +* var ArcMark = require( '@stdlib/plot/vega/mark/arc/ctor' ); +* +* var mark = new ArcMark(); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/main.js new file mode 100644 index 000000000000..00156806d566 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/lib/main.js @@ -0,0 +1,162 @@ +/** +* @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 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 Mark = require( '@stdlib/plot/vega/mark/base/ctor' ); +var format = require( '@stdlib/string/format' ); +var defaults = require( './defaults.js' ); + +// Note: keep the following in alphabetical order according to the `require` path... +var getEncode = require( './encode/get.js' ); +var setEncode = require( './encode/set.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:arc:main' ); + + +// MAIN // + +/** +* Arc mark constructor. +* +* @constructor +* @param {Options} options - constructor options +* @param {boolean} [options.aria=true] - boolean indicating whether to include ARIA attributes in SVG output +* @param {(boolean|Signal|Object)} [options.clip=false] - setting indicating whether to clip marks to a specified shape +* @param {string} [options.description] - text description of a mark for ARIA accessibility +* @param {ArcEncoding} [options.encode] - visual encoding rules for mark properties +* @param {DataSource} [options.from] - object describing the data a mark should visualize +* @param {boolean} [options.interactive=true] - boolean indicating whether a mark can serve as an input event source +* @param {(string|Object)} [options.key] - data field to use as a unique key for data binding +* @param {string} [options.name] - unique name +* @param {string} [options.role] - metadata string indicating the role of a mark +* @param {Object} [options.sort] - comparator for sorting mark items +* @param {(string|Array)} [options.style] - custom styles to apply to a mark +* @param {Array} [options.transforms=[]] - list of post-encoding transforms to apply after any "encode" blocks and which operate directly on mark scenegraph items +* @param {Array} [options.triggers=[]] - list of triggers for modifying mark properties in response to signal changes +* @param {number} [options.zindex=0] - integer z-index indicating the layering of a mark relative to other marks +* @throws {TypeError} options argument must be an object +* @throws {Error} must provide valid options +* @returns {ArcMark} arc mark instance +* +* @example +* var mark = new ArcMark(); +* // returns +*/ +function ArcMark( options ) { + var nargs; + var props; + var v; + var k; + var i; + + nargs = arguments.length; + if ( !( this instanceof ArcMark ) ) { + if ( nargs === 0 ) { + return new ArcMark(); + } + return new ArcMark( options ); + } + Mark.call( this, defaults() ); // note: explicitly called without provided options, as we want to perform our own validation + + 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... + props = this.properties; + for ( i = 0; i < props.length; i++ ) { + k = props[ 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 `Mark` prototype. +*/ +inherit( ArcMark, Mark ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof ArcMark +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( ArcMark, 'name', 'ArcMark' ); + +/** +* Visual encoding rules for arc mark properties. +* +* @name encode +* @memberof Mark.prototype +* @type {(ArcEncoding|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* var EncodingSet = require( '@stdlib/plot/vega/mark/arc/encoding-set' ); +* var Encoding = require( '@stdlib/plot/vega/mark/arc/encoding' ); +* +* var mark = new ArcMark({ +* 'encode': new Encoding({ +* 'enter': new EncodingSet({ +* 'stroke': new Value({ +* 'value': 'steelblue' +* }) +* }) +* }) +* }); +* +* var v = mark.encode; +* // returns {...} +*/ +setReadWriteAccessor( ArcMark.prototype, 'encode', getEncode, setEncode ); + + +// EXPORTS // + +module.exports = ArcMark; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/package.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/package.json new file mode 100644 index 000000000000..a3a02c8e7d04 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/arc/ctor/package.json @@ -0,0 +1,62 @@ +{ + "name": "@stdlib/plot/vega/mark/arc/ctor", + "version": "0.0.0", + "description": "Arc mark 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", + "mark", + "arc", + "encoding", + "constructor", + "ctor" + ], + "__stdlib__": {} +} From 745fd73c1f58b9b9d27566e4295fca927528117e Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Wed, 29 Jul 2026 16:57:37 +0530 Subject: [PATCH 7/7] refactor: remove old files --- 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: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - 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 --- --- .../plot/vega/mark/arc/examples/index.js | 27 -- .../plot/vega/mark/arc/lib/change_event.js | 41 --- .../vega/mark/arc/lib/corner-radius/get.js | 43 --- .../mark/arc/lib/corner-radius/properties.js | 33 -- .../vega/mark/arc/lib/corner-radius/set.js | 61 ---- .../plot/vega/mark/arc/lib/defaults.js | 43 --- .../plot/vega/mark/arc/lib/end-angle/get.js | 43 --- .../vega/mark/arc/lib/end-angle/properties.js | 33 -- .../plot/vega/mark/arc/lib/end-angle/set.js | 66 ---- .../@stdlib/plot/vega/mark/arc/lib/index.js | 42 --- .../vega/mark/arc/lib/inner-radius/get.js | 43 --- .../mark/arc/lib/inner-radius/properties.js | 33 -- .../vega/mark/arc/lib/inner-radius/set.js | 66 ---- .../@stdlib/plot/vega/mark/arc/lib/main.js | 341 ------------------ .../vega/mark/arc/lib/outer-radius/get.js | 43 --- .../mark/arc/lib/outer-radius/properties.js | 33 -- .../vega/mark/arc/lib/outer-radius/set.js | 66 ---- .../plot/vega/mark/arc/lib/pad-angle/get.js | 43 --- .../vega/mark/arc/lib/pad-angle/properties.js | 33 -- .../plot/vega/mark/arc/lib/pad-angle/set.js | 66 ---- .../plot/vega/mark/arc/lib/properties.json | 24 -- .../plot/vega/mark/arc/lib/properties/get.js | 41 --- .../plot/vega/mark/arc/lib/start-angle/get.js | 43 --- .../mark/arc/lib/start-angle/properties.js | 33 -- .../plot/vega/mark/arc/lib/start-angle/set.js | 66 ---- .../plot/vega/mark/arc/lib/type/get.js | 41 --- .../plot/vega/mark/arc/lib/type/set.js | 46 --- .../plot/vega/mark/arc/lib/type/type.js | 23 -- .../@stdlib/plot/vega/mark/arc/package.json | 59 --- 29 files changed, 1575 deletions(-) delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/get.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js delete mode 100644 lib/node_modules/@stdlib/plot/vega/mark/arc/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js deleted file mode 100644 index 08c30f014c06..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/examples/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/** -* @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 ArcMark = require( './../lib' ); - -var mark = new ArcMark({ - 'cornerRadius': 5 -}); - -console.log( mark.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js deleted file mode 100644 index 359afbfa206b..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/change_event.js +++ /dev/null @@ -1,41 +0,0 @@ -/** -* @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/lib/corner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/get.js deleted file mode 100644 index b42d2c10b84f..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the corner radius. -* -* @private -* @returns {NonNegativeNumber} corner radius -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js deleted file mode 100644 index 00b6324d2957..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/corner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js deleted file mode 100644 index ce2d48cbb941..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/corner-radius/set.js +++ /dev/null @@ -1,61 +0,0 @@ -/** -* @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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; -var format = require( '@stdlib/string/format' ); -var changeEvent = require( './../change_event.js' ); -var prop = require( './properties.js' ); - - -// VARIABLES // - -var debug = logger( 'vega:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the corner radius. -* -* @private -* @param {NonNegativeNumber} value - input value -* @throws {TypeError} must be a nonnegative number -* @returns {void} -*/ -function set( value ) { - if ( !isNonNegativeNumber( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/defaults.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.js deleted file mode 100644 index add1fb001615..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/defaults.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 defaults. -* -* @private -* @returns {Object} default options -* -* @example -* var o = defaults(); -* // returns {...} -*/ -function defaults() { - return { - // The radius in pixels of rounded arc corners: - 'cornerRadius': 0 - }; -} - - -// EXPORTS // - -module.exports = defaults; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js deleted file mode 100644 index 955b212bee3b..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the end angle in radians. -* -* @private -* @returns {(number|void)} end angle in radians -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js deleted file mode 100644 index 6cfbc9174fb6..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/end-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/set.js deleted file mode 100644 index ff22615f2456..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/end-angle/set.js +++ /dev/null @@ -1,66 +0,0 @@ -/** -* @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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; -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:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the end angle in radians. -* -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* -* @private -* @param {(number|void)} value - input value -* @throws {TypeError} must be a number -* @returns {void} -*/ -function set( value ) { - if ( !isNumber( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a number. 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/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js deleted file mode 100644 index 068a1bd940b1..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/index.js +++ /dev/null @@ -1,42 +0,0 @@ -/** -* @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 constructor. -* -* @module @stdlib/plot/vega/mark/arc -* -* @example -* var ArcMark = require( '@stdlib/plot/vega/mark/arc' ); -* -* var mark = new ArcMark({ -* 'cornerRadius': 5 -* }); -* // returns -*/ - -// MODULES // - -var main = require( './main.js' ); - - -// EXPORTS // - -module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js deleted file mode 100644 index a562da5684be..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the inner radius in pixels. -* -* @private -* @returns {(NonNegativeNumber|void)} inner radius in pixels -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js deleted file mode 100644 index 88dfdaa1d5d2..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/inner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/set.js deleted file mode 100644 index 287d76202371..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/inner-radius/set.js +++ /dev/null @@ -1,66 +0,0 @@ -/** -* @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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; -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:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the inner radius in pixels. -* -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* -* @private -* @param {(NonNegativeNumber|void)} value - input value -* @throws {TypeError} must be a nonnegative number -* @returns {void} -*/ -function set( value ) { - if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js deleted file mode 100644 index f63e27fa405f..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/main.js +++ /dev/null @@ -1,341 +0,0 @@ -/** -* @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-restricted-syntax, no-invalid-this, stdlib/no-empty-lines-between-requires */ - -'use strict'; - -// MODULES // - -var logger = require( 'debug' ); -var isObject = require( '@stdlib/assert/is-object' ); -var setReadWriteAccessor = require( '@stdlib/utils/define-read-write-accessor' ); -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 hasProp = require( '@stdlib/assert/has-property' ); -var inherit = require( '@stdlib/utils/inherit' ); -var objectKeys = require( '@stdlib/utils/keys' ); -var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); -var instance2json = require( '@stdlib/plot/vega/base/to-json' ); -var Mark = require( '@stdlib/plot/vega/mark/base/ctor' ); -var format = require( '@stdlib/string/format' ); -var properties = require( './properties.json' ); -var defaults = require( './defaults.js' ); -var TYPE = require( './type/type.js' ); - -// 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' ); - -var getType = require( './type/get.js' ); -var setType = require( './type/set.js' ); - - -// VARIABLES // - -var debug = logger(' vega:arc-mark:main '); - - -// MAIN // - -/** -* Arc mark constructor. -* -* @constructor -* @param {Options} [options] - constructor options -* @param {boolean} [options.aria=true] - boolean indicating whether to include ARIA attributes in SVG output -* @param {(boolean|Signal|Object)} [options.clip=false] - setting indicating whether to clip marks to a specified shape -* @param {NonNegativeNumber} [options.cornerRadius=0] - radius in pixels of rounded arc corners -* @param {string} [options.description] - text description of a mark for ARIA accessibility -* @param {Object} [options.encode] - object containing visual encoding rules for mark properties -* @param {number} [options.endAngle] - end angle in radians -* @param {Object} [options.from] - object describing the data a mark should visualize -* @param {NonNegativeNumber} [options.innerRadius] - inner radius in pixels -* @param {boolean} [options.interactive=true] - boolean indicating whether a mark can serve as an input event source -* @param {(string|Object)} [options.key] - data field to use as a unique key for data binding -* @param {string} [options.name] - unique name -* @param {NonNegativeNumber} [options.outerRadius] - outer radius in pixels -* @param {NonNegativeNumber} [options.padAngle] - angular padding in radians -* @param {string} [options.role] - metadata string indicating the role of a mark -* @param {Object} [options.sort] - comparator for sorting mark items -* @param {number} [options.startAngle] - start angle in radians -* @param {(string|Array)} [options.style] - custom styles to apply to a mark -* @param {Array} [options.transforms=[]] - list of post-encoding transforms to apply after any "encode" blocks and which operate directly on mark scenegraph items -* @param {Array} [options.triggers=[]] - list of triggers for modifying mark properties in response to signal changes -* @param {number} [options.zindex=0] - integer z-index indicating the layering of a mark relative to other marks -* @throws {TypeError} options argument must be an object -* @throws {TypeError} `type` option, if provided, must be equal to "arc" -* @throws {Error} must provide valid options -* @returns {ArcMark} arc mark instance -* -* @example -* var mark = new ArcMark({ -* 'cornerRadius': 5 -* }); -* // returns -*/ -function ArcMark( options ) { - var opts; - var keys; - var v; - var k; - var i; - if ( !( this instanceof ArcMark ) ) { - if ( arguments.length === 0 ) { - return new ArcMark( {} ); - } - return new ArcMark( options ); - } - if ( arguments.length === 0 ) { - options = {}; - } - if ( !isObject( options ) ) { - throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); - } - if ( hasProp( options, 'type' ) && options.type !== TYPE ) { - throw new TypeError( format( 'invalid argument. `%s` option must be equal to "%s". Option: `%s`.', 'type', TYPE, options.type ) ); - } - options.type = TYPE; - Mark.call( this, options ); - - // Resolve the default configuration: - opts = defaults(); - - // Set internal properties according to the default configuration... - keys = objectKeys( opts ); - for ( i = 0; i < keys.length; i++ ) { - k = keys[ i ]; - this[ '_'+k ] = opts[ k ]; - } - // 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 ) ); - } - } - this._type = TYPE; - return this; -} - -/* -* Inherit from a parent prototype. -*/ -inherit( ArcMark, Mark ); - -/** -* Constructor name. -* -* @private -* @name name -* @memberof ArcMark -* @readonly -* @type {string} -*/ -setNonEnumerableReadOnly( ArcMark, 'name', 'ArcMark' ); - -/** -* Radius in pixels of rounded arc corners. -* -* @name cornerRadius -* @memberof ArcMark.prototype -* @type {NonNegativeNumber} -* @default 0 -* -* @example -* var mark = new ArcMark({ -* 'cornerRadius': 5 -* }); -* -* var v = mark.cornerRadius; -* // returns 5 -*/ -setReadWriteAccessor( ArcMark.prototype, 'cornerRadius', getCornerRadius, setCornerRadius ); - -/** -* End angle in radians. -* -* @name endAngle -* @memberof ArcMark.prototype -* @type {(number|void)} -* -* @example -* var mark = new ArcMark({ -* 'endAngle': 3.14 -* }); -* -* var v = mark.endAngle; -* // returns 3.14 -*/ -setReadWriteAccessor( ArcMark.prototype, 'endAngle', getEndAngle, setEndAngle ); - -/** -* Inner radius in pixels. -* -* @name innerRadius -* @memberof ArcMark.prototype -* @type {(NonNegativeNumber|void)} -* -* @example -* var mark = new ArcMark({ -* 'innerRadius': 50 -* }); -* -* var v = mark.innerRadius; -* // returns 50 -*/ -setReadWriteAccessor( ArcMark.prototype, 'innerRadius', getInnerRadius, setInnerRadius ); - -/** -* Outer radius in pixels. -* -* @name outerRadius -* @memberof ArcMark.prototype -* @type {(NonNegativeNumber|void)} -* -* @example -* var mark = new ArcMark({ -* 'outerRadius': 100 -* }); -* -* var v = mark.outerRadius; -* // returns 100 -*/ -setReadWriteAccessor( ArcMark.prototype, 'outerRadius', getOuterRadius, setOuterRadius ); - -/** -* Angular padding in radians. -* -* @name padAngle -* @memberof ArcMark.prototype -* @type {(NonNegativeNumber|void)} -* -* @example -* var mark = new ArcMark({ -* 'padAngle': 0.05 -* }); -* -* var v = mark.padAngle; -* // returns 0.05 -*/ -setReadWriteAccessor( ArcMark.prototype, 'padAngle', getPadAngle, setPadAngle ); - -/** -* Start angle in radians. -* -* @name startAngle -* @memberof ArcMark.prototype -* @type {(number|void)} -* -* @example -* var mark = new ArcMark({ -* 'startAngle': 1.57 -* }); -* -* var v = mark.startAngle; -* // returns 1.57 -*/ -setReadWriteAccessor( ArcMark.prototype, 'startAngle', getStartAngle, setStartAngle ); - -/** -* Mark properties. -* -* @name properties -* @memberof ArcMark.prototype -* @type {Array} -* -* @example -* var mark = new ArcMark({}); -* -* var v = mark.properties; -* // returns [...] -*/ -setNonEnumerableReadOnlyAccessor( ArcMark.prototype, 'properties', getProperties ); - -/** -* Mark type. -* -* @name type -* @memberof ArcMark.prototype -* @type {string} -* @default 'arc' -* -* @example -* var mark = new ArcMark({ -* 'cornerRadius': 5 -* }); -* -* var v = mark.type; -* // returns 'arc' -*/ -setReadWriteAccessor( ArcMark.prototype, 'type', getType, setType ); - -/** -* Serializes an instance to a JSON object. -* -* ## Notes -* -* - This method is implicitly invoked by `JSON.stringify`. -* -* @name toJSON -* @memberof ArcMark.prototype -* @type {Function} -* @returns {Object} JSON object -* -* @example -* var mark = new ArcMark({ -* 'cornerRadius': 5 -* }); -* -* var v = mark.toJSON(); -* // returns {...} -*/ -setNonEnumerableReadOnly( ArcMark.prototype, 'toJSON', function toJSON() { - return instance2json( this, properties ); -}); - - -// EXPORTS // - -module.exports = ArcMark; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js deleted file mode 100644 index 4e54505c9d36..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the outer radius in pixels. -* -* @private -* @returns {(NonNegativeNumber|void)} outer radius in pixels -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js deleted file mode 100644 index f2fcfd50fb5e..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/outer-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/set.js deleted file mode 100644 index fa02d3d43d52..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/outer-radius/set.js +++ /dev/null @@ -1,66 +0,0 @@ -/** -* @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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; -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:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the outer radius in pixels. -* -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* -* @private -* @param {(NonNegativeNumber|void)} value - input value -* @throws {TypeError} must be a nonnegative number -* @returns {void} -*/ -function set( value ) { - if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/pad-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js deleted file mode 100644 index 6b38f4c92fec..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the angular padding in radians. -* -* @private -* @returns {(NonNegativeNumber|void)} angular padding in radians -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js deleted file mode 100644 index d35e9b1f9ef4..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/pad-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/set.js deleted file mode 100644 index b810ca5e643d..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/pad-angle/set.js +++ /dev/null @@ -1,66 +0,0 @@ -/** -* @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 isNonNegativeNumber = require( '@stdlib/assert/is-nonnegative-number' ).isPrimitive; -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:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the angular padding in radians. -* -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* -* @private -* @param {(NonNegativeNumber|void)} value - input value -* @throws {TypeError} must be a nonnegative number -* @returns {void} -*/ -function set( value ) { - if ( !isNonNegativeNumber( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a nonnegative number. 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/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json deleted file mode 100644 index bc2211dcdebc..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties.json +++ /dev/null @@ -1,24 +0,0 @@ -[ - "aria", - "clip", - "description", - "encode", - "from", - "interactive", - "key", - "name", - "role", - "sort", - "style", - "transform", - "triggers", - "type", - "zindex", - - "cornerRadius", - "endAngle", - "innerRadius", - "outerRadius", - "padAngle", - "startAngle" -] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js deleted file mode 100644 index f3cbb28454ea..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/properties/get.js +++ /dev/null @@ -1,41 +0,0 @@ -/** -* @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/lib/start-angle/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js deleted file mode 100644 index 4959bfe41679..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/get.js +++ /dev/null @@ -1,43 +0,0 @@ -/** -* @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 the start angle in radians. -* -* @private -* @returns {(number|void)} start angle in radians -*/ -function get() { - return this[ prop.private ]; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js deleted file mode 100644 index 7509ef0cbba7..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/properties.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @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/lib/start-angle/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/set.js deleted file mode 100644 index 9d64f4673ced..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/start-angle/set.js +++ /dev/null @@ -1,66 +0,0 @@ -/** -* @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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; -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:arc-mark:set:'+prop.name ); - - -// MAIN // - -/** -* Sets the start angle in radians. -* -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* -* @private -* @param {(number|void)} value - input value -* @throws {TypeError} must be a number -* @returns {void} -*/ -function set( value ) { - if ( !isNumber( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a number. 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/lib/type/get.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/get.js deleted file mode 100644 index 84cc34fbacd5..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/get.js +++ /dev/null @@ -1,41 +0,0 @@ -/** -* @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 TYPE = require( './type.js' ); - - -// MAIN // - -/** -* Returns the mark type. -* -* @private -* @returns {string} mark type -*/ -function get() { - return TYPE; -} - - -// EXPORTS // - -module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js deleted file mode 100644 index 9e06599a5a16..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/set.js +++ /dev/null @@ -1,46 +0,0 @@ -/** -* @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 format = require( '@stdlib/string/format' ); -var TYPE = require( './type.js' ); - - -// MAIN // - -/** -* Sets the mark type. -* -* @private -* @param {string} value - input value -* @throws {TypeError} must be a valid mark type -* @returns {void} -*/ -function set( value ) { - if ( value !== TYPE ) { - throw new TypeError( format( 'invalid assignment. `%s` must be equal to "%s". Value: `%s`.', 'type', TYPE, value ) ); - } -} - - -// EXPORTS // - -module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js b/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js deleted file mode 100644 index a2bbaf895be7..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/lib/type/type.js +++ /dev/null @@ -1,23 +0,0 @@ -/** -* @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'; - -// EXPORTS // - -module.exports = 'arc'; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json b/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json deleted file mode 100644 index b12cd4bb582e..000000000000 --- a/lib/node_modules/@stdlib/plot/vega/mark/arc/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@stdlib/plot/vega/mark/arc", - "version": "0.0.0", - "description": "Arc mark 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", - "mark", - "arc" - ], - "__stdlib__": {} -}