diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/README.md b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/README.md new file mode 100644 index 000000000000..67b13ed963b9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/README.md @@ -0,0 +1,117 @@ + + +# areaMarkOrientations + +> List of supported Vega area mark orientations. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var areaMarkOrientations = require( '@stdlib/plot/vega/mark/area/orientations' ); +``` + +#### areaMarkOrientations() + +Returns a list of area mark orientations. + +```javascript +var out = areaMarkOrientations(); +// returns [ 'horizontal', 'vertical' ] +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var areaMarkOrientations = require( '@stdlib/plot/vega/mark/area/orientations' ); + +var isAreaMarkOrientation = contains( areaMarkOrientations() ); + +var bool = isAreaMarkOrientation( 'horizontal' ); +// returns true + +bool = isAreaMarkOrientation( 'vertical' ); +// returns true + +bool = isAreaMarkOrientation( 'beep' ); +// returns false + +bool = isAreaMarkOrientation( 'boop' ); +// returns false +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/benchmark/benchmark.js b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/benchmark/benchmark.js new file mode 100644 index 000000000000..6b87f7c3ef37 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/benchmark/benchmark.js @@ -0,0 +1,48 @@ +/** +* @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 bench = require( '@stdlib/bench' ); +var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var pkg = require( './../package.json' ).name; +var areaMarkOrientations = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var out; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + out = areaMarkOrientations(); + if ( out.length < 2 ) { + b.fail( 'should return an array' ); + } + } + b.toc(); + if ( !isStringArray( out ) ) { + b.fail( 'should return an array of strings' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/repl.txt b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/repl.txt new file mode 100644 index 000000000000..e2c37c2f68c5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/repl.txt @@ -0,0 +1,17 @@ + +{{alias}}() + Returns a list of area mark orientations. + + Returns + ------- + out: Array + List of area mark orientations. + + Examples + -------- + > var out = {{alias}}() + [ 'horizontal', 'vertical' ] + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/index.d.ts b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/index.d.ts new file mode 100644 index 000000000000..043b51e633f2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/index.d.ts @@ -0,0 +1,35 @@ +/* +* @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. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns a list of area mark orientations. +* +* @returns list of area mark orientations +* +* @example +* var list = areaMarkOrientations(); +* // returns [ 'horizontal', 'vertical' ] +*/ +declare function areaMarkOrientations(): Array; + + +// EXPORTS // + +export = areaMarkOrientations; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/test.ts b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/test.ts new file mode 100644 index 000000000000..08964c127c47 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/docs/types/test.ts @@ -0,0 +1,32 @@ +/* +* @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. +*/ + +import areaMarkOrientations = require( './index' ); + + +// TESTS // + +// The function returns an array of strings... +{ + areaMarkOrientations(); // $ExpectType string[] +} + +// The compiler throws an error if the function is provided any arguments... +{ + areaMarkOrientations( 9 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/examples/index.js b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/examples/index.js new file mode 100644 index 000000000000..0b0cece22821 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/examples/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'; + +var contains = require( '@stdlib/array/base/assert/contains' ).factory; +var areaMarkOrientations = require( './../lib' ); + +var isAreaMarkOrientation = contains( areaMarkOrientations() ); + +var bool = isAreaMarkOrientation( 'horizontal' ); +console.log( bool ); +// => true + +bool = isAreaMarkOrientation( 'vertical' ); +console.log( bool ); +// => true + +bool = isAreaMarkOrientation( 'beep' ); +console.log( bool ); +// => false + +bool = isAreaMarkOrientation( 'boop' ); +console.log( bool ); +// => false diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/data.json b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/data.json new file mode 100644 index 000000000000..38176275f512 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/data.json @@ -0,0 +1,4 @@ +[ + "horizontal", + "vertical" +] diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/index.js b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/index.js new file mode 100644 index 000000000000..361bfc0f950b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/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'; + +/** +* Return a list of area mark orientations. +* +* @module @stdlib/plot/vega/mark/area/orientations +* +* @example +* var areaMarkOrientations = require( '@stdlib/plot/vega/mark/area/orientations' ); +* +* var out = areaMarkOrientations(); +* // returns [ 'horizontal', 'vertical' ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/main.js b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/main.js new file mode 100644 index 000000000000..4f57e6891fdf --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/lib/main.js @@ -0,0 +1,44 @@ +/** +* @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 DATA = require( './data.json' ); + + +// MAIN // + +/** +* Returns a list of area mark orientations. +* +* @returns {StringArray} list of area mark orientations +* +* @example +* var out = orientations(); +* // returns [ 'horizontal', 'vertical' ] +*/ +function orientations() { + return DATA.slice(); +} + + +// EXPORTS // + +module.exports = orientations; diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/package.json b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/package.json new file mode 100644 index 000000000000..41f5b5d6e307 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/package.json @@ -0,0 +1,65 @@ +{ + "name": "@stdlib/plot/vega/mark/area/orientations", + "version": "0.0.0", + "description": "List of supported Vega area mark orientations.", + "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", + "area", + "orient", + "orientations", + "utilities", + "utility", + "utils", + "util" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/test/test.js b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/test/test.js new file mode 100644 index 000000000000..548556cc5775 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/mark/area/orientations/test/test.js @@ -0,0 +1,47 @@ +/** +* @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 tape = require( 'tape' ); +var areaMarkOrientations = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof areaMarkOrientations, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function returns a list of area mark orientations', function test( t ) { + var expected; + var actual; + + expected = [ + 'horizontal', + 'vertical' + ]; + actual = areaMarkOrientations(); + + t.deepEqual( actual, expected, 'returns expected value' ); + t.end(); +});