diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/examples/index.js new file mode 100644 index 000000000000..a5d87be4ae5d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/examples/index.js @@ -0,0 +1,34 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var Value = require( '@stdlib/plot/vega/value/ctor' ); +var GroupEncodingSet = require( './../lib' ); + +var encoding = new GroupEncodingSet({ + 'x': new Value({ + 'field': 'x', + 'scale': 'xScale' + }), + 'y': new Value({ + 'field': 'y', + 'scale': 'yScale' + }) +}); +console.log( encoding.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/change_event.js new file mode 100644 index 000000000000..359afbfa206b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/change_event.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns a new change event object. +* +* @private +* @param {string} property - property name +* @returns {Object} event object +*/ +function event( property ) { // eslint-disable-line stdlib/no-redeclare + return { + 'type': 'update', + 'source': 'mark', + 'property': property + }; +} + + +// EXPORTS // + +module.exports = event; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/get.js new file mode 100644 index 000000000000..49ff2f89e834 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a flag indicating whether visible group content should be clipped. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/properties.js new file mode 100644 index 000000000000..c11defca131d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/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( 'clip' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/set.js new file mode 100644 index 000000000000..4c4e211eda58 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/clip/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a flag indicating whether visible group content should be clipped. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/get.js new file mode 100644 index 000000000000..c05d3548c7f0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the corner radius (in pixels) for the bottom left corner. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/properties.js new file mode 100644 index 000000000000..689bbd9def1c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/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( 'cornerRadiusBottomLeft' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/set.js new file mode 100644 index 000000000000..d6ab5374879b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-left/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius (in pixels) for the bottom left corner. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/get.js new file mode 100644 index 000000000000..ef87e41f2296 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the corner radius (in pixels) for the bottom right corner. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/properties.js new file mode 100644 index 000000000000..8a04d8019397 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/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( 'cornerRadiusBottomRight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/set.js new file mode 100644 index 000000000000..70bfddef6aaa --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-bottom-right/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius (in pixels) for the bottom right corner. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/get.js new file mode 100644 index 000000000000..56151f130b47 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the corner radius (in pixels) for the top left corner. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/properties.js new file mode 100644 index 000000000000..9c57fc55cf61 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/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( 'cornerRadiusTopLeft' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/set.js new file mode 100644 index 000000000000..f838732d045c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-left/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius (in pixels) for the top left corner. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/get.js new file mode 100644 index 000000000000..a44c9545e3f7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the corner radius (in pixels) for the top right corner. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/properties.js new file mode 100644 index 000000000000..48e338d55626 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/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( 'cornerRadiusTopRight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/set.js new file mode 100644 index 000000000000..0fae4e4e798e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius-top-right/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius (in pixels) for the top right corner. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/get.js new file mode 100644 index 000000000000..85bbff12f1e7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying the corner radius (in pixels) for all four corners. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/properties.js new file mode 100644 index 000000000000..00b6324d2957 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/properties.js @@ -0,0 +1,33 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var property2object = require( '@stdlib/plot/vega/base/property2object' ); + + +// MAIN // + +var obj = property2object( 'cornerRadius' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/set.js new file mode 100644 index 000000000000..2007ed3056d8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/corner-radius/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius (in pixels) for all four corners. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/index.js new file mode 100644 index 000000000000..d9d2d5536683 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/index.js @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Group mark encoding set constructor. +* +* @module @stdlib/plot/vega/mark/group/encoding-set +* +* @example +* var GroupEncodingSet = require( '@stdlib/plot/vega/mark/group/encoding-set' ); +* +* var encoding = new GroupEncodingSet(); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/main.js new file mode 100644 index 000000000000..85b96a2e36a5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/main.js @@ -0,0 +1,359 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable stdlib/no-empty-lines-between-requires */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isObject = require( '@stdlib/assert/is-object' ); +var setNonEnumerableReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' ); // eslint-disable-line id-length +var setReadWriteAccessor = require( '@stdlib/utils/define-read-write-accessor' ); +var hasProp = require( '@stdlib/assert/has-property' ); +var inherit = require( '@stdlib/utils/inherit' ); +var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); +var EncodingSet = require( '@stdlib/plot/vega/mark/base/encoding-set' ); +var format = require( '@stdlib/string/format' ); +var properties = require( './properties.json' ); + +// Note: keep the following in alphabetical order according to the `require` path... +var getClip = require( './clip/get.js' ); +var setClip = require( './clip/set.js' ); + +var getCornerRadius = require( './corner-radius/get.js' ); +var setCornerRadius = require( './corner-radius/set.js' ); + +var getCornerRadiusBottomLeft = require( './corner-radius-bottom-left/get.js' ); +var setCornerRadiusBottomLeft = require( './corner-radius-bottom-left/set.js' ); + +var getCornerRadiusBottomRight = require( './corner-radius-bottom-right/get.js' ); // eslint-disable-line id-length +var setCornerRadiusBottomRight = require( './corner-radius-bottom-right/set.js' ); // eslint-disable-line id-length + +var getCornerRadiusTopLeft = require( './corner-radius-top-left/get.js' ); +var setCornerRadiusTopLeft = require( './corner-radius-top-left/set.js' ); + +var getCornerRadiusTopRight = require( './corner-radius-top-right/get.js' ); +var setCornerRadiusTopRight = require( './corner-radius-top-right/set.js' ); + +var getProperties = require( './properties/get.js' ); + +var getStrokeForeground = require( './stroke-foreground/get.js' ); +var setStrokeForeground = require( './stroke-foreground/set.js' ); + +var getStrokeOffset = require( './stroke-offset/get.js' ); +var setStrokeOffset = require( './stroke-offset/set.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:main' ); + + +// MAIN // + +/** +* Group mark encoding set constructor. +* +* @constructor +* @param {Options} options - constructor options +* @param {Value} [options.aria] - flag indicating whether to include ARIA attributes in SVG output +* @param {Value} [options.blend] - color blend mode +* @param {Value} [options.clip] - flag indicating whether visible group content should be clipped +* @param {Value} [options.cornerRadius] - corner radius (in pixels) for all four corners +* @param {Value} [options.cornerRadiusBottomLeft] - corner radius (in pixels) for the bottom left corner +* @param {Value} [options.cornerRadiusBottomRight] - corner radius (in pixels) for the bottom right corner +* @param {Value} [options.cornerRadiusTopLeft] - corner radius (in pixels) for the top left corner +* @param {Value} [options.cornerRadiusTopRight] - corner radius (in pixels) for the top right corner +* @param {Value} [options.cursor] - mouse cursor used over a mark +* @param {Value} [options.description] - text description of a mark item for ARIA accessibility +* @param {Value} [options.fill] - fill color +* @param {Value} [options.fillOpacity] - fill opacity +* @param {Value} [options.height] - mark height +* @param {Value} [options.href] - URL to load upon mouse click +* @param {Value} [options.opacity] - mark opacity +* @param {Value} [options.stroke] - stroke color +* @param {Value} [options.strokeCap] - stroke cap for line ending style +* @param {Value} [options.strokeDash] - stroke dash +* @param {Value} [options.strokeDashOffset] - pixel offset at which to start the dash array +* @param {Value} [options.strokeForeground] - flag indicating whether the group stroke should be drawn on top of group content +* @param {Value} [options.strokeJoin] - stroke line join method +* @param {Value} [options.strokeMiterLimit] - miter limit at which to bevel a line join +* @param {Value} [options.strokeOffset] - offset (in pixels) at which to draw the group stroke and fill +* @param {Value} [options.strokeOpacity] - stroke opacity +* @param {Value} [options.strokeWidth] - stroke width +* @param {Value} [options.tooltip] - tooltip text to show upon mouse hover +* @param {Value} [options.width] - mark width +* @param {Value} [options.x] - primary x-coordinate +* @param {Value} [options.x2] - secondary x-coordinate +* @param {Value} [options.xc] - center x-coordinate +* @param {Value} [options.y] - primary y-coordinate +* @param {Value} [options.y2] - secondary y-coordinate +* @param {Value} [options.yc] - center y-coordinate +* @param {Value} [options.zindex] - layering order of sibling mark items +* @throws {TypeError} options argument must be an object +* @throws {Error} must provide valid options +* @returns {GroupEncodingSet} encoding set instance +* +* @example +* var encoding = new GroupEncodingSet(); +* // returns +*/ +function GroupEncodingSet( options ) { + var nargs; + var v; + var k; + var i; + + nargs = arguments.length; + if ( !( this instanceof GroupEncodingSet ) ) { + if ( nargs === 0 ) { + return new GroupEncodingSet(); + } + return new GroupEncodingSet( options ); + } + EncodingSet.call( this ); + if ( nargs ) { + if ( !isObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); + } + // Validate provided options by attempting to assign option values to corresponding fields... + for ( i = 0; i < properties.length; i++ ) { + k = properties[ i ]; + if ( !hasProp( options, k ) ) { + continue; + } + v = options[ k ]; + try { + this[ k ] = v; + } catch ( err ) { + debug( 'Encountered an error. Error: %s', err.message ); + + // FIXME: retain thrown error type + throw new Error( transformErrorMessage( err.message ) ); + } + } + } + return this; +} + +/* +* Inherit from the `EncodingSet` prototype. +*/ +inherit( GroupEncodingSet, EncodingSet ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof GroupEncodingSet +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( GroupEncodingSet, 'name', 'GroupEncodingSet' ); + +/** +* Encoding specifying a flag indicating whether visible group content should be clipped. +* +* @name clip +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'clip': new Value({ +* 'value': true +* }) +* }); +* +* var v = encoding.clip; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'clip', getClip, setClip ); + +/** +* Encoding specifying the corner radius (in pixels) for all four corners. +* +* @name cornerRadius +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'cornerRadius': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadius; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'cornerRadius', getCornerRadius, setCornerRadius ); + +/** +* Encoding specifying the corner radius (in pixels) for the bottom left corner. +* +* @name cornerRadiusBottomLeft +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'cornerRadiusBottomLeft': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadiusBottomLeft; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'cornerRadiusBottomLeft', getCornerRadiusBottomLeft, setCornerRadiusBottomLeft ); + +/** +* Encoding specifying the corner radius (in pixels) for the bottom right corner. +* +* @name cornerRadiusBottomRight +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'cornerRadiusBottomRight': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadiusBottomRight; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'cornerRadiusBottomRight', getCornerRadiusBottomRight, setCornerRadiusBottomRight ); + +/** +* Encoding specifying the corner radius (in pixels) for the top left corner. +* +* @name cornerRadiusTopLeft +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'cornerRadiusTopLeft': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadiusTopLeft; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'cornerRadiusTopLeft', getCornerRadiusTopLeft, setCornerRadiusTopLeft ); + +/** +* Encoding specifying the corner radius (in pixels) for the top right corner. +* +* @name cornerRadiusTopRight +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'cornerRadiusTopRight': new Value({ +* 'value': 5 +* }) +* }); +* +* var v = encoding.cornerRadiusTopRight; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'cornerRadiusTopRight', getCornerRadiusTopRight, setCornerRadiusTopRight ); + +/** +* EncodingSet properties. +* +* @name properties +* @memberof GroupEncodingSet.prototype +* @type {Array} +* +* @example +* var encoding = new GroupEncodingSet(); +* +* var v = encoding.properties; +* // returns [...] +*/ +setNonEnumerableReadOnlyAccessor( GroupEncodingSet.prototype, 'properties', getProperties ); + +/** +* Encoding specifying a flag indicating whether the group stroke should be drawn on top of group content. +* +* @name strokeForeground +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'strokeForeground': new Value({ +* 'value': true +* }) +* }); +* +* var v = encoding.strokeForeground; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'strokeForeground', getStrokeForeground, setStrokeForeground ); + +/** +* Encoding specifying an offset (in pixels) at which to draw the group stroke and fill. +* +* @name strokeOffset +* @memberof GroupEncodingSet.prototype +* @type {(Value|void)} +* +* @example +* var Value = require( '@stdlib/plot/vega/value/ctor' ); +* +* var encoding = new GroupEncodingSet({ +* 'strokeOffset': new Value({ +* 'value': 1 +* }) +* }); +* +* var v = encoding.strokeOffset; +* // returns +*/ +setReadWriteAccessor( GroupEncodingSet.prototype, 'strokeOffset', getStrokeOffset, setStrokeOffset ); + + +// EXPORTS // + +module.exports = GroupEncodingSet; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties.json new file mode 100644 index 000000000000..c1631e9d1496 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties.json @@ -0,0 +1,37 @@ +[ + "aria", + "blend", + "cursor", + "description", + "fill", + "fillOpacity", + "height", + "href", + "opacity", + "stroke", + "strokeCap", + "strokeDash", + "strokeDashOffset", + "strokeJoin", + "strokeMiterLimit", + "strokeOpacity", + "strokeWidth", + "tooltip", + "width", + "x", + "x2", + "xc", + "y", + "y2", + "yc", + "zindex", + + "clip", + "cornerRadius", + "cornerRadiusBottomLeft", + "cornerRadiusBottomRight", + "cornerRadiusTopLeft", + "cornerRadiusTopRight", + "strokeForeground", + "strokeOffset" +] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties/get.js new file mode 100644 index 000000000000..f3cbb28454ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/properties/get.js @@ -0,0 +1,41 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var properties = require( './../properties.json' ); + + +// MAIN // + +/** +* Returns the list of enumerable properties. +* +* @private +* @returns {Array} properties +*/ +function get() { + return properties.slice(); +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/get.js new file mode 100644 index 000000000000..27a60427cd27 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying a flag indicating whether the group stroke should be drawn on top of group content. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/properties.js new file mode 100644 index 000000000000..1ed36938033e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/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( 'strokeForeground' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/set.js new file mode 100644 index 000000000000..115218fe06f2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-foreground/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a flag indicating whether the group stroke should be drawn on top of group content. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/get.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/get.js new file mode 100644 index 000000000000..abe8dc4ccf8b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/get.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns a value reference specifying an offset (in pixels) at which to draw the group stroke and fill. +* +* @private +* @returns {(Value|void)} value reference +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/properties.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/properties.js new file mode 100644 index 000000000000..ad13653a4a1b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/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( 'strokeOffset' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/set.js b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/set.js new file mode 100644 index 000000000000..1ece039bb8c3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/lib/stroke-offset/set.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var logger = require( 'debug' ); +var isValueReference = require( '@stdlib/plot/vega/base/assert/is-value-reference' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:mark:group:encoding-set:set:'+prop.name ); + + +// MAIN // + +/** +* Sets an offset (in pixels) at which to draw the group stroke and fill. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Value|void)} value - input value +* @throws {TypeError} must be a value reference +* @returns {void} +*/ +function set( value ) { + if ( !isValueReference( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a value reference. Value: `%s`.', prop.name, value ) ); + } + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/package.json b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/package.json new file mode 100644 index 000000000000..9bb29e3c2cba --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/group/encoding-set/package.json @@ -0,0 +1,62 @@ +{ + "name": "@stdlib/plot/vega/mark/group/encoding-set", + "version": "0.0.0", + "description": "Group mark encoding set constructor.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "plot", + "vega", + "group", + "mark", + "encoding", + "constructor", + "ctor" + ], + "__stdlib__": {} +}