From 4ec22015b809d511ed936d81ac0c2ae369417a49 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Thu, 28 May 2026 03:34:22 +0530 Subject: [PATCH 1/8] feat: add plot/vega/legend/ctor --- .../plot/vega/legend/ctor/examples/index.js | 27 + .../plot/vega/legend/ctor/lib/aria/get.js | 43 + .../vega/legend/ctor/lib/aria/properties.js | 33 + .../plot/vega/legend/ctor/lib/aria/set.js | 61 + .../plot/vega/legend/ctor/lib/change_event.js | 41 + .../vega/legend/ctor/lib/clip-height/get.js | 43 + .../legend/ctor/lib/clip-height/properties.js | 33 + .../vega/legend/ctor/lib/clip-height/set.js | 66 + .../legend/ctor/lib/column-padding/get.js | 43 + .../ctor/lib/column-padding/properties.js | 33 + .../legend/ctor/lib/column-padding/set.js | 66 + .../plot/vega/legend/ctor/lib/columns/get.js | 43 + .../legend/ctor/lib/columns/properties.js | 33 + .../plot/vega/legend/ctor/lib/columns/set.js | 61 + .../vega/legend/ctor/lib/corner-radius/get.js | 43 + .../ctor/lib/corner-radius/properties.js | 33 + .../vega/legend/ctor/lib/corner-radius/set.js | 66 + .../plot/vega/legend/ctor/lib/defaults.js | 79 + .../vega/legend/ctor/lib/description/get.js | 43 + .../legend/ctor/lib/description/properties.js | 33 + .../vega/legend/ctor/lib/description/set.js | 66 + .../vega/legend/ctor/lib/direction/get.js | 43 + .../legend/ctor/lib/direction/properties.js | 33 + .../vega/legend/ctor/lib/direction/set.js | 63 + .../plot/vega/legend/ctor/lib/encode/get.js | 43 + .../vega/legend/ctor/lib/encode/properties.js | 33 + .../plot/vega/legend/ctor/lib/encode/set.js | 66 + .../vega/legend/ctor/lib/fill-color/get.js | 43 + .../legend/ctor/lib/fill-color/properties.js | 33 + .../vega/legend/ctor/lib/fill-color/set.js | 66 + .../plot/vega/legend/ctor/lib/fill/get.js | 43 + .../vega/legend/ctor/lib/fill/properties.js | 33 + .../plot/vega/legend/ctor/lib/fill/set.js | 66 + .../vega/legend/ctor/lib/format-type/get.js | 43 + .../legend/ctor/lib/format-type/properties.js | 33 + .../vega/legend/ctor/lib/format-type/set.js | 68 + .../plot/vega/legend/ctor/lib/format/get.js | 43 + .../vega/legend/ctor/lib/format/properties.js | 33 + .../plot/vega/legend/ctor/lib/format/set.js | 67 + .../legend/ctor/lib/gradient-length/get.js | 43 + .../ctor/lib/gradient-length/properties.js | 33 + .../legend/ctor/lib/gradient-length/set.js | 66 + .../legend/ctor/lib/gradient-opacity/get.js | 43 + .../ctor/lib/gradient-opacity/properties.js | 33 + .../legend/ctor/lib/gradient-opacity/set.js | 66 + .../ctor/lib/gradient-stroke-color/get.js | 43 + .../lib/gradient-stroke-color/properties.js | 33 + .../ctor/lib/gradient-stroke-color/set.js | 66 + .../ctor/lib/gradient-stroke-width/get.js | 43 + .../lib/gradient-stroke-width/properties.js | 33 + .../ctor/lib/gradient-stroke-width/set.js | 66 + .../legend/ctor/lib/gradient-thickness/get.js | 43 + .../ctor/lib/gradient-thickness/properties.js | 33 + .../legend/ctor/lib/gradient-thickness/set.js | 66 + .../vega/legend/ctor/lib/grid-align/get.js | 43 + .../legend/ctor/lib/grid-align/properties.js | 33 + .../vega/legend/ctor/lib/grid-align/set.js | 63 + .../plot/vega/legend/ctor/lib/index.js | 42 + .../vega/legend/ctor/lib/label-align/get.js | 43 + .../legend/ctor/lib/label-align/properties.js | 33 + .../vega/legend/ctor/lib/label-align/set.js | 68 + .../legend/ctor/lib/label-baseline/get.js | 43 + .../ctor/lib/label-baseline/properties.js | 33 + .../legend/ctor/lib/label-baseline/set.js | 63 + .../vega/legend/ctor/lib/label-color/get.js | 43 + .../legend/ctor/lib/label-color/properties.js | 33 + .../vega/legend/ctor/lib/label-color/set.js | 66 + .../legend/ctor/lib/label-font-size/get.js | 43 + .../ctor/lib/label-font-size/properties.js | 33 + .../legend/ctor/lib/label-font-size/set.js | 66 + .../legend/ctor/lib/label-font-style/get.js | 43 + .../ctor/lib/label-font-style/properties.js | 33 + .../legend/ctor/lib/label-font-style/set.js | 68 + .../legend/ctor/lib/label-font-weight/get.js | 43 + .../ctor/lib/label-font-weight/properties.js | 33 + .../legend/ctor/lib/label-font-weight/set.js | 72 + .../vega/legend/ctor/lib/label-font/get.js | 43 + .../legend/ctor/lib/label-font/properties.js | 33 + .../vega/legend/ctor/lib/label-font/set.js | 66 + .../vega/legend/ctor/lib/label-limit/get.js | 43 + .../legend/ctor/lib/label-limit/properties.js | 33 + .../vega/legend/ctor/lib/label-limit/set.js | 66 + .../vega/legend/ctor/lib/label-offset/get.js | 43 + .../ctor/lib/label-offset/properties.js | 33 + .../vega/legend/ctor/lib/label-offset/set.js | 66 + .../vega/legend/ctor/lib/label-opacity/get.js | 43 + .../ctor/lib/label-opacity/properties.js | 33 + .../vega/legend/ctor/lib/label-opacity/set.js | 66 + .../vega/legend/ctor/lib/label-overlap/get.js | 43 + .../ctor/lib/label-overlap/properties.js | 33 + .../vega/legend/ctor/lib/label-overlap/set.js | 62 + .../legend/ctor/lib/label-separation/get.js | 43 + .../ctor/lib/label-separation/properties.js | 33 + .../legend/ctor/lib/label-separation/set.js | 61 + .../plot/vega/legend/ctor/lib/legend-x/get.js | 43 + .../legend/ctor/lib/legend-x/properties.js | 33 + .../plot/vega/legend/ctor/lib/legend-x/set.js | 66 + .../plot/vega/legend/ctor/lib/legend-y/get.js | 43 + .../legend/ctor/lib/legend-y/properties.js | 33 + .../plot/vega/legend/ctor/lib/legend-y/set.js | 66 + .../@stdlib/plot/vega/legend/ctor/lib/main.js | 1702 +++++++++++++++++ .../plot/vega/legend/ctor/lib/offset/get.js | 43 + .../vega/legend/ctor/lib/offset/properties.js | 33 + .../plot/vega/legend/ctor/lib/offset/set.js | 66 + .../plot/vega/legend/ctor/lib/opacity/get.js | 43 + .../legend/ctor/lib/opacity/properties.js | 33 + .../plot/vega/legend/ctor/lib/opacity/set.js | 66 + .../plot/vega/legend/ctor/lib/orient/get.js | 43 + .../vega/legend/ctor/lib/orient/properties.js | 33 + .../plot/vega/legend/ctor/lib/orient/set.js | 63 + .../plot/vega/legend/ctor/lib/padding/get.js | 43 + .../legend/ctor/lib/padding/properties.js | 33 + .../plot/vega/legend/ctor/lib/padding/set.js | 66 + .../plot/vega/legend/ctor/lib/properties.json | 74 + .../vega/legend/ctor/lib/properties/get.js | 41 + .../vega/legend/ctor/lib/row-padding/get.js | 43 + .../legend/ctor/lib/row-padding/properties.js | 33 + .../vega/legend/ctor/lib/row-padding/set.js | 66 + .../plot/vega/legend/ctor/lib/shape/get.js | 43 + .../vega/legend/ctor/lib/shape/properties.js | 33 + .../plot/vega/legend/ctor/lib/shape/set.js | 66 + .../plot/vega/legend/ctor/lib/size/get.js | 43 + .../vega/legend/ctor/lib/size/properties.js | 33 + .../plot/vega/legend/ctor/lib/size/set.js | 66 + .../vega/legend/ctor/lib/stroke-color/get.js | 43 + .../ctor/lib/stroke-color/properties.js | 33 + .../vega/legend/ctor/lib/stroke-color/set.js | 66 + .../vega/legend/ctor/lib/stroke-dash/get.js | 43 + .../legend/ctor/lib/stroke-dash/properties.js | 33 + .../vega/legend/ctor/lib/stroke-dash/set.js | 66 + .../vega/legend/ctor/lib/stroke-width/get.js | 43 + .../ctor/lib/stroke-width/properties.js | 33 + .../vega/legend/ctor/lib/stroke-width/set.js | 66 + .../plot/vega/legend/ctor/lib/stroke/get.js | 43 + .../vega/legend/ctor/lib/stroke/properties.js | 33 + .../plot/vega/legend/ctor/lib/stroke/set.js | 66 + .../legend/ctor/lib/symbol-dash-offset/get.js | 43 + .../ctor/lib/symbol-dash-offset/properties.js | 33 + .../legend/ctor/lib/symbol-dash-offset/set.js | 66 + .../vega/legend/ctor/lib/symbol-dash/get.js | 47 + .../legend/ctor/lib/symbol-dash/properties.js | 33 + .../vega/legend/ctor/lib/symbol-dash/set.js | 78 + .../legend/ctor/lib/symbol-fill-color/get.js | 43 + .../ctor/lib/symbol-fill-color/properties.js | 33 + .../legend/ctor/lib/symbol-fill-color/set.js | 66 + .../vega/legend/ctor/lib/symbol-limit/get.js | 43 + .../ctor/lib/symbol-limit/properties.js | 33 + .../vega/legend/ctor/lib/symbol-limit/set.js | 66 + .../vega/legend/ctor/lib/symbol-offset/get.js | 43 + .../ctor/lib/symbol-offset/properties.js | 33 + .../vega/legend/ctor/lib/symbol-offset/set.js | 66 + .../legend/ctor/lib/symbol-opacity/get.js | 43 + .../ctor/lib/symbol-opacity/properties.js | 33 + .../legend/ctor/lib/symbol-opacity/set.js | 66 + .../vega/legend/ctor/lib/symbol-size/get.js | 43 + .../legend/ctor/lib/symbol-size/properties.js | 33 + .../vega/legend/ctor/lib/symbol-size/set.js | 66 + .../ctor/lib/symbol-stroke-color/get.js | 43 + .../lib/symbol-stroke-color/properties.js | 33 + .../ctor/lib/symbol-stroke-color/set.js | 66 + .../ctor/lib/symbol-stroke-width/get.js | 43 + .../lib/symbol-stroke-width/properties.js | 33 + .../ctor/lib/symbol-stroke-width/set.js | 66 + .../vega/legend/ctor/lib/symbol-type/get.js | 43 + .../legend/ctor/lib/symbol-type/properties.js | 33 + .../vega/legend/ctor/lib/symbol-type/set.js | 68 + .../vega/legend/ctor/lib/tick-count/get.js | 43 + .../legend/ctor/lib/tick-count/properties.js | 33 + .../vega/legend/ctor/lib/tick-count/set.js | 68 + .../vega/legend/ctor/lib/tick-min-step/get.js | 43 + .../ctor/lib/tick-min-step/properties.js | 33 + .../vega/legend/ctor/lib/tick-min-step/set.js | 66 + .../vega/legend/ctor/lib/title-align/get.js | 43 + .../legend/ctor/lib/title-align/properties.js | 33 + .../vega/legend/ctor/lib/title-align/set.js | 68 + .../vega/legend/ctor/lib/title-anchor/get.js | 43 + .../ctor/lib/title-anchor/properties.js | 33 + .../vega/legend/ctor/lib/title-anchor/set.js | 69 + .../legend/ctor/lib/title-baseline/get.js | 43 + .../ctor/lib/title-baseline/properties.js | 33 + .../legend/ctor/lib/title-baseline/set.js | 63 + .../vega/legend/ctor/lib/title-color/get.js | 43 + .../legend/ctor/lib/title-color/properties.js | 33 + .../vega/legend/ctor/lib/title-color/set.js | 66 + .../legend/ctor/lib/title-font-size/get.js | 43 + .../ctor/lib/title-font-size/properties.js | 33 + .../legend/ctor/lib/title-font-size/set.js | 66 + .../legend/ctor/lib/title-font-style/get.js | 43 + .../ctor/lib/title-font-style/properties.js | 33 + .../legend/ctor/lib/title-font-style/set.js | 68 + .../legend/ctor/lib/title-font-weight/get.js | 43 + .../ctor/lib/title-font-weight/properties.js | 33 + .../legend/ctor/lib/title-font-weight/set.js | 72 + .../vega/legend/ctor/lib/title-font/get.js | 43 + .../legend/ctor/lib/title-font/properties.js | 33 + .../vega/legend/ctor/lib/title-font/set.js | 66 + .../vega/legend/ctor/lib/title-limit/get.js | 43 + .../legend/ctor/lib/title-limit/properties.js | 33 + .../vega/legend/ctor/lib/title-limit/set.js | 66 + .../legend/ctor/lib/title-line-height/get.js | 43 + .../ctor/lib/title-line-height/properties.js | 33 + .../legend/ctor/lib/title-line-height/set.js | 66 + .../vega/legend/ctor/lib/title-opacity/get.js | 43 + .../ctor/lib/title-opacity/properties.js | 33 + .../vega/legend/ctor/lib/title-opacity/set.js | 66 + .../vega/legend/ctor/lib/title-orient/get.js | 43 + .../ctor/lib/title-orient/properties.js | 33 + .../vega/legend/ctor/lib/title-orient/set.js | 63 + .../vega/legend/ctor/lib/title-padding/get.js | 43 + .../ctor/lib/title-padding/properties.js | 33 + .../vega/legend/ctor/lib/title-padding/set.js | 66 + .../plot/vega/legend/ctor/lib/title/get.js | 43 + .../vega/legend/ctor/lib/title/properties.js | 33 + .../plot/vega/legend/ctor/lib/title/set.js | 72 + .../plot/vega/legend/ctor/lib/type/get.js | 43 + .../vega/legend/ctor/lib/type/properties.js | 33 + .../plot/vega/legend/ctor/lib/type/set.js | 68 + .../plot/vega/legend/ctor/lib/values/get.js | 47 + .../vega/legend/ctor/lib/values/properties.js | 33 + .../plot/vega/legend/ctor/lib/values/set.js | 73 + .../plot/vega/legend/ctor/lib/zindex/get.js | 43 + .../vega/legend/ctor/lib/zindex/properties.js | 33 + .../plot/vega/legend/ctor/lib/zindex/set.js | 61 + .../plot/vega/legend/ctor/package.json | 60 + 224 files changed, 12313 insertions(+) create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/change_event.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/index.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties.json create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/get.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/properties.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/set.js create mode 100644 lib/node_modules/@stdlib/plot/vega/legend/ctor/package.json diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js new file mode 100644 index 000000000000..77c377ca7423 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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 Legend = require( './../lib' ); + +var legend = new Legend({ + 'orient': 'left' +}); + +console.log( legend.toJSON() ); diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/get.js new file mode 100644 index 000000000000..3fa84f9a77a8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/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 boolean indicating whether ARIA attributes should be included in SVG output. +* +* @private +* @returns {boolean} boolean flag +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/properties.js new file mode 100644 index 000000000000..10510e729460 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/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( 'aria' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/set.js new file mode 100644 index 000000000000..6825b567aeaa --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/aria/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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets a boolean flag indicating whether ARIA attributes should be included in SVG output. +* +* @private +* @param {boolean} value - input value +* @throws {TypeError} must be a boolean +* @returns {void} +*/ +function set( value ) { + if ( !isBoolean( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a boolean. 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/legend/ctor/lib/change_event.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/change_event.js new file mode 100644 index 000000000000..beb790ef2716 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/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': 'legend', + 'property': property + }; +} + + +// EXPORTS // + +module.exports = event; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/get.js new file mode 100644 index 000000000000..1ac044b71c7b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/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 clip height for the legend entries. +* +* @private +* @returns {(number|void)} clip height +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/properties.js new file mode 100644 index 000000000000..e5dd8807e45e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/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( 'clipHeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/set.js new file mode 100644 index 000000000000..94feed2ddd17 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/clip-height/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the clip height for the legend entries. +* +* ## 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/legend/ctor/lib/column-padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/get.js new file mode 100644 index 000000000000..ad004215e445 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/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 horizontal padding (in pixels) between legend columns. +* +* @private +* @returns {(number|void)} column padding +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/properties.js new file mode 100644 index 000000000000..099f70142ed0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/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( 'columnPadding' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/set.js new file mode 100644 index 000000000000..3ddd2310988b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/column-padding/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the horizontal padding (in pixels) between legend columns. +* +* ## 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/legend/ctor/lib/columns/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/get.js new file mode 100644 index 000000000000..f7814a210f5a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/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 number of columns in which to arrange legend entries. +* +* @private +* @returns {number} columns +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/properties.js new file mode 100644 index 000000000000..5b18349782bf --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/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( 'columns' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/set.js new file mode 100644 index 000000000000..977f5861104e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/columns/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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the number of columns in which to arrange legend entries. +* +* @private +* @param {number} value - input value +* @throws {TypeError} must be a number +* @returns {void} +*/ +function set( value ) { + if ( !isNumber( 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/legend/ctor/lib/corner-radius/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/get.js new file mode 100644 index 000000000000..28b5cff210c6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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 for the full legend. +* +* @private +* @returns {(number|void)} corner radius +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/properties.js new file mode 100644 index 000000000000..00b6324d2957 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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/legend/ctor/lib/corner-radius/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/corner-radius/set.js new file mode 100644 index 000000000000..5465a57fb973 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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 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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the corner radius for the full legend. +* +* ## 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/legend/ctor/lib/defaults.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js new file mode 100644 index 000000000000..4e5459072fe0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js @@ -0,0 +1,79 @@ +/** +* @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 { + // Boolean indicating whether to include ARIA attributes in SVG output: + 'aria': true, + + // Number of columns in which to arrange symbol legend entries: + 'columns': 1, + + // Direction of the legend: + 'direction': 'vertical', + + // Grid alignment for legend entries: + 'gridAlign': 'each', + + // Vertical text baseline of legend labels: + 'labelBaseline': 'alphabetic', + + // Strategy for resolving overlapping legend labels: + 'labelOverlap': true, + + // Minimum separation between label bounding boxes for non-overlapping: + 'labelSeparation': 0, + + // Legend orientation: + 'orient': 'right', + + // Legend title: + 'title': [ '' ], + + // Anchor position for placing a legend title: + 'titleAnchor': null, + + // Vertical text baseline of the legend title: + 'titleBaseline': 'alphabetic', + + // Orientation of the legend title: + 'titleOrient': 'top', + + // Integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups: + 'zindex': 0 + }; +} + + +// EXPORTS // + +module.exports = defaults; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/get.js new file mode 100644 index 000000000000..99c0c6f1f4e6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/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 legend description. +* +* @private +* @returns {(string|void)} description +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/properties.js new file mode 100644 index 000000000000..58e0d898ddeb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/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( 'description' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/set.js new file mode 100644 index 000000000000..515c27582961 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/description/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the legend description. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/get.js new file mode 100644 index 000000000000..6b354e9d7d62 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/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 direction of the legend. +* +* @private +* @returns {string} direction +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/properties.js new file mode 100644 index 000000000000..7e89a45717e3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/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( 'direction' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/set.js new file mode 100644 index 000000000000..12960978edbe --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/direction/set.js @@ -0,0 +1,63 @@ +/** +* @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 isLegendDirection = require( '@stdlib/plot/vega/base/assert/is-legend-direction' ); +var join = require( '@stdlib/array/base/join' ); +var legendDirections = require( '@stdlib/plot/vega/legend/directions' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the direction of the legend. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid direction +* @returns {void} +*/ +function set( value ) { + if ( !isLegendDirection( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( legendDirections(), '", "' ), 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/legend/ctor/lib/encode/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/get.js new file mode 100644 index 000000000000..2225c60297e2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/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 mark encodings for custom legend styling. +* +* @private +* @returns {(Object|void)} encode +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/properties.js new file mode 100644 index 000000000000..534754763d4e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/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/legend/ctor/lib/encode/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/encode/set.js new file mode 100644 index 000000000000..0aee02aa66e9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/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 isObject = require( '@stdlib/assert/is-object' ); +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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets mark encodings for custom legend styling. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Object|void)} value - input value +* @throws {TypeError} must be an object +* @returns {void} +*/ +function set( value ) { + if ( !isObject( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be an object. 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/legend/ctor/lib/fill-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/get.js new file mode 100644 index 000000000000..99f1457b46cd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/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 background fill color for the full legend. +* +* @private +* @returns {(string|void)} fill color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/properties.js new file mode 100644 index 000000000000..1f1858cdb754 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/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( 'fillColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/set.js new file mode 100644 index 000000000000..6bbc54552f41 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the background fill color for the full legend. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/get.js new file mode 100644 index 000000000000..52e07edd2be0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/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 name of the scale that maps to a fill color. +* +* @private +* @returns {(string|void)} fill +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/properties.js new file mode 100644 index 000000000000..6ce7aa5bd188 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/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( 'fill' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/set.js new file mode 100644 index 000000000000..73c69c9c4938 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/fill/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a fill color. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js new file mode 100644 index 000000000000..e86440f194fb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/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 format type. +* +* @private +* @returns {(string|void)} format type +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/properties.js new file mode 100644 index 000000000000..156db84d1e1a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/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( 'formatType' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js new file mode 100644 index 000000000000..94a393c1d4cc --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js @@ -0,0 +1,68 @@ +/** +* @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 isFormatType = require( '@stdlib/plot/vega/base/assert/is-format-type' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var formatTypes = require( '@stdlib/plot/vega/base/format-types' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the format type. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid format type +* @returns {void} +*/ +function set( value ) { + if ( !isFormatType( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( formatTypes(), '", "' ), 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/legend/ctor/lib/format/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js new file mode 100644 index 000000000000..f2eb86cf0d86 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/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 format specifier for legend labels. +* +* @private +* @returns {(string|Object|void)} format +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/properties.js new file mode 100644 index 000000000000..b21f55460ada --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/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( 'format' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js new file mode 100644 index 000000000000..3965547fb92a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js @@ -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 isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var isObject = require( '@stdlib/assert/is-object' ); +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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the format specifier for legend labels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|Object|void)} value - input value +* @throws {TypeError} must be a string or object +* @returns {void} +*/ +function set( value ) { + if ( !isString( value ) && !isObject( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a string or object. 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/legend/ctor/lib/gradient-length/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js new file mode 100644 index 000000000000..5de4315a7c09 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/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 length (in pixels) of the color ramp in a gradient legend. +* +* @private +* @returns {(number|void)} gradient length +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/properties.js new file mode 100644 index 000000000000..497a446af813 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/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( 'gradientLength' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js new file mode 100644 index 000000000000..e15269aa33aa --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the length (in pixels) of the color ramp in a gradient legend. +* +* ## 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/legend/ctor/lib/gradient-opacity/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/get.js new file mode 100644 index 000000000000..e1e8f1e85104 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/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 opacity of the color gradient. +* +* @private +* @returns {(number|void)} gradient opacity +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/properties.js new file mode 100644 index 000000000000..fc2d804917da --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/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( 'gradientOpacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/set.js new file mode 100644 index 000000000000..89e94dd91586 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-opacity/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the opacity of the color gradient. +* +* ## 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/legend/ctor/lib/gradient-stroke-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js new file mode 100644 index 000000000000..55becda8e345 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/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 stroke color of the color ramp border. +* +* @private +* @returns {(string|void)} gradient stroke color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/properties.js new file mode 100644 index 000000000000..fb15448cc9d8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/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( 'gradientStrokeColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js new file mode 100644 index 000000000000..9313df02c4eb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the stroke color of the color ramp border. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js new file mode 100644 index 000000000000..382c19b21e1a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/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 stroke width of the color ramp border. +* +* @private +* @returns {(number|void)} gradient stroke width +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/properties.js new file mode 100644 index 000000000000..fe712ded309e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/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( 'gradientStrokeWidth' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js new file mode 100644 index 000000000000..70f5dbced00d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the stroke width of the color ramp border. +* +* ## 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/legend/ctor/lib/gradient-thickness/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js new file mode 100644 index 000000000000..c8678a0536d8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/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 thickness (in pixels) of the color ramp in a gradient legend. +* +* @private +* @returns {(number|void)} gradient thickness +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/properties.js new file mode 100644 index 000000000000..119707189140 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/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( 'gradientThickness' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js new file mode 100644 index 000000000000..479b3a990e43 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the thickness (in pixels) of the color ramp in a gradient legend. +* +* ## 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/legend/ctor/lib/grid-align/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/get.js new file mode 100644 index 000000000000..33cd02f31a53 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/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 grid alignment for legend entries. +* +* @private +* @returns {string} grid align +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/properties.js new file mode 100644 index 000000000000..7f7f4602b656 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/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( 'gridAlign' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/set.js new file mode 100644 index 000000000000..8addb6a19a8a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/grid-align/set.js @@ -0,0 +1,63 @@ +/** +* @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 isGridAlignment = require( '@stdlib/plot/vega/base/assert/is-grid-alignment' ); +var join = require( '@stdlib/array/base/join' ); +var gridAlignments = require( '@stdlib/plot/vega/base/grid-alignments' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger('vega:legend:set:' + prop.name); + + +// MAIN // + +/** +* Sets the grid alignment for legend entries. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid grid alignment +* @returns {void} +*/ +function set(value) { + if (!isGridAlignment(value)) { + throw new TypeError(format('invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join(gridAlignments(), '", "'), 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/legend/ctor/lib/index.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/index.js new file mode 100644 index 000000000000..fe938b6d4247 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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'; + +/** +* Legend constructor. +* +* @module @stdlib/plot/vega/legend/ctor +* +* @example +* var Legend = require( '@stdlib/plot/vega/legend/ctor' ); +* +* var legend = new Legend({ +* 'fill': 'colorScale' +* }); +* // returns +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/get.js new file mode 100644 index 000000000000..eeff6e42ec1c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/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 horizontal text alignment of legend labels. +* +* @private +* @returns {(string|void)} label align +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/properties.js new file mode 100644 index 000000000000..68d9b50f8f10 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/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( 'labelAlign' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/set.js new file mode 100644 index 000000000000..e98ee09a072f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-align/set.js @@ -0,0 +1,68 @@ +/** +* @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 isTextAlignment = require( '@stdlib/plot/vega/base/assert/is-text-alignment' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var textAlignments = require( '@stdlib/plot/vega/base/text-alignments' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the horizontal text alignment of legend labels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid text alignment +* @returns {void} +*/ +function set( value ) { + if ( !isTextAlignment( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( textAlignments(), '", "' ), 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/legend/ctor/lib/label-baseline/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/get.js new file mode 100644 index 000000000000..5f5b4b86f6f1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/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 vertical text baseline of legend labels. +* +* @private +* @returns {string} label baseline +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/properties.js new file mode 100644 index 000000000000..3c76f8fe5a7f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/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( 'labelBaseline' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/set.js new file mode 100644 index 000000000000..28d296396a2b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-baseline/set.js @@ -0,0 +1,63 @@ +/** +* @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 isVerticalBaseline = require( '@stdlib/plot/vega/base/assert/is-vertical-baseline' ); +var join = require( '@stdlib/array/base/join' ); +var verticalBaselines = require( '@stdlib/plot/vega/base/vertical-baselines' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the vertical text baseline of legend labels. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid vertical baseline +* @returns {void} +*/ +function set( value ) { + if ( !isVerticalBaseline( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( verticalBaselines(), '", "' ), 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/legend/ctor/lib/label-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/get.js new file mode 100644 index 000000000000..ef3947609ffe --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/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 color of legend labels. +* +* @private +* @returns {(string|void)} label color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/properties.js new file mode 100644 index 000000000000..abe7eb8ea8ac --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/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( 'labelColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/set.js new file mode 100644 index 000000000000..8ec97a967b06 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the color of legend labels. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/get.js new file mode 100644 index 000000000000..bfbfef94d703 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/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 font size of legend labels. +* +* @private +* @returns {(number|void)} label font size +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/properties.js new file mode 100644 index 000000000000..a9abe755f333 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/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( 'labelFontSize' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/set.js new file mode 100644 index 000000000000..3e271a9509e5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-size/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font size of legend labels. +* +* ## 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/legend/ctor/lib/label-font-style/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/get.js new file mode 100644 index 000000000000..aaaa6d57f68d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/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 font style of legend labels. +* +* @private +* @returns {(string|void)} label font style +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/properties.js new file mode 100644 index 000000000000..e1845944bf70 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/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( 'labelFontStyle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/set.js new file mode 100644 index 000000000000..2153e2003d0f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-style/set.js @@ -0,0 +1,68 @@ +/** +* @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 isFontStyle = require( '@stdlib/plot/vega/base/assert/is-font-style' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var fontStyles = require( '@stdlib/plot/vega/base/font-styles' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font style of legend labels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid font style +* @returns {void} +*/ +function set( value ) { + if ( !isFontStyle( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( fontStyles(), '", "' ), 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/legend/ctor/lib/label-font-weight/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/get.js new file mode 100644 index 000000000000..b099219bad29 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/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 font weight of legend labels. +* +* @private +* @returns {(number|string|void)} label font weight +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/properties.js new file mode 100644 index 000000000000..09efaa101dcd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/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( 'labelFontWeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/set.js new file mode 100644 index 000000000000..c97116358dd5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font-weight/set.js @@ -0,0 +1,72 @@ +/** +* @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 isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive; +var isFontWeight = require( '@stdlib/plot/vega/base/assert/is-font-weight' ); +var join = require( '@stdlib/array/base/join' ); +var fontWeights = require( '@stdlib/plot/vega/base/font-weights' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font weight of legend labels. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(number|string|void)} value - input value +* @throws {TypeError} must be a valid font weight +* @returns {void} +*/ +function set( value ) { + if ( isNonNegativeInteger( value ) ) { + value = String( value ); + } + if ( !isUndefined( value ) && !isFontWeight( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( fontWeights(), '", "' ), 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/legend/ctor/lib/label-font/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/get.js new file mode 100644 index 000000000000..9a2bd18c9a90 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/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 font name of legend labels. +* +* @private +* @returns {(string|void)} label font +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/properties.js new file mode 100644 index 000000000000..82d16d52ea3f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/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( 'labelFont' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/set.js new file mode 100644 index 000000000000..a8a8b65f2403 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-font/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font name of legend labels. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/get.js new file mode 100644 index 000000000000..fd00b7d30832 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/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 maximum allowed length (in pixels) of legend labels. +* +* @private +* @returns {(number|void)} label limit +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/properties.js new file mode 100644 index 000000000000..f4a77e5362d8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/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( 'labelLimit' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/set.js new file mode 100644 index 000000000000..5959dbe22a57 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-limit/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the maximum allowed length (in pixels) of legend labels. +* +* ## 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/legend/ctor/lib/label-offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/get.js new file mode 100644 index 000000000000..3019de6b4095 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-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 the offset (in pixels) of legend labels. +* +* @private +* @returns {(number|void)} label offset +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/properties.js new file mode 100644 index 000000000000..44b6ca6c068e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-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( 'labelOffset' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-offset/set.js new file mode 100644 index 000000000000..5ba185fcf3a9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-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 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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the offset (in pixels) of legend labels. +* +* ## 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/legend/ctor/lib/label-opacity/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/get.js new file mode 100644 index 000000000000..e29549adc4b7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/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 opacity of legend labels. +* +* @private +* @returns {(number|void)} label opacity +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/properties.js new file mode 100644 index 000000000000..789f5560d093 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/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( 'labelOpacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/set.js new file mode 100644 index 000000000000..6378b24e95ed --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-opacity/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the opacity of legend labels. +* +* ## 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/legend/ctor/lib/label-overlap/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/get.js new file mode 100644 index 000000000000..3b4a81aecf51 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/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 strategy to use for resolving overlapping legend labels. +* +* @private +* @returns {(boolean|string)} label overlap +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/properties.js new file mode 100644 index 000000000000..a0fb4b9cb281 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/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( 'labelOverlap' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/set.js new file mode 100644 index 000000000000..e6e42567c0b4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-overlap/set.js @@ -0,0 +1,62 @@ +/** +* @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 isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the strategy to use for resolving overlapping legend labels. +* +* @private +* @param {(boolean|string)} value - input value +* @throws {TypeError} must be a boolean or string +* @returns {void} +*/ +function set( value ) { + if ( !isBoolean( value ) && !isString( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a boolean or 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js new file mode 100644 index 000000000000..1e72a04206a9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/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 minimum separation between legend label bounding boxes. +* +* @private +* @returns {(number)} label separation +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/properties.js new file mode 100644 index 000000000000..817986df18b8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/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( 'labelSeparation' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/set.js new file mode 100644 index 000000000000..85c01f8ce1b9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the minimum separation (in pixels) between legend label bounding boxes for them to be considered non-overlapping. +* +* @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/legend/ctor/lib/legend-x/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/get.js new file mode 100644 index 000000000000..db38dc6d8a10 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/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 custom x position for the legend group. +* +* @private +* @returns {(number|void)} legend x +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/properties.js new file mode 100644 index 000000000000..fc37c6091685 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/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( 'legendX' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/set.js new file mode 100644 index 000000000000..3f5a0cb289be --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-x/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the custom x position for the legend group. +* +* ## 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/legend/ctor/lib/legend-y/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/get.js new file mode 100644 index 000000000000..f4dea2a3e28b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/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 custom y position for the legend group. +* +* @private +* @returns {(number|void)} legend y +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/properties.js new file mode 100644 index 000000000000..eaf31c42bf53 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/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( 'legendY' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/set.js new file mode 100644 index 000000000000..6590a5cabaa6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/legend-y/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the custom y position for the legend group. +* +* ## 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/legend/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js new file mode 100644 index 000000000000..ef86aa98ff9a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js @@ -0,0 +1,1702 @@ +/** +* @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 EventEmitter = require( 'events' ).EventEmitter; +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 objectKeys = require( '@stdlib/utils/keys' ); +var instance2json = require( '@stdlib/plot/vega/base/to-json' ); +var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validation-message' ); +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 getARIA = require( './aria/get.js' ); +var setARIA = require( './aria/set.js' ); +var getClipHeight = require( './clip-height/get.js' ); +var setClipHeight = require( './clip-height/set.js' ); +var getColumnPadding = require( './column-padding/get.js' ); +var setColumnPadding = require( './column-padding/set.js' ); +var getColumns = require( './columns/get.js' ); +var setColumns = require( './columns/set.js' ); +var getCornerRadius = require( './corner-radius/get.js' ); +var setCornerRadius = require( './corner-radius/set.js' ); +var getDescription = require( './description/get.js' ); +var setDescription = require( './description/set.js' ); +var getDirection = require( './direction/get.js' ); +var setDirection = require( './direction/set.js' ); +var getEncode = require( './encode/get.js' ); +var setEncode = require( './encode/set.js' ); +var getFill = require( './fill/get.js' ); +var setFill = require( './fill/set.js' ); +var getFillColor = require( './fill-color/get.js' ); +var setFillColor = require( './fill-color/set.js' ); +var getFormat = require( './format/get.js' ); +var setFormat = require( './format/set.js' ); +var getFormatType = require( './format-type/get.js' ); +var setFormatType = require( './format-type/set.js' ); +var getGradientLength = require( './gradient-length/get.js' ); +var setGradientLength = require( './gradient-length/set.js' ); +var getGradientOpacity = require( './gradient-opacity/get.js' ); +var setGradientOpacity = require( './gradient-opacity/set.js' ); +var getGradientStrokeColor = require( './gradient-stroke-color/get.js' ); +var setGradientStrokeColor = require( './gradient-stroke-color/set.js' ); +var getGradientStrokeWidth = require( './gradient-stroke-width/get.js' ); +var setGradientStrokeWidth = require( './gradient-stroke-width/set.js' ); +var getGradientThickness = require( './gradient-thickness/get.js' ); +var setGradientThickness = require( './gradient-thickness/set.js' ); +var getGridAlign = require( './grid-align/get.js' ); +var setGridAlign = require( './grid-align/set.js' ); +var getLabelAlign = require( './label-align/get.js' ); +var setLabelAlign = require( './label-align/set.js' ); +var getLabelBaseline = require( './label-baseline/get.js' ); +var setLabelBaseline = require( './label-baseline/set.js' ); +var getLabelColor = require( './label-color/get.js' ); +var setLabelColor = require( './label-color/set.js' ); +var getLabelFont = require( './label-font/get.js' ); +var setLabelFont = require( './label-font/set.js' ); +var getLabelFontSize = require( './label-font-size/get.js' ); +var setLabelFontSize = require( './label-font-size/set.js' ); +var getLabelFontStyle = require( './label-font-style/get.js' ); +var setLabelFontStyle = require( './label-font-style/set.js' ); +var getLabelFontWeight = require( './label-font-weight/get.js' ); +var setLabelFontWeight = require( './label-font-weight/set.js' ); +var getLabelLimit = require( './label-limit/get.js' ); +var setLabelLimit = require( './label-limit/set.js' ); +var getLabelOffset = require( './label-offset/get.js' ); +var setLabelOffset = require( './label-offset/set.js' ); +var getLabelOpacity = require( './label-opacity/get.js' ); +var setLabelOpacity = require( './label-opacity/set.js' ); +var getLabelOverlap = require( './label-overlap/get.js' ); +var setLabelOverlap = require( './label-overlap/set.js' ); +var getLabelSeparation = require( './label-separation/get.js' ); +var setLabelSeparation = require( './label-separation/set.js' ); +var getLegendX = require( './legend-x/get.js' ); +var setLegendX = require( './legend-x/set.js' ); +var getLegendY = require( './legend-y/get.js' ); +var setLegendY = require( './legend-y/set.js' ); +var getOffset = require( './offset/get.js' ); +var setOffset = require( './offset/set.js' ); +var getOpacity = require( './opacity/get.js' ); +var setOpacity = require( './opacity/set.js' ); +var getOrient = require( './orient/get.js' ); +var setOrient = require( './orient/set.js' ); +var getPadding = require( './padding/get.js' ); +var setPadding = require( './padding/set.js' ); +var getProperties = require( './properties/get.js' ); +var getRowPadding = require( './row-padding/get.js' ); +var setRowPadding = require( './row-padding/set.js' ); +var getShape = require( './shape/get.js' ); +var setShape = require( './shape/set.js' ); +var getSize = require( './size/get.js' ); +var setSize = require( './size/set.js' ); +var getStroke = require( './stroke/get.js' ); +var setStroke = require( './stroke/set.js' ); +var getStrokeColor = require( './stroke-color/get.js' ); +var setStrokeColor = require( './stroke-color/set.js' ); +var getStrokeDash = require( './stroke-dash/get.js' ); +var setStrokeDash = require( './stroke-dash/set.js' ); +var getStrokeWidth = require( './stroke-width/get.js' ); +var setStrokeWidth = require( './stroke-width/set.js' ); +var getSymbolDash = require( './symbol-dash/get.js' ); +var setSymbolDash = require( './symbol-dash/set.js' ); +var getSymbolDashOffset = require( './symbol-dash-offset/get.js' ); +var setSymbolDashOffset = require( './symbol-dash-offset/set.js' ); +var getSymbolFillColor = require( './symbol-fill-color/get.js' ); +var setSymbolFillColor = require( './symbol-fill-color/set.js' ); +var getSymbolLimit = require( './symbol-limit/get.js' ); +var setSymbolLimit = require( './symbol-limit/set.js' ); +var getSymbolOffset = require( './symbol-offset/get.js' ); +var setSymbolOffset = require( './symbol-offset/set.js' ); +var getSymbolOpacity = require( './symbol-opacity/get.js' ); +var setSymbolOpacity = require( './symbol-opacity/set.js' ); +var getSymbolSize = require( './symbol-size/get.js' ); +var setSymbolSize = require( './symbol-size/set.js' ); +var getSymbolStrokeColor = require( './symbol-stroke-color/get.js' ); +var setSymbolStrokeColor = require( './symbol-stroke-color/set.js' ); +var getSymbolStrokeWidth = require( './symbol-stroke-width/get.js' ); +var setSymbolStrokeWidth = require( './symbol-stroke-width/set.js' ); +var getSymbolType = require( './symbol-type/get.js' ); +var setSymbolType = require( './symbol-type/set.js' ); +var getTickCount = require( './tick-count/get.js' ); +var setTickCount = require( './tick-count/set.js' ); +var getTickMinStep = require( './tick-min-step/get.js' ); +var setTickMinStep = require( './tick-min-step/set.js' ); +var getTitle = require( './title/get.js' ); +var setTitle = require( './title/set.js' ); +var getTitleAlign = require( './title-align/get.js' ); +var setTitleAlign = require( './title-align/set.js' ); +var getTitleAnchor = require( './title-anchor/get.js' ); +var setTitleAnchor = require( './title-anchor/set.js' ); +var getTitleBaseline = require( './title-baseline/get.js' ); +var setTitleBaseline = require( './title-baseline/set.js' ); +var getTitleColor = require( './title-color/get.js' ); +var setTitleColor = require( './title-color/set.js' ); +var getTitleFont = require( './title-font/get.js' ); +var setTitleFont = require( './title-font/set.js' ); +var getTitleFontSize = require( './title-font-size/get.js' ); +var setTitleFontSize = require( './title-font-size/set.js' ); +var getTitleFontStyle = require( './title-font-style/get.js' ); +var setTitleFontStyle = require( './title-font-style/set.js' ); +var getTitleFontWeight = require( './title-font-weight/get.js' ); +var setTitleFontWeight = require( './title-font-weight/set.js' ); +var getTitleLimit = require( './title-limit/get.js' ); +var setTitleLimit = require( './title-limit/set.js' ); +var getTitleLineHeight = require( './title-line-height/get.js' ); +var setTitleLineHeight = require( './title-line-height/set.js' ); +var getTitleOpacity = require( './title-opacity/get.js' ); +var setTitleOpacity = require( './title-opacity/set.js' ); +var getTitleOrient = require( './title-orient/get.js' ); +var setTitleOrient = require( './title-orient/set.js' ); +var getTitlePadding = require( './title-padding/get.js' ); +var setTitlePadding = require( './title-padding/set.js' ); +var getType = require( './type/get.js' ); +var setType = require( './type/set.js' ); +var getValues = require( './values/get.js' ); +var setValues = require( './values/set.js' ); +var getZIndex = require( './zindex/get.js' ); +var setZIndex = require( './zindex/set.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:main' ); + + +// MAIN // + +/** +* Legend constructor. +* +* @constructor +* @param {Options} options - constructor options +* @param {boolean} [options.aria=true] - boolean indicating whether ARIA attributes should be included in SVG output +* @param {number} [options.clipHeight] - clip height for the legend entries +* @param {number} [options.columnPadding] - horizontal padding (in pixels) between legend columns +* @param {number} [options.columns=1] - number of columns in which to arrange legend entries +* @param {number} [options.cornerRadius] - corner radius for the full legend +* @param {string} [options.description] - legend description +* @param {string} [options.direction='vertical'] - direction of the legend +* @param {Object} [options.encode] - mark encodings for custom legend styling +* @param {string} [options.fill] - name of the scale that maps to a fill color +* @param {string} [options.fillColor] - background fill color for the full legend +* @param {(string|Object)} [options.format] - format specifier for legend labels +* @param {string} [options.formatType] - format type +* @param {number} [options.gradientLength] - length (in pixels) of the color ramp in a gradient legend +* @param {number} [options.gradientOpacity] - opacity of the color gradient +* @param {string} [options.gradientStrokeColor] - stroke color of the color ramp border +* @param {number} [options.gradientStrokeWidth] - stroke width of the color ramp border +* @param {number} [options.gradientThickness] - thickness (in pixels) of the color ramp +* @param {string} [options.gridAlign='each'] - grid alignment for legend entries +* @param {string} [options.labelAlign] - horizontal text alignment of legend labels +* @param {string} [options.labelBaseline='alphabetic'] - vertical text baseline of legend labels +* @param {string} [options.labelColor] - color of legend labels +* @param {string} [options.labelFont] - font name of legend labels +* @param {number} [options.labelFontSize] - font size of legend labels +* @param {string} [options.labelFontStyle] - font style of legend labels +* @param {(string|number)} [options.labelFontWeight] - font weight of legend labels +* @param {number} [options.labelLimit] - maximum allowed length (in pixels) of legend labels +* @param {number} [options.labelOffset] - offset (in pixels) of legend labels +* @param {number} [options.labelOpacity] - opacity of legend labels +* @param {(boolean|string)} [options.labelOverlap=true] - strategy for resolving overlapping legend labels +* @param {number} [options.labelSeparation=0] - minimum separation between legend label bounding boxes +* @param {number} [options.legendX] - custom x position for the legend group +* @param {number} [options.legendY] - custom y position for the legend group +* @param {number} [options.offset] - offset (in pixels) of the legend from the chart body +* @param {string} [options.opacity] - name of the scale that maps to an opacity value +* @param {string} [options.orient='right'] - legend orientation +* @param {number} [options.padding] - padding (in pixels) between legend border and entries +* @param {number} [options.rowPadding] - vertical padding (in pixels) between legend rows +* @param {string} [options.shape] - name of the scale that maps to a shape value +* @param {string} [options.size] - name of the scale that maps to a size value +* @param {string} [options.stroke] - name of the scale that maps to a stroke color +* @param {string} [options.strokeColor] - border stroke color for the full legend +* @param {string} [options.strokeDash] - name of the scale that maps to a stroke dash value +* @param {string} [options.strokeWidth] - name of the scale that maps to a stroke width value +* @param {NumericArray} [options.symbolDash] - stroke dash for legend symbols +* @param {number} [options.symbolDashOffset] - pixel offset at which to start the symbol stroke dash +* @param {string} [options.symbolFillColor] - fill color of legend symbols +* @param {number} [options.symbolLimit] - maximum number of entries for a symbol legend +* @param {number} [options.symbolOffset] - horizontal pixel offset for legend symbols +* @param {number} [options.symbolOpacity] - opacity of legend symbols +* @param {number} [options.symbolSize] - default symbol area size (in squared pixels) +* @param {string} [options.symbolStrokeColor] - stroke color of legend symbols +* @param {number} [options.symbolStrokeWidth] - stroke width of legend symbols +* @param {string} [options.symbolType] - default symbol shape type for legend entries +* @param {(number|string|Object)} [options.tickCount] - desired number of tick values for quantitative legends +* @param {number} [options.tickMinStep] - minimum desired step between tick values +* @param {(string|Array)} [options.title=['']] - legend title +* @param {string} [options.titleAlign] - horizontal text alignment of the legend title +* @param {(string|null)} [options.titleAnchor=null] - legend title anchor position +* @param {string} [options.titleBaseline='alphabetic'] - vertical text baseline of the legend title +* @param {string} [options.titleColor] - color of the legend title +* @param {string} [options.titleFont] - font name of the legend title +* @param {number} [options.titleFontSize] - font size of the legend title +* @param {string} [options.titleFontStyle] - font style of the legend title +* @param {(string|number)} [options.titleFontWeight] - font weight of the legend title +* @param {number} [options.titleLimit] - maximum allowed length (in pixels) of the legend title +* @param {number} [options.titleLineHeight] - line height (in pixels) for multi-line title text +* @param {number} [options.titleOpacity] - opacity of the legend title +* @param {string} [options.titleOrient='top'] - orientation of the legend title +* @param {number} [options.titlePadding] - padding (in pixels) between the legend title and entries +* @param {string} [options.type] - legend type +* @param {Array} [options.values] - explicit set of legend values +* @param {number} [options.zindex=0] - integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups +* @throws {TypeError} options argument must be an object +* @throws {TypeError} must provide at least one legend scale property +* @throws {Error} must provide valid options +* @returns {Legend} legend instance +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale' +* }); +* // returns +*/ +function Legend( options ) { + var opts; + var keys; + var v; + var k; + var i; + if ( !( this instanceof Legend ) ) { + return new Legend( options ); + } + EventEmitter.call( this ); + if ( !isObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', 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 ]; + } + // Check for required properties (at least one scale reference must be provided)... + if ( + !hasProp( options, 'fill' ) && + !hasProp( options, 'opacity' ) && + !hasProp( options, 'shape' ) && + !hasProp( options, 'size' ) && + !hasProp( options, 'stroke' ) && + !hasProp( options, 'strokeDash' ) + ) { + throw new TypeError( 'invalid argument. Options argument must specify at least one legend scale property (e.g., fill, opacity, shape, size, stroke, or strokeDash).' ); + } + // 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 `EventEmitter` prototype. +*/ +inherit( Legend, EventEmitter ); + +/** +* Constructor name. +* +* @private +* @name name +* @memberof Legend +* @readonly +* @type {string} +*/ +setNonEnumerableReadOnly( Legend, 'name', 'Legend' ); + +/** +* Boolean indicating whether ARIA attributes should be included in SVG output. +* +* @name aria +* @memberof Legend.prototype +* @type {boolean} +* @default true +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'aria': false +* }); +* +* var v = legend.aria; +* // returns false +*/ +setReadWriteAccessor( Legend.prototype, 'aria', getARIA, setARIA ); + +/** +* Clip height for the legend entries. +* +* @name clipHeight +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'clipHeight': 20 +* }); +* +* var v = legend.clipHeight; +* // returns 20 +*/ +setReadWriteAccessor( Legend.prototype, 'clipHeight', getClipHeight, setClipHeight ); + +/** +* Horizontal padding (in pixels) between legend columns. +* +* @name columnPadding +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'columnPadding': 10 +* }); +* +* var v = legend.columnPadding; +* // returns 10 +*/ +setReadWriteAccessor( Legend.prototype, 'columnPadding', getColumnPadding, setColumnPadding ); + +/** +* Number of columns in which to arrange legend entries. +* +* @name columns +* @memberof Legend.prototype +* @type {number} +* @default 1 +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'columns': 2 +* }); +* +* var v = legend.columns; +* // returns 2 +*/ +setReadWriteAccessor( Legend.prototype, 'columns', getColumns, setColumns ); + +/** +* Corner radius for the full legend. +* +* @name cornerRadius +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'cornerRadius': 3 +* }); +* +* var v = legend.cornerRadius; +* // returns 3 +*/ +setReadWriteAccessor( Legend.prototype, 'cornerRadius', getCornerRadius, setCornerRadius ); + +/** +* Legend description. +* +* @name description +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'description': 'Color legend' +* }); +* +* var v = legend.description; +* // returns 'Color legend' +*/ +setReadWriteAccessor( Legend.prototype, 'description', getDescription, setDescription ); + +/** +* Direction of the legend. +* +* @name direction +* @memberof Legend.prototype +* @type {string} +* @default 'vertical' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'direction': 'horizontal' +* }); +* +* var v = legend.direction; +* // returns 'horizontal' +*/ +setReadWriteAccessor( Legend.prototype, 'direction', getDirection, setDirection ); + +/** +* Mark encodings for custom legend styling. +* +* @name encode +* @memberof Legend.prototype +* @type {(Object|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'encode': { +* 'labels': { +* 'enter': { +* 'fontSize': { 'value': 12 } +* } +* } +* } +* }); +* +* var v = legend.encode; +* // returns {...} +*/ +setReadWriteAccessor( Legend.prototype, 'encode', getEncode, setEncode ); + +/** +* Name of the scale that maps to a fill color. +* +* @name fill +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale' +* }); +* +* var v = legend.fill; +* // returns 'colorScale' +*/ +setReadWriteAccessor( Legend.prototype, 'fill', getFill, setFill ); + +/** +* Background fill color for the full legend. +* +* @name fillColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'fillColor': '#fff' +* }); +* +* var v = legend.fillColor; +* // returns '#fff' +*/ +setReadWriteAccessor( Legend.prototype, 'fillColor', getFillColor, setFillColor ); + +/** +* Format specifier for legend labels. +* +* @name format +* @memberof Legend.prototype +* @type {(string|Object|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'format': '.1f' +* }); +* +* var v = legend.format; +* // returns '.1f' +*/ +setReadWriteAccessor( Legend.prototype, 'format', getFormat, setFormat ); + +/** +* Type of format to use for legend scales which do not have a strict domain data type. +* +* @name formatType +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'formatType': 'number' +* }); +* +* var v = legend.formatType; +* // returns 'number' +*/ +setReadWriteAccessor( Legend.prototype, 'formatType', getFormatType, setFormatType ); + +/** +* Length (in pixels) of the color ramp in a gradient legend. +* +* @name gradientLength +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gradientLength': 200 +* }); +* +* var v = legend.gradientLength; +* // returns 200 +*/ +setReadWriteAccessor( Legend.prototype, 'gradientLength', getGradientLength, setGradientLength ); + +/** +* Opacity of the color gradient. +* +* @name gradientOpacity +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gradientOpacity': 0.5 +* }); +* +* var v = legend.gradientOpacity; +* // returns 0.5 +*/ +setReadWriteAccessor( Legend.prototype, 'gradientOpacity', getGradientOpacity, setGradientOpacity ); + +/** +* Stroke color of the color ramp border. +* +* @name gradientStrokeColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gradientStrokeColor': '#ccc' +* }); +* +* var v = legend.gradientStrokeColor; +* // returns '#ccc' +*/ +setReadWriteAccessor( Legend.prototype, 'gradientStrokeColor', getGradientStrokeColor, setGradientStrokeColor ); + +/** +* Stroke width of the color ramp border. +* +* @name gradientStrokeWidth +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gradientStrokeWidth': 1 +* }); +* +* var v = legend.gradientStrokeWidth; +* // returns 1 +*/ +setReadWriteAccessor( Legend.prototype, 'gradientStrokeWidth', getGradientStrokeWidth, setGradientStrokeWidth ); + +/** +* Thickness (in pixels) of the color ramp in a gradient legend. +* +* @name gradientThickness +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gradientThickness': 16 +* }); +* +* var v = legend.gradientThickness; +* // returns 16 +*/ +setReadWriteAccessor( Legend.prototype, 'gradientThickness', getGradientThickness, setGradientThickness ); + +/** +* Grid alignment for legend entries. +* +* @name gridAlign +* @memberof Legend.prototype +* @type {string} +* @default 'each' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'gridAlign': 'all' +* }); +* +* var v = legend.gridAlign; +* // returns 'all' +*/ +setReadWriteAccessor( Legend.prototype, 'gridAlign', getGridAlign, setGridAlign ); + +/** +* Horizontal text alignment of legend labels. +* +* @name labelAlign +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelAlign': 'left' +* }); +* +* var v = legend.labelAlign; +* // returns 'left' +*/ +setReadWriteAccessor( Legend.prototype, 'labelAlign', getLabelAlign, setLabelAlign ); + +/** +* Vertical text baseline of legend labels. +* +* @name labelBaseline +* @memberof Legend.prototype +* @type {string} +* @default 'alphabetic' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelBaseline': 'top' +* }); +* +* var v = legend.labelBaseline; +* // returns 'top' +*/ +setReadWriteAccessor( Legend.prototype, 'labelBaseline', getLabelBaseline, setLabelBaseline ); + +/** +* Color of legend labels. +* +* @name labelColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelColor': 'steelblue' +* }); +* +* var v = legend.labelColor; +* // returns 'steelblue' +*/ +setReadWriteAccessor( Legend.prototype, 'labelColor', getLabelColor, setLabelColor ); + +/** +* Font name of legend labels. +* +* @name labelFont +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelFont': 'Arial' +* }); +* +* var v = legend.labelFont; +* // returns 'Arial' +*/ +setReadWriteAccessor( Legend.prototype, 'labelFont', getLabelFont, setLabelFont ); + +/** +* Font size of legend labels. +* +* @name labelFontSize +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelFontSize': 12 +* }); +* +* var v = legend.labelFontSize; +* // returns 12 +*/ +setReadWriteAccessor( Legend.prototype, 'labelFontSize', getLabelFontSize, setLabelFontSize ); + +/** +* Font style of legend labels. +* +* @name labelFontStyle +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelFontStyle': 'italic' +* }); +* +* var v = legend.labelFontStyle; +* // returns 'italic' +*/ +setReadWriteAccessor( Legend.prototype, 'labelFontStyle', getLabelFontStyle, setLabelFontStyle ); + +/** +* Font weight of legend labels. +* +* @name labelFontWeight +* @memberof Legend.prototype +* @type {(string|number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelFontWeight': 'bold' +* }); +* +* var v = legend.labelFontWeight; +* // returns 'bold' +*/ +setReadWriteAccessor( Legend.prototype, 'labelFontWeight', getLabelFontWeight, setLabelFontWeight ); + +/** +* Maximum allowed length (in pixels) of legend labels. +* +* @name labelLimit +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelLimit': 100 +* }); +* +* var v = legend.labelLimit; +* // returns 100 +*/ +setReadWriteAccessor( Legend.prototype, 'labelLimit', getLabelLimit, setLabelLimit ); + +/** +* Offset (in pixels) of legend labels. +* +* @name labelOffset +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelOffset': 4 +* }); +* +* var v = legend.labelOffset; +* // returns 4 +*/ +setReadWriteAccessor( Legend.prototype, 'labelOffset', getLabelOffset, setLabelOffset ); + +/** +* Opacity of legend labels. +* +* @name labelOpacity +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelOpacity': 0.5 +* }); +* +* var v = legend.labelOpacity; +* // returns 0.5 +*/ +setReadWriteAccessor( Legend.prototype, 'labelOpacity', getLabelOpacity, setLabelOpacity ); + +/** +* Strategy to use for resolving overlapping legend labels. +* +* @name labelOverlap +* @memberof Legend.prototype +* @type {(boolean|string)} +* @default true +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelOverlap': 'greedy' +* }); +* +* var v = legend.labelOverlap; +* // returns 'greedy' +*/ +setReadWriteAccessor( Legend.prototype, 'labelOverlap', getLabelOverlap, setLabelOverlap ); + +/** +* Minimum separation (in pixels) between legend label bounding boxes for them to be considered non-overlapping. +* +* @name labelSeparation +* @memberof Legend.prototype +* @type {NonNegativeNumber} +* @default 0 +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'labelSeparation': 5 +* }); +* +* var v = legend.labelSeparation; +* // returns 5 +*/ +setReadWriteAccessor( Legend.prototype, 'labelSeparation', getLabelSeparation, setLabelSeparation ); + +/** +* Custom x position for the legend group. +* +* @name legendX +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'legendX': 100 +* }); +* +* var v = legend.legendX; +* // returns 100 +*/ +setReadWriteAccessor( Legend.prototype, 'legendX', getLegendX, setLegendX ); + +/** +* Custom y position for the legend group. +* +* @name legendY +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'legendY': 100 +* }); +* +* var v = legend.legendY; +* // returns 100 +*/ +setReadWriteAccessor( Legend.prototype, 'legendY', getLegendY, setLegendY ); + +/** +* Offset (in pixels) of the legend from the chart body. +* +* @name offset +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'offset': 12 +* }); +* +* var v = legend.offset; +* // returns 12 +*/ +setReadWriteAccessor( Legend.prototype, 'offset', getOffset, setOffset ); + +/** +* Name of the scale that maps to an opacity value. +* +* @name opacity +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'opacity': 'opacityScale' +* }); +* +* var v = legend.opacity; +* // returns 'opacityScale' +*/ +setReadWriteAccessor( Legend.prototype, 'opacity', getOpacity, setOpacity ); + +/** +* Legend orientation. +* +* @name orient +* @memberof Legend.prototype +* @type {string} +* @default 'right' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'orient': 'left' +* }); +* +* var v = legend.orient; +* // returns 'left' +*/ +setReadWriteAccessor( Legend.prototype, 'orient', getOrient, setOrient ); + +/** +* Padding (in pixels) between legend border and entries. +* +* @name padding +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'padding': 8 +* }); +* +* var v = legend.padding; +* // returns 8 +*/ +setReadWriteAccessor( Legend.prototype, 'padding', getPadding, setPadding ); + +/** +* Legend properties. +* +* @name properties +* @memberof Legend.prototype +* @type {Array} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale' +* }); +* +* var v = legend.properties; +* // returns [...] +*/ +setNonEnumerableReadOnlyAccessor( Legend.prototype, 'properties', getProperties ); + +/** +* Vertical padding (in pixels) between legend rows. +* +* @name rowPadding +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'rowPadding': 4 +* }); +* +* var v = legend.rowPadding; +* // returns 4 +*/ +setReadWriteAccessor( Legend.prototype, 'rowPadding', getRowPadding, setRowPadding ); + +/** +* Name of the scale that maps to a shape value. +* +* @name shape +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'shape': 'shapeScale' +* }); +* +* var v = legend.shape; +* // returns 'shapeScale' +*/ +setReadWriteAccessor( Legend.prototype, 'shape', getShape, setShape ); + +/** +* Name of the scale that maps to a size value. +* +* @name size +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'size': 'sizeScale' +* }); +* +* var v = legend.size; +* // returns 'sizeScale' +*/ +setReadWriteAccessor( Legend.prototype, 'size', getSize, setSize ); + +/** +* Name of the scale that maps to a stroke color. +* +* @name stroke +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'stroke': 'strokeScale' +* }); +* +* var v = legend.stroke; +* // returns 'strokeScale' +*/ +setReadWriteAccessor( Legend.prototype, 'stroke', getStroke, setStroke ); + +/** +* Border stroke color for the full legend. +* +* @name strokeColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'strokeColor': '#ccc' +* }); +* +* var v = legend.strokeColor; +* // returns '#ccc' +*/ +setReadWriteAccessor( Legend.prototype, 'strokeColor', getStrokeColor, setStrokeColor ); + +/** +* Name of the scale that maps to a stroke dash value. +* +* @name strokeDash +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'strokeDash': 'dashScale' +* }); +* +* var v = legend.strokeDash; +* // returns 'dashScale' +*/ +setReadWriteAccessor( Legend.prototype, 'strokeDash', getStrokeDash, setStrokeDash ); + +/** +* Name of the scale that maps to a stroke width value. +* +* @name strokeWidth +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'strokeWidth': 'widthScale' +* }); +* +* var v = legend.strokeWidth; +* // returns 'widthScale' +*/ +setReadWriteAccessor( Legend.prototype, 'strokeWidth', getStrokeWidth, setStrokeWidth ); + +/** +* Stroke dash for legend symbols. +* +* @name symbolDash +* @memberof Legend.prototype +* @type {(NumericArray|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolDash': [4, 2] +* }); +* +* var v = legend.symbolDash; +* // returns [4, 2] +*/ +setReadWriteAccessor( Legend.prototype, 'symbolDash', getSymbolDash, setSymbolDash ); + +/** +* Pixel offset at which to start the symbol stroke dash. +* +* @name symbolDashOffset +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolDashOffset': 1 +* }); +* +* var v = legend.symbolDashOffset; +* // returns 1 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolDashOffset', getSymbolDashOffset, setSymbolDashOffset ); + +/** +* Fill color of legend symbols. +* +* @name symbolFillColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolFillColor': 'steelblue' +* }); +* +* var v = legend.symbolFillColor; +* // returns 'steelblue' +*/ +setReadWriteAccessor( Legend.prototype, 'symbolFillColor', getSymbolFillColor, setSymbolFillColor ); + +/** +* Maximum number of entries for a symbol legend. +* +* @name symbolLimit +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolLimit': 30 +* }); +* +* var v = legend.symbolLimit; +* // returns 30 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolLimit', getSymbolLimit, setSymbolLimit ); + +/** +* Horizontal pixel offset for legend symbols. +* +* @name symbolOffset +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolOffset': 2 +* }); +* +* var v = legend.symbolOffset; +* // returns 2 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolOffset', getSymbolOffset, setSymbolOffset ); + +/** +* Opacity of legend symbols. +* +* @name symbolOpacity +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolOpacity': 0.5 +* }); +* +* var v = legend.symbolOpacity; +* // returns 0.5 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolOpacity', getSymbolOpacity, setSymbolOpacity ); + +/** +* Default symbol area size (in squared pixels). +* +* @name symbolSize +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolSize': 100 +* }); +* +* var v = legend.symbolSize; +* // returns 100 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolSize', getSymbolSize, setSymbolSize ); + +/** +* Stroke color of legend symbols. +* +* @name symbolStrokeColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolStrokeColor': 'steelblue' +* }); +* +* var v = legend.symbolStrokeColor; +* // returns 'steelblue' +*/ +setReadWriteAccessor( Legend.prototype, 'symbolStrokeColor', getSymbolStrokeColor, setSymbolStrokeColor ); + +/** +* Stroke width of legend symbols. +* +* @name symbolStrokeWidth +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolStrokeWidth': 1 +* }); +* +* var v = legend.symbolStrokeWidth; +* // returns 1 +*/ +setReadWriteAccessor( Legend.prototype, 'symbolStrokeWidth', getSymbolStrokeWidth, setSymbolStrokeWidth ); + +/** +* Default symbol shape type for legend entries. +* +* @name symbolType +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'symbolType': 'circle' +* }); +* +* var v = legend.symbolType; +* // returns 'circle' +*/ +setReadWriteAccessor( Legend.prototype, 'symbolType', getSymbolType, setSymbolType ); + +/** +* Desired number of tick values for quantitative legends. +* +* @name tickCount +* @memberof Legend.prototype +* @type {(number|string|Object|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'tickCount': 5 +* }); +* +* var v = legend.tickCount; +* // returns 5 +*/ +setReadWriteAccessor( Legend.prototype, 'tickCount', getTickCount, setTickCount ); + +/** +* Minimum desired step between tick values (in data units). +* +* @name tickMinStep +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'tickMinStep': 1 +* }); +* +* var v = legend.tickMinStep; +* // returns 1 +*/ +setReadWriteAccessor( Legend.prototype, 'tickMinStep', getTickMinStep, setTickMinStep ); + +/** +* Legend title. +* +* @name title +* @memberof Legend.prototype +* @type {Array} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'title': 'Legend Title' +* }); +* +* var v = legend.title; +* // returns [ 'Legend Title' ] +*/ +setReadWriteAccessor( Legend.prototype, 'title', getTitle, setTitle ); + +/** +* Horizontal text alignment of the legend title. +* +* @name titleAlign +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleAlign': 'left' +* }); +* +* var v = legend.titleAlign; +* // returns 'left' +*/ +setReadWriteAccessor( Legend.prototype, 'titleAlign', getTitleAlign, setTitleAlign ); + +/** +* Legend title anchor position. +* +* @name titleAnchor +* @memberof Legend.prototype +* @type {(string|null)} +* @default null +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleAnchor': 'start' +* }); +* +* var v = legend.titleAnchor; +* // returns 'start' +*/ +setReadWriteAccessor( Legend.prototype, 'titleAnchor', getTitleAnchor, setTitleAnchor ); + +/** +* Vertical text baseline of the legend title. +* +* @name titleBaseline +* @memberof Legend.prototype +* @type {string} +* @default 'alphabetic' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleBaseline': 'top' +* }); +* +* var v = legend.titleBaseline; +* // returns 'top' +*/ +setReadWriteAccessor( Legend.prototype, 'titleBaseline', getTitleBaseline, setTitleBaseline ); + +/** +* Color of the legend title. +* +* @name titleColor +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleColor': 'steelblue' +* }); +* +* var v = legend.titleColor; +* // returns 'steelblue' +*/ +setReadWriteAccessor( Legend.prototype, 'titleColor', getTitleColor, setTitleColor ); + +/** +* Font name of the legend title. +* +* @name titleFont +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleFont': 'Arial' +* }); +* +* var v = legend.titleFont; +* // returns 'Arial' +*/ +setReadWriteAccessor( Legend.prototype, 'titleFont', getTitleFont, setTitleFont ); + +/** +* Font size of the legend title. +* +* @name titleFontSize +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleFontSize': 14 +* }); +* +* var v = legend.titleFontSize; +* // returns 14 +*/ +setReadWriteAccessor( Legend.prototype, 'titleFontSize', getTitleFontSize, setTitleFontSize ); + +/** +* Font style of the legend title. +* +* @name titleFontStyle +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleFontStyle': 'italic' +* }); +* +* var v = legend.titleFontStyle; +* // returns 'italic' +*/ +setReadWriteAccessor( Legend.prototype, 'titleFontStyle', getTitleFontStyle, setTitleFontStyle ); + +/** +* Font weight of the legend title. +* +* @name titleFontWeight +* @memberof Legend.prototype +* @type {(string|number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleFontWeight': 'bold' +* }); +* +* var v = legend.titleFontWeight; +* // returns 'bold' +*/ +setReadWriteAccessor( Legend.prototype, 'titleFontWeight', getTitleFontWeight, setTitleFontWeight ); + +/** +* Maximum allowed length (in pixels) of the legend title. +* +* @name titleLimit +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleLimit': 100 +* }); +* +* var v = legend.titleLimit; +* // returns 100 +*/ +setReadWriteAccessor( Legend.prototype, 'titleLimit', getTitleLimit, setTitleLimit ); + +/** +* Line height (in pixels) for multi-line title text. +* +* @name titleLineHeight +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleLineHeight': 16 +* }); +* +* var v = legend.titleLineHeight; +* // returns 16 +*/ +setReadWriteAccessor( Legend.prototype, 'titleLineHeight', getTitleLineHeight, setTitleLineHeight ); + +/** +* Opacity of the legend title. +* +* @name titleOpacity +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleOpacity': 0.8 +* }); +* +* var v = legend.titleOpacity; +* // returns 0.8 +*/ +setReadWriteAccessor( Legend.prototype, 'titleOpacity', getTitleOpacity, setTitleOpacity ); + +/** +* Orientation of the legend title. +* +* @name titleOrient +* @memberof Legend.prototype +* @type {string} +* @default 'top' +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titleOrient': 'left' +* }); +* +* var v = legend.titleOrient; +* // returns 'left' +*/ +setReadWriteAccessor( Legend.prototype, 'titleOrient', getTitleOrient, setTitleOrient ); + +/** +* Padding (in pixels) between the legend title and entries. +* +* @name titlePadding +* @memberof Legend.prototype +* @type {(number|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'titlePadding': 8 +* }); +* +* var v = legend.titlePadding; +* // returns 8 +*/ +setReadWriteAccessor( Legend.prototype, 'titlePadding', getTitlePadding, setTitlePadding ); + +/** +* Legend type. +* +* @name type +* @memberof Legend.prototype +* @type {(string|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'type': 'gradient' +* }); +* +* var v = legend.type; +* // returns 'gradient' +*/ +setReadWriteAccessor( Legend.prototype, 'type', getType, setType ); + +/** +* Explicit set of legend values. +* +* @name values +* @memberof Legend.prototype +* @type {(Array|void)} +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'values': [1, 2, 3] +* }); +* +* var v = legend.values; +* // returns [1, 2, 3] +*/ +setReadWriteAccessor( Legend.prototype, 'values', getValues, setValues ); + +/** +* Integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups. +* +* @name zindex +* @memberof Legend.prototype +* @type {number} +* @default 0 +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale', +* 'zindex': 2 +* }); +* +* var v = legend.zindex; +* // returns 2 +*/ +setReadWriteAccessor( Legend.prototype, 'zindex', getZIndex, setZIndex ); + +/** +* Serializes an instance to a JSON object. +* +* ## Notes +* +* - This method is implicitly invoked by `JSON.stringify`. +* +* @name toJSON +* @memberof Legend.prototype +* @type {Function} +* @returns {Object} JSON object +* +* @example +* var legend = new Legend({ +* 'fill': 'colorScale' +* }); +* +* var v = legend.toJSON(); +* // returns {...} +*/ +setNonEnumerableReadOnly( Legend.prototype, 'toJSON', function toJSON() { + return instance2json( this, properties ); +}); + + +// EXPORTS // + +module.exports = Legend; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js new file mode 100644 index 000000000000..490d867f045d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/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 the offset (in pixels) of the legend from the chart body. +* +* @private +* @returns {(number|void)} offset +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/properties.js new file mode 100644 index 000000000000..d1b5fccec871 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/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( 'offset' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js new file mode 100644 index 000000000000..fbcca60c5342 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/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 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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the offset (in pixels) of the legend from the chart body. +* +* ## 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/legend/ctor/lib/opacity/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/get.js new file mode 100644 index 000000000000..598e464c230b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/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 name of the scale that maps to an opacity value. +* +* @private +* @returns {(string|void)} opacity +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/properties.js new file mode 100644 index 000000000000..41bb0d21d7c4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/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( 'opacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/set.js new file mode 100644 index 000000000000..d22edfb4907d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/opacity/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to an opacity value. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/get.js new file mode 100644 index 000000000000..6402be49feb8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/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 legend orientation. +* +* @private +* @returns {string} orient +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/properties.js new file mode 100644 index 000000000000..5e8fa13f48f4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/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( 'orient' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/set.js new file mode 100644 index 000000000000..7487c29dbf53 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/orient/set.js @@ -0,0 +1,63 @@ +/** +* @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 isLegendOrientation = require( '@stdlib/plot/vega/base/assert/is-legend-orientation' ); +var join = require( '@stdlib/array/base/join' ); +var legendOrientations = require( '@stdlib/plot/vega/legend/orientations' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the legend orientation. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid orientation +* @returns {void} +*/ +function set( value ) { + if ( !isLegendOrientation( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( legendOrientations(), '", "' ), 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/legend/ctor/lib/padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js new file mode 100644 index 000000000000..e864f3b2fc08 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/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 padding (in pixels) between legend border and entries. +* +* @private +* @returns {(number|void)} padding +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/properties.js new file mode 100644 index 000000000000..7c8d98d6884c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/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( 'padding' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js new file mode 100644 index 000000000000..811e8dd990cf --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the padding (in pixels) between legend border and entries. +* +* ## 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/legend/ctor/lib/properties.json b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties.json new file mode 100644 index 000000000000..bfaab65875f5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties.json @@ -0,0 +1,74 @@ +[ + "aria", + "clipHeight", + "columnPadding", + "columns", + "cornerRadius", + "description", + "direction", + "encode", + "fill", + "fillColor", + "format", + "formatType", + "gradientLength", + "gradientOpacity", + "gradientStrokeColor", + "gradientStrokeWidth", + "gradientThickness", + "gridAlign", + "labelAlign", + "labelBaseline", + "labelColor", + "labelFont", + "labelFontSize", + "labelFontStyle", + "labelFontWeight", + "labelLimit", + "labelOffset", + "labelOpacity", + "labelOverlap", + "labelSeparation", + "legendX", + "legendY", + "offset", + "opacity", + "orient", + "padding", + "rowPadding", + "shape", + "size", + "stroke", + "strokeColor", + "strokeDash", + "strokeWidth", + "symbolDash", + "symbolDashOffset", + "symbolFillColor", + "symbolLimit", + "symbolOffset", + "symbolOpacity", + "symbolSize", + "symbolStrokeColor", + "symbolStrokeWidth", + "symbolType", + "tickCount", + "tickMinStep", + "title", + "titleAlign", + "titleAnchor", + "titleBaseline", + "titleColor", + "titleFont", + "titleFontSize", + "titleFontStyle", + "titleFontWeight", + "titleLimit", + "titleLineHeight", + "titleOpacity", + "titleOrient", + "titlePadding", + "type", + "values", + "zindex" +] diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/properties/get.js new file mode 100644 index 000000000000..f3cbb28454ea --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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/legend/ctor/lib/row-padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js new file mode 100644 index 000000000000..8edefafc2313 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/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 vertical padding (in pixels) between legend rows. +* +* @private +* @returns {(number|void)} row padding +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/properties.js new file mode 100644 index 000000000000..fab8098a0213 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/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( 'rowPadding' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js new file mode 100644 index 000000000000..0ffe8c2cd059 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the vertical padding (in pixels) between legend rows. +* +* ## 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/legend/ctor/lib/shape/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/get.js new file mode 100644 index 000000000000..191b8d4beb19 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/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 name of the scale that maps to a shape value. +* +* @private +* @returns {(string|void)} shape +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/properties.js new file mode 100644 index 000000000000..deb5b5c17de6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/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( 'shape' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/set.js new file mode 100644 index 000000000000..1a0e49cf046c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/shape/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a shape value. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/get.js new file mode 100644 index 000000000000..9c2ffa0c2e71 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/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 name of the scale that maps to a size value. +* +* @private +* @returns {(string|void)} size +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/properties.js new file mode 100644 index 000000000000..bf1bd182f0eb --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/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( 'size' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/set.js new file mode 100644 index 000000000000..a3c180140e5a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/size/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a size value. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js new file mode 100644 index 000000000000..f8aca63b2c1d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/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 border stroke color for the full legend. +* +* @private +* @returns {(string|void)} stroke color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/properties.js new file mode 100644 index 000000000000..1de104a9c5b5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/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( 'strokeColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js new file mode 100644 index 000000000000..95bd57c93b3a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the border stroke color for the full legend. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/get.js new file mode 100644 index 000000000000..2f8517122c87 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/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 name of the scale that maps to a stroke dash value. +* +* @private +* @returns {(string|void)} stroke dash +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/properties.js new file mode 100644 index 000000000000..244d6ce6d967 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/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( 'strokeDash' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/set.js new file mode 100644 index 000000000000..4a1c3ba95658 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-dash/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a stroke dash value. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js new file mode 100644 index 000000000000..ed4c5f6e6e11 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/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 name of a scale that maps to a stroke width value. +* +* @private +* @returns {(string|void)} stroke width +*/ +function get() { + return this[prop.private]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/properties.js new file mode 100644 index 000000000000..ef10d4ed24b7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/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( 'strokeWidth' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/set.js new file mode 100644 index 000000000000..f7c19cc82c8a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a stroke width value. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/get.js new file mode 100644 index 000000000000..852626f51bec --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/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 name of the scale that maps to a stroke color. +* +* @private +* @returns {(string|void)} stroke +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/properties.js new file mode 100644 index 000000000000..e3fbbfdfdfd9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/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( 'stroke' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/set.js new file mode 100644 index 000000000000..fb854f34a11a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the name of the scale that maps to a stroke color. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js new file mode 100644 index 000000000000..ba29e4c54386 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-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 the pixel offset at which to start the symbol stroke dash. +* +* @private +* @returns {(number|void)} symbol dash offset +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/properties.js new file mode 100644 index 000000000000..0608c2db053b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-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( 'symbolDashOffset' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js new file mode 100644 index 000000000000..245d02ccef7b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-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 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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the pixel offset at which to start the symbol stroke dash. +* +* ## 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/legend/ctor/lib/symbol-dash/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js new file mode 100644 index 000000000000..d338854baa27 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var copy = require( '@stdlib/array/base/copy-indexed' ); +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns the stroke dash for legend symbols. +* +* @private +* @returns {(Array|void)} symbol dash +*/ +function get() { + if ( this[ prop.private ] ) { + return copy( this[ prop.private ] ); + } + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/properties.js new file mode 100644 index 000000000000..27b5583898b9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/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( 'symbolDash' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js new file mode 100644 index 000000000000..7dc07c1035dd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js @@ -0,0 +1,78 @@ +/** +* @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 isNumericArray = require( '@stdlib/assert/is-numeric-array' ); +var isEmptyCollection = require( '@stdlib/assert/is-empty-collection' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var hasSameValues = require( '@stdlib/array/base/assert/has-same-values' ); +var copy = require( '@stdlib/array/base/copy' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the stroke dash for legend symbols. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(NumericArray|void)} value - input value +* @throws {TypeError} must be a numeric array +* @returns {void} +*/ +function set( value ) { + if ( isUndefined( 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 ) ); + } + return; + } + if ( !isNumericArray( value ) && !isEmptyCollection( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a numeric array. Value: `%s`.', prop.name, value ) ); + } + if ( !this[ prop.private ] || !hasSameValues( value, this[ prop.private ] ) ) { + debug( 'Current value: [%s]. New value: [%s].', this[ prop.private ] ? join( this[ prop.private ], ', ' ) : '', join( value, ', ' ) ); + this[ prop.private ] = copy( value ); + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/get.js new file mode 100644 index 000000000000..abd37a8d1b8e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/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 fill color of legend symbols. +* +* @private +* @returns {(string|void)} symbol fill color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/properties.js new file mode 100644 index 000000000000..105817533bf8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/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( 'symbolFillColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/set.js new file mode 100644 index 000000000000..ab800d0fe844 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-fill-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the fill color of legend symbols. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/get.js new file mode 100644 index 000000000000..6e2995c4a7b9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/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 maximum number of entries for a symbol legend. +* +* @private +* @returns {(number|void)} symbol limit +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/properties.js new file mode 100644 index 000000000000..ba10d5a3ae97 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/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( 'symbolLimit' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/set.js new file mode 100644 index 000000000000..e19ed8794900 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-limit/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the maximum number of entries for a symbol legend. +* +* ## 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/legend/ctor/lib/symbol-offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/get.js new file mode 100644 index 000000000000..f6f7aac6747d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-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 the horizontal pixel offset for legend symbols. +* +* @private +* @returns {(number|void)} symbol offset +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/properties.js new file mode 100644 index 000000000000..e3eea7aa2e60 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-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( 'symbolOffset' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-offset/set.js new file mode 100644 index 000000000000..8e42e096c45a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-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 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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the horizontal pixel offset for legend symbols. +* +* ## 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/legend/ctor/lib/symbol-opacity/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/get.js new file mode 100644 index 000000000000..0e464b294587 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/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 opacity of legend symbols. +* +* @private +* @returns {(number|void)} symbol opacity +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/properties.js new file mode 100644 index 000000000000..f294acc264bd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/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( 'symbolOpacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/set.js new file mode 100644 index 000000000000..5ab0be614320 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-opacity/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the opacity of legend symbols. +* +* ## 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/legend/ctor/lib/symbol-size/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/get.js new file mode 100644 index 000000000000..34356ff7cc45 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/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 default symbol area size (in squared pixels). +* +* @private +* @returns {(number|void)} symbol size +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/properties.js new file mode 100644 index 000000000000..3cc1aa8eec5d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/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( 'symbolSize' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/set.js new file mode 100644 index 000000000000..1748affc10dd --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-size/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the default symbol area size (in squared 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/legend/ctor/lib/symbol-stroke-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/get.js new file mode 100644 index 000000000000..d903972da8d9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/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 stroke color of legend symbols. +* +* @private +* @returns {(string|void)} symbol stroke color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/properties.js new file mode 100644 index 000000000000..d47e4cc28c90 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/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( 'symbolStrokeColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/set.js new file mode 100644 index 000000000000..687182a95c99 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the stroke color of legend symbols. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/get.js new file mode 100644 index 000000000000..8adb3be7ec36 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/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 stroke width of legend symbols. +* +* @private +* @returns {(number|void)} symbol stroke width +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/properties.js new file mode 100644 index 000000000000..8c7c6c4d5121 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/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( 'symbolStrokeWidth' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/set.js new file mode 100644 index 000000000000..5a9b81389bc5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-stroke-width/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the stroke width of legend symbols. +* +* ## 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/legend/ctor/lib/symbol-type/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/get.js new file mode 100644 index 000000000000..7f59e1c91619 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/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 default symbol shape type for legend entries. +* +* @private +* @returns {(string|void)} symbol type +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/properties.js new file mode 100644 index 000000000000..93094034cd46 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/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( 'symbolType' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/set.js new file mode 100644 index 000000000000..1891eaf6068f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-type/set.js @@ -0,0 +1,68 @@ +/** +* @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 isSymbolMarkShape = require( '@stdlib/plot/vega/base/assert/is-symbol-mark-shape' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var symbolMarkShapes = require( '@stdlib/plot/vega/mark/symbol/shapes' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the default symbol shape type for legend entries. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid symbol shape +* @returns {void} +*/ +function set( value ) { + if ( !isSymbolMarkShape( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( symbolMarkShapes(), '", "' ), 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/legend/ctor/lib/tick-count/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/get.js new file mode 100644 index 000000000000..47e69b88bbe5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/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 desired number of tick values for quantitative legends. +* +* @private +* @returns {(number|string|Object|void)} tick count +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/properties.js new file mode 100644 index 000000000000..08705ae63ee8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/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( 'tickCount' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/set.js new file mode 100644 index 000000000000..459da2c305d3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-count/set.js @@ -0,0 +1,68 @@ +/** +* @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 isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var isObject = require( '@stdlib/assert/is-object' ); +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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the desired number of tick values for quantitative legends. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(number|string|Object|void)} value - input value +* @throws {TypeError} must be a number, string, or object +* @returns {void} +*/ +function set( value ) { + if ( !isNumber( value ) && !isString( value ) && !isObject( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a number, string, or object. 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/legend/ctor/lib/tick-min-step/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/get.js new file mode 100644 index 000000000000..f447fe80fc10 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/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 minimum desired step between tick values (in data units). +* +* @private +* @returns {(number|void)} tick min step +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/properties.js new file mode 100644 index 000000000000..62df1fb090ba --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/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( 'tickMinStep' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/set.js new file mode 100644 index 000000000000..e4c57ab1daa5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/tick-min-step/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the minimum desired step between tick values (in data units). +* +* ## 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/legend/ctor/lib/title-align/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/get.js new file mode 100644 index 000000000000..ba4e70767b6a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/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 horizontal text alignment of the legend title. +* +* @private +* @returns {(string|void)} title align +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/properties.js new file mode 100644 index 000000000000..f9c5eacc3f59 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/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( 'titleAlign' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/set.js new file mode 100644 index 000000000000..75d0dd4ed722 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-align/set.js @@ -0,0 +1,68 @@ +/** +* @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 isTextAlignment = require( '@stdlib/plot/vega/base/assert/is-text-alignment' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var textAlignments = require( '@stdlib/plot/vega/base/text-alignments' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the horizontal text alignment of the legend title. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid text alignment +* @returns {void} +*/ +function set( value ) { + if ( !isTextAlignment( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( textAlignments(), '", "' ), 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/legend/ctor/lib/title-anchor/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js new file mode 100644 index 000000000000..15cdc89cee2e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/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 legend title anchor position. +* +* @private +* @returns {(string|void)} title anchor +*/ +function get() { + return this[prop.private]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/properties.js new file mode 100644 index 000000000000..0c5e8f5c97f8 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/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( 'titleAnchor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js new file mode 100644 index 000000000000..3d7a07b20ad5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js @@ -0,0 +1,69 @@ +/** +* @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 isAnchorPosition = require( '@stdlib/plot/vega/base/assert/is-anchor-position' ); +var isNull = require( '@stdlib/assert/is-null' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var anchorPositions = require( '@stdlib/plot/vega/base/anchor-positions' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the legend title anchor position. +* +* ## Notes +* +* - Providing `null` resets to the default (null) value. +* +* @private +* @param {(string|null)} value - input value +* @throws {TypeError} must be a valid anchor position or null +* @returns {void} +*/ +function set( value ) { + if ( !isAnchorPosition( value ) && !isNull( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( anchorPositions(), '", "' ), 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/legend/ctor/lib/title-baseline/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/get.js new file mode 100644 index 000000000000..47b618b3b5ab --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/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 vertical text baseline of the legend title. +* +* @private +* @returns {string} title baseline +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/properties.js new file mode 100644 index 000000000000..80996e26167b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/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( 'titleBaseline' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/set.js new file mode 100644 index 000000000000..c45639a03b22 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-baseline/set.js @@ -0,0 +1,63 @@ +/** +* @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 isVerticalBaseline = require( '@stdlib/plot/vega/base/assert/is-vertical-baseline' ); +var join = require( '@stdlib/array/base/join' ); +var verticalBaselines = require( '@stdlib/plot/vega/base/vertical-baselines' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the vertical text baseline of the legend title. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid vertical baseline +* @returns {void} +*/ +function set( value ) { + if ( !isVerticalBaseline( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( verticalBaselines(), '", "' ), 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/legend/ctor/lib/title-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/get.js new file mode 100644 index 000000000000..8f89d3b966b6 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/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 color of the legend title. +* +* @private +* @returns {(string|void)} title color +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/properties.js new file mode 100644 index 000000000000..fe5af6292c88 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/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( 'titleColor' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/set.js new file mode 100644 index 000000000000..2c54a16471a1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-color/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the color of the legend title. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/get.js new file mode 100644 index 000000000000..2466873b2c58 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/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 font size of the legend title. +* +* @private +* @returns {(number|void)} title font size +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/properties.js new file mode 100644 index 000000000000..41ee04d5e760 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/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( 'titleFontSize' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/set.js new file mode 100644 index 000000000000..68396685de18 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-size/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font size of the legend title. +* +* ## 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/legend/ctor/lib/title-font-style/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/get.js new file mode 100644 index 000000000000..57c5babdfd7e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/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 font style of the legend title. +* +* @private +* @returns {(string|void)} title font style +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/properties.js new file mode 100644 index 000000000000..fe9f87091594 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/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( 'titleFontStyle' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/set.js new file mode 100644 index 000000000000..fb7d4a4fcfc1 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-style/set.js @@ -0,0 +1,68 @@ +/** +* @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 isFontStyle = require( '@stdlib/plot/vega/base/assert/is-font-style' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var fontStyles = require( '@stdlib/plot/vega/base/font-styles' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font style of the legend title. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid font style +* @returns {void} +*/ +function set( value ) { + if ( !isFontStyle( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( fontStyles(), '", "' ), 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/legend/ctor/lib/title-font-weight/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/get.js new file mode 100644 index 000000000000..a930d9599d9b --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/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 font weight of the legend title. +* +* @private +* @returns {(number|string|void)} title font weight +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/properties.js new file mode 100644 index 000000000000..5bdb3a783584 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/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( 'titleFontWeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/set.js new file mode 100644 index 000000000000..e2b90308ec90 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font-weight/set.js @@ -0,0 +1,72 @@ +/** +* @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 isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive; +var isFontWeight = require( '@stdlib/plot/vega/base/assert/is-font-weight' ); +var join = require( '@stdlib/array/base/join' ); +var fontWeights = require( '@stdlib/plot/vega/base/font-weights' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font weight of the legend title. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(number|string|void)} value - input value +* @throws {TypeError} must be a valid font weight +* @returns {void} +*/ +function set( value ) { + if ( isNonNegativeInteger( value ) ) { + value = String( value ); + } + if ( !isUndefined( value ) && !isFontWeight( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( fontWeights(), '", "' ), 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/legend/ctor/lib/title-font/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/get.js new file mode 100644 index 000000000000..f97c3a4b2c78 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/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 font name of the legend title. +* +* @private +* @returns {(string|void)} title font +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/properties.js new file mode 100644 index 000000000000..23d6baf4e7d5 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/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( 'titleFont' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/set.js new file mode 100644 index 000000000000..fd4a159e1cec --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-font/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 isString = require( '@stdlib/assert/is-string' ).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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the font name of the legend title. +* +* ## 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; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/get.js new file mode 100644 index 000000000000..9b5fbf8e5471 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/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 maximum allowed length (in pixels) of the legend title. +* +* @private +* @returns {(number|void)} title limit +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/properties.js new file mode 100644 index 000000000000..2200e9e451f0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/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( 'titleLimit' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/set.js new file mode 100644 index 000000000000..845c5300040f --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-limit/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the maximum allowed length (in pixels) of the legend title. +* +* ## 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/legend/ctor/lib/title-line-height/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/get.js new file mode 100644 index 000000000000..126d15e854e2 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/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 line height (in pixels) for multi-line title text. +* +* @private +* @returns {(number|void)} title line height +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/properties.js new file mode 100644 index 000000000000..1c7c5f76c5e9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/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( 'titleLineHeight' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/set.js new file mode 100644 index 000000000000..b2de5b2b299a --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-line-height/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the line height (in pixels) for multi-line title text. +* +* ## 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/legend/ctor/lib/title-opacity/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/get.js new file mode 100644 index 000000000000..c4e0936dcd4e --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/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 opacity of the legend title. +* +* @private +* @returns {(number|void)} title opacity +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/properties.js new file mode 100644 index 000000000000..5d0034c1db03 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/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( 'titleOpacity' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/set.js new file mode 100644 index 000000000000..7390988d5568 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-opacity/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the opacity of the legend title. +* +* ## 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/legend/ctor/lib/title-orient/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/get.js new file mode 100644 index 000000000000..b79c0ac16460 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/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 orientation of the legend title. +* +* @private +* @returns {string} title orient +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/properties.js new file mode 100644 index 000000000000..6e36b31bbf63 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/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( 'titleOrient' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/set.js new file mode 100644 index 000000000000..30b392c1ce0d --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-orient/set.js @@ -0,0 +1,63 @@ +/** +* @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 isTitleOrientation = require( '@stdlib/plot/vega/base/assert/is-title-orientation' ); +var join = require( '@stdlib/array/base/join' ); +var titleOrientations = require( '@stdlib/plot/vega/title/orientations' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the orientation of the legend title. +* +* @private +* @param {string} value - input value +* @throws {TypeError} must be a valid title orientation +* @returns {void} +*/ +function set( value ) { + if ( !isTitleOrientation( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( titleOrientations(), '", "' ), 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/legend/ctor/lib/title-padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/get.js new file mode 100644 index 000000000000..ab556c7216a3 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/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 padding (in pixels) between the legend title and entries. +* +* @private +* @returns {(number|void)} title padding +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/properties.js new file mode 100644 index 000000000000..51b0791150ee --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/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( 'titlePadding' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/set.js new file mode 100644 index 000000000000..30b746e45005 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-padding/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:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the padding (in pixels) between the legend title and entries. +* +* ## 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/legend/ctor/lib/title/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js new file mode 100644 index 000000000000..6fc09c76d481 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/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 legend title. +* +* @private +* @returns {(string|Array)} title +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/properties.js new file mode 100644 index 000000000000..f609392096a7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/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( 'title' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js new file mode 100644 index 000000000000..8a95a05b4fc4 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js @@ -0,0 +1,72 @@ +/** +* @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 isString = require( '@stdlib/assert/is-string' ).isPrimitive; +var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; +var isEmptyArrayLikeObject = require( '@stdlib/assert/is-empty-array-like-object' ); +var hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' ); +var copy = require( '@stdlib/array/base/copy' ); +var join = require( '@stdlib/array/base/join' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the legend title. +* +* @private +* @param {(string|Array)} value - input value +* @throws {TypeError} must be a string or an array of strings +* @returns {void} +*/ +function set( value ) { + var isStr = isString( value ); + if ( !isStr && !isStringArray( value ) && !isEmptyArrayLikeObject( value ) ) { // eslint-disable-line max-len + throw new TypeError( format( 'invalid assignment. `%s` must be a string or an array of strings. Value: `%s`.', prop.name, value ) ); + } + if ( isStr ) { + value = [ value ]; + } else { + value = copy( value ); + } + if ( !hasEqualValues( value, this[ prop.private ] ) ) { + debug( 'Current value: ["%s"]. New value: ["%s"].', join( this[ prop.private ], '", "' ), join( value, '", "' ) ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/get.js new file mode 100644 index 000000000000..6cdc9902750c --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/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 legend type. +* +* @private +* @returns {(string|void)} type +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/properties.js new file mode 100644 index 000000000000..d111b590ade9 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/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( 'type' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/set.js new file mode 100644 index 000000000000..cddc25cdd729 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/type/set.js @@ -0,0 +1,68 @@ +/** +* @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 isLegendType = require( '@stdlib/plot/vega/base/assert/is-legend-type' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var join = require( '@stdlib/array/base/join' ); +var legendTypes = require( '@stdlib/plot/vega/legend/types' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the legend type. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(string|void)} value - input value +* @throws {TypeError} must be a valid legend type +* @returns {void} +*/ +function set( value ) { + if ( !isLegendType( value ) && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be one of the following: "%s". Value: `%s`.', prop.name, join( legendTypes(), '", "' ), 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/legend/ctor/lib/values/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/get.js new file mode 100644 index 000000000000..361a64c837b0 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/get.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. +*/ + +/* eslint-disable no-invalid-this */ + +'use strict'; + +// MODULES // + +var copy = require( '@stdlib/array/base/copy-indexed' ); +var prop = require( './properties.js' ); + + +// MAIN // + +/** +* Returns the explicit set of legend values. +* +* @private +* @returns {(Array|void)} values +*/ +function get() { + if ( this[ prop.private ] ) { + return copy( this[ prop.private ] ); + } + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/properties.js new file mode 100644 index 000000000000..74264e626bb7 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/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( 'values' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/set.js new file mode 100644 index 000000000000..6ae458e2f912 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/values/set.js @@ -0,0 +1,73 @@ +/** +* @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 isArray = require( '@stdlib/assert/is-array' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var copy = require( '@stdlib/array/base/copy' ); +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the explicit set of legend values. +* +* ## Notes +* +* - Providing `undefined` "unsets" the configured value. +* +* @private +* @param {(Array|void)} value - input value +* @throws {TypeError} must be an array +* @returns {void} +*/ +function set( value ) { + if ( isUndefined( value ) ) { + if ( value !== this[ prop.private ] ) { + debug( 'Current value: %s. New value: %s.', JSON.stringify( this[ prop.private ] ), value ); + this[ prop.private ] = value; + this.emit( 'change', changeEvent( prop.name ) ); + } + return; + } + if ( !isArray( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be an array. Value: `%s`.', prop.name, value ) ); + } + debug( 'Current value: %s. New value: %s.', JSON.stringify( this[ prop.private ] ), JSON.stringify( value ) ); + this[ prop.private ] = copy( value ); + this.emit( 'change', changeEvent( prop.name ) ); +} + + +// EXPORTS // + +module.exports = set; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/get.js new file mode 100644 index 000000000000..1f73975ef906 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/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 integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups. +* +* @private +* @returns {number} zindex +*/ +function get() { + return this[ prop.private ]; +} + + +// EXPORTS // + +module.exports = get; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/properties.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/properties.js new file mode 100644 index 000000000000..8b9f93532185 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/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( 'zindex' ); + + +// EXPORTS // + +module.exports = obj; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/set.js new file mode 100644 index 000000000000..ba4995e5de45 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/zindex/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 isNumber = require( '@stdlib/assert/is-number' ).isPrimitive; +var format = require( '@stdlib/string/format' ); +var changeEvent = require( './../change_event.js' ); +var prop = require( './properties.js' ); + + +// VARIABLES // + +var debug = logger( 'vega:legend:set:'+prop.name ); + + +// MAIN // + +/** +* Sets the integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups. +* +* @private +* @param {number} value - input value +* @throws {TypeError} must be a number +* @returns {void} +*/ +function set( value ) { + if ( !isNumber( 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/legend/ctor/package.json b/lib/node_modules/@stdlib/plot/vega/legend/ctor/package.json new file mode 100644 index 000000000000..0bcc3e5f7790 --- /dev/null +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/package.json @@ -0,0 +1,60 @@ +{ + "name": "@stdlib/plot/vega/legend/ctor", + "version": "0.0.0", + "description": "Legend 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", + "legend", + "constructor", + "ctor" + ], + "__stdlib__": {} +} From 3ad25fd7daeade470726b1210a25d0be358cb53f Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Thu, 28 May 2026 03:43:10 +0530 Subject: [PATCH 2/8] fix: examples --- lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js index 77c377ca7423..3266b6004944 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/examples/index.js @@ -21,6 +21,7 @@ var Legend = require( './../lib' ); var legend = new Legend({ + 'fill': 'colorScale', 'orient': 'left' }); From 29bb59e537d32fe008a1ae5f3cbb1bd3ec618c23 Mon Sep 17 00:00:00 2001 From: orthodox-64 Date: Sat, 6 Jun 2026 14:02:42 +0530 Subject: [PATCH 3/8] chore: fix lint --- 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/legend/ctor/lib/main.js | 75 ++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js index ef86aa98ff9a..e3c6a2d1b370 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/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'; @@ -36,150 +36,223 @@ var transformErrorMessage = require( '@stdlib/plot/vega/base/transform-validatio 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 getARIA = require( './aria/get.js' ); var setARIA = require( './aria/set.js' ); + var getClipHeight = require( './clip-height/get.js' ); var setClipHeight = require( './clip-height/set.js' ); + var getColumnPadding = require( './column-padding/get.js' ); var setColumnPadding = require( './column-padding/set.js' ); + var getColumns = require( './columns/get.js' ); var setColumns = require( './columns/set.js' ); + var getCornerRadius = require( './corner-radius/get.js' ); var setCornerRadius = require( './corner-radius/set.js' ); + var getDescription = require( './description/get.js' ); var setDescription = require( './description/set.js' ); + var getDirection = require( './direction/get.js' ); var setDirection = require( './direction/set.js' ); + var getEncode = require( './encode/get.js' ); var setEncode = require( './encode/set.js' ); + var getFill = require( './fill/get.js' ); var setFill = require( './fill/set.js' ); + var getFillColor = require( './fill-color/get.js' ); var setFillColor = require( './fill-color/set.js' ); + var getFormat = require( './format/get.js' ); var setFormat = require( './format/set.js' ); + var getFormatType = require( './format-type/get.js' ); var setFormatType = require( './format-type/set.js' ); + var getGradientLength = require( './gradient-length/get.js' ); var setGradientLength = require( './gradient-length/set.js' ); + var getGradientOpacity = require( './gradient-opacity/get.js' ); var setGradientOpacity = require( './gradient-opacity/set.js' ); + var getGradientStrokeColor = require( './gradient-stroke-color/get.js' ); var setGradientStrokeColor = require( './gradient-stroke-color/set.js' ); + var getGradientStrokeWidth = require( './gradient-stroke-width/get.js' ); var setGradientStrokeWidth = require( './gradient-stroke-width/set.js' ); + var getGradientThickness = require( './gradient-thickness/get.js' ); var setGradientThickness = require( './gradient-thickness/set.js' ); + var getGridAlign = require( './grid-align/get.js' ); var setGridAlign = require( './grid-align/set.js' ); + var getLabelAlign = require( './label-align/get.js' ); var setLabelAlign = require( './label-align/set.js' ); + var getLabelBaseline = require( './label-baseline/get.js' ); var setLabelBaseline = require( './label-baseline/set.js' ); + var getLabelColor = require( './label-color/get.js' ); var setLabelColor = require( './label-color/set.js' ); + var getLabelFont = require( './label-font/get.js' ); var setLabelFont = require( './label-font/set.js' ); + var getLabelFontSize = require( './label-font-size/get.js' ); var setLabelFontSize = require( './label-font-size/set.js' ); + var getLabelFontStyle = require( './label-font-style/get.js' ); var setLabelFontStyle = require( './label-font-style/set.js' ); + var getLabelFontWeight = require( './label-font-weight/get.js' ); var setLabelFontWeight = require( './label-font-weight/set.js' ); + var getLabelLimit = require( './label-limit/get.js' ); var setLabelLimit = require( './label-limit/set.js' ); + var getLabelOffset = require( './label-offset/get.js' ); var setLabelOffset = require( './label-offset/set.js' ); + var getLabelOpacity = require( './label-opacity/get.js' ); var setLabelOpacity = require( './label-opacity/set.js' ); + var getLabelOverlap = require( './label-overlap/get.js' ); var setLabelOverlap = require( './label-overlap/set.js' ); + var getLabelSeparation = require( './label-separation/get.js' ); var setLabelSeparation = require( './label-separation/set.js' ); + var getLegendX = require( './legend-x/get.js' ); var setLegendX = require( './legend-x/set.js' ); + var getLegendY = require( './legend-y/get.js' ); var setLegendY = require( './legend-y/set.js' ); + var getOffset = require( './offset/get.js' ); var setOffset = require( './offset/set.js' ); + var getOpacity = require( './opacity/get.js' ); var setOpacity = require( './opacity/set.js' ); + var getOrient = require( './orient/get.js' ); var setOrient = require( './orient/set.js' ); + var getPadding = require( './padding/get.js' ); var setPadding = require( './padding/set.js' ); + var getProperties = require( './properties/get.js' ); + var getRowPadding = require( './row-padding/get.js' ); var setRowPadding = require( './row-padding/set.js' ); + var getShape = require( './shape/get.js' ); var setShape = require( './shape/set.js' ); + var getSize = require( './size/get.js' ); var setSize = require( './size/set.js' ); + var getStroke = require( './stroke/get.js' ); var setStroke = require( './stroke/set.js' ); + var getStrokeColor = require( './stroke-color/get.js' ); var setStrokeColor = require( './stroke-color/set.js' ); + var getStrokeDash = require( './stroke-dash/get.js' ); var setStrokeDash = require( './stroke-dash/set.js' ); + var getStrokeWidth = require( './stroke-width/get.js' ); var setStrokeWidth = require( './stroke-width/set.js' ); + var getSymbolDash = require( './symbol-dash/get.js' ); var setSymbolDash = require( './symbol-dash/set.js' ); + var getSymbolDashOffset = require( './symbol-dash-offset/get.js' ); var setSymbolDashOffset = require( './symbol-dash-offset/set.js' ); + var getSymbolFillColor = require( './symbol-fill-color/get.js' ); var setSymbolFillColor = require( './symbol-fill-color/set.js' ); + var getSymbolLimit = require( './symbol-limit/get.js' ); var setSymbolLimit = require( './symbol-limit/set.js' ); + var getSymbolOffset = require( './symbol-offset/get.js' ); var setSymbolOffset = require( './symbol-offset/set.js' ); + var getSymbolOpacity = require( './symbol-opacity/get.js' ); var setSymbolOpacity = require( './symbol-opacity/set.js' ); + var getSymbolSize = require( './symbol-size/get.js' ); var setSymbolSize = require( './symbol-size/set.js' ); + var getSymbolStrokeColor = require( './symbol-stroke-color/get.js' ); var setSymbolStrokeColor = require( './symbol-stroke-color/set.js' ); + var getSymbolStrokeWidth = require( './symbol-stroke-width/get.js' ); var setSymbolStrokeWidth = require( './symbol-stroke-width/set.js' ); + var getSymbolType = require( './symbol-type/get.js' ); var setSymbolType = require( './symbol-type/set.js' ); + var getTickCount = require( './tick-count/get.js' ); var setTickCount = require( './tick-count/set.js' ); + var getTickMinStep = require( './tick-min-step/get.js' ); var setTickMinStep = require( './tick-min-step/set.js' ); + var getTitle = require( './title/get.js' ); var setTitle = require( './title/set.js' ); + var getTitleAlign = require( './title-align/get.js' ); var setTitleAlign = require( './title-align/set.js' ); + var getTitleAnchor = require( './title-anchor/get.js' ); var setTitleAnchor = require( './title-anchor/set.js' ); + var getTitleBaseline = require( './title-baseline/get.js' ); var setTitleBaseline = require( './title-baseline/set.js' ); + var getTitleColor = require( './title-color/get.js' ); var setTitleColor = require( './title-color/set.js' ); + var getTitleFont = require( './title-font/get.js' ); var setTitleFont = require( './title-font/set.js' ); + var getTitleFontSize = require( './title-font-size/get.js' ); var setTitleFontSize = require( './title-font-size/set.js' ); + var getTitleFontStyle = require( './title-font-style/get.js' ); var setTitleFontStyle = require( './title-font-style/set.js' ); + var getTitleFontWeight = require( './title-font-weight/get.js' ); var setTitleFontWeight = require( './title-font-weight/set.js' ); + var getTitleLimit = require( './title-limit/get.js' ); var setTitleLimit = require( './title-limit/set.js' ); + var getTitleLineHeight = require( './title-line-height/get.js' ); var setTitleLineHeight = require( './title-line-height/set.js' ); + var getTitleOpacity = require( './title-opacity/get.js' ); var setTitleOpacity = require( './title-opacity/set.js' ); + var getTitleOrient = require( './title-orient/get.js' ); var setTitleOrient = require( './title-orient/set.js' ); + var getTitlePadding = require( './title-padding/get.js' ); var setTitlePadding = require( './title-padding/set.js' ); + var getType = require( './type/get.js' ); var setType = require( './type/set.js' ); + var getValues = require( './values/get.js' ); var setValues = require( './values/set.js' ); + var getZIndex = require( './zindex/get.js' ); var setZIndex = require( './zindex/set.js' ); From f2ab2220c97ea38503f32c9b7a79efba8405ffd3 Mon Sep 17 00:00:00 2001 From: gururaj1512 Date: Fri, 26 Jun 2026 14:44:06 +0530 Subject: [PATCH 4/8] chore: cleanup and fix bugs --- 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 --- --- .../plot/vega/legend/ctor/lib/defaults.js | 10 ++- .../vega/legend/ctor/lib/format-type/get.js | 2 +- .../vega/legend/ctor/lib/format-type/set.js | 2 +- .../plot/vega/legend/ctor/lib/format/get.js | 5 +- .../plot/vega/legend/ctor/lib/format/set.js | 16 +++-- .../legend/ctor/lib/gradient-length/get.js | 2 +- .../legend/ctor/lib/gradient-length/set.js | 2 +- .../ctor/lib/gradient-stroke-color/get.js | 2 +- .../ctor/lib/gradient-stroke-color/set.js | 2 +- .../ctor/lib/gradient-stroke-width/get.js | 2 +- .../ctor/lib/gradient-stroke-width/set.js | 2 +- .../legend/ctor/lib/gradient-thickness/get.js | 2 +- .../legend/ctor/lib/gradient-thickness/set.js | 2 +- .../legend/ctor/lib/label-separation/get.js | 2 +- .../@stdlib/plot/vega/legend/ctor/lib/main.js | 61 ++++++++----------- .../plot/vega/legend/ctor/lib/offset/get.js | 2 +- .../plot/vega/legend/ctor/lib/offset/set.js | 2 +- .../plot/vega/legend/ctor/lib/padding/get.js | 2 +- .../plot/vega/legend/ctor/lib/padding/set.js | 2 +- .../vega/legend/ctor/lib/row-padding/get.js | 2 +- .../vega/legend/ctor/lib/row-padding/set.js | 2 +- .../vega/legend/ctor/lib/stroke-color/get.js | 2 +- .../vega/legend/ctor/lib/stroke-color/set.js | 2 +- .../vega/legend/ctor/lib/stroke-width/get.js | 4 +- .../legend/ctor/lib/symbol-dash-offset/get.js | 2 +- .../legend/ctor/lib/symbol-dash-offset/set.js | 2 +- .../vega/legend/ctor/lib/symbol-dash/get.js | 7 +-- .../vega/legend/ctor/lib/symbol-dash/set.js | 19 +----- .../vega/legend/ctor/lib/title-anchor/get.js | 2 +- .../vega/legend/ctor/lib/title-anchor/set.js | 5 -- .../plot/vega/legend/ctor/lib/title/get.js | 5 +- .../plot/vega/legend/ctor/lib/title/set.js | 10 +-- 32 files changed, 84 insertions(+), 102 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js index 4e5459072fe0..9a27da8a6f60 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/defaults.js @@ -24,19 +24,20 @@ * Returns defaults. * * @private +* @param {string} direction - legend direction * @returns {Object} default options * * @example -* var o = defaults(); +* var o = defaults( 'vertical' ); * // returns {...} */ -function defaults() { +function defaults( direction ) { return { // Boolean indicating whether to include ARIA attributes in SVG output: 'aria': true, // Number of columns in which to arrange symbol legend entries: - 'columns': 1, + 'columns': ( direction === 'horizontal' ) ? 0 : 1, // Direction of the legend: 'direction': 'vertical', @@ -56,6 +57,9 @@ function defaults() { // Legend orientation: 'orient': 'right', + // Stroke dash for legend symbols: + 'symbolDash': [], + // Legend title: 'title': [ '' ], diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js index e86440f194fb..c40897ced29b 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the format type. +* Returns the format to use for legend scales which do not have a strict domain data type. * * @private * @returns {(string|void)} format type diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js index 94a393c1d4cc..b81df86b6ef4 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format-type/set.js @@ -40,7 +40,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the format type. +* Sets the format to use for legend scales which do not have a strict domain data type. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js index f2eb86cf0d86..240e728b583e 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/get.js @@ -22,6 +22,8 @@ // MODULES // +var isObject = require( '@stdlib/assert/is-object' ); +var objectAssignIn = require( '@stdlib/object/assign-in' ); var prop = require( './properties.js' ); @@ -34,7 +36,8 @@ var prop = require( './properties.js' ); * @returns {(string|Object|void)} format */ function get() { - return this[ prop.private ]; + var v = this[ prop.private ]; + return ( isObject( v ) ) ? objectAssignIn( {}, v ) : v; } diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js index 3965547fb92a..a65e1497afd8 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/format/set.js @@ -26,6 +26,7 @@ var logger = require( 'debug' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var isObject = require( '@stdlib/assert/is-object' ); var isUndefined = require( '@stdlib/assert/is-undefined' ); +var objectAssignIn = require( '@stdlib/object/assign-in' ); var format = require( '@stdlib/string/format' ); var changeEvent = require( './../change_event.js' ); var prop = require( './properties.js' ); @@ -51,12 +52,19 @@ var debug = logger( 'vega:legend:set:'+prop.name ); * @returns {void} */ function set( value ) { - if ( !isString( value ) && !isObject( value ) && !isUndefined( value ) ) { - throw new TypeError( format( 'invalid assignment. `%s` must be a string or object. Value: `%s`.', prop.name, value ) ); + var isObj = isObject( value ); + + // FIXME: validate that an object is a valid TimeMultiFormat object + + if ( !isString( value ) && !isObj && !isUndefined( value ) ) { + throw new TypeError( format( 'invalid assignment. `%s` must be a string or a valid format object. Value: `%s`.', prop.name, value ) ); } + + // TODO: consider a deep equality check for format objects in order to avoid false positive change events + if ( value !== this[ prop.private ] ) { - debug( 'Current value: %s. New value: %s.', this[ prop.private ], value ); - this[ prop.private ] = value; + debug( 'Current value: %s. New value: %s.', JSON.stringify( this[ prop.private ] ), JSON.stringify( value ) ); + this[ prop.private ] = ( isObj ) ? objectAssignIn( {}, value ) : value; this.emit( 'change', changeEvent( prop.name ) ); } } diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js index 5de4315a7c09..a3923134821f 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the length (in pixels) of the color ramp in a gradient legend. +* Returns the length (in pixels) of the primary axis of a color gradient. * * @private * @returns {(number|void)} gradient length diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js index e15269aa33aa..eaafada8d04b 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-length/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the length (in pixels) of the color ramp in a gradient legend. +* Sets the length (in pixels) of the primary axis of a color gradient. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js index 55becda8e345..36504428aa3a 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the stroke color of the color ramp border. +* Returns the stroke color of the color gradient border. * * @private * @returns {(string|void)} gradient stroke color diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js index 9313df02c4eb..1ad803659e23 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-color/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the stroke color of the color ramp border. +* Sets the stroke color of the color gradient border. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js index 382c19b21e1a..98064efce384 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the stroke width of the color ramp border. +* Returns the stroke width of the color gradient border. * * @private * @returns {(number|void)} gradient stroke width diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js index 70f5dbced00d..e14c8b86852c 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-stroke-width/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the stroke width of the color ramp border. +* Sets the stroke width of the color gradient border. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js index c8678a0536d8..348942c7983c 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the thickness (in pixels) of the color ramp in a gradient legend. +* Returns the thickness (in pixels) of the color gradient. * * @private * @returns {(number|void)} gradient thickness diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js index 479b3a990e43..286f1aa91d10 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/gradient-thickness/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the thickness (in pixels) of the color ramp in a gradient legend. +* Sets the thickness (in pixels) of the color gradient. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js index 1e72a04206a9..e406d1c6b087 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/label-separation/get.js @@ -31,7 +31,7 @@ var prop = require( './properties.js' ); * Returns the minimum separation between legend label bounding boxes. * * @private -* @returns {(number)} label separation +* @returns {NonNegativeNumber} label separation */ function get() { return this[ prop.private ]; diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js index e3c6a2d1b370..119881dd9c3c 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js @@ -280,12 +280,12 @@ var debug = logger( 'vega:legend:main' ); * @param {string} [options.fill] - name of the scale that maps to a fill color * @param {string} [options.fillColor] - background fill color for the full legend * @param {(string|Object)} [options.format] - format specifier for legend labels -* @param {string} [options.formatType] - format type -* @param {number} [options.gradientLength] - length (in pixels) of the color ramp in a gradient legend +* @param {string} [options.formatType] - type of format to use for legend scales which do not have a strict domain data type +* @param {number} [options.gradientLength] - length (in pixels) of the primary axis of a color gradient. * @param {number} [options.gradientOpacity] - opacity of the color gradient -* @param {string} [options.gradientStrokeColor] - stroke color of the color ramp border -* @param {number} [options.gradientStrokeWidth] - stroke width of the color ramp border -* @param {number} [options.gradientThickness] - thickness (in pixels) of the color ramp +* @param {string} [options.gradientStrokeColor] - stroke color of the color gradient border +* @param {number} [options.gradientStrokeWidth] - stroke width of the color gradient border +* @param {number} [options.gradientThickness] - thickness (in pixels) of the color gradient * @param {string} [options.gridAlign='each'] - grid alignment for legend entries * @param {string} [options.labelAlign] - horizontal text alignment of legend labels * @param {string} [options.labelBaseline='alphabetic'] - vertical text baseline of legend labels @@ -301,19 +301,19 @@ var debug = logger( 'vega:legend:main' ); * @param {number} [options.labelSeparation=0] - minimum separation between legend label bounding boxes * @param {number} [options.legendX] - custom x position for the legend group * @param {number} [options.legendY] - custom y position for the legend group -* @param {number} [options.offset] - offset (in pixels) of the legend from the chart body +* @param {number} [options.offset] - offset (in pixels) by which to displace the legend from the data rectangle and axes * @param {string} [options.opacity] - name of the scale that maps to an opacity value * @param {string} [options.orient='right'] - legend orientation -* @param {number} [options.padding] - padding (in pixels) between legend border and entries -* @param {number} [options.rowPadding] - vertical padding (in pixels) between legend rows +* @param {number} [options.padding] - padding (in pixels) between legend border and content of the legend group +* @param {number} [options.rowPadding] - vertical padding (in pixels) between legend symbol legend entries * @param {string} [options.shape] - name of the scale that maps to a shape value * @param {string} [options.size] - name of the scale that maps to a size value * @param {string} [options.stroke] - name of the scale that maps to a stroke color -* @param {string} [options.strokeColor] - border stroke color for the full legend +* @param {string} [options.strokeColor] - name of the scale that maps to a stroke color * @param {string} [options.strokeDash] - name of the scale that maps to a stroke dash value * @param {string} [options.strokeWidth] - name of the scale that maps to a stroke width value -* @param {NumericArray} [options.symbolDash] - stroke dash for legend symbols -* @param {number} [options.symbolDashOffset] - pixel offset at which to start the symbol stroke dash +* @param {NumericArray} [options.symbolDash=[]] - stroke dash for legend symbols +* @param {number} [options.symbolDashOffset] - pixel offset at which to start the symbol stroke dash array * @param {string} [options.symbolFillColor] - fill color of legend symbols * @param {number} [options.symbolLimit] - maximum number of entries for a symbol legend * @param {number} [options.symbolOffset] - horizontal pixel offset for legend symbols @@ -366,7 +366,7 @@ function Legend( options ) { throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); } // Resolve the default configuration: - opts = defaults(); + opts = defaults( options.direction || 'vertical' ); // Set internal properties according to the default configuration... keys = objectKeys( opts ); @@ -374,17 +374,6 @@ function Legend( options ) { k = keys[ i ]; this[ '_'+k ] = opts[ k ]; } - // Check for required properties (at least one scale reference must be provided)... - if ( - !hasProp( options, 'fill' ) && - !hasProp( options, 'opacity' ) && - !hasProp( options, 'shape' ) && - !hasProp( options, 'size' ) && - !hasProp( options, 'stroke' ) && - !hasProp( options, 'strokeDash' ) - ) { - throw new TypeError( 'invalid argument. Options argument must specify at least one legend scale property (e.g., fill, opacity, shape, size, stroke, or strokeDash).' ); - } // Validate provided options by attempting to assign option values to corresponding fields... for ( i = 0; i < properties.length; i++ ) { k = properties[ i ]; @@ -645,7 +634,7 @@ setReadWriteAccessor( Legend.prototype, 'format', getFormat, setFormat ); setReadWriteAccessor( Legend.prototype, 'formatType', getFormatType, setFormatType ); /** -* Length (in pixels) of the color ramp in a gradient legend. +* Length (in pixels) of the primary axis of a color gradient. * * @name gradientLength * @memberof Legend.prototype @@ -681,7 +670,7 @@ setReadWriteAccessor( Legend.prototype, 'gradientLength', getGradientLength, set setReadWriteAccessor( Legend.prototype, 'gradientOpacity', getGradientOpacity, setGradientOpacity ); /** -* Stroke color of the color ramp border. +* Stroke color of the color gradient border. * * @name gradientStrokeColor * @memberof Legend.prototype @@ -699,7 +688,7 @@ setReadWriteAccessor( Legend.prototype, 'gradientOpacity', getGradientOpacity, s setReadWriteAccessor( Legend.prototype, 'gradientStrokeColor', getGradientStrokeColor, setGradientStrokeColor ); /** -* Stroke width of the color ramp border. +* Stroke width of the color gradient border. * * @name gradientStrokeWidth * @memberof Legend.prototype @@ -717,7 +706,7 @@ setReadWriteAccessor( Legend.prototype, 'gradientStrokeColor', getGradientStroke setReadWriteAccessor( Legend.prototype, 'gradientStrokeWidth', getGradientStrokeWidth, setGradientStrokeWidth ); /** -* Thickness (in pixels) of the color ramp in a gradient legend. +* Thickness (in pixels) of the color gradient. * * @name gradientThickness * @memberof Legend.prototype @@ -1009,7 +998,7 @@ setReadWriteAccessor( Legend.prototype, 'legendX', getLegendX, setLegendX ); setReadWriteAccessor( Legend.prototype, 'legendY', getLegendY, setLegendY ); /** -* Offset (in pixels) of the legend from the chart body. +* Offset (in pixels) by which to displace the legend from the data rectangle and axes. * * @name offset * @memberof Legend.prototype @@ -1063,7 +1052,7 @@ setReadWriteAccessor( Legend.prototype, 'opacity', getOpacity, setOpacity ); setReadWriteAccessor( Legend.prototype, 'orient', getOrient, setOrient ); /** -* Padding (in pixels) between legend border and entries. +* Padding (in pixels) between legend border and content of the legend group. * * @name padding * @memberof Legend.prototype @@ -1098,7 +1087,7 @@ setReadWriteAccessor( Legend.prototype, 'padding', getPadding, setPadding ); setNonEnumerableReadOnlyAccessor( Legend.prototype, 'properties', getProperties ); /** -* Vertical padding (in pixels) between legend rows. +* Vertical padding (in pixels) between symbol legend entries. * * @name rowPadding * @memberof Legend.prototype @@ -1167,7 +1156,7 @@ setReadWriteAccessor( Legend.prototype, 'size', getSize, setSize ); setReadWriteAccessor( Legend.prototype, 'stroke', getStroke, setStroke ); /** -* Border stroke color for the full legend. +* Name of the scale that maps to a stroke color. * * @name strokeColor * @memberof Legend.prototype @@ -1224,7 +1213,8 @@ setReadWriteAccessor( Legend.prototype, 'strokeWidth', getStrokeWidth, setStroke * * @name symbolDash * @memberof Legend.prototype -* @type {(NumericArray|void)} +* @type {NumericArray} +* @default [] * * @example * var legend = new Legend({ @@ -1238,7 +1228,7 @@ setReadWriteAccessor( Legend.prototype, 'strokeWidth', getStrokeWidth, setStroke setReadWriteAccessor( Legend.prototype, 'symbolDash', getSymbolDash, setSymbolDash ); /** -* Pixel offset at which to start the symbol stroke dash. +* Pixel offset at which to start the symbol stroke dash array. * * @name symbolDashOffset * @memberof Legend.prototype @@ -1441,6 +1431,7 @@ setReadWriteAccessor( Legend.prototype, 'tickMinStep', getTickMinStep, setTickMi * @name title * @memberof Legend.prototype * @type {Array} +* @default '' * * @example * var legend = new Legend({ @@ -1718,11 +1709,11 @@ setReadWriteAccessor( Legend.prototype, 'type', getType, setType ); * @example * var legend = new Legend({ * 'fill': 'colorScale', -* 'values': [1, 2, 3] +* 'values': [ 1, 2, 3 ] * }); * * var v = legend.values; -* // returns [1, 2, 3] +* // returns [ 1, 2, 3 ] */ setReadWriteAccessor( Legend.prototype, 'values', getValues, setValues ); diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js index 490d867f045d..aaf1ff18db23 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the offset (in pixels) of the legend from the chart body. +* Returns the offset (in pixels) by which to displace the legend from the data rectangle and axes. * * @private * @returns {(number|void)} offset diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js index fbcca60c5342..64cd6cca6ab6 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/offset/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the offset (in pixels) of the legend from the chart body. +* Sets the offset (in pixels) by which to displace the legend from the data rectangle and axes. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js index e864f3b2fc08..90ba6d3a9d4b 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the padding (in pixels) between legend border and entries. +* Returns the padding (in pixels) between legend border and content of the legend group. * * @private * @returns {(number|void)} padding diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js index 811e8dd990cf..888fffd3134d 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/padding/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the padding (in pixels) between legend border and entries. +* Sets the padding (in pixels) between legend border and content of the legend group. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js index 8edefafc2313..a7f688c540d7 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the vertical padding (in pixels) between legend rows. +* Returns the vertical padding (in pixels) between symbol legend entries. * * @private * @returns {(number|void)} row padding diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js index 0ffe8c2cd059..14b8359754c8 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/row-padding/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the vertical padding (in pixels) between legend rows. +* Sets the vertical padding (in pixels) between symbol legend entries. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js index f8aca63b2c1d..61ffa477cc53 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the border stroke color for the full legend. +* Returns the name of the scale that maps to a stroke color. * * @private * @returns {(string|void)} stroke color diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js index 95bd57c93b3a..fb854f34a11a 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-color/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the border stroke color for the full legend. +* Sets the name of the scale that maps to a stroke color. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js index ed4c5f6e6e11..c5da1c9d33fe 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/stroke-width/get.js @@ -22,13 +22,13 @@ // MODULES // -var prop = require('./properties.js'); +var prop = require( './properties.js' ); // MAIN // /** - * Returns the name of a scale that maps to a stroke width value. +* Returns the name of a scale that maps to a stroke width value. * * @private * @returns {(string|void)} stroke width diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js index ba29e4c54386..fee3620e4145 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/get.js @@ -28,7 +28,7 @@ var prop = require( './properties.js' ); // MAIN // /** -* Returns the pixel offset at which to start the symbol stroke dash. +* Returns the pixel offset at which to start the symbol stroke dash array. * * @private * @returns {(number|void)} symbol dash offset diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js index 245d02ccef7b..4039b41461c7 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash-offset/set.js @@ -38,7 +38,7 @@ var debug = logger( 'vega:legend:set:'+prop.name ); // MAIN // /** -* Sets the pixel offset at which to start the symbol stroke dash. +* Sets the pixel offset at which to start the symbol stroke dash array. * * ## Notes * diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js index d338854baa27..6ea971c60af9 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/get.js @@ -32,13 +32,10 @@ var prop = require( './properties.js' ); * Returns the stroke dash for legend symbols. * * @private -* @returns {(Array|void)} symbol dash +* @returns {NumericArray} symbol dash */ function get() { - if ( this[ prop.private ] ) { - return copy( this[ prop.private ] ); - } - return this[ prop.private ]; + return copy( this[ prop.private ] ); } diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js index 7dc07c1035dd..66cb8d66bd51 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/symbol-dash/set.js @@ -25,7 +25,6 @@ var logger = require( 'debug' ); var isNumericArray = require( '@stdlib/assert/is-numeric-array' ); var isEmptyCollection = require( '@stdlib/assert/is-empty-collection' ); -var isUndefined = require( '@stdlib/assert/is-undefined' ); var hasSameValues = require( '@stdlib/array/base/assert/has-same-values' ); var copy = require( '@stdlib/array/base/copy' ); var join = require( '@stdlib/array/base/join' ); @@ -44,29 +43,17 @@ var debug = logger( 'vega:legend:set:'+prop.name ); /** * Sets the stroke dash for legend symbols. * -* ## Notes -* -* - Providing `undefined` "unsets" the configured value. -* * @private -* @param {(NumericArray|void)} value - input value +* @param {NumericArray} value - input value * @throws {TypeError} must be a numeric array * @returns {void} */ function set( value ) { - if ( isUndefined( 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 ) ); - } - return; - } if ( !isNumericArray( value ) && !isEmptyCollection( value ) ) { throw new TypeError( format( 'invalid assignment. `%s` must be a numeric array. Value: `%s`.', prop.name, value ) ); } - if ( !this[ prop.private ] || !hasSameValues( value, this[ prop.private ] ) ) { - debug( 'Current value: [%s]. New value: [%s].', this[ prop.private ] ? join( this[ prop.private ], ', ' ) : '', join( value, ', ' ) ); + if ( !hasSameValues( value, this[ prop.private ] ) ) { + debug( 'Current value: [%s]. New value: [%s].', join( this[ prop.private ], ', ' ), join( value, ', ' ) ); this[ prop.private ] = copy( value ); this.emit( 'change', changeEvent( prop.name ) ); } diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js index 15cdc89cee2e..7976f85965a8 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/get.js @@ -22,7 +22,7 @@ // MODULES // -var prop = require('./properties.js'); +var prop = require( './properties.js' ); // MAIN // diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js index 3d7a07b20ad5..16ffd0a521bf 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title-anchor/set.js @@ -25,7 +25,6 @@ var logger = require( 'debug' ); var isAnchorPosition = require( '@stdlib/plot/vega/base/assert/is-anchor-position' ); var isNull = require( '@stdlib/assert/is-null' ); -var isUndefined = require( '@stdlib/assert/is-undefined' ); var join = require( '@stdlib/array/base/join' ); var anchorPositions = require( '@stdlib/plot/vega/base/anchor-positions' ); var format = require( '@stdlib/string/format' ); @@ -43,10 +42,6 @@ var debug = logger( 'vega:legend:set:'+prop.name ); /** * Sets the legend title anchor position. * -* ## Notes -* -* - Providing `null` resets to the default (null) value. -* * @private * @param {(string|null)} value - input value * @throws {TypeError} must be a valid anchor position or null diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js index 6fc09c76d481..08acdbb33c56 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/get.js @@ -22,6 +22,7 @@ // MODULES // +var copy = require( '@stdlib/array/base/copy-indexed' ); var prop = require( './properties.js' ); @@ -31,10 +32,10 @@ var prop = require( './properties.js' ); * Returns the legend title. * * @private -* @returns {(string|Array)} title +* @returns {Array} title */ function get() { - return this[ prop.private ]; + return copy( this[ prop.private ] ); } diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js index 8a95a05b4fc4..71b0df2101ba 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/title/set.js @@ -25,10 +25,8 @@ var logger = require( 'debug' ); var isString = require( '@stdlib/assert/is-string' ).isPrimitive; var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives; -var isEmptyArrayLikeObject = require( '@stdlib/assert/is-empty-array-like-object' ); var hasEqualValues = require( '@stdlib/array/base/assert/has-equal-values' ); var copy = require( '@stdlib/array/base/copy' ); -var join = require( '@stdlib/array/base/join' ); var format = require( '@stdlib/string/format' ); var changeEvent = require( './../change_event.js' ); var prop = require( './properties.js' ); @@ -51,17 +49,15 @@ var debug = logger( 'vega:legend:set:'+prop.name ); */ function set( value ) { var isStr = isString( value ); - if ( !isStr && !isStringArray( value ) && !isEmptyArrayLikeObject( value ) ) { // eslint-disable-line max-len + if ( !isStr && !isStringArray( value ) ) { throw new TypeError( format( 'invalid assignment. `%s` must be a string or an array of strings. Value: `%s`.', prop.name, value ) ); } if ( isStr ) { value = [ value ]; - } else { - value = copy( value ); } if ( !hasEqualValues( value, this[ prop.private ] ) ) { - debug( 'Current value: ["%s"]. New value: ["%s"].', join( this[ prop.private ], '", "' ), join( value, '", "' ) ); - this[ prop.private ] = value; + debug( 'Current value: %s. New value: %s.', JSON.stringify( this[ prop.private ] ), JSON.stringify( value ) ); + this[ prop.private ] = copy( value ); this.emit( 'change', changeEvent( prop.name ) ); } } From 402a3ac44506cb888929f2d5ea3ebfd6d42efce6 Mon Sep 17 00:00:00 2001 From: Sachinn-64 Date: Sun, 5 Jul 2026 14:42:30 +0530 Subject: [PATCH 5/8] refactor: add required properties --- 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/legend/ctor/lib/main.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js index 119881dd9c3c..7cccf28b8cbe 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js @@ -365,6 +365,17 @@ function Legend( options ) { if ( !isObject( options ) ) { throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); } + // Check for required properties (at least one scale reference must be provided)... + if ( + !hasProp( options, 'fill' ) && + !hasProp( options, 'opacity' ) && + !hasProp( options, 'shape' ) && + !hasProp( options, 'size' ) && + !hasProp( options, 'stroke' ) && + !hasProp( options, 'strokeDash' ) + ) { + throw new TypeError( 'invalid argument. Options argument must specify at least one legend scale property (e.g., fill, opacity, shape, size, stroke, or strokeDash).' ); + } // Resolve the default configuration: opts = defaults( options.direction || 'vertical' ); From 091f08a426c61afd1fba137e1161536b5c82d171 Mon Sep 17 00:00:00 2001 From: gururaj1512 Date: Sat, 25 Jul 2026 22:21:28 +0530 Subject: [PATCH 6/8] refactor: proper required properties handling --- 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: 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/legend/ctor/lib/main.js | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js index 7cccf28b8cbe..081984e98079 100644 --- a/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js +++ b/lib/node_modules/@stdlib/plot/vega/legend/ctor/lib/main.js @@ -260,6 +260,14 @@ var setZIndex = require( './zindex/set.js' ); // VARIABLES // var debug = logger( 'vega:legend:main' ); +var PROPS = [ + 'fill', + 'opacity', + 'shape', + 'size', + 'stroke', + 'strokeDash' +]; // MAIN // @@ -355,6 +363,7 @@ var debug = logger( 'vega:legend:main' ); function Legend( options ) { var opts; var keys; + var flg; var v; var k; var i; @@ -365,15 +374,15 @@ function Legend( options ) { if ( !isObject( options ) ) { throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); } + // Check for required properties (at least one scale reference must be provided)... - if ( - !hasProp( options, 'fill' ) && - !hasProp( options, 'opacity' ) && - !hasProp( options, 'shape' ) && - !hasProp( options, 'size' ) && - !hasProp( options, 'stroke' ) && - !hasProp( options, 'strokeDash' ) - ) { + for ( i = 0; i < PROPS.length; i++ ) { + if ( hasProp( options, PROPS[ i ] ) ) { + flg = true; + break; + } + } + if ( !flg ) { throw new TypeError( 'invalid argument. Options argument must specify at least one legend scale property (e.g., fill, opacity, shape, size, stroke, or strokeDash).' ); } // Resolve the default configuration: From 5ad1e88aa32d0479906fde7b64bcc802fc8f408c Mon Sep 17 00:00:00 2001 From: gururaj1512 Date: Sat, 25 Jul 2026 22:34:37 +0530 Subject: [PATCH 7/8] Revert "Merge remote-tracking branch 'upstream/develop' into vega-legend-ctor" This reverts commit 3e6a65678907055d2e2f880666ae54589b86407c, reversing changes made to 78896bac2e7dd5b7753281394f1c64c575f8d16a. --- ...7c322891b1c0b758e6aef323b2f22a3bab1500.txt | 10 - .../package-json/validate/examples/index.js | 3 +- .../repl-txt/parse/lib/extract_signature.js | 18 +- .../@stdlib/blas/base/wasm/dasum/README.md | 2 +- .../blas/base/wasm/scnrm2/package.json | 2 +- .../@stdlib/blas/base/wasm/zcopy/lib/main.js | 4 +- .../blas/base/wasm/zcopy/lib/routine.js | 8 +- .../@stdlib/blas/base/wasm/zdrot/lib/index.js | 8 +- .../@stdlib/blas/base/wasm/zdrot/lib/main.js | 8 +- .../blas/base/wasm/zdrot/lib/routine.js | 16 +- .../blas/base/wasm/zscal/lib/module.js | 4 +- .../blas/base/wasm/zscal/lib/routine.js | 4 +- .../ndarray/dfirst-index-less-than/README.md | 128 -------- .../benchmark/benchmark.js | 105 ------- .../dfirst-index-less-than/docs/repl.txt | 33 -- .../docs/types/index.d.ts | 54 ---- .../dfirst-index-less-than/docs/types/test.ts | 63 ---- .../dfirst-index-less-than/examples/index.js | 35 --- .../dfirst-index-less-than/lib/index.js | 44 --- .../dfirst-index-less-than/lib/main.js | 65 ---- .../dfirst-index-less-than/package.json | 67 ----- .../dfirst-index-less-than/test/test.js | 194 ------------ .../ndarray/dindex-of-not-equal/README.md | 139 --------- .../benchmark/benchmark.js | 109 ------- .../ndarray/dindex-of-not-equal/docs/repl.txt | 35 --- .../dindex-of-not-equal/docs/types/index.d.ts | 56 ---- .../dindex-of-not-equal/docs/types/test.ts | 64 ---- .../dindex-of-not-equal/examples/index.js | 38 --- .../ndarray/dindex-of-not-equal/lib/index.js | 48 --- .../ndarray/dindex-of-not-equal/lib/main.js | 67 ----- .../ndarray/dindex-of-not-equal/package.json | 68 ----- .../ndarray/dindex-of-not-equal/test/test.js | 227 -------------- .../ndarray/gfirst-index-less-than/README.md | 128 -------- .../benchmark/benchmark.js | 105 ------- .../gfirst-index-less-than/docs/repl.txt | 32 -- .../docs/types/index.d.ts | 54 ---- .../gfirst-index-less-than/docs/types/test.ts | 63 ---- .../gfirst-index-less-than/examples/index.js | 35 --- .../gfirst-index-less-than/lib/index.js | 44 --- .../gfirst-index-less-than/lib/main.js | 65 ---- .../gfirst-index-less-than/package.json | 67 ----- .../gfirst-index-less-than/test/test.js | 193 ------------ .../sfirst-index-equal/docs/types/test.ts | 1 + .../sfirst-index-less-than/docs/types/test.ts | 1 + .../base/special/atan2/test/test.native.js | 21 +- .../math/base/special/atanh/test/test.js | 42 ++- .../base/special/atanh/test/test.native.js | 42 ++- .../math/base/special/betainc/README.md | 100 ------- .../special/betainc/benchmark/benchmark.js | 10 +- .../betainc/benchmark/benchmark.native.js | 161 ---------- .../betainc/benchmark/c/native/Makefile | 146 --------- .../betainc/benchmark/c/native/benchmark.c | 143 --------- .../math/base/special/betainc/binding.gyp | 170 ----------- .../base/special/betainc/examples/c/Makefile | 146 --------- .../base/special/betainc/examples/c/example.c | 42 --- .../math/base/special/betainc/include.gypi | 53 ---- .../stdlib/math/base/special/betainc.h | 40 --- .../math/base/special/betainc/lib/native.js | 60 ---- .../math/base/special/betainc/manifest.json | 77 ----- .../math/base/special/betainc/package.json | 3 - .../math/base/special/betainc/src/Makefile | 70 ----- .../math/base/special/betainc/src/addon.c | 45 --- .../math/base/special/betainc/src/main.c | 43 --- .../math/base/special/betainc/test/test.js | 43 ++- .../base/special/betainc/test/test.native.js | 130 -------- .../@stdlib/math/base/special/cabs2/README.md | 2 + .../math/base/special/cabs2f/README.md | 2 + .../@stdlib/math/base/special/cabsf/README.md | 2 + .../math/base/special/coth/test/test.js | 53 +++- .../base/special/coth/test/test.native.js | 53 +++- .../math/base/special/gamma/manifest.json | 9 +- .../math/base/special/gamma/src/main.c | 7 +- .../math/base/special/sqrtpi/test/test.js | 51 +++- .../base/special/sqrtpi/test/test.native.js | 51 +++- .../math/base/special/tand/test/test.js | 27 +- .../base/special/tand/test/test.native.js | 27 +- .../math/base/special/tanh/test/test.js | 53 +++- .../base/special/tanh/test/test.native.js | 53 +++- .../tools/hermitepoly/test/test.factory.js | 5 + .../float64/modified-huber-gradient/README.md | 246 --------------- .../benchmark/benchmark.js | 61 ---- .../benchmark/benchmark.native.js | 71 ----- .../benchmark/c/native/Makefile | 146 --------- .../benchmark/c/native/benchmark.c | 161 ---------- .../modified-huber-gradient/binding.gyp | 170 ----------- .../modified-huber-gradient/docs/repl.txt | 40 --- .../docs/types/index.d.ts | 62 ---- .../docs/types/test.ts | 71 ----- .../examples/c/Makefile | 146 --------- .../examples/c/example.c | 33 -- .../modified-huber-gradient/examples/index.js | 36 --- .../modified-huber-gradient/include.gypi | 53 ---- .../loss/float64/modified_huber_gradient.h | 38 --- .../modified-huber-gradient/lib/index.js | 55 ---- .../modified-huber-gradient/lib/main.js | 92 ------ .../modified-huber-gradient/lib/native.js | 68 ----- .../modified-huber-gradient/manifest.json | 75 ----- .../modified-huber-gradient/package.json | 68 ----- .../modified-huber-gradient/src/Makefile | 70 ----- .../modified-huber-gradient/src/addon.c | 22 -- .../modified-huber-gradient/src/main.c | 49 --- .../test/fixtures/julia/REQUIRE | 2 - .../test/fixtures/julia/runner.jl | 108 ------- .../test/fixtures/julia/small_negative.json | 1 - .../test/fixtures/julia/small_positive.json | 1 - .../test/fixtures/julia/tiny_negative.json | 1 - .../test/fixtures/julia/tiny_positive.json | 1 - .../modified-huber-gradient/test/test.js | 147 --------- .../test/test.native.js | 156 ---------- .../sgd-classification/penalties/README.md | 188 ------------ .../penalties/benchmark/benchmark.js | 48 --- .../penalties/docs/repl.txt | 27 -- .../penalties/docs/types/index.d.ts | 35 --- .../penalties/docs/types/test.ts | 32 -- .../penalties/examples/index.js | 36 --- .../ml/base/sgd-classification/penalties.h | 36 --- .../penalties/lib/data.json | 5 - .../sgd-classification/penalties/lib/enum.js | 54 ---- .../sgd-classification/penalties/lib/index.js | 47 --- .../sgd-classification/penalties/lib/main.js | 44 --- .../penalties/manifest.json | 36 --- .../sgd-classification/penalties/package.json | 67 ----- .../sgd-classification/penalties/test/test.js | 75 ----- .../penalty-enum2str/README.md | 121 -------- .../penalty-enum2str/benchmark/benchmark.js | 56 ---- .../penalty-enum2str/docs/repl.txt | 25 -- .../penalty-enum2str/docs/types/index.d.ts | 41 --- .../penalty-enum2str/docs/types/test.ts | 39 --- .../penalty-enum2str/examples/index.js | 30 -- .../penalty-enum2str/lib/index.js | 44 --- .../penalty-enum2str/lib/main.js | 60 ---- .../penalty-enum2str/package.json | 65 ---- .../penalty-enum2str/test/test.js | 66 ---- .../penalty-str2enum/README.md | 119 -------- .../penalty-str2enum/benchmark/benchmark.js | 55 ---- .../penalty-str2enum/docs/repl.txt | 27 -- .../penalty-str2enum/docs/types/index.d.ts | 40 --- .../penalty-str2enum/docs/types/test.ts | 39 --- .../penalty-str2enum/examples/index.js | 29 -- .../penalty-str2enum/lib/index.js | 40 --- .../penalty-str2enum/lib/main.js | 56 ---- .../penalty-str2enum/package.json | 65 ---- .../penalty-str2enum/test/test.js | 67 ----- .../ndarray/base/consensus-order/README.md | 2 + .../ndarray/base/output-order/README.md | 2 + .../base/unary-addon-dispatch/README.md | 2 + .../sparklines/unicode/line/lib/render.js | 6 +- .../@stdlib/random/array/cauchy/README.md | 7 - .../stats/base/dists/anglit/pdf/README.md | 252 ---------------- .../dists/anglit/pdf/benchmark/benchmark.js | 93 ------ .../anglit/pdf/benchmark/benchmark.native.js | 72 ----- .../dists/anglit/pdf/benchmark/c/Makefile | 146 --------- .../dists/anglit/pdf/benchmark/c/benchmark.c | 142 --------- .../stats/base/dists/anglit/pdf/binding.gyp | 170 ----------- .../stats/base/dists/anglit/pdf/docs/repl.txt | 75 ----- .../dists/anglit/pdf/docs/types/index.d.ts | 118 -------- .../base/dists/anglit/pdf/docs/types/test.ts | 119 -------- .../base/dists/anglit/pdf/examples/c/Makefile | 146 --------- .../dists/anglit/pdf/examples/c/example.c | 42 --- .../base/dists/anglit/pdf/examples/index.js | 32 -- .../stats/base/dists/anglit/pdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/anglit/pdf.h | 38 --- .../base/dists/anglit/pdf/lib/factory.js | 91 ------ .../stats/base/dists/anglit/pdf/lib/index.js | 54 ---- .../stats/base/dists/anglit/pdf/lib/main.js | 98 ------ .../stats/base/dists/anglit/pdf/lib/native.js | 76 ----- .../stats/base/dists/anglit/pdf/manifest.json | 82 ----- .../stats/base/dists/anglit/pdf/package.json | 71 ----- .../stats/base/dists/anglit/pdf/src/Makefile | 70 ----- .../stats/base/dists/anglit/pdf/src/addon.c | 22 -- .../stats/base/dists/anglit/pdf/src/main.c | 56 ---- .../anglit/pdf/test/fixtures/python/data.json | 1 - .../anglit/pdf/test/fixtures/python/runner.py | 98 ------ .../dists/anglit/pdf/test/test.factory.js | 142 --------- .../stats/base/dists/anglit/pdf/test/test.js | 38 --- .../base/dists/anglit/pdf/test/test.main.js | 106 ------- .../base/dists/anglit/pdf/test/test.native.js | 115 ------- .../base/dists/anglit/skewness/README.md | 239 --------------- .../anglit/skewness/benchmark/benchmark.js | 59 ---- .../skewness/benchmark/benchmark.native.js | 69 ----- .../anglit/skewness/benchmark/c/Makefile | 146 --------- .../anglit/skewness/benchmark/c/benchmark.c | 141 --------- .../base/dists/anglit/skewness/binding.gyp | 170 ----------- .../base/dists/anglit/skewness/docs/repl.txt | 38 --- .../anglit/skewness/docs/types/index.d.ts | 57 ---- .../dists/anglit/skewness/docs/types/test.ts | 56 ---- .../dists/anglit/skewness/examples/c/Makefile | 146 --------- .../anglit/skewness/examples/c/example.c | 40 --- .../dists/anglit/skewness/examples/index.js | 31 -- .../base/dists/anglit/skewness/include.gypi | 53 ---- .../stdlib/stats/base/dists/anglit/skewness.h | 38 --- .../base/dists/anglit/skewness/lib/index.js | 43 --- .../base/dists/anglit/skewness/lib/main.js | 69 ----- .../base/dists/anglit/skewness/lib/native.js | 63 ---- .../base/dists/anglit/skewness/manifest.json | 77 ----- .../base/dists/anglit/skewness/package.json | 67 ----- .../base/dists/anglit/skewness/src/Makefile | 70 ----- .../base/dists/anglit/skewness/src/addon.c | 22 -- .../base/dists/anglit/skewness/src/main.c | 42 --- .../skewness/test/fixtures/python/data.json | 1 - .../skewness/test/fixtures/python/runner.py | 82 ----- .../base/dists/anglit/skewness/test/test.js | 90 ------ .../dists/anglit/skewness/test/test.native.js | 99 ------ .../stats/base/dists/beta/cdf/README.md | 107 ------- .../beta/cdf/benchmark/benchmark.native.js | 71 ----- .../base/dists/beta/cdf/benchmark/c/Makefile | 146 --------- .../dists/beta/cdf/benchmark/c/benchmark.c | 143 --------- .../stats/base/dists/beta/cdf/binding.gyp | 170 ----------- .../base/dists/beta/cdf/examples/c/Makefile | 146 --------- .../base/dists/beta/cdf/examples/c/example.c | 43 --- .../stats/base/dists/beta/cdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/beta/cdf.h | 38 --- .../stats/base/dists/beta/cdf/lib/native.js | 88 ------ .../stats/base/dists/beta/cdf/manifest.json | 81 ----- .../stats/base/dists/beta/cdf/package.json | 3 - .../stats/base/dists/beta/cdf/src/Makefile | 70 ----- .../stats/base/dists/beta/cdf/src/addon.c | 22 -- .../stats/base/dists/beta/cdf/src/main.c | 52 ---- .../base/dists/beta/cdf/test/test.cdf.js | 21 +- .../base/dists/beta/cdf/test/test.factory.js | 21 +- .../base/dists/beta/cdf/test/test.native.js | 218 -------------- .../stats/base/dists/binomial/cdf/README.md | 107 ------- .../cdf/benchmark/benchmark.native.js | 71 ----- .../dists/binomial/cdf/benchmark/c/Makefile | 146 --------- .../binomial/cdf/benchmark/c/benchmark.c | 143 --------- .../stats/base/dists/binomial/cdf/binding.gyp | 170 ----------- .../dists/binomial/cdf/examples/c/Makefile | 146 --------- .../dists/binomial/cdf/examples/c/example.c | 45 --- .../base/dists/binomial/cdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/binomial/cdf.h | 38 --- .../base/dists/binomial/cdf/lib/native.js | 76 ----- .../base/dists/binomial/cdf/manifest.json | 90 ------ .../base/dists/binomial/cdf/package.json | 3 - .../base/dists/binomial/cdf/src/Makefile | 70 ----- .../stats/base/dists/binomial/cdf/src/addon.c | 22 -- .../stats/base/dists/binomial/cdf/src/main.c | 59 ---- .../base/dists/binomial/cdf/test/test.cdf.js | 43 ++- .../dists/binomial/cdf/test/test.factory.js | 43 ++- .../dists/binomial/cdf/test/test.native.js | 184 ------------ .../base/dists/binomial/ctor/package.json | 7 +- .../base/dists/binomial/logpmf/README.md | 108 ------- .../logpmf/benchmark/benchmark.native.js | 75 ----- .../binomial/logpmf/benchmark/c/Makefile | 146 --------- .../binomial/logpmf/benchmark/c/benchmark.c | 144 --------- .../base/dists/binomial/logpmf/binding.gyp | 170 ----------- .../dists/binomial/logpmf/examples/c/Makefile | 146 --------- .../binomial/logpmf/examples/c/example.c | 46 --- .../base/dists/binomial/logpmf/include.gypi | 53 ---- .../stdlib/stats/base/dists/binomial/logpmf.h | 41 --- .../base/dists/binomial/logpmf/lib/native.js | 76 ----- .../base/dists/binomial/logpmf/manifest.json | 93 ------ .../base/dists/binomial/logpmf/package.json | 6 - .../base/dists/binomial/logpmf/src/Makefile | 70 ----- .../base/dists/binomial/logpmf/src/addon.c | 22 -- .../base/dists/binomial/logpmf/src/main.c | 67 ----- .../dists/binomial/logpmf/test/test.native.js | 249 --------------- .../base/dists/binomial/pmf/package.json | 3 - .../base/dists/binomial/quantile/README.md | 107 ------- .../quantile/benchmark/benchmark.native.js | 71 ----- .../binomial/quantile/benchmark/c/Makefile | 146 --------- .../binomial/quantile/benchmark/c/benchmark.c | 143 --------- .../base/dists/binomial/quantile/binding.gyp | 170 ----------- .../binomial/quantile/examples/c/Makefile | 146 --------- .../binomial/quantile/examples/c/example.c | 43 --- .../base/dists/binomial/quantile/include.gypi | 53 ---- .../stats/base/dists/binomial/quantile.h | 38 --- .../dists/binomial/quantile/lib/native.js | 92 ------ .../dists/binomial/quantile/manifest.json | 99 ------ .../base/dists/binomial/quantile/package.json | 3 - .../base/dists/binomial/quantile/src/Makefile | 70 ----- .../base/dists/binomial/quantile/src/addon.c | 22 -- .../base/dists/binomial/quantile/src/main.c | 120 -------- .../binomial/quantile/test/test.native.js | 249 --------------- .../test/{test.main.js => test.quantile.js} | 0 .../stats/base/dists/burr-type3/cdf/README.md | 283 ------------------ .../burr-type3/cdf/benchmark/benchmark.js | 89 ------ .../cdf/benchmark/benchmark.native.js | 70 ----- .../dists/burr-type3/cdf/benchmark/c/Makefile | 146 --------- .../burr-type3/cdf/benchmark/c/benchmark.c | 142 --------- .../base/dists/burr-type3/cdf/binding.gyp | 170 ----------- .../base/dists/burr-type3/cdf/docs/repl.txt | 71 ----- .../burr-type3/cdf/docs/types/index.d.ts | 128 -------- .../dists/burr-type3/cdf/docs/types/test.ts | 119 -------- .../dists/burr-type3/cdf/examples/c/Makefile | 146 --------- .../dists/burr-type3/cdf/examples/c/example.c | 42 --- .../dists/burr-type3/cdf/examples/index.js | 32 -- .../base/dists/burr-type3/cdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/burr-type3/cdf.h | 38 --- .../base/dists/burr-type3/cdf/lib/factory.js | 82 ----- .../base/dists/burr-type3/cdf/lib/index.js | 58 ---- .../base/dists/burr-type3/cdf/lib/main.js | 96 ------ .../base/dists/burr-type3/cdf/lib/native.js | 80 ----- .../base/dists/burr-type3/cdf/manifest.json | 79 ----- .../base/dists/burr-type3/cdf/package.json | 71 ----- .../base/dists/burr-type3/cdf/src/Makefile | 70 ----- .../base/dists/burr-type3/cdf/src/addon.c | 22 -- .../base/dists/burr-type3/cdf/src/main.c | 49 --- .../test/fixtures/python/large_values.json | 1 - .../test/fixtures/python/medium_values.json | 1 - .../cdf/test/fixtures/python/runner.py | 91 ------ .../test/fixtures/python/small_values.json | 1 - .../dists/burr-type3/cdf/test/test.factory.js | 216 ------------- .../base/dists/burr-type3/cdf/test/test.js | 38 --- .../dists/burr-type3/cdf/test/test.main.js | 182 ----------- .../dists/burr-type3/cdf/test/test.native.js | 191 ------------ .../stats/base/dists/gumbel/mgf/README.md | 2 +- .../stats/base/dists/gumbel/pdf/README.md | 2 +- .../base/dists/gumbel/quantile/README.md | 2 +- .../base/dists/gumbel/skewness/README.md | 4 +- .../base/dists/gumbel/variance/README.md | 2 +- .../dists/hypergeometric/kurtosis/README.md | 99 ------ .../kurtosis/benchmark/benchmark.native.js | 74 ----- .../kurtosis/benchmark/c/Makefile | 146 --------- .../kurtosis/benchmark/c/benchmark.c | 142 --------- .../dists/hypergeometric/kurtosis/binding.gyp | 170 ----------- .../kurtosis/examples/c/Makefile | 146 --------- .../kurtosis/examples/c/example.c | 43 --- .../hypergeometric/kurtosis/include.gypi | 53 ---- .../base/dists/hypergeometric/kurtosis.h | 43 --- .../hypergeometric/kurtosis/lib/native.js | 68 ----- .../hypergeometric/kurtosis/manifest.json | 81 ----- .../hypergeometric/kurtosis/package.json | 3 - .../hypergeometric/kurtosis/src/Makefile | 70 ----- .../dists/hypergeometric/kurtosis/src/addon.c | 22 -- .../dists/hypergeometric/kurtosis/src/main.c | 59 ---- .../kurtosis/test/test.native.js | 154 ---------- .../base/dists/invgamma/quantile/README.md | 102 +------ .../quantile/benchmark/benchmark.native.js | 70 ----- .../invgamma/quantile/benchmark/c/Makefile | 146 --------- .../invgamma/quantile/benchmark/c/benchmark.c | 142 --------- .../base/dists/invgamma/quantile/binding.gyp | 170 ----------- .../invgamma/quantile/examples/c/Makefile | 146 --------- .../invgamma/quantile/examples/c/example.c | 42 --- .../base/dists/invgamma/quantile/include.gypi | 53 ---- .../stats/base/dists/invgamma/quantile.h | 38 --- .../base/dists/invgamma/quantile/lib/main.js | 3 +- .../dists/invgamma/quantile/lib/native.js | 82 ----- .../dists/invgamma/quantile/manifest.json | 79 ----- .../base/dists/invgamma/quantile/package.json | 8 +- .../base/dists/invgamma/quantile/src/Makefile | 70 ----- .../base/dists/invgamma/quantile/src/addon.c | 22 -- .../base/dists/invgamma/quantile/src/main.c | 48 --- .../invgamma/quantile/test/test.native.js | 207 ------------- .../dists/log-logistic/variance/README.md | 257 ---------------- .../variance/benchmark/benchmark.js | 59 ---- .../variance/benchmark/benchmark.native.js | 69 ----- .../variance/benchmark/c/Makefile | 146 --------- .../variance/benchmark/c/benchmark.c | 140 --------- .../dists/log-logistic/variance/binding.gyp | 170 ----------- .../dists/log-logistic/variance/docs/repl.txt | 44 --- .../variance/docs/types/index.d.ts | 66 ---- .../log-logistic/variance/docs/types/test.ts | 56 ---- .../log-logistic/variance/examples/c/Makefile | 146 --------- .../variance/examples/c/example.c | 40 --- .../log-logistic/variance/examples/index.js | 31 -- .../dists/log-logistic/variance/include.gypi | 53 ---- .../stats/base/dists/log-logistic/variance.h | 38 --- .../dists/log-logistic/variance/lib/index.js | 43 --- .../dists/log-logistic/variance/lib/main.js | 86 ------ .../dists/log-logistic/variance/lib/native.js | 71 ----- .../dists/log-logistic/variance/manifest.json | 83 ----- .../dists/log-logistic/variance/package.json | 69 ----- .../dists/log-logistic/variance/src/Makefile | 70 ----- .../dists/log-logistic/variance/src/addon.c | 22 -- .../dists/log-logistic/variance/src/main.c | 51 ---- .../variance/test/fixtures/julia/REQUIRE | 3 - .../variance/test/fixtures/julia/data.json | 1 - .../variance/test/fixtures/julia/runner.jl | 72 ----- .../dists/log-logistic/variance/test/test.js | 118 -------- .../log-logistic/variance/test/test.native.js | 127 -------- .../stats/base/dists/signrank/cdf/README.md | 96 ------ .../dists/signrank/cdf/benchmark/benchmark.js | 3 +- .../cdf/benchmark/benchmark.native.js | 69 ----- .../dists/signrank/cdf/benchmark/c/Makefile | 146 --------- .../signrank/cdf/benchmark/c/benchmark.c | 141 --------- .../stats/base/dists/signrank/cdf/binding.gyp | 170 ----------- .../dists/signrank/cdf/examples/c/Makefile | 146 --------- .../dists/signrank/cdf/examples/c/example.c | 41 --- .../base/dists/signrank/cdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/signrank/cdf.h | 38 --- .../base/dists/signrank/cdf/lib/native.js | 71 ----- .../base/dists/signrank/cdf/manifest.json | 93 ------ .../base/dists/signrank/cdf/package.json | 3 - .../base/dists/signrank/cdf/src/Makefile | 70 ----- .../stats/base/dists/signrank/cdf/src/addon.c | 22 -- .../stats/base/dists/signrank/cdf/src/main.c | 83 ----- .../base/dists/signrank/cdf/test/test.cdf.js | 9 +- .../dists/signrank/cdf/test/test.factory.js | 11 +- .../dists/signrank/cdf/test/test.native.js | 110 ------- .../stats/base/dists/wald/cdf/README.md | 279 ----------------- .../dists/wald/cdf/benchmark/benchmark.js | 90 ------ .../wald/cdf/benchmark/benchmark.native.js | 71 ----- .../base/dists/wald/cdf/benchmark/c/Makefile | 146 --------- .../dists/wald/cdf/benchmark/c/benchmark.c | 143 --------- .../stats/base/dists/wald/cdf/binding.gyp | 170 ----------- .../stats/base/dists/wald/cdf/docs/repl.txt | 81 ----- .../base/dists/wald/cdf/docs/types/index.d.ts | 121 -------- .../base/dists/wald/cdf/docs/types/test.ts | 119 -------- .../base/dists/wald/cdf/examples/c/Makefile | 146 --------- .../base/dists/wald/cdf/examples/c/example.c | 44 --- .../base/dists/wald/cdf/examples/index.js | 33 -- .../stats/base/dists/wald/cdf/include.gypi | 53 ---- .../stdlib/stats/base/dists/wald/cdf.h | 38 --- .../stats/base/dists/wald/cdf/lib/factory.js | 107 ------- .../stats/base/dists/wald/cdf/lib/index.js | 51 ---- .../stats/base/dists/wald/cdf/lib/main.js | 120 -------- .../stats/base/dists/wald/cdf/lib/native.js | 83 ----- .../stats/base/dists/wald/cdf/manifest.json | 93 ------ .../stats/base/dists/wald/cdf/package.json | 71 ----- .../stats/base/dists/wald/cdf/src/Makefile | 70 ----- .../stats/base/dists/wald/cdf/src/addon.c | 22 -- .../stats/base/dists/wald/cdf/src/main.c | 74 ----- .../wald/cdf/test/fixtures/julia/REQUIRE | 3 - .../wald/cdf/test/fixtures/julia/data.json | 1 - .../wald/cdf/test/fixtures/julia/runner.jl | 77 ----- .../base/dists/wald/cdf/test/test.factory.js | 198 ------------ .../stats/base/dists/wald/cdf/test/test.js | 38 --- .../base/dists/wald/cdf/test/test.main.js | 149 --------- .../base/dists/wald/cdf/test/test.native.js | 158 ---------- .../stats/chi2gof/benchmark/benchmark.js | 68 ++--- .../@stdlib/stats/incr/nansumprod/README.md | 22 ++ .../@stdlib/stats/iter/cugmean/lib/main.js | 2 +- .../@stdlib/stats/iter/cuhmean/lib/main.js | 2 +- 423 files changed, 703 insertions(+), 30717 deletions(-) delete mode 100644 docs/git-notes/bc7c322891b1c0b758e6aef323b2f22a3bab1500.txt delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/README.md delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/examples/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/main.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/package.json delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/test/test.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/README.md delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/examples/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/main.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/package.json delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/test/test.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/README.md delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/examples/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/index.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/main.js delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/package.json delete mode 100644 lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/test/test.js delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/benchmark/c/native/Makefile delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/benchmark/c/native/benchmark.c delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/binding.gyp delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/include.gypi delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/include/stdlib/math/base/special/betainc.h delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/lib/native.js delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/manifest.json delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/src/Makefile delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/src/addon.c delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/src/main.c delete mode 100644 lib/node_modules/@stdlib/math/base/special/betainc/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/README.md delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/benchmark/c/native/Makefile delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/benchmark/c/native/benchmark.c delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/binding.gyp delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/examples/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/include.gypi delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/include/stdlib/ml/base/loss/float64/modified_huber_gradient.h delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/lib/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/lib/main.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/lib/native.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/manifest.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/package.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/src/Makefile delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/src/addon.c delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/src/main.c delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/REQUIRE delete mode 100755 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/runner.jl delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/small_negative.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/small_positive.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/tiny_negative.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/fixtures/julia/tiny_positive.json delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/test.js delete mode 100644 lib/node_modules/@stdlib/ml/base/loss/float64/modified-huber-gradient/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/README.md delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/examples/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/include/stdlib/ml/base/sgd-classification/penalties.h delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/lib/data.json delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/lib/enum.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/lib/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/lib/main.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/manifest.json delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/package.json delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalties/test/test.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/README.md delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/examples/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/lib/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/lib/main.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/package.json delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-enum2str/test/test.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/README.md delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/examples/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/lib/index.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/lib/main.js delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/package.json delete mode 100644 lib/node_modules/@stdlib/ml/base/sgd-classification/penalty-str2enum/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/README.md delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/examples/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/include/stdlib/stats/base/dists/anglit/pdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/lib/factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/lib/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/lib/main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/package.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/fixtures/python/data.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/fixtures/python/runner.py delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/test.factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/test.main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/pdf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/README.md delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/examples/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/include/stdlib/stats/base/dists/anglit/skewness.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/lib/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/lib/main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/package.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/test/fixtures/python/data.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/test/fixtures/python/runner.py delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/skewness/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/include/stdlib/stats/base/dists/beta/cdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/beta/cdf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/include/stdlib/stats/base/dists/binomial/cdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/cdf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/include/stdlib/stats/base/dists/binomial/logpmf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/logpmf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/include/stdlib/stats/base/dists/binomial/quantile.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/test.native.js rename lib/node_modules/@stdlib/stats/base/dists/binomial/quantile/test/{test.main.js => test.quantile.js} (100%) delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/README.md delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/examples/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/include/stdlib/stats/base/dists/burr-type3/cdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/package.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/fixtures/python/large_values.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/fixtures/python/medium_values.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/fixtures/python/runner.py delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/fixtures/python/small_values.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/test.factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/test.main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/include/stdlib/stats/base/dists/hypergeometric/kurtosis.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/hypergeometric/kurtosis/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/include/stdlib/stats/base/dists/invgamma/quantile.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/invgamma/quantile/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/README.md delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/examples/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/include/stdlib/stats/base/dists/log-logistic/variance.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/lib/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/lib/main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/package.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/test/fixtures/julia/REQUIRE delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/test/fixtures/julia/data.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/test/fixtures/julia/runner.jl delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/log-logistic/variance/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/include/stdlib/stats/base/dists/signrank/cdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/signrank/cdf/test/test.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/README.md delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/benchmark/benchmark.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/benchmark/benchmark.native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/benchmark/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/benchmark/c/benchmark.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/binding.gyp delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/docs/repl.txt delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/docs/types/index.d.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/docs/types/test.ts delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/examples/c/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/examples/c/example.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/examples/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/include.gypi delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/include/stdlib/stats/base/dists/wald/cdf.h delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/lib/factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/lib/index.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/lib/main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/lib/native.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/manifest.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/package.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/src/Makefile delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/src/addon.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/src/main.c delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/fixtures/julia/REQUIRE delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/fixtures/julia/data.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/fixtures/julia/runner.jl delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/test.factory.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/test.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/test.main.js delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/wald/cdf/test/test.native.js diff --git a/docs/git-notes/bc7c322891b1c0b758e6aef323b2f22a3bab1500.txt b/docs/git-notes/bc7c322891b1c0b758e6aef323b2f22a3bab1500.txt deleted file mode 100644 index 12bb21e91b79..000000000000 --- a/docs/git-notes/bc7c322891b1c0b758e6aef323b2f22a3bab1500.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- -type: amend-message ---- -feat: add `blas/ext/base/ndarray/gfirst-index-less-than` - -PR-URL: https://github.com/stdlib-js/stdlib/pull/13596 -Co-authored-by: Athan Reines -Reviewed-by: Athan Reines -Signed-off-by: Athan Reines -Closes: https://github.com/stdlib-js/metr-issue-tracker/issues/1022 diff --git a/lib/node_modules/@stdlib/_tools/package-json/validate/examples/index.js b/lib/node_modules/@stdlib/_tools/package-json/validate/examples/index.js index 419c0eee63a9..a1b5641ce7fb 100644 --- a/lib/node_modules/@stdlib/_tools/package-json/validate/examples/index.js +++ b/lib/node_modules/@stdlib/_tools/package-json/validate/examples/index.js @@ -18,9 +18,10 @@ 'use strict'; -var pkg = require( './../package.json' ); var isValid = require( './../lib' ); +var pkg = require( './../package.json' ); + var bool = isValid( pkg ); console.log( bool ); diff --git a/lib/node_modules/@stdlib/_tools/repl-txt/parse/lib/extract_signature.js b/lib/node_modules/@stdlib/_tools/repl-txt/parse/lib/extract_signature.js index 8f15daaa8187..d8ddc5384a4d 100644 --- a/lib/node_modules/@stdlib/_tools/repl-txt/parse/lib/extract_signature.js +++ b/lib/node_modules/@stdlib/_tools/repl-txt/parse/lib/extract_signature.js @@ -48,6 +48,14 @@ function extractSignature( str ) { for ( i = 0; i < str.length; i++ ) { ch = str.charAt( i ); switch ( state ) { + default: + case 'name': + if ( ch === '(' ) { + state = 'params'; + } else { + name += ch; + } + break; case 'params': if ( ch === ')' ) { if ( param && param.name !== '' ) { @@ -81,17 +89,9 @@ function extractSignature( str ) { }; } } - break; - case 'name': - default: - if ( ch === '(' ) { - state = 'params'; - } else { - name += ch; - } - break; } } + return { 'name': name, 'parameters': params, diff --git a/lib/node_modules/@stdlib/blas/base/wasm/dasum/README.md b/lib/node_modules/@stdlib/blas/base/wasm/dasum/README.md index e84674e31b31..e438827327d1 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/dasum/README.md +++ b/lib/node_modules/@stdlib/blas/base/wasm/dasum/README.md @@ -30,7 +30,7 @@ limitations under the License. var dasum = require( '@stdlib/blas/base/wasm/dasum' ); ``` -#### dasum.main( N, x, strideX ) +#### dasum.main( N, x, stride ) Computes the sum of absolute values. diff --git a/lib/node_modules/@stdlib/blas/base/wasm/scnrm2/package.json b/lib/node_modules/@stdlib/blas/base/wasm/scnrm2/package.json index e3c55404dd8f..f9f2ea997f27 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/scnrm2/package.json +++ b/lib/node_modules/@stdlib/blas/base/wasm/scnrm2/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/blas/base/wasm/scnrm2", "version": "0.0.0", - "description": "Calculate the L2-norm of a single-precision complex floating-point vector.", + "description": "Multiply a vector `x` by a scalar `alpha`.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/main.js b/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/main.js index 01e577b08f5f..a1fed48b37f4 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/main.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/main.js @@ -42,7 +42,7 @@ var Module = require( './module.js' ); * * // Perform operation: * zcopy.main( x.length, x, 1, y, 1 ); -* // y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] +// y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); @@ -53,7 +53,7 @@ var Module = require( './module.js' ); * * // Perform operation: * zcopy.ndarray( x.length, x, 1, 0, y, -1, 2 ); -* // y => [ -5.0, -6.0, -3.0, -4.0, -1.0, -2.0 ] +// y => [ -5.0, -6.0, -3.0, -4.0, -1.0, -2.0 ] */ var zcopy = new Routine(); zcopy.initializeSync(); // eslint-disable-line n/no-sync diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/routine.js b/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/routine.js index b0f40fa742b2..c0b9ff6f77b7 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/routine.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zcopy/lib/routine.js @@ -56,7 +56,7 @@ var Module = require( './module.js' ); * * // Perform operation: * zcopy.main( x.length, x, 1, y, 1 ); -* // y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] +// y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); @@ -73,7 +73,7 @@ var Module = require( './module.js' ); * * // Perform operation: * zcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); -* // y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] +// y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] */ function Routine() { if ( !( this instanceof Routine ) ) { @@ -117,7 +117,7 @@ inherits( Routine, Module ); * * // Perform operation: * zcopy.main( x.length, x, 1, y, -1 ); -* // y => [ -5.0, -6.0, -3.0, -4.0, -1.0, -2.0 ] +// y => [ -5.0, -6.0, -3.0, -4.0, -1.0, -2.0 ] */ setReadOnly( Routine.prototype, 'main', function zcopy( N, x, strideX, y, strideY ) { return this.ndarray( N, x, strideX, stride2offset( N, strideX ), y, strideY, stride2offset( N, strideY ) ); // eslint-disable-line max-len @@ -154,7 +154,7 @@ setReadOnly( Routine.prototype, 'main', function zcopy( N, x, strideX, y, stride * * // Perform operation: * zcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); -* // y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] +// y => [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] */ setReadOnly( Routine.prototype, 'ndarray', function zcopy( N, x, strideX, offsetX, y, strideY, offsetY ) { var ptrs; diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/index.js b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/index.js index 777c9a4f30fd..ca25ee4f12fa 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/index.js @@ -33,8 +33,8 @@ * * // Perform operation: * zdrot.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 ); -* // zx => [ 5.0, 6.4, 7.8, 9.2, 10.6, 12.0 ] -* // zy => [ ~5.0, 5.2, 5.4, ~5.6, ~5.8, ~6.0 ] +// zx => [ 5.0, 6.4, 7.8, 9.2, 10.6, 12.0 ] +// zy => [ ~5.0, 5.2, 5.4, ~5.6, ~5.8, ~6.0 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); @@ -46,8 +46,8 @@ * * // Perform operation: * zdrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 ); -* // zx => [ 5.0, 6.4, 7.8, 9.2, 10.6, 12.0 ] -* // zy => [ ~5.0, 5.2, 5.4, ~5.6, ~5.8, ~6.0 ] +// zx => [ 5.0, 6.4, 7.8, 9.2, 10.6, 12.0 ] +// zy => [ ~5.0, 5.2, 5.4, ~5.6, ~5.8, ~6.0 ] * * @example * var Memory = require( '@stdlib/wasm/memory' ); diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/main.js b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/main.js index 028a68dc00c4..5bbb1a6ddf19 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/main.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/main.js @@ -42,8 +42,8 @@ var Module = require( './module.js' ); * * // Perform operation: * zdrot.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); @@ -54,8 +54,8 @@ var Module = require( './module.js' ); * * // Perform operation: * zdrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] */ var zdrot = new Routine(); zdrot.initializeSync(); // eslint-disable-line n/no-sync diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/routine.js b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/routine.js index 86101f0c7736..225abcc7f47d 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/routine.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zdrot/lib/routine.js @@ -56,8 +56,8 @@ var Module = require( './module.js' ); * * // Perform operation: * zdrot.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] * * @example * var Complex128Array = require( '@stdlib/array/complex128' ); @@ -74,8 +74,8 @@ var Module = require( './module.js' ); * * // Perform operation: * zdrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] */ function Routine() { if ( !( this instanceof Routine ) ) { @@ -121,8 +121,8 @@ inherits( Routine, Module ); * * // Perform operation: * zdrot.main( zx.length, zx, 1, zy, 1, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] */ setReadOnly( Routine.prototype, 'main', function zdrot( N, zx, strideX, zy, strideY, c, s ) { return this.ndarray( N, zx, strideX, stride2offset( N, strideX ), zy, strideY, stride2offset( N, strideY ), c, s ); // eslint-disable-line max-len @@ -161,8 +161,8 @@ setReadOnly( Routine.prototype, 'main', function zdrot( N, zx, strideX, zy, stri * * // Perform operation: * zdrot.ndarray( zx.length, zx, 1, 0, zy, 1, 0, 0.8, 0.6 ); -* // zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] -* // zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] +// zx => [ ~-0.2, ~-0.4, ~-0.6, ~-0.8, -1.0, ~-1.2 ] +// zy => [ 1.4, 2.8, 4.2, 5.6, 7.0, 8.4 ] */ setReadOnly( Routine.prototype, 'ndarray', function zdrot( N, zx, strideX, offsetX, zy, strideY, offsetY, c, s ) { var ptrs; diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/module.js b/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/module.js index 8a739be8fd20..90a34a16c59e 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/module.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/module.js @@ -127,7 +127,7 @@ inherits( Module, WasmModule ); * @param {PositiveInteger} N - number of indexed elements * @param {NonNegativeInteger} aptr - scalar constant pointer (i.e., byte offset) * @param {NonNegativeInteger} xptr - input array pointer (i.e., byte offset) -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @returns {NonNegativeInteger} input array pointer (i.e., byte offset) * * @example @@ -202,7 +202,7 @@ setReadOnly( Module.prototype, 'main', function zscal( N, aptr, xptr, strideX ) * @param {PositiveInteger} N - number of indexed elements * @param {NonNegativeInteger} aptr - scalar constant pointer (i.e., byte offset) * @param {NonNegativeInteger} xptr - input array pointer (i.e., byte offset) -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {NonNegativeInteger} offsetX - starting `x` index * @returns {NonNegativeInteger} input array pointer (i.e., byte offset) * diff --git a/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/routine.js b/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/routine.js index fbb9db587ab1..a56e0396d971 100644 --- a/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/routine.js +++ b/lib/node_modules/@stdlib/blas/base/wasm/zscal/lib/routine.js @@ -105,7 +105,7 @@ inherits( Routine, Module ); * @param {PositiveInteger} N - number of indexed elements * @param {Complex128} alpha - scalar constant * @param {Complex128Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @returns {Complex128Array} input array * * @example @@ -142,7 +142,7 @@ setReadOnly( Routine.prototype, 'main', function zscal( N, alpha, x, strideX ) { * @param {PositiveInteger} N - number of indexed elements * @param {Complex128} alpha - scalar constant * @param {Complex128Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {NonNegativeInteger} offsetX - starting index for `x` * @returns {Complex128Array} input array * diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/README.md deleted file mode 100644 index ffcdab1d53e5..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/README.md +++ /dev/null @@ -1,128 +0,0 @@ - - -# dfirstIndexLessThan - -> Return the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray. - -
- -
- - - -
- -## Usage - -```javascript -var dfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/dfirst-index-less-than' ); -``` - -#### dfirstIndexLessThan( arrays ) - -Returns the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray. - -```javascript -var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); - -var x = new Float64Vector( [ 0.0, 0.0, 0.0, 0.0 ] ); -var y = new Float64Vector( [ 0.0, 0.0, 1.0, 0.0 ] ); - -var idx = dfirstIndexLessThan( [ x, y ] ); -// returns 2 -``` - -The function has the following parameters: - -- **arrays**: array-like object containing the following ndarrays: - - - first one-dimensional input ndarray. - - second one-dimensional input ndarray. - -If the function is unable to find an element in the first one-dimensional input ndarray which is less than a corresponding element in the second one-dimensional input ndarray, the function returns `-1`. - -```javascript -var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); - -var x = new Float64Vector( [ 5.0, 6.0, 7.0, 8.0 ] ); -var y = new Float64Vector( [ 1.0, 2.0, 3.0, 4.0 ] ); - -var idx = dfirstIndexLessThan( [ x, y ] ); -// returns -1 -``` - -
- - - -
- -## Notes - -- When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. - -
- - - -
- -## Examples - - - -```javascript -var discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var dfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/dfirst-index-less-than' ); - -var opts = { - 'dtype': 'float64' -}; -var x = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( x ) ); - -var y = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( y ) ); - -var idx = dfirstIndexLessThan( [ x, y ] ); -console.log( idx ); -``` - -
- - - - - - - - - - - - - - diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/benchmark/benchmark.js deleted file mode 100644 index 176490c3079e..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/benchmark/benchmark.js +++ /dev/null @@ -1,105 +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 bench = require( '@stdlib/bench' ); -var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive; -var pow = require( '@stdlib/math/base/special/pow' ); -var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -var ones = require( '@stdlib/array/ones' ); -var format = require( '@stdlib/string/format' ); -var pkg = require( './../package.json' ).name; -var dfirstIndexLessThan = require( './../lib' ); - - -// VARIABLES // - -var options = { - 'dtype': 'float64' -}; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - array length -* @returns {Function} benchmark function -*/ -function createBenchmark( len ) { - var x = new Float64Vector( ones( len, options.dtype ) ); - var y = new Float64Vector( ones( len, options.dtype ) ); - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var out; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - out = dfirstIndexLessThan( [ x, y ] ); - if ( out !== out ) { - b.fail( 'should return an integer' ); - } - } - b.toc(); - if ( !isInteger( out ) ) { - b.fail( 'should return an integer' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var len; - var min; - var max; - var f; - var i; - - min = 1; // 10^min - max = 6; // 10^max - - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - f = createBenchmark( len ); - bench( format( '%s:len=%d', pkg, len ), f ); - } -} - -main(); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/repl.txt deleted file mode 100644 index e6886c7faa75..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/repl.txt +++ /dev/null @@ -1,33 +0,0 @@ - -{{alias}}( arrays ) - Returns the index of the first element in a one-dimensional double- - precision floating-point ndarray which is less than a corresponding element - in another one-dimensional double-precision floating-point ndarray. - - When comparing elements, the function checks whether an element in the first - one-dimensional input ndarray is less than a corresponding element in the - second one-dimensional input ndarray using the less-than operator `<`. As a - consequence, comparisons involving `NaN` always evaluate to `false`. - - Parameters - ---------- - arrays: ArrayLikeObject - Array-like object containing the following ndarrays: - - - first one-dimensional input ndarray. - - second one-dimensional input ndarray. - - Returns - ------- - out: integer - Index. - - Examples - -------- - > var x = new {{alias:@stdlib/ndarray/vector/float64}}( [ 0.0, 0.0, 0.0, 0.0 ] ); - > var y = new {{alias:@stdlib/ndarray/vector/float64}}( [ 0.0, 0.0, 1.0, 0.0 ] ); - > {{alias}}( [ x, y ] ) - 2 - - See Also - -------- diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/index.d.ts deleted file mode 100644 index 98180c960525..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/index.d.ts +++ /dev/null @@ -1,54 +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. -*/ - -// TypeScript Version: 4.1 - -/// - -import { float64ndarray } from '@stdlib/types/ndarray'; - -/** -* Returns the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - first one-dimensional input ndarray. -* - second one-dimensional input ndarray. -* -* - When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. -* -* @param arrays - array-like object containing ndarrays -* @returns index -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* -* var x = new Float64Vector( [ 0.0, 0.0, 0.0, 0.0 ] ); -* var y = new Float64Vector( [ 0.0, 0.0, 1.0, 0.0 ] ); -* -* var idx = dfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ -declare function dfirstIndexLessThan( arrays: [ float64ndarray, float64ndarray ] ): number; - - -// EXPORTS // - -export = dfirstIndexLessThan; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/test.ts deleted file mode 100644 index ada378446f94..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/docs/types/test.ts +++ /dev/null @@ -1,63 +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 space-in-parens */ - -import zeros = require( '@stdlib/ndarray/zeros' ); -import dfirstIndexLessThan = require( './index' ); - - -// TESTS // - -// The function returns a number... -{ - const x = zeros( [ 10 ], { - 'dtype': 'float64' - }); - const y = zeros( [ 10 ], { - 'dtype': 'float64' - }); - - dfirstIndexLessThan( [ x, y ] ); // $ExpectType number -} - -// The compiler throws an error if the function is provided a first argument which is not an array of ndarrays... -{ - dfirstIndexLessThan( '10' ); // $ExpectError - dfirstIndexLessThan( 10 ); // $ExpectError - dfirstIndexLessThan( true ); // $ExpectError - dfirstIndexLessThan( false ); // $ExpectError - dfirstIndexLessThan( null ); // $ExpectError - dfirstIndexLessThan( undefined ); // $ExpectError - dfirstIndexLessThan( [] ); // $ExpectError - dfirstIndexLessThan( {} ); // $ExpectError - dfirstIndexLessThan( ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = zeros( [ 10 ], { - 'dtype': 'float64' - }); - const y = zeros( [ 10 ], { - 'dtype': 'float64' - }); - - dfirstIndexLessThan(); // $ExpectError - dfirstIndexLessThan( [ x, y ], {} ); // $ExpectError -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/examples/index.js deleted file mode 100644 index 7c3ab47e7f69..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/examples/index.js +++ /dev/null @@ -1,35 +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 discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var dfirstIndexLessThan = require( './../lib' ); - -var opts = { - 'dtype': 'float64' -}; -var x = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( x ) ); - -var y = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( y ) ); - -var idx = dfirstIndexLessThan( [ x, y ] ); -console.log( idx ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/index.js deleted file mode 100644 index b4fee2b37824..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/index.js +++ /dev/null @@ -1,44 +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'; - -/** -* Return the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray. -* -* @module @stdlib/blas/ext/base/ndarray/dfirst-index-less-than -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* var dfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/dfirst-index-less-than' ); -* -* var x = new Float64Vector( [ 0.0, 0.0, 0.0, 0.0 ] ); -* var y = new Float64Vector( [ 0.0, 0.0, 1.0, 0.0 ] ); -* -* var idx = dfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ - -// MODULES // - -var main = require( './main.js' ); - - -// EXPORTS // - -module.exports = main; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/main.js deleted file mode 100644 index b203c92d4c3e..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/lib/main.js +++ /dev/null @@ -1,65 +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 numelDimension = require( '@stdlib/ndarray/base/numel-dimension' ); -var getStride = require( '@stdlib/ndarray/base/stride' ); -var getOffset = require( '@stdlib/ndarray/base/offset' ); -var getData = require( '@stdlib/ndarray/base/data-buffer' ); -var strided = require( '@stdlib/blas/ext/base/dfirst-index-less-than' ).ndarray; - - -// MAIN // - -/** -* Returns the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - first one-dimensional input ndarray. -* - second one-dimensional input ndarray. -* -* - When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. -* -* @param {ArrayLikeObject} arrays - array-like object containing ndarrays -* @returns {integer} index -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* -* var x = new Float64Vector( [ 0.0, 0.0, 0.0, 0.0 ] ); -* var y = new Float64Vector( [ 0.0, 0.0, 1.0, 0.0 ] ); -* -* var idx = dfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ -function dfirstIndexLessThan( arrays ) { - var x = arrays[ 0 ]; - var y = arrays[ 1 ]; - return strided( numelDimension( x, 0 ), getData( x ), getStride( x, 0 ), getOffset( x ), getData( y ), getStride( y, 0 ), getOffset( y ) ); // eslint-disable-line max-len -} - - -// EXPORTS // - -module.exports = dfirstIndexLessThan; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/package.json b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/package.json deleted file mode 100644 index bae2b524a0de..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@stdlib/blas/ext/base/ndarray/dfirst-index-less-than", - "version": "0.0.0", - "description": "Return the index of the first element in a one-dimensional double-precision floating-point ndarray which is less than a corresponding element in another one-dimensional double-precision floating-point ndarray.", - "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", - "stdmath", - "mathematics", - "math", - "blas", - "extended", - "array", - "index", - "search", - "find", - "less", - "compare", - "ndarray" - ], - "__stdlib__": {} -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/test/test.js deleted file mode 100644 index d29e09798be8..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dfirst-index-less-than/test/test.js +++ /dev/null @@ -1,194 +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 tape = require( 'tape' ); -var ndarray = require( '@stdlib/ndarray/base/ctor' ); -var Float64Array = require( '@stdlib/array/float64' ); -var dfirstIndexLessThan = require( './../lib' ); - - -// FUNCTIONS // - -/** -* Returns a one-dimensional ndarray. -* -* @private -* @param {Float64Array} buffer - underlying data buffer -* @param {NonNegativeInteger} length - number of indexed elements -* @param {integer} stride - stride length -* @param {NonNegativeInteger} offset - index offset -* @returns {ndarray} one-dimensional ndarray -*/ -function vector( buffer, length, stride, offset ) { - return new ndarray( 'float64', buffer, [ length ], [ stride ], offset, 'row-major' ); -} - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof dfirstIndexLessThan, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function returns the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray', function test( t ) { - var actual; - var x; - var y; - - x = vector( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 ); - y = vector( new Float64Array( [ 2.0, 2.0, 2.0, 3.0, 4.0, 5.0 ] ), 6, 1, 0 ); - - actual = dfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - x = vector( new Float64Array( [ 2.0, 1.0, 3.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 ); - y = vector( new Float64Array( [ 1.0, 2.0, 2.0, 3.0, 4.0, 5.0 ] ), 6, 1, 0 ); - - actual = dfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 1, 'returns expected value' ); - - x = vector( new Float64Array( [ 2.0, 2.0, 2.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 ); - y = vector( new Float64Array( [ 1.0, 2.0, 3.0, 5.0, 4.0, 5.0 ] ), 6, 1, 0 ); - - actual = dfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 2, 'returns expected value' ); - - x = vector( new Float64Array( [ 2.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 ); - y = vector( new Float64Array( [ 1.0, 2.0, 2.0, 3.0, 4.0, 5.0 ] ), 6, 1, 0 ); - - actual = dfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns `-1` if unable to find an element in the first one-dimensional input ndarray which is less than a corresponding element in the second one-dimensional input ndarray', function test( t ) { - var actual; - var x; - var y; - - x = vector( new Float64Array( [ 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ] ), 6, 1, 0 ); - y = vector( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ), 6, 1, 0 ); - - actual = dfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-unit strides', function test( t ) { - var actual; - var x; - var y; - - x = new Float64Array([ - 2.0, // 0 - 2.0, - 2.0, // 1 - -4.0, - 3.0, // 2 - 3.0, - 5.0, // 3 - 2.0 - ]); - y = new Float64Array([ - 1.0, // 0 - 2.0, - 1.0, // 1 - -4.0, - 4.0, // 2 - 3.0, - 4.0, // 3 - 2.0 - ]); - - actual = dfirstIndexLessThan( [ vector( x, 4, 2, 0 ), vector( y, 4, 2, 0 ) ] ); - - t.strictEqual( actual, 2, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having negative strides', function test( t ) { - var actual; - var x; - var y; - - x = new Float64Array([ - 1.0, // 3 - 2.0, - 2.0, // 2 - -2.0, - 3.0, // 1 - 4.0, - 5.0, // 0 - 2.0 - ]); - y = new Float64Array([ - 4.0, // 3 - 2.0, - 3.0, // 2 - -2.0, - 4.0, // 1 - 4.0, - 4.0, // 0 - 2.0 - ]); - - actual = dfirstIndexLessThan( [ vector( x, 4, -2, 6 ), vector( y, 4, -2, 6 ) ] ); - - t.strictEqual( actual, 1, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-zero offsets', function test( t ) { - var actual; - var x; - var y; - - x = new Float64Array([ - 2.0, - 1.0, // 0 - 2.0, - 2.0, // 1 - -2.0, - 3.0, // 2 - 3.0, - 4.0 // 3 - ]); - y = new Float64Array([ - 2.0, - 2.0, // 0 - 2.0, - 3.0, // 1 - -2.0, - 2.0, // 2 - 3.0, - 5.0 // 3 - ]); - - actual = dfirstIndexLessThan( [ vector( x, 4, 2, 1 ), vector( y, 4, 2, 1 ) ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/README.md deleted file mode 100644 index c65caf575761..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/README.md +++ /dev/null @@ -1,139 +0,0 @@ - - -# dindexOfNotEqual - -> Return the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. - -
- -
- - - -
- -## Usage - -```javascript -var dindexOfNotEqual = require( '@stdlib/blas/ext/base/ndarray/dindex-of-not-equal' ); -``` - -#### dindexOfNotEqual( arrays ) - -Returns the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. - -```javascript -var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); - -var x = new Float64Vector( [ 1.0, 1.0, 3.0 ] ); - -var searchElement = scalar2ndarray( 1.0, { - 'dtype': 'float64' -}); - -var idx = dindexOfNotEqual( [ x, searchElement ] ); -// returns 2 -``` - -The function has the following parameters: - -- **arrays**: array-like object containing the following ndarrays: - - - a one-dimensional input ndarray. - - a zero-dimensional ndarray containing the search element. - -If the function is unable to find an element which is not equal to a specified search element, the function returns `-1`. - -```javascript -var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); - -var x = new Float64Vector( [ 1.0, 1.0, 1.0 ] ); - -var searchElement = scalar2ndarray( 1.0, { - 'dtype': 'float64' -}); - -var idx = dindexOfNotEqual( [ x, searchElement ] ); -// returns -1 -``` - -
- - - -
- -## Notes - -- When searching for a search element, the function checks for inequality using the strict inequality operator `!==`. As a consequence, `NaN` values are considered distinct from all values (including other `NaN` values), and `-0` and `+0` are considered the same. - -
- - - -
- -## Examples - - - -```javascript -var discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var ndarraylike2scalar = require( '@stdlib/ndarray/ndarraylike2scalar' ); -var dindexOfNotEqual = require( '@stdlib/blas/ext/base/ndarray/dindex-of-not-equal' ); - -var opts = { - 'dtype': 'float64' -}; - -var x = discreteUniform( [ 10 ], 0, 2, opts ); -console.log( ndarray2array( x ) ); - -var searchElement = scalar2ndarray( 0, opts ); -console.log( 'Search Element:', ndarraylike2scalar( searchElement ) ); - -var idx = dindexOfNotEqual( [ x, searchElement ] ); -console.log( idx ); -``` - -
- - - - - - - - - - - - - - diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/benchmark/benchmark.js deleted file mode 100644 index 28913ccee710..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/benchmark/benchmark.js +++ /dev/null @@ -1,109 +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 bench = require( '@stdlib/bench' ); -var zeros = require( '@stdlib/ndarray/zeros' ); -var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive; -var pow = require( '@stdlib/math/base/special/pow' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -var format = require( '@stdlib/string/format' ); -var pkg = require( './../package.json' ).name; -var dindexOfNotEqual = require( './../lib' ); - - -// VARIABLES // - -var options = { - 'dtype': 'float64' -}; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - array length -* @returns {Function} benchmark function -*/ -function createBenchmark( len ) { - var searchElement; - var x; - - x = zeros( [ len ], options ); - searchElement = scalar2ndarray( 0.0, options ); - - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var out; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - out = dindexOfNotEqual( [ x, searchElement ] ); - if ( out !== out ) { - b.fail( 'should return an integer' ); - } - } - b.toc(); - if ( !isInteger( out ) ) { - b.fail( 'should return an integer' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var len; - var min; - var max; - var f; - var i; - - min = 1; // 10^min - max = 6; // 10^max - - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - f = createBenchmark( len ); - bench( format( '%s:len=%d', pkg, len ), f ); - } -} - -main(); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/repl.txt deleted file mode 100644 index c1b0cf95e56c..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/repl.txt +++ /dev/null @@ -1,35 +0,0 @@ - -{{alias}}( arrays ) - Returns the first index of an element in a one-dimensional double-precision - floating-point ndarray which is not equal to a specified search element. - - When searching for a search element, the function checks for inequality - using the strict inequality operator `!==`. As a consequence, `NaN` values - are considered distinct from all values (including other `NaN` values), and - `-0` and `+0` are considered the same. - - If unable to find an element which is not equal to a specified search - element, the function returns `-1`. - - Parameters - ---------- - arrays: ArrayLikeObject - Array-like object containing the following ndarrays: - - - a one-dimensional input ndarray. - - a zero-dimensional ndarray containing the search element. - - Returns - ------- - out: integer - Index. - - Examples - -------- - > var x = new {{alias:@stdlib/ndarray/vector/float64}}( [ 1.0, 1.0, 3.0 ] ); - > var v = {{alias:@stdlib/ndarray/from-scalar}}( 1.0, { 'dtype': 'float64' } ); - > {{alias}}( [ x, v ] ) - 2 - - See Also - -------- diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/index.d.ts deleted file mode 100644 index b8a73d6fc028..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/index.d.ts +++ /dev/null @@ -1,56 +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. -*/ - -// TypeScript Version: 4.1 - -/// - -import { float64ndarray, typedndarray } from '@stdlib/types/ndarray'; - -/** -* Returns the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - a one-dimensional input ndarray. -* - a zero-dimensional ndarray containing the search element. -* -* @param arrays - array-like object containing ndarrays -* @returns index -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -* -* var x = new Float64Vector( [ 1.0, 1.0, 3.0 ] ); -* -* var searchElement = scalar2ndarray( 1.0, { -* 'dtype': 'float64' -* }); -* -* var v = dindexOfNotEqual( [ x, searchElement ] ); -* // returns 2 -*/ -declare function dindexOfNotEqual( arrays: [ float64ndarray, typedndarray ] ): number; - - -// EXPORTS // - -export = dindexOfNotEqual; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/test.ts deleted file mode 100644 index 762ef435b2e5..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/docs/types/test.ts +++ /dev/null @@ -1,64 +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 space-in-parens */ - -import zeros = require( '@stdlib/ndarray/zeros' ); -import scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -import dindexOfNotEqual = require( './index' ); - - -// TESTS // - -// The function returns a number... -{ - const x = zeros( [ 10 ], { - 'dtype': 'float64' - }); - const searchElement = scalar2ndarray( 0.0, { - 'dtype': 'float64' - }); - - dindexOfNotEqual( [ x, searchElement ] ); // $ExpectType number -} - -// The compiler throws an error if the function is provided a first argument which is not an array of ndarrays... -{ - dindexOfNotEqual( '10' ); // $ExpectError - dindexOfNotEqual( 10 ); // $ExpectError - dindexOfNotEqual( true ); // $ExpectError - dindexOfNotEqual( false ); // $ExpectError - dindexOfNotEqual( null ); // $ExpectError - dindexOfNotEqual( undefined ); // $ExpectError - dindexOfNotEqual( [] ); // $ExpectError - dindexOfNotEqual( {} ); // $ExpectError - dindexOfNotEqual( ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = zeros( [ 10 ], { - 'dtype': 'float64' - }); - const searchElement = scalar2ndarray( 0.0, { - 'dtype': 'float64' - }); - - dindexOfNotEqual(); // $ExpectError - dindexOfNotEqual( [ x, searchElement ], {} ); // $ExpectError -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/examples/index.js deleted file mode 100644 index c2c2f793c424..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/examples/index.js +++ /dev/null @@ -1,38 +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 discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var ndarraylike2scalar = require( '@stdlib/ndarray/ndarraylike2scalar' ); -var dindexOfNotEqual = require( './../lib' ); - -var opts = { - 'dtype': 'float64' -}; - -var x = discreteUniform( [ 10 ], 0, 2, opts ); -console.log( ndarray2array( x ) ); - -var searchElement = scalar2ndarray( 0, opts ); -console.log( 'Search Element:', ndarraylike2scalar( searchElement ) ); - -var idx = dindexOfNotEqual( [ x, searchElement ] ); -console.log( idx ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/index.js deleted file mode 100644 index 0c1cba106c48..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/index.js +++ /dev/null @@ -1,48 +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'; - -/** -* Return the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. -* -* @module @stdlib/blas/ext/base/ndarray/dindex-of-not-equal -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -* var dindexOfNotEqual = require( '@stdlib/blas/ext/base/ndarray/dindex-of-not-equal' ); -* -* var x = new Float64Vector( [ 1.0, 1.0, 3.0 ] ); -* -* var searchElement = scalar2ndarray( 1.0, { -* 'dtype': 'float64' -* }); -* -* var v = dindexOfNotEqual( [ x, searchElement ] ); -* // returns 2 -*/ - -// MODULES // - -var main = require( './main.js' ); - - -// EXPORTS // - -module.exports = main; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/main.js deleted file mode 100644 index ab4dae461cdb..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/lib/main.js +++ /dev/null @@ -1,67 +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 numelDimension = require( '@stdlib/ndarray/base/numel-dimension' ); -var getStride = require( '@stdlib/ndarray/base/stride' ); -var getOffset = require( '@stdlib/ndarray/base/offset' ); -var getData = require( '@stdlib/ndarray/base/data-buffer' ); -var ndarraylike2scalar = require( '@stdlib/ndarray/base/ndarraylike2scalar' ); -var strided = require( '@stdlib/blas/ext/base/dindex-of-not-equal' ).ndarray; - - -// MAIN // - -/** -* Returns the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - a one-dimensional input ndarray. -* - a zero-dimensional ndarray containing the search element. -* -* @param {ArrayLikeObject} arrays - array-like object containing ndarrays -* @returns {integer} index -* -* @example -* var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); -* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -* -* var x = new Float64Vector( [ 1.0, 1.0, 3.0 ] ); -* -* var searchElement = scalar2ndarray( 1.0, { -* 'dtype': 'float64' -* }); -* -* var v = dindexOfNotEqual( [ x, searchElement ] ); -* // returns 2 -*/ -function dindexOfNotEqual( arrays ) { - var x = arrays[ 0 ]; - return strided( numelDimension( x, 0 ), ndarraylike2scalar( arrays[ 1 ] ), getData( x ), getStride( x, 0 ), getOffset( x ) ); // eslint-disable-line max-len -} - - -// EXPORTS // - -module.exports = dindexOfNotEqual; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/package.json b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/package.json deleted file mode 100644 index a722eb7d655f..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "@stdlib/blas/ext/base/ndarray/dindex-of-not-equal", - "version": "0.0.0", - "description": "Return the first index of an element in a one-dimensional double-precision floating-point ndarray which is not equal to a specified search element.", - "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", - "stdmath", - "mathematics", - "math", - "blas", - "extended", - "array", - "index", - "search", - "find", - "equal", - "unequal", - "float64", - "ndarray" - ], - "__stdlib__": {} -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/test/test.js deleted file mode 100644 index 37ffcc7b8f96..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dindex-of-not-equal/test/test.js +++ /dev/null @@ -1,227 +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 tape = require( 'tape' ); -var Float64Array = require( '@stdlib/array/float64' ); -var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); -var ndarray = require( '@stdlib/ndarray/base/ctor' ); -var dindexOfNotEqual = require( './../lib' ); - - -// FUNCTIONS // - -/** -* Returns a one-dimensional ndarray. -* -* @private -* @param {Float64Array} buffer - underlying data buffer -* @param {NonNegativeInteger} length - number of indexed elements -* @param {integer} stride - stride length -* @param {NonNegativeInteger} offset - index offset -* @returns {ndarray} one-dimensional ndarray -*/ -function vector( buffer, length, stride, offset ) { - return new ndarray( 'float64', buffer, [ length ], [ stride ], offset, 'row-major' ); -} - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof dindexOfNotEqual, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function returns the index of the first element in a one-dimensional ndarray which is not equal to a provided search element', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ), 6, 1, 0 ); - - searchElement = scalar2ndarray( 1.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 2, 'returns expected value' ); - - searchElement = scalar2ndarray( 2.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - searchElement = scalar2ndarray( 3.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - searchElement = scalar2ndarray( 4.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns `-1` if every element in a one-dimensional ndarray is equal to a provided search element', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 2.0, 2.0, 2.0 ] ), 3, 1, 0 ); - searchElement = scalar2ndarray( 2.0, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function considers `NaN` elements to be not equal to a provided search element', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 1.0, NaN, 1.0 ] ), 3, 1, 0 ); - searchElement = scalar2ndarray( 1.0, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns the index of the first element if a provided search element is `NaN`', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ NaN, 1.0 ] ), 2, 1, 0 ); - searchElement = scalar2ndarray( NaN, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function considers `-0` and `+0` to be equal', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ -0.0, 0.0 ] ), 2, 1, 0 ); - searchElement = scalar2ndarray( 0.0, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-unit strides', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 2.0, 9.0, 2.0, 9.0, 3.0, 9.0 ] ), 3, 2, 0 ); - - searchElement = scalar2ndarray( 2.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 2, 'returns expected value' ); - - searchElement = scalar2ndarray( 9.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having negative strides', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 2.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ), 6, -1, 5 ); - - searchElement = scalar2ndarray( 3.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 2, 'returns expected value' ); - - searchElement = scalar2ndarray( 1.0, { - 'dtype': 'float64' - }); - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-zero offsets', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ), 3, 1, 3 ); - searchElement = scalar2ndarray( 2.0, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, 1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns `-1` if provided an empty one-dimensional ndarray', function test( t ) { - var searchElement; - var actual; - var x; - - x = vector( new Float64Array( [] ), 0, 1, 0 ); - searchElement = scalar2ndarray( 2.0, { - 'dtype': 'float64' - }); - - actual = dindexOfNotEqual( [ x, searchElement ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/README.md b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/README.md deleted file mode 100644 index 3849f8561ece..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/README.md +++ /dev/null @@ -1,128 +0,0 @@ - - -# gfirstIndexLessThan - -> Return the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray. - -
- -
- - - -
- -## Usage - -```javascript -var gfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-less-than' ); -``` - -#### gfirstIndexLessThan( arrays ) - -Returns the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray. - -```javascript -var vector = require( '@stdlib/ndarray/vector/ctor' ); - -var x = vector( [ 0.0, 0.0, 0.0, 0.0 ], 'generic' ); -var y = vector( [ 0.0, 0.0, 1.0, 0.0 ], 'generic' ); - -var idx = gfirstIndexLessThan( [ x, y ] ); -// returns 2 -``` - -The function has the following parameters: - -- **arrays**: array-like object containing the following ndarrays: - - - first one-dimensional input ndarray. - - second one-dimensional input ndarray. - -If the function is unable to find an element in the first one-dimensional input ndarray which is less than a corresponding element in the second one-dimensional input ndarray, the function returns `-1`. - -```javascript -var vector = require( '@stdlib/ndarray/vector/ctor' ); - -var x = vector( [ 5.0, 6.0, 7.0, 8.0 ], 'generic' ); -var y = vector( [ 1.0, 2.0, 3.0, 4.0 ], 'generic' ); - -var idx = gfirstIndexLessThan( [ x, y ] ); -// returns -1 -``` - -
- - - -
- -## Notes - -- When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. - -
- - - -
- -## Examples - - - -```javascript -var discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var gfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-less-than' ); - -var opts = { - 'dtype': 'generic' -}; -var x = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( x ) ); - -var y = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( y ) ); - -var idx = gfirstIndexLessThan( [ x, y ] ); -console.log( idx ); -``` - -
- - - - - - - - - - - - - - diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/benchmark/benchmark.js deleted file mode 100644 index b9570f0d2cbf..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/benchmark/benchmark.js +++ /dev/null @@ -1,105 +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 bench = require( '@stdlib/bench' ); -var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive; -var pow = require( '@stdlib/math/base/special/pow' ); -var vector = require( '@stdlib/ndarray/vector/ctor' ); -var ones = require( '@stdlib/array/ones' ); -var format = require( '@stdlib/string/format' ); -var pkg = require( './../package.json' ).name; -var gfirstIndexLessThan = require( './../lib' ); - - -// VARIABLES // - -var options = { - 'dtype': 'generic' -}; - - -// FUNCTIONS // - -/** -* Creates a benchmark function. -* -* @private -* @param {PositiveInteger} len - array length -* @returns {Function} benchmark function -*/ -function createBenchmark( len ) { - var x = vector( ones( len, options.dtype ), options.dtype ); - var y = vector( ones( len, options.dtype ), options.dtype ); - return benchmark; - - /** - * Benchmark function. - * - * @private - * @param {Benchmark} b - benchmark instance - */ - function benchmark( b ) { - var out; - var i; - - b.tic(); - for ( i = 0; i < b.iterations; i++ ) { - out = gfirstIndexLessThan( [ x, y ] ); - if ( out !== out ) { - b.fail( 'should return an integer' ); - } - } - b.toc(); - if ( !isInteger( out ) ) { - b.fail( 'should return an integer' ); - } - b.pass( 'benchmark finished' ); - b.end(); - } -} - - -// MAIN // - -/** -* Main execution sequence. -* -* @private -*/ -function main() { - var len; - var min; - var max; - var f; - var i; - - min = 1; // 10^min - max = 6; // 10^max - - for ( i = min; i <= max; i++ ) { - len = pow( 10, i ); - f = createBenchmark( len ); - bench( format( '%s:len=%d', pkg, len ), f ); - } -} - -main(); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/repl.txt deleted file mode 100644 index 2b3d1c70f718..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/repl.txt +++ /dev/null @@ -1,32 +0,0 @@ - -{{alias}}( arrays ) - Returns the index of the first element in a one-dimensional ndarray which is - less than a corresponding element in another one-dimensional ndarray. - - When comparing elements, the function checks whether an element in the first - one-dimensional input ndarray is less than a corresponding element in the - second one-dimensional input ndarray using the less-than operator `<`. As a - consequence, comparisons involving `NaN` always evaluate to `false`. - - Parameters - ---------- - arrays: ArrayLikeObject - Array-like object containing the following ndarrays: - - - first one-dimensional input ndarray. - - second one-dimensional input ndarray. - - Returns - ------- - out: integer - Index. - - Examples - -------- - > var x = {{alias:@stdlib/ndarray/vector/ctor}}( [ 0.0, 0.0, 0.0, 0.0 ], 'generic' ); - > var y = {{alias:@stdlib/ndarray/vector/ctor}}( [ 0.0, 0.0, 1.0, 0.0 ], 'generic' ); - > {{alias}}( [ x, y ] ) - 2 - - See Also - -------- diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/index.d.ts deleted file mode 100644 index 56144c2690bf..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/index.d.ts +++ /dev/null @@ -1,54 +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. -*/ - -// TypeScript Version: 4.1 - -/// - -import { typedndarray } from '@stdlib/types/ndarray'; - -/** -* Returns the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - first one-dimensional input ndarray. -* - second one-dimensional input ndarray. -* -* - When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. -* -* @param arrays - array-like object containing ndarrays -* @returns index -* -* @example -* var vector = require( '@stdlib/ndarray/vector/ctor' ); -* -* var x = vector( [ 0.0, 0.0, 0.0, 0.0 ], 'generic' ); -* var y = vector( [ 0.0, 0.0, 1.0, 0.0 ], 'generic' ); -* -* var idx = gfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ -declare function gfirstIndexLessThan( arrays: [ typedndarray, typedndarray ] ): number; - - -// EXPORTS // - -export = gfirstIndexLessThan; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/test.ts deleted file mode 100644 index 4c1fc8b25eea..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/docs/types/test.ts +++ /dev/null @@ -1,63 +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 space-in-parens */ - -import zeros = require( '@stdlib/ndarray/zeros' ); -import gfirstIndexLessThan = require( './index' ); - - -// TESTS // - -// The function returns a number... -{ - const x = zeros( [ 10 ], { - 'dtype': 'generic' - }); - const y = zeros( [ 10 ], { - 'dtype': 'generic' - }); - - gfirstIndexLessThan( [ x, y ] ); // $ExpectType number -} - -// The compiler throws an error if the function is provided a first argument which is not an array of ndarrays... -{ - gfirstIndexLessThan( '10' ); // $ExpectError - gfirstIndexLessThan( 10 ); // $ExpectError - gfirstIndexLessThan( true ); // $ExpectError - gfirstIndexLessThan( false ); // $ExpectError - gfirstIndexLessThan( null ); // $ExpectError - gfirstIndexLessThan( undefined ); // $ExpectError - gfirstIndexLessThan( [] ); // $ExpectError - gfirstIndexLessThan( {} ); // $ExpectError - gfirstIndexLessThan( ( x: number ): number => x ); // $ExpectError -} - -// The compiler throws an error if the function is provided an unsupported number of arguments... -{ - const x = zeros( [ 10 ], { - 'dtype': 'generic' - }); - const y = zeros( [ 10 ], { - 'dtype': 'generic' - }); - - gfirstIndexLessThan(); // $ExpectError - gfirstIndexLessThan( [ x, y ], {} ); // $ExpectError -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/examples/index.js deleted file mode 100644 index 35c2479426f2..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/examples/index.js +++ /dev/null @@ -1,35 +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 discreteUniform = require( '@stdlib/random/discrete-uniform' ); -var ndarray2array = require( '@stdlib/ndarray/to-array' ); -var gfirstIndexLessThan = require( './../lib' ); - -var opts = { - 'dtype': 'generic' -}; -var x = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( x ) ); - -var y = discreteUniform( [ 10 ], 0, 10, opts ); -console.log( ndarray2array( y ) ); - -var idx = gfirstIndexLessThan( [ x, y ] ); -console.log( idx ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/index.js deleted file mode 100644 index f8e50426a29c..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/index.js +++ /dev/null @@ -1,44 +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'; - -/** -* Return the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray. -* -* @module @stdlib/blas/ext/base/ndarray/gfirst-index-less-than -* -* @example -* var vector = require( '@stdlib/ndarray/vector/ctor' ); -* var gfirstIndexLessThan = require( '@stdlib/blas/ext/base/ndarray/gfirst-index-less-than' ); -* -* var x = vector( [ 0.0, 0.0, 0.0, 0.0 ], 'generic' ); -* var y = vector( [ 0.0, 0.0, 1.0, 0.0 ], 'generic' ); -* -* var idx = gfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ - -// MODULES // - -var main = require( './main.js' ); - - -// EXPORTS // - -module.exports = main; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/main.js deleted file mode 100644 index d76ea8ec3554..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/lib/main.js +++ /dev/null @@ -1,65 +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 numelDimension = require( '@stdlib/ndarray/base/numel-dimension' ); -var getStride = require( '@stdlib/ndarray/base/stride' ); -var getOffset = require( '@stdlib/ndarray/base/offset' ); -var getData = require( '@stdlib/ndarray/base/data-buffer' ); -var strided = require( '@stdlib/blas/ext/base/gfirst-index-less-than' ).ndarray; - - -// MAIN // - -/** -* Returns the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray. -* -* ## Notes -* -* - The function expects the following ndarrays: -* -* - first one-dimensional input ndarray. -* - second one-dimensional input ndarray. -* -* - When comparing elements, the function checks whether an element in the first one-dimensional input ndarray is less than a corresponding element in the second one-dimensional input ndarray using the less-than operator `<`. As a consequence, comparisons involving `NaN` always evaluate to `false`. -* -* @param {ArrayLikeObject} arrays - array-like object containing ndarrays -* @returns {integer} index -* -* @example -* var vector = require( '@stdlib/ndarray/vector/ctor' ); -* -* var x = vector( [ 0.0, 0.0, 0.0, 0.0 ], 'generic' ); -* var y = vector( [ 0.0, 0.0, 1.0, 0.0 ], 'generic' ); -* -* var idx = gfirstIndexLessThan( [ x, y ] ); -* // returns 2 -*/ -function gfirstIndexLessThan( arrays ) { - var x = arrays[ 0 ]; - var y = arrays[ 1 ]; - return strided( numelDimension( x, 0 ), getData( x ), getStride( x, 0 ), getOffset( x ), getData( y ), getStride( y, 0 ), getOffset( y ) ); // eslint-disable-line max-len -} - - -// EXPORTS // - -module.exports = gfirstIndexLessThan; diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/package.json b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/package.json deleted file mode 100644 index 2f39b41ca260..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@stdlib/blas/ext/base/ndarray/gfirst-index-less-than", - "version": "0.0.0", - "description": "Return the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray.", - "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", - "stdmath", - "mathematics", - "math", - "blas", - "extended", - "array", - "index", - "search", - "find", - "less", - "compare", - "ndarray" - ], - "__stdlib__": {} -} diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/test/test.js deleted file mode 100644 index c3e984da4741..000000000000 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/gfirst-index-less-than/test/test.js +++ /dev/null @@ -1,193 +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 tape = require( 'tape' ); -var ndarray = require( '@stdlib/ndarray/base/ctor' ); -var gfirstIndexLessThan = require( './../lib' ); - - -// FUNCTIONS // - -/** -* Returns a one-dimensional ndarray. -* -* @private -* @param {Collection} buffer - underlying data buffer -* @param {NonNegativeInteger} length - number of indexed elements -* @param {integer} stride - stride length -* @param {NonNegativeInteger} offset - index offset -* @returns {ndarray} one-dimensional ndarray -*/ -function vector( buffer, length, stride, offset ) { - return new ndarray( 'generic', buffer, [ length ], [ stride ], offset, 'row-major' ); -} - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof gfirstIndexLessThan, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function returns the index of the first element in a one-dimensional ndarray which is less than a corresponding element in another one-dimensional ndarray', function test( t ) { - var actual; - var x; - var y; - - x = vector( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 6, 1, 0 ); - y = vector( [ 2.0, 2.0, 2.0, 3.0, 4.0, 5.0 ], 6, 1, 0 ); - - actual = gfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - x = vector( [ 2.0, 1.0, 3.0, 4.0, 5.0, 6.0 ], 6, 1, 0 ); - y = vector( [ 1.0, 2.0, 2.0, 3.0, 4.0, 5.0 ], 6, 1, 0 ); - - actual = gfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 1, 'returns expected value' ); - - x = vector( [ 2.0, 2.0, 2.0, 4.0, 5.0, 6.0 ], 6, 1, 0 ); - y = vector( [ 1.0, 2.0, 3.0, 5.0, 4.0, 5.0 ], 6, 1, 0 ); - - actual = gfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, 2, 'returns expected value' ); - - x = vector( [ 2.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 6, 1, 0 ); - y = vector( [ 1.0, 2.0, 2.0, 3.0, 4.0, 5.0 ], 6, 1, 0 ); - - actual = gfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function returns `-1` if unable to find an element in the first one-dimensional input ndarray which is less than a corresponding element in the second one-dimensional input ndarray', function test( t ) { - var actual; - var x; - var y; - - x = vector( [ 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ], 6, 1, 0 ); - y = vector( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 6, 1, 0 ); - - actual = gfirstIndexLessThan( [ x, y ] ); - t.strictEqual( actual, -1, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-unit strides', function test( t ) { - var actual; - var x; - var y; - - x = [ - 2.0, // 0 - 2.0, - 2.0, // 1 - -4.0, - 3.0, // 2 - 3.0, - 5.0, // 3 - 2.0 - ]; - y = [ - 1.0, // 0 - 2.0, - 1.0, // 1 - -4.0, - 4.0, // 2 - 3.0, - 4.0, // 3 - 2.0 - ]; - - actual = gfirstIndexLessThan( [ vector( x, 4, 2, 0 ), vector( y, 4, 2, 0 ) ] ); - - t.strictEqual( actual, 2, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having negative strides', function test( t ) { - var actual; - var x; - var y; - - x = [ - 1.0, // 3 - 2.0, - 2.0, // 2 - -2.0, - 3.0, // 1 - 4.0, - 5.0, // 0 - 2.0 - ]; - y = [ - 4.0, // 3 - 2.0, - 3.0, // 2 - -2.0, - 4.0, // 1 - 4.0, - 4.0, // 0 - 2.0 - ]; - - actual = gfirstIndexLessThan( [ vector( x, 4, -2, 6 ), vector( y, 4, -2, 6 ) ] ); - - t.strictEqual( actual, 1, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports one-dimensional ndarrays having non-zero offsets', function test( t ) { - var actual; - var x; - var y; - - x = [ - 2.0, - 1.0, // 0 - 2.0, - 2.0, // 1 - -2.0, - 3.0, // 2 - 3.0, - 4.0 // 3 - ]; - y = [ - 2.0, - 2.0, // 0 - 2.0, - 3.0, // 1 - -2.0, - 2.0, // 2 - 3.0, - 5.0 // 3 - ]; - - actual = gfirstIndexLessThan( [ vector( x, 4, 2, 1 ), vector( y, 4, 2, 1 ) ] ); - t.strictEqual( actual, 0, 'returns expected value' ); - - t.end(); -}); diff --git a/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-equal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-equal/docs/types/test.ts index 1012afe953cb..09b00a62fea8 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-equal/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-equal/docs/types/test.ts @@ -160,6 +160,7 @@ import sfirstIndexEqual = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float32Array... { var x = new Float32Array( [ 1.0, 2.0, 3.0 ] ); + var y = new Float32Array( [ 1.0, 2.0, 3.0 ] ); sfirstIndexEqual.ndarray( x.length, x, 1, 0, '1', 1, 0 ); // $ExpectError sfirstIndexEqual.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-less-than/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-less-than/docs/types/test.ts index f170cae22dbb..00f963f7738c 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-less-than/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/sfirst-index-less-than/docs/types/test.ts @@ -160,6 +160,7 @@ import sfirstIndexLessThan = require( './index' ); // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float32Array... { var x = new Float32Array( [ 1.0, 2.0, 3.0 ] ); + var y = new Float32Array( [ 1.0, 2.0, 3.0 ] ); sfirstIndexLessThan.ndarray( x.length, x, 1, 0, '1', 1, 0 ); // $ExpectError sfirstIndexLessThan.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/math/base/special/atan2/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/atan2/test/test.native.js index 2f3a3db1f619..4bdd9899b0e6 100755 --- a/lib/node_modules/@stdlib/math/base/special/atan2/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/atan2/test/test.native.js @@ -25,8 +25,9 @@ var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); -var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); +var abs = require( '@stdlib/math/base/special/abs' ); var tryRequire = require( '@stdlib/utils/try-require' ); +var EPS = require( '@stdlib/constants/float64/eps' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var PI = require( '@stdlib/constants/float64/pi' ); @@ -195,6 +196,8 @@ tape( 'the function returns `-PI/2` if provided a negative `y` and `x=-0`', opts tape( 'the function evaluates the `atan2` function (when x and y are positive)', opts, function test( t ) { var expected; var actual; + var delta; + var tol; var x; var y; var i; @@ -204,7 +207,9 @@ tape( 'the function evaluates the `atan2` function (when x and y are positive)', expected = positivePositive.expected; for ( i = 0; i < x.length; i++ ) { actual = atan2( y[i], x[i] ); - t.strictEqual( isAlmostSameValue( actual, expected[ i ], 1 ), true, 'returns expected value' ); + delta = abs( actual - expected[i] ); + tol = EPS * abs( expected[i] ); + t.strictEqual( delta <= tol, true, 'within tolerance. y: '+y[i]+'. x: '+x[i]+'. Actual: '+actual+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); } t.end(); }); @@ -212,6 +217,8 @@ tape( 'the function evaluates the `atan2` function (when x and y are positive)', tape( 'the function evaluates the `atan2` function (when x is negative and y is positive)', opts, function test( t ) { var expected; var actual; + var delta; + var tol; var x; var y; var i; @@ -221,7 +228,9 @@ tape( 'the function evaluates the `atan2` function (when x is negative and y is expected = negativePositive.expected; for ( i = 0; i < x.length; i++ ) { actual = atan2( y[i], x[i] ); - t.strictEqual( isAlmostSameValue( actual, expected[ i ], 2 ), true, 'returns expected value' ); + delta = abs( actual - expected[i] ); + tol = 2.0 * EPS * abs( expected[i] ); + t.strictEqual( delta <= tol, true, 'within tolerance. y: '+y[i]+'. x: '+x[i]+'. Actual: '+actual+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); } t.end(); }); @@ -229,6 +238,8 @@ tape( 'the function evaluates the `atan2` function (when x is negative and y is tape( 'the function evaluates the `atan2` function (when x and y are negative)', opts, function test( t ) { var expected; var actual; + var delta; + var tol; var x; var y; var i; @@ -238,7 +249,9 @@ tape( 'the function evaluates the `atan2` function (when x and y are negative)', expected = negativeNegative.expected; for ( i = 0; i < x.length; i++ ) { actual = atan2( y[i], x[i] ); - t.strictEqual( isAlmostSameValue( actual, expected[ i ], 2 ), true, 'returns expected value' ); + delta = abs( actual - expected[i] ); + tol = 2.0 * EPS * abs( expected[i] ); + t.strictEqual( delta <= tol, true, 'within tolerance. y: '+y[i]+'. x: '+x[i]+'. Actual: '+actual+'. E: '+expected[i]+'. tol: '+tol+'. Δ: '+delta+'.' ); } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/atanh/test/test.js b/lib/node_modules/@stdlib/math/base/special/atanh/test/test.js index 061d48d562c3..c4ede67c26cf 100644 --- a/lib/node_modules/@stdlib/math/base/special/atanh/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/atanh/test/test.js @@ -21,6 +21,7 @@ // MODULES // var tape = require( 'tape' ); +var abs = require( '@stdlib/math/base/special/abs' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var EPS = require( '@stdlib/constants/float64/eps' ); @@ -28,7 +29,6 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var randu = require( '@stdlib/random/base/randu' ); var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); -var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); var atanh = require( './../lib' ); @@ -50,6 +50,8 @@ tape( 'main export is a function', function test( t ) { tape( 'the function computes the hyperbolic arctangent (negative values)', function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -59,13 +61,21 @@ tape( 'the function computes the hyperbolic arctangent (negative values)', funct for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (positive values)', function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -75,13 +85,21 @@ tape( 'the function computes the hyperbolic arctangent (positive values)', funct for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (small negative)', function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -91,13 +109,21 @@ tape( 'the function computes the hyperbolic arctangent (small negative)', functi for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (small positive)', function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -107,7 +133,13 @@ tape( 'the function computes the hyperbolic arctangent (small positive)', functi for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/atanh/test/test.native.js b/lib/node_modules/@stdlib/math/base/special/atanh/test/test.native.js index ef2d194ff206..a217359051f9 100644 --- a/lib/node_modules/@stdlib/math/base/special/atanh/test/test.native.js +++ b/lib/node_modules/@stdlib/math/base/special/atanh/test/test.native.js @@ -22,6 +22,7 @@ var resolve = require( 'path' ).resolve; var tape = require( 'tape' ); +var abs = require( '@stdlib/math/base/special/abs' ); var PINF = require( '@stdlib/constants/float64/pinf' ); var NINF = require( '@stdlib/constants/float64/ninf' ); var tryRequire = require( '@stdlib/utils/try-require' ); @@ -30,7 +31,6 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' ); var randu = require( '@stdlib/random/base/randu' ); var isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' ); var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' ); -var isAlmostSameValue = require( '@stdlib/assert/is-almost-same-value' ); // FIXTURES // @@ -59,6 +59,8 @@ tape( 'main export is a function', opts, function test( t ) { tape( 'the function computes the hyperbolic arctangent (negative values)', opts, function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -68,13 +70,21 @@ tape( 'the function computes the hyperbolic arctangent (negative values)', opts, for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (positive values)', opts, function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -84,13 +94,21 @@ tape( 'the function computes the hyperbolic arctangent (positive values)', opts, for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (small negative)', opts, function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -100,13 +118,21 @@ tape( 'the function computes the hyperbolic arctangent (small negative)', opts, for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); tape( 'the function computes the hyperbolic arctangent (small positive)', opts, function test( t ) { var expected; + var delta; + var tol; var x; var y; var i; @@ -116,7 +142,13 @@ tape( 'the function computes the hyperbolic arctangent (small positive)', opts, for ( i = 0; i < x.length; i++ ) { y = atanh( x[i] ); - t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' ); + if ( y === expected[ i ] ) { + t.strictEqual( y, expected[ i ], 'x: '+x[i]+'. E: '+expected[i] ); + } else { + delta = abs( y - expected[i] ); + tol = 1.0 * EPS * abs( expected[i] ); + t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol+'.' ); + } } t.end(); }); diff --git a/lib/node_modules/@stdlib/math/base/special/betainc/README.md b/lib/node_modules/@stdlib/math/base/special/betainc/README.md index 5d3a7fcb828c..73b777db6387 100644 --- a/lib/node_modules/@stdlib/math/base/special/betainc/README.md +++ b/lib/node_modules/@stdlib/math/base/special/betainc/README.md @@ -120,106 +120,6 @@ logEachMap( 'x: %0.4f, \t a: %0.4f, \t b: %0.4f, \t f(x,a,b): %0.4f', x, a, b, b - - -* * * - -
- -## C APIs - - - -
- -
- - - - - -
- -### Usage - -```c -#include "stdlib/math/base/special/betainc.h" -``` - -#### stdlib_base_betainc( x, a, b, regularized, upper ) - -Evaluates the incomplete beta function. - -```c -double y = stdlib_base_betainc( 0.5, 2.0, 2.0, true, false ); -// returns 0.5 -``` - -The function accepts the following arguments: - -- **x**: `[in] double` function parameter. -- **a**: `[in] double` function parameter. -- **b**: `[in] double` function parameter. -- **regularized**: `[in] bool` indicating if the function should evaluate the regularized incomplete beta function. -- **upper**: `[in] bool` indicating if the function should return the upper tail of the incomplete beta function. - -```c -double stdlib_base_betainc( const double x, const double a, const double b, const bool regularized, const bool upper ); -``` - -
- - - - - -
- -
- - - - - -
- -### Examples - -```c -#include "stdlib/math/base/special/betainc.h" -#include -#include - -static double random_uniform( const double min, const double max ) { - double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); - return min + ( v*(max-min) ); -} - -int main( void ) { - double x; - double a; - double b; - double v; - int i; - - for ( i = 0; i < 100; i++ ) { - x = random_uniform( 0.0, 1.0 ); - a = random_uniform( 0.0, 10.0 ); - b = random_uniform( 0.0, 10.0 ); - v = stdlib_base_betainc( x, a, b, true, false ); - printf( "x: %lf, a: %lf, b: %lf, f(x,a,b): %lf\n", x, a, b, v ); - } -} -``` - -
- - - -
- - -