Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions lib/node_modules/@stdlib/plot/vega/mark/base/ctor/lib/clip/get.js
Original file line number Diff line number Diff line change
@@ -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 setting indicating whether to clip marks to a specified shape.
*
* @private
* @returns {(boolean|Clip)} clip configuration
*/
function get() {
return this[ prop.private ];
}


// EXPORTS //

module.exports = get;
Original file line number Diff line number Diff line change
@@ -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;
67 changes: 67 additions & 0 deletions lib/node_modules/@stdlib/plot/vega/mark/base/ctor/lib/clip/set.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* @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 isClip = require( '@stdlib/plot/vega/base/assert/is-clip' );

Check failure on line 26 in lib/node_modules/@stdlib/plot/vega/mark/base/ctor/lib/clip/set.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

cannot resolve module: "@stdlib/plot/vega/base/assert/is-clip"
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var Clip = require( '@stdlib/plot/vega/mark/clip' );

Check failure on line 28 in lib/node_modules/@stdlib/plot/vega/mark/base/ctor/lib/clip/set.js

View workflow job for this annotation

GitHub Actions / Lint Changed Files

cannot resolve module: "@stdlib/plot/vega/mark/clip"
var format = require( '@stdlib/string/format' );
var changeEvent = require( './../change_event.js' );
var prop = require( './properties.js' );


// VARIABLES //

var debug = logger( 'vega:mark:set:'+prop.name );


// MAIN //

/**
* Sets the setting indicating whether to clip marks to a specified shape.
*
* @private
* @param {(boolean|Clip)} value - input value
* @throws {TypeError} must be either a boolean or a Clip instance
* @returns {void}
*/
function set( value ) {
if ( isBoolean( value ) && value ) {
value = new Clip();
} else if ( !isClip( value ) && !isBoolean( value ) ) {
throw new TypeError( format( 'invalid assignment. `%s` must be either a boolean, an clip instance, or a signal. Value: `%s`.', prop.name, value ) );
}
if ( value !== this[ prop.private ] ) {
this._removeChangeListener( 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 ) );
this._addChangeListener( this[ prop.private ] );
}
}


// EXPORTS //

module.exports = set;
Original file line number Diff line number Diff line change
@@ -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 text description of a mark for ARIA accessibility.
*
* @private
* @returns {(string|void)} mark description
*/
function get() {
return this[ prop.private ];
}


// EXPORTS //

module.exports = get;
Original file line number Diff line number Diff line change
@@ -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( 'description' );


// EXPORTS //

module.exports = obj;
Original file line number Diff line number Diff line change
@@ -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 isUndefined = require( '@stdlib/assert/is-undefined' );
var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var format = require( '@stdlib/string/format' );
var changeEvent = require( './../change_event.js' );
var prop = require( './properties.js' );


// VARIABLES //

var debug = logger( 'vega:mark:set:'+prop.name );


// MAIN //

/**
* Sets the text description of a mark for ARIA accessibility.
*
* ## Notes
*
* - Providing `undefined` "unsets" the configured value.
*
* @private
* @param {(string|void)} value - input value
* @throws {TypeError} must be a string
* @returns {void}
*/
function set( value ) {
if ( !isString( value ) && !isUndefined( value ) ) {
throw new TypeError( format( 'invalid assignment. `%s` must be a string. 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;
Original file line number Diff line number Diff line change
@@ -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 boolean indicating whether a mark can serve as an input event source.
*
* @private
* @returns {(boolean|Signal)} boolean flag or signal
*/
function get() {
return this[ prop.private ];
}


// EXPORTS //

module.exports = get;
Original file line number Diff line number Diff line change
@@ -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( 'interactive' );


// EXPORTS //

module.exports = obj;
Loading
Loading